Re: [meta-ti] Full nohz on TCI6638k2k (KeyStone II)
On Fri, Apr 26, 2013 at 5:45 PM, William Mills wmi...@ti.com wrote: On 04/26/2013 03:06 AM, Mats Liljegren wrote: I would like to perform a customer demo running a benchmark application in full nohz mode on TCI6638k2k target, which as far as I understand it is a KeyStone II architecture. Does anyone know what the best Linux source code is to perform the nohz port for this board? It should preferably be Linux 3.9 of any RC level, but 3.8 should work as well. I also need a hardware timer to be used as an interrupt source for the interrupt latency measurements. Any suggestions for framework or driver to use? Mats, The team is just now rebasing the bringup work on 3.8.4. You can find their work here: http://arago-project.org/git/projects/?p=linux-keystone.git;a=shortlog;h=refs/heads/release-server/master (The word server ~= 3.8 for this archive) Please note that all the master branches are rebuilt from the feature branches in the nightly build script. I think the feature branches get rebased also. The tags of course you can count on. The A15's use the per-core archetecture timer normally. However the SOC has multiple (20) Timer64 peripherals that can be used as well if they are not being used by the DSPs. If you configure which timer64 to use w/ device tree you should be fine. Bill Thanks! I'll check it out. /Mats -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[v2,1/3] ARM: dts: AM33XX: Add ELM node
From: avinash philip avinashphi...@ti.com From: Philip, Avinash avinashphi...@ti.com Add ELM data node to AM33XX device tree file. Signed-off-by: Philip Avinash avinashphi...@ti.com Acked-by: Peter Korsgaard jac...@sunsite.dk Tested-by: Pekon Gupta pe...@ti.com --- Changes since v2: - Replace xx literals to 52 - remove tab arch/arm/boot/dts/am33xx.dtsi |8 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi index da79618..115bf28 100644 --- a/arch/arm/boot/dts/am33xx.dtsi +++ b/arch/arm/boot/dts/am33xx.dtsi @@ -389,5 +389,13 @@ mac-address = [ 00 00 00 00 00 00 ]; }; }; + + elm: elm@4808 { + compatible = ti,am3352-elm; + reg = 0x4808 0x2000; + interrupts = 4; + ti,hwmods = elm; + status = disabled; + }; }; }; -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[v2,2/3] ARM: dts: AM33XX: Add GPMC node
From: avinash philip avinashphi...@ti.com From: Philip, Avinash avinashphi...@ti.com Add GPMC data node to AM33XX device tree file. Signed-off-by: Philip Avinash avinashphi...@ti.com Acked-by: Peter Korsgaard jac...@sunsite.dk Tested-by: Pekon Gupta pe...@ti.com --- Changes since v2: - Change number of chip select to 7 arch/arm/boot/dts/am33xx.dtsi | 12 1 file changed, 12 insertions(+) diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi index 115bf28..fbcb90b 100644 --- a/arch/arm/boot/dts/am33xx.dtsi +++ b/arch/arm/boot/dts/am33xx.dtsi @@ -397,5 +397,17 @@ ti,hwmods = elm; status = disabled; }; + + gpmc: gpmc@5000 { + compatible = ti,am3352-gpmc; + ti,hwmods = gpmc; + reg = 0x5000 0x2000; + interrupts = 100; + num-cs = 7; + num-waitpins = 2; + #address-cells = 2; + #size-cells = 1; + status = disabled; + }; }; }; -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[v2, 3/3] ARM: dts: AM33XX: Add NAND flash device tree data to am335x-evm
From: avinash philip avinashphi...@ti.com NAND flash connected in am335x-evm on GPMC controller. This patch adds device tree node in am3355-evm with GPMC contoller timing for NAND flash interface, NAND partition table, ECC scheme, elm handle id. Signed-off-by: Philip Avinash avinashphi...@ti.com Tested-by: Pekon Gupta pe...@ti.com --- arch/arm/boot/dts/am335x-evm.dts | 98 +- 1 file changed, 97 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts index 0423298..1c2fd89 100644 --- a/arch/arm/boot/dts/am335x-evm.dts +++ b/arch/arm/boot/dts/am335x-evm.dts @@ -26,7 +26,8 @@ am33xx_pinmux: pinmux@44e10800 { pinctrl-names = default; - pinctrl-0 = matrix_keypad_s0 volume_keys_s0; + pinctrl-0 = matrix_keypad_s0 volume_keys_s0 + nandflash_pins_s0; matrix_keypad_s0: matrix_keypad_s0 { pinctrl-single,pins = @@ -44,6 +45,26 @@ 0x154 0x27 /* spi0_d0.gpio0_3, INPUT | MODE7 */ ; }; + + nandflash_pins_s0: nandflash_pins_s0 { + pinctrl-single,pins = + 0x0 0x30/* gpmc_ad0.gpmc_ad0, INPUT | PULLUP | MODE0 */ + 0x4 0x30/* gpmc_ad1.gpmc_ad1, INPUT | PULLUP | MODE0 */ + 0x8 0x30/* gpmc_ad2.gpmc_ad2, INPUT | PULLUP | MODE0 */ + 0xc 0x30/* gpmc_ad3.gpmc_ad3, INPUT | PULLUP | MODE0 */ + 0x10 0x30 /* gpmc_ad4.gpmc_ad4, INPUT | PULLUP | MODE0 */ + 0x14 0x30 /* gpmc_ad5.gpmc_ad5, INPUT | PULLUP | MODE0 */ + 0x18 0x30 /* gpmc_ad6.gpmc_ad6, INPUT | PULLUP | MODE0 */ + 0x1c 0x30 /* gpmc_ad7.gpmc_ad7, INPUT | PULLUP | MODE0 */ + 0x70 0x30 /* gpmc_wait0.gpmc_wait0, INPUT | PULLUP | MODE0 */ + 0x74 0x37 /* gpmc_wpn.gpio0_30, INPUT | PULLUP | MODE7 */ + 0x7c 0x8/* gpmc_csn0.gpmc_csn0, PULL DISA */ + 0x90 0x8/* gpmc_advn_ale.gpmc_advn_ale, PULL DISA */ + 0x94 0x8/* gpmc_oen_ren.gpmc_oen_ren, PULL DISA */ + 0x98 0x8/* gpmc_wen.gpmc_wen, PULL DISA */ + 0x9c 0x8/* gpmc_be0n_cle.gpmc_be0n_cle, PULL DISA */ + ; + }; }; ocp { @@ -102,6 +123,81 @@ reg = 0x48; }; }; + + elm: elm@4808 { + status = okay; + }; + + gpmc: gpmc@5000 { + status = okay; + ranges = 0 0 0x0800 0x1000; /* CS0: NAND */ + + nand@0,0 { + reg = 0 0 0; /* CS0, offset 0 */ + nand-bus-width = 8; + ti,nand-ecc-opt = bch8; + + gpmc,sync-clk = 0; + gpmc,cs-on = 0; + gpmc,cs-rd-off = 44; + gpmc,cs-wr-off = 44; + gpmc,adv-on = 6; + gpmc,adv-rd-off = 34; + gpmc,adv-wr-off = 44; + gpmc,we-off = 40; + gpmc,oe-off = 54; + gpmc,access = 64; + gpmc,rd-cycle = 82; + gpmc,wr-cycle = 82; + gpmc,wr-access = 40; + gpmc,wr-data-mux-bus = 0; + + #address-cells = 1; + #size-cells = 1; + elm_id = elm; + + /* MTD partition table */ + partition@0 { + label = SPL1; + reg = 0x 0x2; + }; + + partition@1 { + label = SPL2; + reg = 0x0002 0x0002; + }; + + partition@2 { + label = SPL3; + reg = 0x0004 0x0002; + }; + + partition@3 { +
v3.9.0-rc8 : oops in tick_do_update_jiffies64+0xbc/0x110
I've been experiencing several crashes all pointing exactly the same place in the same tick routine (see below). The exception stack trace at the end changes depending on when the oops occurs. I've had the oops occur maybe 6 times in the last 50 reboots. Any ideas ? Mark J. --- [0.00] Booting Linux on physical CPU 0x0 [0.00] Linux version 3.9.0-rc8-00034-gb395e3d-dirty (mpfj@mpfj-nanobone) (gcc version 4.8.0 (Buildroot 2013.05-git-00527-gc24e66a) ) #30 Sun Apr 28 19:00:18 BST 2013 [0.00] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7d [0.00] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache [0.00] Machine: Generic AM33XX (Flattened Device Tree), model: Newflow AM335x NanoBone [0.00] debug: ignoring loglevel setting. [0.00] Memory policy: ECC disabled, Data cache writeback [0.00] On node 0 totalpages: 65280 [0.00] free_area_init_node: node 0, pgdat c0597040, node_mem_map c0ac1000 [0.00] Normal zone: 512 pages used for memmap [0.00] Normal zone: 0 pages reserved [0.00] Normal zone: 65280 pages, LIFO batch:15 [0.00] CPU: All CPU(s) started in SVC mode. [0.00] AM335X ES1.0 (neon ) [0.00] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768 [0.00] pcpu-alloc: [0] 0 [0.00] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 64768 [0.00] Kernel command line: console=ttyO0,115200n8 noinitrd ip=off mem=256M rootwait=1 ubi.mtd=7,2048 rootfstype=ubifs root=ubi0:rootfs ignore_loglevel [0.00] PID hash table entries: 1024 (order: 0, 4096 bytes) [0.00] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes) [0.00] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes) [0.00] __ex_table already sorted, skipping sort [0.00] Memory: 255MB = 255MB total [0.00] Memory: 247788k/247788k available, 14356k reserved, 0K highmem [0.00] Virtual kernel memory layout: [0.00] vector : 0x - 0x1000 ( 4 kB) [0.00] fixmap : 0xfff0 - 0xfffe ( 896 kB) [0.00] vmalloc : 0xd080 - 0xff00 ( 744 MB) [0.00] lowmem : 0xc000 - 0xd000 ( 256 MB) [0.00] pkmap : 0xbfe0 - 0xc000 ( 2 MB) [0.00] .text : 0xc0008000 - 0xc0513f0c (5168 kB) [0.00] .init : 0xc0514000 - 0xc0545d24 ( 200 kB) [0.00] .data : 0xc0546000 - 0xc0597c20 ( 328 kB) [0.00].bss : 0xc0597c20 - 0xc0abca50 (5268 kB) [0.00] NR_IRQS:16 nr_irqs:16 16 [0.00] IRQ: Found an INTC at 0xfa20 (revision 5.0) with 128 interrupts [0.00] Total of 128 interrupts on 1 active controller [0.00] OMAP clockevent source: GPTIMER1 at 2600 Hz [0.00] sched_clock: 32 bits at 26MHz, resolution 38ns, wraps every 165191ms [0.00] OMAP clocksource: GPTIMER2 at 2600 Hz [0.00] Console: colour dummy device 80x30 [0.00] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar [0.00] ... MAX_LOCKDEP_SUBCLASSES: 8 [0.00] ... MAX_LOCK_DEPTH: 48 [0.00] ... MAX_LOCKDEP_KEYS:8191 [0.00] ... CLASSHASH_SIZE: 4096 [0.00] ... MAX_LOCKDEP_ENTRIES: 16384 [0.00] ... MAX_LOCKDEP_CHAINS: 32768 [0.00] ... CHAINHASH_SIZE: 16384 [0.00] memory used by lock dependency info: 3695 kB [0.00] per task-struct memory footprint: 1152 bytes [0.001049] Calibrating delay loop... 363.72 BogoMIPS (lpj=1818624) [0.119700] pid_max: default: 32768 minimum: 301 [0.120058] Security Framework initialized [0.120187] Mount-cache hash table entries: 512 [0.133586] CPU: Testing write buffer coherency: ok [0.135069] Setting up static identity map for 0xc03fda80 - 0xc03fdad8 [0.139239] devtmpfs: initialized [0.204075] pinctrl core: initialized pinctrl subsystem [0.210660] regulator-dummy: no parameters [0.213362] NET: Registered protocol family 16 [0.214291] DMA: preallocated 256 KiB pool for atomic coherent allocations [0.237564] gpiochip_add: registered GPIOs 0 to 31 on device: gpio [0.238071] OMAP GPIO hardware version 0.1 [0.241695] gpiochip_add: registered GPIOs 32 to 63 on device: gpio [0.245058] gpiochip_add: registered GPIOs 64 to 95 on device: gpio [0.248148] gpiochip_add: registered GPIOs 96 to 127 on device: gpio [0.267223] omap-gpmc 5000.gpmc: could not find pctldev for node /pinmux@44e10800/gpmc_pins, deferring probe [0.267286] platform 5000.gpmc: Driver omap-gpmc requests probe deferral [0.268044] No ATAGs? [0.268069] hw-breakpoint: debug architecture 0x4 unsupported. [0.316248] bio: create slab bio-0 at 0 [
[PATCH v6 3/9] usb: phy: twl4030: use the new generic PHY framework
Used the generic PHY framework API to create the PHY. For powering on and powering off the PHY, power_on and power_off ops are used. Once the MUSB OMAP glue is adapted to the new framework, the suspend and resume ops of usb phy library will be removed. However using the old usb phy library cannot be completely removed because otg is intertwined with phy and moving to the new framework completely will break otg. Once we have a separate otg state machine, we can get rid of the usb phy library. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- drivers/usb/phy/phy-twl4030-usb.c | 44 + 1 file changed, 44 insertions(+) diff --git a/drivers/usb/phy/phy-twl4030-usb.c b/drivers/usb/phy/phy-twl4030-usb.c index 8f78d2d..ef6eadf 100644 --- a/drivers/usb/phy/phy-twl4030-usb.c +++ b/drivers/usb/phy/phy-twl4030-usb.c @@ -33,6 +33,7 @@ #include linux/io.h #include linux/delay.h #include linux/usb/otg.h +#include linux/phy/phy.h #include linux/usb/musb-omap.h #include linux/usb/ulpi.h #include linux/i2c/twl.h @@ -431,6 +432,14 @@ static void twl4030_phy_suspend(struct twl4030_usb *twl, int controller_off) dev_dbg(twl-dev, %s\n, __func__); } +static int twl4030_phy_power_off(struct phy *phy) +{ + struct twl4030_usb *twl = dev_get_drvdata(phy-dev); + + twl4030_phy_suspend(twl, 0); + return 0; +} + static void __twl4030_phy_resume(struct twl4030_usb *twl) { twl4030_phy_power(twl, 1); @@ -459,6 +468,14 @@ static void twl4030_phy_resume(struct twl4030_usb *twl) } } +static int twl4030_phy_power_on(struct phy *phy) +{ + struct twl4030_usb *twl = dev_get_drvdata(phy-dev); + + twl4030_phy_resume(twl); + return 0; +} + static int twl4030_usb_ldo_init(struct twl4030_usb *twl) { /* Enable writing to power configuration registers */ @@ -609,6 +626,13 @@ static int twl4030_usb_phy_init(struct usb_phy *phy) return 0; } +static int twl4030_phy_init(struct phy *phy) +{ + struct twl4030_usb *twl = dev_get_drvdata(phy-dev); + + return twl4030_usb_phy_init(twl-phy); +} + static int twl4030_set_suspend(struct usb_phy *x, int suspend) { struct twl4030_usb *twl = phy_to_twl(x); @@ -646,13 +670,22 @@ static int twl4030_set_host(struct usb_otg *otg, struct usb_bus *host) return 0; } +static const struct phy_ops ops = { + .init = twl4030_phy_init, + .power_on = twl4030_phy_power_on, + .power_off = twl4030_phy_power_off, + .owner = THIS_MODULE, +}; + static int twl4030_usb_probe(struct platform_device *pdev) { struct twl4030_usb_data *pdata = pdev-dev.platform_data; struct twl4030_usb *twl; + struct phy *phy; int status, err; struct usb_otg *otg; struct device_node *np = pdev-dev.of_node; + struct phy_provider *phy_provider; twl = devm_kzalloc(pdev-dev, sizeof *twl, GFP_KERNEL); if (!twl) @@ -689,6 +722,17 @@ static int twl4030_usb_probe(struct platform_device *pdev) otg-set_host = twl4030_set_host; otg-set_peripheral = twl4030_set_peripheral; + phy_provider = devm_of_phy_provider_register(twl-dev, THIS_MODULE, + of_phy_simple_xlate); + if (IS_ERR(phy_provider)) + return PTR_ERR(phy_provider); + + phy = devm_phy_create(twl-dev, 0, ops, twl); + if (IS_ERR(phy)) { + dev_dbg(pdev-dev, Failed to create PHY\n); + return PTR_ERR(phy); + } + /* init spinlock for workqueue */ spin_lock_init(twl-lock); -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v6 1/9] drivers: phy: add generic PHY framework
The PHY framework provides a set of APIs for the PHY drivers to create/destroy a PHY and APIs for the PHY users to obtain a reference to the PHY with or without using phandle. For dt-boot, the PHY drivers should also register *PHY provider* with the framework. PHY drivers should create the PHY by passing id and ops like init, exit, power_on and power_off. This framework is also pm runtime enabled. The documentation for the generic PHY framework is added in Documentation/phy.txt and the documentation for dt binding can be found at Documentation/devicetree/bindings/phy/phy-bindings.txt Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- .../devicetree/bindings/phy/phy-bindings.txt | 66 +++ Documentation/phy.txt | 123 + MAINTAINERS|7 + drivers/Kconfig|2 + drivers/Makefile |2 + drivers/phy/Kconfig| 13 + drivers/phy/Makefile |5 + drivers/phy/phy-core.c | 539 include/linux/phy/phy.h| 248 + 9 files changed, 1005 insertions(+) create mode 100644 Documentation/devicetree/bindings/phy/phy-bindings.txt create mode 100644 Documentation/phy.txt create mode 100644 drivers/phy/Kconfig create mode 100644 drivers/phy/Makefile create mode 100644 drivers/phy/phy-core.c create mode 100644 include/linux/phy/phy.h diff --git a/Documentation/devicetree/bindings/phy/phy-bindings.txt b/Documentation/devicetree/bindings/phy/phy-bindings.txt new file mode 100644 index 000..8ae844f --- /dev/null +++ b/Documentation/devicetree/bindings/phy/phy-bindings.txt @@ -0,0 +1,66 @@ +This document explains only the device tree data binding. For general +information about PHY subsystem refer to Documentation/phy.txt + +PHY device node +=== + +Required Properties: +#phy-cells:Number of cells in a PHY specifier; The meaning of all those + cells is defined by the binding for the phy node. The PHY + provider can use the values in cells to find the appropriate + PHY. + +For example: + +phys: phy { +compatible = xxx; +reg = ...; +. +. +#phy-cells = 1; +. +. +}; + +That node describes an IP block (PHY provider) that implements 2 different PHYs. +In order to differentiate between these 2 PHYs, an additonal specifier should be +given while trying to get a reference to it. + +PHY user node += + +Required Properties: +phys : the phandle for the PHY device (used by the PHY subsystem) +phy-names : the names of the PHY corresponding to the PHYs present in the + *phys* phandle + +Example 1: +usb1: usb_otg_ss@xxx { +compatible = xxx; +reg = xxx; +. +. +phys = usb2_phy, usb3_phy; +phy-names = usb2phy, usb3phy; +. +. +}; + +This node represents a controller that uses two PHYs, one for usb2 and one for +usb3. + +Example 2: +usb2: usb_otg_ss@xxx { +compatible = xxx; +reg = xxx; +. +. +phys = phys 1; +phy-names = usbphy; +. +. +}; + +This node represents a controller that uses one of the PHYs of the PHY provider +device defined previously. Note that the phy handle has an additional specifier +1 to differentiate between the two PHYs. diff --git a/Documentation/phy.txt b/Documentation/phy.txt new file mode 100644 index 000..408d25f --- /dev/null +++ b/Documentation/phy.txt @@ -0,0 +1,123 @@ + PHY SUBSYSTEM + Kishon Vijay Abraham I kis...@ti.com + +This document explains the Generic PHY Framework along with the APIs provided, +and how-to-use. + +1. Introduction + +*PHY* is the abbreviation for physical layer. It is used to connect a device +to the physical medium e.g., the USB controller has a PHY to provide functions +such as serialization, de-serialization, encoding, decoding and is responsible +for obtaining the required data transmission rate. Note that some USB +controller has PHY functionality embedded into it and others use an external +PHY. Other peripherals that uses a PHY include Wireless LAN, Ethernet, +SATA etc. + +The intention of creating this framework is to bring the phy drivers spread +all over the Linux kernel to drivers/phy to increase code re-use and for +better code maintainability. + +This framework will be of use only to devices that uses external PHY (PHY +functionality is not embedded within the controller). + +2. Registering/UnRegistering the PHY provider + +PHY provider refers to an entity that implements one or more PHY instances. +For the simple case where the PHY provider implements only a single instance of +the PHY, the framework provides its own implementation of of_xlate in +of_phy_simple_xlate. If the PHY provider implements multiple instances, it +should provide it's own
[PATCH v6 4/9] usb: phy: twl4030: twl4030 shouldn't be subsys_initcall
Changed the inticall from subsys_initcall to module_init for twl4030-usb. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- drivers/usb/phy/phy-twl4030-usb.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/usb/phy/phy-twl4030-usb.c b/drivers/usb/phy/phy-twl4030-usb.c index ef6eadf..dacbeb1 100644 --- a/drivers/usb/phy/phy-twl4030-usb.c +++ b/drivers/usb/phy/phy-twl4030-usb.c @@ -820,17 +820,7 @@ static struct platform_driver twl4030_usb_driver = { }, }; -static int __init twl4030_usb_init(void) -{ - return platform_driver_register(twl4030_usb_driver); -} -subsys_initcall(twl4030_usb_init); - -static void __exit twl4030_usb_exit(void) -{ - platform_driver_unregister(twl4030_usb_driver); -} -module_exit(twl4030_usb_exit); +module_platform_driver(twl4030_usb_driver); MODULE_ALIAS(platform:twl4030_usb); MODULE_AUTHOR(Texas Instruments, Inc, Nokia Corporation); -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v6 2/9] usb: phy: omap-usb2: use the new generic PHY framework
Used the generic PHY framework API to create the PHY. Now the power off and power on are done in omap_usb_power_off and omap_usb_power_on respectively. However using the old USB PHY library cannot be completely removed because OTG is intertwined with PHY and moving to the new framework will break OTG. Once we have a separate OTG state machine, we can get rid of the USB PHY library. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- drivers/usb/phy/phy-omap-usb2.c | 36 1 file changed, 36 insertions(+) diff --git a/drivers/usb/phy/phy-omap-usb2.c b/drivers/usb/phy/phy-omap-usb2.c index 844ab68..f8291a7 100644 --- a/drivers/usb/phy/phy-omap-usb2.c +++ b/drivers/usb/phy/phy-omap-usb2.c @@ -28,6 +28,7 @@ #include linux/pm_runtime.h #include linux/delay.h #include linux/usb/omap_control_usb.h +#include linux/phy/phy.h /** * omap_usb2_set_comparator - links the comparator present in the sytem with @@ -119,10 +120,36 @@ static int omap_usb2_suspend(struct usb_phy *x, int suspend) return 0; } +static int omap_usb_power_off(struct phy *x) +{ + struct omap_usb *phy = dev_get_drvdata(x-dev); + + omap_control_usb_phy_power(phy-control_dev, 0); + + return 0; +} + +static int omap_usb_power_on(struct phy *x) +{ + struct omap_usb *phy = dev_get_drvdata(x-dev); + + omap_control_usb_phy_power(phy-control_dev, 1); + + return 0; +} + +static struct phy_ops ops = { + .power_on = omap_usb_power_on, + .power_off = omap_usb_power_off, + .owner = THIS_MODULE, +}; + static int omap_usb2_probe(struct platform_device *pdev) { struct omap_usb *phy; + struct phy *generic_phy; struct usb_otg *otg; + struct phy_provider *phy_provider; phy = devm_kzalloc(pdev-dev, sizeof(*phy), GFP_KERNEL); if (!phy) { @@ -144,6 +171,15 @@ static int omap_usb2_probe(struct platform_device *pdev) phy-phy.otg= otg; phy-phy.type = USB_PHY_TYPE_USB2; + phy_provider = devm_of_phy_provider_register(phy-dev, THIS_MODULE, + of_phy_simple_xlate); + if (IS_ERR(phy_provider)) + return PTR_ERR(phy_provider); + + generic_phy = devm_phy_create(phy-dev, 0, ops, phy); + if (IS_ERR(generic_phy)) + return PTR_ERR(generic_phy); + phy-control_dev = omap_get_control_dev(); if (IS_ERR(phy-control_dev)) { dev_dbg(pdev-dev, Failed to get control device\n); -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v6 0/9] Generic PHY Framework
Added a generic PHY framework that provides a set of APIs for the PHY drivers to create/destroy a PHY and APIs for the PHY users to obtain a reference to the PHY with or without using phandle. This framework will be of use only to devices that uses external PHY (PHY functionality is not embedded within the controller). The intention of creating this framework is to bring the phy drivers spread all over the Linux kernel to drivers/phy to increase code re-use and to increase code maintainability. Comments to make PHY as bus wasn't done because PHY devices can be part of other bus and making a same device attached to multiple bus leads to bad design. If the PHY driver has to send notification on connect/disconnect, the PHY driver should make use of the extcon framework. Using this susbsystem to use extcon framwork will have to be analysed. Making omap-usb2 and twl4030 to use this framework is provided as a sample. This patch series is developed on linux-next tree. Changes from v5: * removed the new sysfs entries as it dint have any new information other than what is already there in /sys/devices/... * removed a bunch of APIs added to get the PHY and now only phy_get and devm_phy_get are used. * Added new APIs to register/unregister the PHY provider. This is needed for dt boot case. * Enabled pm runtime and incorporated the comments given by Alan Stern in a different patch series by Gautam. * Removed the *phy_bind* API. Now the phy binding information should be passed using the platform data to the controller devices. * Fixed a few typos. Changes from v4: * removed of_phy_get_with_args/devm_of_phy_get_with_args. Now the *phy providers* should use their custom implementation of of_xlate or use of_phy_xlate to get *phy instance* from *phy providers*. * Added of_phy_xlate to be used by *phy providers* if it provides only one PHY. * changed phy_core from having subsys_initcall to module_init. * other minor fixes. Changes from v3: * Changed the return value of PHY APIs to ENOSYS * Added APIs of_phy_get_with_args/devm_of_phy_get_with_args to support getting PHYs if the same IP implements multiple PHYs. * modified phy_bind API so that the binding information can now be _updated_. In effect of this removed the binding information added in board files and added only in usb-musb.c. If a particular board uses a different phy binding, it can update it in board file after usb_musb_init(). * Added Documentation/devicetree/bindings/phy/phy-bindings.txt for dt binding information. Changes from v2: * removed phy_descriptor structure completely so changed the APIs which were taking phy_descriptor as parameters * Added 2 more APIs *of_phy_get_byname* and *devm_of_phy_get_byname* to be used by PHY user drivers which has *phy* and *phy-names* binding in the dt data * Fixed a few typos * Removed phy_list and we now use class_dev_iter_init, class_dev_iter_next and class_dev_iter_exit for traversing through the phy list. (Note we still need phy_bind list and phy_bind_mutex). * Changed the sysfs entry name from *bind* to *phy_bind*. Changes from v1: * Added Documentation for the PHY framework * Added few more APIs mostly w.r.t devres * Modified omap-usb2 and twl4030 to make use of the new framework Did USB enumeration testing in panda and beagle. Kishon Vijay Abraham I (9): drivers: phy: add generic PHY framework usb: phy: omap-usb2: use the new generic PHY framework usb: phy: twl4030: use the new generic PHY framework usb: phy: twl4030: twl4030 shouldn't be subsys_initcall ARM: OMAP: USB: Add phy binding information ARM: dts: omap: update usb_otg_hs data usb: musb: omap2430: use the new generic PHY framework usb: phy: omap-usb2: remove *set_suspend* callback from omap-usb2 usb: phy: twl4030-usb: remove *set_suspend* and *phy_init* ops .../devicetree/bindings/phy/phy-bindings.txt | 66 +++ Documentation/devicetree/bindings/usb/omap-usb.txt |5 + Documentation/devicetree/bindings/usb/usb-phy.txt |6 + Documentation/phy.txt | 123 + MAINTAINERS|7 + arch/arm/boot/dts/omap3.dtsi |2 + arch/arm/boot/dts/omap4.dtsi |3 + arch/arm/boot/dts/twl4030.dtsi |1 + arch/arm/mach-omap2/usb-musb.c |6 +- drivers/Kconfig|2 + drivers/Makefile |2 + drivers/phy/Kconfig| 13 + drivers/phy/Makefile |5 + drivers/phy/phy-core.c | 539 drivers/usb/musb/musb_core.c |1 + drivers/usb/musb/musb_core.h |3 + drivers/usb/musb/omap2430.c| 29 +- drivers/usb/phy/phy-omap-usb2.c| 50 +-
[PATCH v6 6/9] ARM: dts: omap: update usb_otg_hs data
Updated the usb_otg_hs dt data to include the *phy* and *phy-names* binding in order for the driver to use the new generic PHY framework. Also updated the Documentation to include the binding information. The PHY binding information can be found at Documentation/devicetree/bindings/phy/phy-bindings.txt Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- Documentation/devicetree/bindings/usb/omap-usb.txt |5 + Documentation/devicetree/bindings/usb/usb-phy.txt |6 ++ arch/arm/boot/dts/omap3.dtsi |2 ++ arch/arm/boot/dts/omap4.dtsi |3 +++ arch/arm/boot/dts/twl4030.dtsi |1 + 5 files changed, 17 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/omap-usb.txt b/Documentation/devicetree/bindings/usb/omap-usb.txt index d4769f3..c0871a7 100644 --- a/Documentation/devicetree/bindings/usb/omap-usb.txt +++ b/Documentation/devicetree/bindings/usb/omap-usb.txt @@ -19,6 +19,9 @@ OMAP MUSB GLUE - power : Should be 50. This signifies the controller can supply upto 100mA when operating in host mode. - usb-phy : the phandle for the PHY device + - phys : the phandle for the PHY device (used by generic PHY framework) + - phy-names : the names of the PHY corresponding to the PHYs present in the + *phy* phandle. Optional properties: - ctrl-module : phandle of the control module this glue uses to write to @@ -33,6 +36,8 @@ usb_otg_hs: usb_otg_hs@4a0ab000 { num-eps = 16; ram-bits = 12; ctrl-module = omap_control_usb; + phys = usb2_phy; + phy-names = usb2-phy; }; Board specific device node entry diff --git a/Documentation/devicetree/bindings/usb/usb-phy.txt b/Documentation/devicetree/bindings/usb/usb-phy.txt index 61496f5..c0245c8 100644 --- a/Documentation/devicetree/bindings/usb/usb-phy.txt +++ b/Documentation/devicetree/bindings/usb/usb-phy.txt @@ -5,6 +5,8 @@ OMAP USB2 PHY Required properties: - compatible: Should be ti,omap-usb2 - reg : Address and length of the register set for the device. + - #phy-cells: determine the number of cells that should be given in the + phandle while referencing this phy. Optional properties: - ctrl-module : phandle of the control module used by PHY driver to power on @@ -16,6 +18,7 @@ usb2phy@4a0ad080 { compatible = ti,omap-usb2; reg = 0x4a0ad080 0x58; ctrl-module = omap_control_usb; + #phy-cells = 0; }; OMAP USB3 PHY @@ -25,6 +28,8 @@ Required properties: - reg : Address and length of the register set for the device. - reg-names: The names of the register addresses corresponding to the registers filled in reg. + - #phy-cells: determine the number of cells that should be given in the + phandle while referencing this phy. Optional properties: - ctrl-module : phandle of the control module used by PHY driver to power on @@ -39,4 +44,5 @@ usb3phy@4a084400 { 0x4a084c00 0x40; reg-names = phy_rx, phy_tx, pll_ctrl; ctrl-module = omap_control_usb; + #phy-cells = 0; }; diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi index 4ad03d9..51b4bee 100644 --- a/arch/arm/boot/dts/omap3.dtsi +++ b/arch/arm/boot/dts/omap3.dtsi @@ -520,6 +520,8 @@ interrupt-names = mc, dma; ti,hwmods = usb_otg_hs; usb-phy = usb2_phy; + phys = usb2_phy; + phy-names = usb2-phy; multipoint = 1; num-eps = 16; ram-bits = 12; diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi index 2a56428..dae620b 100644 --- a/arch/arm/boot/dts/omap4.dtsi +++ b/arch/arm/boot/dts/omap4.dtsi @@ -517,6 +517,7 @@ compatible = ti,omap-usb2; reg = 0x4a0ad080 0x58; ctrl-module = omap_control_usb; + #phy-cells = 0; }; }; @@ -655,6 +656,8 @@ interrupt-names = mc, dma; ti,hwmods = usb_otg_hs; usb-phy = usb2_phy; + phys = usb2_phy; + phy-names = usb2-phy; multipoint = 1; num-eps = 16; ram-bits = 12; diff --git a/arch/arm/boot/dts/twl4030.dtsi b/arch/arm/boot/dts/twl4030.dtsi index b3034da..ce4cd6f 100644 --- a/arch/arm/boot/dts/twl4030.dtsi +++ b/arch/arm/boot/dts/twl4030.dtsi @@ -80,6 +80,7 @@ usb1v8-supply = vusb1v8; usb3v1-supply = vusb3v1; usb_mode = 1; + #phy-cells = 0; }; twl_pwm: pwm { -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo
[PATCH v6 7/9] usb: musb: omap2430: use the new generic PHY framework
Use the generic PHY framework API to get the PHY. The usb_phy_set_resume and usb_phy_set_suspend is replaced with power_on/get_sync and power_off/put_sync to align with the new PHY framework. musb-xceiv can't be removed as of now because musb core uses xceiv.state and xceiv.otg. Once there is a separate state machine to handle otg, these can be moved out of xceiv and then we can start using the generic PHY framework. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- drivers/usb/musb/musb_core.c |1 + drivers/usb/musb/musb_core.h |3 +++ drivers/usb/musb/omap2430.c | 29 + 3 files changed, 25 insertions(+), 8 deletions(-) diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 37a261a..2162148 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -1864,6 +1864,7 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl) musb-board_set_power = plat-set_power; musb-min_power = plat-min_power; musb-ops = plat-platform_ops; + musb-phy_dev_name = plat-phy_dev_name; /* The musb_platform_init() call: * - adjusts musb-mregs diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h index 7fb4819..09ac74c 100644 --- a/drivers/usb/musb/musb_core.h +++ b/drivers/usb/musb/musb_core.h @@ -46,6 +46,7 @@ #include linux/usb.h #include linux/usb/otg.h #include linux/usb/musb.h +#include linux/phy/phy.h struct musb; struct musb_hw_ep; @@ -357,6 +358,7 @@ struct musb { u16 int_tx; struct usb_phy *xceiv; + struct phy *phy; int nIrq; unsignedirq_wake:1; @@ -434,6 +436,7 @@ struct musb { unsigneddouble_buffer_not_ok:1; struct musb_hdrc_config *config; + const char *phy_dev_name; #ifdef MUSB_CONFIG_PROC_FS struct proc_dir_entry *proc_entry; diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index 3551f1a..56ffe5f 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c @@ -348,14 +348,24 @@ static int omap2430_musb_init(struct musb *musb) * up through ULPI. TWL4030-family PMICs include one, * which needs a driver, drivers aren't always needed. */ - if (dev-parent-of_node) + if (dev-parent-of_node) { + musb-phy = devm_phy_get(dev-parent, usb2-phy); + + /* We can't totally remove musb-xceiv as of now because +* musb core uses xceiv.state and xceiv.otg. Once we have +* a separate state machine to handle otg, these can be moved +* out of xceiv and then we can start using the generic PHY +* framework +*/ musb-xceiv = devm_usb_get_phy_by_phandle(dev-parent, usb-phy, 0); - else + } else { musb-xceiv = devm_usb_get_phy_dev(dev, 0); + musb-phy = devm_phy_get(dev, musb-phy_dev_name); + } - if (IS_ERR(musb-xceiv)) { - status = PTR_ERR(musb-xceiv); + if (IS_ERR(musb-xceiv) || IS_ERR(musb-phy)) { + status = PTR_ERR(musb-xceiv) | PTR_ERR(musb-phy); if (status == -ENXIO) return status; @@ -397,9 +407,10 @@ static int omap2430_musb_init(struct musb *musb) if (glue-status != OMAP_MUSB_UNKNOWN) omap_musb_set_mailbox(glue); - usb_phy_init(musb-xceiv); + phy_init(musb-phy); pm_runtime_put_noidle(musb-controller); + phy_pm_runtime_put(musb-phy); return 0; err1: @@ -460,6 +471,7 @@ static int omap2430_musb_exit(struct musb *musb) del_timer_sync(musb_idle_timer); omap2430_low_level_exit(musb); + phy_exit(musb-phy); return 0; } @@ -618,7 +630,8 @@ static int omap2430_runtime_suspend(struct device *dev) OTG_INTERFSEL); omap2430_low_level_exit(musb); - usb_phy_set_suspend(musb-xceiv, 1); + phy_power_off(musb-phy); + phy_pm_runtime_put(musb-phy); } return 0; @@ -633,8 +646,8 @@ static int omap2430_runtime_resume(struct device *dev) omap2430_low_level_init(musb); musb_writel(musb-mregs, OTG_INTERFSEL, musb-context.otg_interfsel); - - usb_phy_set_suspend(musb-xceiv, 0); + phy_pm_runtime_get_sync(musb-phy); + phy_power_on(musb-phy); } return 0; -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v6 9/9] usb: phy: twl4030-usb: remove *set_suspend* and *phy_init* ops
Now that twl4030-usb is adapted to the new generic PHY framework, *set_suspend* and *phy_init* ops can be removed from twl4030-usb driver. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- drivers/usb/phy/phy-twl4030-usb.c | 55 - 1 file changed, 12 insertions(+), 43 deletions(-) diff --git a/drivers/usb/phy/phy-twl4030-usb.c b/drivers/usb/phy/phy-twl4030-usb.c index dacbeb1..c7a2e3b 100644 --- a/drivers/usb/phy/phy-twl4030-usb.c +++ b/drivers/usb/phy/phy-twl4030-usb.c @@ -422,25 +422,20 @@ static void twl4030_phy_power(struct twl4030_usb *twl, int on) } } -static void twl4030_phy_suspend(struct twl4030_usb *twl, int controller_off) +static int twl4030_phy_power_off(struct phy *phy) { + struct twl4030_usb *twl = dev_get_drvdata(phy-dev); + if (twl-asleep) - return; + return 0; twl4030_phy_power(twl, 0); twl-asleep = 1; dev_dbg(twl-dev, %s\n, __func__); -} - -static int twl4030_phy_power_off(struct phy *phy) -{ - struct twl4030_usb *twl = dev_get_drvdata(phy-dev); - - twl4030_phy_suspend(twl, 0); return 0; } -static void __twl4030_phy_resume(struct twl4030_usb *twl) +static void __twl4030_phy_power_on(struct twl4030_usb *twl) { twl4030_phy_power(twl, 1); twl4030_i2c_access(twl, 1); @@ -449,11 +444,13 @@ static void __twl4030_phy_resume(struct twl4030_usb *twl) twl4030_i2c_access(twl, 0); } -static void twl4030_phy_resume(struct twl4030_usb *twl) +static int twl4030_phy_power_on(struct phy *phy) { + struct twl4030_usb *twl = dev_get_drvdata(phy-dev); + if (!twl-asleep) - return; - __twl4030_phy_resume(twl); + return 0; + __twl4030_phy_power_on(twl); twl-asleep = 0; dev_dbg(twl-dev, %s\n, __func__); @@ -466,13 +463,6 @@ static void twl4030_phy_resume(struct twl4030_usb *twl) cancel_delayed_work(twl-id_workaround_work); schedule_delayed_work(twl-id_workaround_work, HZ); } -} - -static int twl4030_phy_power_on(struct phy *phy) -{ - struct twl4030_usb *twl = dev_get_drvdata(phy-dev); - - twl4030_phy_resume(twl); return 0; } @@ -604,9 +594,9 @@ static void twl4030_id_workaround_work(struct work_struct *work) } } -static int twl4030_usb_phy_init(struct usb_phy *phy) +static int twl4030_phy_init(struct phy *phy) { - struct twl4030_usb *twl = phy_to_twl(phy); + struct twl4030_usb *twl = dev_get_drvdata(phy-dev); enum omap_musb_vbus_id_status status; /* @@ -626,25 +616,6 @@ static int twl4030_usb_phy_init(struct usb_phy *phy) return 0; } -static int twl4030_phy_init(struct phy *phy) -{ - struct twl4030_usb *twl = dev_get_drvdata(phy-dev); - - return twl4030_usb_phy_init(twl-phy); -} - -static int twl4030_set_suspend(struct usb_phy *x, int suspend) -{ - struct twl4030_usb *twl = phy_to_twl(x); - - if (suspend) - twl4030_phy_suspend(twl, 1); - else - twl4030_phy_resume(twl); - - return 0; -} - static int twl4030_set_peripheral(struct usb_otg *otg, struct usb_gadget *gadget) { @@ -715,8 +686,6 @@ static int twl4030_usb_probe(struct platform_device *pdev) twl-phy.label = twl4030; twl-phy.otg= otg; twl-phy.type = USB_PHY_TYPE_USB2; - twl-phy.set_suspend= twl4030_set_suspend; - twl-phy.init = twl4030_usb_phy_init; otg-phy= twl-phy; otg-set_host = twl4030_set_host; -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v6 8/9] usb: phy: omap-usb2: remove *set_suspend* callback from omap-usb2
Now that omap-usb2 is adapted to the new generic PHY framework, *set_suspend* ops can be removed from omap-usb2 driver. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- drivers/usb/phy/phy-omap-usb2.c | 24 1 file changed, 24 deletions(-) diff --git a/drivers/usb/phy/phy-omap-usb2.c b/drivers/usb/phy/phy-omap-usb2.c index f8291a7..e2523f4 100644 --- a/drivers/usb/phy/phy-omap-usb2.c +++ b/drivers/usb/phy/phy-omap-usb2.c @@ -97,29 +97,6 @@ static int omap_usb_set_peripheral(struct usb_otg *otg, return 0; } -static int omap_usb2_suspend(struct usb_phy *x, int suspend) -{ - u32 ret; - struct omap_usb *phy = phy_to_omapusb(x); - - if (suspend !phy-is_suspended) { - omap_control_usb_phy_power(phy-control_dev, 0); - pm_runtime_put_sync(phy-dev); - phy-is_suspended = 1; - } else if (!suspend phy-is_suspended) { - ret = pm_runtime_get_sync(phy-dev); - if (ret 0) { - dev_err(phy-dev, get_sync failed with err %d\n, - ret); - return ret; - } - omap_control_usb_phy_power(phy-control_dev, 1); - phy-is_suspended = 0; - } - - return 0; -} - static int omap_usb_power_off(struct phy *x) { struct omap_usb *phy = dev_get_drvdata(x-dev); @@ -167,7 +144,6 @@ static int omap_usb2_probe(struct platform_device *pdev) phy-phy.dev= phy-dev; phy-phy.label = omap-usb2; - phy-phy.set_suspend= omap_usb2_suspend; phy-phy.otg= otg; phy-phy.type = USB_PHY_TYPE_USB2; -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v6 5/9] ARM: OMAP: USB: Add phy binding information
In order for controllers to get PHY in case of non dt boot, the phy binding information (phy device name) should be added in the platform data of the controller. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- arch/arm/mach-omap2/usb-musb.c |6 +- include/linux/usb/musb.h |3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c index 3242a55..228288a 100644 --- a/arch/arm/mach-omap2/usb-musb.c +++ b/arch/arm/mach-omap2/usb-musb.c @@ -85,8 +85,12 @@ void __init usb_musb_init(struct omap_musb_board_data *musb_board_data) musb_plat.mode = board_data-mode; musb_plat.extvbus = board_data-extvbus; - if (cpu_is_omap44xx()) + if (cpu_is_omap44xx()) { musb_plat.has_mailbox = true; + musb_plat.phy_dev_name = omap-usb2.3.auto.0; + } else if (cpu_is_omap34xx()) { + musb_plat.phy_dev_name = twl4030_usb.0; + } if (soc_is_am35xx()) { oh_name = am35x_otg_hs; diff --git a/include/linux/usb/musb.h b/include/linux/usb/musb.h index 053c268..0b733a3 100644 --- a/include/linux/usb/musb.h +++ b/include/linux/usb/musb.h @@ -104,6 +104,9 @@ struct musb_hdrc_platform_data { /* for clk_get() */ const char *clock; + /* phy device name */ + const char *phy_dev_name; + /* (HOST or OTG) switch VBUS on/off */ int (*set_vbus)(struct device *dev, int is_on); -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v4 5/8] MFD: ti_am335x_tscadc: Add DT support
On Wed, 2013-02-06 at 11:17 +, Patil, Rachna wrote: Can you share the branch which you have tested? https://github.com/patilrachna/linux/tree/v3.8_rc3_MFD_TSCADC_DT-v2 Did you get a chance to test this branch? And can you also share your branch, on which you observed the issue. Rachana, I have not seen a new version of this patch since January. Are you still working on the TSCADC? If not, where can I find the most recent version? Regards, Jan -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0| Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917- | -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Section mismatch warning with linux next in usbhs_init_phys()
On Thu, Apr 11, 2013 at 11:32:01AM -0700, Tony Lindgren wrote: Hi Roger, Looks like there's a section mismatch issue in linux next: WARNING: vmlinux.o(.text+0x2a7b4): Section mismatch in reference from the function usbhs_init_phys() to the function .init.text:usb_bind_phy() The function usbhs_init_phys() references the function __init usb_bind_phy(). This is often because usbhs_init_phys lacks a __init annotation or the annotation of usb_bind_phy is wrong. Can you please take a look? already taken care of, should be on today's linux-next: http://git.kernel.org/cgit/linux/kernel/git/gregkh/usb.git/commit/?id=19d8ceddda8b3a806a0960106ae6aa4dcc21df3b -- balbi signature.asc Description: Digital signature
[PATCH 00/10] OMAPDSS: Basic deferred probe support
Hi, omapdss, omapfb and the panel drivers do not currently support deferred probe, which is causing the display drivers fail when booting with DT. This series adds very basic support for deferred probing, which hopefully fixes the issues for omap4 panda and sdp boards with the current kernel. Limitations: * Deferred probe support for omap_vout and omapdrm is still totally missing. * If it so happens that at omapfb probe time one panel has been probed, but another has been deferred, only the probed one will be used. * Only DPI, DSI and HDMI outputs have been fixed. * Some panel drivers may need modifications to support EPROBE_DEFER Patches based on linux-next, i.e. the latest omapdss stuff. Tomi Tomi Valkeinen (10): OMAPDSS: Makefile: move omapfb after panels OMAPFB: use module_platform_driver() OMAPFB: defer probe if no displays OMAPDSS: DSI: use platform_driver_register() OMAPDSS: DSI: Add error handling for dsi_probe_pdata OMAPDSS: DPI: use platform_driver_register() OMAPDSS: DPI: Add error handling for dpi_probe_pdata OMAPDSS: HDMI: use platform_driver_register() OMAPDSS: HDMI: Add error handling for hdmi_probe_pdata OMAPDSS: TFP410: return EPROBE_DEFER if the i2c adapter not found drivers/video/omap2/Makefile|2 +- drivers/video/omap2/displays/panel-tfp410.c |2 +- drivers/video/omap2/dss/dpi.c | 35 +-- drivers/video/omap2/dss/dsi.c | 35 +-- drivers/video/omap2/dss/hdmi.c | 33 - drivers/video/omap2/omapfb/omapfb-main.c| 30 +++ 6 files changed, 71 insertions(+), 66 deletions(-) -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 01/10] OMAPDSS: Makefile: move omapfb after panels
omapfb requires the panels to have been probed before omapfb's probe. We currently manage that by having omapfb in late initcall level. However, a much simpler way is to just change the makefile so that omapfb is after the panel drivers. Signed-off-by: Tomi Valkeinen tomi.valkei...@ti.com --- drivers/video/omap2/Makefile |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/omap2/Makefile b/drivers/video/omap2/Makefile index 5ea7cb9..296e5c5 100644 --- a/drivers/video/omap2/Makefile +++ b/drivers/video/omap2/Makefile @@ -1,5 +1,5 @@ obj-$(CONFIG_OMAP2_VRFB) += vrfb.o obj-$(CONFIG_OMAP2_DSS) += dss/ -obj-$(CONFIG_FB_OMAP2) += omapfb/ obj-y += displays/ +obj-$(CONFIG_FB_OMAP2) += omapfb/ -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 02/10] OMAPFB: use module_platform_driver()
Instead of using platform_driver_probe(), use module_platform_driver() so that we can support deferred probing. Signed-off-by: Tomi Valkeinen tomi.valkei...@ti.com --- drivers/video/omap2/omapfb/omapfb-main.c | 28 +++- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c index f38348e..808f6af 100644 --- a/drivers/video/omap2/omapfb/omapfb-main.c +++ b/drivers/video/omap2/omapfb/omapfb-main.c @@ -2422,7 +2422,7 @@ static int omapfb_init_connections(struct omapfb2_device *fbdev, return 0; } -static int __init omapfb_probe(struct platform_device *pdev) +static int omapfb_probe(struct platform_device *pdev) { struct omapfb2_device *fbdev = NULL; int r = 0; @@ -2595,6 +2595,7 @@ static int __exit omapfb_remove(struct platform_device *pdev) } static struct platform_driver omapfb_driver = { + .probe = omapfb_probe, .remove = __exit_p(omapfb_remove), .driver = { .name = omapfb, @@ -2602,36 +2603,13 @@ static struct platform_driver omapfb_driver = { }, }; -static int __init omapfb_init(void) -{ - DBG(omapfb_init\n); - - if (platform_driver_probe(omapfb_driver, omapfb_probe)) { - printk(KERN_ERR failed to register omapfb driver\n); - return -ENODEV; - } - - return 0; -} - -static void __exit omapfb_exit(void) -{ - DBG(omapfb_exit\n); - platform_driver_unregister(omapfb_driver); -} - module_param_named(mode, def_mode, charp, 0); module_param_named(vram, def_vram, charp, 0); module_param_named(rotate, def_rotate, int, 0); module_param_named(vrfb, def_vrfb, bool, 0); module_param_named(mirror, def_mirror, bool, 0); -/* late_initcall to let panel/ctrl drivers loaded first. - * I guess better option would be a more dynamic approach, - * so that omapfb reacts to new panels when they are loaded */ -late_initcall(omapfb_init); -/*module_init(omapfb_init);*/ -module_exit(omapfb_exit); +module_platform_driver(omapfb_driver); MODULE_AUTHOR(Tomi Valkeinen tomi.valkei...@nokia.com); MODULE_DESCRIPTION(OMAP2/3 Framebuffer); -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 03/10] OMAPFB: defer probe if no displays
omapfb requires the panel drivers to have been probed when omapfb is initialized. omapfb does not support insertion of new panels after its probe. This causes a problem in case omapdss or the panel probes have been deferred due to EPROBE_DEFER error, as omapfb won't find any displays. As a quick fix, this patch changes the omapfb probe so that if omapfb does not find any displays, it'll return EPROBE_DEFER. This is not perfect, as with a board with no displays, omapfb will get deferred forever. Also, if the board has multiple displays, but only some of them have been probed, omapfb will start and leave the unprobed displays out. Signed-off-by: Tomi Valkeinen tomi.valkei...@ti.com --- drivers/video/omap2/omapfb/omapfb-main.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c index 808f6af..ff00d1d 100644 --- a/drivers/video/omap2/omapfb/omapfb-main.c +++ b/drivers/video/omap2/omapfb/omapfb-main.c @@ -2484,7 +2484,7 @@ static int omapfb_probe(struct platform_device *pdev) if (fbdev-num_displays == 0) { dev_err(pdev-dev, no displays\n); - r = -EINVAL; + r = -EPROBE_DEFER; goto cleanup; } -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 04/10] OMAPDSS: DSI: use platform_driver_register()
Use platform_driver_register() instead of platform_driver_probe() so that we can support EPROBE_DEFER. Signed-off-by: Tomi Valkeinen tomi.valkei...@ti.com --- drivers/video/omap2/dss/dsi.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index 9b1c5ec..55fc0d4 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c @@ -5225,7 +5225,7 @@ static enum omap_channel dsi_get_channel(int module_id) } } -static int __init dsi_init_display(struct omap_dss_device *dssdev) +static int dsi_init_display(struct omap_dss_device *dssdev) { struct platform_device *dsidev = dsi_get_dsidev_from_id(dssdev-phy.dsi.module); @@ -5366,7 +5366,7 @@ static int dsi_get_clocks(struct platform_device *dsidev) return 0; } -static struct omap_dss_device * __init dsi_find_dssdev(struct platform_device *pdev) +static struct omap_dss_device *dsi_find_dssdev(struct platform_device *pdev) { struct omap_dss_board_info *pdata = pdev-dev.platform_data; struct dsi_data *dsi = dsi_get_dsidrv_data(pdev); @@ -5398,7 +5398,7 @@ static struct omap_dss_device * __init dsi_find_dssdev(struct platform_device *p return def_dssdev; } -static void __init dsi_probe_pdata(struct platform_device *dsidev) +static void dsi_probe_pdata(struct platform_device *dsidev) { struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); struct omap_dss_device *plat_dssdev; @@ -5436,11 +5436,13 @@ static void __init dsi_probe_pdata(struct platform_device *dsidev) DSSERR(device %s register failed: %d\n, dssdev-name, r); omapdss_output_unset_device(dsi-output); dss_put_device(dssdev); - return; + return r; } + + return 0; } -static void __init dsi_init_output(struct platform_device *dsidev) +static void dsi_init_output(struct platform_device *dsidev) { struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); struct omap_dss_output *out = dsi-output; @@ -5465,7 +5467,7 @@ static void __exit dsi_uninit_output(struct platform_device *dsidev) } /* DSI1 HW IP initialisation */ -static int __init omap_dsihw_probe(struct platform_device *dsidev) +static int omap_dsihw_probe(struct platform_device *dsidev) { u32 rev; int r, i; @@ -5632,6 +5634,7 @@ static const struct dev_pm_ops dsi_pm_ops = { }; static struct platform_driver omap_dsihw_driver = { + .probe = omap_dsihw_probe, .remove = __exit_p(omap_dsihw_remove), .driver = { .name = omapdss_dsi, @@ -5642,7 +5645,7 @@ static struct platform_driver omap_dsihw_driver = { int __init dsi_init_platform_driver(void) { - return platform_driver_probe(omap_dsihw_driver, omap_dsihw_probe); + return platform_driver_register(omap_dsihw_driver); } void __exit dsi_uninit_platform_driver(void) -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 05/10] OMAPDSS: DSI: Add error handling for dsi_probe_pdata
Add proper error handling for dsi_probe_pdata(). This will cause EPROBE_DEFER to be properly passed upwards, causing the DSI driver to be probed again later if a resource was missing. Signed-off-by: Tomi Valkeinen tomi.valkei...@ti.com --- drivers/video/omap2/dss/dsi.c | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index 55fc0d4..a73dedc 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c @@ -5398,7 +5398,7 @@ static struct omap_dss_device *dsi_find_dssdev(struct platform_device *pdev) return def_dssdev; } -static void dsi_probe_pdata(struct platform_device *dsidev) +static int dsi_probe_pdata(struct platform_device *dsidev) { struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); struct omap_dss_device *plat_dssdev; @@ -5408,11 +5408,11 @@ static void dsi_probe_pdata(struct platform_device *dsidev) plat_dssdev = dsi_find_dssdev(dsidev); if (!plat_dssdev) - return; + return 0; dssdev = dss_alloc_and_init_device(dsidev-dev); if (!dssdev) - return; + return -ENOMEM; dss_copy_device_pdata(dssdev, plat_dssdev); @@ -5420,7 +5420,7 @@ static void dsi_probe_pdata(struct platform_device *dsidev) if (r) { DSSERR(device %s init failed: %d\n, dssdev-name, r); dss_put_device(dssdev); - return; + return r; } r = omapdss_output_set_device(dsi-output, dssdev); @@ -5428,7 +5428,7 @@ static void dsi_probe_pdata(struct platform_device *dsidev) DSSERR(failed to connect output to new device: %s\n, dssdev-name); dss_put_device(dssdev); - return; + return r; } r = dss_add_device(dssdev); @@ -5458,7 +5458,7 @@ static void dsi_init_output(struct platform_device *dsidev) dss_register_output(out); } -static void __exit dsi_uninit_output(struct platform_device *dsidev) +static void dsi_uninit_output(struct platform_device *dsidev) { struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); struct omap_dss_output *out = dsi-output; @@ -5563,7 +5563,13 @@ static int omap_dsihw_probe(struct platform_device *dsidev) dsi_init_output(dsidev); - dsi_probe_pdata(dsidev); + r = dsi_probe_pdata(dsidev); + if (r) { + dsi_runtime_put(dsidev); + dsi_uninit_output(dsidev); + pm_runtime_disable(dsidev-dev); + return r; + } dsi_runtime_put(dsidev); -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 06/10] OMAPDSS: DPI: use platform_driver_register()
Use platform_driver_register() instead of platform_driver_probe() so that we can support EPROBE_DEFER. Signed-off-by: Tomi Valkeinen tomi.valkei...@ti.com --- drivers/video/omap2/dss/dpi.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c index e93c4de..2024787 100644 --- a/drivers/video/omap2/dss/dpi.c +++ b/drivers/video/omap2/dss/dpi.c @@ -520,7 +520,7 @@ void omapdss_dpi_set_data_lines(struct omap_dss_device *dssdev, int data_lines) } EXPORT_SYMBOL(omapdss_dpi_set_data_lines); -static int __init dpi_verify_dsi_pll(struct platform_device *dsidev) +static int dpi_verify_dsi_pll(struct platform_device *dsidev) { int r; @@ -572,7 +572,7 @@ static enum omap_channel dpi_get_channel(void) } } -static int __init dpi_init_display(struct omap_dss_device *dssdev) +static int dpi_init_display(struct omap_dss_device *dssdev) { struct platform_device *dsidev; @@ -607,7 +607,7 @@ static int __init dpi_init_display(struct omap_dss_device *dssdev) return 0; } -static struct omap_dss_device * __init dpi_find_dssdev(struct platform_device *pdev) +static struct omap_dss_device *dpi_find_dssdev(struct platform_device *pdev) { struct omap_dss_board_info *pdata = pdev-dev.platform_data; const char *def_disp_name = omapdss_get_default_display_name(); @@ -635,7 +635,7 @@ static struct omap_dss_device * __init dpi_find_dssdev(struct platform_device *p return def_dssdev; } -static void __init dpi_probe_pdata(struct platform_device *dpidev) +static void dpi_probe_pdata(struct platform_device *dpidev) { struct omap_dss_device *plat_dssdev; struct omap_dss_device *dssdev; @@ -676,7 +676,7 @@ static void __init dpi_probe_pdata(struct platform_device *dpidev) } } -static void __init dpi_init_output(struct platform_device *pdev) +static void dpi_init_output(struct platform_device *pdev) { struct omap_dss_output *out = dpi.output; @@ -696,7 +696,7 @@ static void __exit dpi_uninit_output(struct platform_device *pdev) dss_unregister_output(out); } -static int __init omap_dpi_probe(struct platform_device *pdev) +static int omap_dpi_probe(struct platform_device *pdev) { mutex_init(dpi.lock); @@ -717,6 +717,7 @@ static int __exit omap_dpi_remove(struct platform_device *pdev) } static struct platform_driver omap_dpi_driver = { + .probe = omap_dpi_probe, .remove = __exit_p(omap_dpi_remove), .driver = { .name = omapdss_dpi, @@ -726,7 +727,7 @@ static struct platform_driver omap_dpi_driver = { int __init dpi_init_platform_driver(void) { - return platform_driver_probe(omap_dpi_driver, omap_dpi_probe); + return platform_driver_register(omap_dpi_driver); } void __exit dpi_uninit_platform_driver(void) -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 08/10] OMAPDSS: HDMI: use platform_driver_register()
Use platform_driver_register() instead of platform_driver_probe() so that we can support EPROBE_DEFER. Signed-off-by: Tomi Valkeinen tomi.valkei...@ti.com --- drivers/video/omap2/dss/hdmi.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c index 7939309..9aefe60 100644 --- a/drivers/video/omap2/dss/hdmi.c +++ b/drivers/video/omap2/dss/hdmi.c @@ -328,7 +328,7 @@ static void hdmi_runtime_put(void) WARN_ON(r 0 r != -ENOSYS); } -static int __init hdmi_init_display(struct omap_dss_device *dssdev) +static int hdmi_init_display(struct omap_dss_device *dssdev) { int r; @@ -954,7 +954,7 @@ int hdmi_audio_config(struct omap_dss_audio *audio) #endif -static struct omap_dss_device * __init hdmi_find_dssdev(struct platform_device *pdev) +static struct omap_dss_device *hdmi_find_dssdev(struct platform_device *pdev) { struct omap_dss_board_info *pdata = pdev-dev.platform_data; const char *def_disp_name = omapdss_get_default_display_name(); @@ -982,7 +982,7 @@ static struct omap_dss_device * __init hdmi_find_dssdev(struct platform_device * return def_dssdev; } -static void __init hdmi_probe_pdata(struct platform_device *pdev) +static void hdmi_probe_pdata(struct platform_device *pdev) { struct omap_dss_device *plat_dssdev; struct omap_dss_device *dssdev; @@ -1031,7 +1031,7 @@ static void __init hdmi_probe_pdata(struct platform_device *pdev) } } -static void __init hdmi_init_output(struct platform_device *pdev) +static void hdmi_init_output(struct platform_device *pdev) { struct omap_dss_output *out = hdmi.output; @@ -1052,7 +1052,7 @@ static void __exit hdmi_uninit_output(struct platform_device *pdev) } /* HDMI HW IP initialisation */ -static int __init omapdss_hdmihw_probe(struct platform_device *pdev) +static int omapdss_hdmihw_probe(struct platform_device *pdev) { struct resource *res; int r; @@ -1151,6 +1151,7 @@ static const struct dev_pm_ops hdmi_pm_ops = { }; static struct platform_driver omapdss_hdmihw_driver = { + .probe = omapdss_hdmihw_probe, .remove = __exit_p(omapdss_hdmihw_remove), .driver = { .name = omapdss_hdmi, @@ -1161,7 +1162,7 @@ static struct platform_driver omapdss_hdmihw_driver = { int __init hdmi_init_platform_driver(void) { - return platform_driver_probe(omapdss_hdmihw_driver, omapdss_hdmihw_probe); + return platform_driver_register(omapdss_hdmihw_driver); } void __exit hdmi_uninit_platform_driver(void) -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 09/10] OMAPDSS: HDMI: Add error handling for hdmi_probe_pdata
Add proper error handling for hdmi_probe_pdata(). This will cause EPROBE_DEFER to be properly passed upwards, causing the HDMI driver to be probed again later if a resource was missing. Signed-off-by: Tomi Valkeinen tomi.valkei...@ti.com --- drivers/video/omap2/dss/hdmi.c | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c index 9aefe60..17f4d55 100644 --- a/drivers/video/omap2/dss/hdmi.c +++ b/drivers/video/omap2/dss/hdmi.c @@ -982,7 +982,7 @@ static struct omap_dss_device *hdmi_find_dssdev(struct platform_device *pdev) return def_dssdev; } -static void hdmi_probe_pdata(struct platform_device *pdev) +static int hdmi_probe_pdata(struct platform_device *pdev) { struct omap_dss_device *plat_dssdev; struct omap_dss_device *dssdev; @@ -992,11 +992,11 @@ static void hdmi_probe_pdata(struct platform_device *pdev) plat_dssdev = hdmi_find_dssdev(pdev); if (!plat_dssdev) - return; + return 0; dssdev = dss_alloc_and_init_device(pdev-dev); if (!dssdev) - return; + return -ENOMEM; dss_copy_device_pdata(dssdev, plat_dssdev); @@ -1010,7 +1010,7 @@ static void hdmi_probe_pdata(struct platform_device *pdev) if (r) { DSSERR(device %s init failed: %d\n, dssdev-name, r); dss_put_device(dssdev); - return; + return r; } r = omapdss_output_set_device(hdmi.output, dssdev); @@ -1018,7 +1018,7 @@ static void hdmi_probe_pdata(struct platform_device *pdev) DSSERR(failed to connect output to new device: %s\n, dssdev-name); dss_put_device(dssdev); - return; + return r; } r = dss_add_device(dssdev); @@ -1027,8 +1027,10 @@ static void hdmi_probe_pdata(struct platform_device *pdev) omapdss_output_unset_device(hdmi.output); hdmi_uninit_display(dssdev); dss_put_device(dssdev); - return; + return r; } + + return 0; } static void hdmi_init_output(struct platform_device *pdev) @@ -1096,7 +1098,13 @@ static int omapdss_hdmihw_probe(struct platform_device *pdev) dss_debugfs_create_file(hdmi, hdmi_dump_regs); - hdmi_probe_pdata(pdev); + r = hdmi_probe_pdata(pdev); + if (r) { + hdmi_panel_exit(); + hdmi_uninit_output(pdev); + pm_runtime_disable(pdev-dev); + return r; + } return 0; } -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 07/10] OMAPDSS: DPI: Add error handling for dpi_probe_pdata
Add proper error handling for dpi_probe_pdata(). This will cause EPROBE_DEFER to be properly passed upwards, causing the DPI driver to be probed again later if a resource was missing. Signed-off-by: Tomi Valkeinen tomi.valkei...@ti.com --- drivers/video/omap2/dss/dpi.c | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c index 2024787..757b57f 100644 --- a/drivers/video/omap2/dss/dpi.c +++ b/drivers/video/omap2/dss/dpi.c @@ -635,7 +635,7 @@ static struct omap_dss_device *dpi_find_dssdev(struct platform_device *pdev) return def_dssdev; } -static void dpi_probe_pdata(struct platform_device *dpidev) +static int dpi_probe_pdata(struct platform_device *dpidev) { struct omap_dss_device *plat_dssdev; struct omap_dss_device *dssdev; @@ -644,11 +644,11 @@ static void dpi_probe_pdata(struct platform_device *dpidev) plat_dssdev = dpi_find_dssdev(dpidev); if (!plat_dssdev) - return; + return 0; dssdev = dss_alloc_and_init_device(dpidev-dev); if (!dssdev) - return; + return -ENOMEM; dss_copy_device_pdata(dssdev, plat_dssdev); @@ -656,7 +656,7 @@ static void dpi_probe_pdata(struct platform_device *dpidev) if (r) { DSSERR(device %s init failed: %d\n, dssdev-name, r); dss_put_device(dssdev); - return; + return r; } r = omapdss_output_set_device(dpi.output, dssdev); @@ -664,7 +664,7 @@ static void dpi_probe_pdata(struct platform_device *dpidev) DSSERR(failed to connect output to new device: %s\n, dssdev-name); dss_put_device(dssdev); - return; + return r; } r = dss_add_device(dssdev); @@ -672,8 +672,10 @@ static void dpi_probe_pdata(struct platform_device *dpidev) DSSERR(device %s register failed: %d\n, dssdev-name, r); omapdss_output_unset_device(dpi.output); dss_put_device(dssdev); - return; + return r; } + + return 0; } static void dpi_init_output(struct platform_device *pdev) @@ -698,11 +700,17 @@ static void __exit dpi_uninit_output(struct platform_device *pdev) static int omap_dpi_probe(struct platform_device *pdev) { + int r; + mutex_init(dpi.lock); dpi_init_output(pdev); - dpi_probe_pdata(pdev); + r = dpi_probe_pdata(pdev); + if (r) { + dpi_uninit_output(pdev); + return r; + } return 0; } -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 10/10] OMAPDSS: TFP410: return EPROBE_DEFER if the i2c adapter not found
If the I2C adapter needed by the TFP410 device is not available yet, return EPROBE_DEFER so that the device will get probed again. Signed-off-by: Tomi Valkeinen tomi.valkei...@ti.com --- drivers/video/omap2/displays/panel-tfp410.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/omap2/displays/panel-tfp410.c b/drivers/video/omap2/displays/panel-tfp410.c index a1dba868..46039c4 100644 --- a/drivers/video/omap2/displays/panel-tfp410.c +++ b/drivers/video/omap2/displays/panel-tfp410.c @@ -135,7 +135,7 @@ static int tfp410_probe(struct omap_dss_device *dssdev) if (!adapter) { dev_err(dssdev-dev, Failed to get I2C adapter, bus %d\n, i2c_bus_num); - return -EINVAL; + return -EPROBE_DEFER; } ddata-i2c_adapter = adapter; -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v3 0/4] ARM: dts: Add USB host support for Panda and Beagle-xm
On 04/19/2013 12:57 PM, Roger Quadros wrote: Hi Benoit/Tony I've consolidated all the USB host device tree patches for Panda and Beagles to one place and addressed Tony's comments. NOTE: patch 1 depends on OMAP clock binding introduced in https://lkml.org/lkml/2013/4/12/407 Tony, Benoit, Just FYI, the patch [1] that is needed will probably not get in until 3.10 rc1. However, this series need not wait till that happens. [1] https://lkml.org/lkml/2013/4/12/407 cheers, -roger v3: - updated mux mode to use pulldowns on panda as non-DT boot uses pulldowns. - fixed usb pin naming for panda, beagle and beagle-xm The following changes since commit 1fac4fffa719a98ec1047eaece236244333c9afe: ARM: dts: Add OMAP3430 SDP NOR flash memory binding (2013-04-09 00:21:35 +0200) are available in the git repository at: git://github.com/rogerq/linux.git usbhost-omap-dts Roger Quadros (4): ARM: dts: omap4-panda: Add USB Host support ARM: dts: omap3-beagle: Make USB host pin naming consistent ARM: dts: omap3-beagle-xm: Add USB Host support ARM: dts: omap3-beagle-xm: Add USB host supprot for Rev. Ax/Bx arch/arm/boot/dts/omap3-beagle-xm-ab.dts | 19 arch/arm/boot/dts/omap3-beagle-xm.dts | 65 - arch/arm/boot/dts/omap3-beagle.dts| 25 ++- arch/arm/boot/dts/omap4-panda-common.dtsi | 58 + arch/arm/boot/dts/omap4.dtsi |5 ++ 5 files changed, 158 insertions(+), 14 deletions(-) create mode 100644 arch/arm/boot/dts/omap3-beagle-xm-ab.dts -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: v3.9.0-rc8 : oops in tick_do_update_jiffies64+0xbc/0x110
* Mark Jackson mpfj-l...@newflow.co.uk [130429 01:38]: I've been experiencing several crashes all pointing exactly the same place in the same tick routine (see below). The exception stack trace at the end changes depending on when the oops occurs. I've had the oops occur maybe 6 times in the last 50 reboots. Any ideas ? Sounds like it might be an issue with the physical memory or the timings. It could also be related to the idle loop not restoring something right for deeper idle states that corrupts the memory. And that's why it would seem to appear while waking to a timer. Maybe disable PM and run memtester to see if that runs reliably? Regards, Tony -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: v3.9.0-rc8 : oops in tick_do_update_jiffies64+0xbc/0x110
On 29/04/13 16:41, Tony Lindgren wrote: * Mark Jackson mpfj-l...@newflow.co.uk [130429 01:38]: I've been experiencing several crashes all pointing exactly the same place in the same tick routine (see below). The exception stack trace at the end changes depending on when the oops occurs. I've had the oops occur maybe 6 times in the last 50 reboots. Any ideas ? Sounds like it might be an issue with the physical memory or the timings. It could also be related to the idle loop not restoring something right for deeper idle states that corrupts the memory. And that's why it would seem to appear while waking to a timer. I am suspecting a borderline CPU. We only have X AM3359 parts which are all pre-production. Maybe disable PM and run memtester to see if that runs reliably? I'll see if I can get it running on our platform. Thanks Mark J. -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [net-next PATCH 1/1] drivers: net: cpsw: fix kernel warn on cpsw irq enable
From: Sebastian Andrzej Siewior bige...@linutronix.de Date: Fri, 26 Apr 2013 14:03:24 +0200 David, how did this happen? The patch I've sent http://www.spinics.net/lists/netdev/msg234240.html adds this to the probe function, according to the net-next tree it was added to cpsw_probe_dual_emac(). The context is similar but not exact the same. This is usually I ask people to respin patches even if there are minor fuzz differences when I try to apply this patch. I tried to be nice and save you some work this time, 'patch' accepted it with minor offsets, and with a cursory glance I didn't see any problems. Next time I'll be a hardliner and request a respin :-) -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [v2,1/3] ARM: dts: AM33XX: Add ELM node
On 4/29/2013 1:23 PM, Gupta, Pekon wrote: From: avinash philip avinashphi...@ti.com From: Philip, Avinash avinashphi...@ti.com From: line is repeated twice. Add ELM data node to AM33XX device tree file. Signed-off-by: Philip Avinash avinashphi...@ti.com Acked-by: Peter Korsgaard jac...@sunsite.dk Tested-by: Pekon Gupta pe...@ti.com You should add your sign-off (instead of tested-by) since you are now in the submission path. Thanks, Sekhar -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [v2, 3/3] ARM: dts: AM33XX: Add NAND flash device tree data to am335x-evm
On 4/29/2013 1:25 PM, Gupta, Pekon wrote: From: avinash philip avinashphi...@ti.com NAND flash connected in am335x-evm on GPMC controller. This patch adds device tree node in am3355-evm with GPMC contoller timing for NAND flash interface, NAND partition table, ECC scheme, elm handle id. Signed-off-by: Philip Avinash avinashphi...@ti.com Tested-by: Pekon Gupta pe...@ti.com --- arch/arm/boot/dts/am335x-evm.dts | 98 +- 1 file changed, 97 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts index 0423298..1c2fd89 100644 --- a/arch/arm/boot/dts/am335x-evm.dts +++ b/arch/arm/boot/dts/am335x-evm.dts @@ -26,7 +26,8 @@ am33xx_pinmux: pinmux@44e10800 { pinctrl-names = default; - pinctrl-0 = matrix_keypad_s0 volume_keys_s0; + pinctrl-0 = matrix_keypad_s0 volume_keys_s0 + nandflash_pins_s0; Why add this to the board level fallback (called pinctrl hogs, I think)? This can be part of nand node you added below so that the pinctrl will take effect when nand gets probed instead of all the time. Thanks, Sekhar -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html