Merge tag 'soc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
[deliverable/linux.git] / arch / arm / mach-ux500 / devices-db8500.c
CommitLineData
9e4e7fe1
RV
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>
5b1f7ddf 12#include <linux/gpio.h>
9e4e7fe1 13#include <linux/amba/bus.h>
5d7b8467 14#include <linux/amba/pl022.h>
865fab60 15#include <linux/platform_data/dma-ste-dma40.h>
05ec260e 16#include <linux/mfd/dbx500-prcmu.h>
7b8ddb06 17
e657bcf6 18#include "setup.h"
eba52748 19#include "irqs.h"
9e4e7fe1 20
174e7796 21#include "db8500-regs.h"
05ec260e 22#include "devices-db8500.h"
7b8ddb06
LW
23#include "ste-dma40-db8500.h"
24
7b8ddb06
LW
25static struct resource dma40_resources[] = {
26 [0] = {
27 .start = U8500_DMA_BASE,
5aa12e8c 28 .end = U8500_DMA_BASE + SZ_4K - 1,
7b8ddb06 29 .flags = IORESOURCE_MEM,
5aa12e8c 30 .name = "base",
7b8ddb06
LW
31 },
32 [1] = {
33 .start = U8500_DMA_LCPA_BASE,
5aa12e8c 34 .end = U8500_DMA_LCPA_BASE + 2 * SZ_1K - 1,
7b8ddb06 35 .flags = IORESOURCE_MEM,
5aa12e8c 36 .name = "lcpa",
7b8ddb06
LW
37 },
38 [2] = {
6055930c
RV
39 .start = IRQ_DB8500_DMA,
40 .end = IRQ_DB8500_DMA,
5aa12e8c
JA
41 .flags = IORESOURCE_IRQ,
42 }
7b8ddb06
LW
43};
44
252f27b0 45struct stedma40_platform_data dma40_plat_data = {
59516725 46 .disabled_channels = {-1},
7b8ddb06
LW
47};
48
49struct platform_device u8500_dma40_device = {
50 .dev = {
51 .platform_data = &dma40_plat_data,
0a429fd1 52 .coherent_dma_mask = DMA_BIT_MASK(32),
7b8ddb06
LW
53 },
54 .name = "dma40",
55 .id = 0,
56 .num_resources = ARRAY_SIZE(dma40_resources),
57 .resource = dma40_resources
58};
59
4c61c845
SI
60struct 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
e43abe6f 73struct platform_device u8500_ske_keypad_device = {
4c61c845
SI
74 .name = "nmk-ske-keypad",
75 .id = -1,
76 .num_resources = ARRAY_SIZE(keypad_resources),
77 .resource = keypad_resources,
78};
05ec260e
LW
79
80struct prcmu_pdata db8500_prcmu_pdata = {
81 .ab_platdata = &ab8500_platdata,
55b175d7
AB
82 .ab_irq = IRQ_DB8500_AB8500,
83 .irq_base = IRQ_PRCMU_BASE,
05ec260e
LW
84 .version_offset = DB8500_PRCMU_FW_VERSION_OFFSET,
85 .legacy_offset = DB8500_PRCMU_LEGACY_OFFSET,
86};
87
88static 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,
5dc60e05 110 .end = U8500_PRCMU_TCPM_BASE + SZ_32K - 1,
05ec260e
LW
111 .flags = IORESOURCE_MEM,
112 },
113};
114
115struct 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};
This page took 0.239122 seconds and 5 git commands to generate.