]> git.kernelconcepts.de Git - karo-tx-linux.git/blob - arch/arm/mach-ux500/devices-db8500.c
Merge remote-tracking branch 'slave-dma/next'
[karo-tx-linux.git] / arch / arm / mach-ux500 / devices-db8500.c
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/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>
17
18 #include "setup.h"
19 #include "irqs.h"
20
21 #include "db8500-regs.h"
22 #include "devices-db8500.h"
23 #include "ste-dma40-db8500.h"
24
25 static struct resource dma40_resources[] = {
26         [0] = {
27                 .start = U8500_DMA_BASE,
28                 .end   = U8500_DMA_BASE + SZ_4K - 1,
29                 .flags = IORESOURCE_MEM,
30                 .name  = "base",
31         },
32         [1] = {
33                 .start = U8500_DMA_LCPA_BASE,
34                 .end   = U8500_DMA_LCPA_BASE + 2 * SZ_1K - 1,
35                 .flags = IORESOURCE_MEM,
36                 .name  = "lcpa",
37         },
38         [2] = {
39                 .start = IRQ_DB8500_DMA,
40                 .end   = IRQ_DB8500_DMA,
41                 .flags = IORESOURCE_IRQ,
42         }
43 };
44
45 struct stedma40_platform_data dma40_plat_data = {
46         .disabled_channels = {-1},
47 };
48
49 struct platform_device u8500_dma40_device = {
50         .dev = {
51                 .platform_data = &dma40_plat_data,
52                 .coherent_dma_mask = DMA_BIT_MASK(32),
53         },
54         .name = "dma40",
55         .id = 0,
56         .num_resources = ARRAY_SIZE(dma40_resources),
57         .resource = dma40_resources
58 };
59
60 struct resource keypad_resources[] = {
61         [0] = {
62                 .start = U8500_SKE_BASE,
63                 .end = U8500_SKE_BASE + SZ_4K - 1,
64                 .flags = IORESOURCE_MEM,
65         },
66         [1] = {
67                 .start = IRQ_DB8500_KB,
68                 .end = IRQ_DB8500_KB,
69                 .flags = IORESOURCE_IRQ,
70         },
71 };
72
73 struct platform_device u8500_ske_keypad_device = {
74         .name = "nmk-ske-keypad",
75         .id = -1,
76         .num_resources = ARRAY_SIZE(keypad_resources),
77         .resource = keypad_resources,
78 };
79
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,
86 };
87
88 static struct resource db8500_prcmu_res[] = {
89         {
90                 .name  = "prcmu",
91                 .start = U8500_PRCMU_BASE,
92                 .end   = U8500_PRCMU_BASE + SZ_8K - 1,
93                 .flags = IORESOURCE_MEM,
94         },
95         {
96                 .name  = "prcmu-tcdm",
97                 .start = U8500_PRCMU_TCDM_BASE,
98                 .end   = U8500_PRCMU_TCDM_BASE + SZ_4K - 1,
99                 .flags = IORESOURCE_MEM,
100         },
101         {
102                 .name  = "irq",
103                 .start = IRQ_DB8500_PRCMU1,
104                 .end   = IRQ_DB8500_PRCMU1,
105                 .flags = IORESOURCE_IRQ,
106         },
107         {
108                 .name  = "prcmu-tcpm",
109                 .start = U8500_PRCMU_TCPM_BASE,
110                 .end   = U8500_PRCMU_TCPM_BASE + SZ_32K - 1,
111                 .flags = IORESOURCE_MEM,
112         },
113 };
114
115 struct platform_device db8500_prcmu_device = {
116         .name                   = "db8500-prcmu",
117         .resource               = db8500_prcmu_res,
118         .num_resources          = ARRAY_SIZE(db8500_prcmu_res),
119         .dev = {
120                 .platform_data = &db8500_prcmu_pdata,
121         },
122 };