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
,
52 .coherent_dma_mask
= DMA_BIT_MASK(32),
56 .num_resources
= ARRAY_SIZE(dma40_resources
),
57 .resource
= dma40_resources
60 struct resource keypad_resources
[] = {
62 .start
= U8500_SKE_BASE
,
63 .end
= U8500_SKE_BASE
+ SZ_4K
- 1,
64 .flags
= IORESOURCE_MEM
,
67 .start
= IRQ_DB8500_KB
,
69 .flags
= IORESOURCE_IRQ
,
73 struct platform_device u8500_ske_keypad_device
= {
74 .name
= "nmk-ske-keypad",
76 .num_resources
= ARRAY_SIZE(keypad_resources
),
77 .resource
= keypad_resources
,
80 struct prcmu_pdata db8500_prcmu_pdata
= {
81 .ab_platdata
= &ab8500_platdata
,
82 .ab_irq
= IRQ_DB8500_AB8500
,
83 .irq_base
= IRQ_PRCMU_BASE
,
84 .version_offset
= DB8500_PRCMU_FW_VERSION_OFFSET
,
85 .legacy_offset
= DB8500_PRCMU_LEGACY_OFFSET
,
88 static struct resource db8500_prcmu_res
[] = {
91 .start
= U8500_PRCMU_BASE
,
92 .end
= U8500_PRCMU_BASE
+ SZ_8K
- 1,
93 .flags
= IORESOURCE_MEM
,
97 .start
= U8500_PRCMU_TCDM_BASE
,
98 .end
= U8500_PRCMU_TCDM_BASE
+ SZ_4K
- 1,
99 .flags
= IORESOURCE_MEM
,
103 .start
= IRQ_DB8500_PRCMU1
,
104 .end
= IRQ_DB8500_PRCMU1
,
105 .flags
= IORESOURCE_IRQ
,
108 .name
= "prcmu-tcpm",
109 .start
= U8500_PRCMU_TCPM_BASE
,
110 .end
= U8500_PRCMU_TCPM_BASE
+ SZ_32K
- 1,
111 .flags
= IORESOURCE_MEM
,
115 struct platform_device db8500_prcmu_device
= {
116 .name
= "db8500-prcmu",
117 .resource
= db8500_prcmu_res
,
118 .num_resources
= ARRAY_SIZE(db8500_prcmu_res
),
120 .platform_data
= &db8500_prcmu_pdata
,