Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 242933
b: refs/heads/master
c: 77aded2
h: refs/heads/master
i:
  242931: db4f6d1
v: v3
  • Loading branch information
Balaji T K authored and Tony Lindgren committed Mar 19, 2011
1 parent 49e362e commit 9f2efd5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8b8e2ef328c3378c74fb4347f66df8e58feeaf46
refs/heads/master: 77aded2f523c6540f71b1f549373dd8046329a6b
13 changes: 8 additions & 5 deletions trunk/arch/arm/mach-omap2/gpmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,7 @@ static int __init gpmc_init(void)
{
u32 l, irq;
int cs, ret = -EINVAL;
int gpmc_irq;
char *ck = NULL;

if (cpu_is_omap24xx()) {
Expand All @@ -701,12 +702,15 @@ static int __init gpmc_init(void)
l = OMAP2420_GPMC_BASE;
else
l = OMAP34XX_GPMC_BASE;
gpmc_irq = INT_34XX_GPMC_IRQ;
} else if (cpu_is_omap34xx()) {
ck = "gpmc_fck";
l = OMAP34XX_GPMC_BASE;
gpmc_irq = INT_34XX_GPMC_IRQ;
} else if (cpu_is_omap44xx()) {
ck = "gpmc_ck";
l = OMAP44XX_GPMC_BASE;
gpmc_irq = OMAP44XX_IRQ_GPMC;
}

if (WARN_ON(!ck))
Expand Down Expand Up @@ -739,16 +743,17 @@ static int __init gpmc_init(void)
/* initalize the irq_chained */
irq = OMAP_GPMC_IRQ_BASE;
for (cs = 0; cs < GPMC_CS_NUM; cs++) {
set_irq_handler(irq, handle_simple_irq);
set_irq_chip_and_handler(irq, &dummy_irq_chip,
handle_simple_irq);
set_irq_flags(irq, IRQF_VALID);
irq++;
}

ret = request_irq(INT_34XX_GPMC_IRQ,
ret = request_irq(gpmc_irq,
gpmc_handle_irq, IRQF_SHARED, "gpmc", gpmc_base);
if (ret)
pr_err("gpmc: irq-%d could not claim: err %d\n",
INT_34XX_GPMC_IRQ, ret);
gpmc_irq, ret);
return ret;
}
postcore_initcall(gpmc_init);
Expand All @@ -757,8 +762,6 @@ static irqreturn_t gpmc_handle_irq(int irq, void *dev)
{
u8 cs;

if (irq != INT_34XX_GPMC_IRQ)
return IRQ_HANDLED;
/* check cs to invoke the irq */
cs = ((gpmc_read_reg(GPMC_PREFETCH_CONFIG1)) >> CS_NUM_SHIFT) & 0x7;
if (OMAP_GPMC_IRQ_BASE+cs <= OMAP_GPMC_IRQ_END)
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/plat-omap/include/plat/irqs.h
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@

/* GPMC related */
#define OMAP_GPMC_IRQ_BASE (TWL_IRQ_END)
#define OMAP_GPMC_NR_IRQS 7
#define OMAP_GPMC_NR_IRQS 8
#define OMAP_GPMC_IRQ_END (OMAP_GPMC_IRQ_BASE + OMAP_GPMC_NR_IRQS)


Expand Down

0 comments on commit 9f2efd5

Please sign in to comment.