"DebBarma, Tarun Kanti" <[email protected]> writes:
> Kevin,
> [...]
>> >
>> > With register offsets now defined for respective OMAP versions we can
>> get rid
>> > of cpu_class_* checks. In addition, organized common initialization for
>> the
>> > different OMAP silicon versions.
>> >
>> > Signed-off-by: Charulatha V <[email protected]>
>> > Signed-off-by: Tarun Kanti DebBarma <[email protected]>
>>
>> Since the SYSCONFIG register settings are OMAP1-only and init-time only,
>> they could be done in the OMAP1-specific init functions.
> BTW, I needed some more clarifications here...
> The omap_gpio_mod_init() is called only once from _probe().
> So, does it make sense to have a separate init function?
> If yes, I have to call __init omap1_gpio_mod_init() from _probe() again.
> This is because I need the bank information supplied to it.
What I was thinking is something like the patch below (16xx only for
example, but would need to be done for other OMAP1 also). This patch
will obviously not work, but read the comment in the patch to make it work.
Kevin
diff --git a/arch/arm/mach-omap1/gpio16xx.c b/arch/arm/mach-omap1/gpio16xx.c
index c69b3b1..1d34a4c 100644
--- a/arch/arm/mach-omap1/gpio16xx.c
+++ b/arch/arm/mach-omap1/gpio16xx.c
@@ -218,8 +218,12 @@ static int __init omap16xx_gpio_init(void)
if (!cpu_is_omap16xx())
return -EINVAL;
- for (i = 0; i < ARRAY_SIZE(omap16xx_gpio_dev); i++)
+ for (i = 0; i < ARRAY_SIZE(omap16xx_gpio_dev); i++) {
+ u32 base = 0; /* get base from device's struct resource */
+
+ __raw_writew(0x0014, base + OMAP1610_GPIO_SYSCONFIG);
platform_device_register(omap16xx_gpio_dev[i]);
+ }
gpio_bank_count = ARRAY_SIZE(omap16xx_gpio_dev);
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html