From: Nicolas Ferre <nicolas.ferre@atmel.com>
To: linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, avictor.za@gmail.com
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Subject: [PATCH] AT91: at91sam9261ek board: remove warnings related to use of SPI or SD/MMC
Date: Fri, 10 Sep 2010 12:13:49 +0200 [thread overview]
Message-ID: <1284113629-13768-2-git-send-email-nicolas.ferre@atmel.com> (raw)
In-Reply-To: <1284113629-13768-1-git-send-email-nicolas.ferre@atmel.com>
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>
---
arch/arm/mach-at91/board-sam9261ek.c | 30 +++++++++++++++++++-----------
1 files changed, 19 insertions(+), 11 deletions(-)
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
+};
+
+#endif /* CONFIG_SPI_ATMEL_* */
+
/*
* LCD Controller
--
1.5.6.5
next prev parent reply other threads:[~2010-09-10 9:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-10 10:13 [PATCH] AT91: dm9000 initialization update Nicolas Ferre
2010-09-10 9:23 ` Jean-Christophe PLAGNIOL-VILLARD
2010-09-10 9:51 ` Nicolas Ferre
2010-09-10 10:18 ` Jean-Christophe PLAGNIOL-VILLARD
2010-09-10 10:13 ` Nicolas Ferre [this message]
2010-09-10 9:23 ` [PATCH] AT91: at91sam9261ek board: remove warnings related to use of SPI or SD/MMC Jean-Christophe PLAGNIOL-VILLARD
2010-09-10 10:26 ` Sergei Shtylyov
2010-09-10 11:06 ` Jean-Christophe PLAGNIOL-VILLARD
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:25 ` Jean-Christophe PLAGNIOL-VILLARD
2010-09-10 10:19 ` [PATCH] AT91: dm9000 initialization update 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=1284113629-13768-2-git-send-email-nicolas.ferre@atmel.com \
--to=nicolas.ferre@atmel.com \
--cc=avictor.za@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®