2 * Copyright (C) ST-Ericsson SA 2010
4 * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson
5 * License terms: GNU General Public License (GPL) version 2
8 #include <linux/kernel.h>
9 #include <linux/platform_device.h>
10 #include <linux/interrupt.h>
12 #include <linux/gpio.h>
13 #include <linux/amba/bus.h>
15 #include <mach/hardware.h>
16 #include <mach/setup.h>
18 static struct nmk_gpio_platform_data u8500_gpio_data[] = {
19 GPIO_DATA("GPIO-0-31", 0),
20 GPIO_DATA("GPIO-32-63", 32), /* 37..63 not routed to pin */
21 GPIO_DATA("GPIO-64-95", 64),
22 GPIO_DATA("GPIO-96-127", 96), /* 98..127 not routed to pin */
23 GPIO_DATA("GPIO-128-159", 128),
24 GPIO_DATA("GPIO-160-191", 160), /* 172..191 not routed to pin */
25 GPIO_DATA("GPIO-192-223", 192),
26 GPIO_DATA("GPIO-224-255", 224), /* 231..255 not routed to pin */
27 GPIO_DATA("GPIO-256-288", 256), /* 268..288 not routed to pin */
30 static struct resource u8500_gpio_resources[] = {
42 struct platform_device u8500_gpio_devs[] = {
54 struct amba_device u8500_ssp0_device = {
56 .coherent_dma_mask = ~0,
60 .start = U8500_SSP0_BASE,
61 .end = U8500_SSP0_BASE + SZ_4K - 1,
62 .flags = IORESOURCE_MEM,
64 .irq = {IRQ_SSP0, NO_IRQ },
65 /* ST-Ericsson modified id */
66 .periphid = SSP_PER_ID,
69 static struct resource u8500_i2c0_resources[] = {
71 .start = U8500_I2C0_BASE,
72 .end = U8500_I2C0_BASE + SZ_4K - 1,
73 .flags = IORESOURCE_MEM,
78 .flags = IORESOURCE_IRQ,
82 struct platform_device u8500_i2c0_device = {
85 .resource = u8500_i2c0_resources,
86 .num_resources = ARRAY_SIZE(u8500_i2c0_resources),
89 static struct resource u8500_i2c4_resources[] = {
91 .start = U8500_I2C4_BASE,
92 .end = U8500_I2C4_BASE + SZ_4K - 1,
93 .flags = IORESOURCE_MEM,
98 .flags = IORESOURCE_IRQ,
102 struct platform_device u8500_i2c4_device = {
105 .resource = u8500_i2c4_resources,
106 .num_resources = ARRAY_SIZE(u8500_i2c4_resources),