aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-lpc32xx
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-01 21:24:44 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-01 21:24:44 -0400
commit11801e9de26992d37cb869cc74f389b6a7677e0e (patch)
tree322b7ea2b475d52da27d3e01f5bc2992bb708d59 /arch/arm/mach-lpc32xx
parent1a58ddfc0fcf3d83a92573c71771962f9b218993 (diff)
parentb6e3b5c2fea9c76617e101cbbc54ed14961f9dee (diff)
Merge tag 'soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM soc-specific updates from Olof Johansson: "Most notable here is probably the addition of basic support for the BCM2835, an SoC used in some of the Roku 2 players as well as the much-hyped Raspberry Pi, cleaned up and contributed by Stephen Warren. It's still early days on mainline support, with just the basics working. But it has to start somewhere! Beyond that there's some conversions of clock infrastructure on tegra to common clock, misc updates for several other platforms, and OMAP now has its own bus (under drivers/bus) to manage its devices through. This branch adds two new directories outside of arch/arm: drivers/irqchip for new irq controllers, and drivers/bus for the above OMAP bus. It's expected that some of the other platforms will migrate parts of their platforms to those directories over time as well." Fix up trivial conflicts with the clk infrastructure changes. * tag 'soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (62 commits) ARM: shmobile: add new __iomem annotation for new code ARM: LPC32xx: Support GPI 28 ARM: LPC32xx: Platform update for devicetree completion of spi-pl022 ARM: LPC32xx: Board cleanup irqchip: fill in empty Kconfig ARM: SAMSUNG: Add check for NULL in clock interface ARM: EXYNOS: Put PCM, Slimbus, Spdif clocks to off state ARM: EXYNOS: Add bus clock for FIMD ARM: SAMSUNG: Fix HDMI related warnings ARM: S3C24XX: Add .get_rate callback for "camif-upll" clock ARM: EXYNOS: Fix incorrect help text ARM: EXYNOS: Turn off clocks for NAND, OneNAND and TSI controllers ARM: OMAP: AM33xx hwmod: fixup SPI after platform_data move MAINTAINERS: add an entry for the BCM2835 ARM sub-architecture ARM: bcm2835: instantiate console UART ARM: bcm2835: add stub clock driver ARM: bcm2835: add system timer ARM: bcm2835: add interrupt controller driver ARM: add infra-structure for BCM2835 and Raspberry Pi ARM: tegra20: add CPU hotplug support ...
Diffstat (limited to 'arch/arm/mach-lpc32xx')
-rw-r--r--arch/arm/mach-lpc32xx/include/mach/gpio-lpc32xx.h2
-rw-r--r--arch/arm/mach-lpc32xx/irq.c7
-rw-r--r--arch/arm/mach-lpc32xx/phy3250.c42
3 files changed, 21 insertions, 30 deletions
diff --git a/arch/arm/mach-lpc32xx/include/mach/gpio-lpc32xx.h b/arch/arm/mach-lpc32xx/include/mach/gpio-lpc32xx.h
index 1816e22a3479..a544e962a818 100644
--- a/arch/arm/mach-lpc32xx/include/mach/gpio-lpc32xx.h
+++ b/arch/arm/mach-lpc32xx/include/mach/gpio-lpc32xx.h
@@ -30,7 +30,7 @@
30#define LPC32XX_GPIO_P1_MAX 24 30#define LPC32XX_GPIO_P1_MAX 24
31#define LPC32XX_GPIO_P2_MAX 13 31#define LPC32XX_GPIO_P2_MAX 13
32#define LPC32XX_GPIO_P3_MAX 6 32#define LPC32XX_GPIO_P3_MAX 6
33#define LPC32XX_GPI_P3_MAX 28 33#define LPC32XX_GPI_P3_MAX 29
34#define LPC32XX_GPO_P3_MAX 24 34#define LPC32XX_GPO_P3_MAX 24
35 35
36#define LPC32XX_GPIO_P0_GRP 0 36#define LPC32XX_GPIO_P0_GRP 0
diff --git a/arch/arm/mach-lpc32xx/irq.c b/arch/arm/mach-lpc32xx/irq.c
index 5b1cc35e6fba..3c6332753358 100644
--- a/arch/arm/mach-lpc32xx/irq.c
+++ b/arch/arm/mach-lpc32xx/irq.c
@@ -283,21 +283,25 @@ static int lpc32xx_set_irq_type(struct irq_data *d, unsigned int type)
283 case IRQ_TYPE_EDGE_RISING: 283 case IRQ_TYPE_EDGE_RISING:
284 /* Rising edge sensitive */ 284 /* Rising edge sensitive */
285 __lpc32xx_set_irq_type(d->hwirq, 1, 1); 285 __lpc32xx_set_irq_type(d->hwirq, 1, 1);
286 __irq_set_handler_locked(d->hwirq, handle_edge_irq);
286 break; 287 break;
287 288
288 case IRQ_TYPE_EDGE_FALLING: 289 case IRQ_TYPE_EDGE_FALLING:
289 /* Falling edge sensitive */ 290 /* Falling edge sensitive */
290 __lpc32xx_set_irq_type(d->hwirq, 0, 1); 291 __lpc32xx_set_irq_type(d->hwirq, 0, 1);
292 __irq_set_handler_locked(d->hwirq, handle_edge_irq);
291 break; 293 break;
292 294
293 case IRQ_TYPE_LEVEL_LOW: 295 case IRQ_TYPE_LEVEL_LOW:
294 /* Low level sensitive */ 296 /* Low level sensitive */
295 __lpc32xx_set_irq_type(d->hwirq, 0, 0); 297 __lpc32xx_set_irq_type(d->hwirq, 0, 0);
298 __irq_set_handler_locked(d->hwirq, handle_level_irq);
296 break; 299 break;
297 300
298 case IRQ_TYPE_LEVEL_HIGH: 301 case IRQ_TYPE_LEVEL_HIGH:
299 /* High level sensitive */ 302 /* High level sensitive */
300 __lpc32xx_set_irq_type(d->hwirq, 1, 0); 303 __lpc32xx_set_irq_type(d->hwirq, 1, 0);
304 __irq_set_handler_locked(d->hwirq, handle_level_irq);
301 break; 305 break;
302 306
303 /* Other modes are not supported */ 307 /* Other modes are not supported */
@@ -305,9 +309,6 @@ static int lpc32xx_set_irq_type(struct irq_data *d, unsigned int type)
305 return -EINVAL; 309 return -EINVAL;
306 } 310 }
307 311
308 /* Ok to use the level handler for all types */
309 irq_set_handler(d->hwirq, handle_level_irq);
310
311 return 0; 312 return 0;
312} 313}
313 314
diff --git a/arch/arm/mach-lpc32xx/phy3250.c b/arch/arm/mach-lpc32xx/phy3250.c
index b07dcc90829d..e8ff4c3f0566 100644
--- a/arch/arm/mach-lpc32xx/phy3250.c
+++ b/arch/arm/mach-lpc32xx/phy3250.c
@@ -24,12 +24,9 @@
24#include <linux/irq.h> 24#include <linux/irq.h>
25#include <linux/dma-mapping.h> 25#include <linux/dma-mapping.h>
26#include <linux/device.h> 26#include <linux/device.h>
27#include <linux/spi/spi.h>
28#include <linux/spi/eeprom.h>
29#include <linux/gpio.h> 27#include <linux/gpio.h>
30#include <linux/amba/bus.h> 28#include <linux/amba/bus.h>
31#include <linux/amba/clcd.h> 29#include <linux/amba/clcd.h>
32#include <linux/amba/pl022.h>
33#include <linux/amba/pl08x.h> 30#include <linux/amba/pl08x.h>
34#include <linux/amba/mmci.h> 31#include <linux/amba/mmci.h>
35#include <linux/of.h> 32#include <linux/of.h>
@@ -37,6 +34,8 @@
37#include <linux/of_irq.h> 34#include <linux/of_irq.h>
38#include <linux/of_platform.h> 35#include <linux/of_platform.h>
39#include <linux/clk.h> 36#include <linux/clk.h>
37#include <linux/mtd/lpc32xx_slc.h>
38#include <linux/mtd/lpc32xx_mlc.h>
40 39
41#include <asm/setup.h> 40#include <asm/setup.h>
42#include <asm/mach-types.h> 41#include <asm/mach-types.h>
@@ -156,21 +155,6 @@ static struct clcd_board lpc32xx_clcd_data = {
156 .remove = lpc32xx_clcd_remove, 155 .remove = lpc32xx_clcd_remove,
157}; 156};
158 157
159/*
160 * AMBA SSP (SPI)
161 */
162static struct pl022_ssp_controller lpc32xx_ssp0_data = {
163 .bus_id = 0,
164 .num_chipselect = 1,
165 .enable_dma = 0,
166};
167
168static struct pl022_ssp_controller lpc32xx_ssp1_data = {
169 .bus_id = 1,
170 .num_chipselect = 1,
171 .enable_dma = 0,
172};
173
174static struct pl08x_channel_data pl08x_slave_channels[] = { 158static struct pl08x_channel_data pl08x_slave_channels[] = {
175 { 159 {
176 .bus_id = "nand-slc", 160 .bus_id = "nand-slc",
@@ -223,13 +207,25 @@ static struct mmci_platform_data lpc32xx_mmci_data = {
223 * gather, and the MMCI driver doesn't do it this way */ 207 * gather, and the MMCI driver doesn't do it this way */
224}; 208};
225 209
210static struct lpc32xx_slc_platform_data lpc32xx_slc_data = {
211 .dma_filter = pl08x_filter_id,
212};
213
214static struct lpc32xx_mlc_platform_data lpc32xx_mlc_data = {
215 .dma_filter = pl08x_filter_id,
216};
217
226static const struct of_dev_auxdata lpc32xx_auxdata_lookup[] __initconst = { 218static const struct of_dev_auxdata lpc32xx_auxdata_lookup[] __initconst = {
227 OF_DEV_AUXDATA("arm,pl022", 0x20084000, "dev:ssp0", &lpc32xx_ssp0_data), 219 OF_DEV_AUXDATA("arm,pl022", 0x20084000, "dev:ssp0", NULL),
228 OF_DEV_AUXDATA("arm,pl022", 0x2008C000, "dev:ssp1", &lpc32xx_ssp1_data), 220 OF_DEV_AUXDATA("arm,pl022", 0x2008C000, "dev:ssp1", NULL),
229 OF_DEV_AUXDATA("arm,pl110", 0x31040000, "dev:clcd", &lpc32xx_clcd_data), 221 OF_DEV_AUXDATA("arm,pl110", 0x31040000, "dev:clcd", &lpc32xx_clcd_data),
230 OF_DEV_AUXDATA("arm,pl080", 0x31000000, "pl08xdmac", &pl08x_pd), 222 OF_DEV_AUXDATA("arm,pl080", 0x31000000, "pl08xdmac", &pl08x_pd),
231 OF_DEV_AUXDATA("arm,pl18x", 0x20098000, "20098000.sd", 223 OF_DEV_AUXDATA("arm,pl18x", 0x20098000, "20098000.sd",
232 &lpc32xx_mmci_data), 224 &lpc32xx_mmci_data),
225 OF_DEV_AUXDATA("nxp,lpc3220-slc", 0x20020000, "20020000.flash",
226 &lpc32xx_slc_data),
227 OF_DEV_AUXDATA("nxp,lpc3220-mlc", 0x200a8000, "200a8000.flash",
228 &lpc32xx_mlc_data),
233 { } 229 { }
234}; 230};
235 231
@@ -253,12 +249,6 @@ static void __init lpc3250_machine_init(void)
253 249
254 of_platform_populate(NULL, of_default_bus_match_table, 250 of_platform_populate(NULL, of_default_bus_match_table,
255 lpc32xx_auxdata_lookup, NULL); 251 lpc32xx_auxdata_lookup, NULL);
256
257 /* Register GPIOs used on this board */
258 if (gpio_request(MMC_PWR_ENABLE_GPIO, "mmc_power_en"))
259 pr_err("Error requesting gpio %u", MMC_PWR_ENABLE_GPIO);
260 else if (gpio_direction_output(MMC_PWR_ENABLE_GPIO, 1))
261 pr_err("Error setting gpio %u to output", MMC_PWR_ENABLE_GPIO);
262} 252}
263 253
264static char const *lpc32xx_dt_compat[] __initdata = { 254static char const *lpc32xx_dt_compat[] __initdata = {