aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2012-02-20 15:26:30 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-02-23 17:22:45 -0500
commita64ae394eb7de5e39cf462c18edb202196c678fa (patch)
tree28f70b9b540438e4fa46c0f20ec47b150defd3c7 /arch/arm
parentc997e519f3fe6b40a5ad972e2a334960065d6154 (diff)
ARM: 7335/1: mach-u300: do away with MMC config files
All the special stuff (like registering input device and so on) for the U300 MMC is now done away with. We don't need these special MMC setup kludges, merge this into core.c and be done with it. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-u300/Makefile1
-rw-r--r--arch/arm/mach-u300/core.c38
-rw-r--r--arch/arm/mach-u300/mmc.c52
-rw-r--r--arch/arm/mach-u300/mmc.h18
4 files changed, 21 insertions, 88 deletions
diff --git a/arch/arm/mach-u300/Makefile b/arch/arm/mach-u300/Makefile
index 285538124e5e..fd3a5c382f47 100644
--- a/arch/arm/mach-u300/Makefile
+++ b/arch/arm/mach-u300/Makefile
@@ -8,7 +8,6 @@ obj-n :=
8obj- := 8obj- :=
9 9
10obj-$(CONFIG_ARCH_U300) += u300.o 10obj-$(CONFIG_ARCH_U300) += u300.o
11obj-$(CONFIG_MMC) += mmc.o
12obj-$(CONFIG_SPI_PL022) += spi.o 11obj-$(CONFIG_SPI_PL022) += spi.o
13obj-$(CONFIG_MACH_U300_SPIDUMMY) += dummyspichip.o 12obj-$(CONFIG_MACH_U300_SPIDUMMY) += dummyspichip.o
14obj-$(CONFIG_I2C_STU300) += i2c.o 13obj-$(CONFIG_I2C_STU300) += i2c.o
diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c
index b9865605da09..a44643f1f8ce 100644
--- a/arch/arm/mach-u300/core.c
+++ b/arch/arm/mach-u300/core.c
@@ -18,6 +18,7 @@
18#include <linux/termios.h> 18#include <linux/termios.h>
19#include <linux/dmaengine.h> 19#include <linux/dmaengine.h>
20#include <linux/amba/bus.h> 20#include <linux/amba/bus.h>
21#include <linux/amba/mmci.h>
21#include <linux/amba/serial.h> 22#include <linux/amba/serial.h>
22#include <linux/platform_device.h> 23#include <linux/platform_device.h>
23#include <linux/gpio.h> 24#include <linux/gpio.h>
@@ -43,9 +44,9 @@
43#include <mach/gpio-u300.h> 44#include <mach/gpio-u300.h>
44 45
45#include "clock.h" 46#include "clock.h"
46#include "mmc.h"
47#include "spi.h" 47#include "spi.h"
48#include "i2c.h" 48#include "i2c.h"
49#include "u300-gpio.h"
49 50
50/* 51/*
51 * Static I/O mappings that are needed for booting the U300 platforms. The 52 * Static I/O mappings that are needed for booting the U300 platforms. The
@@ -116,11 +117,6 @@ static AMBA_APB_DEVICE(uart1, "uart1", 0, U300_UART1_BASE,
116/* AHB device at 0x4000 offset */ 117/* AHB device at 0x4000 offset */
117static AMBA_APB_DEVICE(pl172, "pl172", 0, U300_EMIF_CFG_BASE, { }, NULL); 118static AMBA_APB_DEVICE(pl172, "pl172", 0, U300_EMIF_CFG_BASE, { }, NULL);
118 119
119
120/*
121 * Everything within this next ifdef deals with external devices connected to
122 * the APP SPI bus.
123 */
124/* Fast device at 0x6000 offset */ 120/* Fast device at 0x6000 offset */
125static AMBA_APB_DEVICE(pl022, "pl022", 0, U300_SPI_BASE, 121static AMBA_APB_DEVICE(pl022, "pl022", 0, U300_SPI_BASE,
126 { IRQ_U300_SPI }, NULL); 122 { IRQ_U300_SPI }, NULL);
@@ -128,8 +124,26 @@ static AMBA_APB_DEVICE(pl022, "pl022", 0, U300_SPI_BASE,
128/* Fast device at 0x1000 offset */ 124/* Fast device at 0x1000 offset */
129#define U300_MMCSD_IRQS { IRQ_U300_MMCSD_MCIINTR0, IRQ_U300_MMCSD_MCIINTR1 } 125#define U300_MMCSD_IRQS { IRQ_U300_MMCSD_MCIINTR0, IRQ_U300_MMCSD_MCIINTR1 }
130 126
127static struct mmci_platform_data mmcsd_platform_data = {
128 /*
129 * Do not set ocr_mask or voltage translation function,
130 * we have a regulator we can control instead.
131 */
132 .f_max = 24000000,
133 .gpio_wp = -1,
134 .gpio_cd = U300_GPIO_PIN_MMC_CD,
135 .cd_invert = true,
136 .capabilities = MMC_CAP_MMC_HIGHSPEED |
137 MMC_CAP_SD_HIGHSPEED | MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
138#ifdef CONFIG_COH901318
139 .dma_filter = coh901318_filter_id,
140 .dma_rx_param = (void *) U300_DMA_MMCSD_RX_TX,
141 /* Don't specify a TX channel, this RX channel is bidirectional */
142#endif
143};
144
131static AMBA_APB_DEVICE(mmcsd, "mmci", 0, U300_MMCSD_BASE, 145static AMBA_APB_DEVICE(mmcsd, "mmci", 0, U300_MMCSD_BASE,
132 U300_MMCSD_IRQS, NULL); 146 U300_MMCSD_IRQS, &mmcsd_platform_data);
133 147
134/* 148/*
135 * The order of device declaration may be important, since some devices 149 * The order of device declaration may be important, since some devices
@@ -1826,16 +1840,6 @@ void __init u300_init_devices(void)
1826 writew(val, U300_SYSCON_VBASE + U300_SYSCON_SMCR); 1840 writew(val, U300_SYSCON_VBASE + U300_SYSCON_SMCR);
1827} 1841}
1828 1842
1829static int core_module_init(void)
1830{
1831 /*
1832 * This needs to be initialized later: it needs the input framework
1833 * to be initialized first.
1834 */
1835 return mmc_init(&mmcsd_device);
1836}
1837module_init(core_module_init);
1838
1839/* Forward declare this function from the watchdog */ 1843/* Forward declare this function from the watchdog */
1840void coh901327_watchdog_reset(void); 1844void coh901327_watchdog_reset(void);
1841 1845
diff --git a/arch/arm/mach-u300/mmc.c b/arch/arm/mach-u300/mmc.c
deleted file mode 100644
index 05abd6ad9fab..000000000000
--- a/arch/arm/mach-u300/mmc.c
+++ /dev/null
@@ -1,52 +0,0 @@
1/*
2 *
3 * arch/arm/mach-u300/mmc.c
4 *
5 *
6 * Copyright (C) 2009 ST-Ericsson SA
7 * License terms: GNU General Public License (GPL) version 2
8 *
9 * Author: Linus Walleij <linus.walleij@stericsson.com>
10 * Author: Johan Lundin
11 * Author: Jonas Aaberg <jonas.aberg@stericsson.com>
12 */
13#include <linux/device.h>
14#include <linux/amba/bus.h>
15#include <linux/mmc/host.h>
16#include <linux/dmaengine.h>
17#include <linux/amba/mmci.h>
18#include <linux/slab.h>
19#include <mach/coh901318.h>
20#include <mach/dma_channels.h>
21
22#include "u300-gpio.h"
23#include "mmc.h"
24
25static struct mmci_platform_data mmc0_plat_data = {
26 /*
27 * Do not set ocr_mask or voltage translation function,
28 * we have a regulator we can control instead.
29 */
30 /* Nominally 2.85V on our platform */
31 .f_max = 24000000,
32 .gpio_wp = -1,
33 .gpio_cd = U300_GPIO_PIN_MMC_CD,
34 .cd_invert = true,
35 .capabilities = MMC_CAP_MMC_HIGHSPEED |
36 MMC_CAP_SD_HIGHSPEED | MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
37#ifdef CONFIG_COH901318
38 .dma_filter = coh901318_filter_id,
39 .dma_rx_param = (void *) U300_DMA_MMCSD_RX_TX,
40 /* Don't specify a TX channel, this RX channel is bidirectional */
41#endif
42};
43
44int __devinit mmc_init(struct amba_device *adev)
45{
46 struct device *mmcsd_device = &adev->dev;
47 int ret = 0;
48
49 mmcsd_device->platform_data = &mmc0_plat_data;
50
51 return ret;
52}
diff --git a/arch/arm/mach-u300/mmc.h b/arch/arm/mach-u300/mmc.h
deleted file mode 100644
index 92b85125abb3..000000000000
--- a/arch/arm/mach-u300/mmc.h
+++ /dev/null
@@ -1,18 +0,0 @@
1/*
2 *
3 * arch/arm/mach-u300/mmc.h
4 *
5 *
6 * Copyright (C) 2009 ST-Ericsson AB
7 * License terms: GNU General Public License (GPL) version 2
8 *
9 * Author: Jonas Aaberg <jonas.aberg@stericsson.com>
10 */
11#ifndef MMC_H
12#define MMC_H
13
14#include <linux/amba/bus.h>
15
16int __devinit mmc_init(struct amba_device *adev);
17
18#endif