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>
14 #include <linux/amba/pl022.h>
15 #include <linux/platform_data/dma-ste-dma40.h>
16 #include <linux/mfd/dbx500-prcmu.h>
21 #include "db8500-regs.h"
22 #include "devices-db8500.h"
23 #include "ste-dma40-db8500.h"
25 static struct resource dma40_resources
[] = {
27 .start
= U8500_DMA_BASE
,
28 .end
= U8500_DMA_BASE
+ SZ_4K
- 1,
29 .flags
= IORESOURCE_MEM
,
33 .start
= U8500_DMA_LCPA_BASE
,
34 .end
= U8500_DMA_LCPA_BASE
+ 2 * SZ_1K
- 1,
35 .flags
= IORESOURCE_MEM
,
39 .start
= IRQ_DB8500_DMA
,
40 .end
= IRQ_DB8500_DMA
,
41 .flags
= IORESOURCE_IRQ
,
45 struct stedma40_platform_data dma40_plat_data
= {
46 .disabled_channels
= {-1},
49 struct platform_device u8500_dma40_device
= {
51 .platform_data
= &dma40_plat_data
,
55 .num_resources
= ARRAY_SIZE(dma40_resources
),
56 .resource
= dma40_resources
59 struct resource keypad_resources
[] = {
61 .start
= U8500_SKE_BASE
,
62 .end
= U8500_SKE_BASE
+ SZ_4K
- 1,
63 .flags
= IORESOURCE_MEM
,
66 .start
= IRQ_DB8500_KB
,
68 .flags
= IORESOURCE_IRQ
,
72 struct platform_device u8500_ske_keypad_device
= {
73 .name
= "nmk-ske-keypad",
75 .num_resources
= ARRAY_SIZE(keypad_resources
),
76 .resource
= keypad_resources
,
79 struct prcmu_pdata db8500_prcmu_pdata
= {
80 .ab_platdata
= &ab8500_platdata
,
81 .ab_irq
= IRQ_DB8500_AB8500
,
82 .irq_base
= IRQ_PRCMU_BASE
,
83 .version_offset
= DB8500_PRCMU_FW_VERSION_OFFSET
,
84 .legacy_offset
= DB8500_PRCMU_LEGACY_OFFSET
,
87 static struct resource db8500_prcmu_res
[] = {
90 .start
= U8500_PRCMU_BASE
,
91 .end
= U8500_PRCMU_BASE
+ SZ_8K
- 1,
92 .flags
= IORESOURCE_MEM
,
96 .start
= U8500_PRCMU_TCDM_BASE
,
97 .end
= U8500_PRCMU_TCDM_BASE
+ SZ_4K
- 1,
98 .flags
= IORESOURCE_MEM
,
102 .start
= IRQ_DB8500_PRCMU1
,
103 .end
= IRQ_DB8500_PRCMU1
,
104 .flags
= IORESOURCE_IRQ
,
107 .name
= "prcmu-tcpm",
108 .start
= U8500_PRCMU_TCPM_BASE
,
109 .end
= U8500_PRCMU_TCPM_BASE
+ SZ_32K
- 1,
110 .flags
= IORESOURCE_MEM
,
114 struct platform_device db8500_prcmu_device
= {
115 .name
= "db8500-prcmu",
116 .resource
= db8500_prcmu_res
,
117 .num_resources
= ARRAY_SIZE(db8500_prcmu_res
),
119 .platform_data
= &db8500_prcmu_pdata
,