From: sshtylyov@mvista.com (Sergei Shtylyov)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] AT91: at91sam9261ek board: remove warnings related to use of SPI or SD/MMC
Date: Fri, 10 Sep 2010 14:26:02 +0400 [thread overview]
Message-ID: <4C8A07BA.9090805@ru.mvista.com> (raw)
In-Reply-To: <1284113629-13768-2-git-send-email-nicolas.ferre@atmel.com>
Hello.
On 10-09-2010 14:13, Nicolas Ferre wrote:
> The sd/mmc data structure is not used if SPI is selected. The configuration
> of PIO on the board prevent from using both interfaces at the same time
> (board dependent).
> Remove the warnings at compilation time adding a preprocessor condition.
> Signed-off-by: Nicolas Ferre<nicolas.ferre@atmel.com>
[...]
> diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c
> index b4307ab..19d4d2c 100644
> --- a/arch/arm/mach-at91/board-sam9261ek.c
> +++ b/arch/arm/mach-at91/board-sam9261ek.c
> @@ -169,17 +169,6 @@ static struct at91_udc_data __initdata ek_udc_data = {
>
>
> /*
> - * MCI (SD/MMC)
> - */
> -static struct at91_mmc_data __initdata ek_mmc_data = {
> - .wire4 = 1,
> -// .det_pin = ... not connected
> -// .wp_pin = ... not connected
> -// .vcc_pin = ... not connected
> -};
> -
> -
> -/*
> * NAND flash
> */
> static struct mtd_partition __initdata ek_nand_partition[] = {
> @@ -247,6 +236,10 @@ static void __init ek_add_device_nand(void)
> at91_add_device_nand(&ek_nand_data);
> }
>
> +/*
> + * SPI related devices
> + */
> +#if defined(CONFIG_SPI_ATMEL) || defined(CONFIG_SPI_ATMEL_MODULE)
>
> /*
> * ADS7846 Touchscreen
> @@ -357,6 +350,21 @@ static struct spi_board_info ek_spi_devices[] = {
> #endif
> };
>
> +#else /* CONFIG_SPI_ATMEL_* */
> +
> +/*
> + * MCI (SD/MMC)
> + * spi0 and mmc/sd share the same PIO pins: cannot be used at the same time
> + */
> +static struct at91_mmc_data __initdata ek_mmc_data = {
> + .wire4 = 1,
> +// .det_pin = ... not connected
> +// .wp_pin = ... not connected
> +// .vcc_pin = ... not connected
The coding style document forbids C99 style // comments. Could replace
with normal comment or #if 0...
WBR, Sergei
WARNING: multiple messages have this Message-ID (diff)
From: Sergei Shtylyov <sshtylyov@mvista.com>
To: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, avictor.za@gmail.com
Subject: Re: [PATCH] AT91: at91sam9261ek board: remove warnings related to use of SPI or SD/MMC
Date: Fri, 10 Sep 2010 14:26:02 +0400 [thread overview]
Message-ID: <4C8A07BA.9090805@ru.mvista.com> (raw)
In-Reply-To: <1284113629-13768-2-git-send-email-nicolas.ferre@atmel.com>
Hello.
On 10-09-2010 14:13, Nicolas Ferre wrote:
> The sd/mmc data structure is not used if SPI is selected. The configuration
> of PIO on the board prevent from using both interfaces at the same time
> (board dependent).
> Remove the warnings at compilation time adding a preprocessor condition.
> Signed-off-by: Nicolas Ferre<nicolas.ferre@atmel.com>
[...]
> diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c
> index b4307ab..19d4d2c 100644
> --- a/arch/arm/mach-at91/board-sam9261ek.c
> +++ b/arch/arm/mach-at91/board-sam9261ek.c
> @@ -169,17 +169,6 @@ static struct at91_udc_data __initdata ek_udc_data = {
>
>
> /*
> - * MCI (SD/MMC)
> - */
> -static struct at91_mmc_data __initdata ek_mmc_data = {
> - .wire4 = 1,
> -// .det_pin = ... not connected
> -// .wp_pin = ... not connected
> -// .vcc_pin = ... not connected
> -};
> -
> -
> -/*
> * NAND flash
> */
> static struct mtd_partition __initdata ek_nand_partition[] = {
> @@ -247,6 +236,10 @@ static void __init ek_add_device_nand(void)
> at91_add_device_nand(&ek_nand_data);
> }
>
> +/*
> + * SPI related devices
> + */
> +#if defined(CONFIG_SPI_ATMEL) || defined(CONFIG_SPI_ATMEL_MODULE)
>
> /*
> * ADS7846 Touchscreen
> @@ -357,6 +350,21 @@ static struct spi_board_info ek_spi_devices[] = {
> #endif
> };
>
> +#else /* CONFIG_SPI_ATMEL_* */
> +
> +/*
> + * MCI (SD/MMC)
> + * spi0 and mmc/sd share the same PIO pins: cannot be used at the same time
> + */
> +static struct at91_mmc_data __initdata ek_mmc_data = {
> + .wire4 = 1,
> +// .det_pin = ... not connected
> +// .wp_pin = ... not connected
> +// .vcc_pin = ... not connected
The coding style document forbids C99 style // comments. Could replace
with normal comment or #if 0...
WBR, Sergei
next prev parent reply other threads:[~2010-09-10 10:26 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-10 10:13 [PATCH] AT91: dm9000 initialization update Nicolas Ferre
2010-09-10 10:13 ` Nicolas Ferre
2010-09-10 9:23 ` Jean-Christophe PLAGNIOL-VILLARD
2010-09-10 9:23 ` Jean-Christophe PLAGNIOL-VILLARD
2010-09-10 9:51 ` Nicolas Ferre
2010-09-10 9:51 ` Nicolas Ferre
2010-09-10 10:18 ` Jean-Christophe PLAGNIOL-VILLARD
2010-09-10 10:18 ` Jean-Christophe PLAGNIOL-VILLARD
2010-09-10 10:13 ` [PATCH] AT91: at91sam9261ek board: remove warnings related to use of SPI or SD/MMC Nicolas Ferre
2010-09-10 10:13 ` Nicolas Ferre
2010-09-10 9:23 ` Jean-Christophe PLAGNIOL-VILLARD
2010-09-10 9:23 ` Jean-Christophe PLAGNIOL-VILLARD
2010-09-10 10:26 ` Sergei Shtylyov [this message]
2010-09-10 10:26 ` Sergei Shtylyov
2010-09-10 11:06 ` Jean-Christophe PLAGNIOL-VILLARD
2010-09-10 11:06 ` Jean-Christophe PLAGNIOL-VILLARD
2010-09-10 11:25 ` Nicolas Ferre
2010-09-10 11:25 ` Nicolas Ferre
2010-09-10 12:42 ` [PATCH] AT91: at91sam9261ek: remove C99 comments but keep information Nicolas Ferre
2010-09-10 12:42 ` Nicolas Ferre
2010-09-10 12:25 ` Jean-Christophe PLAGNIOL-VILLARD
2010-09-10 12:25 ` Jean-Christophe PLAGNIOL-VILLARD
2010-09-10 10:19 ` [PATCH] AT91: dm9000 initialization update Jean-Christophe PLAGNIOL-VILLARD
2010-09-10 10:19 ` Jean-Christophe PLAGNIOL-VILLARD
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=4C8A07BA.9090805@ru.mvista.com \
--to=sshtylyov@mvista.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.