ARM: davinci: add support for the am1808 based enbw_cmc board
Subsystems (10)
v3 cover ARM: davinci: add support for the am1808 based enbw_cmc board
This patchserie add support for the davinci am1808 based enbw_cmc board.
Important: I rebased this patchserie against the irqdomain/next branch from grant likely, as he suggested to rework the OF intcontroller changes to the irqdomain work, branch found here:
http://git.secretlab.ca/?p=linux-2.6.git;a=shortlog;h=refs/heads/irqdomain/next
git://git.secretlab.ca/git/linux-2.6.git irqdomain/next
commit 280ad7fda5f95211857fda38960f2b6fdf6edd3e
Author: Grant Likely <[email protected]>
Date: Fri Feb 24 14:58:54 2012 -0700
mfd: twl-core: Add IRQ_DOMAIN dependency
changes for v2:
Post this patchserie now as v2, as reworked in the comments I got for the RFC serie.
changes for v3:
- Interrupt Controller:
- comment from Sergei Shtylyov:
- rename compatible" prop to "ti,cp_intc"
- cp_intc_init() is now also for the of case the name of the init function (it calls the "new" __cp_intc_init() function, which was the "old" cp_intc_init()). Through this rework the changes for OF is better visible. As the OF case uses the irq_domain rework from Grant Likely, maybe the none OF case can use this also, but this should be tested on a hw ...
Got no comments to the following points, I noted in the RFC series, so posting this patchseries with them:
- ARM: davinci: configure davinci aemif chipselects through OF not moved to mfd, as mentioned in this discussion:
http://davinci-linux-open-source.1494791.n2.nabble.com/PATCH-arm-davinci-configure-davinci-aemif-chipselects-through-OF-td7059739.html
instead use a phandle in the DTS, so drivers which uses the davinci aemif, can call davinci_aemif_setup_timing_of()
This is just thought as an RFC ... The enbw_cmc board support not really need to setup this bus timings, as they are setup in U-Boot ... but I want to post this, as I think, it is a nice to have, and I am not really sure, if this has to be a MFD device (If so, all bus interfaces for other SoCs should be converted also to MFD devices) ... as an example how this can be used I add this to the davinci nand controller OF support patch, in this patchserie.
- ARM: davinci: mux: add OF support
I want to get rid of the pin setup code in board code ... This patch introduces a davinci_cfg_reg_of() function, which davinci drivers can call, if they found a "pinmux-handle", so used in the following drivers in this patchserie:
drivers/net/ethernet/ti/davinci_emac
drivers/i2c/busses/i2c-davinci.c
drivers/mtd/nand/davinci_nand.c
- post this board support with USB support, even though USB is only working with the 10 ms "workaround", posted here:
http://comments.gmane.org/gmane.linux.usb.general/54505
I see this issue also on the AM1808 TMDXEXP1808L evalboard.
- MMC and USB are not using OF support yet, ideas how to port this are welcome. I need for USB and MMC board specific callbacks, how to solve this with OF support?
Heiko Schocher (7):
ARM: davinci, intc: Add OF support for TI interrupt controller
ARM: davinci: configure davinci aemif chipselects through OF
ARM: davinci: mux: add OF support
ARM: davinci: net: davinci_emac: add OF support
ARM: davinci: i2c: add OF support
ARM: mtd: nand: davinci: add OF support for davinci nand controller
ARM: davinci: add support for the am1808 based enbw_cmc board
.../devicetree/bindings/arm/davinci/aemif.txt | 119 ++++++ .../bindings/arm/davinci/davinci_emac.txt | 43 +++ .../devicetree/bindings/arm/davinci/i2c.txt | 33 ++ .../devicetree/bindings/arm/davinci/intc.txt | 27 ++ .../devicetree/bindings/arm/davinci/mux.txt | 40 ++ .../devicetree/bindings/arm/davinci/nand.txt | 74 ++++ arch/arm/boot/dts/enbw_cmc.dts | 268 ++++++++++++++ arch/arm/configs/enbw_cmc_defconfig | 123 +++++++ arch/arm/mach-davinci/Kconfig | 9 + arch/arm/mach-davinci/Makefile | 1 + arch/arm/mach-davinci/aemif.c | 86 +++++- arch/arm/mach-davinci/board-enbw-cmc.c | 380 ++++++++++++++++++++ arch/arm/mach-davinci/cp_intc.c | 87 ++++- arch/arm/mach-davinci/include/mach/aemif.h | 1 + arch/arm/mach-davinci/include/mach/mux.h | 2 + arch/arm/mach-davinci/include/mach/uncompress.h | 1 + arch/arm/mach-davinci/mux.c | 73 ++++- drivers/i2c/busses/i2c-davinci.c | 37 ++ drivers/mtd/nand/davinci_nand.c | 85 +++++- drivers/net/ethernet/ti/davinci_emac.c | 94 +++++- 20 files changed, 1569 insertions(+), 14 deletions(-) create mode 100644 Documentation/devicetree/bindings/arm/davinci/aemif.txt create mode 100644 Documentation/devicetree/bindings/arm/davinci/davinci_emac.txt create mode 100644 Documentation/devicetree/bindings/arm/davinci/i2c.txt create mode 100644 Documentation/devicetree/bindings/arm/davinci/intc.txt create mode 100644 Documentation/devicetree/bindings/arm/davinci/mux.txt create mode 100644 Documentation/devicetree/bindings/arm/davinci/nand.txt create mode 100644 arch/arm/boot/dts/enbw_cmc.dts create mode 100644 arch/arm/configs/enbw_cmc_defconfig create mode 100644 arch/arm/mach-davinci/board-enbw-cmc.c
Signature · 1 line
1.7.7.6
PATCH v3 1/7 ARM: davinci, intc: Add OF support for TI interrupt controller
Add a function to initialize the Common Platform Interrupt Controller (cp_intc) from TI used on OMAP-L1x SoCs using a device tree node.
---
- changes for v2:
- add comment from Grant Likely:
- migrate the whole interrupt controller to natively use an irq_domain. Rebased complete patchserie to:
git://git.secretlab.ca/git/linux-2.6.git irqdomain/next
commit 3a806bfcde2cc3e4853f2807b2e3c94e7ccaf450
Author: Grant Likely <[email protected]>
Date: Fri Jan 27 06:44:34 2012 -0700
irq_domain: mostly eliminate slow-path revmap lookups
- changes for v3:
- add comments from Sergei Shtylyov:
- rename compatible" prop to "ti,cp_intc"
- cp_intc_init() is now also for the of case the name of the init function (it calls the "new" __cp_intc_init() function, which was the "old" cp_intc_init()). Through this rework the changes for OF is better visible. As the OF case uses the irq_domain rework from Grant Likely, maybe the none OF case can use this also, but this should be tested on a hw ...
- rebased to:
git://git.secretlab.ca/git/linux-2.6.git irqdomain/next
commit 280ad7fda5f95211857fda38960f2b6fdf6edd3e
Author: Grant Likely <[email protected]>
Date: Fri Feb 24 14:58:54 2012 -0700
mfd: twl-core: Add IRQ_DOMAIN dependency
.../devicetree/bindings/arm/davinci/intc.txt | 27 ++++++ arch/arm/mach-davinci/cp_intc.c | 87 +++++++++++++++++-- 2 files changed, 104 insertions(+), 10 deletions(-) create mode 100644 Documentation/devicetree/bindings/arm/davinci/intc.txt
Documentation/devicetree/bindings/arm/davinci/intc.txt new file +27 -0
@@ -0,0 +1,27 @@ +* TI Common Platform Interrupt Controller + +Common Platform Interrupt Controller (cp_intc) is used on +OMAP-L1x SoCs and can support several configurable number +of interrupts. + +Main node required properties: + +- compatible : should be: + "ti,cp_intc" +- interrupt-controller : Identifies the node as an interrupt controller +- #interrupt-cells : Specifies the number of cells needed to encode an + interrupt source. The type shall be a <u32> and the value shall be 1. + + The cell contains the interrupt number in the range [0-128]. +- ti,intc-size: Number of interrupts handled by the interrupt controller. +- reg: physical base address and size of the intc registers map. + +Example: + + intc: interrupt-controller at 1 { + compatible = "ti,cp_intc"; + interrupt-controller; + #interrupt-cells = <1>; + ti,intc-size = <101>; + reg = <0xfffee000 0x2000>; + };
arch/arm/mach-davinci/cp_intc.c +77 -10
117 lines not on this page · raw message
Signature · 1 line
1.7.7.6
PATCH v3 1/7 ARM: davinci, intc: Add OF support for TI interrupt controller
Quoted 172 lines · Heiko Schocher
Add a function to initialize the Common Platform Interrupt Controller (
cp_intc) from TI used on OMAP-L1x SoCs using a device tree node.Signed-off-by Heiko Schocher <[email protected]>Cc davinci-linux-open-source at linux.davincidsp.comCc linux-arm-kernel at lists.infradead.orgCc devicetree-discuss at lists.ozlabs.orgCc Grant Likely <[email protected]>Cc Sekhar Nori <[email protected]>Cc Wolfgang Denk <[email protected]>Cc Sergei Shtylyov <[email protected]>---
- changes for v2:
- add comment from Grant Likely:
- migrate the whole interrupt controller to natively use anirq_domain. Rebased complete patchserie to:
git://git.secretlab.ca/git/linux-2.6.gitirqdomain/nextcommit
3a806bfcde2cc3e4853f2807b2e3c94e7ccaf450
Author: Grant Likely <[email protected]>
Date: Fri Jan 27 06:44:34 2012 -0700
irq_domain: mostly eliminate slow-path revmap lookups
- changes for v3:
- add comments from Sergei Shtylyov:
- rename compatible" prop to "ti,cp_intc"
-cp_intc_init()is now also for the of case the name of the init function (it calls the "new"__cp_intc_init()function, which was the "old"cp_intc_init()). Through this rework the changes for OF is better visible. As the OF case uses theirq_domainrework from Grant Likely, maybe the none OF case can use this also, but this should be tested on a hw ...
- rebased to:
git://git.secretlab.ca/git/linux-2.6.gitirqdomain/nextcommit
280ad7fda5f95211857fda38960f2b6fdf6edd3e
Author: Grant Likely <[email protected]>
Date: Fri Feb 24 14:58:54 2012 -0700mfd: twl-core: Add
IRQ_DOMAINdependency.../devicetree/bindings/arm/davinci/intc.txt | 27 ++++++ arch/arm/mach-davinci/cp_intc.c | 87 +++++++++++++++++-- 2 files changed, 104 insertions(+), 10 deletions(-) create mode 100644 Documentation/devicetree/bindings/arm/davinci/intc.txtDocumentation/devicetree/bindings/arm/davinci/intc.txt new file +27
-0@@ -0,0 +1,27 @@ +* TI Common Platform Interrupt Controller + +Common Platform Interrupt Controller (cp_intc) is used on +OMAP-L1x SoCs and can support several configurable number +of interrupts. + +Main node required properties: + +- compatible : should be: + "ti,cp_intc" +- interrupt-controller : Identifies the node as an interrupt controller +- #interrupt-cells : Specifies the number of cells needed to encode an + interrupt source. The type shall be a <u32> and the value shall be 1. + + The cell contains the interrupt number in the range [0-128]. +- ti,intc-size: Number of interrupts handled by the interrupt controller. +- reg: physical base address and size of the intc registers map. + +Example: + + intc: interrupt-controller at 1 { + compatible = "ti,cp_intc"; + interrupt-controller; + #interrupt-cells = <1>; + ti,intc-size = <101>; + reg = <0xfffee000 0x2000>; + };arch/arm/mach-davinci/cp_intc.c +48
-10@@ -9,9 +9,14 @@* kind, whether express or implied. */ +#include <linux/export.h> #include <linux/init.h> #include <linux/irq.h> +#include <linux/irqdomain.h> #include <linux/io.h> +#include <linux/of.h> +#include <linux/of_address.h> +#include <linux/of_irq.h> #include <mach/common.h> #include <mach/cp_intc.h> @@ -99,18 +104,45 @@ static struct irq_chip cp_intc_irq_chip = { .irq_set_wake = cp_intc_set_wake, }; -void __init cp_intc_init (void ) +static struct irq_domain *cp_intc_domain; + +static int cp_intc_host_map (struct irq_domain *h,unsigned int virq, +irq_hw_number_t hw) { -unsigned long num_irq = davinci_soc_info.intc_irq_num; +pr_debug ("cp_intc_host_map(%d, 0x%lx)\n" , virq, hw); + +irq_set_chip (virq, &cp_intc_irq_chip); +set_irq_flags (virq,IRQF_VALID |IRQF_PROBE ); +irq_set_handler (virq, handle_edge_irq); +return 0 ; +} + +static const struct irq_domain_ops cp_intc_host_ops = { + .map = cp_intc_host_map, + .xlate = irq_domain_xlate_onetwocell, +}; + +int __init __cp_intc_init (struct device_node *node, +struct device_node *parent) +{ +u32 num_irq = davinci_soc_info.intc_irq_num;u8 *irq_prio = davinci_soc_info.intc_irq_prios;u32 *host_map = davinci_soc_info.intc_host_map;unsigned num_reg =BITS_TO_LONGS (num_irq); -int i; +int i, irq_base; davinci_intc_type =DAVINCI_INTC_TYPE_CP_INTC ; - davinci_intc_base =ioremap (davinci_soc_info.intc_base,SZ_8K ); +if (node) { + davinci_intc_base =of_iomap (node,0 ); +if (of_property_read_u32 (node,"ti,intc-size" , &num_irq)) +pr_warn ("unable to get intc-size, default to %d\n" , + num_irq); + }else { + davinci_intc_base =ioremap (davinci_soc_info.intc_base, +SZ_8K ); + }if (WARN_ON (!davinci_intc_base)) -return ; +return -EINVAL ;cp_intc_write (0 ,CP_INTC_GLOBAL_ENABLE );@@ -165,13 +197,48 @@ void __init cp_intc_init(void)for (i =0 ; host_map[i] !=-1 ; i++)cp_intc_write (host_map[i],CP_INTC_HOST_MAP (i)); -/* Set up genirq dispatching for cp_intc */ -for (i =0 ; i < num_irq; i++) { -irq_set_chip (i, &cp_intc_irq_chip); -set_irq_flags (i,IRQF_VALID |IRQF_PROBE ); -irq_set_handler (i, handle_edge_irq); +if (node) { + irq_base =irq_alloc_descs (-1 ,0 , num_irq,0 ); +if (irq_base <0 ) { +pr_warn ("Couldn't allocate IRQ numbers\n" ); + irq_base =0 ; + } + +/* create a legacy host */ + cp_intc_domain =irq_domain_add_legacy (node, num_irq, + irq_base,0 , &cp_intc_host_ops,NULL ); +if (cp_intc_domain ==NULL ) {
arch/arm/mach-davinci/cp_intc.c void __init cp_intc_init(void) · line 220
Quoted 10 lines
arch/arm/mach-davinci/cp_intc.c +10
-0+pr_err ("CP INTC: failed to allocate irq host!\n" ); +return -EINVAL ; + } + }else { +/* Set up genirq dispatching for cp_intc */ +for (i =0 ; i < num_irq; i++) { +irq_set_chip (i, &cp_intc_irq_chip); +set_irq_flags (i,IRQF_VALID |IRQF_PROBE ); +irq_set_handler (i, handle_edge_irq); + }
No need for the if/else clause here. irq_domain should be used for both DT and non-DT. It makes the code a lot simpler that way. The only difference I would suggest is to call irq_domain_add_linear() in the DT case instead of irq_domain_add_legacy()... and this is temporary too until I fix up the irq_domain code to better handle both static and dynamic mapping.
Quoted 14 lines
arch/arm/mach-davinci/cp_intc.c +10
-0}/* Enable global interrupt */ cp_intc_write (1 ,CP_INTC_GLOBAL_ENABLE ); + +return 0 ; +} + +#ifdef CONFIG_OF +static struct of_device_id irq_match[]__initdata = { + { .compatible ="ti,cp_intc" , .data = __cp_intc_init, }, + { } +}; +
arch/arm/mach-davinci/cp_intc.c void __init cp_intc_init(void) · line 244
Quoted 10 lines
arch/arm/mach-davinci/cp_intc.c +9
-0+void __init cp_intc_init (void ) +{ +of_irq_init (irq_match); +} +#else +void __init cp_intc_init (void ) +{ +__cp_intc_init (NULL ,NULL ); } +#endif
This is broken. Turning on CONFIG_OF must not disable non-DT users. It needs to be reworked to be conditional at runtime.
g.
PATCH v3 1/7 ARM: davinci, intc: Add OF support for TI interrupt controller
Quoted 44 lines · Grant Likely
Quoted 43 lines · Heiko Schocher
Add a function to initialize the Common Platform Interrupt Controller (
cp_intc) from TI used on OMAP-L1x SoCs using a device tree node.Signed-off-by Heiko Schocher <[email protected]>Cc davinci-linux-open-source at linux.davincidsp.comCc linux-arm-kernel at lists.infradead.orgCc devicetree-discuss at lists.ozlabs.orgCc Grant Likely <[email protected]>Cc Sekhar Nori <[email protected]>Cc Wolfgang Denk <[email protected]>Cc Sergei Shtylyov <[email protected]>---
arch/arm/mach-davinci/cp_intc.c +20
-5@@ -165,13 +197,48 @@ void __init cp_intc_init(void)for (i =0 ; host_map[i] !=-1 ; i++)cp_intc_write (host_map[i],CP_INTC_HOST_MAP (i)); -/* Set up genirq dispatching for cp_intc */ -for (i =0 ; i < num_irq; i++) { -irq_set_chip (i, &cp_intc_irq_chip); -set_irq_flags (i,IRQF_VALID |IRQF_PROBE ); -irq_set_handler (i, handle_edge_irq); +if (node) { + irq_base =irq_alloc_descs (-1 ,0 , num_irq,0 ); +if (irq_base <0 ) { +pr_warn ("Couldn't allocate IRQ numbers\n" ); + irq_base =0 ; + } + +/* create a legacy host */ + cp_intc_domain =irq_domain_add_legacy (node, num_irq, + irq_base,0 , &cp_intc_host_ops,NULL ); +if (cp_intc_domain ==NULL ) { +pr_err ("CP INTC: failed to allocate irq host!\n" ); +return -EINVAL ; + } + }else { +/* Set up genirq dispatching for cp_intc */ +for (i =0 ; i < num_irq; i++) { +irq_set_chip (i, &cp_intc_irq_chip); +set_irq_flags (i,IRQF_VALID |IRQF_PROBE ); +irq_set_handler (i, handle_edge_irq);
Quoted 8 lines
Review void __init cp_intc_init(void) · line 220
Quoted 1 line
(quoted diff) +1
-0+ }No need for the if/else clause here.
irq_domainshould be used for both DT and non-DT. It makes the code a lot simpler that way. The only difference I would suggest is to callirq_domain_add_linear()in the DT case instead ofirq_domain_add_legacy()... and this is temporary too until I fix up theirq_domaincode to better handle both static and dynamic mapping.
It will also help to do the irq_domain conversion in a separate patch. That way irq_domain conversion can be reviewed separately from DT conversion.
Thanks,
Sekhar
PATCH v3 1/7 ARM: davinci, intc: Add OF support for TI interrupt controller
In reply to Heiko SchocherQuoted 19 lines · Heiko Schocher
Add a function to initialize the Common Platform Interrupt Controller (
cp_intc) from TI used on OMAP-L1x SoCs using a device tree node.Signed-off-by Heiko Schocher <[email protected]>Cc davinci-linux-open-source at linux.davincidsp.comCc linux-arm-kernel at lists.infradead.orgCc devicetree-discuss at lists.ozlabs.orgCc Grant Likely <[email protected]>Cc Sekhar Nori <[email protected]>Cc Wolfgang Denk <[email protected]>Cc Sergei Shtylyov <[email protected]>---
- changes for v2:
- add comment from Grant Likely:
- migrate the whole interrupt controller to natively use anirq_domain. Rebased complete patchserie to:
git://git.secretlab.ca/git/linux-2.6.gitirqdomain/next
Quoted 8 lines
commit
3a806bfcde2cc3e4853f2807b2e3c94e7ccaf450
Author: Grant Likely <[email protected]>
Date: Fri Jan 27 06:44:34 2012 -0700
irq_domain: mostly eliminate slow-path revmap lookups
- changes for v3:
- add comments from Sergei Shtylyov:
- rename compatible" prop to "ti,cp_intc"
Nit: DT preference is to use '-' instead of '_'
Quoted 31 lines
-
cp_intc_init()is now also for the of case the name of the init function (it calls the "new"__cp_intc_init()function, which was the "old"cp_intc_init()). Through this rework the changes for OF is better visible. As the OF case uses theirq_domainrework from Grant Likely, maybe the none OF case can use this also, but this should be tested on a hw ...
- rebased to:
git://git.secretlab.ca/git/linux-2.6.gitirqdomain/nextcommit
280ad7fda5f95211857fda38960f2b6fdf6edd3e
Author: Grant Likely <[email protected]>
Date: Fri Feb 24 14:58:54 2012 -0700mfd: twl-core: Add
IRQ_DOMAINdependency.../devicetree/bindings/arm/davinci/intc.txt | 27 ++++++ arch/arm/mach-davinci/cp_intc.c | 87 +++++++++++++++++-- 2 files changed, 104 insertions(+), 10 deletions(-) create mode 100644 Documentation/devicetree/bindings/arm/davinci/intc.txtDocumentation/devicetree/bindings/arm/davinci/intc.txt new file +3
-0@@ -0,0 +1,27 @@ +* TI Common Platform Interrupt Controller + +Common Platform Interrupt Controller (cp_intc) is used on
Documentation/devicetree/bindings/arm/davinci/intc.txt line 13
Quoted 10 lines
Documentation/devicetree/bindings/arm/davinci/intc.txt new file +10
-0+OMAP-L1x SoCs and can support several configurable number +of interrupts. + +Main node required properties: + +- compatible : should be: + "ti,cp_intc" +- interrupt-controller : Identifies the node as an interrupt controller +- #interrupt-cells : Specifies the number of cells needed to encode an + interrupt source. The type shall be a <u32> and the value shall be 1.
Is there any configuration for irq inputs (edge/level) or are they fixed mode? If configurable, then you'll want another cell for flags.
Quoted 104 lines
Documentation/devicetree/bindings/arm/davinci/intc.txt new file +14
-0+ + The cell contains the interrupt number in the range [0-128]. +- ti,intc-size: Number of interrupts handled by the interrupt controller. +- reg: physical base address and size of the intc registers map. + +Example: + + intc: interrupt-controller at 1 { + compatible = "ti,cp_intc"; + interrupt-controller; + #interrupt-cells = <1>; + ti,intc-size = <101>; + reg = <0xfffee000 0x2000>; + };arch/arm/mach-davinci/cp_intc.c +48
-10@@ -9,9 +9,14 @@* kind, whether express or implied. */ +#include <linux/export.h> #include <linux/init.h> #include <linux/irq.h> +#include <linux/irqdomain.h> #include <linux/io.h> +#include <linux/of.h> +#include <linux/of_address.h> +#include <linux/of_irq.h> #include <mach/common.h> #include <mach/cp_intc.h> @@ -99,18 +104,45 @@ static struct irq_chip cp_intc_irq_chip = { .irq_set_wake = cp_intc_set_wake, }; -void __init cp_intc_init (void ) +static struct irq_domain *cp_intc_domain; + +static int cp_intc_host_map (struct irq_domain *h,unsigned int virq, +irq_hw_number_t hw) { -unsigned long num_irq = davinci_soc_info.intc_irq_num; +pr_debug ("cp_intc_host_map(%d, 0x%lx)\n" , virq, hw); + +irq_set_chip (virq, &cp_intc_irq_chip); +set_irq_flags (virq,IRQF_VALID |IRQF_PROBE ); +irq_set_handler (virq, handle_edge_irq); +return 0 ; +} + +static const struct irq_domain_ops cp_intc_host_ops = { + .map = cp_intc_host_map, + .xlate = irq_domain_xlate_onetwocell, +}; + +int __init __cp_intc_init (struct device_node *node, +struct device_node *parent) +{ +u32 num_irq = davinci_soc_info.intc_irq_num;u8 *irq_prio = davinci_soc_info.intc_irq_prios;u32 *host_map = davinci_soc_info.intc_host_map;unsigned num_reg =BITS_TO_LONGS (num_irq); -int i; +int i, irq_base; davinci_intc_type =DAVINCI_INTC_TYPE_CP_INTC ; - davinci_intc_base =ioremap (davinci_soc_info.intc_base,SZ_8K ); +if (node) { + davinci_intc_base =of_iomap (node,0 ); +if (of_property_read_u32 (node,"ti,intc-size" , &num_irq)) +pr_warn ("unable to get intc-size, default to %d\n" , + num_irq); + }else { + davinci_intc_base =ioremap (davinci_soc_info.intc_base, +SZ_8K ); + }if (WARN_ON (!davinci_intc_base)) -return ; +return -EINVAL ;cp_intc_write (0 ,CP_INTC_GLOBAL_ENABLE );@@ -165,13 +197,48 @@ void __init cp_intc_init(void)for (i =0 ; host_map[i] !=-1 ; i++)cp_intc_write (host_map[i],CP_INTC_HOST_MAP (i)); -/* Set up genirq dispatching for cp_intc */ -for (i =0 ; i < num_irq; i++) { -irq_set_chip (i, &cp_intc_irq_chip); -set_irq_flags (i,IRQF_VALID |IRQF_PROBE ); -irq_set_handler (i, handle_edge_irq); +if (node) { + irq_base =irq_alloc_descs (-1 ,0 , num_irq,0 ); +if (irq_base <0 ) { +pr_warn ("Couldn't allocate IRQ numbers\n" ); + irq_base =0 ; + } + +/* create a legacy host */ + cp_intc_domain =irq_domain_add_legacy (node, num_irq, + irq_base,0 , &cp_intc_host_ops,NULL ); +if (cp_intc_domain ==NULL ) {
arch/arm/mach-davinci/cp_intc.c void __init cp_intc_init(void) · line 220
Quoted 10 lines
arch/arm/mach-davinci/cp_intc.c +10
-0+pr_err ("CP INTC: failed to allocate irq host!\n" ); +return -EINVAL ; + } + }else { +/* Set up genirq dispatching for cp_intc */ +for (i =0 ; i < num_irq; i++) { +irq_set_chip (i, &cp_intc_irq_chip); +set_irq_flags (i,IRQF_VALID |IRQF_PROBE ); +irq_set_handler (i, handle_edge_irq); + }
Instead of the else clause here, even the non-DT mode should still call irq_domain_add. irq_domain is not just for DT. It gets the driver away from manually managing its irq mappings.
Quoted 14 lines
arch/arm/mach-davinci/cp_intc.c +10
-0}/* Enable global interrupt */ cp_intc_write (1 ,CP_INTC_GLOBAL_ENABLE ); + +return 0 ; +} + +#ifdef CONFIG_OF +static struct of_device_id irq_match[]__initdata = { + { .compatible ="ti,cp_intc" , .data = __cp_intc_init, }, + { } +}; +
arch/arm/mach-davinci/cp_intc.c void __init cp_intc_init(void) · line 244
Quoted 10 lines
arch/arm/mach-davinci/cp_intc.c +9
-0+void __init cp_intc_init (void ) +{ +of_irq_init (irq_match); +} +#else +void __init cp_intc_init (void ) +{ +__cp_intc_init (NULL ,NULL ); } +#endif
Nack on this hunk because it means you have either a DT kernel or a non-DT kernel. Turning on CONFIG_OF must not break booting on a non-DT platform. This is a policy decision to improve test coverage. Instead the init hook should check at runtime if a DT is available, and if it is call of_irq_init. Otherwise call __cp_initc_init() directly.
g.
PATCH v3 1/7 ARM: davinci, intc: Add OF support for TI interrupt controller
Hello Grant,
Am 26.05.2012 03:05, schrieb Grant Likely:
Quoted 24 lines · Heiko Schocher
Quoted 23 lines
Add a function to initialize the Common Platform Interrupt Controller (
cp_intc) from TI used on OMAP-L1x SoCs using a device tree node.Signed-off-by Heiko Schocher<[email protected]>Cc davinci-linux-open-source at linux.davincidsp.comCc linux-arm-kernel at lists.infradead.orgCc devicetree-discuss at lists.ozlabs.orgCc Grant Likely<[email protected]>Cc Sekhar Nori<[email protected]>Cc Wolfgang Denk<[email protected]>Cc Sergei Shtylyov<[email protected]>---
- changes for v2:
- add comment from Grant Likely:
- migrate the whole interrupt controller to natively use anirq_domain. Rebased complete patchserie to:
git://git.secretlab.ca/git/linux-2.6.gitirqdomain/nextcommit
3a806bfcde2cc3e4853f2807b2e3c94e7ccaf450
Author: Grant Likely<[email protected]>
Date: Fri Jan 27 06:44:34 2012 -0700
Quoted 6 lines
Quoted 4 lines
irq_domain: mostly eliminate slow-path revmap lookups
- changes for v3:
- add comments from Sergei Shtylyov:
- rename compatible" prop to "ti,cp_intc"Nit: DT preference is to use '-' instead of '_'
fixed.
[...]
Quoted 6 lines
Quoted 6 lines
Documentation/devicetree/bindings/arm/davinci/intc.txt new file +0
-0@@ -0,0 +1,27 @@
[...]
Quoted 8 lines
Documentation/devicetree/bindings/arm/davinci/intc.txt
Quoted 5 lines
+- compatible : should be:
Documentation/devicetree/bindings/arm/davinci/intc.txt new file +4
-0+ "ti,cp_intc" +- interrupt-controller : Identifies the node as an interrupt controller +- #interrupt-cells : Specifies the number of cells needed to encode an + interrupt source. The type shall be a<u32> and the value shall be 1.Is there any configuration for irq inputs (edge/level) or are they fixed mode? If configurable, then you'll want another cell for flags.
As I know, they are fixed...
[...]
Quoted 5 lines
Quoted 5 lines
arch/arm/mach-davinci/cp_intc.c +0
-0@@ -9,9 +9,14 @@
[...]
Quoted 10 lines
Quoted 10 lines
arch/arm/mach-davinci/cp_intc.c +10
-0+/* create a legacy host */ + cp_intc_domain =irq_domain_add_legacy (node, num_irq, + irq_base,0 ,&cp_intc_host_ops,NULL ); +if (cp_intc_domain ==NULL ) { +pr_err ("CP INTC: failed to allocate irq host!\n" ); +return -EINVAL ; + } + }else { +/* Set up genirq dispatching for cp_intc */ +for (i =0 ; i< num_irq; i++) {
Quoted 8 lines
arch/arm/mach-davinci/cp_intc.c void __init cp_intc_init(void) · line 220
Quoted 4 lines
arch/arm/mach-davinci/cp_intc.c +4
-0+irq_set_chip (i,&cp_intc_irq_chip); +set_irq_flags (i,IRQF_VALID |IRQF_PROBE ); +irq_set_handler (i, handle_edge_irq); + }Instead of the else clause here, even the non-DT mode should still call
irq_domain_add.irq_domainis not just for DT. It gets the driver away from manually managing its irq mappings.
Ok, I try this.
Quoted 21 lines
Quoted 21 lines
/* Enable global interrupt */ cp_intc_write(1, CP_INTC_GLOBAL_ENABLE);arch/arm/mach-davinci/cp_intc.c +18
-0+ +return 0 ; +} + +#ifdef CONFIG_OF +static struct of_device_id irq_match[]__initdata = { + { .compatible ="ti,cp_intc" , .data = __cp_intc_init, }, + { } +}; + +void __init cp_intc_init (void ) +{ +of_irq_init (irq_match); +} +#else +void __init cp_intc_init (void ) +{ +__cp_intc_init (NULL ,NULL ); }
Quoted 8 lines
Quoted 1 line
+#endif
Nack on this hunk because it means you have either a DT kernel or a non-DT kernel. Turning on
CONFIG_OFmust not break booting on a non-DT platform. This is a policy decision to improve test coverage. Instead the init hook should check at runtime if a DT is available, and if it is callof_irq_init. Otherwise call__cp_initc_init()directly.
fixed in v4
Thanks for the review!
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH v3 2/7 ARM: davinci: configure davinci aemif chipselects through OF
In reply to Heiko SchocherAdd support for configuring the aemif timing registers through device tree. Introduce new compatible property "ti,davinci-cs", see full description in Documentation/devicetree/bindings/arm/davinci/aemif.txt
---
- changes for v2
- add comment from Sergei Shtylyov:
- use of_property_read_u32()
- Conding Style changes
- add comment from Sekhar Nori:
- add patch description
- use davinci_aemif_setup_timing
- change compatible node to "ti,davinci-aemif"
- not moved to mfd, as mentioned in this discussion:
http://davinci-linux-open-source.1494791.n2.nabble.com/PATCH-arm-davinci-configure-davinci-aemif-chipselects-through-OF-td7059739.html
instead use a phandle in the DTS, so drivers which uses the davinci aemif, can call davinci_aemif_setup_timing_of()
This is just thought as an RFC ... The enbw_cmc board support not really need to setup this bus timings, as they are setup in U-Boot ... but I want to post this, as I think, it is a nice to have ... as an example used in the davinci nand controller OF support patch, in this patchserie.
- no changes for v3
.../devicetree/bindings/arm/davinci/aemif.txt | 119 ++++++++++++++++++++ arch/arm/mach-davinci/aemif.c | 86 ++++++++++++++- arch/arm/mach-davinci/include/mach/aemif.h | 1 + 3 files changed, 205 insertions(+), 1 deletions(-) create mode 100644 Documentation/devicetree/bindings/arm/davinci/aemif.txt
Documentation/devicetree/bindings/arm/davinci/aemif.txt new file +119 -0
@@ -0,0 +1,119 @@ +* Texas Instruments Davinci AEMIF + +This file provides information, what the device node for the +davinci aemif interface contain. + +Required properties: +- compatible: "ti,davinci-aemif"; +- #address-cells : Should be either two or three. The first cell is the + chipselect number, and the remaining cells are the + offset into the chipselect. +- #size-cells : Either one or two, depending on how large each chipselect + can be. +- ranges : Each range corresponds to a single chipselect, and cover + the entire access window as configured. + +Optional properties: +- none + +Optional subnodes: +- Chipselect setup: + - compatible: "ti,davinci-cs"; + - #address-cells = <1>; + - #size-cells = <1>; + + Timing setup, all timings in nanoseconds + - cs: chipselect (value 2,3,4 or 5) + - asize: Asynchronous Data Bus Width. + value: + 0: 8 bit + 1: 16 bit + - ta: Minimum Turn-Around time. + - rhold: Read hold width + - rstrobe: Read strobe width + - rsetup: Read setup width + - whold: Write hold width + - wstrobe: Write strobe width + - wsetup: Write setup width + - ew: Extend Wait bit + value: + 0: Extended wait cycles disabled. + 1: Extended wait cycles enabled. + - ss: Select Strobe bit. + value: + 0: Normal Mode enabled. + 1: Select Strobe Mode enabled. +- CFI driver: + see: Documentation/devicetree/bindings/mtd/mtd-physmap.txt + +Example (enbw_cmc board): + aemif at 60000000 { + compatible = "ti,davinci-aemif"; + #address-cells = <2>; + #size-cells = <1>; + reg = <0x68000000 0x80000>; + ranges = <2 0 0x60000000 0x02000000 + 3 0 0x62000000 0x02000000 + 4 0 0x64000000 0x02000000 + 5 0 0x66000000 0x02000000 + 6 0 0x68000000 0x02000000>; + cs2 at 68000000 { + compatible = "ti,davinci-cs"; + #address-cells = <1>; + #size-cells = <1>; + /* all timings in nanoseconds */ + cs = <2>; + asize = <1>; + ta = <0>; + rhold = <7>; + rstrobe = <42>; + rsetup = <14>; + whold = <7>; + wstrobe = <42>; + wsetup = <14>; + ew = <0>; + ss = <0>; + }; + flash at 2,0 { + compatible = "cfi-flash"; + reg = <2 0x0 0x400000>; + #address-cells = <1>; + #size-cells = <1>; + bank-width = <2>; + device-width = <2>; + }; + nand_cs: cs3 at 68000000 { + compatible = "ti,davinci-cs"; + #address-cells = <1>; + #size-cells = <1>; + /* all timings in nanoseconds */ + cs = <3>; + asize = <0>; + ta = <0>; + rhold = <7>; + rstrobe = <42>; + rsetup = <7>; + whold = <7>; + wstrobe = <14>; + wsetup = <7>; + ew = <0>; + ss = <0>; + }; + nandflash at 3,0 { + compatible = "ti,davinci-nand"; + reg = <3 0x0 0x807ff + 6 0x0 0x8000>; + #address-cells = <1>; + #size-cells = <1>; + mask_ale = <0>; + mask_cle = <0>; + mask_chipsel = <0>; + ecc_mode = <2>; + ecc_bits = <4>; + options = <0>; + bbt_options = <0x20000>; + pinmux-handle = <&nand_pins>; + timing-handle = <&nand_cs>; + }; + + };
arch/arm/mach-davinci/aemif.c +85 -1
113 lines not on this page · raw message
arch/arm/mach-davinci/include/mach/aemif.h +1 -0
@@ -33,4 +33,5 @@ struct davinci_aemif_timing {int davinci_aemif_setup_timing (struct davinci_aemif_timing *t,void __iomem *base,unsigned cs); +int davinci_aemif_setup_timing_of (struct device_node *np);#endif
Signature · 1 line
1.7.7.6
PATCH v3 3/7 ARM: davinci: mux: add OF support
In reply to Heiko Schocheradd support for configuring the pinmux on davinci SoC through OF.
---
This patch is just a RFC, as I want to get rid of the pin setup code in board code ... This patch introduces a davinci_cfg_reg_of() function, which davinci drivers can call, if they found a pinmux-handle, so used in the following drivers in this patchserie:
drivers/net/ethernet/ti/davinci_emacdrivers/i2c/busses/i2c-davinci.cdrivers/mtd/nand/davinci_nand.c
Comments are welcome.
- no changes for v2
- no changes for v3
.../devicetree/bindings/arm/davinci/mux.txt | 40 +++++++++++ arch/arm/mach-davinci/include/mach/mux.h | 2 + arch/arm/mach-davinci/mux.c | 73 +++++++++++++++++++- 3 files changed, 114 insertions(+), 1 deletions(-) create mode 100644 Documentation/devicetree/bindings/arm/davinci/mux.txt
Documentation/devicetree/bindings/arm/davinci/mux.txt new file +40 -0
@@ -0,0 +1,40 @@ +* Texas Instruments Davinci pinmux + +This file provides information, what the device node for the +davinci pinmux interface contain. + +Required properties: +- compatible: "ti,davinci-pinmux"; +- pins : contains a table with the following colums: + mux register: pinmux register + register offset: offset in register, which to change + mode mask: mode mask + mode value: mode value + +Optional properties: +- none + +Example (enbw_cmc board): + emac_pins: pinmux at 1c14120 { + compatible = "ti,davinci-pinmux"; + reg = <0x14120 0x1000>; + pins = < /* muxreg maskoff modemsk muxmode */ + 2 4 15 8 /* MII TXEN */ + 2 8 15 8 /* MII TXCLK */ + 2 12 15 8 /* MII COL */ + 2 16 15 8 /* MII TXD_3 */ + 2 20 15 8 /* MII TXD_2 */ + 2 24 15 8 /* MII TXD_1 */ + 2 28 15 8 /* MII TXD_0 */ + 3 8 15 8 /* MII RXER */ + 3 12 15 8 /* MII CRS */ + 3 0 15 8 /* MII RXCLK */ + 3 4 15 8 /* MII RXDV */ + 3 16 15 8 /* MII RXD_3 */ + 3 20 15 8 /* MII RXD_2 */ + 3 24 15 8 /* MII RXD_1 */ + 3 28 15 8 /* MII RXD_0 */ + 4 0 15 8 /* MDIO CLK */ + 4 4 15 8 /* MDIO D */ + >; + };
arch/arm/mach-davinci/include/mach/mux.h +2 -0
@@ -1205,6 +1205,7 @@ enum davinci_tnetv107x_index {/* setup pin muxing */ extern int davinci_cfg_reg (unsigned long reg_cfg);extern int davinci_cfg_reg_list (const short pins[]); +extern int davinci_cfg_reg_of (struct device_node *);#else /* boot loader does it all (no warnings from CONFIG_DAVINCI_MUX_WARNINGS) */ static inline int davinci_cfg_reg (unsigned long reg_cfg) {return 0 ; }
@@ -1212,6 +1213,7 @@ static inline int davinci_cfg_reg_list(const short pins[]) {return 0 ; } +static int davinci_cfg_reg_of (struct device_node *) {return 0 ; };#endif #endif /* __INC_MACH_MUX_H */
arch/arm/mach-davinci/mux.c +72 -1
96 lines not on this page · raw message
Signature · 1 line
1.7.7.6
PATCH v3 4/7 ARM: davinci: net: davinci_emac: add OF support
In reply to Heiko Schocheradd of support for the davinci_emac driver.
---
- changes for v2:
- add comment from Anatoly Sivov
- fix typo in davinci_emac.txt
- add comment from Grant Likely:
- add prefix "ti,davinci-" to davinci specific property names
- remove version property
- use compatible name "ti,davinci-dm6460-emac"
- use devm_kzalloc()
- use of_match_ptr()
- document all new properties
- remove of_address_to_resource() and do not overwrite resource table
- whitespace fixes
- remove hw_ram_addr as it is not used in current board code
- no changes for v3
.../bindings/arm/davinci/davinci_emac.txt | 43 +++++++++ drivers/net/ethernet/ti/davinci_emac.c | 94 +++++++++++++++++++- 2 files changed, 136 insertions(+), 1 deletions(-) create mode 100644 Documentation/devicetree/bindings/arm/davinci/davinci_emac.txt
Documentation/devicetree/bindings/arm/davinci/davinci_emac.txt new file +43 -0
@@ -0,0 +1,43 @@ +* Texas Instruments Davinci EMAC + +This file provides information, what the device node +for the davinci_emac interface contain. + +Required properties: +- compatible: "ti,davinci-dm6460-emac"; +- reg: Offset and length of the register set for the device +- ti,davinci-ctrl-reg-offset: offset to control register +- ti,davinci-ctrl-mod-reg-offset: offset to control module register +- ti,davinci-ctrl-ram-offset: offset to control module ram +- ti,davinci-ctrl-ram-size: size of control module ram +- ti,davinci-rmii-en: use RMII +- ti,davinci-no-bd-ram: has the emac controller BD RAM +- phy-handle: Contains a phandle to an Ethernet PHY. + if not, davinci_emac driver defaults to 100/FULL +- interrupts: interrupt mapping for the davinci emac interrupts sources: + 4 sources: <Receive Threshold Interrupt + Receive Interrupt + Transmit Interrupt + Miscellaneous Interrupt> +- pinmux-handle: Contains a handle to configure the pinmux settings. + +Optional properties: +- local-mac-address : 6 bytes, mac address + +Example (enbw_cmc board): + eth0: emac at 1e20000 { + compatible = "ti,davinci-dm6460-emac"; + reg = <0x220000 0x4000>; + ti,davinci-ctrl-reg-offset = <0x3000>; + ti,davinci-ctrl-mod-reg-offset = <0x2000>; + ti,davinci-ctrl-ram-offset = <0>; + ti,davinci-ctrl-ram-size = <0x2000>; + local-mac-address = [ 00 00 00 00 00 00 ]; + interrupts = <33 + 34 + 35 + 36 + >; + interrupt-parent = <&intc>; + pinmux-handle = <&emac_pins>; + };
drivers/net/ethernet/ti/davinci_emac.c +93 -1
130 lines not on this page · raw message
Signature · 1 line
1.7.7.6
RE: [PATCH v3 4/7] ARM: davinci: net: davinci_emac: add OF support
Hi Heiko,
Documentation/devicetree/bindings/arm/davinci/davinci_emac.txt
Quoted 40 lines · Heiko Schocher
add of support for the
davinci_emacdriver.Signed-off-by Heiko Schocher <[email protected]>Cc davinci-linux-open-source at linux.davincidsp.comCc linux-arm-kernel at lists.infradead.orgCc devicetree-discuss at lists.ozlabs.orgCc netdev at vger.kernel.orgCc Grant Likely <[email protected]>Cc Sekhar Nori <[email protected]>Cc Wolfgang Denk <[email protected]>Cc Anatoly Sivov <[email protected]>---
- changes for v2:
- add comment from Anatoly Sivov
- fix typo in davinci_emac.txt
- add comment from Grant Likely:
- add prefix "ti,davinci-" to davinci specific property names
- remove version property
- use compatible name "ti,davinci-dm6460-emac"
- usedevm_kzalloc()
- useof_match_ptr()
- document all new properties
- removeof_address_to_resource()and do not overwrite resource table
- whitespace fixes
- removehw_ram_addras it is not used in current board code
- no changes for v3.../bindings/arm/davinci/davinci_emac.txt | 43 +++++++++ drivers/net/ethernet/ti/davinci_emac.c | 94 +++++++++++++++++++- 2 files changed, 136 insertions(+), 1 deletions(-) create mode 100644 Documentation/devicetree/bindings/arm/davinci/davinci_emac.txtDocumentation/devicetree/bindings/arm/davinci/davinci_emac.txt new file +0
-0
Since DaVinci EMAC driver may be used on platforms other than DaVinci (c6x, OMAP), can we place the bindings documentation in bindings/net/?
Documentation/devicetree/bindings/arm/davinci/davinci_emac.txt line 4
Quoted 5 lines
Documentation/devicetree/bindings/arm/davinci/davinci_emac.txt new file +4
-0@@ -0,0 +1,43 @@ +* Texas Instruments Davinci EMAC + +This file provides information, what the device node +for the davinci_emac interface contain.
s/contain/contains
Documentation/devicetree/bindings/arm/davinci/davinci_emac.txt line 7
Quoted 3 lines
Documentation/devicetree/bindings/arm/davinci/davinci_emac.txt new file +3
-0+ +Required properties: +- compatible: "ti,davinci-dm6460-emac";
There is no device called dm6460. If you intend to only support "version 2" of the EMAC IP at this time, you can use dm6467
(http://www.ti.com/product/tms320dm6467)
Quoted 75 lines
Documentation/devicetree/bindings/arm/davinci/davinci_emac.txt new file +36
-0+- reg: Offset and length of the register set for the device +- ti,davinci-ctrl-reg-offset: offset to control register +- ti,davinci-ctrl-mod-reg-offset: offset to control module register +- ti,davinci-ctrl-ram-offset: offset to control module ram +- ti,davinci-ctrl-ram-size: size of control module ram +- ti,davinci-rmii-en: use RMII +- ti,davinci-no-bd-ram: has the emac controller BD RAM +- phy-handle: Contains a phandle to an Ethernet PHY. + if not, davinci_emac driver defaults to 100/FULL +- interrupts: interrupt mapping for the davinci emac interrupts sources: + 4 sources: <Receive Threshold Interrupt + Receive Interrupt + Transmit Interrupt + Miscellaneous Interrupt> +- pinmux-handle: Contains a handle to configure the pinmux settings. + +Optional properties: +- local-mac-address : 6 bytes, mac address + +Example (enbw_cmc board): + eth0: emac at 1e20000 { + compatible = "ti,davinci-dm6460-emac"; + reg = <0x220000 0x4000>; + ti,davinci-ctrl-reg-offset = <0x3000>; + ti,davinci-ctrl-mod-reg-offset = <0x2000>; + ti,davinci-ctrl-ram-offset = <0>; + ti,davinci-ctrl-ram-size = <0x2000>; + local-mac-address = [ 00 00 00 00 00 00 ]; + interrupts = <33 + 34 + 35 + 36 + >; + interrupt-parent = <&intc>; + pinmux-handle = <&emac_pins>; + };drivers/net/ethernet/ti/davinci_emac.c +17
-0@@ -58,6 +58,12 @@#include <linux/io.h> #include <linux/uaccess.h> #include <linux/davinci_emac.h> +#include <linux/of.h> +#include <linux/of_address.h> +#include <linux/of_irq.h> +#include <linux/of_net.h> + +#include <mach/mux.h> #include <asm/irq.h> #include <asm/page.h> @@ -339,6 +345,9 @@ struct emac_priv {u32 rx_addr_type;atomic_t cur_tx;const char *phy_id; +#ifdef CONFIG_OF +struct device_node *phy_node; +#endif struct phy_device *phydev;spinlock_t lock;/*platform specific members*/ @@ -1760,6 +1769,82 @@ static const struct net_device_ops emac_netdev_ops = {#endif }; +#ifdef CONFIG_OF +static struct emac_platform_data + *davinci_emac_of_get_pdata (struct platform_device *pdev, +struct emac_priv *priv) +{ +struct device_node *np; +struct device_node *pinmux_np; +struct emac_platform_data *pdata =NULL ;
drivers/net/ethernet/ti/davinci_emac.c static const struct net_device_ops emac_netdev_ops = { · line 1789
Quoted 10 lines
drivers/net/ethernet/ti/davinci_emac.c +10
-0+const u8 *mac_addr; +u32 data; +int ret; +int version; + + np = pdev->dev.of_node; +if (!np) + goto nodata; +else + version =EMAC_VERSION_2 ;
You could set pdata->version directly here.
Quoted 35 lines
drivers/net/ethernet/ti/davinci_emac.c +35
-0+ + pdata = pdev->dev.platform_data; +if (!pdata) { + pdata =devm_kzalloc (&pdev->dev,sizeof (*pdata),GFP_KERNEL ); +if (!pdata) + goto nodata; + } + pdata->version = version; + + mac_addr =of_get_mac_address (np); +if (mac_addr) +memcpy (pdata->mac_addr, mac_addr,ETH_ALEN ); + + ret =of_property_read_u32 (np,"ti,davinci-ctrl-reg-offset" , &data); +if (!ret) + pdata->ctrl_reg_offset = data; + + ret =of_property_read_u32 (np,"ti,davinci-ctrl-mod-reg-offset" , + &data); +if (!ret) + pdata->ctrl_mod_reg_offset = data; + + ret =of_property_read_u32 (np,"ti,davinci-ctrl-ram-offset" , &data); +if (!ret) + pdata->ctrl_ram_offset = data; + + ret =of_property_read_u32 (np,"ti,davinci-ctrl-ram-size" , &data); +if (!ret) + pdata->ctrl_ram_size = data; + + ret =of_property_read_u32 (np,"ti,davinci-rmii-en" , &data); +if (!ret) + pdata->rmii_en = data; + + ret =of_property_read_u32 (np,"ti,davinci-no-bd-ram" , &data);
drivers/net/ethernet/ti/davinci_emac.c static const struct net_device_ops emac_netdev_ops = { · line 1834
Quoted 10 lines
drivers/net/ethernet/ti/davinci_emac.c +10
-0+if (!ret) + pdata->no_bd_ram = data; + + priv->phy_node =of_parse_phandle (np,"phy-handle" ,0 ); +if (!priv->phy_node) + pdata->phy_id ="" ; + + pinmux_np =of_parse_phandle (np,"pinmux-handle" ,0 ); +if (pinmux_np) +davinci_cfg_reg_of (pinmux_np);
This is a DaVinci specific pinmux function and this driver can be used in non-DaVinci platforms like C6x and OMAP. So, it will not be correct to call a DaVinci specific function here.
Can you drop the pinmux from this patch for now? On DaVinci, for pinmux, we need to migrate to drivers/pinctrl/ as well.
Doing this will also make this patch independent of the rest of this series can even be merged separately. Can you please make these changes and resend just this patch?
Quoted 26 lines
drivers/net/ethernet/ti/davinci_emac.c +14
-1+ + pdev->dev.platform_data = pdata; +nodata: + return pdata; +} +#else +static struct emac_platform_data + *davinci_emac_of_get_pdata (struct platform_device *pdev, +struct emac_priv *priv) +{ +return pdev->dev.platform_data; +} +#endif /** * davinci_emac_probe: EMAC device probe * @pdev: The DaVinci EMAC device that we are removing @@ -1803,7 +1888,7 @@ static int __devinit davinci_emac_probe(struct platform_device *pdev)spin_lock_init (&priv->lock); - pdata = pdev->dev.platform_data; + pdata =davinci_emac_of_get_pdata (pdev, priv);if (!pdata) {dev_err (&pdev->dev,"no platform data\n" ); rc = -ENODEV ;
drivers/net/ethernet/ti/davinci_emac.c static const struct dev_pm_ops davinci_emac_pm_ops = { · line 2102
Quoted 5 lines
drivers/net/ethernet/ti/davinci_emac.c +2
-0@@ -2013,6 +2098,12 @@ static const struct dev_pm_ops davinci_emac_pm_ops = { .resume = davinci_emac_resume, }; +static const struct of_device_id davinci_emac_of_match[] = { + {.compatible ="ti,davinci-dm6460-emac" , },
This needs to be ti,davinci-dm6467-emac as well.
Thanks,
Sekhar
Re: [PATCH v3 4/7] ARM: davinci: net: davinci_emac: add OF support
Hello Nori,
thanks for the review!
Quoted 38 lines · Sekhar
Hi Heiko,
Quoted 35 lines · Heiko Schocher
add of support for the
davinci_emacdriver.Signed-off-by Heiko Schocher <[email protected]>Cc davinci-linux-open-source at linux.davincidsp.comCc linux-arm-kernel at lists.infradead.orgCc devicetree-discuss at lists.ozlabs.orgCc netdev at vger.kernel.orgCc Grant Likely <[email protected]>Cc Sekhar Nori <[email protected]>Cc Wolfgang Denk <[email protected]>Cc Anatoly Sivov <[email protected]>---
- changes for v2:
- add comment from Anatoly Sivov
- fix typo in davinci_emac.txt
- add comment from Grant Likely:
- add prefix "ti,davinci-" to davinci specific property names
- remove version property
- use compatible name "ti,davinci-dm6460-emac"
- usedevm_kzalloc()
- useof_match_ptr()
- document all new properties
- removeof_address_to_resource()and do not overwrite resource table
- whitespace fixes
- removehw_ram_addras it is not used in current board code
- no changes for v3.../bindings/arm/davinci/davinci_emac.txt | 43 +++++++++ drivers/net/ethernet/ti/davinci_emac.c | 94 +++++++++++++++++++- 2 files changed, 136 insertions(+), 1 deletions(-) create mode 100644 Documentation/devicetree/bindings/arm/davinci/davinci_emac.txt
Quoted 8 lines
Documentation/devicetree/bindings/arm/davinci/davinci_emac.txt
Quoted 5 lines
Documentation/devicetree/bindings/arm/davinci/davinci_emac.txt new file +0
-0Since DaVinci EMAC driver may be used on platforms other than DaVinci (c6x, OMAP), can we place the bindings documentation in bindings/net/?
Done.
Quoted 7 lines
Documentation/devicetree/bindings/arm/davinci/davinci_emac.txt line 4
Quoted 5 lines
Documentation/devicetree/bindings/arm/davinci/davinci_emac.txt new file +4
-0@@ -0,0 +1,43 @@ +* Texas Instruments Davinci EMAC + +This file provides information, what the device node +for the davinci_emac interface contain.s/contain/contains
fixed.
Quoted 7 lines
Documentation/devicetree/bindings/arm/davinci/davinci_emac.txt line 7
Quoted 3 lines
Documentation/devicetree/bindings/arm/davinci/davinci_emac.txt new file +3
-0+ +Required properties: +- compatible: "ti,davinci-dm6460-emac";There is no device called dm6460. If you intend to only support "version 2" of the EMAC IP at this time, you can use dm6467
(http://www.ti.com/product/tms320dm6467)
renamed to "ti,davinci-dm6467-emac"
Quoted 7 lines
Quoted 7 lines
Documentation/devicetree/bindings/arm/davinci/davinci_emac.txt new file +7
-0+- reg: Offset and length of the register set for the device +- ti,davinci-ctrl-reg-offset: offset to control register +- ti,davinci-ctrl-mod-reg-offset: offset to control module register +- ti,davinci-ctrl-ram-offset: offset to control module ram +- ti,davinci-ctrl-ram-size: size of control module ram +- ti,davinci-rmii-en: use RMII +- ti,davinci-no-bd-ram: has the emac controller BD RAM
Quoted 8 lines
Documentation/devicetree/bindings/arm/davinci/davinci_emac.txt line 22
Quoted 8 lines
Documentation/devicetree/bindings/arm/davinci/davinci_emac.txt new file +8
-0+- phy-handle: Contains a phandle to an Ethernet PHY. + if not, davinci_emac driver defaults to 100/FULL +- interrupts: interrupt mapping for the davinci emac interrupts sources: + 4 sources: <Receive Threshold Interrupt + Receive Interrupt + Transmit Interrupt + Miscellaneous Interrupt> +- pinmux-handle: Contains a handle to configure the pinmux settings.
removed.
Quoted 12 lines
Quoted 12 lines
Documentation/devicetree/bindings/arm/davinci/davinci_emac.txt new file +12
-0+ +Optional properties: +- local-mac-address : 6 bytes, mac address + +Example (enbw_cmc board): + eth0: emac at 1e20000 { + compatible = "ti,davinci-dm6460-emac"; + reg = <0x220000 0x4000>; + ti,davinci-ctrl-reg-offset = <0x3000>; + ti,davinci-ctrl-mod-reg-offset = <0x2000>; + ti,davinci-ctrl-ram-offset = <0>; + ti,davinci-ctrl-ram-size = <0x2000>;
Quoted 8 lines
Documentation/devicetree/bindings/arm/davinci/davinci_emac.txt line 42
Quoted 8 lines
Documentation/devicetree/bindings/arm/davinci/davinci_emac.txt new file +8
-0+ local-mac-address = [ 00 00 00 00 00 00 ]; + interrupts = <33 + 34 + 35 + 36 + >; + interrupt-parent = <&intc>; + pinmux-handle = <&emac_pins>;
removed.
Quoted 44 lines
Quoted 44 lines
Documentation/devicetree/bindings/arm/davinci/davinci_emac.txt new file +1
-0+ };drivers/net/ethernet/ti/davinci_emac.c +21
-0@@ -58,6 +58,12 @@#include <linux/io.h> #include <linux/uaccess.h> #include <linux/davinci_emac.h> +#include <linux/of.h> +#include <linux/of_address.h> +#include <linux/of_irq.h> +#include <linux/of_net.h> + +#include <mach/mux.h> #include <asm/irq.h> #include <asm/page.h> @@ -339,6 +345,9 @@ struct emac_priv {u32 rx_addr_type;atomic_t cur_tx;const char *phy_id; +#ifdef CONFIG_OF +struct device_node *phy_node; +#endif struct phy_device *phydev;spinlock_t lock;/*platform specific members*/ @@ -1760,6 +1769,82 @@ static const struct net_device_ops emac_netdev_ops = {#endif }; +#ifdef CONFIG_OF +static struct emac_platform_data + *davinci_emac_of_get_pdata (struct platform_device *pdev, +struct emac_priv *priv) +{ +struct device_node *np; +struct device_node *pinmux_np; +struct emac_platform_data *pdata =NULL ; +const u8 *mac_addr; +u32 data; +int ret; +int version;
Quoted 8 lines
drivers/net/ethernet/ti/davinci_emac.c static const struct net_device_ops emac_netdev_ops = { · line 1789
Quoted 6 lines
drivers/net/ethernet/ti/davinci_emac.c +6
-0+ + np = pdev->dev.of_node; +if (!np) + goto nodata; +else + version =EMAC_VERSION_2 ;You could set
pdata->versiondirectly here.
done.
Quoted 42 lines
Quoted 42 lines
drivers/net/ethernet/ti/davinci_emac.c +42
-0+ + pdata = pdev->dev.platform_data; +if (!pdata) { + pdata =devm_kzalloc (&pdev->dev,sizeof (*pdata),GFP_KERNEL ); +if (!pdata) + goto nodata; + } + pdata->version = version; + + mac_addr =of_get_mac_address (np); +if (mac_addr) +memcpy (pdata->mac_addr, mac_addr,ETH_ALEN ); + + ret =of_property_read_u32 (np,"ti,davinci-ctrl-reg-offset" , &data); +if (!ret) + pdata->ctrl_reg_offset = data; + + ret =of_property_read_u32 (np,"ti,davinci-ctrl-mod-reg-offset" , + &data); +if (!ret) + pdata->ctrl_mod_reg_offset = data; + + ret =of_property_read_u32 (np,"ti,davinci-ctrl-ram-offset" , &data); +if (!ret) + pdata->ctrl_ram_offset = data; + + ret =of_property_read_u32 (np,"ti,davinci-ctrl-ram-size" , &data); +if (!ret) + pdata->ctrl_ram_size = data; + + ret =of_property_read_u32 (np,"ti,davinci-rmii-en" , &data); +if (!ret) + pdata->rmii_en = data; + + ret =of_property_read_u32 (np,"ti,davinci-no-bd-ram" , &data); +if (!ret) + pdata->no_bd_ram = data; + + priv->phy_node =of_parse_phandle (np,"phy-handle" ,0 ); +if (!priv->phy_node) + pdata->phy_id ="" ; +
Quoted 8 lines
drivers/net/ethernet/ti/davinci_emac.c static const struct net_device_ops emac_netdev_ops = { · line 1834
Quoted 3 lines
drivers/net/ethernet/ti/davinci_emac.c +3
-0+ pinmux_np =of_parse_phandle (np,"pinmux-handle" ,0 ); +if (pinmux_np) +davinci_cfg_reg_of (pinmux_np);This is a DaVinci specific pinmux function and this driver can be used in non-DaVinci platforms like C6x and OMAP. So, it will not be correct to call a DaVinci specific function here.
Ah, right!
Quoted 1 line
Can you drop the pinmux from this patch for now? On DaVinci,
Done ... Hmm.. so I think, I should drop this for all patches from my patchset, right?
Quoted 1 line
for pinmux, we need to migrate to
drivers/pinctrl/as well.
Ah, I see ... take a look at it, maybe I find time to do here something ... or do you know about work in progress here?
Quoted 3 lines
Doing this will also make this patch independent of the rest of this series can even be merged separately. Can you please make these changes and resend just this patch?
Yep, I do some test with the changes you requested and resend this patch ... do you prefer some tree, which I should use as base?
Quoted 29 lines
Quoted 29 lines
drivers/net/ethernet/ti/davinci_emac.c +14
-1+ + pdev->dev.platform_data = pdata; +nodata: + return pdata; +} +#else +static struct emac_platform_data + *davinci_emac_of_get_pdata (struct platform_device *pdev, +struct emac_priv *priv) +{ +return pdev->dev.platform_data; +} +#endif /** * davinci_emac_probe: EMAC device probe * @pdev: The DaVinci EMAC device that we are removing @@ -1803,7 +1888,7 @@ static int __devinit davinci_emac_probe(struct platform_device *pdev)spin_lock_init (&priv->lock); - pdata = pdev->dev.platform_data; + pdata =davinci_emac_of_get_pdata (pdev, priv);if (!pdata) {dev_err (&pdev->dev,"no platform data\n" ); rc = -ENODEV ;@@ -2013,6 +2098,12 @@ static const struct dev_pm_ops davinci_emac_pm_ops = { .resume = davinci_emac_resume, };
Quoted 4 lines
drivers/net/ethernet/ti/davinci_emac.c static const struct dev_pm_ops davinci_emac_pm_ops = { · line 2102
Quoted 2 lines
drivers/net/ethernet/ti/davinci_emac.c +2
-0+static const struct of_device_id davinci_emac_of_match[] = { + {.compatible ="ti,davinci-dm6460-emac" , },This needs to be ti,davinci-dm6467-emac as well.
Yep, fixed.
bye,
Heiko
Signature · 3 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Re: [PATCH v3 4/7] ARM: davinci: net: davinci_emac: add OF support
Quoted 24 lines · Heiko Schocher
Quoted 14 lines · Sekhar
Quoted 12 lines · Heiko Schocher
drivers/net/ethernet/ti/davinci_emac.c +12
-0+#ifdef CONFIG_OF +static struct emac_platform_data + *davinci_emac_of_get_pdata (struct platform_device *pdev, +struct emac_priv *priv) +{ +struct device_node *np; +struct device_node *pinmux_np; +struct emac_platform_data *pdata =NULL ; +const u8 *mac_addr; +u32 data; +int ret; +int version;Quoted 8 lines
drivers/net/ethernet/ti/davinci_emac.c static const struct net_device_ops emac_netdev_ops = { · line 1789
Quoted 6 lines
drivers/net/ethernet/ti/davinci_emac.c +6
-0+ + np = pdev->dev.of_node; +if (!np) + goto nodata; +else + version =EMAC_VERSION_2 ;You could set
pdata->versiondirectly here.
Quoted 1 line
done.
Just noticed that pdata is not setup at this time. I guess you will be moving around some code to do this.
Quoted 10 lines
Quoted 9 lines
drivers/net/ethernet/ti/davinci_emac.c static const struct net_device_ops emac_netdev_ops = { · line 1834
Quoted 4 lines
drivers/net/ethernet/ti/davinci_emac.c +4
-0+ + pinmux_np =of_parse_phandle (np,"pinmux-handle" ,0 ); +if (pinmux_np) +davinci_cfg_reg_of (pinmux_np);This is a DaVinci specific pinmux function and this driver can be used in non-DaVinci platforms like C6x and OMAP. So, it will not be correct to call a DaVinci specific function here.
Quoted 6 lines
Ah, right!
Quoted 1 line
Can you drop the pinmux from this patch for now? On DaVinci,
Done ... Hmm.. so I think, I should drop this for all patches from my patchset, right?
Yes.
Quoted 5 lines
Quoted 2 lines
for pinmux, we need to migrate to
drivers/pinctrl/as well.Ah, I see ... take a look at it, maybe I find time to do here something ... or do you know about work in progress here?
There is no work in progress within TI. So, if you are interested in taking a stab it it, it will be great.
Quoted 8 lines
Quoted 4 lines
Doing this will also make this patch independent of the rest of this series can even be merged separately. Can you please make these changes and resend just this patch?
Yep, I do some test with the changes you requested and resend this patch ... do you prefer some tree, which I should use as base?
This one should ideally merge through the network subsystem so may be base it on the net-next tree?
http://git.kernel.org/?p=linux/kernel/git/davem/net-next.git;a=summary
Thanks,
Sekhar
PATCH v3 5/7 ARM: davinci: i2c: add OF support
In reply to Heiko Schocheradd of support for the davinci i2c driver.
---
- changes for v2:
- add comments from Sylwester Nawrocki <[email protected]>:
- use "cell-index" instead "id"
- OF_DEV_AUXDATA in the machine code, instead pre-define platform device name
- add comment from Grant Likely:
- removed "id" resp. "cell-index" completely
- fixed documentation
- use of_match_ptr()
- use devm_kzalloc() for allocating plattform data mem
- fixed a whitespace issue
- no changes for v3
.../devicetree/bindings/arm/davinci/i2c.txt | 33 +++++++++++++++++ drivers/i2c/busses/i2c-davinci.c | 37 ++++++++++++++++++++ 2 files changed, 70 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/arm/davinci/i2c.txt
Documentation/devicetree/bindings/arm/davinci/i2c.txt new file +33 -0
@@ -0,0 +1,33 @@ +* Texas Instruments Davinci I2C + +This file provides information, what the device node for the +davinci i2c interface contain. + +Required properties: +- compatible: "ti,davinci-i2c"; +- reg : Offset and length of the register set for the device + +Recommended properties : +- interrupts : <a> standard interrupt property. +- clock-frequency : desired I2C bus clock frequency in Hz. + +Optional properties: +- bus-delay: bus delay in usec +- pinmux-handle: Contains a handle to configure the pinmux settings. + +Example (enbw_cmc board): + i2c at 1c22000 { + compatible = "ti,davinci-i2c"; + reg = <0x22000 0x1000>; + clock-frequency = <100000>; + interrupts = <15>; + interrupt-parent = <&intc>; + pinmux-handle = <&i2c1_pins>; + #address-cells = <1>; + #size-cells = <0>; + + dtt at 48 { + compatible = "national,lm75"; + reg = <0x48>; + }; + };
drivers/i2c/busses/i2c-davinci.c +37 -0
@@ -38,9 +38,12 @@#include <linux/slab.h> #include <linux/cpufreq.h> #include <linux/gpio.h> +#include <linux/of_i2c.h> +#include <linux/of_device.h> #include <mach/hardware.h> #include <mach/i2c.h> +#include <mach/mux.h> /* ----- global defines ----------------------------------------------- */
@@ -635,6 +638,12 @@ static struct i2c_algorithm i2c_davinci_algo = { .functionality = i2c_davinci_func, }; +static const struct of_device_id davinci_i2c_of_match[] = { + {.compatible ="ti,davinci-i2c" , }, + {}, +}; +MODULE_DEVICE_TABLE (of, davinci_i2c_of_match); +static int davinci_i2c_probe (struct platform_device *pdev) {struct davinci_i2c_dev *dev;
@@ -676,6 +685,31 @@ static int davinci_i2c_probe(struct platform_device *pdev) dev->irq = irq->start;platform_set_drvdata (pdev, dev); +if ((dev->dev->platform_data ==NULL ) && + (pdev->dev.of_node)) { +struct device_node *pinmux_np; +struct davinci_i2c_platform_data *pdata; +u32 prop; + + pdata =devm_kzalloc (&pdev->dev,sizeof (*pdata),GFP_KERNEL ); +if (!pdata) { + r = -ENOMEM ; + goto err_free_mem; + } +memcpy (pdata, &davinci_i2c_platform_data_default, +sizeof (*pdata)); + dev->dev->platform_data = pdata; +if (!of_property_read_u32 (pdev->dev.of_node,"clock-frequency" , + &prop)) + pdata->bus_freq = prop /1000 ; +if (!of_property_read_u32 (pdev->dev.of_node,"bus-delay" , + &prop)) + pdata->bus_delay = prop; + pinmux_np =of_parse_phandle (pdev->dev.of_node, +"pinmux-handle" ,0 ); +if (pinmux_np) +davinci_cfg_reg_of (pinmux_np); + } dev->clk =clk_get (&pdev->dev,NULL );if (IS_ERR (dev->clk)) { r = -ENODEV ;
@@ -711,6 +745,7 @@ static int davinci_i2c_probe(struct platform_device *pdev) adap->algo = &i2c_davinci_algo; adap->dev.parent = &pdev->dev; adap->timeout =DAVINCI_I2C_TIMEOUT ; + adap->dev.of_node = pdev->dev.of_node; adap->nr = pdev->id; r =i2c_add_numbered_adapter (adap);
@@ -718,6 +753,7 @@ static int davinci_i2c_probe(struct platform_device *pdev)dev_err (&pdev->dev,"failure adding adapter\n" ); goto err_free_irq; } +of_i2c_register_devices (adap);return 0 ;
@@ -809,6 +845,7 @@ static struct platform_driver davinci_i2c_driver = { .name = "i2c_davinci", .owner = THIS_MODULE, .pm = davinci_i2c_pm_ops, + .of_match_table = of_match_ptr(davinci_i2c_of_match), }, };
Signature · 1 line
1.7.7.6
PATCH v3 6/7 ARM: mtd: nand: davinci: add OF support for davinci nand controller
In reply to Heiko Schocheradd OF support for the davinci nand controller.
---
- changes for v2:
- add comments from Scott Wood:
- add "ti,davinci-" prefix
- Dashes are preferred to underscores
- rename "nandflash" to "nand"
- introduce new "ti,davinci" specific properties for setting up ecc_mode, ecc_bits, options and bbt options, instead using linux defines
- readme fixes
- no changes for v3
.../devicetree/bindings/arm/davinci/nand.txt | 74 +++++++++++++++++ drivers/mtd/nand/davinci_nand.c | 85 +++++++++++++++++++- 2 files changed, 158 insertions(+), 1 deletions(-) create mode 100644 Documentation/devicetree/bindings/arm/davinci/nand.txt
Documentation/devicetree/bindings/arm/davinci/nand.txt new file +74 -0
@@ -0,0 +1,74 @@ +* Texas Instruments Davinci NAND + +This file provides information, what the device node for the +davinci nand interface contain. + +Required properties: +- compatible: "ti,davinci-nand"; +- reg : contain 2 offset/length values: + - offset and length for the access window + - offset and length for accessing the aemif control registers +- ti,davinci-chipselect: Indicates on the davinci_nand driver which + chipselect is used for accessing the nand. + +Recommended properties : +- ti,davinci-mask-ale: mask for ale +- ti,davinci-mask-cle: mask for cle +- ti,davinci-mask-chipsel: mask for chipselect +- ti,davinci-ecc-mode: ECC mode valid values for davinci driver: + - "none" + - "soft" + - "hw" +- ti,davinci-ecc-bits: used ECC bits, currently supported 1 or 4. +- ti,davinci-nand-buswidth: buswidth 8 or 16 +- ti,davinci-nand-use-bbt: use flash based bad block table support. + +Optional properties: +- pinmux-handle: contains a handle to configure the pinmux settings. +- timing-handle: contains a handle to setup aemif timing. + +Example (enbw_cmc board): +aemif at 60000000 { + compatible = "ti,davinci-aemif"; + #address-cells = <2>; + #size-cells = <1>; + reg = <0x68000000 0x80000>; + ranges = <2 0 0x60000000 0x02000000 + 3 0 0x62000000 0x02000000 + 4 0 0x64000000 0x02000000 + 5 0 0x66000000 0x02000000 + 6 0 0x68000000 0x02000000>; + nand_cs: cs3 at 68000000 { + compatible = "ti,davinci-cs"; + #address-cells = <1>; + #size-cells = <1>; + /* all timings in nanoseconds */ + cs = <3>; + asize = <0>; + ta = <0>; + rhold = <7>; + rstrobe = <42>; + rsetup = <7>; + whold = <7>; + wstrobe = <14>; + wsetup = <7>; + ew = <0>; + ss = <0>; + }; + nand at 3,0 { + compatible = "ti,davinci-nand"; + reg = <3 0x0 0x807ff + 6 0x0 0x8000>; + #address-cells = <1>; + #size-cells = <1>; + ti,davinci-chipselect = <1>; + ti,davinci-mask-ale = <0>; + ti,davinci-mask-cle = <0>; + ti,davinci-mask-chipsel = <0>; + ti,davinci-ecc-mode = "hw"; + ti,davinci-ecc-bits = <4>; + ti,davinci-nand-use-bbt; + pinmux-handle = <&nand_pins>; + timing-handle = <&nand_cs>; + }; +};
drivers/mtd/nand/davinci_nand.c +84 -1
114 lines not on this page · raw message
Signature · 1 line
1.7.7.6
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH v3 7/7 ARM: davinci: add support for the am1808 based enbw_cmc board
- AM1808 based board
- 64 MiB DDR ram
- 2 MiB Nor flash
- 128 MiB NAND flash
- use internal RTC
- I2C support
- hwmon lm75 support
- UBI/UBIFS support
- MMC support
- USB OTG support
---
- post this board support with USB support, even though USB is only working with the 10 ms "workaround", posted here:
http://comments.gmane.org/gmane.linux.usb.general/54505
I see this issue also on the AM1808 TMDXEXP1808L evalboard.
- MMC and USB are not using OF support yet, ideas how to port this are welcome. I need for USB and MMC boards board specific callbacks, how to solve this with OF support?
- changes for v2:
- changes in the nand node due to comments from Scott Wood:
- add "ti,davinci-" prefix
- Dashes are preferred to underscores
- rename "nandflash" to "nand"
- introduce new "ti,davinci" specific properties for setting up ecc_mode, ecc_bits, options and bbt options, instead using linux defines
- changes for i2c due to comments from Sylwester Nawrocki:
- use "cell-index" instead "id"
- OF_DEV_AUXDATA in the machine code, instead pre-define platform device name
- add comment from Grant Likely for i2c:
- removed "id" resp. "cell-index" completely
- fixed documentation
- use of_match_ptr()
- use devm_kzalloc() for allocating plattform data mem
- fixed a whitespace issue
- add net comments from Grant Likely:
- add prefix "ti,davinci-" to davinci specific property names
- remove version property
- use compatible name "ti,davinci-dm6460-emac"
- add comment from Grant Likely:
- rename compatible node
- do not use cell-index
- CONFIG_OF required for this board
TODO:
- create a generic board support file, as I got no answer to my ping to grant, maybe this could be done in a second step?
- changes for v3:
- add comments from Sergei Shtylyov:
- rename compatible" prop to "ti,cp_intc"
- cp_intc_init now used for Interrupt controller init
arch/arm/boot/dts/enbw_cmc.dts | 268 ++++++++++++++++ arch/arm/configs/enbw_cmc_defconfig | 123 ++++++++ arch/arm/mach-davinci/Kconfig | 9 + arch/arm/mach-davinci/Makefile | 1 + arch/arm/mach-davinci/board-enbw-cmc.c | 380 +++++++++++++++++++++++ arch/arm/mach-davinci/include/mach/uncompress.h | 1 + 6 files changed, 782 insertions(+), 0 deletions(-) create mode 100644 arch/arm/boot/dts/enbw_cmc.dts create mode 100644 arch/arm/configs/enbw_cmc_defconfig create mode 100644 arch/arm/mach-davinci/board-enbw-cmc.c
arch/arm/boot/dts/enbw_cmc.dts new file +268 -0
@@ -0,0 +1,268 @@ +/* + * Device Tree for the EnBW CMC plattform + * + * Copyright 2011 DENX Software Engineering GmbH + * Heiko Schocher <[email protected]> + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ +/dts-v1/; +/include/ "skeleton.dtsi" + +/ { + model = "EnBW CMC"; + compatible = "enbw,cmc"; + + aliases { + ethernet0 = ð0; + }; + + arm { + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0xfffee000 0x00020000>; + intc: interrupt-controller at 1 { + compatible = "ti,cp_intc"; + interrupt-controller; + #interrupt-cells = <1>; + ti,intc-size = <101>; + reg = <0x0 0x2000>; + }; + }; + soc at 1c00000 { + compatible = "ti,da850"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x01c00000 0x400000>; + + serial0: serial at 1c42000 { + compatible = "ti,da850", "ns16550a"; + reg = <0x42000 0x100>; + clock-frequency = <150000000>; + reg-shift = <2>; + interrupts = <25>; + interrupt-parent = <&intc>; + }; + serial1: serial at 1d0c000 { + compatible = "ti,da850", "ns16550a"; + reg = <0x10c000 0x100>; + clock-frequency = <150000000>; + reg-shift = <2>; + interrupts = <53>; + interrupt-parent = <&intc>; + }; + serial2: serial at 1d0d000 { + compatible = "ti,da850", "ns16550a"; + reg = <0x10d000 0x100>; + clock-frequency = <150000000>; + reg-shift = <2>; + interrupts = <61>; + interrupt-parent = <&intc>; + }; + + nor_pins: nor_pinmux at 1c14120 { + compatible = "ti,davinci-pinmux"; + reg = <0x14120 0x1000>; + pins = < /* muxreg maskoff modemsk muxmode */ + 5 24 15 1 /* EMA_BA_1 */ + 6 0 15 1 /* EMA CLK */ + 6 24 15 1 /* EMA_WAIT_1 */ + 7 0 15 1 /* NEMA_CS_2 */ + 7 16 15 1 /* NEMA_WE */ + 7 20 15 1 /* NEMA_OE */ + 9 28 15 1 /* EMA_D_0 */ + 9 24 15 1 /* EMA_D_1 */ + 9 20 15 1 /* EMA_D_2 */ + 9 16 15 1 /* EMA_D_3 */ + 9 12 15 1 /* EMA_D_4 */ + 9 8 15 1 /* EMA_D_5 */ + 9 4 15 1 /* EMA_D_6 */ + 9 0 15 1 /* EMA_D_7 */ + 8 28 15 1 /* EMA_D_8 */ + 8 24 15 1 /* EMA_D_9 */ + 8 20 15 1 /* EMA_D_10 */ + 8 16 15 1 /* EMA_D_11 */ + 8 12 15 1 /* EMA_D_12 */ + 8 8 15 1 /* EMA_D_13 */ + 8 4 15 1 /* EMA_D_14 */ + 8 0 15 1 /* EMA_D_15 */ + 12 28 15 1 /* EMA_A_0 */ + 12 24 15 1 /* EMA_A_1 */ + 12 20 15 1 /* EMA_A_2 */ + 12 16 15 1 /* EMA_A_3 */ + 12 12 15 1 /* EMA_A_4 */ + 12 8 15 1 /* EMA_A_5 */ + 12 4 15 1 /* EMA_A_6 */ + 12 0 15 1 /* EMA_A_7 */ + 11 28 15 1 /* EMA_A_8 */ + 11 24 15 1 /* EMA_A_9 */ + 11 20 15 1 /* EMA_A_10 */ + 11 16 15 1 /* EMA_A_11 */ + 11 12 15 1 /* EMA_A_12 */ + 11 8 15 1 /* EMA_A_13 */ + 11 4 15 1 /* EMA_A_14 */ + 11 0 15 1 /* EMA_A_15 */ + 10 28 15 1 /* EMA_A_16 */ + 10 24 15 1 /* EMA_A_17 */ + 10 20 15 1 /* EMA_A_18 */ + 10 16 15 1 /* EMA_A_19 */ + 10 12 15 1 /* EMA_A_20 */ + 10 8 15 1 /* EMA_A_21 */ + 10 4 15 1 /* EMA_A_22 */ + 10 0 15 1 /* EMA_A_23 */ + >; + }; + nand_pins: nand_pinmux at 1c14120 { + compatible = "ti,davinci-pinmux"; + reg = <0x14120 0x1000>; + pins = < /* muxreg maskoff modemsk muxmode */ + 7 4 15 1 /* NEMA_CS_3 */ + >; + }; + + emac_pins: pinmux at 1c14120 { + compatible = "ti,davinci-pinmux"; + reg = <0x14120 0x1000>; + pins = < /* muxreg maskoff modemsk muxmode */ + 2 4 15 8 /* MII TXEN */ + 2 8 15 8 /* MII TXCLK */ + 2 12 15 8 /* MII COL */ + 2 16 15 8 /* MII TXD_3 */ + 2 20 15 8 /* MII TXD_2 */ + 2 24 15 8 /* MII TXD_1 */ + 2 28 15 8 /* MII TXD_0 */ + 3 8 15 8 /* MII RXER */ + 3 12 15 8 /* MII CRS */ + 3 0 15 8 /* MII RXCLK */ + 3 4 15 8 /* MII RXDV */ + 3 16 15 8 /* MII RXD_3 */ + 3 20 15 8 /* MII RXD_2 */ + 3 24 15 8 /* MII RXD_1 */ + 3 28 15 8 /* MII RXD_0 */ + 4 0 15 8 /* MDIO CLK */ + 4 4 15 8 /* MDIO D */ + >; + }; + + i2c1_pins: i2c_pinmux at 1c14120 { + compatible = "ti,davinci-pinmux"; + reg = <0x14120 0x1000>; + pins = < /* muxreg maskoff modemsk muxmode */ + 4 12 15 2 /* I2C0 SDA */ + 4 8 15 2 /* I2C0 SCL */ + >; + }; + + eth0: emac at 1e20000 { + compatible = "ti,davinci-dm6460-emac"; + reg = <0x220000 0x4000>; + ti,davinci-ctrl-reg-offset = <0x3000>; + ti,davinci-ctrl-mod-reg-offset = <0x2000>; + ti,davinci-ctrl-ram-offset = <0>; + ti,davinci-ctrl-ram-size = <0x2000>; + local-mac-address = [ 00 00 00 00 00 00 ]; + interrupts = <33 + 34 + 35 + 36 + >; + interrupt-parent = <&intc>; + pinmux-handle = <&emac_pins>; + }; + + i2c at 1c22000 { + compatible = "ti,davinci-i2c"; + reg = <0x22000 0x1000>; + clock-frequency = <100000>; + interrupts = <15>; + interrupt-parent = <&intc>; + pinmux-handle = <&i2c1_pins>; + #address-cells = <1>; + #size-cells = <0>; + + dtt at 48 { + compatible = "national,lm75"; + reg = <0x48>; + }; + }; + }; + onchipram at 8000000 { + compatible = "ti,davinci-onchipram"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x80000000 0x20000>; + }; + aemif at 60000000 { + compatible = "ti,davinci-aemif"; + #address-cells = <2>; + #size-cells = <1>; + reg = <0x68000000 0x80000>; + ranges = <2 0 0x60000000 0x02000000 + 3 0 0x62000000 0x02000000 + 4 0 0x64000000 0x02000000 + 5 0 0x66000000 0x02000000 + 6 0 0x68000000 0x02000000>; + cs2 at 68000000 { + compatible = "ti,davinci-cs"; + #address-cells = <1>; + #size-cells = <1>; + /* all timings in nanoseconds */ + cs = <2>; + asize = <1>; + ta = <0>; + rhold = <7>; + rstrobe = <42>; + rsetup = <14>; + whold = <7>; + wstrobe = <42>; + wsetup = <14>; + ew = <0>; + ss = <0>; + }; + flash at 2,0 { + compatible = "cfi-flash"; + reg = <2 0x0 0x400000>; + #address-cells = <1>; + #size-cells = <1>; + bank-width = <2>; + device-width = <2>; + }; + nand_cs: cs3 at 68000000 { + compatible = "ti,davinci-cs"; + #address-cells = <1>; + #size-cells = <1>; + /* all timings in nanoseconds */ + cs = <3>; + asize = <0>; + ta = <0>; + rhold = <7>; + rstrobe = <42>; + rsetup = <7>; + whold = <7>; + wstrobe = <14>; + wsetup = <7>; + ew = <0>; + ss = <0>; + }; + nand at 3,0 { + compatible = "ti,davinci-nand"; + reg = <3 0x0 0x807ff + 6 0x0 0x8000>; + #address-cells = <1>; + #size-cells = <1>; + ti,davinci-chipselect = <1>; + ti,davinci-mask-ale = <0>; + ti,davinci-mask-cle = <0>; + ti,davinci-mask-chipsel = <0>; + ti,davinci-ecc-mode = "hw"; + ti,davinci-ecc-bits = <4>; + ti,davinci-nand-use-bbt; + pinmux-handle = <&nand_pins>; + timing-handle = <&nand_cs>; + }; + + }; +};
arch/arm/configs/enbw_cmc_defconfig new file +123 -0
123 lines not on this page · raw message
arch/arm/mach-davinci/Kconfig +9 -0
@@ -202,6 +202,15 @@ config DA850_WL12XX Say Y if you want to use a wl1271 expansion card connected to the AM18x EVM. +config MACH_ENBW_CMC + bool "EnBW Communication Module Compact" + default ARCH_DAVINCI_DA850 + depends on ARCH_DAVINCI_DA850 + select OF + help + Say Y here to select the EnBW Communication Module Compact + board. + config GPIO_PCA953X default MACH_DAVINCI_DA850_EVM
arch/arm/mach-davinci/Makefile +1 -0
@@ -34,6 +34,7 @@ obj-$(CONFIG_MACH_DAVINCI_DA850_EVM) += board-da850-evm.o obj-$(CONFIG_MACH_TNETV107X) += board-tnetv107x-evm.o obj-$(CONFIG_MACH_MITYOMAPL138) += board-mityomapl138.o obj-$(CONFIG_MACH_OMAPL138_HAWKBOARD) += board-omapl138-hawk.o +obj-$(CONFIG_MACH_ENBW_CMC) += board-enbw-cmc.o # Power Management obj-$(CONFIG_CPU_FREQ) += cpufreq.o
arch/arm/mach-davinci/board-enbw-cmc.c new file +380 -0
380 lines not on this page · raw message
arch/arm/mach-davinci/include/mach/uncompress.h +1 -0
@@ -96,6 +96,7 @@ static inline void __arch_decomp_setup(unsigned long arch_id)DEBUG_LL_DA8XX (davinci_da850_evm,2 );DEBUG_LL_DA8XX (mityomapl138,1 );DEBUG_LL_DA8XX (omapl138_hawkboard,2 ); +DEBUG_LL_DA8XX (enbw_cmc,2 );/* TNETV107x boards */ DEBUG_LL_TNETV107X (tnetv107x,1 );
Signature · 1 line
1.7.7.6
Hello,
this v3 patchset is now pending for more than 1 month without seeing comments for it. Are there no more issues?
Should I rebase it (if no further comments occur), as it is pending so long? (If so, against which tree?)
Thanks.
bye,
Heiko
Quoted 128 lines · Heiko Schocher
This patchserie add support for the davinci am1808 based
enbw_cmcboard.Important: I rebased this patchserie against the irqdomain/next branch from grant likely, as he suggested to rework the OF intcontroller changes to the irqdomain work, branch found here:
http://git.secretlab.ca/?p=linux-2.6.git;a=shortlog;h=refs/heads/irqdomain/next
git://git.secretlab.ca/git/linux-2.6.gitirqdomain/nextcommit
280ad7fda5f95211857fda38960f2b6fdf6edd3e
Author: Grant Likely <[email protected]>
Date: Fri Feb 24 14:58:54 2012 -0700mfd: twl-core: Add
IRQ_DOMAINdependencychanges for v2:
Post this patchserie now as v2, as reworked in the comments I got for the RFC serie.changes for v3:
- Interrupt Controller:
- comment from Sergei Shtylyov:
- rename compatible" prop to "ti,cp_intc"
-cp_intc_init()is now also for the of case the name of the init function (it calls the "new"__cp_intc_init()function, which was the "old"cp_intc_init()). Through this rework the changes for OF is better visible. As the OF case uses theirq_domainrework from Grant Likely, maybe the none OF case can use this also, but this should be tested on a hw ...Got no comments to the following points, I noted in the RFC series, so posting this patchseries with them:
- ARM: davinci: configure davinci aemif chipselects through OF not moved to mfd, as mentioned in this discussion:
http://davinci-linux-open-source.1494791.n2.nabble.com/PATCH-arm-davinci-configure-davinci-aemif-chipselects-through-OF-td7059739.html
instead use a phandle in the DTS, so drivers which uses the davinci aemif, can calldavinci_aemif_setup_timing_of()This is just thought as an RFC ... The
enbw_cmcboard support not really need to setup this bus timings, as they are setup in U-Boot ... but I want to post this, as I think, it is a nice to have, and I am not really sure, if this has to be a MFD device (If so, all bus interfaces for other SoCs should be converted also to MFD devices) ... as an example how this can be used I add this to the davinci nand controller OF support patch, in this patchserie.- ARM: davinci: mux: add OF support
I want to get rid of the pin setup code in board code ... This patch introduces adavinci_cfg_reg_of()function, which davinci drivers can call, if they found a "pinmux-handle", so used in the following drivers in this patchserie:
drivers/net/ethernet/ti/davinci_emac
drivers/i2c/busses/i2c-davinci.c
drivers/mtd/nand/davinci_nand.c- post this board support with USB support, even though USB is only working with the 10 ms "workaround", posted here:
http://comments.gmane.org/gmane.linux.usb.general/54505
I see this issue also on the AM1808 TMDXEXP1808L evalboard.- MMC and USB are not using OF support yet, ideas how to port this are welcome. I need for USB and MMC board specific callbacks, how to solve this with OF support?
Signed-off-by Heiko Schocher <[email protected]>Cc linux-arm-kernel at lists.infradead.orgCc devicetree-discuss at lists.ozlabs.orgCc davinci-linux-open-source at linux.davincidsp.comCc linux-mtd at lists.infradead.orgCc linux-i2c at vger.kernel.orgCc netdev at vger.kernel.orgCc David Woodhouse <[email protected]>Cc Ben Dooks <[email protected]>Cc Wolfram Sang <[email protected]>Cc Sekhar Nori <[email protected]>Cc Kevin Hilman <[email protected]>Cc Wolfgang Denk <[email protected]>Cc Sergei Shtylyov <[email protected]>Heiko Schocher (7):
ARM: davinci, intc: Add OF support for TI interrupt controller
ARM: davinci: configure davinci aemif chipselects through OF
ARM: davinci: mux: add OF support
ARM: davinci: net:davinci_emac: add OF support
ARM: davinci: i2c: add OF support
ARM: mtd: nand: davinci: add OF support for davinci nand controller
ARM: davinci: add support for the am1808 basedenbw_cmcboard.../devicetree/bindings/arm/davinci/aemif.txt | 119 ++++++ .../bindings/arm/davinci/davinci_emac.txt | 43 +++ .../devicetree/bindings/arm/davinci/i2c.txt | 33 ++ .../devicetree/bindings/arm/davinci/intc.txt | 27 ++ .../devicetree/bindings/arm/davinci/mux.txt | 40 ++ .../devicetree/bindings/arm/davinci/nand.txt | 74 ++++ arch/arm/boot/dts/enbw_cmc.dts | 268 ++++++++++++++ arch/arm/configs/enbw_cmc_defconfig | 123 +++++++ arch/arm/mach-davinci/Kconfig | 9 + arch/arm/mach-davinci/Makefile | 1 + arch/arm/mach-davinci/aemif.c | 86 +++++- arch/arm/mach-davinci/board-enbw-cmc.c | 380 ++++++++++++++++++++ arch/arm/mach-davinci/cp_intc.c | 87 ++++- arch/arm/mach-davinci/include/mach/aemif.h | 1 + arch/arm/mach-davinci/include/mach/mux.h | 2 + arch/arm/mach-davinci/include/mach/uncompress.h | 1 + arch/arm/mach-davinci/mux.c | 73 ++++- drivers/i2c/busses/i2c-davinci.c | 37 ++ drivers/mtd/nand/davinci_nand.c | 85 +++++- drivers/net/ethernet/ti/davinci_emac.c | 94 +++++- 20 files changed, 1569 insertions(+), 14 deletions(-) create mode 100644 Documentation/devicetree/bindings/arm/davinci/aemif.txt create mode 100644 Documentation/devicetree/bindings/arm/davinci/davinci_emac.txt create mode 100644 Documentation/devicetree/bindings/arm/davinci/i2c.txt create mode 100644 Documentation/devicetree/bindings/arm/davinci/intc.txt create mode 100644 Documentation/devicetree/bindings/arm/davinci/mux.txt create mode 100644 Documentation/devicetree/bindings/arm/davinci/nand.txt create mode 100644 arch/arm/boot/dts/enbw_cmc.dts create mode 100644 arch/arm/configs/enbw_cmc_defconfig create mode 100644 arch/arm/mach-davinci/board-enbw-cmc.c
Signature · 3 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi Heiko,
Quoted 4 lines · Heiko Schocher
Hello,
this v3 patchset is now pending for more than 1 month without seeing comments for it. Are there no more issues?
I am yet to get to them. I have mostly cleared my backlog and will be looking into these next. Sorry about the delay.
Quoted 2 lines
Should I rebase it (if no further comments occur), as it is pending so long? (If so, against which tree?)
The series touches multiple subsystems, so may be each patch will go through individual subsystem maintainer.
Also copying Grant and Rob as device tree maintainers.
Thanks,
Sekhar
Quoted 136 lines
Thanks.
bye,
HeikoQuoted 128 lines · Heiko Schocher
This patchserie add support for the davinci am1808 based
enbw_cmcboard.Important: I rebased this patchserie against the irqdomain/next branch from grant likely, as he suggested to rework the OF intcontroller changes to the irqdomain work, branch found here:
http://git.secretlab.ca/?p=linux-2.6.git;a=shortlog;h=refs/heads/irqdomain/next
git://git.secretlab.ca/git/linux-2.6.gitirqdomain/nextcommit
280ad7fda5f95211857fda38960f2b6fdf6edd3e
Author: Grant Likely <[email protected]>
Date: Fri Feb 24 14:58:54 2012 -0700mfd: twl-core: Add
IRQ_DOMAINdependencychanges for v2:
Post this patchserie now as v2, as reworked in the comments I got for the RFC serie.changes for v3:
- Interrupt Controller:
- comment from Sergei Shtylyov:
- rename compatible" prop to "ti,cp_intc"
-cp_intc_init()is now also for the of case the name of the init function (it calls the "new"__cp_intc_init()function, which was the "old"cp_intc_init()). Through this rework the changes for OF is better visible. As the OF case uses theirq_domainrework from Grant Likely, maybe the none OF case can use this also, but this should be tested on a hw ...Got no comments to the following points, I noted in the RFC series, so posting this patchseries with them:
- ARM: davinci: configure davinci aemif chipselects through OF not moved to mfd, as mentioned in this discussion:
http://davinci-linux-open-source.1494791.n2.nabble.com/PATCH-arm-davinci-configure-davinci-aemif-chipselects-through-OF-td7059739.html
instead use a phandle in the DTS, so drivers which uses the davinci aemif, can calldavinci_aemif_setup_timing_of()This is just thought as an RFC ... The
enbw_cmcboard support not really need to setup this bus timings, as they are setup in U-Boot ... but I want to post this, as I think, it is a nice to have, and I am not really sure, if this has to be a MFD device (If so, all bus interfaces for other SoCs should be converted also to MFD devices) ... as an example how this can be used I add this to the davinci nand controller OF support patch, in this patchserie.- ARM: davinci: mux: add OF support
I want to get rid of the pin setup code in board code ... This patch introduces adavinci_cfg_reg_of()function, which davinci drivers can call, if they found a "pinmux-handle", so used in the following drivers in this patchserie:
drivers/net/ethernet/ti/davinci_emac
drivers/i2c/busses/i2c-davinci.c
drivers/mtd/nand/davinci_nand.c- post this board support with USB support, even though USB is only working with the 10 ms "workaround", posted here:
http://comments.gmane.org/gmane.linux.usb.general/54505
I see this issue also on the AM1808 TMDXEXP1808L evalboard.- MMC and USB are not using OF support yet, ideas how to port this are welcome. I need for USB and MMC board specific callbacks, how to solve this with OF support?
Signed-off-by Heiko Schocher <[email protected]>Cc linux-arm-kernel at lists.infradead.orgCc devicetree-discuss at lists.ozlabs.orgCc davinci-linux-open-source at linux.davincidsp.comCc linux-mtd at lists.infradead.orgCc linux-i2c at vger.kernel.orgCc netdev at vger.kernel.orgCc David Woodhouse <[email protected]>Cc Ben Dooks <[email protected]>Cc Wolfram Sang <[email protected]>Cc Sekhar Nori <[email protected]>Cc Kevin Hilman <[email protected]>Cc Wolfgang Denk <[email protected]>Cc Sergei Shtylyov <[email protected]>Heiko Schocher (7):
ARM: davinci, intc: Add OF support for TI interrupt controller
ARM: davinci: configure davinci aemif chipselects through OF
ARM: davinci: mux: add OF support
ARM: davinci: net:davinci_emac: add OF support
ARM: davinci: i2c: add OF support
ARM: mtd: nand: davinci: add OF support for davinci nand controller
ARM: davinci: add support for the am1808 basedenbw_cmcboard.../devicetree/bindings/arm/davinci/aemif.txt | 119 ++++++ .../bindings/arm/davinci/davinci_emac.txt | 43 +++ .../devicetree/bindings/arm/davinci/i2c.txt | 33 ++ .../devicetree/bindings/arm/davinci/intc.txt | 27 ++ .../devicetree/bindings/arm/davinci/mux.txt | 40 ++ .../devicetree/bindings/arm/davinci/nand.txt | 74 ++++ arch/arm/boot/dts/enbw_cmc.dts | 268 ++++++++++++++ arch/arm/configs/enbw_cmc_defconfig | 123 +++++++ arch/arm/mach-davinci/Kconfig | 9 + arch/arm/mach-davinci/Makefile | 1 + arch/arm/mach-davinci/aemif.c | 86 +++++- arch/arm/mach-davinci/board-enbw-cmc.c | 380 ++++++++++++++++++++ arch/arm/mach-davinci/cp_intc.c | 87 ++++- arch/arm/mach-davinci/include/mach/aemif.h | 1 + arch/arm/mach-davinci/include/mach/mux.h | 2 + arch/arm/mach-davinci/include/mach/uncompress.h | 1 + arch/arm/mach-davinci/mux.c | 73 ++++- drivers/i2c/busses/i2c-davinci.c | 37 ++ drivers/mtd/nand/davinci_nand.c | 85 +++++- drivers/net/ethernet/ti/davinci_emac.c | 94 +++++- 20 files changed, 1569 insertions(+), 14 deletions(-) create mode 100644 Documentation/devicetree/bindings/arm/davinci/aemif.txt create mode 100644 Documentation/devicetree/bindings/arm/davinci/davinci_emac.txt create mode 100644 Documentation/devicetree/bindings/arm/davinci/i2c.txt create mode 100644 Documentation/devicetree/bindings/arm/davinci/intc.txt create mode 100644 Documentation/devicetree/bindings/arm/davinci/mux.txt create mode 100644 Documentation/devicetree/bindings/arm/davinci/nand.txt create mode 100644 arch/arm/boot/dts/enbw_cmc.dts create mode 100644 arch/arm/configs/enbw_cmc_defconfig create mode 100644 arch/arm/mach-davinci/board-enbw-cmc.c