OMAP850 RTC and MMC registers differ from other OMAP1, how to implement?
Hi Alistair,
I'm also doing a bit of work with the omap850 for my htc wizard.
Has anything happened with the rtc patches lately? I haven't seen anything show up in linux-omap git, but I might have missed them.
If not, can you please post them ? I don't mind implementing the omap1 compatibiity pointed out by Russell & Tony [1].
Cheers,
Chris
[1] http://www.mail-archive.com/[email protected]/msg16701.html
Quoted 34 lines · Alistair Buxton
Hi,
I'm working on OMAP850 support. I have found that OMAP 15xx and 16xx have 32 bit registers, while 730 and 850 have 8 bit RTC registers and 16 bit MMC registers. At the moment I work around this using #defines as such:
#if (
defined(CONFIG_ARCH_OMAP730)||defined(CONFIG_ARCH_OMAP850)) #defineOMAP_RTC_SECONDS_REG0x00
...
#defineOMAP_RTC_OSC_REG0x19
#else
#defineOMAP_RTC_SECONDS_REG0x00
...
#defineOMAP_RTC_OSC_REG0x54
#endifI have been told that this isn't a good way to handle it because the same binary kernel has to work on all OMAP1 machines. So this has to be checked for at run time. We can check that with
cpu_is_omap7xx()but what would be the correct way to actually implement this? I could do something like this:#define
OMAP_RTC_REGISTER_SIZE(cpu_is_omap7xx()?1:4) #defineOMAP_RTC_OSC_REG(0x19*OMAP_RTC_REGISTER_SIZE)Would that be acceptable? If not, how should I do it? Is there an existing driver that does something similar I could look at?
Thanks,
--
Alistair Buxton
[email protected]
Quoted 5 lines
-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php
--
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