linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* GPMC in HWMOD (and a related AM335X issue)
@ 2012-02-09 12:29 Afzal Mohammed
  2012-02-10  2:51 ` Cousson, Benoit
  0 siblings, 1 reply; 3+ messages in thread
From: Afzal Mohammed @ 2012-02-09 12:29 UTC (permalink / raw)
  To: linux-omap; +Cc: hvaibhav, nsekhar, Afzal Mohammed

Hi,

OMAP HWMOD currently does not have GPMC adapted to it.

We are facing a problem indirectly related to it in the case of
AM335X SoC. It can reuse GPMC code of OMAP except that base address
& IRQ# is different. But we get a kernel crash without
(at least) following change

-------------------------------------------------------------------
    arm:omap:gpmc: am33xx base address

    GPMC base address of AM335X SoC is same as that of OMAP44XX,
    update it (eventhough AM33XX is a member of OMAP34XX family)
    Without this change, Kernel would crash for AM335X

diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index dfffbbf..4ee2e90 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -711,7 +711,10 @@ static int __init gpmc_init(void)
                gpmc_irq = INT_34XX_GPMC_IRQ;
        } else if (cpu_is_omap34xx()) {
                ck = "gpmc_fck";
-               l = OMAP34XX_GPMC_BASE;
+               if (cpu_is_am33xx())
+                       l = OMAP44XX_GPMC_BASE;
+               else
+                       l = OMAP34XX_GPMC_BASE;
                gpmc_irq = INT_34XX_GPMC_IRQ;
        } else if (cpu_is_omap44xx()) {
                ck = "gpmc_ck";
-------------------------------------------------------------------

But the above is not sufficient, even the IRQ # has to be changed
And for that we need to feed the proper IRQ # too. Now if it was a
HWMOD device, we could have passed it in HWMOD database & it would
have been taken care. Other option is to have a new AM335X specific
IRQ header file (which, if my understanding is correct, we can't get
into mainline as HWMOD is present for OMAP & due to DT things)

HWMOD entries currently does contain GPMC, is it due to the reason that
GPMC is not yet adapted to omap_device / omap_hwmod or is there any
other reason for not having it in HWMOD (as GPMC not yet a driver?)

Regards
Afzal

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-02-10 15:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-09 12:29 GPMC in HWMOD (and a related AM335X issue) Afzal Mohammed
2012-02-10  2:51 ` Cousson, Benoit
2012-02-10 15:42   ` Mohammed, Afzal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).