diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-23 20:36:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-23 20:36:29 -0400 |
commit | 0d19eac12031680dc5f5402921fb0c388e42f619 (patch) | |
tree | 57302fb8778b6527c35175cc1edf228dd9f7abb9 /arch | |
parent | 56c10bf82c10588b743e75a13a7949e11b9fc942 (diff) | |
parent | bba1594d348b59d6172e02bf74fba837c8273989 (diff) |
Merge branch 'amba' of git://git.linaro.org/people/rmk/linux-arm
Pull #2 ARM updates from Russell King:
"Further ARM AMBA primecell updates which aren't included directly in
the previous commit. I wanted to keep these separate as they're
touching stuff outside arch/arm/."
* 'amba' of git://git.linaro.org/people/rmk/linux-arm:
ARM: 7362/1: AMBA: Add module_amba_driver() helper macro for amba_driver
ARM: 7335/1: mach-u300: do away with MMC config files
ARM: 7280/1: mmc: mmci: Cache MMCICLOCK and MMCIPOWER register
ARM: 7309/1: realview: fix unconnected interrupts on EB11MP
ARM: 7230/1: mmc: mmci: Fix PIO read for small SDIO packets
ARM: 7227/1: mmc: mmci: Prepare for SDIO before setting up DMA job
ARM: 7223/1: mmc: mmci: Fixup use of runtime PM and use autosuspend
ARM: 7221/1: mmc: mmci: Change from using legacy suspend
ARM: 7219/1: mmc: mmci: Change vdd_handler to a generic ios_handler
ARM: 7218/1: mmc: mmci: Provide option to configure bus signal direction
ARM: 7217/1: mmc: mmci: Put power register deviations in variant data
ARM: 7216/1: mmc: mmci: Do not release spinlock in request_end
ARM: 7215/1: mmc: mmci: Increase max_segs from 16 to 128
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-realview/include/mach/irqs-eb.h | 23 | ||||
-rw-r--r-- | arch/arm/mach-u300/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-u300/core.c | 38 | ||||
-rw-r--r-- | arch/arm/mach-u300/mmc.c | 52 | ||||
-rw-r--r-- | arch/arm/mach-u300/mmc.h | 18 | ||||
-rw-r--r-- | arch/arm/mach-ux500/board-mop500-sdi.c | 21 |
6 files changed, 42 insertions, 111 deletions
diff --git a/arch/arm/mach-realview/include/mach/irqs-eb.h b/arch/arm/mach-realview/include/mach/irqs-eb.h index 204d5378f309..d6b5073692d2 100644 --- a/arch/arm/mach-realview/include/mach/irqs-eb.h +++ b/arch/arm/mach-realview/include/mach/irqs-eb.h | |||
@@ -96,16 +96,19 @@ | |||
96 | #define IRQ_EB11MP_L220_SLAVE (IRQ_EB_GIC_START + 30) | 96 | #define IRQ_EB11MP_L220_SLAVE (IRQ_EB_GIC_START + 30) |
97 | #define IRQ_EB11MP_L220_DECODE (IRQ_EB_GIC_START + 31) | 97 | #define IRQ_EB11MP_L220_DECODE (IRQ_EB_GIC_START + 31) |
98 | 98 | ||
99 | #define IRQ_EB11MP_UART2 -1 | 99 | /* |
100 | #define IRQ_EB11MP_UART3 -1 | 100 | * The 11MPcore tile leaves the following unconnected. |
101 | #define IRQ_EB11MP_CLCD -1 | 101 | */ |
102 | #define IRQ_EB11MP_DMA -1 | 102 | #define IRQ_EB11MP_UART2 0 |
103 | #define IRQ_EB11MP_WDOG -1 | 103 | #define IRQ_EB11MP_UART3 0 |
104 | #define IRQ_EB11MP_GPIO0 -1 | 104 | #define IRQ_EB11MP_CLCD 0 |
105 | #define IRQ_EB11MP_GPIO1 -1 | 105 | #define IRQ_EB11MP_DMA 0 |
106 | #define IRQ_EB11MP_GPIO2 -1 | 106 | #define IRQ_EB11MP_WDOG 0 |
107 | #define IRQ_EB11MP_SCI -1 | 107 | #define IRQ_EB11MP_GPIO0 0 |
108 | #define IRQ_EB11MP_SSP -1 | 108 | #define IRQ_EB11MP_GPIO1 0 |
109 | #define IRQ_EB11MP_GPIO2 0 | ||
110 | #define IRQ_EB11MP_SCI 0 | ||
111 | #define IRQ_EB11MP_SSP 0 | ||
109 | 112 | ||
110 | #define NR_GIC_EB11MP 2 | 113 | #define NR_GIC_EB11MP 2 |
111 | 114 | ||
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 := | |||
8 | obj- := | 8 | obj- := |
9 | 9 | ||
10 | obj-$(CONFIG_ARCH_U300) += u300.o | 10 | obj-$(CONFIG_ARCH_U300) += u300.o |
11 | obj-$(CONFIG_MMC) += mmc.o | ||
12 | obj-$(CONFIG_SPI_PL022) += spi.o | 11 | obj-$(CONFIG_SPI_PL022) += spi.o |
13 | obj-$(CONFIG_MACH_U300_SPIDUMMY) += dummyspichip.o | 12 | obj-$(CONFIG_MACH_U300_SPIDUMMY) += dummyspichip.o |
14 | obj-$(CONFIG_I2C_STU300) += i2c.o | 13 | obj-$(CONFIG_I2C_STU300) += i2c.o |
diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c index b911590c8ae7..8b90c44d237f 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> |
@@ -44,9 +45,9 @@ | |||
44 | #include <mach/gpio-u300.h> | 45 | #include <mach/gpio-u300.h> |
45 | 46 | ||
46 | #include "clock.h" | 47 | #include "clock.h" |
47 | #include "mmc.h" | ||
48 | #include "spi.h" | 48 | #include "spi.h" |
49 | #include "i2c.h" | 49 | #include "i2c.h" |
50 | #include "u300-gpio.h" | ||
50 | 51 | ||
51 | /* | 52 | /* |
52 | * Static I/O mappings that are needed for booting the U300 platforms. The | 53 | * Static I/O mappings that are needed for booting the U300 platforms. The |
@@ -117,11 +118,6 @@ static AMBA_APB_DEVICE(uart1, "uart1", 0, U300_UART1_BASE, | |||
117 | /* AHB device at 0x4000 offset */ | 118 | /* AHB device at 0x4000 offset */ |
118 | static AMBA_APB_DEVICE(pl172, "pl172", 0, U300_EMIF_CFG_BASE, { }, NULL); | 119 | static AMBA_APB_DEVICE(pl172, "pl172", 0, U300_EMIF_CFG_BASE, { }, NULL); |
119 | 120 | ||
120 | |||
121 | /* | ||
122 | * Everything within this next ifdef deals with external devices connected to | ||
123 | * the APP SPI bus. | ||
124 | */ | ||
125 | /* Fast device at 0x6000 offset */ | 121 | /* Fast device at 0x6000 offset */ |
126 | static AMBA_APB_DEVICE(pl022, "pl022", 0, U300_SPI_BASE, | 122 | static AMBA_APB_DEVICE(pl022, "pl022", 0, U300_SPI_BASE, |
127 | { IRQ_U300_SPI }, NULL); | 123 | { IRQ_U300_SPI }, NULL); |
@@ -129,8 +125,26 @@ static AMBA_APB_DEVICE(pl022, "pl022", 0, U300_SPI_BASE, | |||
129 | /* Fast device at 0x1000 offset */ | 125 | /* Fast device at 0x1000 offset */ |
130 | #define U300_MMCSD_IRQS { IRQ_U300_MMCSD_MCIINTR0, IRQ_U300_MMCSD_MCIINTR1 } | 126 | #define U300_MMCSD_IRQS { IRQ_U300_MMCSD_MCIINTR0, IRQ_U300_MMCSD_MCIINTR1 } |
131 | 127 | ||
128 | static struct mmci_platform_data mmcsd_platform_data = { | ||
129 | /* | ||
130 | * Do not set ocr_mask or voltage translation function, | ||
131 | * we have a regulator we can control instead. | ||
132 | */ | ||
133 | .f_max = 24000000, | ||
134 | .gpio_wp = -1, | ||
135 | .gpio_cd = U300_GPIO_PIN_MMC_CD, | ||
136 | .cd_invert = true, | ||
137 | .capabilities = MMC_CAP_MMC_HIGHSPEED | | ||
138 | MMC_CAP_SD_HIGHSPEED | MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, | ||
139 | #ifdef CONFIG_COH901318 | ||
140 | .dma_filter = coh901318_filter_id, | ||
141 | .dma_rx_param = (void *) U300_DMA_MMCSD_RX_TX, | ||
142 | /* Don't specify a TX channel, this RX channel is bidirectional */ | ||
143 | #endif | ||
144 | }; | ||
145 | |||
132 | static AMBA_APB_DEVICE(mmcsd, "mmci", 0, U300_MMCSD_BASE, | 146 | static AMBA_APB_DEVICE(mmcsd, "mmci", 0, U300_MMCSD_BASE, |
133 | U300_MMCSD_IRQS, NULL); | 147 | U300_MMCSD_IRQS, &mmcsd_platform_data); |
134 | 148 | ||
135 | /* | 149 | /* |
136 | * The order of device declaration may be important, since some devices | 150 | * The order of device declaration may be important, since some devices |
@@ -1830,16 +1844,6 @@ void __init u300_init_devices(void) | |||
1830 | writew(val, U300_SYSCON_VBASE + U300_SYSCON_SMCR); | 1844 | writew(val, U300_SYSCON_VBASE + U300_SYSCON_SMCR); |
1831 | } | 1845 | } |
1832 | 1846 | ||
1833 | static int core_module_init(void) | ||
1834 | { | ||
1835 | /* | ||
1836 | * This needs to be initialized later: it needs the input framework | ||
1837 | * to be initialized first. | ||
1838 | */ | ||
1839 | return mmc_init(&mmcsd_device); | ||
1840 | } | ||
1841 | module_init(core_module_init); | ||
1842 | |||
1843 | /* Forward declare this function from the watchdog */ | 1847 | /* Forward declare this function from the watchdog */ |
1844 | void coh901327_watchdog_reset(void); | 1848 | void coh901327_watchdog_reset(void); |
1845 | 1849 | ||
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 | |||
25 | static 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 | |||
44 | int __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 | |||
16 | int __devinit mmc_init(struct amba_device *adev); | ||
17 | |||
18 | #endif | ||
diff --git a/arch/arm/mach-ux500/board-mop500-sdi.c b/arch/arm/mach-ux500/board-mop500-sdi.c index 5dde4d4ebe88..1daead3e583e 100644 --- a/arch/arm/mach-ux500/board-mop500-sdi.c +++ b/arch/arm/mach-ux500/board-mop500-sdi.c | |||
@@ -31,21 +31,13 @@ | |||
31 | * SDI 0 (MicroSD slot) | 31 | * SDI 0 (MicroSD slot) |
32 | */ | 32 | */ |
33 | 33 | ||
34 | /* MMCIPOWER bits */ | ||
35 | #define MCI_DATA2DIREN (1 << 2) | ||
36 | #define MCI_CMDDIREN (1 << 3) | ||
37 | #define MCI_DATA0DIREN (1 << 4) | ||
38 | #define MCI_DATA31DIREN (1 << 5) | ||
39 | #define MCI_FBCLKEN (1 << 7) | ||
40 | |||
41 | /* GPIO pins used by the sdi0 level shifter */ | 34 | /* GPIO pins used by the sdi0 level shifter */ |
42 | static int sdi0_en = -1; | 35 | static int sdi0_en = -1; |
43 | static int sdi0_vsel = -1; | 36 | static int sdi0_vsel = -1; |
44 | 37 | ||
45 | static u32 mop500_sdi0_vdd_handler(struct device *dev, unsigned int vdd, | 38 | static int mop500_sdi0_ios_handler(struct device *dev, struct mmc_ios *ios) |
46 | unsigned char power_mode) | ||
47 | { | 39 | { |
48 | switch (power_mode) { | 40 | switch (ios->power_mode) { |
49 | case MMC_POWER_UP: | 41 | case MMC_POWER_UP: |
50 | case MMC_POWER_ON: | 42 | case MMC_POWER_ON: |
51 | /* | 43 | /* |
@@ -65,8 +57,7 @@ static u32 mop500_sdi0_vdd_handler(struct device *dev, unsigned int vdd, | |||
65 | break; | 57 | break; |
66 | } | 58 | } |
67 | 59 | ||
68 | return MCI_FBCLKEN | MCI_CMDDIREN | MCI_DATA0DIREN | | 60 | return 0; |
69 | MCI_DATA2DIREN | MCI_DATA31DIREN; | ||
70 | } | 61 | } |
71 | 62 | ||
72 | #ifdef CONFIG_STE_DMA40 | 63 | #ifdef CONFIG_STE_DMA40 |
@@ -90,13 +81,17 @@ static struct stedma40_chan_cfg mop500_sdi0_dma_cfg_tx = { | |||
90 | #endif | 81 | #endif |
91 | 82 | ||
92 | static struct mmci_platform_data mop500_sdi0_data = { | 83 | static struct mmci_platform_data mop500_sdi0_data = { |
93 | .vdd_handler = mop500_sdi0_vdd_handler, | 84 | .ios_handler = mop500_sdi0_ios_handler, |
94 | .ocr_mask = MMC_VDD_29_30, | 85 | .ocr_mask = MMC_VDD_29_30, |
95 | .f_max = 50000000, | 86 | .f_max = 50000000, |
96 | .capabilities = MMC_CAP_4_BIT_DATA | | 87 | .capabilities = MMC_CAP_4_BIT_DATA | |
97 | MMC_CAP_SD_HIGHSPEED | | 88 | MMC_CAP_SD_HIGHSPEED | |
98 | MMC_CAP_MMC_HIGHSPEED, | 89 | MMC_CAP_MMC_HIGHSPEED, |
99 | .gpio_wp = -1, | 90 | .gpio_wp = -1, |
91 | .sigdir = MCI_ST_FBCLKEN | | ||
92 | MCI_ST_CMDDIREN | | ||
93 | MCI_ST_DATA0DIREN | | ||
94 | MCI_ST_DATA2DIREN, | ||
100 | #ifdef CONFIG_STE_DMA40 | 95 | #ifdef CONFIG_STE_DMA40 |
101 | .dma_filter = stedma40_filter, | 96 | .dma_filter = stedma40_filter, |
102 | .dma_rx_param = &mop500_sdi0_dma_cfg_rx, | 97 | .dma_rx_param = &mop500_sdi0_dma_cfg_rx, |