ARM: 6085/1: ux500: reorganize i2c devices
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / arch / arm / mach-ux500 / devices-db8500.c
blob397f862c9ef4425bb07e0fd00b3ca51961d819c6
1 /*
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
6 */
8 #include <linux/kernel.h>
9 #include <linux/platform_device.h>
10 #include <linux/interrupt.h>
11 #include <linux/io.h>
12 #include <linux/amba/bus.h>
14 #include <mach/hardware.h>
15 #include <mach/setup.h>
17 struct amba_device u8500_ssp0_device = {
18 .dev = {
19 .coherent_dma_mask = ~0,
20 .init_name = "ssp0",
22 .res = {
23 .start = U8500_SSP0_BASE,
24 .end = U8500_SSP0_BASE + SZ_4K - 1,
25 .flags = IORESOURCE_MEM,
27 .irq = {IRQ_SSP0, NO_IRQ },
28 /* ST-Ericsson modified id */
29 .periphid = SSP_PER_ID,
32 static struct resource u8500_i2c0_resources[] = {
33 [0] = {
34 .start = U8500_I2C0_BASE,
35 .end = U8500_I2C0_BASE + SZ_4K - 1,
36 .flags = IORESOURCE_MEM,
38 [1] = {
39 .start = IRQ_I2C0,
40 .end = IRQ_I2C0,
41 .flags = IORESOURCE_IRQ,
45 struct platform_device u8500_i2c0_device = {
46 .name = "nmk-i2c",
47 .id = 0,
48 .resource = u8500_i2c0_resources,
49 .num_resources = ARRAY_SIZE(u8500_i2c0_resources),
52 static struct resource u8500_i2c4_resources[] = {
53 [0] = {
54 .start = U8500_I2C4_BASE,
55 .end = U8500_I2C4_BASE + SZ_4K - 1,
56 .flags = IORESOURCE_MEM,
58 [1] = {
59 .start = IRQ_I2C4,
60 .end = IRQ_I2C4,
61 .flags = IORESOURCE_IRQ,
65 struct platform_device u8500_i2c4_device = {
66 .name = "nmk-i2c",
67 .id = 4,
68 .resource = u8500_i2c4_resources,
69 .num_resources = ARRAY_SIZE(u8500_i2c4_resources),