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/amba/bus.h>
13 #include <linux/amba/pl022.h>
14 #include <linux/platform_data/dma-ste-dma40.h>
15 #include <linux/mfd/dbx500-prcmu.h>
20 #include "db8500-regs.h"
21 #include "devices-db8500.h"
22 #include "ste-dma40-db8500.h"
24 static struct resource dma40_resources[] = {
26 .start = U8500_DMA_BASE,
27 .end = U8500_DMA_BASE + SZ_4K - 1,
28 .flags = IORESOURCE_MEM,
32 .start = U8500_DMA_LCPA_BASE,
33 .end = U8500_DMA_LCPA_BASE + 2 * SZ_1K - 1,
34 .flags = IORESOURCE_MEM,
38 .start = IRQ_DB8500_DMA,
39 .end = IRQ_DB8500_DMA,
40 .flags = IORESOURCE_IRQ,
44 struct stedma40_platform_data dma40_plat_data = {
45 .disabled_channels = {-1},
48 struct platform_device u8500_dma40_device = {
50 .platform_data = &dma40_plat_data,
51 .coherent_dma_mask = DMA_BIT_MASK(32),
55 .num_resources = ARRAY_SIZE(dma40_resources),
56 .resource = dma40_resources
59 struct prcmu_pdata db8500_prcmu_pdata = {
60 .ab_platdata = &ab8500_platdata,
61 .ab_irq = IRQ_DB8500_AB8500,
62 .irq_base = IRQ_PRCMU_BASE,
63 .version_offset = DB8500_PRCMU_FW_VERSION_OFFSET,
64 .legacy_offset = DB8500_PRCMU_LEGACY_OFFSET,
67 static struct resource db8500_prcmu_res[] = {
70 .start = U8500_PRCMU_BASE,
71 .end = U8500_PRCMU_BASE + SZ_8K - 1,
72 .flags = IORESOURCE_MEM,
76 .start = U8500_PRCMU_TCDM_BASE,
77 .end = U8500_PRCMU_TCDM_BASE + SZ_4K - 1,
78 .flags = IORESOURCE_MEM,
82 .start = IRQ_DB8500_PRCMU1,
83 .end = IRQ_DB8500_PRCMU1,
84 .flags = IORESOURCE_IRQ,
88 .start = U8500_PRCMU_TCPM_BASE,
89 .end = U8500_PRCMU_TCPM_BASE + SZ_32K - 1,
90 .flags = IORESOURCE_MEM,
94 struct platform_device db8500_prcmu_device = {
95 .name = "db8500-prcmu",
96 .resource = db8500_prcmu_res,
97 .num_resources = ARRAY_SIZE(db8500_prcmu_res),
99 .platform_data = &db8500_prcmu_pdata,