Rabin Vincent | 9e4e7fe | 2010-05-03 08:03:52 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) ST-Ericsson SA 2010 |
| 3 | * |
| 4 | * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson |
| 5 | * License terms: GNU General Public License (GPL) version 2 |
| 6 | */ |
| 7 | |
| 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> |
| 13 | |
| 14 | #include <mach/hardware.h> |
| 15 | #include <mach/setup.h> |
| 16 | |
| 17 | struct amba_device u8500_ssp0_device = { |
| 18 | .dev = { |
| 19 | .coherent_dma_mask = ~0, |
| 20 | .init_name = "ssp0", |
| 21 | }, |
| 22 | .res = { |
| 23 | .start = U8500_SSP0_BASE, |
| 24 | .end = U8500_SSP0_BASE + SZ_4K - 1, |
| 25 | .flags = IORESOURCE_MEM, |
| 26 | }, |
| 27 | .irq = {IRQ_SSP0, NO_IRQ }, |
| 28 | /* ST-Ericsson modified id */ |
| 29 | .periphid = SSP_PER_ID, |
| 30 | }; |
Rabin Vincent | f9faf23 | 2010-05-03 08:24:37 +0100 | [diff] [blame^] | 31 | |
| 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, |
| 37 | }, |
| 38 | [1] = { |
| 39 | .start = IRQ_I2C0, |
| 40 | .end = IRQ_I2C0, |
| 41 | .flags = IORESOURCE_IRQ, |
| 42 | } |
| 43 | }; |
| 44 | |
| 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), |
| 50 | }; |
| 51 | |
| 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, |
| 57 | }, |
| 58 | [1] = { |
| 59 | .start = IRQ_I2C4, |
| 60 | .end = IRQ_I2C4, |
| 61 | .flags = IORESOURCE_IRQ, |
| 62 | } |
| 63 | }; |
| 64 | |
| 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), |
| 70 | }; |