ARM: OMAP2+: AM4372: Add emif hwmod and dt node
Subsystems (6)
cover ARM: OMAP2+: AM4372: Add emif hwmod and dt node
This series adds an hwmod for the emif on am4372. Also, we add a dt node in order to provide the reg address for the hwmod in order to have SYSCONFIG access.
Without the hwmod, once PM code is added for am437x, the emif_clkdm sees no users and may be idled even though we obviously still need it.
Regards,
Dave
Dave Gerlach (2):
ARM: OMAP: AM43xx hwmod: Add data for am43xx emif hwmod
ARM: dts: am4372: Add emif node
.../bindings/memory-controllers/ti/emif.txt | 1 + arch/arm/boot/dts/am4372.dtsi | 6 ++++++ .../mach-omap2/omap_hwmod_33xx_43xx_common_data.h | 1 + .../mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c | 13 +++++++++++++ arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 13 ------------- arch/arm/mach-omap2/omap_hwmod_43xx_data.c | 22 ++++++++++++++++++++++ arch/arm/mach-omap2/prcm43xx.h | 1 + 7 files changed, 44 insertions(+), 13 deletions(-)
Signature · 1 line
2.3.6
PATCH 1/2 ARM: OMAP: AM43xx hwmod: Add data for am43xx emif hwmod
Without a hwmod for am43xx emif use counting for emif clockdomain does not happen correctly so it may be shut off by pm code unintentionally.
--- .../mach-omap2/omap_hwmod_33xx_43xx_common_data.h | 1 + .../mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c | 13 +++++++++++++ arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 13 ------------- arch/arm/mach-omap2/omap_hwmod_43xx_data.c | 22 ++++++++++++++++++++++ arch/arm/mach-omap2/prcm43xx.h | 1 + 5 files changed, 37 insertions(+), 13 deletions(-)
arch/arm/mach-omap2/omap_hwmod_33xx_43xx_common_data.h +1 -0
@@ -145,6 +145,7 @@ extern struct omap_hwmod am33xx_uart5_hwmod;extern struct omap_hwmod am33xx_uart6_hwmod;extern struct omap_hwmod am33xx_wd_timer1_hwmod; +extern struct omap_hwmod_class am33xx_emif_hwmod_class;extern struct omap_hwmod_class am33xx_l4_hwmod_class;extern struct omap_hwmod_class am33xx_wkup_m3_hwmod_class;extern struct omap_hwmod_class am33xx_control_hwmod_class;
arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c +13 -0
@@ -203,6 +203,19 @@ struct omap_hwmod am33xx_prcm_hwmod = { };/* +* 'emif' class +* instance(s): emif +*/ +static struct omap_hwmod_class_sysconfig am33xx_emif_sysc = { + .rev_offs =0x0000 , +}; + +struct omap_hwmod_class am33xx_emif_hwmod_class = { + .name ="emif" , + .sysc = &am33xx_emif_sysc, +}; + +/* * 'aes0' class */ static struct omap_hwmod_class_sysconfig am33xx_aes0_sysc = {
arch/arm/mach-omap2/omap_hwmod_33xx_data.c +0 -13
@@ -34,19 +34,6 @@* IP blocks */ -/* -* 'emif' class -* instance(s): emif -*/ -static struct omap_hwmod_class_sysconfig am33xx_emif_sysc = { - .rev_offs =0x0000 , -}; - -static struct omap_hwmod_class am33xx_emif_hwmod_class = { - .name ="emif" , - .sysc = &am33xx_emif_sysc, -}; -/* emif */ static struct omap_hwmod am33xx_emif_hwmod = { .name ="emif" ,
arch/arm/mach-omap2/omap_hwmod_43xx_data.c +22 -0
@@ -24,6 +24,20 @@/* IP blocks */ +static struct omap_hwmod am43xx_emif_hwmod = { + .name ="emif" , + .class = &am33xx_emif_hwmod_class, + .clkdm_name ="emif_clkdm" , + .flags =HWMOD_INIT_NO_IDLE , + .main_clk ="dpll_ddr_m2_ck" , + .prcm = { + .omap4 = { + .clkctrl_offs =AM43XX_CM_PER_EMIF_CLKCTRL_OFFSET , + .modulemode =MODULEMODE_SWCTRL , + }, + }, +}; +static struct omap_hwmod am43xx_l4_hs_hwmod = { .name ="l4_hs" , .class = &am33xx_l4_hwmod_class,
@@ -545,6 +559,13 @@ static struct omap_hwmod am43xx_hdq1w_hwmod = { };/* Interfaces */ +static struct omap_hwmod_ocp_if am43xx_l3_main__emif = { + .master = &am33xx_l3_main_hwmod, + .slave = &am43xx_emif_hwmod, + .clk ="dpll_core_m4_ck" , + .user =OCP_USER_MPU |OCP_USER_SDMA , +}; +static struct omap_hwmod_ocp_if am43xx_l3_main__l4_hs = { .master = &am33xx_l3_main_hwmod, .slave = &am43xx_l4_hs_hwmod,
@@ -852,6 +873,7 @@ static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = { &am33xx_l3_main__l3_instr, &am33xx_l3_main__gfx, &am33xx_l3_s__l3_main, + &am43xx_l3_main__emif, &am33xx_pruss__l3_main, &am43xx_wkup_m3__l4_wkup, &am33xx_gfx__l3_main,
arch/arm/mach-omap2/prcm43xx.h +1 -0
@@ -144,5 +144,6 @@#define AM43XX_CM_PER_USBPHYOCP2SCP1_CLKCTRL_OFFSET 0x05C0#define AM43XX_CM_PER_DSS_CLKCTRL_OFFSET 0x0a20#define AM43XX_CM_PER_HDQ1W_CLKCTRL_OFFSET 0x04a0 +#define AM43XX_CM_PER_EMIF_CLKCTRL_OFFSET 0x0720#endif
Signature · 1 line
2.3.6
Paul Walmsley
maintainerPATCH 1/2 ARM: OMAP: AM43xx hwmod: Add data for am43xx emif hwmod
Quoted 4 lines · Dave Gerlach
Without a hwmod for am43xx emif use counting for emif clockdomain does not happen correctly so it may be shut off by pm code unintentionally.
Signed-off-by Dave Gerlach <[email protected]>
Thanks, sent upstream for v4.2.
- Paul
PATCH 2/2 ARM: dts: am4372: Add emif node
In reply to Dave GerlachAdd node for TI AM4372 EMIF.
--- Documentation/devicetree/bindings/memory-controllers/ti/emif.txt | 1 + arch/arm/boot/dts/am4372.dtsi | 6 ++++++ 2 files changed, 7 insertions(+)
Documentation/devicetree/bindings/memory-controllers/ti/emif.txt +1 -0
@@ -8,6 +8,7 @@ of the EMIF IP and memory parts attached to it. Required properties: - compatible : Should be of the form "ti,emif-<ip-rev>" where <ip-rev> is the IP revision of the specific EMIF instance. + For am437x should be ti,emif-am4372. - phy-type : <u32> indicating the DDR phy type. Following are the allowed values
arch/arm/boot/dts/am4372.dtsi +6 -0
@@ -132,6 +132,12 @@ }; }; + emif: emif at 4c000000 { + compatible = "ti,emif-am4372"; + reg = <0x4c000000 0x1000000>; + ti,hwmods = "emif"; + }; + edma: edma at 49000000 { compatible = "ti,edma3"; ti,hwmods = "tpcc", "tptc0", "tptc1", "tptc2";
Signature · 1 line
2.3.6
PATCH 2/2 ARM: dts: am4372: Add emif node
Quoted 3 lines · Dave Gerlach
Add node for TI AM4372 EMIF.
Signed-off-by Dave Gerlach <[email protected]>
Tony, this patch fixes the regression I just reported at [1], care to pick this one up ?
[1] http://marc.info/?l=linux-omap&m=143327283632248&w=2
Quoted 41 lines
--- Documentation/devicetree/bindings/memory-controllers/ti/emif.txt | 1 + arch/arm/boot/dts/am4372.dtsi | 6 ++++++ 2 files changed, 7 insertions(+)Documentation/devicetree/bindings/memory-controllers/ti/emif.txt +1
-0@@ -8,6 +8,7 @@ of the EMIF IP and memory parts attached to it. Required properties: - compatible : Should be of the form "ti,emif-<ip-rev>" where <ip-rev> is the IP revision of the specific EMIF instance. + For am437x should be ti,emif-am4372. - phy-type : <u32> indicating the DDR phy type. Following are the allowed valuesarch/arm/boot/dts/am4372.dtsi +6
-0@@ -132,6 +132,12 @@ }; }; + emif: emif at 4c000000 { + compatible = "ti,emif-am4372"; + reg = <0x4c000000 0x1000000>; + ti,hwmods = "emif"; + }; + edma: edma at 49000000 { compatible = "ti,edma3"; ti,hwmods = "tpcc", "tptc0", "tptc1", "tptc2";Signature · 6 lines
2.3.6 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 8 lines
balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150602/1e1410b0/attachment.sig>
Tony Lindgren
maintainerPATCH 2/2 ARM: dts: am4372: Add emif node
Quoted 7 lines · Felipe Balbi
Quoted 3 lines · Dave Gerlach
Add node for TI AM4372 EMIF.
Signed-off-by Dave Gerlach <[email protected]>Tony, this patch fixes the regression I just reported at [1], care to pick this one up ?
OK thanks yes tag this for v4.2 fixes.
Regards,
Tony
Quoted 49 lines
Tested-by Felipe Balbi <[email protected]>Acked-by Felipe Balbi <[email protected]>[1] http://marc.info/?l=linux-omap&m=143327283632248&w=2
Quoted 41 lines
--- Documentation/devicetree/bindings/memory-controllers/ti/emif.txt | 1 + arch/arm/boot/dts/am4372.dtsi | 6 ++++++ 2 files changed, 7 insertions(+)Documentation/devicetree/bindings/memory-controllers/ti/emif.txt +1
-0@@ -8,6 +8,7 @@ of the EMIF IP and memory parts attached to it. Required properties: - compatible : Should be of the form "ti,emif-<ip-rev>" where <ip-rev> is the IP revision of the specific EMIF instance. + For am437x should be ti,emif-am4372. - phy-type : <u32> indicating the DDR phy type. Following are the allowed valuesarch/arm/boot/dts/am4372.dtsi +6
-0@@ -132,6 +132,12 @@ }; }; + emif: emif at 4c000000 { + compatible = "ti,emif-am4372"; + reg = <0x4c000000 0x1000000>; + ti,hwmods = "emif"; + }; + edma: edma at 49000000 { compatible = "ti,edma3"; ti,hwmods = "tpcc", "tptc0", "tptc1", "tptc2";Signature · 6 lines
2.3.6 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.htmlSignature · 1 line
balbi
Tony Lindgren
maintainerPATCH 2/2 ARM: dts: am4372: Add emif node
Quoted 10 lines · Tony Lindgren
Quoted 7 lines · Felipe Balbi
Quoted 3 lines · Dave Gerlach
Add node for TI AM4372 EMIF.
Signed-off-by Dave Gerlach <[email protected]>Tony, this patch fixes the regression I just reported at [1], care to pick this one up ?
OK thanks yes tag this for v4.2 fixes.
With the merge window now over, applying into omap-for-v4.2/fixes.
Tony