1 From 44d4e083f1527e0acc6d25eadd5258565c3b8a3a Mon Sep 17 00:00:00 2001
2 From: Alison Wang <b18965@freescale.com>
3 Date: Thu, 4 Aug 2011 09:59:55 +0800
4 Subject: [PATCH 51/52] Update SD/MMC over SPI driver for MCF54451 and MCF54418
6 This patch fixed the errors in initialization and module mode.
8 Signed-off-by: Alison Wang <b18965@freescale.com>
10 arch/m68k/coldfire/m5445x/devices.c | 6 +++---
11 drivers/mmc/host/Kconfig | 8 ++++----
12 drivers/spi/spi.c | 4 ++++
13 3 files changed, 11 insertions(+), 7 deletions(-)
15 --- a/arch/m68k/coldfire/m5445x/devices.c
16 +++ b/arch/m68k/coldfire/m5445x/devices.c
19 #include <linux/interrupt.h>
20 #include <linux/init.h>
21 -#ifdef CONFIG_MMC_SPI
22 +#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
23 #include <linux/mmc/host.h>
24 #include <linux/spi/mmc_spi.h>
26 @@ -107,7 +107,7 @@ static struct coldfire_dspi_chip codec_s
30 -#if defined(CONFIG_MMC_SPI)
31 +#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
32 int mmc_spi_init(struct device *mmc_spi_device,
33 irqreturn_t mmc_spi_irq_handler(int irq, void *private),
34 void *irq_privatedata)
35 @@ -234,7 +234,7 @@ static struct spi_board_info spi_board_i
39 -#if defined(CONFIG_MMC_SPI)
40 +#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
42 .modalias = "mmc_spi",
43 .max_speed_hz = 25000000,
44 --- a/drivers/mmc/host/Kconfig
45 +++ b/drivers/mmc/host/Kconfig
46 @@ -369,7 +369,7 @@ config MMC_SPI
47 If unsure, or if your system has no SPI master driver, say N.
49 config M54451_SD_HW_DETECT
50 - tristate "use extern IRQ7 to detect SD/MMC card"
51 + bool "use extern IRQ7 to detect SD/MMC card"
52 depends on MMC_SPI && M54451
55 @@ -377,7 +377,7 @@ config M54451_SD_HW_DETECT
56 use irq7 to dectect the card inserting/removing.
58 config M5441X_SD_HW_DETECT
59 - tristate "use extern IRQ to detect SD/MMC card"
60 + bool "use extern IRQ to detect SD/MMC card"
61 depends on MMC_SPI && M5441X
63 MMC/SD interface on 54418evb was over SPI. Enable this option will
64 @@ -388,14 +388,14 @@ choice
65 depends on M5441X_SD_HW_DETECT
67 config DETECT_USE_EXTERN_IRQ7
68 - tristate "based extern IRQ7"
69 + bool "based extern IRQ7"
70 depends on M5441X_SD_HW_DETECT
72 MMC/SD cards using spi controller,
73 we use the extern irq7 to detect card.
75 config DETECT_USE_EXTERN_IRQ1
76 - tristate "based extern IRQ1"
77 + bool "based extern IRQ1"
78 depends on M5441X_SD_HW_DETECT
80 MMC/SD cards using spi controller,
81 --- a/drivers/spi/spi.c
82 +++ b/drivers/spi/spi.c
83 @@ -725,18 +725,22 @@ EXPORT_SYMBOL_GPL(spi_busnum_to_master);
85 int spi_setup(struct spi_device *spi)
87 +#ifndef CONFIG_COLDFIRE
92 /* help drivers fail *cleanly* when they need options
93 * that aren't supported with their current master
95 +#ifndef CONFIG_COLDFIRE
96 bad_bits = spi->mode & ~spi->master->mode_bits;
98 dev_err(&spi->dev, "setup: unsupported mode bits %x\n",
104 if (!spi->bits_per_word)
105 spi->bits_per_word = 8;