Message ID | 1352189545-26303-4-git-send-email-mugunthanvnm@ti.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, Nov 06, 2012 at 13:42:21, N, Mugunthan V wrote: [...] > +struct omap_hwmod_addr_space am33xx_mdio_addr_space[] = { > + { > + .pa_start = 0x4A101000, > + .pa_end = 0x4A101000 + SZ_256 - 1, > + .flags = ADDR_MAP_ON_INIT, Based on the recent discussions and looking the hwmod code, I guess ADDR_MAP_ON_INIT does not make sense here. Since you are just creating a parent-child relationship here, maybe no flag is needed? > + }, > + { } > +}; > + > +struct omap_hwmod_ocp_if am33xx_cpgmac0__mdio = { > + .master = &am33xx_cpgmac0_hwmod, > + .slave = &am33xx_mdio_hwmod, > + .addr = am33xx_mdio_addr_space, > + .user = OCP_USER_MPU, Is this flag necessary? Shouldn't you just skip the user field since there's nothing for the hwmod code to do here? Regards, Vaibhav
On 11/6/2012 3:39 PM, Bedia, Vaibhav wrote: > On Tue, Nov 06, 2012 at 13:42:21, N, Mugunthan V wrote: > [...] >> +struct omap_hwmod_addr_space am33xx_mdio_addr_space[] = { >> + { >> + .pa_start = 0x4A101000, >> + .pa_end = 0x4A101000 + SZ_256 - 1, >> + .flags = ADDR_MAP_ON_INIT, > Based on the recent discussions and looking the hwmod code, > I guess ADDR_MAP_ON_INIT does not make sense here. Since you > are just creating a parent-child relationship here, maybe no > flag is needed? > >> + }, >> + { } >> +}; >> + >> +struct omap_hwmod_ocp_if am33xx_cpgmac0__mdio = { >> + .master = &am33xx_cpgmac0_hwmod, >> + .slave = &am33xx_mdio_hwmod, >> + .addr = am33xx_mdio_addr_space, >> + .user = OCP_USER_MPU, > Is this flag necessary? Shouldn't you just skip the > user field since there's nothing for the hwmod code > to do here? > > Will remove the unnecessary flags and submit the patch. Regards Mugunthan V N
On 11/6/2012 3:39 PM, Bedia, Vaibhav wrote: > On Tue, Nov 06, 2012 at 13:42:21, N, Mugunthan V wrote: > [...] >> +struct omap_hwmod_addr_space am33xx_mdio_addr_space[] = { >> + { >> + .pa_start = 0x4A101000, >> + .pa_end = 0x4A101000 + SZ_256 - 1, >> + .flags = ADDR_MAP_ON_INIT, > Based on the recent discussions and looking the hwmod code, > I guess ADDR_MAP_ON_INIT does not make sense here. Since you > are just creating a parent-child relationship here, maybe no > flag is needed? Will remove this flag as it is a parrent-child relationship > >> + }, >> + { } >> +}; >> + >> +struct omap_hwmod_ocp_if am33xx_cpgmac0__mdio = { >> + .master = &am33xx_cpgmac0_hwmod, >> + .slave = &am33xx_mdio_hwmod, >> + .addr = am33xx_mdio_addr_space, >> + .user = OCP_USER_MPU, > Is this flag necessary? Shouldn't you just skip the > user field since there's nothing for the hwmod code > to do here? This flag is necessary as MPU is going to access to device. The patch will look like @@ -2501,6 +2516,21 @@ static struct omap_hwmod_ocp_if am33xx_l4_hs__cpgmac0 = { .user = OCP_USER_MPU, }; +struct omap_hwmod_addr_space am33xx_mdio_addr_space[] = { + { + .pa_start = 0x4A101000, + .pa_end = 0x4A101000 + SZ_256 - 1, + }, + { } +}; + +struct omap_hwmod_ocp_if am33xx_cpgmac0__mdio = { + .master = &am33xx_cpgmac0_hwmod, + .slave = &am33xx_mdio_hwmod, + .addr = am33xx_mdio_addr_space, + .user = OCP_USER_MPU, +}; + static struct omap_hwmod_addr_space am33xx_elm_addr_space[] = { { .pa_start = 0x48080000, Regards Mugunthan V N
diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c index 59d5c1c..b3f9ce4 100644 --- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c @@ -674,6 +674,7 @@ static struct omap_hwmod am33xx_cpgmac0_hwmod = { .name = "cpgmac0", .class = &am33xx_cpgmac0_hwmod_class, .clkdm_name = "cpsw_125mhz_clkdm", + .flags = (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY), .mpu_irqs = am33xx_cpgmac0_irqs, .main_clk = "cpsw_125mhz_gclk", .prcm = { @@ -685,6 +686,20 @@ static struct omap_hwmod am33xx_cpgmac0_hwmod = { }; /* + * mdio class + */ +static struct omap_hwmod_class am33xx_mdio_hwmod_class = { + .name = "davinci_mdio", +}; + +static struct omap_hwmod am33xx_mdio_hwmod = { + .name = "davinci_mdio", + .class = &am33xx_mdio_hwmod_class, + .clkdm_name = "cpsw_125mhz_clkdm", + .main_clk = "cpsw_125mhz_gclk", +}; + +/* * dcan class */ static struct omap_hwmod_class am33xx_dcan_hwmod_class = { @@ -2501,6 +2516,22 @@ static struct omap_hwmod_ocp_if am33xx_l4_hs__cpgmac0 = { .user = OCP_USER_MPU, }; +struct omap_hwmod_addr_space am33xx_mdio_addr_space[] = { + { + .pa_start = 0x4A101000, + .pa_end = 0x4A101000 + SZ_256 - 1, + .flags = ADDR_MAP_ON_INIT, + }, + { } +}; + +struct omap_hwmod_ocp_if am33xx_cpgmac0__mdio = { + .master = &am33xx_cpgmac0_hwmod, + .slave = &am33xx_mdio_hwmod, + .addr = am33xx_mdio_addr_space, + .user = OCP_USER_MPU, +}; + static struct omap_hwmod_addr_space am33xx_elm_addr_space[] = { { .pa_start = 0x48080000, @@ -3371,6 +3402,7 @@ static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = { &am33xx_l3_main__tptc2, &am33xx_l3_s__usbss, &am33xx_l4_hs__cpgmac0, + &am33xx_cpgmac0__mdio, NULL, };