Vaibhav Hiremath <hvaibhav@xxxxxx> writes: > This patch removes the existing hard-coded way of providing > offset to omap4_prminst_xxx API's and instead use offsets > provided in powerdomainsxxxx_data. > > Very much required for the new device AM33XX, where, > > PRM module in AM33XX is closer to OMAP4 PRM module, so it makes > complete sense to reuse all the code from existing OMAP4 implementation. > Having said that, ther is a catch here with respect to AM33XX device, > > The register offset in PRM module is not consistent > across (crazy IP integration), for example, > > PRM_XXX PWRSTCTRL PWRSTST RSTCTRL RSTST > =============================================== > PRM_PER_MOD: 0x0C, 0x08, 0x00, 0x04 > PRM_WKUP_MOD: 0x04, 0x08, 0x00, 0x0C > PRM_MPU_MOD: 0x00, 0x04, 0x08, NA > PRM_DEVICE_MOD: NA, NA, 0x00, 0x08 > > So in order to reuse the existing OMAP4 code, we have to add > seperate entry for register offsets, especially > PWRSTCTRL & PWRSTST. > > Signed-off-by: Vaibhav Hiremath <hvaibhav@xxxxxx> > Cc: Kevin Hilman <khilman@xxxxxx> > Cc: Rajendra Nayak <rnayak@xxxxxx> Reviewed-by: Kevin Hilman <khilman@xxxxxx> Minor nit below, but after that, looks OK to me, but this should be reviewed/merged by Paul/Benoit also. [...] > void __init omap44xx_powerdomains_init(void) > { > + int i; > + > pwrdm_register_platform_funcs(&omap4_pwrdm_operations); > + /* Initialise PRM reg offs to default value */ > + for (i = 0; powerdomains_omap44xx[i] != NULL; i++) { > + struct powerdomain *pwrdm = powerdomains_omap44xx[i]; insert blank line here > + pwrdm->pwrstctrl_offs = OMAP4_PM_PWSTCTRL; > + pwrdm->pwrstst_offs = OMAP4_PM_PWSTST; > + } > pwrdm_register_pwrdms(powerdomains_omap44xx); > pwrdm_complete_init(); > } Kevin -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html