From 7e7649baa9de9d592a76e150970e3079d7610138 Mon Sep 17 00:00:00 2001 From: kaloz Date: Tue, 1 May 2012 07:00:17 +0000 Subject: [coldfire]: switch to 2.6.38 git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31546 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- ...MC-over-SPI-driver-for-MCF54451-and-MCF54.patch | 105 +++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 target/linux/coldfire/patches/051-Update-SD-MMC-over-SPI-driver-for-MCF54451-and-MCF54.patch (limited to 'target/linux/coldfire/patches/051-Update-SD-MMC-over-SPI-driver-for-MCF54451-and-MCF54.patch') diff --git a/target/linux/coldfire/patches/051-Update-SD-MMC-over-SPI-driver-for-MCF54451-and-MCF54.patch b/target/linux/coldfire/patches/051-Update-SD-MMC-over-SPI-driver-for-MCF54451-and-MCF54.patch new file mode 100644 index 000000000..a92acdc0f --- /dev/null +++ b/target/linux/coldfire/patches/051-Update-SD-MMC-over-SPI-driver-for-MCF54451-and-MCF54.patch @@ -0,0 +1,105 @@ +From 44d4e083f1527e0acc6d25eadd5258565c3b8a3a Mon Sep 17 00:00:00 2001 +From: Alison Wang +Date: Thu, 4 Aug 2011 09:59:55 +0800 +Subject: [PATCH 51/52] Update SD/MMC over SPI driver for MCF54451 and MCF54418 + +This patch fixed the errors in initialization and module mode. + +Signed-off-by: Alison Wang +--- + arch/m68k/coldfire/m5445x/devices.c | 6 +++--- + drivers/mmc/host/Kconfig | 8 ++++---- + drivers/spi/spi.c | 4 ++++ + 3 files changed, 11 insertions(+), 7 deletions(-) + +--- a/arch/m68k/coldfire/m5445x/devices.c ++++ b/arch/m68k/coldfire/m5445x/devices.c +@@ -20,7 +20,7 @@ + + #include + #include +-#ifdef CONFIG_MMC_SPI ++#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) + #include + #include + #endif +@@ -107,7 +107,7 @@ static struct coldfire_dspi_chip codec_s + }; + #endif + +-#if defined(CONFIG_MMC_SPI) ++#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) + int mmc_spi_init(struct device *mmc_spi_device, + irqreturn_t mmc_spi_irq_handler(int irq, void *private), + void *irq_privatedata) +@@ -234,7 +234,7 @@ static struct spi_board_info spi_board_i + }, + #endif + +-#if defined(CONFIG_MMC_SPI) ++#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) + { + .modalias = "mmc_spi", + .max_speed_hz = 25000000, +--- a/drivers/mmc/host/Kconfig ++++ b/drivers/mmc/host/Kconfig +@@ -369,7 +369,7 @@ config MMC_SPI + If unsure, or if your system has no SPI master driver, say N. + + config M54451_SD_HW_DETECT +- tristate "use extern IRQ7 to detect SD/MMC card" ++ bool "use extern IRQ7 to detect SD/MMC card" + depends on MMC_SPI && M54451 + default y + help +@@ -377,7 +377,7 @@ config M54451_SD_HW_DETECT + use irq7 to dectect the card inserting/removing. + + config M5441X_SD_HW_DETECT +- tristate "use extern IRQ to detect SD/MMC card" ++ bool "use extern IRQ to detect SD/MMC card" + depends on MMC_SPI && M5441X + help + MMC/SD interface on 54418evb was over SPI. Enable this option will +@@ -388,14 +388,14 @@ choice + depends on M5441X_SD_HW_DETECT + + config DETECT_USE_EXTERN_IRQ7 +- tristate "based extern IRQ7" ++ bool "based extern IRQ7" + depends on M5441X_SD_HW_DETECT + help + MMC/SD cards using spi controller, + we use the extern irq7 to detect card. + + config DETECT_USE_EXTERN_IRQ1 +- tristate "based extern IRQ1" ++ bool "based extern IRQ1" + depends on M5441X_SD_HW_DETECT + help + MMC/SD cards using spi controller, +--- a/drivers/spi/spi.c ++++ b/drivers/spi/spi.c +@@ -725,18 +725,22 @@ EXPORT_SYMBOL_GPL(spi_busnum_to_master); + */ + int spi_setup(struct spi_device *spi) + { ++#ifndef CONFIG_COLDFIRE + unsigned bad_bits; ++#endif + int status; + + /* help drivers fail *cleanly* when they need options + * that aren't supported with their current master + */ ++#ifndef CONFIG_COLDFIRE + bad_bits = spi->mode & ~spi->master->mode_bits; + if (bad_bits) { + dev_err(&spi->dev, "setup: unsupported mode bits %x\n", + bad_bits); + return -EINVAL; + } ++#endif + + if (!spi->bits_per_word) + spi->bits_per_word = 8; -- cgit v1.2.3