From: Kevin Hilman <khilman@deeprootsystems.com>
To: Syed Rafiuddin <rafiuddin.syed@ti.com>
Cc: linux-omap@vger.kernel.org
Subject: Re: [RESUBMIT][PATCH][RFC] OMAP4: McSPI Support for OMAP_4430
Date: Thu, 25 Jun 2009 09:45:12 -0700 [thread overview]
Message-ID: <873a9os1nr.fsf@deeprootsystems.com> (raw)
In-Reply-To: <51412.192.168.10.89.1245911089.squirrel@dbdmail.itg.ti.com> (Syed Rafiuddin's message of "Thu\, 25 Jun 2009 11\:54\:49 +0530 \(IST\)")
"Syed Rafiuddin" <rafiuddin.syed@ti.com> writes:
> This patch adds McSPI support for OMAP4430 SDP platform. All the base addresses
> are changed between OMAP1/2/3 and OMAP4.The fields of the resource structures
> are filled at runtime to have McSPI support on OMAP4.
>
> Signed-off-by: Syed Rafiuddin <rafiuddin.syed@ti.com>
This driver needs some help for multi-omap, but that problem existed
before this patch, so
Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
> ---
> arch/arm/mach-omap2/devices.c | 25 +++++++++++++++++++++----
> drivers/spi/omap2_mcspi.c | 10 ++++++----
> 2 files changed, 27 insertions(+), 8 deletions(-)
>
> Index: omap4_dev/arch/arm/mach-omap2/devices.c
> ===================================================================
> --- omap4_dev.orig/arch/arm/mach-omap2/devices.c 2009-06-24 19:22:04.000000000
> +0530
> +++ omap4_dev/arch/arm/mach-omap2/devices.c 2009-06-25 10:05:39.000000000 +0530
> @@ -257,6 +257,11 @@
> #define OMAP2_MCSPI3_BASE 0x480b8000
> #define OMAP2_MCSPI4_BASE 0x480ba000
>
> +#define OMAP4_MCSPI1_BASE 0x48098100
> +#define OMAP4_MCSPI2_BASE 0x4809a100
> +#define OMAP4_MCSPI3_BASE 0x480b8100
> +#define OMAP4_MCSPI4_BASE 0x480ba100
> +
> static struct omap2_mcspi_platform_config omap2_mcspi1_config = {
> .num_cs = 4,
> };
> @@ -301,7 +306,8 @@
> },
> };
>
> -#if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3)
> +#if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3) || \
> + defined(CONFIG_ARCH_OMAP4)
> static struct omap2_mcspi_platform_config omap2_mcspi3_config = {
> .num_cs = 2,
> };
> @@ -325,7 +331,7 @@
> };
> #endif
>
> -#ifdef CONFIG_ARCH_OMAP3
> +#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
> static struct omap2_mcspi_platform_config omap2_mcspi4_config = {
> .num_cs = 1,
> };
> @@ -351,12 +357,23 @@
>
> static void omap_init_mcspi(void)
> {
> + if (cpu_is_omap44xx()) {
> + omap2_mcspi1_resources[0].start = OMAP4_MCSPI1_BASE;
> + omap2_mcspi1_resources[0].end = OMAP4_MCSPI1_BASE + 0xff;
> + omap2_mcspi2_resources[0].start = OMAP4_MCSPI2_BASE;
> + omap2_mcspi2_resources[0].end = OMAP4_MCSPI2_BASE + 0xff;
> + omap2_mcspi3_resources[0].start = OMAP4_MCSPI3_BASE;
> + omap2_mcspi3_resources[0].end = OMAP4_MCSPI3_BASE + 0xff;
> + omap2_mcspi4_resources[0].start = OMAP4_MCSPI4_BASE;
> + omap2_mcspi4_resources[0].end = OMAP4_MCSPI4_BASE + 0xff;
> + }
> platform_device_register(&omap2_mcspi1);
> platform_device_register(&omap2_mcspi2);
> -#if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3)
> +#if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3) || \
> + defined(CONFIG_ARCH_OMAP4)
> platform_device_register(&omap2_mcspi3);
> #endif
> -#ifdef CONFIG_ARCH_OMAP3
> +#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
> platform_device_register(&omap2_mcspi4);
> #endif
> }
> Index: omap4_dev/drivers/spi/omap2_mcspi.c
> ===================================================================
> --- omap4_dev.orig/drivers/spi/omap2_mcspi.c 2009-06-24 19:22:23.000000000 +0530
> +++ omap4_dev/drivers/spi/omap2_mcspi.c 2009-06-24 19:22:46.000000000 +0530
> @@ -918,7 +918,8 @@
> OMAP24XX_DMA_SPI2_TX1,
> };
>
> -#if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP34XX)
> +#if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP34XX) || \
> + defined(CONFIG_ARCH_OMAP4)
> static u8 __initdata spi3_rxdma_id[] = {
> OMAP24XX_DMA_SPI3_RX0,
> OMAP24XX_DMA_SPI3_RX1,
> @@ -930,7 +931,7 @@
> };
> #endif
>
> -#ifdef CONFIG_ARCH_OMAP3
> +#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
> static u8 __initdata spi4_rxdma_id[] = {
> OMAP34XX_DMA_SPI4_RX0,
> };
> @@ -960,14 +961,15 @@
> txdma_id = spi2_txdma_id;
> num_chipselect = 2;
> break;
> -#if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3)
> +#if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3) || \
> + defined(CONFIG_ARCH_OMAP4)
> case 3:
> rxdma_id = spi3_rxdma_id;
> txdma_id = spi3_txdma_id;
> num_chipselect = 2;
> break;
> #endif
> -#ifdef CONFIG_ARCH_OMAP3
> +#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
> case 4:
> rxdma_id = spi4_rxdma_id;
> txdma_id = spi4_txdma_id;
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2009-06-25 16:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-25 6:24 [RESUBMIT][PATCH][RFC] OMAP4: McSPI Support for OMAP_4430 Syed Rafiuddin
2009-06-25 16:45 ` Kevin Hilman [this message]
2009-06-26 4:59 ` Shilimkar, Santosh
2009-06-26 5:50 ` Tony Lindgren
2009-06-26 5:52 ` Shilimkar, Santosh
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=873a9os1nr.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=linux-omap@vger.kernel.org \
--cc=rafiuddin.syed@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