From: Tony Lindgren <tony@atomide.com>
To: Sukumar Ghorai <s-ghorai@ti.com>
Cc: linux-omap@vger.kernel.org, linux-mtd@lists.infradead.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v5 1/5] omap gpmc: enable irq mode in gpmc
Date: Tue, 28 Sep 2010 15:27:28 -0700 [thread overview]
Message-ID: <20100928222727.GS3117@atomide.com> (raw)
In-Reply-To: <1285594634-19277-2-git-send-email-s-ghorai@ti.com>
* Sukumar Ghorai <s-ghorai@ti.com> [100927 06:30]:
> add support the irq mode in GPMC.
> gpmc_init() function move after omap_init_irq() as it has dependecy on irq.
> --- a/arch/arm/mach-omap2/board-2430sdp.c
> +++ b/arch/arm/mach-omap2/board-2430sdp.c
> @@ -144,6 +144,7 @@ static void __init omap_2430sdp_init_irq(void)
> omap_board_config_size = ARRAY_SIZE(sdp2430_config);
> omap2_init_common_hw(NULL, NULL);
> omap_init_irq();
> + gpmc_init();
> omap_gpio_init();
> }
>
> diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
> index 67b95b5..549cd62 100644
> --- a/arch/arm/mach-omap2/board-3430sdp.c
> +++ b/arch/arm/mach-omap2/board-3430sdp.c
> @@ -328,6 +328,7 @@ static void __init omap_3430sdp_init_irq(void)
> omap3_pm_init_cpuidle(omap3_cpuidle_params_table);
> omap2_init_common_hw(hyb18m512160af6_sdrc_params, NULL);
> omap_init_irq();
> + gpmc_init();
> omap_gpio_init();
> }
...
You can avoid adding gpmc_init() by making it a subsys_initcall().
Just make sure you return early from it with if (!cpu_class_is_omap2()).
> --- a/arch/arm/mach-omap2/gpmc.c
> +++ b/arch/arm/mach-omap2/gpmc.c
> @@ -713,6 +721,31 @@ void __init gpmc_init(void)
> l |= (0x02 << 3) | (1 << 0);
> gpmc_write_reg(GPMC_SYSCONFIG, l);
> gpmc_mem_init();
> +
> + /* 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_flags(irq, IRQF_VALID);
> + irq++;
> + }
> +
> + if (request_irq(20, gpmc_handle_irq, IRQF_SHARED, "gpmc", gpmc_base))
> + printk(KERN_ERR "gpmc: irq-%d could not claim: err %d\n",
> + INT_34XX_GPMC_IRQ, irq);
> +}
Hmm, this does not look right.. Shouldn't you call set_irq_chained_handler()
somewhere too? Also, are you sure the interrupt is 20 for all of mach-omap2?
It should be added to the irqs.h files.
> +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;
> + generic_handle_irq(OMAP_GPMC_IRQ_BASE+cs);
> +
> + return IRQ_HANDLED;
> }
Doesn't doing OMAP_GPMC_IRQ_BASE + cs overlap with some other irq?
Regards,
Tony
next prev parent reply other threads:[~2010-09-28 22:27 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-27 13:37 [PATCH v5 0/5] nand prefetch-irq support and ecc layout chanage Sukumar Ghorai
2010-09-27 13:37 ` [PATCH v5 1/5] omap gpmc: enable irq mode in gpmc Sukumar Ghorai
2010-09-28 22:27 ` Tony Lindgren [this message]
2010-09-29 6:37 ` Ghorai, Sukumar
2010-10-28 14:11 ` Ghorai, Sukumar
2010-11-05 21:12 ` Tony Lindgren
2010-11-16 14:32 ` Ghorai, Sukumar
2010-09-27 13:37 ` [PATCH v5 2/5] omap3: nand: prefetch in irq mode support Sukumar Ghorai
2010-09-28 22:29 ` Tony Lindgren
2010-09-29 6:02 ` Ghorai, Sukumar
2010-09-27 13:37 ` [PATCH v5 3/5] omap3: nand: configurable fifo threshold to gain the throughput Sukumar Ghorai
2010-09-27 13:37 ` [PATCH v5 4/5] omap: nand: ecc layout select from board file Sukumar Ghorai
2010-09-27 13:37 ` [PATCH v5 5/5] omap: nand: making ecc layout as compatible with romcode ecc Sukumar Ghorai
2010-09-27 13:58 ` Premi, Sanjeev
2010-09-27 14:02 ` Ghorai, Sukumar
2010-09-27 14:53 ` uninstall Aggarwal, Anuj
2010-09-27 14:54 ` uninstall Aggarwal, Anuj
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100928222727.GS3117@atomide.com \
--to=tony@atomide.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=s-ghorai@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).