From: jon-hunter@ti.com (Jon Hunter)
To: linux-arm-kernel@lists.infradead.org
Subject: [TMP][PATCH 5/5] OMAP3EVM: Test gpmc-nand
Date: Mon, 26 Mar 2012 12:51:50 -0500 [thread overview]
Message-ID: <4F70ACB6.5070208@ti.com> (raw)
In-Reply-To: <1332484630-22181-1-git-send-email-afzal@ti.com>
Hi Afzal,
On 3/23/2012 1:37, Afzal Mohammed wrote:
[snip]
> static void __init omap3_evm_init(void)
> {
> + struct omap_nand_platform_data *nand_data;
> +
> omap3_evm_get_revision();
>
> if (cpu_is_omap3630())
> @@ -684,6 +747,25 @@ static void __init omap3_evm_init(void)
> omap3evm_init_smsc911x();
> omap3_evm_display_init();
> omap3_evm_wl12xx_init();
> + /* NAND */
> + nand_data = omap_nand_init(omap3_evm_nand_partitions,
> + ARRAY_SIZE(omap3_evm_nand_partitions),
> + 0, NAND_BUSWIDTH_16, nand_default_timings);
> + if (nand_data == NULL) {
> + pr_err("omap_nand_init() failed\n");
> + return;
> + }
> +
> + gpmc_data.device_pdata = gpmc_nand_init(nand_data);
> + if (gpmc_data.device_pdata == NULL) {
> + pr_err("gpmc_nand_init() failed\n");
> + return;
> + }
> +
> + gpmc_data.num_device++;
> + gpmc_data.fclk_rate = gpmc_get_fclk_period();
> +
> + platform_device_register(&gpmc_device);
> }
I see this is marked as a temp patch, but this is actually needed to
register the device. Actually, we would need to do this for all boards,
right?
Rather than registering the device here, may be we should add a function
in arch/arm/mach-omap2/devices.c called "omap_gpmc_init()" that is
called from all of the boards files passing the pdata structure. Then
the omap_gmpc_init() function should use omap_device_build() API to
register the device. If you look at arch/arm/mach-omap2/devices.c you
can look at omap4_keyboard_init() as an example. Let me know if this is
clear.
Cheers
Jon
next prev parent reply other threads:[~2012-03-26 17:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-23 6:37 [TMP][PATCH 5/5] OMAP3EVM: Test gpmc-nand Afzal Mohammed
2012-03-26 17:51 ` Jon Hunter [this message]
2012-03-27 5:19 ` Mohammed, Afzal
2012-03-27 5:38 ` Mohammed, Afzal
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=4F70ACB6.5070208@ti.com \
--to=jon-hunter@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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