aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/devicetree/bindings/bus/ti-gpmc.txt84
-rw-r--r--Documentation/devicetree/bindings/mtd/gpmc-nand.txt80
-rw-r--r--Documentation/devicetree/bindings/mtd/gpmc-onenand.txt43
-rw-r--r--arch/arm/mach-omap2/gpmc-nand.c15
-rw-r--r--arch/arm/mach-omap2/gpmc-onenand.c2
-rw-r--r--arch/arm/mach-omap2/gpmc.c232
-rw-r--r--arch/arm/mach-u300/core.c1087
-rw-r--r--arch/arm/mach-u300/dma_channels.h60
-rw-r--r--arch/arm/mach-u300/include/mach/coh901318.h267
-rw-r--r--arch/arm/mach-u300/spi.c3
-rw-r--r--arch/arm/plat-spear/restart.c2
-rw-r--r--drivers/clk/versatile/clk-vexpress.c3
-rw-r--r--drivers/clocksource/nomadik-mtu.c11
-rw-r--r--drivers/cpufreq/Makefile2
-rw-r--r--drivers/cpufreq/dbx500-cpufreq.c (renamed from drivers/cpufreq/db8500-cpufreq.c)101
-rw-r--r--drivers/dma/coh901318.c1302
-rw-r--r--drivers/dma/coh901318.h (renamed from drivers/dma/coh901318_lli.h)35
-rw-r--r--drivers/dma/coh901318_lli.c4
-rw-r--r--drivers/mfd/db8500-prcmu.c4
-rw-r--r--drivers/mtd/nand/omap2.c4
-rw-r--r--drivers/mtd/onenand/omap2.c4
-rw-r--r--include/linux/amba/sp810.h (renamed from arch/arm/include/asm/hardware/sp810.h)0
-rw-r--r--include/linux/platform_data/dma-coh901318.h72
-rw-r--r--include/linux/platform_data/mtd-nand-omap2.h4
-rw-r--r--include/linux/platform_data/mtd-onenand-omap2.h3
25 files changed, 1880 insertions, 1544 deletions
diff --git a/Documentation/devicetree/bindings/bus/ti-gpmc.txt b/Documentation/devicetree/bindings/bus/ti-gpmc.txt
new file mode 100644
index 000000000000..5ddb2e9efaaa
--- /dev/null
+++ b/Documentation/devicetree/bindings/bus/ti-gpmc.txt
@@ -0,0 +1,84 @@
1Device tree bindings for OMAP general purpose memory controllers (GPMC)
2
3The actual devices are instantiated from the child nodes of a GPMC node.
4
5Required properties:
6
7 - compatible: Should be set to one of the following:
8
9 ti,omap2420-gpmc (omap2420)
10 ti,omap2430-gpmc (omap2430)
11 ti,omap3430-gpmc (omap3430 & omap3630)
12 ti,omap4430-gpmc (omap4430 & omap4460 & omap543x)
13 ti,am3352-gpmc (am335x devices)
14
15 - reg: A resource specifier for the register space
16 (see the example below)
17 - ti,hwmods: Should be set to "ti,gpmc" until the DT transition is
18 completed.
19 - #address-cells: Must be set to 2 to allow memory address translation
20 - #size-cells: Must be set to 1 to allow CS address passing
21 - gpmc,num-cs: The maximum number of chip-select lines that controller
22 can support.
23 - gpmc,num-waitpins: The maximum number of wait pins that controller can
24 support.
25 - ranges: Must be set up to reflect the memory layout with four
26 integer values for each chip-select line in use:
27
28 <cs-number> 0 <physical address of mapping> <size>
29
30 Currently, calculated values derived from the contents
31 of the per-CS register GPMC_CONFIG7 (as set up by the
32 bootloader) are used for the physical address decoding.
33 As this will change in the future, filling correct
34 values here is a requirement.
35
36Timing properties for child nodes. All are optional and default to 0.
37
38 - gpmc,sync-clk: Minimum clock period for synchronous mode, in picoseconds
39
40 Chip-select signal timings corresponding to GPMC_CONFIG2:
41 - gpmc,cs-on: Assertion time
42 - gpmc,cs-rd-off: Read deassertion time
43 - gpmc,cs-wr-off: Write deassertion time
44
45 ADV signal timings corresponding to GPMC_CONFIG3:
46 - gpmc,adv-on: Assertion time
47 - gpmc,adv-rd-off: Read deassertion time
48 - gpmc,adv-wr-off: Write deassertion time
49
50 WE signals timings corresponding to GPMC_CONFIG4:
51 - gpmc,we-on: Assertion time
52 - gpmc,we-off: Deassertion time
53
54 OE signals timings corresponding to GPMC_CONFIG4:
55 - gpmc,oe-on: Assertion time
56 - gpmc,oe-off: Deassertion time
57
58 Access time and cycle time timings corresponding to GPMC_CONFIG5:
59 - gpmc,page-burst-access: Multiple access word delay
60 - gpmc,access: Start-cycle to first data valid delay
61 - gpmc,rd-cycle: Total read cycle time
62 - gpmc,wr-cycle: Total write cycle time
63
64The following are only applicable to OMAP3+ and AM335x:
65 - gpmc,wr-access
66 - gpmc,wr-data-mux-bus
67
68
69Example for an AM33xx board:
70
71 gpmc: gpmc@50000000 {
72 compatible = "ti,am3352-gpmc";
73 ti,hwmods = "gpmc";
74 reg = <0x50000000 0x2000>;
75 interrupts = <100>;
76
77 gpmc,num-cs = <8>;
78 gpmc,num-waitpins = <2>;
79 #address-cells = <2>;
80 #size-cells = <1>;
81 ranges = <0 0 0x08000000 0x10000000>; /* CS0 @addr 0x8000000, size 0x10000000 */
82
83 /* child nodes go here */
84 };
diff --git a/Documentation/devicetree/bindings/mtd/gpmc-nand.txt b/Documentation/devicetree/bindings/mtd/gpmc-nand.txt
new file mode 100644
index 000000000000..e7f8d7ed47eb
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/gpmc-nand.txt
@@ -0,0 +1,80 @@
1Device tree bindings for GPMC connected NANDs
2
3GPMC connected NAND (found on OMAP boards) are represented as child nodes of
4the GPMC controller with a name of "nand".
5
6All timing relevant properties as well as generic gpmc child properties are
7explained in a separate documents - please refer to
8Documentation/devicetree/bindings/bus/ti-gpmc.txt
9
10For NAND specific properties such as ECC modes or bus width, please refer to
11Documentation/devicetree/bindings/mtd/nand.txt
12
13
14Required properties:
15
16 - reg: The CS line the peripheral is connected to
17
18Optional properties:
19
20 - nand-bus-width: Set this numeric value to 16 if the hardware
21 is wired that way. If not specified, a bus
22 width of 8 is assumed.
23
24 - ti,nand-ecc-opt: A string setting the ECC layout to use. One of:
25
26 "sw" Software method (default)
27 "hw" Hardware method
28 "hw-romcode" gpmc hamming mode method & romcode layout
29 "bch4" 4-bit BCH ecc code
30 "bch8" 8-bit BCH ecc code
31
32 - elm_id: Specifies elm device node. This is required to support BCH
33 error correction using ELM module.
34
35For inline partiton table parsing (optional):
36
37 - #address-cells: should be set to 1
38 - #size-cells: should be set to 1
39
40Example for an AM33xx board:
41
42 gpmc: gpmc@50000000 {
43 compatible = "ti,am3352-gpmc";
44 ti,hwmods = "gpmc";
45 reg = <0x50000000 0x1000000>;
46 interrupts = <100>;
47 gpmc,num-cs = <8>;
48 gpmc,num-waitpins = <2>;
49 #address-cells = <2>;
50 #size-cells = <1>;
51 ranges = <0 0 0x08000000 0x2000>; /* CS0: NAND */
52 elm_id = <&elm>;
53
54 nand@0,0 {
55 reg = <0 0 0>; /* CS0, offset 0 */
56 nand-bus-width = <16>;
57 ti,nand-ecc-opt = "bch8";
58
59 gpmc,sync-clk = <0>;
60 gpmc,cs-on = <0>;
61 gpmc,cs-rd-off = <44>;
62 gpmc,cs-wr-off = <44>;
63 gpmc,adv-on = <6>;
64 gpmc,adv-rd-off = <34>;
65 gpmc,adv-wr-off = <44>;
66 gpmc,we-off = <40>;
67 gpmc,oe-off = <54>;
68 gpmc,access = <64>;
69 gpmc,rd-cycle = <82>;
70 gpmc,wr-cycle = <82>;
71 gpmc,wr-access = <40>;
72 gpmc,wr-data-mux-bus = <0>;
73
74 #address-cells = <1>;
75 #size-cells = <1>;
76
77 /* partitions go here */
78 };
79 };
80
diff --git a/Documentation/devicetree/bindings/mtd/gpmc-onenand.txt b/Documentation/devicetree/bindings/mtd/gpmc-onenand.txt
new file mode 100644
index 000000000000..deec9da224a2
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/gpmc-onenand.txt
@@ -0,0 +1,43 @@
1Device tree bindings for GPMC connected OneNANDs
2
3GPMC connected OneNAND (found on OMAP boards) are represented as child nodes of
4the GPMC controller with a name of "onenand".
5
6All timing relevant properties as well as generic gpmc child properties are
7explained in a separate documents - please refer to
8Documentation/devicetree/bindings/bus/ti-gpmc.txt
9
10Required properties:
11
12 - reg: The CS line the peripheral is connected to
13
14Optional properties:
15
16 - dma-channel: DMA Channel index
17
18For inline partiton table parsing (optional):
19
20 - #address-cells: should be set to 1
21 - #size-cells: should be set to 1
22
23Example for an OMAP3430 board:
24
25 gpmc: gpmc@6e000000 {
26 compatible = "ti,omap3430-gpmc";
27 ti,hwmods = "gpmc";
28 reg = <0x6e000000 0x1000000>;
29 interrupts = <20>;
30 gpmc,num-cs = <8>;
31 gpmc,num-waitpins = <4>;
32 #address-cells = <2>;
33 #size-cells = <1>;
34
35 onenand@0 {
36 reg = <0 0 0>; /* CS0, offset 0 */
37
38 #address-cells = <1>;
39 #size-cells = <1>;
40
41 /* partitions go here */
42 };
43 };
diff --git a/arch/arm/mach-omap2/gpmc-nand.c b/arch/arm/mach-omap2/gpmc-nand.c
index db969a5c4998..afc1e8c32d6c 100644
--- a/arch/arm/mach-omap2/gpmc-nand.c
+++ b/arch/arm/mach-omap2/gpmc-nand.c
@@ -89,20 +89,21 @@ static int omap2_nand_gpmc_retime(
89 return 0; 89 return 0;
90} 90}
91 91
92static bool __init gpmc_hwecc_bch_capable(enum omap_ecc ecc_opt) 92static bool gpmc_hwecc_bch_capable(enum omap_ecc ecc_opt)
93{ 93{
94 /* support only OMAP3 class */ 94 /* support only OMAP3 class */
95 if (!cpu_is_omap34xx()) { 95 if (!cpu_is_omap34xx() && !soc_is_am33xx()) {
96 pr_err("BCH ecc is not supported on this CPU\n"); 96 pr_err("BCH ecc is not supported on this CPU\n");
97 return 0; 97 return 0;
98 } 98 }
99 99
100 /* 100 /*
101 * For now, assume 4-bit mode is only supported on OMAP3630 ES1.x, x>=1. 101 * For now, assume 4-bit mode is only supported on OMAP3630 ES1.x, x>=1
102 * Other chips may be added if confirmed to work. 102 * and AM33xx derivates. Other chips may be added if confirmed to work.
103 */ 103 */
104 if ((ecc_opt == OMAP_ECC_BCH4_CODE_HW) && 104 if ((ecc_opt == OMAP_ECC_BCH4_CODE_HW) &&
105 (!cpu_is_omap3630() || (GET_OMAP_REVISION() == 0))) { 105 (!cpu_is_omap3630() || (GET_OMAP_REVISION() == 0)) &&
106 (!soc_is_am33xx())) {
106 pr_err("BCH 4-bit mode is not supported on this CPU\n"); 107 pr_err("BCH 4-bit mode is not supported on this CPU\n");
107 return 0; 108 return 0;
108 } 109 }
@@ -110,8 +111,8 @@ static bool __init gpmc_hwecc_bch_capable(enum omap_ecc ecc_opt)
110 return 1; 111 return 1;
111} 112}
112 113
113int __init gpmc_nand_init(struct omap_nand_platform_data *gpmc_nand_data, 114int gpmc_nand_init(struct omap_nand_platform_data *gpmc_nand_data,
114 struct gpmc_timings *gpmc_t) 115 struct gpmc_timings *gpmc_t)
115{ 116{
116 int err = 0; 117 int err = 0;
117 struct device *dev = &gpmc_nand_device.dev; 118 struct device *dev = &gpmc_nand_device.dev;
diff --git a/arch/arm/mach-omap2/gpmc-onenand.c b/arch/arm/mach-omap2/gpmc-onenand.c
index 94a349e4dc96..fadd87435cd0 100644
--- a/arch/arm/mach-omap2/gpmc-onenand.c
+++ b/arch/arm/mach-omap2/gpmc-onenand.c
@@ -356,7 +356,7 @@ static int gpmc_onenand_setup(void __iomem *onenand_base, int *freq_ptr)
356 return ret; 356 return ret;
357} 357}
358 358
359void __init gpmc_onenand_init(struct omap_onenand_platform_data *_onenand_data) 359void gpmc_onenand_init(struct omap_onenand_platform_data *_onenand_data)
360{ 360{
361 int err; 361 int err;
362 362
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index 64bac53da0e8..03d771349be6 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -25,6 +25,10 @@
25#include <linux/module.h> 25#include <linux/module.h>
26#include <linux/interrupt.h> 26#include <linux/interrupt.h>
27#include <linux/platform_device.h> 27#include <linux/platform_device.h>
28#include <linux/of.h>
29#include <linux/of_mtd.h>
30#include <linux/of_device.h>
31#include <linux/mtd/nand.h>
28 32
29#include <linux/platform_data/mtd-nand-omap2.h> 33#include <linux/platform_data/mtd-nand-omap2.h>
30 34
@@ -34,6 +38,8 @@
34#include "common.h" 38#include "common.h"
35#include "omap_device.h" 39#include "omap_device.h"
36#include "gpmc.h" 40#include "gpmc.h"
41#include "gpmc-nand.h"
42#include "gpmc-onenand.h"
37 43
38#define DEVICE_NAME "omap-gpmc" 44#define DEVICE_NAME "omap-gpmc"
39 45
@@ -145,7 +151,8 @@ static unsigned gpmc_irq_start;
145static struct resource gpmc_mem_root; 151static struct resource gpmc_mem_root;
146static struct resource gpmc_cs_mem[GPMC_CS_NUM]; 152static struct resource gpmc_cs_mem[GPMC_CS_NUM];
147static DEFINE_SPINLOCK(gpmc_mem_lock); 153static DEFINE_SPINLOCK(gpmc_mem_lock);
148static unsigned int gpmc_cs_map; /* flag for cs which are initialized */ 154/* Define chip-selects as reserved by default until probe completes */
155static unsigned int gpmc_cs_map = ((1 << GPMC_CS_NUM) - 1);
149static struct device *gpmc_dev; 156static struct device *gpmc_dev;
150static int gpmc_irq; 157static int gpmc_irq;
151static resource_size_t phys_base, mem_size; 158static resource_size_t phys_base, mem_size;
@@ -1118,9 +1125,216 @@ int gpmc_calc_timings(struct gpmc_timings *gpmc_t,
1118 /* TODO: remove, see function definition */ 1125 /* TODO: remove, see function definition */
1119 gpmc_convert_ps_to_ns(gpmc_t); 1126 gpmc_convert_ps_to_ns(gpmc_t);
1120 1127
1128 /* Now the GPMC is initialised, unreserve the chip-selects */
1129 gpmc_cs_map = 0;
1130
1121 return 0; 1131 return 0;
1122} 1132}
1123 1133
1134#ifdef CONFIG_OF
1135static struct of_device_id gpmc_dt_ids[] = {
1136 { .compatible = "ti,omap2420-gpmc" },
1137 { .compatible = "ti,omap2430-gpmc" },
1138 { .compatible = "ti,omap3430-gpmc" }, /* omap3430 & omap3630 */
1139 { .compatible = "ti,omap4430-gpmc" }, /* omap4430 & omap4460 & omap543x */
1140 { .compatible = "ti,am3352-gpmc" }, /* am335x devices */
1141 { }
1142};
1143MODULE_DEVICE_TABLE(of, gpmc_dt_ids);
1144
1145static void __maybe_unused gpmc_read_timings_dt(struct device_node *np,
1146 struct gpmc_timings *gpmc_t)
1147{
1148 u32 val;
1149
1150 memset(gpmc_t, 0, sizeof(*gpmc_t));
1151
1152 /* minimum clock period for syncronous mode */
1153 if (!of_property_read_u32(np, "gpmc,sync-clk", &val))
1154 gpmc_t->sync_clk = val;
1155
1156 /* chip select timtings */
1157 if (!of_property_read_u32(np, "gpmc,cs-on", &val))
1158 gpmc_t->cs_on = val;
1159
1160 if (!of_property_read_u32(np, "gpmc,cs-rd-off", &val))
1161 gpmc_t->cs_rd_off = val;
1162
1163 if (!of_property_read_u32(np, "gpmc,cs-wr-off", &val))
1164 gpmc_t->cs_wr_off = val;
1165
1166 /* ADV signal timings */
1167 if (!of_property_read_u32(np, "gpmc,adv-on", &val))
1168 gpmc_t->adv_on = val;
1169
1170 if (!of_property_read_u32(np, "gpmc,adv-rd-off", &val))
1171 gpmc_t->adv_rd_off = val;
1172
1173 if (!of_property_read_u32(np, "gpmc,adv-wr-off", &val))
1174 gpmc_t->adv_wr_off = val;
1175
1176 /* WE signal timings */
1177 if (!of_property_read_u32(np, "gpmc,we-on", &val))
1178 gpmc_t->we_on = val;
1179
1180 if (!of_property_read_u32(np, "gpmc,we-off", &val))
1181 gpmc_t->we_off = val;
1182
1183 /* OE signal timings */
1184 if (!of_property_read_u32(np, "gpmc,oe-on", &val))
1185 gpmc_t->oe_on = val;
1186
1187 if (!of_property_read_u32(np, "gpmc,oe-off", &val))
1188 gpmc_t->oe_off = val;
1189
1190 /* access and cycle timings */
1191 if (!of_property_read_u32(np, "gpmc,page-burst-access", &val))
1192 gpmc_t->page_burst_access = val;
1193
1194 if (!of_property_read_u32(np, "gpmc,access", &val))
1195 gpmc_t->access = val;
1196
1197 if (!of_property_read_u32(np, "gpmc,rd-cycle", &val))
1198 gpmc_t->rd_cycle = val;
1199
1200 if (!of_property_read_u32(np, "gpmc,wr-cycle", &val))
1201 gpmc_t->wr_cycle = val;
1202
1203 /* only for OMAP3430 */
1204 if (!of_property_read_u32(np, "gpmc,wr-access", &val))
1205 gpmc_t->wr_access = val;
1206
1207 if (!of_property_read_u32(np, "gpmc,wr-data-mux-bus", &val))
1208 gpmc_t->wr_data_mux_bus = val;
1209}
1210
1211#ifdef CONFIG_MTD_NAND
1212
1213static const char * const nand_ecc_opts[] = {
1214 [OMAP_ECC_HAMMING_CODE_DEFAULT] = "sw",
1215 [OMAP_ECC_HAMMING_CODE_HW] = "hw",
1216 [OMAP_ECC_HAMMING_CODE_HW_ROMCODE] = "hw-romcode",
1217 [OMAP_ECC_BCH4_CODE_HW] = "bch4",
1218 [OMAP_ECC_BCH8_CODE_HW] = "bch8",
1219};
1220
1221static int gpmc_probe_nand_child(struct platform_device *pdev,
1222 struct device_node *child)
1223{
1224 u32 val;
1225 const char *s;
1226 struct gpmc_timings gpmc_t;
1227 struct omap_nand_platform_data *gpmc_nand_data;
1228
1229 if (of_property_read_u32(child, "reg", &val) < 0) {
1230 dev_err(&pdev->dev, "%s has no 'reg' property\n",
1231 child->full_name);
1232 return -ENODEV;
1233 }
1234
1235 gpmc_nand_data = devm_kzalloc(&pdev->dev, sizeof(*gpmc_nand_data),
1236 GFP_KERNEL);
1237 if (!gpmc_nand_data)
1238 return -ENOMEM;
1239
1240 gpmc_nand_data->cs = val;
1241 gpmc_nand_data->of_node = child;
1242
1243 if (!of_property_read_string(child, "ti,nand-ecc-opt", &s))
1244 for (val = 0; val < ARRAY_SIZE(nand_ecc_opts); val++)
1245 if (!strcasecmp(s, nand_ecc_opts[val])) {
1246 gpmc_nand_data->ecc_opt = val;
1247 break;
1248 }
1249
1250 val = of_get_nand_bus_width(child);
1251 if (val == 16)
1252 gpmc_nand_data->devsize = NAND_BUSWIDTH_16;
1253
1254 gpmc_read_timings_dt(child, &gpmc_t);
1255 gpmc_nand_init(gpmc_nand_data, &gpmc_t);
1256
1257 return 0;
1258}
1259#else
1260static int gpmc_probe_nand_child(struct platform_device *pdev,
1261 struct device_node *child)
1262{
1263 return 0;
1264}
1265#endif
1266
1267#ifdef CONFIG_MTD_ONENAND
1268static int gpmc_probe_onenand_child(struct platform_device *pdev,
1269 struct device_node *child)
1270{
1271 u32 val;
1272 struct omap_onenand_platform_data *gpmc_onenand_data;
1273
1274 if (of_property_read_u32(child, "reg", &val) < 0) {
1275 dev_err(&pdev->dev, "%s has no 'reg' property\n",
1276 child->full_name);
1277 return -ENODEV;
1278 }
1279
1280 gpmc_onenand_data = devm_kzalloc(&pdev->dev, sizeof(*gpmc_onenand_data),
1281 GFP_KERNEL);
1282 if (!gpmc_onenand_data)
1283 return -ENOMEM;
1284
1285 gpmc_onenand_data->cs = val;
1286 gpmc_onenand_data->of_node = child;
1287 gpmc_onenand_data->dma_channel = -1;
1288
1289 if (!of_property_read_u32(child, "dma-channel", &val))
1290 gpmc_onenand_data->dma_channel = val;
1291
1292 gpmc_onenand_init(gpmc_onenand_data);
1293
1294 return 0;
1295}
1296#else
1297static int gpmc_probe_onenand_child(struct platform_device *pdev,
1298 struct device_node *child)
1299{
1300 return 0;
1301}
1302#endif
1303
1304static int gpmc_probe_dt(struct platform_device *pdev)
1305{
1306 int ret;
1307 struct device_node *child;
1308 const struct of_device_id *of_id =
1309 of_match_device(gpmc_dt_ids, &pdev->dev);
1310
1311 if (!of_id)
1312 return 0;
1313
1314 for_each_node_by_name(child, "nand") {
1315 ret = gpmc_probe_nand_child(pdev, child);
1316 if (ret < 0) {
1317 of_node_put(child);
1318 return ret;
1319 }
1320 }
1321
1322 for_each_node_by_name(child, "onenand") {
1323 ret = gpmc_probe_onenand_child(pdev, child);
1324 if (ret < 0) {
1325 of_node_put(child);
1326 return ret;
1327 }
1328 }
1329 return 0;
1330}
1331#else
1332static int gpmc_probe_dt(struct platform_device *pdev)
1333{
1334 return 0;
1335}
1336#endif
1337
1124static int gpmc_probe(struct platform_device *pdev) 1338static int gpmc_probe(struct platform_device *pdev)
1125{ 1339{
1126 int rc; 1340 int rc;
@@ -1172,6 +1386,14 @@ static int gpmc_probe(struct platform_device *pdev)
1172 if (IS_ERR_VALUE(gpmc_setup_irq())) 1386 if (IS_ERR_VALUE(gpmc_setup_irq()))
1173 dev_warn(gpmc_dev, "gpmc_setup_irq failed\n"); 1387 dev_warn(gpmc_dev, "gpmc_setup_irq failed\n");
1174 1388
1389 rc = gpmc_probe_dt(pdev);
1390 if (rc < 0) {
1391 clk_disable_unprepare(gpmc_l3_clk);
1392 clk_put(gpmc_l3_clk);
1393 dev_err(gpmc_dev, "failed to probe DT parameters\n");
1394 return rc;
1395 }
1396
1175 return 0; 1397 return 0;
1176} 1398}
1177 1399
@@ -1189,6 +1411,7 @@ static struct platform_driver gpmc_driver = {
1189 .driver = { 1411 .driver = {
1190 .name = DEVICE_NAME, 1412 .name = DEVICE_NAME,
1191 .owner = THIS_MODULE, 1413 .owner = THIS_MODULE,
1414 .of_match_table = of_match_ptr(gpmc_dt_ids),
1192 }, 1415 },
1193}; 1416};
1194 1417
@@ -1212,6 +1435,13 @@ static int __init omap_gpmc_init(void)
1212 struct platform_device *pdev; 1435 struct platform_device *pdev;
1213 char *oh_name = "gpmc"; 1436 char *oh_name = "gpmc";
1214 1437
1438 /*
1439 * if the board boots up with a populated DT, do not
1440 * manually add the device from this initcall
1441 */
1442 if (of_have_populated_dt())
1443 return -ENODEV;
1444
1215 oh = omap_hwmod_lookup(oh_name); 1445 oh = omap_hwmod_lookup(oh_name);
1216 if (!oh) { 1446 if (!oh) {
1217 pr_err("Could not look up %s\n", oh_name); 1447 pr_err("Could not look up %s\n", oh_name);
diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c
index 12060ae4e8f1..a683d17b2ce4 100644
--- a/arch/arm/mach-u300/core.c
+++ b/arch/arm/mach-u300/core.c
@@ -31,6 +31,7 @@
31#include <linux/dma-mapping.h> 31#include <linux/dma-mapping.h>
32#include <linux/platform_data/clk-u300.h> 32#include <linux/platform_data/clk-u300.h>
33#include <linux/platform_data/pinctrl-coh901.h> 33#include <linux/platform_data/pinctrl-coh901.h>
34#include <linux/platform_data/dma-coh901318.h>
34#include <linux/irqchip/arm-vic.h> 35#include <linux/irqchip/arm-vic.h>
35 36
36#include <asm/types.h> 37#include <asm/types.h>
@@ -40,7 +41,6 @@
40#include <asm/mach-types.h> 41#include <asm/mach-types.h>
41#include <asm/mach/arch.h> 42#include <asm/mach/arch.h>
42 43
43#include <mach/coh901318.h>
44#include <mach/hardware.h> 44#include <mach/hardware.h>
45#include <mach/syscon.h> 45#include <mach/syscon.h>
46#include <mach/irqs.h> 46#include <mach/irqs.h>
@@ -49,7 +49,6 @@
49#include "spi.h" 49#include "spi.h"
50#include "i2c.h" 50#include "i2c.h"
51#include "u300-gpio.h" 51#include "u300-gpio.h"
52#include "dma_channels.h"
53 52
54/* 53/*
55 * Static I/O mappings that are needed for booting the U300 platforms. The 54 * Static I/O mappings that are needed for booting the U300 platforms. The
@@ -327,1089 +326,6 @@ static struct resource dma_resource[] = {
327 } 326 }
328}; 327};
329 328
330/* points out all dma slave channels.
331 * Syntax is [A1, B1, A2, B2, .... ,-1,-1]
332 * Select all channels from A to B, end of list is marked with -1,-1
333 */
334static int dma_slave_channels[] = {
335 U300_DMA_MSL_TX_0, U300_DMA_SPI_RX,
336 U300_DMA_UART1_TX, U300_DMA_UART1_RX, -1, -1};
337
338/* points out all dma memcpy channels. */
339static int dma_memcpy_channels[] = {
340 U300_DMA_GENERAL_PURPOSE_0, U300_DMA_GENERAL_PURPOSE_8, -1, -1};
341
342/** register dma for memory access
343 *
344 * active 1 means dma intends to access memory
345 * 0 means dma wont access memory
346 */
347static void coh901318_access_memory_state(struct device *dev, bool active)
348{
349}
350
351#define flags_memcpy_config (COH901318_CX_CFG_CH_DISABLE | \
352 COH901318_CX_CFG_RM_MEMORY_TO_MEMORY | \
353 COH901318_CX_CFG_LCR_DISABLE | \
354 COH901318_CX_CFG_TC_IRQ_ENABLE | \
355 COH901318_CX_CFG_BE_IRQ_ENABLE)
356#define flags_memcpy_lli_chained (COH901318_CX_CTRL_TC_ENABLE | \
357 COH901318_CX_CTRL_BURST_COUNT_32_BYTES | \
358 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | \
359 COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | \
360 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | \
361 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | \
362 COH901318_CX_CTRL_MASTER_MODE_M1RW | \
363 COH901318_CX_CTRL_TCP_DISABLE | \
364 COH901318_CX_CTRL_TC_IRQ_DISABLE | \
365 COH901318_CX_CTRL_HSP_DISABLE | \
366 COH901318_CX_CTRL_HSS_DISABLE | \
367 COH901318_CX_CTRL_DDMA_LEGACY | \
368 COH901318_CX_CTRL_PRDD_SOURCE)
369#define flags_memcpy_lli (COH901318_CX_CTRL_TC_ENABLE | \
370 COH901318_CX_CTRL_BURST_COUNT_32_BYTES | \
371 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | \
372 COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | \
373 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | \
374 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | \
375 COH901318_CX_CTRL_MASTER_MODE_M1RW | \
376 COH901318_CX_CTRL_TCP_DISABLE | \
377 COH901318_CX_CTRL_TC_IRQ_DISABLE | \
378 COH901318_CX_CTRL_HSP_DISABLE | \
379 COH901318_CX_CTRL_HSS_DISABLE | \
380 COH901318_CX_CTRL_DDMA_LEGACY | \
381 COH901318_CX_CTRL_PRDD_SOURCE)
382#define flags_memcpy_lli_last (COH901318_CX_CTRL_TC_ENABLE | \
383 COH901318_CX_CTRL_BURST_COUNT_32_BYTES | \
384 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | \
385 COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | \
386 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | \
387 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | \
388 COH901318_CX_CTRL_MASTER_MODE_M1RW | \
389 COH901318_CX_CTRL_TCP_DISABLE | \
390 COH901318_CX_CTRL_TC_IRQ_ENABLE | \
391 COH901318_CX_CTRL_HSP_DISABLE | \
392 COH901318_CX_CTRL_HSS_DISABLE | \
393 COH901318_CX_CTRL_DDMA_LEGACY | \
394 COH901318_CX_CTRL_PRDD_SOURCE)
395
396const struct coh_dma_channel chan_config[U300_DMA_CHANNELS] = {
397 {
398 .number = U300_DMA_MSL_TX_0,
399 .name = "MSL TX 0",
400 .priority_high = 0,
401 .dev_addr = U300_MSL_BASE + 0 * 0x40 + 0x20,
402 },
403 {
404 .number = U300_DMA_MSL_TX_1,
405 .name = "MSL TX 1",
406 .priority_high = 0,
407 .dev_addr = U300_MSL_BASE + 1 * 0x40 + 0x20,
408 .param.config = COH901318_CX_CFG_CH_DISABLE |
409 COH901318_CX_CFG_LCR_DISABLE |
410 COH901318_CX_CFG_TC_IRQ_ENABLE |
411 COH901318_CX_CFG_BE_IRQ_ENABLE,
412 .param.ctrl_lli_chained = 0 |
413 COH901318_CX_CTRL_TC_ENABLE |
414 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
415 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
416 COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE |
417 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
418 COH901318_CX_CTRL_DST_ADDR_INC_DISABLE |
419 COH901318_CX_CTRL_MASTER_MODE_M1R_M2W |
420 COH901318_CX_CTRL_TCP_DISABLE |
421 COH901318_CX_CTRL_TC_IRQ_DISABLE |
422 COH901318_CX_CTRL_HSP_ENABLE |
423 COH901318_CX_CTRL_HSS_DISABLE |
424 COH901318_CX_CTRL_DDMA_LEGACY |
425 COH901318_CX_CTRL_PRDD_SOURCE,
426 .param.ctrl_lli = 0 |
427 COH901318_CX_CTRL_TC_ENABLE |
428 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
429 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
430 COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE |
431 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
432 COH901318_CX_CTRL_DST_ADDR_INC_DISABLE |
433 COH901318_CX_CTRL_MASTER_MODE_M1R_M2W |
434 COH901318_CX_CTRL_TCP_ENABLE |
435 COH901318_CX_CTRL_TC_IRQ_DISABLE |
436 COH901318_CX_CTRL_HSP_ENABLE |
437 COH901318_CX_CTRL_HSS_DISABLE |
438 COH901318_CX_CTRL_DDMA_LEGACY |
439 COH901318_CX_CTRL_PRDD_SOURCE,
440 .param.ctrl_lli_last = 0 |
441 COH901318_CX_CTRL_TC_ENABLE |
442 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
443 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
444 COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE |
445 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
446 COH901318_CX_CTRL_DST_ADDR_INC_DISABLE |
447 COH901318_CX_CTRL_MASTER_MODE_M1R_M2W |
448 COH901318_CX_CTRL_TCP_ENABLE |
449 COH901318_CX_CTRL_TC_IRQ_ENABLE |
450 COH901318_CX_CTRL_HSP_ENABLE |
451 COH901318_CX_CTRL_HSS_DISABLE |
452 COH901318_CX_CTRL_DDMA_LEGACY |
453 COH901318_CX_CTRL_PRDD_SOURCE,
454 },
455 {
456 .number = U300_DMA_MSL_TX_2,
457 .name = "MSL TX 2",
458 .priority_high = 0,
459 .dev_addr = U300_MSL_BASE + 2 * 0x40 + 0x20,
460 .param.config = COH901318_CX_CFG_CH_DISABLE |
461 COH901318_CX_CFG_LCR_DISABLE |
462 COH901318_CX_CFG_TC_IRQ_ENABLE |
463 COH901318_CX_CFG_BE_IRQ_ENABLE,
464 .param.ctrl_lli_chained = 0 |
465 COH901318_CX_CTRL_TC_ENABLE |
466 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
467 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
468 COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE |
469 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
470 COH901318_CX_CTRL_DST_ADDR_INC_DISABLE |
471 COH901318_CX_CTRL_MASTER_MODE_M1R_M2W |
472 COH901318_CX_CTRL_TCP_DISABLE |
473 COH901318_CX_CTRL_TC_IRQ_DISABLE |
474 COH901318_CX_CTRL_HSP_ENABLE |
475 COH901318_CX_CTRL_HSS_DISABLE |
476 COH901318_CX_CTRL_DDMA_LEGACY |
477 COH901318_CX_CTRL_PRDD_SOURCE,
478 .param.ctrl_lli = 0 |
479 COH901318_CX_CTRL_TC_ENABLE |
480 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
481 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
482 COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE |
483 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
484 COH901318_CX_CTRL_DST_ADDR_INC_DISABLE |
485 COH901318_CX_CTRL_MASTER_MODE_M1R_M2W |
486 COH901318_CX_CTRL_TCP_ENABLE |
487 COH901318_CX_CTRL_TC_IRQ_DISABLE |
488 COH901318_CX_CTRL_HSP_ENABLE |
489 COH901318_CX_CTRL_HSS_DISABLE |
490 COH901318_CX_CTRL_DDMA_LEGACY |
491 COH901318_CX_CTRL_PRDD_SOURCE,
492 .param.ctrl_lli_last = 0 |
493 COH901318_CX_CTRL_TC_ENABLE |
494 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
495 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
496 COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE |
497 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
498 COH901318_CX_CTRL_DST_ADDR_INC_DISABLE |
499 COH901318_CX_CTRL_MASTER_MODE_M1R_M2W |
500 COH901318_CX_CTRL_TCP_ENABLE |
501 COH901318_CX_CTRL_TC_IRQ_ENABLE |
502 COH901318_CX_CTRL_HSP_ENABLE |
503 COH901318_CX_CTRL_HSS_DISABLE |
504 COH901318_CX_CTRL_DDMA_LEGACY |
505 COH901318_CX_CTRL_PRDD_SOURCE,
506 .desc_nbr_max = 10,
507 },
508 {
509 .number = U300_DMA_MSL_TX_3,
510 .name = "MSL TX 3",
511 .priority_high = 0,
512 .dev_addr = U300_MSL_BASE + 3 * 0x40 + 0x20,
513 .param.config = COH901318_CX_CFG_CH_DISABLE |
514 COH901318_CX_CFG_LCR_DISABLE |
515 COH901318_CX_CFG_TC_IRQ_ENABLE |
516 COH901318_CX_CFG_BE_IRQ_ENABLE,
517 .param.ctrl_lli_chained = 0 |
518 COH901318_CX_CTRL_TC_ENABLE |
519 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
520 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
521 COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE |
522 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
523 COH901318_CX_CTRL_DST_ADDR_INC_DISABLE |
524 COH901318_CX_CTRL_MASTER_MODE_M1R_M2W |
525 COH901318_CX_CTRL_TCP_DISABLE |
526 COH901318_CX_CTRL_TC_IRQ_DISABLE |
527 COH901318_CX_CTRL_HSP_ENABLE |
528 COH901318_CX_CTRL_HSS_DISABLE |
529 COH901318_CX_CTRL_DDMA_LEGACY |
530 COH901318_CX_CTRL_PRDD_SOURCE,
531 .param.ctrl_lli = 0 |
532 COH901318_CX_CTRL_TC_ENABLE |
533 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
534 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
535 COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE |
536 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
537 COH901318_CX_CTRL_DST_ADDR_INC_DISABLE |
538 COH901318_CX_CTRL_MASTER_MODE_M1R_M2W |
539 COH901318_CX_CTRL_TCP_ENABLE |
540 COH901318_CX_CTRL_TC_IRQ_DISABLE |
541 COH901318_CX_CTRL_HSP_ENABLE |
542 COH901318_CX_CTRL_HSS_DISABLE |
543 COH901318_CX_CTRL_DDMA_LEGACY |
544 COH901318_CX_CTRL_PRDD_SOURCE,
545 .param.ctrl_lli_last = 0 |
546 COH901318_CX_CTRL_TC_ENABLE |
547 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
548 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
549 COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE |
550 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
551 COH901318_CX_CTRL_DST_ADDR_INC_DISABLE |
552 COH901318_CX_CTRL_MASTER_MODE_M1R_M2W |
553 COH901318_CX_CTRL_TCP_ENABLE |
554 COH901318_CX_CTRL_TC_IRQ_ENABLE |
555 COH901318_CX_CTRL_HSP_ENABLE |
556 COH901318_CX_CTRL_HSS_DISABLE |
557 COH901318_CX_CTRL_DDMA_LEGACY |
558 COH901318_CX_CTRL_PRDD_SOURCE,
559 },
560 {
561 .number = U300_DMA_MSL_TX_4,
562 .name = "MSL TX 4",
563 .priority_high = 0,
564 .dev_addr = U300_MSL_BASE + 4 * 0x40 + 0x20,
565 .param.config = COH901318_CX_CFG_CH_DISABLE |
566 COH901318_CX_CFG_LCR_DISABLE |
567 COH901318_CX_CFG_TC_IRQ_ENABLE |
568 COH901318_CX_CFG_BE_IRQ_ENABLE,
569 .param.ctrl_lli_chained = 0 |
570 COH901318_CX_CTRL_TC_ENABLE |
571 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
572 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
573 COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE |
574 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
575 COH901318_CX_CTRL_DST_ADDR_INC_DISABLE |
576 COH901318_CX_CTRL_MASTER_MODE_M1R_M2W |
577 COH901318_CX_CTRL_TCP_DISABLE |
578 COH901318_CX_CTRL_TC_IRQ_DISABLE |
579 COH901318_CX_CTRL_HSP_ENABLE |
580 COH901318_CX_CTRL_HSS_DISABLE |
581 COH901318_CX_CTRL_DDMA_LEGACY |
582 COH901318_CX_CTRL_PRDD_SOURCE,
583 .param.ctrl_lli = 0 |
584 COH901318_CX_CTRL_TC_ENABLE |
585 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
586 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
587 COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE |
588 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
589 COH901318_CX_CTRL_DST_ADDR_INC_DISABLE |
590 COH901318_CX_CTRL_MASTER_MODE_M1R_M2W |
591 COH901318_CX_CTRL_TCP_ENABLE |
592 COH901318_CX_CTRL_TC_IRQ_DISABLE |
593 COH901318_CX_CTRL_HSP_ENABLE |
594 COH901318_CX_CTRL_HSS_DISABLE |
595 COH901318_CX_CTRL_DDMA_LEGACY |
596 COH901318_CX_CTRL_PRDD_SOURCE,
597 .param.ctrl_lli_last = 0 |
598 COH901318_CX_CTRL_TC_ENABLE |
599 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
600 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
601 COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE |
602 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
603 COH901318_CX_CTRL_DST_ADDR_INC_DISABLE |
604 COH901318_CX_CTRL_MASTER_MODE_M1R_M2W |
605 COH901318_CX_CTRL_TCP_ENABLE |
606 COH901318_CX_CTRL_TC_IRQ_ENABLE |
607 COH901318_CX_CTRL_HSP_ENABLE |
608 COH901318_CX_CTRL_HSS_DISABLE |
609 COH901318_CX_CTRL_DDMA_LEGACY |
610 COH901318_CX_CTRL_PRDD_SOURCE,
611 },
612 {
613 .number = U300_DMA_MSL_TX_5,
614 .name = "MSL TX 5",
615 .priority_high = 0,
616 .dev_addr = U300_MSL_BASE + 5 * 0x40 + 0x20,
617 },
618 {
619 .number = U300_DMA_MSL_TX_6,
620 .name = "MSL TX 6",
621 .priority_high = 0,
622 .dev_addr = U300_MSL_BASE + 6 * 0x40 + 0x20,
623 },
624 {
625 .number = U300_DMA_MSL_RX_0,
626 .name = "MSL RX 0",
627 .priority_high = 0,
628 .dev_addr = U300_MSL_BASE + 0 * 0x40 + 0x220,
629 },
630 {
631 .number = U300_DMA_MSL_RX_1,
632 .name = "MSL RX 1",
633 .priority_high = 0,
634 .dev_addr = U300_MSL_BASE + 1 * 0x40 + 0x220,
635 .param.config = COH901318_CX_CFG_CH_DISABLE |
636 COH901318_CX_CFG_LCR_DISABLE |
637 COH901318_CX_CFG_TC_IRQ_ENABLE |
638 COH901318_CX_CFG_BE_IRQ_ENABLE,
639 .param.ctrl_lli_chained = 0 |
640 COH901318_CX_CTRL_TC_ENABLE |
641 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
642 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
643 COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE |
644 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
645 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE |
646 COH901318_CX_CTRL_MASTER_MODE_M2R_M1W |
647 COH901318_CX_CTRL_TCP_DISABLE |
648 COH901318_CX_CTRL_TC_IRQ_DISABLE |
649 COH901318_CX_CTRL_HSP_ENABLE |
650 COH901318_CX_CTRL_HSS_DISABLE |
651 COH901318_CX_CTRL_DDMA_DEMAND_DMA1 |
652 COH901318_CX_CTRL_PRDD_DEST,
653 .param.ctrl_lli = 0,
654 .param.ctrl_lli_last = 0 |
655 COH901318_CX_CTRL_TC_ENABLE |
656 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
657 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
658 COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE |
659 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
660 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE |
661 COH901318_CX_CTRL_MASTER_MODE_M2R_M1W |
662 COH901318_CX_CTRL_TCP_DISABLE |
663 COH901318_CX_CTRL_TC_IRQ_ENABLE |
664 COH901318_CX_CTRL_HSP_ENABLE |
665 COH901318_CX_CTRL_HSS_DISABLE |
666 COH901318_CX_CTRL_DDMA_DEMAND_DMA1 |
667 COH901318_CX_CTRL_PRDD_DEST,
668 },
669 {
670 .number = U300_DMA_MSL_RX_2,
671 .name = "MSL RX 2",
672 .priority_high = 0,
673 .dev_addr = U300_MSL_BASE + 2 * 0x40 + 0x220,
674 .param.config = COH901318_CX_CFG_CH_DISABLE |
675 COH901318_CX_CFG_LCR_DISABLE |
676 COH901318_CX_CFG_TC_IRQ_ENABLE |
677 COH901318_CX_CFG_BE_IRQ_ENABLE,
678 .param.ctrl_lli_chained = 0 |
679 COH901318_CX_CTRL_TC_ENABLE |
680 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
681 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
682 COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE |
683 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
684 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE |
685 COH901318_CX_CTRL_MASTER_MODE_M2R_M1W |
686 COH901318_CX_CTRL_TCP_DISABLE |
687 COH901318_CX_CTRL_TC_IRQ_DISABLE |
688 COH901318_CX_CTRL_HSP_ENABLE |
689 COH901318_CX_CTRL_HSS_DISABLE |
690 COH901318_CX_CTRL_DDMA_DEMAND_DMA1 |
691 COH901318_CX_CTRL_PRDD_DEST,
692 .param.ctrl_lli = 0 |
693 COH901318_CX_CTRL_TC_ENABLE |
694 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
695 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
696 COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE |
697 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
698 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE |
699 COH901318_CX_CTRL_MASTER_MODE_M2R_M1W |
700 COH901318_CX_CTRL_TCP_DISABLE |
701 COH901318_CX_CTRL_TC_IRQ_ENABLE |
702 COH901318_CX_CTRL_HSP_ENABLE |
703 COH901318_CX_CTRL_HSS_DISABLE |
704 COH901318_CX_CTRL_DDMA_DEMAND_DMA1 |
705 COH901318_CX_CTRL_PRDD_DEST,
706 .param.ctrl_lli_last = 0 |
707 COH901318_CX_CTRL_TC_ENABLE |
708 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
709 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
710 COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE |
711 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
712 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE |
713 COH901318_CX_CTRL_MASTER_MODE_M2R_M1W |
714 COH901318_CX_CTRL_TCP_DISABLE |
715 COH901318_CX_CTRL_TC_IRQ_ENABLE |
716 COH901318_CX_CTRL_HSP_ENABLE |
717 COH901318_CX_CTRL_HSS_DISABLE |
718 COH901318_CX_CTRL_DDMA_DEMAND_DMA1 |
719 COH901318_CX_CTRL_PRDD_DEST,
720 },
721 {
722 .number = U300_DMA_MSL_RX_3,
723 .name = "MSL RX 3",
724 .priority_high = 0,
725 .dev_addr = U300_MSL_BASE + 3 * 0x40 + 0x220,
726 .param.config = COH901318_CX_CFG_CH_DISABLE |
727 COH901318_CX_CFG_LCR_DISABLE |
728 COH901318_CX_CFG_TC_IRQ_ENABLE |
729 COH901318_CX_CFG_BE_IRQ_ENABLE,
730 .param.ctrl_lli_chained = 0 |
731 COH901318_CX_CTRL_TC_ENABLE |
732 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
733 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
734 COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE |
735 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
736 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE |
737 COH901318_CX_CTRL_MASTER_MODE_M2R_M1W |
738 COH901318_CX_CTRL_TCP_DISABLE |
739 COH901318_CX_CTRL_TC_IRQ_DISABLE |
740 COH901318_CX_CTRL_HSP_ENABLE |
741 COH901318_CX_CTRL_HSS_DISABLE |
742 COH901318_CX_CTRL_DDMA_DEMAND_DMA1 |
743 COH901318_CX_CTRL_PRDD_DEST,
744 .param.ctrl_lli = 0 |
745 COH901318_CX_CTRL_TC_ENABLE |
746 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
747 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
748 COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE |
749 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
750 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE |
751 COH901318_CX_CTRL_MASTER_MODE_M2R_M1W |
752 COH901318_CX_CTRL_TCP_DISABLE |
753 COH901318_CX_CTRL_TC_IRQ_ENABLE |
754 COH901318_CX_CTRL_HSP_ENABLE |
755 COH901318_CX_CTRL_HSS_DISABLE |
756 COH901318_CX_CTRL_DDMA_DEMAND_DMA1 |
757 COH901318_CX_CTRL_PRDD_DEST,
758 .param.ctrl_lli_last = 0 |
759 COH901318_CX_CTRL_TC_ENABLE |
760 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
761 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
762 COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE |
763 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
764 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE |
765 COH901318_CX_CTRL_MASTER_MODE_M2R_M1W |
766 COH901318_CX_CTRL_TCP_DISABLE |
767 COH901318_CX_CTRL_TC_IRQ_ENABLE |
768 COH901318_CX_CTRL_HSP_ENABLE |
769 COH901318_CX_CTRL_HSS_DISABLE |
770 COH901318_CX_CTRL_DDMA_DEMAND_DMA1 |
771 COH901318_CX_CTRL_PRDD_DEST,
772 },
773 {
774 .number = U300_DMA_MSL_RX_4,
775 .name = "MSL RX 4",
776 .priority_high = 0,
777 .dev_addr = U300_MSL_BASE + 4 * 0x40 + 0x220,
778 .param.config = COH901318_CX_CFG_CH_DISABLE |
779 COH901318_CX_CFG_LCR_DISABLE |
780 COH901318_CX_CFG_TC_IRQ_ENABLE |
781 COH901318_CX_CFG_BE_IRQ_ENABLE,
782 .param.ctrl_lli_chained = 0 |
783 COH901318_CX_CTRL_TC_ENABLE |
784 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
785 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
786 COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE |
787 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
788 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE |
789 COH901318_CX_CTRL_MASTER_MODE_M2R_M1W |
790 COH901318_CX_CTRL_TCP_DISABLE |
791 COH901318_CX_CTRL_TC_IRQ_DISABLE |
792 COH901318_CX_CTRL_HSP_ENABLE |
793 COH901318_CX_CTRL_HSS_DISABLE |
794 COH901318_CX_CTRL_DDMA_DEMAND_DMA1 |
795 COH901318_CX_CTRL_PRDD_DEST,
796 .param.ctrl_lli = 0 |
797 COH901318_CX_CTRL_TC_ENABLE |
798 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
799 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
800 COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE |
801 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
802 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE |
803 COH901318_CX_CTRL_MASTER_MODE_M2R_M1W |
804 COH901318_CX_CTRL_TCP_DISABLE |
805 COH901318_CX_CTRL_TC_IRQ_ENABLE |
806 COH901318_CX_CTRL_HSP_ENABLE |
807 COH901318_CX_CTRL_HSS_DISABLE |
808 COH901318_CX_CTRL_DDMA_DEMAND_DMA1 |
809 COH901318_CX_CTRL_PRDD_DEST,
810 .param.ctrl_lli_last = 0 |
811 COH901318_CX_CTRL_TC_ENABLE |
812 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
813 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
814 COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE |
815 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
816 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE |
817 COH901318_CX_CTRL_MASTER_MODE_M2R_M1W |
818 COH901318_CX_CTRL_TCP_DISABLE |
819 COH901318_CX_CTRL_TC_IRQ_ENABLE |
820 COH901318_CX_CTRL_HSP_ENABLE |
821 COH901318_CX_CTRL_HSS_DISABLE |
822 COH901318_CX_CTRL_DDMA_DEMAND_DMA1 |
823 COH901318_CX_CTRL_PRDD_DEST,
824 },
825 {
826 .number = U300_DMA_MSL_RX_5,
827 .name = "MSL RX 5",
828 .priority_high = 0,
829 .dev_addr = U300_MSL_BASE + 5 * 0x40 + 0x220,
830 .param.config = COH901318_CX_CFG_CH_DISABLE |
831 COH901318_CX_CFG_LCR_DISABLE |
832 COH901318_CX_CFG_TC_IRQ_ENABLE |
833 COH901318_CX_CFG_BE_IRQ_ENABLE,
834 .param.ctrl_lli_chained = 0 |
835 COH901318_CX_CTRL_TC_ENABLE |
836 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
837 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
838 COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE |
839 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
840 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE |
841 COH901318_CX_CTRL_MASTER_MODE_M2R_M1W |
842 COH901318_CX_CTRL_TCP_DISABLE |
843 COH901318_CX_CTRL_TC_IRQ_DISABLE |
844 COH901318_CX_CTRL_HSP_ENABLE |
845 COH901318_CX_CTRL_HSS_DISABLE |
846 COH901318_CX_CTRL_DDMA_DEMAND_DMA1 |
847 COH901318_CX_CTRL_PRDD_DEST,
848 .param.ctrl_lli = 0 |
849 COH901318_CX_CTRL_TC_ENABLE |
850 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
851 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
852 COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE |
853 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
854 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE |
855 COH901318_CX_CTRL_MASTER_MODE_M2R_M1W |
856 COH901318_CX_CTRL_TCP_DISABLE |
857 COH901318_CX_CTRL_TC_IRQ_ENABLE |
858 COH901318_CX_CTRL_HSP_ENABLE |
859 COH901318_CX_CTRL_HSS_DISABLE |
860 COH901318_CX_CTRL_DDMA_DEMAND_DMA1 |
861 COH901318_CX_CTRL_PRDD_DEST,
862 .param.ctrl_lli_last = 0 |
863 COH901318_CX_CTRL_TC_ENABLE |
864 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
865 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
866 COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE |
867 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
868 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE |
869 COH901318_CX_CTRL_MASTER_MODE_M2R_M1W |
870 COH901318_CX_CTRL_TCP_DISABLE |
871 COH901318_CX_CTRL_TC_IRQ_ENABLE |
872 COH901318_CX_CTRL_HSP_ENABLE |
873 COH901318_CX_CTRL_HSS_DISABLE |
874 COH901318_CX_CTRL_DDMA_DEMAND_DMA1 |
875 COH901318_CX_CTRL_PRDD_DEST,
876 },
877 {
878 .number = U300_DMA_MSL_RX_6,
879 .name = "MSL RX 6",
880 .priority_high = 0,
881 .dev_addr = U300_MSL_BASE + 6 * 0x40 + 0x220,
882 },
883 /*
884 * Don't set up device address, burst count or size of src
885 * or dst bus for this peripheral - handled by PrimeCell
886 * DMA extension.
887 */
888 {
889 .number = U300_DMA_MMCSD_RX_TX,
890 .name = "MMCSD RX TX",
891 .priority_high = 0,
892 .param.config = COH901318_CX_CFG_CH_DISABLE |
893 COH901318_CX_CFG_LCR_DISABLE |
894 COH901318_CX_CFG_TC_IRQ_ENABLE |
895 COH901318_CX_CFG_BE_IRQ_ENABLE,
896 .param.ctrl_lli_chained = 0 |
897 COH901318_CX_CTRL_TC_ENABLE |
898 COH901318_CX_CTRL_MASTER_MODE_M1RW |
899 COH901318_CX_CTRL_TCP_ENABLE |
900 COH901318_CX_CTRL_TC_IRQ_DISABLE |
901 COH901318_CX_CTRL_HSP_ENABLE |
902 COH901318_CX_CTRL_HSS_DISABLE |
903 COH901318_CX_CTRL_DDMA_LEGACY,
904 .param.ctrl_lli = 0 |
905 COH901318_CX_CTRL_TC_ENABLE |
906 COH901318_CX_CTRL_MASTER_MODE_M1RW |
907 COH901318_CX_CTRL_TCP_ENABLE |
908 COH901318_CX_CTRL_TC_IRQ_DISABLE |
909 COH901318_CX_CTRL_HSP_ENABLE |
910 COH901318_CX_CTRL_HSS_DISABLE |
911 COH901318_CX_CTRL_DDMA_LEGACY,
912 .param.ctrl_lli_last = 0 |
913 COH901318_CX_CTRL_TC_ENABLE |
914 COH901318_CX_CTRL_MASTER_MODE_M1RW |
915 COH901318_CX_CTRL_TCP_DISABLE |
916 COH901318_CX_CTRL_TC_IRQ_ENABLE |
917 COH901318_CX_CTRL_HSP_ENABLE |
918 COH901318_CX_CTRL_HSS_DISABLE |
919 COH901318_CX_CTRL_DDMA_LEGACY,
920
921 },
922 {
923 .number = U300_DMA_MSPRO_TX,
924 .name = "MSPRO TX",
925 .priority_high = 0,
926 },
927 {
928 .number = U300_DMA_MSPRO_RX,
929 .name = "MSPRO RX",
930 .priority_high = 0,
931 },
932 /*
933 * Don't set up device address, burst count or size of src
934 * or dst bus for this peripheral - handled by PrimeCell
935 * DMA extension.
936 */
937 {
938 .number = U300_DMA_UART0_TX,
939 .name = "UART0 TX",
940 .priority_high = 0,
941 .param.config = COH901318_CX_CFG_CH_DISABLE |
942 COH901318_CX_CFG_LCR_DISABLE |
943 COH901318_CX_CFG_TC_IRQ_ENABLE |
944 COH901318_CX_CFG_BE_IRQ_ENABLE,
945 .param.ctrl_lli_chained = 0 |
946 COH901318_CX_CTRL_TC_ENABLE |
947 COH901318_CX_CTRL_MASTER_MODE_M1RW |
948 COH901318_CX_CTRL_TCP_ENABLE |
949 COH901318_CX_CTRL_TC_IRQ_DISABLE |
950 COH901318_CX_CTRL_HSP_ENABLE |
951 COH901318_CX_CTRL_HSS_DISABLE |
952 COH901318_CX_CTRL_DDMA_LEGACY,
953 .param.ctrl_lli = 0 |
954 COH901318_CX_CTRL_TC_ENABLE |
955 COH901318_CX_CTRL_MASTER_MODE_M1RW |
956 COH901318_CX_CTRL_TCP_ENABLE |
957 COH901318_CX_CTRL_TC_IRQ_ENABLE |
958 COH901318_CX_CTRL_HSP_ENABLE |
959 COH901318_CX_CTRL_HSS_DISABLE |
960 COH901318_CX_CTRL_DDMA_LEGACY,
961 .param.ctrl_lli_last = 0 |
962 COH901318_CX_CTRL_TC_ENABLE |
963 COH901318_CX_CTRL_MASTER_MODE_M1RW |
964 COH901318_CX_CTRL_TCP_ENABLE |
965 COH901318_CX_CTRL_TC_IRQ_ENABLE |
966 COH901318_CX_CTRL_HSP_ENABLE |
967 COH901318_CX_CTRL_HSS_DISABLE |
968 COH901318_CX_CTRL_DDMA_LEGACY,
969 },
970 {
971 .number = U300_DMA_UART0_RX,
972 .name = "UART0 RX",
973 .priority_high = 0,
974 .param.config = COH901318_CX_CFG_CH_DISABLE |
975 COH901318_CX_CFG_LCR_DISABLE |
976 COH901318_CX_CFG_TC_IRQ_ENABLE |
977 COH901318_CX_CFG_BE_IRQ_ENABLE,
978 .param.ctrl_lli_chained = 0 |
979 COH901318_CX_CTRL_TC_ENABLE |
980 COH901318_CX_CTRL_MASTER_MODE_M1RW |
981 COH901318_CX_CTRL_TCP_ENABLE |
982 COH901318_CX_CTRL_TC_IRQ_DISABLE |
983 COH901318_CX_CTRL_HSP_ENABLE |
984 COH901318_CX_CTRL_HSS_DISABLE |
985 COH901318_CX_CTRL_DDMA_LEGACY,
986 .param.ctrl_lli = 0 |
987 COH901318_CX_CTRL_TC_ENABLE |
988 COH901318_CX_CTRL_MASTER_MODE_M1RW |
989 COH901318_CX_CTRL_TCP_ENABLE |
990 COH901318_CX_CTRL_TC_IRQ_ENABLE |
991 COH901318_CX_CTRL_HSP_ENABLE |
992 COH901318_CX_CTRL_HSS_DISABLE |
993 COH901318_CX_CTRL_DDMA_LEGACY,
994 .param.ctrl_lli_last = 0 |
995 COH901318_CX_CTRL_TC_ENABLE |
996 COH901318_CX_CTRL_MASTER_MODE_M1RW |
997 COH901318_CX_CTRL_TCP_ENABLE |
998 COH901318_CX_CTRL_TC_IRQ_ENABLE |
999 COH901318_CX_CTRL_HSP_ENABLE |
1000 COH901318_CX_CTRL_HSS_DISABLE |
1001 COH901318_CX_CTRL_DDMA_LEGACY,
1002 },
1003 {
1004 .number = U300_DMA_APEX_TX,
1005 .name = "APEX TX",
1006 .priority_high = 0,
1007 },
1008 {
1009 .number = U300_DMA_APEX_RX,
1010 .name = "APEX RX",
1011 .priority_high = 0,
1012 },
1013 {
1014 .number = U300_DMA_PCM_I2S0_TX,
1015 .name = "PCM I2S0 TX",
1016 .priority_high = 1,
1017 .dev_addr = U300_PCM_I2S0_BASE + 0x14,
1018 .param.config = COH901318_CX_CFG_CH_DISABLE |
1019 COH901318_CX_CFG_LCR_DISABLE |
1020 COH901318_CX_CFG_TC_IRQ_ENABLE |
1021 COH901318_CX_CFG_BE_IRQ_ENABLE,
1022 .param.ctrl_lli_chained = 0 |
1023 COH901318_CX_CTRL_TC_ENABLE |
1024 COH901318_CX_CTRL_BURST_COUNT_16_BYTES |
1025 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
1026 COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE |
1027 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
1028 COH901318_CX_CTRL_DST_ADDR_INC_DISABLE |
1029 COH901318_CX_CTRL_MASTER_MODE_M1RW |
1030 COH901318_CX_CTRL_TCP_DISABLE |
1031 COH901318_CX_CTRL_TC_IRQ_DISABLE |
1032 COH901318_CX_CTRL_HSP_ENABLE |
1033 COH901318_CX_CTRL_HSS_DISABLE |
1034 COH901318_CX_CTRL_DDMA_LEGACY |
1035 COH901318_CX_CTRL_PRDD_SOURCE,
1036 .param.ctrl_lli = 0 |
1037 COH901318_CX_CTRL_TC_ENABLE |
1038 COH901318_CX_CTRL_BURST_COUNT_16_BYTES |
1039 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
1040 COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE |
1041 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
1042 COH901318_CX_CTRL_DST_ADDR_INC_DISABLE |
1043 COH901318_CX_CTRL_MASTER_MODE_M1RW |
1044 COH901318_CX_CTRL_TCP_ENABLE |
1045 COH901318_CX_CTRL_TC_IRQ_DISABLE |
1046 COH901318_CX_CTRL_HSP_ENABLE |
1047 COH901318_CX_CTRL_HSS_DISABLE |
1048 COH901318_CX_CTRL_DDMA_LEGACY |
1049 COH901318_CX_CTRL_PRDD_SOURCE,
1050 .param.ctrl_lli_last = 0 |
1051 COH901318_CX_CTRL_TC_ENABLE |
1052 COH901318_CX_CTRL_BURST_COUNT_16_BYTES |
1053 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
1054 COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE |
1055 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
1056 COH901318_CX_CTRL_DST_ADDR_INC_DISABLE |
1057 COH901318_CX_CTRL_MASTER_MODE_M1RW |
1058 COH901318_CX_CTRL_TCP_ENABLE |
1059 COH901318_CX_CTRL_TC_IRQ_DISABLE |
1060 COH901318_CX_CTRL_HSP_ENABLE |
1061 COH901318_CX_CTRL_HSS_DISABLE |
1062 COH901318_CX_CTRL_DDMA_LEGACY |
1063 COH901318_CX_CTRL_PRDD_SOURCE,
1064 },
1065 {
1066 .number = U300_DMA_PCM_I2S0_RX,
1067 .name = "PCM I2S0 RX",
1068 .priority_high = 1,
1069 .dev_addr = U300_PCM_I2S0_BASE + 0x10,
1070 .param.config = COH901318_CX_CFG_CH_DISABLE |
1071 COH901318_CX_CFG_LCR_DISABLE |
1072 COH901318_CX_CFG_TC_IRQ_ENABLE |
1073 COH901318_CX_CFG_BE_IRQ_ENABLE,
1074 .param.ctrl_lli_chained = 0 |
1075 COH901318_CX_CTRL_TC_ENABLE |
1076 COH901318_CX_CTRL_BURST_COUNT_16_BYTES |
1077 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
1078 COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE |
1079 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
1080 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE |
1081 COH901318_CX_CTRL_MASTER_MODE_M1RW |
1082 COH901318_CX_CTRL_TCP_DISABLE |
1083 COH901318_CX_CTRL_TC_IRQ_DISABLE |
1084 COH901318_CX_CTRL_HSP_ENABLE |
1085 COH901318_CX_CTRL_HSS_DISABLE |
1086 COH901318_CX_CTRL_DDMA_LEGACY |
1087 COH901318_CX_CTRL_PRDD_DEST,
1088 .param.ctrl_lli = 0 |
1089 COH901318_CX_CTRL_TC_ENABLE |
1090 COH901318_CX_CTRL_BURST_COUNT_16_BYTES |
1091 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
1092 COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE |
1093 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
1094 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE |
1095 COH901318_CX_CTRL_MASTER_MODE_M1RW |
1096 COH901318_CX_CTRL_TCP_ENABLE |
1097 COH901318_CX_CTRL_TC_IRQ_DISABLE |
1098 COH901318_CX_CTRL_HSP_ENABLE |
1099 COH901318_CX_CTRL_HSS_DISABLE |
1100 COH901318_CX_CTRL_DDMA_LEGACY |
1101 COH901318_CX_CTRL_PRDD_DEST,
1102 .param.ctrl_lli_last = 0 |
1103 COH901318_CX_CTRL_TC_ENABLE |
1104 COH901318_CX_CTRL_BURST_COUNT_16_BYTES |
1105 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
1106 COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE |
1107 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
1108 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE |
1109 COH901318_CX_CTRL_MASTER_MODE_M1RW |
1110 COH901318_CX_CTRL_TCP_ENABLE |
1111 COH901318_CX_CTRL_TC_IRQ_ENABLE |
1112 COH901318_CX_CTRL_HSP_ENABLE |
1113 COH901318_CX_CTRL_HSS_DISABLE |
1114 COH901318_CX_CTRL_DDMA_LEGACY |
1115 COH901318_CX_CTRL_PRDD_DEST,
1116 },
1117 {
1118 .number = U300_DMA_PCM_I2S1_TX,
1119 .name = "PCM I2S1 TX",
1120 .priority_high = 1,
1121 .dev_addr = U300_PCM_I2S1_BASE + 0x14,
1122 .param.config = COH901318_CX_CFG_CH_DISABLE |
1123 COH901318_CX_CFG_LCR_DISABLE |
1124 COH901318_CX_CFG_TC_IRQ_ENABLE |
1125 COH901318_CX_CFG_BE_IRQ_ENABLE,
1126 .param.ctrl_lli_chained = 0 |
1127 COH901318_CX_CTRL_TC_ENABLE |
1128 COH901318_CX_CTRL_BURST_COUNT_16_BYTES |
1129 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
1130 COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE |
1131 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
1132 COH901318_CX_CTRL_DST_ADDR_INC_DISABLE |
1133 COH901318_CX_CTRL_MASTER_MODE_M1RW |
1134 COH901318_CX_CTRL_TCP_DISABLE |
1135 COH901318_CX_CTRL_TC_IRQ_DISABLE |
1136 COH901318_CX_CTRL_HSP_ENABLE |
1137 COH901318_CX_CTRL_HSS_DISABLE |
1138 COH901318_CX_CTRL_DDMA_LEGACY |
1139 COH901318_CX_CTRL_PRDD_SOURCE,
1140 .param.ctrl_lli = 0 |
1141 COH901318_CX_CTRL_TC_ENABLE |
1142 COH901318_CX_CTRL_BURST_COUNT_16_BYTES |
1143 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
1144 COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE |
1145 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
1146 COH901318_CX_CTRL_DST_ADDR_INC_DISABLE |
1147 COH901318_CX_CTRL_MASTER_MODE_M1RW |
1148 COH901318_CX_CTRL_TCP_ENABLE |
1149 COH901318_CX_CTRL_TC_IRQ_DISABLE |
1150 COH901318_CX_CTRL_HSP_ENABLE |
1151 COH901318_CX_CTRL_HSS_DISABLE |
1152 COH901318_CX_CTRL_DDMA_LEGACY |
1153 COH901318_CX_CTRL_PRDD_SOURCE,
1154 .param.ctrl_lli_last = 0 |
1155 COH901318_CX_CTRL_TC_ENABLE |
1156 COH901318_CX_CTRL_BURST_COUNT_16_BYTES |
1157 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
1158 COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE |
1159 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
1160 COH901318_CX_CTRL_DST_ADDR_INC_DISABLE |
1161 COH901318_CX_CTRL_MASTER_MODE_M1RW |
1162 COH901318_CX_CTRL_TCP_ENABLE |
1163 COH901318_CX_CTRL_TC_IRQ_ENABLE |
1164 COH901318_CX_CTRL_HSP_ENABLE |
1165 COH901318_CX_CTRL_HSS_DISABLE |
1166 COH901318_CX_CTRL_DDMA_LEGACY |
1167 COH901318_CX_CTRL_PRDD_SOURCE,
1168 },
1169 {
1170 .number = U300_DMA_PCM_I2S1_RX,
1171 .name = "PCM I2S1 RX",
1172 .priority_high = 1,
1173 .dev_addr = U300_PCM_I2S1_BASE + 0x10,
1174 .param.config = COH901318_CX_CFG_CH_DISABLE |
1175 COH901318_CX_CFG_LCR_DISABLE |
1176 COH901318_CX_CFG_TC_IRQ_ENABLE |
1177 COH901318_CX_CFG_BE_IRQ_ENABLE,
1178 .param.ctrl_lli_chained = 0 |
1179 COH901318_CX_CTRL_TC_ENABLE |
1180 COH901318_CX_CTRL_BURST_COUNT_16_BYTES |
1181 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
1182 COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE |
1183 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
1184 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE |
1185 COH901318_CX_CTRL_MASTER_MODE_M1RW |
1186 COH901318_CX_CTRL_TCP_DISABLE |
1187 COH901318_CX_CTRL_TC_IRQ_DISABLE |
1188 COH901318_CX_CTRL_HSP_ENABLE |
1189 COH901318_CX_CTRL_HSS_DISABLE |
1190 COH901318_CX_CTRL_DDMA_LEGACY |
1191 COH901318_CX_CTRL_PRDD_DEST,
1192 .param.ctrl_lli = 0 |
1193 COH901318_CX_CTRL_TC_ENABLE |
1194 COH901318_CX_CTRL_BURST_COUNT_16_BYTES |
1195 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
1196 COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE |
1197 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
1198 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE |
1199 COH901318_CX_CTRL_MASTER_MODE_M1RW |
1200 COH901318_CX_CTRL_TCP_ENABLE |
1201 COH901318_CX_CTRL_TC_IRQ_DISABLE |
1202 COH901318_CX_CTRL_HSP_ENABLE |
1203 COH901318_CX_CTRL_HSS_DISABLE |
1204 COH901318_CX_CTRL_DDMA_LEGACY |
1205 COH901318_CX_CTRL_PRDD_DEST,
1206 .param.ctrl_lli_last = 0 |
1207 COH901318_CX_CTRL_TC_ENABLE |
1208 COH901318_CX_CTRL_BURST_COUNT_16_BYTES |
1209 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
1210 COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE |
1211 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
1212 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE |
1213 COH901318_CX_CTRL_MASTER_MODE_M1RW |
1214 COH901318_CX_CTRL_TCP_ENABLE |
1215 COH901318_CX_CTRL_TC_IRQ_ENABLE |
1216 COH901318_CX_CTRL_HSP_ENABLE |
1217 COH901318_CX_CTRL_HSS_DISABLE |
1218 COH901318_CX_CTRL_DDMA_LEGACY |
1219 COH901318_CX_CTRL_PRDD_DEST,
1220 },
1221 {
1222 .number = U300_DMA_XGAM_CDI,
1223 .name = "XGAM CDI",
1224 .priority_high = 0,
1225 },
1226 {
1227 .number = U300_DMA_XGAM_PDI,
1228 .name = "XGAM PDI",
1229 .priority_high = 0,
1230 },
1231 /*
1232 * Don't set up device address, burst count or size of src
1233 * or dst bus for this peripheral - handled by PrimeCell
1234 * DMA extension.
1235 */
1236 {
1237 .number = U300_DMA_SPI_TX,
1238 .name = "SPI TX",
1239 .priority_high = 0,
1240 .param.config = COH901318_CX_CFG_CH_DISABLE |
1241 COH901318_CX_CFG_LCR_DISABLE |
1242 COH901318_CX_CFG_TC_IRQ_ENABLE |
1243 COH901318_CX_CFG_BE_IRQ_ENABLE,
1244 .param.ctrl_lli_chained = 0 |
1245 COH901318_CX_CTRL_TC_ENABLE |
1246 COH901318_CX_CTRL_MASTER_MODE_M1RW |
1247 COH901318_CX_CTRL_TCP_DISABLE |
1248 COH901318_CX_CTRL_TC_IRQ_DISABLE |
1249 COH901318_CX_CTRL_HSP_ENABLE |
1250 COH901318_CX_CTRL_HSS_DISABLE |
1251 COH901318_CX_CTRL_DDMA_LEGACY,
1252 .param.ctrl_lli = 0 |
1253 COH901318_CX_CTRL_TC_ENABLE |
1254 COH901318_CX_CTRL_MASTER_MODE_M1RW |
1255 COH901318_CX_CTRL_TCP_DISABLE |
1256 COH901318_CX_CTRL_TC_IRQ_ENABLE |
1257 COH901318_CX_CTRL_HSP_ENABLE |
1258 COH901318_CX_CTRL_HSS_DISABLE |
1259 COH901318_CX_CTRL_DDMA_LEGACY,
1260 .param.ctrl_lli_last = 0 |
1261 COH901318_CX_CTRL_TC_ENABLE |
1262 COH901318_CX_CTRL_MASTER_MODE_M1RW |
1263 COH901318_CX_CTRL_TCP_DISABLE |
1264 COH901318_CX_CTRL_TC_IRQ_ENABLE |
1265 COH901318_CX_CTRL_HSP_ENABLE |
1266 COH901318_CX_CTRL_HSS_DISABLE |
1267 COH901318_CX_CTRL_DDMA_LEGACY,
1268 },
1269 {
1270 .number = U300_DMA_SPI_RX,
1271 .name = "SPI RX",
1272 .priority_high = 0,
1273 .param.config = COH901318_CX_CFG_CH_DISABLE |
1274 COH901318_CX_CFG_LCR_DISABLE |
1275 COH901318_CX_CFG_TC_IRQ_ENABLE |
1276 COH901318_CX_CFG_BE_IRQ_ENABLE,
1277 .param.ctrl_lli_chained = 0 |
1278 COH901318_CX_CTRL_TC_ENABLE |
1279 COH901318_CX_CTRL_MASTER_MODE_M1RW |
1280 COH901318_CX_CTRL_TCP_DISABLE |
1281 COH901318_CX_CTRL_TC_IRQ_DISABLE |
1282 COH901318_CX_CTRL_HSP_ENABLE |
1283 COH901318_CX_CTRL_HSS_DISABLE |
1284 COH901318_CX_CTRL_DDMA_LEGACY,
1285 .param.ctrl_lli = 0 |
1286 COH901318_CX_CTRL_TC_ENABLE |
1287 COH901318_CX_CTRL_MASTER_MODE_M1RW |
1288 COH901318_CX_CTRL_TCP_DISABLE |
1289 COH901318_CX_CTRL_TC_IRQ_ENABLE |
1290 COH901318_CX_CTRL_HSP_ENABLE |
1291 COH901318_CX_CTRL_HSS_DISABLE |
1292 COH901318_CX_CTRL_DDMA_LEGACY,
1293 .param.ctrl_lli_last = 0 |
1294 COH901318_CX_CTRL_TC_ENABLE |
1295 COH901318_CX_CTRL_MASTER_MODE_M1RW |
1296 COH901318_CX_CTRL_TCP_DISABLE |
1297 COH901318_CX_CTRL_TC_IRQ_ENABLE |
1298 COH901318_CX_CTRL_HSP_ENABLE |
1299 COH901318_CX_CTRL_HSS_DISABLE |
1300 COH901318_CX_CTRL_DDMA_LEGACY,
1301
1302 },
1303 {
1304 .number = U300_DMA_GENERAL_PURPOSE_0,
1305 .name = "GENERAL 00",
1306 .priority_high = 0,
1307
1308 .param.config = flags_memcpy_config,
1309 .param.ctrl_lli_chained = flags_memcpy_lli_chained,
1310 .param.ctrl_lli = flags_memcpy_lli,
1311 .param.ctrl_lli_last = flags_memcpy_lli_last,
1312 },
1313 {
1314 .number = U300_DMA_GENERAL_PURPOSE_1,
1315 .name = "GENERAL 01",
1316 .priority_high = 0,
1317
1318 .param.config = flags_memcpy_config,
1319 .param.ctrl_lli_chained = flags_memcpy_lli_chained,
1320 .param.ctrl_lli = flags_memcpy_lli,
1321 .param.ctrl_lli_last = flags_memcpy_lli_last,
1322 },
1323 {
1324 .number = U300_DMA_GENERAL_PURPOSE_2,
1325 .name = "GENERAL 02",
1326 .priority_high = 0,
1327
1328 .param.config = flags_memcpy_config,
1329 .param.ctrl_lli_chained = flags_memcpy_lli_chained,
1330 .param.ctrl_lli = flags_memcpy_lli,
1331 .param.ctrl_lli_last = flags_memcpy_lli_last,
1332 },
1333 {
1334 .number = U300_DMA_GENERAL_PURPOSE_3,
1335 .name = "GENERAL 03",
1336 .priority_high = 0,
1337
1338 .param.config = flags_memcpy_config,
1339 .param.ctrl_lli_chained = flags_memcpy_lli_chained,
1340 .param.ctrl_lli = flags_memcpy_lli,
1341 .param.ctrl_lli_last = flags_memcpy_lli_last,
1342 },
1343 {
1344 .number = U300_DMA_GENERAL_PURPOSE_4,
1345 .name = "GENERAL 04",
1346 .priority_high = 0,
1347
1348 .param.config = flags_memcpy_config,
1349 .param.ctrl_lli_chained = flags_memcpy_lli_chained,
1350 .param.ctrl_lli = flags_memcpy_lli,
1351 .param.ctrl_lli_last = flags_memcpy_lli_last,
1352 },
1353 {
1354 .number = U300_DMA_GENERAL_PURPOSE_5,
1355 .name = "GENERAL 05",
1356 .priority_high = 0,
1357
1358 .param.config = flags_memcpy_config,
1359 .param.ctrl_lli_chained = flags_memcpy_lli_chained,
1360 .param.ctrl_lli = flags_memcpy_lli,
1361 .param.ctrl_lli_last = flags_memcpy_lli_last,
1362 },
1363 {
1364 .number = U300_DMA_GENERAL_PURPOSE_6,
1365 .name = "GENERAL 06",
1366 .priority_high = 0,
1367
1368 .param.config = flags_memcpy_config,
1369 .param.ctrl_lli_chained = flags_memcpy_lli_chained,
1370 .param.ctrl_lli = flags_memcpy_lli,
1371 .param.ctrl_lli_last = flags_memcpy_lli_last,
1372 },
1373 {
1374 .number = U300_DMA_GENERAL_PURPOSE_7,
1375 .name = "GENERAL 07",
1376 .priority_high = 0,
1377
1378 .param.config = flags_memcpy_config,
1379 .param.ctrl_lli_chained = flags_memcpy_lli_chained,
1380 .param.ctrl_lli = flags_memcpy_lli,
1381 .param.ctrl_lli_last = flags_memcpy_lli_last,
1382 },
1383 {
1384 .number = U300_DMA_GENERAL_PURPOSE_8,
1385 .name = "GENERAL 08",
1386 .priority_high = 0,
1387
1388 .param.config = flags_memcpy_config,
1389 .param.ctrl_lli_chained = flags_memcpy_lli_chained,
1390 .param.ctrl_lli = flags_memcpy_lli,
1391 .param.ctrl_lli_last = flags_memcpy_lli_last,
1392 },
1393 {
1394 .number = U300_DMA_UART1_TX,
1395 .name = "UART1 TX",
1396 .priority_high = 0,
1397 },
1398 {
1399 .number = U300_DMA_UART1_RX,
1400 .name = "UART1 RX",
1401 .priority_high = 0,
1402 }
1403};
1404
1405
1406static struct coh901318_platform coh901318_platform = {
1407 .chans_slave = dma_slave_channels,
1408 .chans_memcpy = dma_memcpy_channels,
1409 .access_memory_state = coh901318_access_memory_state,
1410 .chan_conf = chan_config,
1411 .max_channels = U300_DMA_CHANNELS,
1412};
1413 329
1414static struct resource pinctrl_resources[] = { 330static struct resource pinctrl_resources[] = {
1415 { 331 {
@@ -1521,7 +437,6 @@ static struct platform_device dma_device = {
1521 .resource = dma_resource, 437 .resource = dma_resource,
1522 .num_resources = ARRAY_SIZE(dma_resource), 438 .num_resources = ARRAY_SIZE(dma_resource),
1523 .dev = { 439 .dev = {
1524 .platform_data = &coh901318_platform,
1525 .coherent_dma_mask = ~0, 440 .coherent_dma_mask = ~0,
1526 }, 441 },
1527}; 442};
diff --git a/arch/arm/mach-u300/dma_channels.h b/arch/arm/mach-u300/dma_channels.h
deleted file mode 100644
index 4e8a88fbca49..000000000000
--- a/arch/arm/mach-u300/dma_channels.h
+++ /dev/null
@@ -1,60 +0,0 @@
1/*
2 *
3 * arch/arm/mach-u300/include/mach/dma_channels.h
4 *
5 *
6 * Copyright (C) 2007-2012 ST-Ericsson
7 * License terms: GNU General Public License (GPL) version 2
8 * Map file for the U300 dma driver.
9 * Author: Per Friden <per.friden@stericsson.com>
10 */
11
12#ifndef DMA_CHANNELS_H
13#define DMA_CHANNELS_H
14
15#define U300_DMA_MSL_TX_0 0
16#define U300_DMA_MSL_TX_1 1
17#define U300_DMA_MSL_TX_2 2
18#define U300_DMA_MSL_TX_3 3
19#define U300_DMA_MSL_TX_4 4
20#define U300_DMA_MSL_TX_5 5
21#define U300_DMA_MSL_TX_6 6
22#define U300_DMA_MSL_RX_0 7
23#define U300_DMA_MSL_RX_1 8
24#define U300_DMA_MSL_RX_2 9
25#define U300_DMA_MSL_RX_3 10
26#define U300_DMA_MSL_RX_4 11
27#define U300_DMA_MSL_RX_5 12
28#define U300_DMA_MSL_RX_6 13
29#define U300_DMA_MMCSD_RX_TX 14
30#define U300_DMA_MSPRO_TX 15
31#define U300_DMA_MSPRO_RX 16
32#define U300_DMA_UART0_TX 17
33#define U300_DMA_UART0_RX 18
34#define U300_DMA_APEX_TX 19
35#define U300_DMA_APEX_RX 20
36#define U300_DMA_PCM_I2S0_TX 21
37#define U300_DMA_PCM_I2S0_RX 22
38#define U300_DMA_PCM_I2S1_TX 23
39#define U300_DMA_PCM_I2S1_RX 24
40#define U300_DMA_XGAM_CDI 25
41#define U300_DMA_XGAM_PDI 26
42#define U300_DMA_SPI_TX 27
43#define U300_DMA_SPI_RX 28
44#define U300_DMA_GENERAL_PURPOSE_0 29
45#define U300_DMA_GENERAL_PURPOSE_1 30
46#define U300_DMA_GENERAL_PURPOSE_2 31
47#define U300_DMA_GENERAL_PURPOSE_3 32
48#define U300_DMA_GENERAL_PURPOSE_4 33
49#define U300_DMA_GENERAL_PURPOSE_5 34
50#define U300_DMA_GENERAL_PURPOSE_6 35
51#define U300_DMA_GENERAL_PURPOSE_7 36
52#define U300_DMA_GENERAL_PURPOSE_8 37
53#define U300_DMA_UART1_TX 38
54#define U300_DMA_UART1_RX 39
55
56#define U300_DMA_DEVICE_CHANNELS 32
57#define U300_DMA_CHANNELS 40
58
59
60#endif /* DMA_CHANNELS_H */
diff --git a/arch/arm/mach-u300/include/mach/coh901318.h b/arch/arm/mach-u300/include/mach/coh901318.h
deleted file mode 100644
index 7c3b2b2d25b6..000000000000
--- a/arch/arm/mach-u300/include/mach/coh901318.h
+++ /dev/null
@@ -1,267 +0,0 @@
1/*
2 *
3 * include/linux/coh901318.h
4 *
5 *
6 * Copyright (C) 2007-2009 ST-Ericsson
7 * License terms: GNU General Public License (GPL) version 2
8 * DMA driver for COH 901 318
9 * Author: Per Friden <per.friden@stericsson.com>
10 */
11
12#ifndef COH901318_H
13#define COH901318_H
14
15#include <linux/device.h>
16#include <linux/dmaengine.h>
17
18#define MAX_DMA_PACKET_SIZE_SHIFT 11
19#define MAX_DMA_PACKET_SIZE (1 << MAX_DMA_PACKET_SIZE_SHIFT)
20
21/**
22 * struct coh901318_lli - linked list item for DMAC
23 * @control: control settings for DMAC
24 * @src_addr: transfer source address
25 * @dst_addr: transfer destination address
26 * @link_addr: physical address to next lli
27 * @virt_link_addr: virtual address of next lli (only used by pool_free)
28 * @phy_this: physical address of current lli (only used by pool_free)
29 */
30struct coh901318_lli {
31 u32 control;
32 dma_addr_t src_addr;
33 dma_addr_t dst_addr;
34 dma_addr_t link_addr;
35
36 void *virt_link_addr;
37 dma_addr_t phy_this;
38};
39/**
40 * struct coh901318_params - parameters for DMAC configuration
41 * @config: DMA config register
42 * @ctrl_lli_last: DMA control register for the last lli in the list
43 * @ctrl_lli: DMA control register for an lli
44 * @ctrl_lli_chained: DMA control register for a chained lli
45 */
46struct coh901318_params {
47 u32 config;
48 u32 ctrl_lli_last;
49 u32 ctrl_lli;
50 u32 ctrl_lli_chained;
51};
52/**
53 * struct coh_dma_channel - dma channel base
54 * @name: ascii name of dma channel
55 * @number: channel id number
56 * @desc_nbr_max: number of preallocated descriptors
57 * @priority_high: prio of channel, 0 low otherwise high.
58 * @param: configuration parameters
59 * @dev_addr: physical address of periphal connected to channel
60 */
61struct coh_dma_channel {
62 const char name[32];
63 const int number;
64 const int desc_nbr_max;
65 const int priority_high;
66 const struct coh901318_params param;
67 const dma_addr_t dev_addr;
68};
69
70/**
71 * dma_access_memory_state_t - register dma for memory access
72 *
73 * @dev: The dma device
74 * @active: 1 means dma intends to access memory
75 * 0 means dma wont access memory
76 */
77typedef void (*dma_access_memory_state_t)(struct device *dev,
78 bool active);
79
80/**
81 * struct powersave - DMA power save structure
82 * @lock: lock protecting data in this struct
83 * @started_channels: bit mask indicating active dma channels
84 */
85struct powersave {
86 spinlock_t lock;
87 u64 started_channels;
88};
89/**
90 * struct coh901318_platform - platform arch structure
91 * @chans_slave: specifying dma slave channels
92 * @chans_memcpy: specifying dma memcpy channels
93 * @access_memory_state: requesting DMA memory access (on / off)
94 * @chan_conf: dma channel configurations
95 * @max_channels: max number of dma chanenls
96 */
97struct coh901318_platform {
98 const int *chans_slave;
99 const int *chans_memcpy;
100 const dma_access_memory_state_t access_memory_state;
101 const struct coh_dma_channel *chan_conf;
102 const int max_channels;
103};
104
105#ifdef CONFIG_COH901318
106/**
107 * coh901318_filter_id() - DMA channel filter function
108 * @chan: dma channel handle
109 * @chan_id: id of dma channel to be filter out
110 *
111 * In dma_request_channel() it specifies what channel id to be requested
112 */
113bool coh901318_filter_id(struct dma_chan *chan, void *chan_id);
114#else
115static inline bool coh901318_filter_id(struct dma_chan *chan, void *chan_id)
116{
117 return false;
118}
119#endif
120
121/*
122 * DMA Controller - this access the static mappings of the coh901318 dma.
123 *
124 */
125
126#define COH901318_MOD32_MASK (0x1F)
127#define COH901318_WORD_MASK (0xFFFFFFFF)
128/* INT_STATUS - Interrupt Status Registers 32bit (R/-) */
129#define COH901318_INT_STATUS1 (0x0000)
130#define COH901318_INT_STATUS2 (0x0004)
131/* TC_INT_STATUS - Terminal Count Interrupt Status Registers 32bit (R/-) */
132#define COH901318_TC_INT_STATUS1 (0x0008)
133#define COH901318_TC_INT_STATUS2 (0x000C)
134/* TC_INT_CLEAR - Terminal Count Interrupt Clear Registers 32bit (-/W) */
135#define COH901318_TC_INT_CLEAR1 (0x0010)
136#define COH901318_TC_INT_CLEAR2 (0x0014)
137/* RAW_TC_INT_STATUS - Raw Term Count Interrupt Status Registers 32bit (R/-) */
138#define COH901318_RAW_TC_INT_STATUS1 (0x0018)
139#define COH901318_RAW_TC_INT_STATUS2 (0x001C)
140/* BE_INT_STATUS - Bus Error Interrupt Status Registers 32bit (R/-) */
141#define COH901318_BE_INT_STATUS1 (0x0020)
142#define COH901318_BE_INT_STATUS2 (0x0024)
143/* BE_INT_CLEAR - Bus Error Interrupt Clear Registers 32bit (-/W) */
144#define COH901318_BE_INT_CLEAR1 (0x0028)
145#define COH901318_BE_INT_CLEAR2 (0x002C)
146/* RAW_BE_INT_STATUS - Raw Term Count Interrupt Status Registers 32bit (R/-) */
147#define COH901318_RAW_BE_INT_STATUS1 (0x0030)
148#define COH901318_RAW_BE_INT_STATUS2 (0x0034)
149
150/*
151 * CX_CFG - Channel Configuration Registers 32bit (R/W)
152 */
153#define COH901318_CX_CFG (0x0100)
154#define COH901318_CX_CFG_SPACING (0x04)
155/* Channel enable activates tha dma job */
156#define COH901318_CX_CFG_CH_ENABLE (0x00000001)
157#define COH901318_CX_CFG_CH_DISABLE (0x00000000)
158/* Request Mode */
159#define COH901318_CX_CFG_RM_MASK (0x00000006)
160#define COH901318_CX_CFG_RM_MEMORY_TO_MEMORY (0x0 << 1)
161#define COH901318_CX_CFG_RM_PRIMARY_TO_MEMORY (0x1 << 1)
162#define COH901318_CX_CFG_RM_MEMORY_TO_PRIMARY (0x1 << 1)
163#define COH901318_CX_CFG_RM_PRIMARY_TO_SECONDARY (0x3 << 1)
164#define COH901318_CX_CFG_RM_SECONDARY_TO_PRIMARY (0x3 << 1)
165/* Linked channel request field. RM must == 11 */
166#define COH901318_CX_CFG_LCRF_SHIFT 3
167#define COH901318_CX_CFG_LCRF_MASK (0x000001F8)
168#define COH901318_CX_CFG_LCR_DISABLE (0x00000000)
169/* Terminal Counter Interrupt Request Mask */
170#define COH901318_CX_CFG_TC_IRQ_ENABLE (0x00000200)
171#define COH901318_CX_CFG_TC_IRQ_DISABLE (0x00000000)
172/* Bus Error interrupt Mask */
173#define COH901318_CX_CFG_BE_IRQ_ENABLE (0x00000400)
174#define COH901318_CX_CFG_BE_IRQ_DISABLE (0x00000000)
175
176/*
177 * CX_STAT - Channel Status Registers 32bit (R/-)
178 */
179#define COH901318_CX_STAT (0x0200)
180#define COH901318_CX_STAT_SPACING (0x04)
181#define COH901318_CX_STAT_RBE_IRQ_IND (0x00000008)
182#define COH901318_CX_STAT_RTC_IRQ_IND (0x00000004)
183#define COH901318_CX_STAT_ACTIVE (0x00000002)
184#define COH901318_CX_STAT_ENABLED (0x00000001)
185
186/*
187 * CX_CTRL - Channel Control Registers 32bit (R/W)
188 */
189#define COH901318_CX_CTRL (0x0400)
190#define COH901318_CX_CTRL_SPACING (0x10)
191/* Transfer Count Enable */
192#define COH901318_CX_CTRL_TC_ENABLE (0x00001000)
193#define COH901318_CX_CTRL_TC_DISABLE (0x00000000)
194/* Transfer Count Value 0 - 4095 */
195#define COH901318_CX_CTRL_TC_VALUE_MASK (0x00000FFF)
196/* Burst count */
197#define COH901318_CX_CTRL_BURST_COUNT_MASK (0x0000E000)
198#define COH901318_CX_CTRL_BURST_COUNT_64_BYTES (0x7 << 13)
199#define COH901318_CX_CTRL_BURST_COUNT_48_BYTES (0x6 << 13)
200#define COH901318_CX_CTRL_BURST_COUNT_32_BYTES (0x5 << 13)
201#define COH901318_CX_CTRL_BURST_COUNT_16_BYTES (0x4 << 13)
202#define COH901318_CX_CTRL_BURST_COUNT_8_BYTES (0x3 << 13)
203#define COH901318_CX_CTRL_BURST_COUNT_4_BYTES (0x2 << 13)
204#define COH901318_CX_CTRL_BURST_COUNT_2_BYTES (0x1 << 13)
205#define COH901318_CX_CTRL_BURST_COUNT_1_BYTE (0x0 << 13)
206/* Source bus size */
207#define COH901318_CX_CTRL_SRC_BUS_SIZE_MASK (0x00030000)
208#define COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS (0x2 << 16)
209#define COH901318_CX_CTRL_SRC_BUS_SIZE_16_BITS (0x1 << 16)
210#define COH901318_CX_CTRL_SRC_BUS_SIZE_8_BITS (0x0 << 16)
211/* Source address increment */
212#define COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE (0x00040000)
213#define COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE (0x00000000)
214/* Destination Bus Size */
215#define COH901318_CX_CTRL_DST_BUS_SIZE_MASK (0x00180000)
216#define COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS (0x2 << 19)
217#define COH901318_CX_CTRL_DST_BUS_SIZE_16_BITS (0x1 << 19)
218#define COH901318_CX_CTRL_DST_BUS_SIZE_8_BITS (0x0 << 19)
219/* Destination address increment */
220#define COH901318_CX_CTRL_DST_ADDR_INC_ENABLE (0x00200000)
221#define COH901318_CX_CTRL_DST_ADDR_INC_DISABLE (0x00000000)
222/* Master Mode (Master2 is only connected to MSL) */
223#define COH901318_CX_CTRL_MASTER_MODE_MASK (0x00C00000)
224#define COH901318_CX_CTRL_MASTER_MODE_M2R_M1W (0x3 << 22)
225#define COH901318_CX_CTRL_MASTER_MODE_M1R_M2W (0x2 << 22)
226#define COH901318_CX_CTRL_MASTER_MODE_M2RW (0x1 << 22)
227#define COH901318_CX_CTRL_MASTER_MODE_M1RW (0x0 << 22)
228/* Terminal Count flag to PER enable */
229#define COH901318_CX_CTRL_TCP_ENABLE (0x01000000)
230#define COH901318_CX_CTRL_TCP_DISABLE (0x00000000)
231/* Terminal Count flags to CPU enable */
232#define COH901318_CX_CTRL_TC_IRQ_ENABLE (0x02000000)
233#define COH901318_CX_CTRL_TC_IRQ_DISABLE (0x00000000)
234/* Hand shake to peripheral */
235#define COH901318_CX_CTRL_HSP_ENABLE (0x04000000)
236#define COH901318_CX_CTRL_HSP_DISABLE (0x00000000)
237#define COH901318_CX_CTRL_HSS_ENABLE (0x08000000)
238#define COH901318_CX_CTRL_HSS_DISABLE (0x00000000)
239/* DMA mode */
240#define COH901318_CX_CTRL_DDMA_MASK (0x30000000)
241#define COH901318_CX_CTRL_DDMA_LEGACY (0x0 << 28)
242#define COH901318_CX_CTRL_DDMA_DEMAND_DMA1 (0x1 << 28)
243#define COH901318_CX_CTRL_DDMA_DEMAND_DMA2 (0x2 << 28)
244/* Primary Request Data Destination */
245#define COH901318_CX_CTRL_PRDD_MASK (0x40000000)
246#define COH901318_CX_CTRL_PRDD_DEST (0x1 << 30)
247#define COH901318_CX_CTRL_PRDD_SOURCE (0x0 << 30)
248
249/*
250 * CX_SRC_ADDR - Channel Source Address Registers 32bit (R/W)
251 */
252#define COH901318_CX_SRC_ADDR (0x0404)
253#define COH901318_CX_SRC_ADDR_SPACING (0x10)
254
255/*
256 * CX_DST_ADDR - Channel Destination Address Registers 32bit R/W
257 */
258#define COH901318_CX_DST_ADDR (0x0408)
259#define COH901318_CX_DST_ADDR_SPACING (0x10)
260
261/*
262 * CX_LNK_ADDR - Channel Link Address Registers 32bit (R/W)
263 */
264#define COH901318_CX_LNK_ADDR (0x040C)
265#define COH901318_CX_LNK_ADDR_SPACING (0x10)
266#define COH901318_CX_LNK_LINK_IMMEDIATE (0x00000001)
267#endif /* COH901318_H */
diff --git a/arch/arm/mach-u300/spi.c b/arch/arm/mach-u300/spi.c
index 02e6659286d5..910698293d64 100644
--- a/arch/arm/mach-u300/spi.c
+++ b/arch/arm/mach-u300/spi.c
@@ -10,9 +10,8 @@
10#include <linux/amba/bus.h> 10#include <linux/amba/bus.h>
11#include <linux/spi/spi.h> 11#include <linux/spi/spi.h>
12#include <linux/amba/pl022.h> 12#include <linux/amba/pl022.h>
13#include <linux/platform_data/dma-coh901318.h>
13#include <linux/err.h> 14#include <linux/err.h>
14#include <mach/coh901318.h>
15#include "dma_channels.h"
16 15
17/* 16/*
18 * The following is for the actual devices on the SSP/SPI bus 17 * The following is for the actual devices on the SSP/SPI bus
diff --git a/arch/arm/plat-spear/restart.c b/arch/arm/plat-spear/restart.c
index 4f990115b1bd..7d4616d5df11 100644
--- a/arch/arm/plat-spear/restart.c
+++ b/arch/arm/plat-spear/restart.c
@@ -11,8 +11,8 @@
11 * warranty of any kind, whether express or implied. 11 * warranty of any kind, whether express or implied.
12 */ 12 */
13#include <linux/io.h> 13#include <linux/io.h>
14#include <linux/amba/sp810.h>
14#include <asm/system_misc.h> 15#include <asm/system_misc.h>
15#include <asm/hardware/sp810.h>
16#include <mach/spear.h> 16#include <mach/spear.h>
17#include <mach/generic.h> 17#include <mach/generic.h>
18 18
diff --git a/drivers/clk/versatile/clk-vexpress.c b/drivers/clk/versatile/clk-vexpress.c
index f889f2f07b37..82b45aad8ccf 100644
--- a/drivers/clk/versatile/clk-vexpress.c
+++ b/drivers/clk/versatile/clk-vexpress.c
@@ -11,6 +11,7 @@
11 * Copyright (C) 2012 ARM Limited 11 * Copyright (C) 2012 ARM Limited
12 */ 12 */
13 13
14#include <linux/amba/sp810.h>
14#include <linux/clkdev.h> 15#include <linux/clkdev.h>
15#include <linux/clk-provider.h> 16#include <linux/clk-provider.h>
16#include <linux/err.h> 17#include <linux/err.h>
@@ -18,8 +19,6 @@
18#include <linux/of_address.h> 19#include <linux/of_address.h>
19#include <linux/vexpress.h> 20#include <linux/vexpress.h>
20 21
21#include <asm/hardware/sp810.h>
22
23static struct clk *vexpress_sp810_timerclken[4]; 22static struct clk *vexpress_sp810_timerclken[4];
24static DEFINE_SPINLOCK(vexpress_sp810_lock); 23static DEFINE_SPINLOCK(vexpress_sp810_lock);
25 24
diff --git a/drivers/clocksource/nomadik-mtu.c b/drivers/clocksource/nomadik-mtu.c
index 025afc6dd324..435e54d55bbd 100644
--- a/drivers/clocksource/nomadik-mtu.c
+++ b/drivers/clocksource/nomadik-mtu.c
@@ -15,6 +15,7 @@
15#include <linux/clocksource.h> 15#include <linux/clocksource.h>
16#include <linux/clk.h> 16#include <linux/clk.h>
17#include <linux/jiffies.h> 17#include <linux/jiffies.h>
18#include <linux/delay.h>
18#include <linux/err.h> 19#include <linux/err.h>
19#include <linux/platform_data/clocksource-nomadik-mtu.h> 20#include <linux/platform_data/clocksource-nomadik-mtu.h>
20#include <asm/mach/time.h> 21#include <asm/mach/time.h>
@@ -64,6 +65,7 @@ static void __iomem *mtu_base;
64static bool clkevt_periodic; 65static bool clkevt_periodic;
65static u32 clk_prescale; 66static u32 clk_prescale;
66static u32 nmdk_cycle; /* write-once */ 67static u32 nmdk_cycle; /* write-once */
68static struct delay_timer mtu_delay_timer;
67 69
68#ifdef CONFIG_NOMADIK_MTU_SCHED_CLOCK 70#ifdef CONFIG_NOMADIK_MTU_SCHED_CLOCK
69/* 71/*
@@ -80,6 +82,11 @@ static u32 notrace nomadik_read_sched_clock(void)
80} 82}
81#endif 83#endif
82 84
85static unsigned long nmdk_timer_read_current_timer(void)
86{
87 return ~readl_relaxed(mtu_base + MTU_VAL(0));
88}
89
83/* Clockevent device: use one-shot mode */ 90/* Clockevent device: use one-shot mode */
84static int nmdk_clkevt_next(unsigned long evt, struct clock_event_device *ev) 91static int nmdk_clkevt_next(unsigned long evt, struct clock_event_device *ev)
85{ 92{
@@ -234,4 +241,8 @@ void __init nmdk_timer_init(void __iomem *base, int irq)
234 setup_irq(irq, &nmdk_timer_irq); 241 setup_irq(irq, &nmdk_timer_irq);
235 nmdk_clkevt.cpumask = cpumask_of(0); 242 nmdk_clkevt.cpumask = cpumask_of(0);
236 clockevents_config_and_register(&nmdk_clkevt, rate, 2, 0xffffffffU); 243 clockevents_config_and_register(&nmdk_clkevt, rate, 2, 0xffffffffU);
244
245 mtu_delay_timer.read_current_timer = &nmdk_timer_read_current_timer;
246 mtu_delay_timer.freq = rate;
247 register_current_timer_delay(&mtu_delay_timer);
237} 248}
diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile
index 5399c45ac311..863fd1865d45 100644
--- a/drivers/cpufreq/Makefile
+++ b/drivers/cpufreq/Makefile
@@ -44,7 +44,7 @@ obj-$(CONFIG_X86_INTEL_PSTATE) += intel_pstate.o
44 44
45################################################################################## 45##################################################################################
46# ARM SoC drivers 46# ARM SoC drivers
47obj-$(CONFIG_UX500_SOC_DB8500) += db8500-cpufreq.o 47obj-$(CONFIG_UX500_SOC_DB8500) += dbx500-cpufreq.o
48obj-$(CONFIG_ARM_S3C2416_CPUFREQ) += s3c2416-cpufreq.o 48obj-$(CONFIG_ARM_S3C2416_CPUFREQ) += s3c2416-cpufreq.o
49obj-$(CONFIG_ARM_S3C64XX_CPUFREQ) += s3c64xx-cpufreq.o 49obj-$(CONFIG_ARM_S3C64XX_CPUFREQ) += s3c64xx-cpufreq.o
50obj-$(CONFIG_ARM_S5PV210_CPUFREQ) += s5pv210-cpufreq.o 50obj-$(CONFIG_ARM_S5PV210_CPUFREQ) += s5pv210-cpufreq.o
diff --git a/drivers/cpufreq/db8500-cpufreq.c b/drivers/cpufreq/dbx500-cpufreq.c
index 48a1988149d8..72f0c3efa76e 100644
--- a/drivers/cpufreq/db8500-cpufreq.c
+++ b/drivers/cpufreq/dbx500-cpufreq.c
@@ -1,13 +1,13 @@
1/* 1/*
2 * Copyright (C) STMicroelectronics 2009 2 * Copyright (C) STMicroelectronics 2009
3 * Copyright (C) ST-Ericsson SA 2010 3 * Copyright (C) ST-Ericsson SA 2010-2012
4 * 4 *
5 * License Terms: GNU General Public License v2 5 * License Terms: GNU General Public License v2
6 * Author: Sundar Iyer <sundar.iyer@stericsson.com> 6 * Author: Sundar Iyer <sundar.iyer@stericsson.com>
7 * Author: Martin Persson <martin.persson@stericsson.com> 7 * Author: Martin Persson <martin.persson@stericsson.com>
8 * Author: Jonas Aaberg <jonas.aberg@stericsson.com> 8 * Author: Jonas Aaberg <jonas.aberg@stericsson.com>
9 *
10 */ 9 */
10
11#include <linux/module.h> 11#include <linux/module.h>
12#include <linux/kernel.h> 12#include <linux/kernel.h>
13#include <linux/cpufreq.h> 13#include <linux/cpufreq.h>
@@ -19,22 +19,23 @@
19static struct cpufreq_frequency_table *freq_table; 19static struct cpufreq_frequency_table *freq_table;
20static struct clk *armss_clk; 20static struct clk *armss_clk;
21 21
22static struct freq_attr *db8500_cpufreq_attr[] = { 22static struct freq_attr *dbx500_cpufreq_attr[] = {
23 &cpufreq_freq_attr_scaling_available_freqs, 23 &cpufreq_freq_attr_scaling_available_freqs,
24 NULL, 24 NULL,
25}; 25};
26 26
27static int db8500_cpufreq_verify_speed(struct cpufreq_policy *policy) 27static int dbx500_cpufreq_verify_speed(struct cpufreq_policy *policy)
28{ 28{
29 return cpufreq_frequency_table_verify(policy, freq_table); 29 return cpufreq_frequency_table_verify(policy, freq_table);
30} 30}
31 31
32static int db8500_cpufreq_target(struct cpufreq_policy *policy, 32static int dbx500_cpufreq_target(struct cpufreq_policy *policy,
33 unsigned int target_freq, 33 unsigned int target_freq,
34 unsigned int relation) 34 unsigned int relation)
35{ 35{
36 struct cpufreq_freqs freqs; 36 struct cpufreq_freqs freqs;
37 unsigned int idx; 37 unsigned int idx;
38 int ret;
38 39
39 /* scale the target frequency to one of the extremes supported */ 40 /* scale the target frequency to one of the extremes supported */
40 if (target_freq < policy->cpuinfo.min_freq) 41 if (target_freq < policy->cpuinfo.min_freq)
@@ -43,10 +44,9 @@ static int db8500_cpufreq_target(struct cpufreq_policy *policy,
43 target_freq = policy->cpuinfo.max_freq; 44 target_freq = policy->cpuinfo.max_freq;
44 45
45 /* Lookup the next frequency */ 46 /* Lookup the next frequency */
46 if (cpufreq_frequency_table_target 47 if (cpufreq_frequency_table_target(policy, freq_table, target_freq,
47 (policy, freq_table, target_freq, relation, &idx)) { 48 relation, &idx))
48 return -EINVAL; 49 return -EINVAL;
49 }
50 50
51 freqs.old = policy->cur; 51 freqs.old = policy->cur;
52 freqs.new = freq_table[idx].frequency; 52 freqs.new = freq_table[idx].frequency;
@@ -59,9 +59,12 @@ static int db8500_cpufreq_target(struct cpufreq_policy *policy,
59 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); 59 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
60 60
61 /* update armss clk frequency */ 61 /* update armss clk frequency */
62 if (clk_set_rate(armss_clk, freq_table[idx].frequency * 1000)) { 62 ret = clk_set_rate(armss_clk, freqs.new * 1000);
63 pr_err("db8500-cpufreq: Failed to update armss clk\n"); 63
64 return -EINVAL; 64 if (ret) {
65 pr_err("dbx500-cpufreq: Failed to set armss_clk to %d Hz: error %d\n",
66 freqs.new * 1000, ret);
67 return ret;
65 } 68 }
66 69
67 /* post change notification */ 70 /* post change notification */
@@ -71,7 +74,7 @@ static int db8500_cpufreq_target(struct cpufreq_policy *policy,
71 return 0; 74 return 0;
72} 75}
73 76
74static unsigned int db8500_cpufreq_getspeed(unsigned int cpu) 77static unsigned int dbx500_cpufreq_getspeed(unsigned int cpu)
75{ 78{
76 int i = 0; 79 int i = 0;
77 unsigned long freq = clk_get_rate(armss_clk) / 1000; 80 unsigned long freq = clk_get_rate(armss_clk) / 1000;
@@ -83,40 +86,26 @@ static unsigned int db8500_cpufreq_getspeed(unsigned int cpu)
83 } 86 }
84 87
85 /* We could not find a corresponding frequency. */ 88 /* We could not find a corresponding frequency. */
86 pr_err("db8500-cpufreq: Failed to find cpufreq speed\n"); 89 pr_err("dbx500-cpufreq: Failed to find cpufreq speed\n");
87 return 0; 90 return 0;
88} 91}
89 92
90static int __cpuinit db8500_cpufreq_init(struct cpufreq_policy *policy) 93static int __cpuinit dbx500_cpufreq_init(struct cpufreq_policy *policy)
91{ 94{
92 int i = 0;
93 int res; 95 int res;
94 96
95 armss_clk = clk_get(NULL, "armss");
96 if (IS_ERR(armss_clk)) {
97 pr_err("db8500-cpufreq : Failed to get armss clk\n");
98 return PTR_ERR(armss_clk);
99 }
100
101 pr_info("db8500-cpufreq : Available frequencies:\n");
102 while (freq_table[i].frequency != CPUFREQ_TABLE_END) {
103 pr_info(" %d Mhz\n", freq_table[i].frequency/1000);
104 i++;
105 }
106
107 /* get policy fields based on the table */ 97 /* get policy fields based on the table */
108 res = cpufreq_frequency_table_cpuinfo(policy, freq_table); 98 res = cpufreq_frequency_table_cpuinfo(policy, freq_table);
109 if (!res) 99 if (!res)
110 cpufreq_frequency_table_get_attr(freq_table, policy->cpu); 100 cpufreq_frequency_table_get_attr(freq_table, policy->cpu);
111 else { 101 else {
112 pr_err("db8500-cpufreq : Failed to read policy table\n"); 102 pr_err("dbx500-cpufreq: Failed to read policy table\n");
113 clk_put(armss_clk);
114 return res; 103 return res;
115 } 104 }
116 105
117 policy->min = policy->cpuinfo.min_freq; 106 policy->min = policy->cpuinfo.min_freq;
118 policy->max = policy->cpuinfo.max_freq; 107 policy->max = policy->cpuinfo.max_freq;
119 policy->cur = db8500_cpufreq_getspeed(policy->cpu); 108 policy->cur = dbx500_cpufreq_getspeed(policy->cpu);
120 policy->governor = CPUFREQ_DEFAULT_GOVERNOR; 109 policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
121 110
122 /* 111 /*
@@ -132,42 +121,54 @@ static int __cpuinit db8500_cpufreq_init(struct cpufreq_policy *policy)
132 return 0; 121 return 0;
133} 122}
134 123
135static struct cpufreq_driver db8500_cpufreq_driver = { 124static struct cpufreq_driver dbx500_cpufreq_driver = {
136 .flags = CPUFREQ_STICKY, 125 .flags = CPUFREQ_STICKY | CPUFREQ_CONST_LOOPS,
137 .verify = db8500_cpufreq_verify_speed, 126 .verify = dbx500_cpufreq_verify_speed,
138 .target = db8500_cpufreq_target, 127 .target = dbx500_cpufreq_target,
139 .get = db8500_cpufreq_getspeed, 128 .get = dbx500_cpufreq_getspeed,
140 .init = db8500_cpufreq_init, 129 .init = dbx500_cpufreq_init,
141 .name = "DB8500", 130 .name = "DBX500",
142 .attr = db8500_cpufreq_attr, 131 .attr = dbx500_cpufreq_attr,
143}; 132};
144 133
145static int db8500_cpufreq_probe(struct platform_device *pdev) 134static int dbx500_cpufreq_probe(struct platform_device *pdev)
146{ 135{
147 freq_table = dev_get_platdata(&pdev->dev); 136 int i = 0;
148 137
138 freq_table = dev_get_platdata(&pdev->dev);
149 if (!freq_table) { 139 if (!freq_table) {
150 pr_err("db8500-cpufreq: Failed to fetch cpufreq table\n"); 140 pr_err("dbx500-cpufreq: Failed to fetch cpufreq table\n");
151 return -ENODEV; 141 return -ENODEV;
152 } 142 }
153 143
154 return cpufreq_register_driver(&db8500_cpufreq_driver); 144 armss_clk = clk_get(&pdev->dev, "armss");
145 if (IS_ERR(armss_clk)) {
146 pr_err("dbx500-cpufreq: Failed to get armss clk\n");
147 return PTR_ERR(armss_clk);
148 }
149
150 pr_info("dbx500-cpufreq: Available frequencies:\n");
151 while (freq_table[i].frequency != CPUFREQ_TABLE_END) {
152 pr_info(" %d Mhz\n", freq_table[i].frequency/1000);
153 i++;
154 }
155
156 return cpufreq_register_driver(&dbx500_cpufreq_driver);
155} 157}
156 158
157static struct platform_driver db8500_cpufreq_plat_driver = { 159static struct platform_driver dbx500_cpufreq_plat_driver = {
158 .driver = { 160 .driver = {
159 .name = "cpufreq-u8500", 161 .name = "cpufreq-ux500",
160 .owner = THIS_MODULE, 162 .owner = THIS_MODULE,
161 }, 163 },
162 .probe = db8500_cpufreq_probe, 164 .probe = dbx500_cpufreq_probe,
163}; 165};
164 166
165static int __init db8500_cpufreq_register(void) 167static int __init dbx500_cpufreq_register(void)
166{ 168{
167 pr_info("cpufreq for DB8500 started\n"); 169 return platform_driver_register(&dbx500_cpufreq_plat_driver);
168 return platform_driver_register(&db8500_cpufreq_plat_driver);
169} 170}
170device_initcall(db8500_cpufreq_register); 171device_initcall(dbx500_cpufreq_register);
171 172
172MODULE_LICENSE("GPL v2"); 173MODULE_LICENSE("GPL v2");
173MODULE_DESCRIPTION("cpufreq driver for DB8500"); 174MODULE_DESCRIPTION("cpufreq driver for DBX500");
diff --git a/drivers/dma/coh901318.c b/drivers/dma/coh901318.c
index aa384e53b7ac..a2f079aca550 100644
--- a/drivers/dma/coh901318.c
+++ b/drivers/dma/coh901318.c
@@ -21,11 +21,1241 @@
21#include <linux/io.h> 21#include <linux/io.h>
22#include <linux/uaccess.h> 22#include <linux/uaccess.h>
23#include <linux/debugfs.h> 23#include <linux/debugfs.h>
24#include <mach/coh901318.h> 24#include <linux/platform_data/dma-coh901318.h>
25 25
26#include "coh901318_lli.h" 26#include "coh901318.h"
27#include "dmaengine.h" 27#include "dmaengine.h"
28 28
29#define COH901318_MOD32_MASK (0x1F)
30#define COH901318_WORD_MASK (0xFFFFFFFF)
31/* INT_STATUS - Interrupt Status Registers 32bit (R/-) */
32#define COH901318_INT_STATUS1 (0x0000)
33#define COH901318_INT_STATUS2 (0x0004)
34/* TC_INT_STATUS - Terminal Count Interrupt Status Registers 32bit (R/-) */
35#define COH901318_TC_INT_STATUS1 (0x0008)
36#define COH901318_TC_INT_STATUS2 (0x000C)
37/* TC_INT_CLEAR - Terminal Count Interrupt Clear Registers 32bit (-/W) */
38#define COH901318_TC_INT_CLEAR1 (0x0010)
39#define COH901318_TC_INT_CLEAR2 (0x0014)
40/* RAW_TC_INT_STATUS - Raw Term Count Interrupt Status Registers 32bit (R/-) */
41#define COH901318_RAW_TC_INT_STATUS1 (0x0018)
42#define COH901318_RAW_TC_INT_STATUS2 (0x001C)
43/* BE_INT_STATUS - Bus Error Interrupt Status Registers 32bit (R/-) */
44#define COH901318_BE_INT_STATUS1 (0x0020)
45#define COH901318_BE_INT_STATUS2 (0x0024)
46/* BE_INT_CLEAR - Bus Error Interrupt Clear Registers 32bit (-/W) */
47#define COH901318_BE_INT_CLEAR1 (0x0028)
48#define COH901318_BE_INT_CLEAR2 (0x002C)
49/* RAW_BE_INT_STATUS - Raw Term Count Interrupt Status Registers 32bit (R/-) */
50#define COH901318_RAW_BE_INT_STATUS1 (0x0030)
51#define COH901318_RAW_BE_INT_STATUS2 (0x0034)
52
53/*
54 * CX_CFG - Channel Configuration Registers 32bit (R/W)
55 */
56#define COH901318_CX_CFG (0x0100)
57#define COH901318_CX_CFG_SPACING (0x04)
58/* Channel enable activates tha dma job */
59#define COH901318_CX_CFG_CH_ENABLE (0x00000001)
60#define COH901318_CX_CFG_CH_DISABLE (0x00000000)
61/* Request Mode */
62#define COH901318_CX_CFG_RM_MASK (0x00000006)
63#define COH901318_CX_CFG_RM_MEMORY_TO_MEMORY (0x0 << 1)
64#define COH901318_CX_CFG_RM_PRIMARY_TO_MEMORY (0x1 << 1)
65#define COH901318_CX_CFG_RM_MEMORY_TO_PRIMARY (0x1 << 1)
66#define COH901318_CX_CFG_RM_PRIMARY_TO_SECONDARY (0x3 << 1)
67#define COH901318_CX_CFG_RM_SECONDARY_TO_PRIMARY (0x3 << 1)
68/* Linked channel request field. RM must == 11 */
69#define COH901318_CX_CFG_LCRF_SHIFT 3
70#define COH901318_CX_CFG_LCRF_MASK (0x000001F8)
71#define COH901318_CX_CFG_LCR_DISABLE (0x00000000)
72/* Terminal Counter Interrupt Request Mask */
73#define COH901318_CX_CFG_TC_IRQ_ENABLE (0x00000200)
74#define COH901318_CX_CFG_TC_IRQ_DISABLE (0x00000000)
75/* Bus Error interrupt Mask */
76#define COH901318_CX_CFG_BE_IRQ_ENABLE (0x00000400)
77#define COH901318_CX_CFG_BE_IRQ_DISABLE (0x00000000)
78
79/*
80 * CX_STAT - Channel Status Registers 32bit (R/-)
81 */
82#define COH901318_CX_STAT (0x0200)
83#define COH901318_CX_STAT_SPACING (0x04)
84#define COH901318_CX_STAT_RBE_IRQ_IND (0x00000008)
85#define COH901318_CX_STAT_RTC_IRQ_IND (0x00000004)
86#define COH901318_CX_STAT_ACTIVE (0x00000002)
87#define COH901318_CX_STAT_ENABLED (0x00000001)
88
89/*
90 * CX_CTRL - Channel Control Registers 32bit (R/W)
91 */
92#define COH901318_CX_CTRL (0x0400)
93#define COH901318_CX_CTRL_SPACING (0x10)
94/* Transfer Count Enable */
95#define COH901318_CX_CTRL_TC_ENABLE (0x00001000)
96#define COH901318_CX_CTRL_TC_DISABLE (0x00000000)
97/* Transfer Count Value 0 - 4095 */
98#define COH901318_CX_CTRL_TC_VALUE_MASK (0x00000FFF)
99/* Burst count */
100#define COH901318_CX_CTRL_BURST_COUNT_MASK (0x0000E000)
101#define COH901318_CX_CTRL_BURST_COUNT_64_BYTES (0x7 << 13)
102#define COH901318_CX_CTRL_BURST_COUNT_48_BYTES (0x6 << 13)
103#define COH901318_CX_CTRL_BURST_COUNT_32_BYTES (0x5 << 13)
104#define COH901318_CX_CTRL_BURST_COUNT_16_BYTES (0x4 << 13)
105#define COH901318_CX_CTRL_BURST_COUNT_8_BYTES (0x3 << 13)
106#define COH901318_CX_CTRL_BURST_COUNT_4_BYTES (0x2 << 13)
107#define COH901318_CX_CTRL_BURST_COUNT_2_BYTES (0x1 << 13)
108#define COH901318_CX_CTRL_BURST_COUNT_1_BYTE (0x0 << 13)
109/* Source bus size */
110#define COH901318_CX_CTRL_SRC_BUS_SIZE_MASK (0x00030000)
111#define COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS (0x2 << 16)
112#define COH901318_CX_CTRL_SRC_BUS_SIZE_16_BITS (0x1 << 16)
113#define COH901318_CX_CTRL_SRC_BUS_SIZE_8_BITS (0x0 << 16)
114/* Source address increment */
115#define COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE (0x00040000)
116#define COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE (0x00000000)
117/* Destination Bus Size */
118#define COH901318_CX_CTRL_DST_BUS_SIZE_MASK (0x00180000)
119#define COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS (0x2 << 19)
120#define COH901318_CX_CTRL_DST_BUS_SIZE_16_BITS (0x1 << 19)
121#define COH901318_CX_CTRL_DST_BUS_SIZE_8_BITS (0x0 << 19)
122/* Destination address increment */
123#define COH901318_CX_CTRL_DST_ADDR_INC_ENABLE (0x00200000)
124#define COH901318_CX_CTRL_DST_ADDR_INC_DISABLE (0x00000000)
125/* Master Mode (Master2 is only connected to MSL) */
126#define COH901318_CX_CTRL_MASTER_MODE_MASK (0x00C00000)
127#define COH901318_CX_CTRL_MASTER_MODE_M2R_M1W (0x3 << 22)
128#define COH901318_CX_CTRL_MASTER_MODE_M1R_M2W (0x2 << 22)
129#define COH901318_CX_CTRL_MASTER_MODE_M2RW (0x1 << 22)
130#define COH901318_CX_CTRL_MASTER_MODE_M1RW (0x0 << 22)
131/* Terminal Count flag to PER enable */
132#define COH901318_CX_CTRL_TCP_ENABLE (0x01000000)
133#define COH901318_CX_CTRL_TCP_DISABLE (0x00000000)
134/* Terminal Count flags to CPU enable */
135#define COH901318_CX_CTRL_TC_IRQ_ENABLE (0x02000000)
136#define COH901318_CX_CTRL_TC_IRQ_DISABLE (0x00000000)
137/* Hand shake to peripheral */
138#define COH901318_CX_CTRL_HSP_ENABLE (0x04000000)
139#define COH901318_CX_CTRL_HSP_DISABLE (0x00000000)
140#define COH901318_CX_CTRL_HSS_ENABLE (0x08000000)
141#define COH901318_CX_CTRL_HSS_DISABLE (0x00000000)
142/* DMA mode */
143#define COH901318_CX_CTRL_DDMA_MASK (0x30000000)
144#define COH901318_CX_CTRL_DDMA_LEGACY (0x0 << 28)
145#define COH901318_CX_CTRL_DDMA_DEMAND_DMA1 (0x1 << 28)
146#define COH901318_CX_CTRL_DDMA_DEMAND_DMA2 (0x2 << 28)
147/* Primary Request Data Destination */
148#define COH901318_CX_CTRL_PRDD_MASK (0x40000000)
149#define COH901318_CX_CTRL_PRDD_DEST (0x1 << 30)
150#define COH901318_CX_CTRL_PRDD_SOURCE (0x0 << 30)
151
152/*
153 * CX_SRC_ADDR - Channel Source Address Registers 32bit (R/W)
154 */
155#define COH901318_CX_SRC_ADDR (0x0404)
156#define COH901318_CX_SRC_ADDR_SPACING (0x10)
157
158/*
159 * CX_DST_ADDR - Channel Destination Address Registers 32bit R/W
160 */
161#define COH901318_CX_DST_ADDR (0x0408)
162#define COH901318_CX_DST_ADDR_SPACING (0x10)
163
164/*
165 * CX_LNK_ADDR - Channel Link Address Registers 32bit (R/W)
166 */
167#define COH901318_CX_LNK_ADDR (0x040C)
168#define COH901318_CX_LNK_ADDR_SPACING (0x10)
169#define COH901318_CX_LNK_LINK_IMMEDIATE (0x00000001)
170
171/**
172 * struct coh901318_params - parameters for DMAC configuration
173 * @config: DMA config register
174 * @ctrl_lli_last: DMA control register for the last lli in the list
175 * @ctrl_lli: DMA control register for an lli
176 * @ctrl_lli_chained: DMA control register for a chained lli
177 */
178struct coh901318_params {
179 u32 config;
180 u32 ctrl_lli_last;
181 u32 ctrl_lli;
182 u32 ctrl_lli_chained;
183};
184
185/**
186 * struct coh_dma_channel - dma channel base
187 * @name: ascii name of dma channel
188 * @number: channel id number
189 * @desc_nbr_max: number of preallocated descriptors
190 * @priority_high: prio of channel, 0 low otherwise high.
191 * @param: configuration parameters
192 */
193struct coh_dma_channel {
194 const char name[32];
195 const int number;
196 const int desc_nbr_max;
197 const int priority_high;
198 const struct coh901318_params param;
199};
200
201/**
202 * struct powersave - DMA power save structure
203 * @lock: lock protecting data in this struct
204 * @started_channels: bit mask indicating active dma channels
205 */
206struct powersave {
207 spinlock_t lock;
208 u64 started_channels;
209};
210
211/* points out all dma slave channels.
212 * Syntax is [A1, B1, A2, B2, .... ,-1,-1]
213 * Select all channels from A to B, end of list is marked with -1,-1
214 */
215static int dma_slave_channels[] = {
216 U300_DMA_MSL_TX_0, U300_DMA_SPI_RX,
217 U300_DMA_UART1_TX, U300_DMA_UART1_RX, -1, -1};
218
219/* points out all dma memcpy channels. */
220static int dma_memcpy_channels[] = {
221 U300_DMA_GENERAL_PURPOSE_0, U300_DMA_GENERAL_PURPOSE_8, -1, -1};
222
223#define flags_memcpy_config (COH901318_CX_CFG_CH_DISABLE | \
224 COH901318_CX_CFG_RM_MEMORY_TO_MEMORY | \
225 COH901318_CX_CFG_LCR_DISABLE | \
226 COH901318_CX_CFG_TC_IRQ_ENABLE | \
227 COH901318_CX_CFG_BE_IRQ_ENABLE)
228#define flags_memcpy_lli_chained (COH901318_CX_CTRL_TC_ENABLE | \
229 COH901318_CX_CTRL_BURST_COUNT_32_BYTES | \
230 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | \
231 COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | \
232 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | \
233 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | \
234 COH901318_CX_CTRL_MASTER_MODE_M1RW | \
235 COH901318_CX_CTRL_TCP_DISABLE | \
236 COH901318_CX_CTRL_TC_IRQ_DISABLE | \
237 COH901318_CX_CTRL_HSP_DISABLE | \
238 COH901318_CX_CTRL_HSS_DISABLE | \
239 COH901318_CX_CTRL_DDMA_LEGACY | \
240 COH901318_CX_CTRL_PRDD_SOURCE)
241#define flags_memcpy_lli (COH901318_CX_CTRL_TC_ENABLE | \
242 COH901318_CX_CTRL_BURST_COUNT_32_BYTES | \
243 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | \
244 COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | \
245 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | \
246 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | \
247 COH901318_CX_CTRL_MASTER_MODE_M1RW | \
248 COH901318_CX_CTRL_TCP_DISABLE | \
249 COH901318_CX_CTRL_TC_IRQ_DISABLE | \
250 COH901318_CX_CTRL_HSP_DISABLE | \
251 COH901318_CX_CTRL_HSS_DISABLE | \
252 COH901318_CX_CTRL_DDMA_LEGACY | \
253 COH901318_CX_CTRL_PRDD_SOURCE)
254#define flags_memcpy_lli_last (COH901318_CX_CTRL_TC_ENABLE | \
255 COH901318_CX_CTRL_BURST_COUNT_32_BYTES | \
256 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | \
257 COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | \
258 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | \
259 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | \
260 COH901318_CX_CTRL_MASTER_MODE_M1RW | \
261 COH901318_CX_CTRL_TCP_DISABLE | \
262 COH901318_CX_CTRL_TC_IRQ_ENABLE | \
263 COH901318_CX_CTRL_HSP_DISABLE | \
264 COH901318_CX_CTRL_HSS_DISABLE | \
265 COH901318_CX_CTRL_DDMA_LEGACY | \
266 COH901318_CX_CTRL_PRDD_SOURCE)
267
268const struct coh_dma_channel chan_config[U300_DMA_CHANNELS] = {
269 {
270 .number = U300_DMA_MSL_TX_0,
271 .name = "MSL TX 0",
272 .priority_high = 0,
273 },
274 {
275 .number = U300_DMA_MSL_TX_1,
276 .name = "MSL TX 1",
277 .priority_high = 0,
278 .param.config = COH901318_CX_CFG_CH_DISABLE |
279 COH901318_CX_CFG_LCR_DISABLE |
280 COH901318_CX_CFG_TC_IRQ_ENABLE |
281 COH901318_CX_CFG_BE_IRQ_ENABLE,
282 .param.ctrl_lli_chained = 0 |
283 COH901318_CX_CTRL_TC_ENABLE |
284 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
285 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
286 COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE |
287 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
288 COH901318_CX_CTRL_DST_ADDR_INC_DISABLE |
289 COH901318_CX_CTRL_MASTER_MODE_M1R_M2W |
290 COH901318_CX_CTRL_TCP_DISABLE |
291 COH901318_CX_CTRL_TC_IRQ_DISABLE |
292 COH901318_CX_CTRL_HSP_ENABLE |
293 COH901318_CX_CTRL_HSS_DISABLE |
294 COH901318_CX_CTRL_DDMA_LEGACY |
295 COH901318_CX_CTRL_PRDD_SOURCE,
296 .param.ctrl_lli = 0 |
297 COH901318_CX_CTRL_TC_ENABLE |
298 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
299 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
300 COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE |
301 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
302 COH901318_CX_CTRL_DST_ADDR_INC_DISABLE |
303 COH901318_CX_CTRL_MASTER_MODE_M1R_M2W |
304 COH901318_CX_CTRL_TCP_ENABLE |
305 COH901318_CX_CTRL_TC_IRQ_DISABLE |
306 COH901318_CX_CTRL_HSP_ENABLE |
307 COH901318_CX_CTRL_HSS_DISABLE |
308 COH901318_CX_CTRL_DDMA_LEGACY |
309 COH901318_CX_CTRL_PRDD_SOURCE,
310 .param.ctrl_lli_last = 0 |
311 COH901318_CX_CTRL_TC_ENABLE |
312 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
313 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
314 COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE |
315 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
316 COH901318_CX_CTRL_DST_ADDR_INC_DISABLE |
317 COH901318_CX_CTRL_MASTER_MODE_M1R_M2W |
318 COH901318_CX_CTRL_TCP_ENABLE |
319 COH901318_CX_CTRL_TC_IRQ_ENABLE |
320 COH901318_CX_CTRL_HSP_ENABLE |
321 COH901318_CX_CTRL_HSS_DISABLE |
322 COH901318_CX_CTRL_DDMA_LEGACY |
323 COH901318_CX_CTRL_PRDD_SOURCE,
324 },
325 {
326 .number = U300_DMA_MSL_TX_2,
327 .name = "MSL TX 2",
328 .priority_high = 0,
329 .param.config = COH901318_CX_CFG_CH_DISABLE |
330 COH901318_CX_CFG_LCR_DISABLE |
331 COH901318_CX_CFG_TC_IRQ_ENABLE |
332 COH901318_CX_CFG_BE_IRQ_ENABLE,
333 .param.ctrl_lli_chained = 0 |
334 COH901318_CX_CTRL_TC_ENABLE |
335 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
336 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
337 COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE |
338 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
339 COH901318_CX_CTRL_DST_ADDR_INC_DISABLE |
340 COH901318_CX_CTRL_MASTER_MODE_M1R_M2W |
341 COH901318_CX_CTRL_TCP_DISABLE |
342 COH901318_CX_CTRL_TC_IRQ_DISABLE |
343 COH901318_CX_CTRL_HSP_ENABLE |
344 COH901318_CX_CTRL_HSS_DISABLE |
345 COH901318_CX_CTRL_DDMA_LEGACY |
346 COH901318_CX_CTRL_PRDD_SOURCE,
347 .param.ctrl_lli = 0 |
348 COH901318_CX_CTRL_TC_ENABLE |
349 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
350 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
351 COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE |
352 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
353 COH901318_CX_CTRL_DST_ADDR_INC_DISABLE |
354 COH901318_CX_CTRL_MASTER_MODE_M1R_M2W |
355 COH901318_CX_CTRL_TCP_ENABLE |
356 COH901318_CX_CTRL_TC_IRQ_DISABLE |
357 COH901318_CX_CTRL_HSP_ENABLE |
358 COH901318_CX_CTRL_HSS_DISABLE |
359 COH901318_CX_CTRL_DDMA_LEGACY |
360 COH901318_CX_CTRL_PRDD_SOURCE,
361 .param.ctrl_lli_last = 0 |
362 COH901318_CX_CTRL_TC_ENABLE |
363 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
364 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
365 COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE |
366 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
367 COH901318_CX_CTRL_DST_ADDR_INC_DISABLE |
368 COH901318_CX_CTRL_MASTER_MODE_M1R_M2W |
369 COH901318_CX_CTRL_TCP_ENABLE |
370 COH901318_CX_CTRL_TC_IRQ_ENABLE |
371 COH901318_CX_CTRL_HSP_ENABLE |
372 COH901318_CX_CTRL_HSS_DISABLE |
373 COH901318_CX_CTRL_DDMA_LEGACY |
374 COH901318_CX_CTRL_PRDD_SOURCE,
375 .desc_nbr_max = 10,
376 },
377 {
378 .number = U300_DMA_MSL_TX_3,
379 .name = "MSL TX 3",
380 .priority_high = 0,
381 .param.config = COH901318_CX_CFG_CH_DISABLE |
382 COH901318_CX_CFG_LCR_DISABLE |
383 COH901318_CX_CFG_TC_IRQ_ENABLE |
384 COH901318_CX_CFG_BE_IRQ_ENABLE,
385 .param.ctrl_lli_chained = 0 |
386 COH901318_CX_CTRL_TC_ENABLE |
387 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
388 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
389 COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE |
390 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
391 COH901318_CX_CTRL_DST_ADDR_INC_DISABLE |
392 COH901318_CX_CTRL_MASTER_MODE_M1R_M2W |
393 COH901318_CX_CTRL_TCP_DISABLE |
394 COH901318_CX_CTRL_TC_IRQ_DISABLE |
395 COH901318_CX_CTRL_HSP_ENABLE |
396 COH901318_CX_CTRL_HSS_DISABLE |
397 COH901318_CX_CTRL_DDMA_LEGACY |
398 COH901318_CX_CTRL_PRDD_SOURCE,
399 .param.ctrl_lli = 0 |
400 COH901318_CX_CTRL_TC_ENABLE |
401 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
402 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
403 COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE |
404 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
405 COH901318_CX_CTRL_DST_ADDR_INC_DISABLE |
406 COH901318_CX_CTRL_MASTER_MODE_M1R_M2W |
407 COH901318_CX_CTRL_TCP_ENABLE |
408 COH901318_CX_CTRL_TC_IRQ_DISABLE |
409 COH901318_CX_CTRL_HSP_ENABLE |
410 COH901318_CX_CTRL_HSS_DISABLE |
411 COH901318_CX_CTRL_DDMA_LEGACY |
412 COH901318_CX_CTRL_PRDD_SOURCE,
413 .param.ctrl_lli_last = 0 |
414 COH901318_CX_CTRL_TC_ENABLE |
415 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
416 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
417 COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE |
418 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
419 COH901318_CX_CTRL_DST_ADDR_INC_DISABLE |
420 COH901318_CX_CTRL_MASTER_MODE_M1R_M2W |
421 COH901318_CX_CTRL_TCP_ENABLE |
422 COH901318_CX_CTRL_TC_IRQ_ENABLE |
423 COH901318_CX_CTRL_HSP_ENABLE |
424 COH901318_CX_CTRL_HSS_DISABLE |
425 COH901318_CX_CTRL_DDMA_LEGACY |
426 COH901318_CX_CTRL_PRDD_SOURCE,
427 },
428 {
429 .number = U300_DMA_MSL_TX_4,
430 .name = "MSL TX 4",
431 .priority_high = 0,
432 .param.config = COH901318_CX_CFG_CH_DISABLE |
433 COH901318_CX_CFG_LCR_DISABLE |
434 COH901318_CX_CFG_TC_IRQ_ENABLE |
435 COH901318_CX_CFG_BE_IRQ_ENABLE,
436 .param.ctrl_lli_chained = 0 |
437 COH901318_CX_CTRL_TC_ENABLE |
438 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
439 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
440 COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE |
441 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
442 COH901318_CX_CTRL_DST_ADDR_INC_DISABLE |
443 COH901318_CX_CTRL_MASTER_MODE_M1R_M2W |
444 COH901318_CX_CTRL_TCP_DISABLE |
445 COH901318_CX_CTRL_TC_IRQ_DISABLE |
446 COH901318_CX_CTRL_HSP_ENABLE |
447 COH901318_CX_CTRL_HSS_DISABLE |
448 COH901318_CX_CTRL_DDMA_LEGACY |
449 COH901318_CX_CTRL_PRDD_SOURCE,
450 .param.ctrl_lli = 0 |
451 COH901318_CX_CTRL_TC_ENABLE |
452 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
453 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
454 COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE |
455 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
456 COH901318_CX_CTRL_DST_ADDR_INC_DISABLE |
457 COH901318_CX_CTRL_MASTER_MODE_M1R_M2W |
458 COH901318_CX_CTRL_TCP_ENABLE |
459 COH901318_CX_CTRL_TC_IRQ_DISABLE |
460 COH901318_CX_CTRL_HSP_ENABLE |
461 COH901318_CX_CTRL_HSS_DISABLE |
462 COH901318_CX_CTRL_DDMA_LEGACY |
463 COH901318_CX_CTRL_PRDD_SOURCE,
464 .param.ctrl_lli_last = 0 |
465 COH901318_CX_CTRL_TC_ENABLE |
466 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
467 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
468 COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE |
469 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
470 COH901318_CX_CTRL_DST_ADDR_INC_DISABLE |
471 COH901318_CX_CTRL_MASTER_MODE_M1R_M2W |
472 COH901318_CX_CTRL_TCP_ENABLE |
473 COH901318_CX_CTRL_TC_IRQ_ENABLE |
474 COH901318_CX_CTRL_HSP_ENABLE |
475 COH901318_CX_CTRL_HSS_DISABLE |
476 COH901318_CX_CTRL_DDMA_LEGACY |
477 COH901318_CX_CTRL_PRDD_SOURCE,
478 },
479 {
480 .number = U300_DMA_MSL_TX_5,
481 .name = "MSL TX 5",
482 .priority_high = 0,
483 },
484 {
485 .number = U300_DMA_MSL_TX_6,
486 .name = "MSL TX 6",
487 .priority_high = 0,
488 },
489 {
490 .number = U300_DMA_MSL_RX_0,
491 .name = "MSL RX 0",
492 .priority_high = 0,
493 },
494 {
495 .number = U300_DMA_MSL_RX_1,
496 .name = "MSL RX 1",
497 .priority_high = 0,
498 .param.config = COH901318_CX_CFG_CH_DISABLE |
499 COH901318_CX_CFG_LCR_DISABLE |
500 COH901318_CX_CFG_TC_IRQ_ENABLE |
501 COH901318_CX_CFG_BE_IRQ_ENABLE,
502 .param.ctrl_lli_chained = 0 |
503 COH901318_CX_CTRL_TC_ENABLE |
504 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
505 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
506 COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE |
507 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
508 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE |
509 COH901318_CX_CTRL_MASTER_MODE_M2R_M1W |
510 COH901318_CX_CTRL_TCP_DISABLE |
511 COH901318_CX_CTRL_TC_IRQ_DISABLE |
512 COH901318_CX_CTRL_HSP_ENABLE |
513 COH901318_CX_CTRL_HSS_DISABLE |
514 COH901318_CX_CTRL_DDMA_DEMAND_DMA1 |
515 COH901318_CX_CTRL_PRDD_DEST,
516 .param.ctrl_lli = 0,
517 .param.ctrl_lli_last = 0 |
518 COH901318_CX_CTRL_TC_ENABLE |
519 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
520 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
521 COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE |
522 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
523 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE |
524 COH901318_CX_CTRL_MASTER_MODE_M2R_M1W |
525 COH901318_CX_CTRL_TCP_DISABLE |
526 COH901318_CX_CTRL_TC_IRQ_ENABLE |
527 COH901318_CX_CTRL_HSP_ENABLE |
528 COH901318_CX_CTRL_HSS_DISABLE |
529 COH901318_CX_CTRL_DDMA_DEMAND_DMA1 |
530 COH901318_CX_CTRL_PRDD_DEST,
531 },
532 {
533 .number = U300_DMA_MSL_RX_2,
534 .name = "MSL RX 2",
535 .priority_high = 0,
536 .param.config = COH901318_CX_CFG_CH_DISABLE |
537 COH901318_CX_CFG_LCR_DISABLE |
538 COH901318_CX_CFG_TC_IRQ_ENABLE |
539 COH901318_CX_CFG_BE_IRQ_ENABLE,
540 .param.ctrl_lli_chained = 0 |
541 COH901318_CX_CTRL_TC_ENABLE |
542 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
543 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
544 COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE |
545 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
546 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE |
547 COH901318_CX_CTRL_MASTER_MODE_M2R_M1W |
548 COH901318_CX_CTRL_TCP_DISABLE |
549 COH901318_CX_CTRL_TC_IRQ_DISABLE |
550 COH901318_CX_CTRL_HSP_ENABLE |
551 COH901318_CX_CTRL_HSS_DISABLE |
552 COH901318_CX_CTRL_DDMA_DEMAND_DMA1 |
553 COH901318_CX_CTRL_PRDD_DEST,
554 .param.ctrl_lli = 0 |
555 COH901318_CX_CTRL_TC_ENABLE |
556 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
557 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
558 COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE |
559 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
560 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE |
561 COH901318_CX_CTRL_MASTER_MODE_M2R_M1W |
562 COH901318_CX_CTRL_TCP_DISABLE |
563 COH901318_CX_CTRL_TC_IRQ_ENABLE |
564 COH901318_CX_CTRL_HSP_ENABLE |
565 COH901318_CX_CTRL_HSS_DISABLE |
566 COH901318_CX_CTRL_DDMA_DEMAND_DMA1 |
567 COH901318_CX_CTRL_PRDD_DEST,
568 .param.ctrl_lli_last = 0 |
569 COH901318_CX_CTRL_TC_ENABLE |
570 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
571 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
572 COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE |
573 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
574 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE |
575 COH901318_CX_CTRL_MASTER_MODE_M2R_M1W |
576 COH901318_CX_CTRL_TCP_DISABLE |
577 COH901318_CX_CTRL_TC_IRQ_ENABLE |
578 COH901318_CX_CTRL_HSP_ENABLE |
579 COH901318_CX_CTRL_HSS_DISABLE |
580 COH901318_CX_CTRL_DDMA_DEMAND_DMA1 |
581 COH901318_CX_CTRL_PRDD_DEST,
582 },
583 {
584 .number = U300_DMA_MSL_RX_3,
585 .name = "MSL RX 3",
586 .priority_high = 0,
587 .param.config = COH901318_CX_CFG_CH_DISABLE |
588 COH901318_CX_CFG_LCR_DISABLE |
589 COH901318_CX_CFG_TC_IRQ_ENABLE |
590 COH901318_CX_CFG_BE_IRQ_ENABLE,
591 .param.ctrl_lli_chained = 0 |
592 COH901318_CX_CTRL_TC_ENABLE |
593 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
594 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
595 COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE |
596 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
597 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE |
598 COH901318_CX_CTRL_MASTER_MODE_M2R_M1W |
599 COH901318_CX_CTRL_TCP_DISABLE |
600 COH901318_CX_CTRL_TC_IRQ_DISABLE |
601 COH901318_CX_CTRL_HSP_ENABLE |
602 COH901318_CX_CTRL_HSS_DISABLE |
603 COH901318_CX_CTRL_DDMA_DEMAND_DMA1 |
604 COH901318_CX_CTRL_PRDD_DEST,
605 .param.ctrl_lli = 0 |
606 COH901318_CX_CTRL_TC_ENABLE |
607 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
608 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
609 COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE |
610 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
611 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE |
612 COH901318_CX_CTRL_MASTER_MODE_M2R_M1W |
613 COH901318_CX_CTRL_TCP_DISABLE |
614 COH901318_CX_CTRL_TC_IRQ_ENABLE |
615 COH901318_CX_CTRL_HSP_ENABLE |
616 COH901318_CX_CTRL_HSS_DISABLE |
617 COH901318_CX_CTRL_DDMA_DEMAND_DMA1 |
618 COH901318_CX_CTRL_PRDD_DEST,
619 .param.ctrl_lli_last = 0 |
620 COH901318_CX_CTRL_TC_ENABLE |
621 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
622 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
623 COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE |
624 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
625 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE |
626 COH901318_CX_CTRL_MASTER_MODE_M2R_M1W |
627 COH901318_CX_CTRL_TCP_DISABLE |
628 COH901318_CX_CTRL_TC_IRQ_ENABLE |
629 COH901318_CX_CTRL_HSP_ENABLE |
630 COH901318_CX_CTRL_HSS_DISABLE |
631 COH901318_CX_CTRL_DDMA_DEMAND_DMA1 |
632 COH901318_CX_CTRL_PRDD_DEST,
633 },
634 {
635 .number = U300_DMA_MSL_RX_4,
636 .name = "MSL RX 4",
637 .priority_high = 0,
638 .param.config = COH901318_CX_CFG_CH_DISABLE |
639 COH901318_CX_CFG_LCR_DISABLE |
640 COH901318_CX_CFG_TC_IRQ_ENABLE |
641 COH901318_CX_CFG_BE_IRQ_ENABLE,
642 .param.ctrl_lli_chained = 0 |
643 COH901318_CX_CTRL_TC_ENABLE |
644 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
645 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
646 COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE |
647 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
648 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE |
649 COH901318_CX_CTRL_MASTER_MODE_M2R_M1W |
650 COH901318_CX_CTRL_TCP_DISABLE |
651 COH901318_CX_CTRL_TC_IRQ_DISABLE |
652 COH901318_CX_CTRL_HSP_ENABLE |
653 COH901318_CX_CTRL_HSS_DISABLE |
654 COH901318_CX_CTRL_DDMA_DEMAND_DMA1 |
655 COH901318_CX_CTRL_PRDD_DEST,
656 .param.ctrl_lli = 0 |
657 COH901318_CX_CTRL_TC_ENABLE |
658 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
659 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
660 COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE |
661 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
662 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE |
663 COH901318_CX_CTRL_MASTER_MODE_M2R_M1W |
664 COH901318_CX_CTRL_TCP_DISABLE |
665 COH901318_CX_CTRL_TC_IRQ_ENABLE |
666 COH901318_CX_CTRL_HSP_ENABLE |
667 COH901318_CX_CTRL_HSS_DISABLE |
668 COH901318_CX_CTRL_DDMA_DEMAND_DMA1 |
669 COH901318_CX_CTRL_PRDD_DEST,
670 .param.ctrl_lli_last = 0 |
671 COH901318_CX_CTRL_TC_ENABLE |
672 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
673 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
674 COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE |
675 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
676 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE |
677 COH901318_CX_CTRL_MASTER_MODE_M2R_M1W |
678 COH901318_CX_CTRL_TCP_DISABLE |
679 COH901318_CX_CTRL_TC_IRQ_ENABLE |
680 COH901318_CX_CTRL_HSP_ENABLE |
681 COH901318_CX_CTRL_HSS_DISABLE |
682 COH901318_CX_CTRL_DDMA_DEMAND_DMA1 |
683 COH901318_CX_CTRL_PRDD_DEST,
684 },
685 {
686 .number = U300_DMA_MSL_RX_5,
687 .name = "MSL RX 5",
688 .priority_high = 0,
689 .param.config = COH901318_CX_CFG_CH_DISABLE |
690 COH901318_CX_CFG_LCR_DISABLE |
691 COH901318_CX_CFG_TC_IRQ_ENABLE |
692 COH901318_CX_CFG_BE_IRQ_ENABLE,
693 .param.ctrl_lli_chained = 0 |
694 COH901318_CX_CTRL_TC_ENABLE |
695 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
696 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
697 COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE |
698 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
699 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE |
700 COH901318_CX_CTRL_MASTER_MODE_M2R_M1W |
701 COH901318_CX_CTRL_TCP_DISABLE |
702 COH901318_CX_CTRL_TC_IRQ_DISABLE |
703 COH901318_CX_CTRL_HSP_ENABLE |
704 COH901318_CX_CTRL_HSS_DISABLE |
705 COH901318_CX_CTRL_DDMA_DEMAND_DMA1 |
706 COH901318_CX_CTRL_PRDD_DEST,
707 .param.ctrl_lli = 0 |
708 COH901318_CX_CTRL_TC_ENABLE |
709 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
710 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
711 COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE |
712 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
713 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE |
714 COH901318_CX_CTRL_MASTER_MODE_M2R_M1W |
715 COH901318_CX_CTRL_TCP_DISABLE |
716 COH901318_CX_CTRL_TC_IRQ_ENABLE |
717 COH901318_CX_CTRL_HSP_ENABLE |
718 COH901318_CX_CTRL_HSS_DISABLE |
719 COH901318_CX_CTRL_DDMA_DEMAND_DMA1 |
720 COH901318_CX_CTRL_PRDD_DEST,
721 .param.ctrl_lli_last = 0 |
722 COH901318_CX_CTRL_TC_ENABLE |
723 COH901318_CX_CTRL_BURST_COUNT_32_BYTES |
724 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
725 COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE |
726 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
727 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE |
728 COH901318_CX_CTRL_MASTER_MODE_M2R_M1W |
729 COH901318_CX_CTRL_TCP_DISABLE |
730 COH901318_CX_CTRL_TC_IRQ_ENABLE |
731 COH901318_CX_CTRL_HSP_ENABLE |
732 COH901318_CX_CTRL_HSS_DISABLE |
733 COH901318_CX_CTRL_DDMA_DEMAND_DMA1 |
734 COH901318_CX_CTRL_PRDD_DEST,
735 },
736 {
737 .number = U300_DMA_MSL_RX_6,
738 .name = "MSL RX 6",
739 .priority_high = 0,
740 },
741 /*
742 * Don't set up device address, burst count or size of src
743 * or dst bus for this peripheral - handled by PrimeCell
744 * DMA extension.
745 */
746 {
747 .number = U300_DMA_MMCSD_RX_TX,
748 .name = "MMCSD RX TX",
749 .priority_high = 0,
750 .param.config = COH901318_CX_CFG_CH_DISABLE |
751 COH901318_CX_CFG_LCR_DISABLE |
752 COH901318_CX_CFG_TC_IRQ_ENABLE |
753 COH901318_CX_CFG_BE_IRQ_ENABLE,
754 .param.ctrl_lli_chained = 0 |
755 COH901318_CX_CTRL_TC_ENABLE |
756 COH901318_CX_CTRL_MASTER_MODE_M1RW |
757 COH901318_CX_CTRL_TCP_ENABLE |
758 COH901318_CX_CTRL_TC_IRQ_DISABLE |
759 COH901318_CX_CTRL_HSP_ENABLE |
760 COH901318_CX_CTRL_HSS_DISABLE |
761 COH901318_CX_CTRL_DDMA_LEGACY,
762 .param.ctrl_lli = 0 |
763 COH901318_CX_CTRL_TC_ENABLE |
764 COH901318_CX_CTRL_MASTER_MODE_M1RW |
765 COH901318_CX_CTRL_TCP_ENABLE |
766 COH901318_CX_CTRL_TC_IRQ_DISABLE |
767 COH901318_CX_CTRL_HSP_ENABLE |
768 COH901318_CX_CTRL_HSS_DISABLE |
769 COH901318_CX_CTRL_DDMA_LEGACY,
770 .param.ctrl_lli_last = 0 |
771 COH901318_CX_CTRL_TC_ENABLE |
772 COH901318_CX_CTRL_MASTER_MODE_M1RW |
773 COH901318_CX_CTRL_TCP_DISABLE |
774 COH901318_CX_CTRL_TC_IRQ_ENABLE |
775 COH901318_CX_CTRL_HSP_ENABLE |
776 COH901318_CX_CTRL_HSS_DISABLE |
777 COH901318_CX_CTRL_DDMA_LEGACY,
778
779 },
780 {
781 .number = U300_DMA_MSPRO_TX,
782 .name = "MSPRO TX",
783 .priority_high = 0,
784 },
785 {
786 .number = U300_DMA_MSPRO_RX,
787 .name = "MSPRO RX",
788 .priority_high = 0,
789 },
790 /*
791 * Don't set up device address, burst count or size of src
792 * or dst bus for this peripheral - handled by PrimeCell
793 * DMA extension.
794 */
795 {
796 .number = U300_DMA_UART0_TX,
797 .name = "UART0 TX",
798 .priority_high = 0,
799 .param.config = COH901318_CX_CFG_CH_DISABLE |
800 COH901318_CX_CFG_LCR_DISABLE |
801 COH901318_CX_CFG_TC_IRQ_ENABLE |
802 COH901318_CX_CFG_BE_IRQ_ENABLE,
803 .param.ctrl_lli_chained = 0 |
804 COH901318_CX_CTRL_TC_ENABLE |
805 COH901318_CX_CTRL_MASTER_MODE_M1RW |
806 COH901318_CX_CTRL_TCP_ENABLE |
807 COH901318_CX_CTRL_TC_IRQ_DISABLE |
808 COH901318_CX_CTRL_HSP_ENABLE |
809 COH901318_CX_CTRL_HSS_DISABLE |
810 COH901318_CX_CTRL_DDMA_LEGACY,
811 .param.ctrl_lli = 0 |
812 COH901318_CX_CTRL_TC_ENABLE |
813 COH901318_CX_CTRL_MASTER_MODE_M1RW |
814 COH901318_CX_CTRL_TCP_ENABLE |
815 COH901318_CX_CTRL_TC_IRQ_ENABLE |
816 COH901318_CX_CTRL_HSP_ENABLE |
817 COH901318_CX_CTRL_HSS_DISABLE |
818 COH901318_CX_CTRL_DDMA_LEGACY,
819 .param.ctrl_lli_last = 0 |
820 COH901318_CX_CTRL_TC_ENABLE |
821 COH901318_CX_CTRL_MASTER_MODE_M1RW |
822 COH901318_CX_CTRL_TCP_ENABLE |
823 COH901318_CX_CTRL_TC_IRQ_ENABLE |
824 COH901318_CX_CTRL_HSP_ENABLE |
825 COH901318_CX_CTRL_HSS_DISABLE |
826 COH901318_CX_CTRL_DDMA_LEGACY,
827 },
828 {
829 .number = U300_DMA_UART0_RX,
830 .name = "UART0 RX",
831 .priority_high = 0,
832 .param.config = COH901318_CX_CFG_CH_DISABLE |
833 COH901318_CX_CFG_LCR_DISABLE |
834 COH901318_CX_CFG_TC_IRQ_ENABLE |
835 COH901318_CX_CFG_BE_IRQ_ENABLE,
836 .param.ctrl_lli_chained = 0 |
837 COH901318_CX_CTRL_TC_ENABLE |
838 COH901318_CX_CTRL_MASTER_MODE_M1RW |
839 COH901318_CX_CTRL_TCP_ENABLE |
840 COH901318_CX_CTRL_TC_IRQ_DISABLE |
841 COH901318_CX_CTRL_HSP_ENABLE |
842 COH901318_CX_CTRL_HSS_DISABLE |
843 COH901318_CX_CTRL_DDMA_LEGACY,
844 .param.ctrl_lli = 0 |
845 COH901318_CX_CTRL_TC_ENABLE |
846 COH901318_CX_CTRL_MASTER_MODE_M1RW |
847 COH901318_CX_CTRL_TCP_ENABLE |
848 COH901318_CX_CTRL_TC_IRQ_ENABLE |
849 COH901318_CX_CTRL_HSP_ENABLE |
850 COH901318_CX_CTRL_HSS_DISABLE |
851 COH901318_CX_CTRL_DDMA_LEGACY,
852 .param.ctrl_lli_last = 0 |
853 COH901318_CX_CTRL_TC_ENABLE |
854 COH901318_CX_CTRL_MASTER_MODE_M1RW |
855 COH901318_CX_CTRL_TCP_ENABLE |
856 COH901318_CX_CTRL_TC_IRQ_ENABLE |
857 COH901318_CX_CTRL_HSP_ENABLE |
858 COH901318_CX_CTRL_HSS_DISABLE |
859 COH901318_CX_CTRL_DDMA_LEGACY,
860 },
861 {
862 .number = U300_DMA_APEX_TX,
863 .name = "APEX TX",
864 .priority_high = 0,
865 },
866 {
867 .number = U300_DMA_APEX_RX,
868 .name = "APEX RX",
869 .priority_high = 0,
870 },
871 {
872 .number = U300_DMA_PCM_I2S0_TX,
873 .name = "PCM I2S0 TX",
874 .priority_high = 1,
875 .param.config = COH901318_CX_CFG_CH_DISABLE |
876 COH901318_CX_CFG_LCR_DISABLE |
877 COH901318_CX_CFG_TC_IRQ_ENABLE |
878 COH901318_CX_CFG_BE_IRQ_ENABLE,
879 .param.ctrl_lli_chained = 0 |
880 COH901318_CX_CTRL_TC_ENABLE |
881 COH901318_CX_CTRL_BURST_COUNT_16_BYTES |
882 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
883 COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE |
884 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
885 COH901318_CX_CTRL_DST_ADDR_INC_DISABLE |
886 COH901318_CX_CTRL_MASTER_MODE_M1RW |
887 COH901318_CX_CTRL_TCP_DISABLE |
888 COH901318_CX_CTRL_TC_IRQ_DISABLE |
889 COH901318_CX_CTRL_HSP_ENABLE |
890 COH901318_CX_CTRL_HSS_DISABLE |
891 COH901318_CX_CTRL_DDMA_LEGACY |
892 COH901318_CX_CTRL_PRDD_SOURCE,
893 .param.ctrl_lli = 0 |
894 COH901318_CX_CTRL_TC_ENABLE |
895 COH901318_CX_CTRL_BURST_COUNT_16_BYTES |
896 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
897 COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE |
898 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
899 COH901318_CX_CTRL_DST_ADDR_INC_DISABLE |
900 COH901318_CX_CTRL_MASTER_MODE_M1RW |
901 COH901318_CX_CTRL_TCP_ENABLE |
902 COH901318_CX_CTRL_TC_IRQ_DISABLE |
903 COH901318_CX_CTRL_HSP_ENABLE |
904 COH901318_CX_CTRL_HSS_DISABLE |
905 COH901318_CX_CTRL_DDMA_LEGACY |
906 COH901318_CX_CTRL_PRDD_SOURCE,
907 .param.ctrl_lli_last = 0 |
908 COH901318_CX_CTRL_TC_ENABLE |
909 COH901318_CX_CTRL_BURST_COUNT_16_BYTES |
910 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
911 COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE |
912 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
913 COH901318_CX_CTRL_DST_ADDR_INC_DISABLE |
914 COH901318_CX_CTRL_MASTER_MODE_M1RW |
915 COH901318_CX_CTRL_TCP_ENABLE |
916 COH901318_CX_CTRL_TC_IRQ_DISABLE |
917 COH901318_CX_CTRL_HSP_ENABLE |
918 COH901318_CX_CTRL_HSS_DISABLE |
919 COH901318_CX_CTRL_DDMA_LEGACY |
920 COH901318_CX_CTRL_PRDD_SOURCE,
921 },
922 {
923 .number = U300_DMA_PCM_I2S0_RX,
924 .name = "PCM I2S0 RX",
925 .priority_high = 1,
926 .param.config = COH901318_CX_CFG_CH_DISABLE |
927 COH901318_CX_CFG_LCR_DISABLE |
928 COH901318_CX_CFG_TC_IRQ_ENABLE |
929 COH901318_CX_CFG_BE_IRQ_ENABLE,
930 .param.ctrl_lli_chained = 0 |
931 COH901318_CX_CTRL_TC_ENABLE |
932 COH901318_CX_CTRL_BURST_COUNT_16_BYTES |
933 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
934 COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE |
935 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
936 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE |
937 COH901318_CX_CTRL_MASTER_MODE_M1RW |
938 COH901318_CX_CTRL_TCP_DISABLE |
939 COH901318_CX_CTRL_TC_IRQ_DISABLE |
940 COH901318_CX_CTRL_HSP_ENABLE |
941 COH901318_CX_CTRL_HSS_DISABLE |
942 COH901318_CX_CTRL_DDMA_LEGACY |
943 COH901318_CX_CTRL_PRDD_DEST,
944 .param.ctrl_lli = 0 |
945 COH901318_CX_CTRL_TC_ENABLE |
946 COH901318_CX_CTRL_BURST_COUNT_16_BYTES |
947 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
948 COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE |
949 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
950 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE |
951 COH901318_CX_CTRL_MASTER_MODE_M1RW |
952 COH901318_CX_CTRL_TCP_ENABLE |
953 COH901318_CX_CTRL_TC_IRQ_DISABLE |
954 COH901318_CX_CTRL_HSP_ENABLE |
955 COH901318_CX_CTRL_HSS_DISABLE |
956 COH901318_CX_CTRL_DDMA_LEGACY |
957 COH901318_CX_CTRL_PRDD_DEST,
958 .param.ctrl_lli_last = 0 |
959 COH901318_CX_CTRL_TC_ENABLE |
960 COH901318_CX_CTRL_BURST_COUNT_16_BYTES |
961 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
962 COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE |
963 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
964 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE |
965 COH901318_CX_CTRL_MASTER_MODE_M1RW |
966 COH901318_CX_CTRL_TCP_ENABLE |
967 COH901318_CX_CTRL_TC_IRQ_ENABLE |
968 COH901318_CX_CTRL_HSP_ENABLE |
969 COH901318_CX_CTRL_HSS_DISABLE |
970 COH901318_CX_CTRL_DDMA_LEGACY |
971 COH901318_CX_CTRL_PRDD_DEST,
972 },
973 {
974 .number = U300_DMA_PCM_I2S1_TX,
975 .name = "PCM I2S1 TX",
976 .priority_high = 1,
977 .param.config = COH901318_CX_CFG_CH_DISABLE |
978 COH901318_CX_CFG_LCR_DISABLE |
979 COH901318_CX_CFG_TC_IRQ_ENABLE |
980 COH901318_CX_CFG_BE_IRQ_ENABLE,
981 .param.ctrl_lli_chained = 0 |
982 COH901318_CX_CTRL_TC_ENABLE |
983 COH901318_CX_CTRL_BURST_COUNT_16_BYTES |
984 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
985 COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE |
986 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
987 COH901318_CX_CTRL_DST_ADDR_INC_DISABLE |
988 COH901318_CX_CTRL_MASTER_MODE_M1RW |
989 COH901318_CX_CTRL_TCP_DISABLE |
990 COH901318_CX_CTRL_TC_IRQ_DISABLE |
991 COH901318_CX_CTRL_HSP_ENABLE |
992 COH901318_CX_CTRL_HSS_DISABLE |
993 COH901318_CX_CTRL_DDMA_LEGACY |
994 COH901318_CX_CTRL_PRDD_SOURCE,
995 .param.ctrl_lli = 0 |
996 COH901318_CX_CTRL_TC_ENABLE |
997 COH901318_CX_CTRL_BURST_COUNT_16_BYTES |
998 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
999 COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE |
1000 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
1001 COH901318_CX_CTRL_DST_ADDR_INC_DISABLE |
1002 COH901318_CX_CTRL_MASTER_MODE_M1RW |
1003 COH901318_CX_CTRL_TCP_ENABLE |
1004 COH901318_CX_CTRL_TC_IRQ_DISABLE |
1005 COH901318_CX_CTRL_HSP_ENABLE |
1006 COH901318_CX_CTRL_HSS_DISABLE |
1007 COH901318_CX_CTRL_DDMA_LEGACY |
1008 COH901318_CX_CTRL_PRDD_SOURCE,
1009 .param.ctrl_lli_last = 0 |
1010 COH901318_CX_CTRL_TC_ENABLE |
1011 COH901318_CX_CTRL_BURST_COUNT_16_BYTES |
1012 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
1013 COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE |
1014 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
1015 COH901318_CX_CTRL_DST_ADDR_INC_DISABLE |
1016 COH901318_CX_CTRL_MASTER_MODE_M1RW |
1017 COH901318_CX_CTRL_TCP_ENABLE |
1018 COH901318_CX_CTRL_TC_IRQ_ENABLE |
1019 COH901318_CX_CTRL_HSP_ENABLE |
1020 COH901318_CX_CTRL_HSS_DISABLE |
1021 COH901318_CX_CTRL_DDMA_LEGACY |
1022 COH901318_CX_CTRL_PRDD_SOURCE,
1023 },
1024 {
1025 .number = U300_DMA_PCM_I2S1_RX,
1026 .name = "PCM I2S1 RX",
1027 .priority_high = 1,
1028 .param.config = COH901318_CX_CFG_CH_DISABLE |
1029 COH901318_CX_CFG_LCR_DISABLE |
1030 COH901318_CX_CFG_TC_IRQ_ENABLE |
1031 COH901318_CX_CFG_BE_IRQ_ENABLE,
1032 .param.ctrl_lli_chained = 0 |
1033 COH901318_CX_CTRL_TC_ENABLE |
1034 COH901318_CX_CTRL_BURST_COUNT_16_BYTES |
1035 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
1036 COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE |
1037 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
1038 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE |
1039 COH901318_CX_CTRL_MASTER_MODE_M1RW |
1040 COH901318_CX_CTRL_TCP_DISABLE |
1041 COH901318_CX_CTRL_TC_IRQ_DISABLE |
1042 COH901318_CX_CTRL_HSP_ENABLE |
1043 COH901318_CX_CTRL_HSS_DISABLE |
1044 COH901318_CX_CTRL_DDMA_LEGACY |
1045 COH901318_CX_CTRL_PRDD_DEST,
1046 .param.ctrl_lli = 0 |
1047 COH901318_CX_CTRL_TC_ENABLE |
1048 COH901318_CX_CTRL_BURST_COUNT_16_BYTES |
1049 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
1050 COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE |
1051 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
1052 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE |
1053 COH901318_CX_CTRL_MASTER_MODE_M1RW |
1054 COH901318_CX_CTRL_TCP_ENABLE |
1055 COH901318_CX_CTRL_TC_IRQ_DISABLE |
1056 COH901318_CX_CTRL_HSP_ENABLE |
1057 COH901318_CX_CTRL_HSS_DISABLE |
1058 COH901318_CX_CTRL_DDMA_LEGACY |
1059 COH901318_CX_CTRL_PRDD_DEST,
1060 .param.ctrl_lli_last = 0 |
1061 COH901318_CX_CTRL_TC_ENABLE |
1062 COH901318_CX_CTRL_BURST_COUNT_16_BYTES |
1063 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
1064 COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE |
1065 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS |
1066 COH901318_CX_CTRL_DST_ADDR_INC_ENABLE |
1067 COH901318_CX_CTRL_MASTER_MODE_M1RW |
1068 COH901318_CX_CTRL_TCP_ENABLE |
1069 COH901318_CX_CTRL_TC_IRQ_ENABLE |
1070 COH901318_CX_CTRL_HSP_ENABLE |
1071 COH901318_CX_CTRL_HSS_DISABLE |
1072 COH901318_CX_CTRL_DDMA_LEGACY |
1073 COH901318_CX_CTRL_PRDD_DEST,
1074 },
1075 {
1076 .number = U300_DMA_XGAM_CDI,
1077 .name = "XGAM CDI",
1078 .priority_high = 0,
1079 },
1080 {
1081 .number = U300_DMA_XGAM_PDI,
1082 .name = "XGAM PDI",
1083 .priority_high = 0,
1084 },
1085 /*
1086 * Don't set up device address, burst count or size of src
1087 * or dst bus for this peripheral - handled by PrimeCell
1088 * DMA extension.
1089 */
1090 {
1091 .number = U300_DMA_SPI_TX,
1092 .name = "SPI TX",
1093 .priority_high = 0,
1094 .param.config = COH901318_CX_CFG_CH_DISABLE |
1095 COH901318_CX_CFG_LCR_DISABLE |
1096 COH901318_CX_CFG_TC_IRQ_ENABLE |
1097 COH901318_CX_CFG_BE_IRQ_ENABLE,
1098 .param.ctrl_lli_chained = 0 |
1099 COH901318_CX_CTRL_TC_ENABLE |
1100 COH901318_CX_CTRL_MASTER_MODE_M1RW |
1101 COH901318_CX_CTRL_TCP_DISABLE |
1102 COH901318_CX_CTRL_TC_IRQ_DISABLE |
1103 COH901318_CX_CTRL_HSP_ENABLE |
1104 COH901318_CX_CTRL_HSS_DISABLE |
1105 COH901318_CX_CTRL_DDMA_LEGACY,
1106 .param.ctrl_lli = 0 |
1107 COH901318_CX_CTRL_TC_ENABLE |
1108 COH901318_CX_CTRL_MASTER_MODE_M1RW |
1109 COH901318_CX_CTRL_TCP_DISABLE |
1110 COH901318_CX_CTRL_TC_IRQ_ENABLE |
1111 COH901318_CX_CTRL_HSP_ENABLE |
1112 COH901318_CX_CTRL_HSS_DISABLE |
1113 COH901318_CX_CTRL_DDMA_LEGACY,
1114 .param.ctrl_lli_last = 0 |
1115 COH901318_CX_CTRL_TC_ENABLE |
1116 COH901318_CX_CTRL_MASTER_MODE_M1RW |
1117 COH901318_CX_CTRL_TCP_DISABLE |
1118 COH901318_CX_CTRL_TC_IRQ_ENABLE |
1119 COH901318_CX_CTRL_HSP_ENABLE |
1120 COH901318_CX_CTRL_HSS_DISABLE |
1121 COH901318_CX_CTRL_DDMA_LEGACY,
1122 },
1123 {
1124 .number = U300_DMA_SPI_RX,
1125 .name = "SPI RX",
1126 .priority_high = 0,
1127 .param.config = COH901318_CX_CFG_CH_DISABLE |
1128 COH901318_CX_CFG_LCR_DISABLE |
1129 COH901318_CX_CFG_TC_IRQ_ENABLE |
1130 COH901318_CX_CFG_BE_IRQ_ENABLE,
1131 .param.ctrl_lli_chained = 0 |
1132 COH901318_CX_CTRL_TC_ENABLE |
1133 COH901318_CX_CTRL_MASTER_MODE_M1RW |
1134 COH901318_CX_CTRL_TCP_DISABLE |
1135 COH901318_CX_CTRL_TC_IRQ_DISABLE |
1136 COH901318_CX_CTRL_HSP_ENABLE |
1137 COH901318_CX_CTRL_HSS_DISABLE |
1138 COH901318_CX_CTRL_DDMA_LEGACY,
1139 .param.ctrl_lli = 0 |
1140 COH901318_CX_CTRL_TC_ENABLE |
1141 COH901318_CX_CTRL_MASTER_MODE_M1RW |
1142 COH901318_CX_CTRL_TCP_DISABLE |
1143 COH901318_CX_CTRL_TC_IRQ_ENABLE |
1144 COH901318_CX_CTRL_HSP_ENABLE |
1145 COH901318_CX_CTRL_HSS_DISABLE |
1146 COH901318_CX_CTRL_DDMA_LEGACY,
1147 .param.ctrl_lli_last = 0 |
1148 COH901318_CX_CTRL_TC_ENABLE |
1149 COH901318_CX_CTRL_MASTER_MODE_M1RW |
1150 COH901318_CX_CTRL_TCP_DISABLE |
1151 COH901318_CX_CTRL_TC_IRQ_ENABLE |
1152 COH901318_CX_CTRL_HSP_ENABLE |
1153 COH901318_CX_CTRL_HSS_DISABLE |
1154 COH901318_CX_CTRL_DDMA_LEGACY,
1155
1156 },
1157 {
1158 .number = U300_DMA_GENERAL_PURPOSE_0,
1159 .name = "GENERAL 00",
1160 .priority_high = 0,
1161
1162 .param.config = flags_memcpy_config,
1163 .param.ctrl_lli_chained = flags_memcpy_lli_chained,
1164 .param.ctrl_lli = flags_memcpy_lli,
1165 .param.ctrl_lli_last = flags_memcpy_lli_last,
1166 },
1167 {
1168 .number = U300_DMA_GENERAL_PURPOSE_1,
1169 .name = "GENERAL 01",
1170 .priority_high = 0,
1171
1172 .param.config = flags_memcpy_config,
1173 .param.ctrl_lli_chained = flags_memcpy_lli_chained,
1174 .param.ctrl_lli = flags_memcpy_lli,
1175 .param.ctrl_lli_last = flags_memcpy_lli_last,
1176 },
1177 {
1178 .number = U300_DMA_GENERAL_PURPOSE_2,
1179 .name = "GENERAL 02",
1180 .priority_high = 0,
1181
1182 .param.config = flags_memcpy_config,
1183 .param.ctrl_lli_chained = flags_memcpy_lli_chained,
1184 .param.ctrl_lli = flags_memcpy_lli,
1185 .param.ctrl_lli_last = flags_memcpy_lli_last,
1186 },
1187 {
1188 .number = U300_DMA_GENERAL_PURPOSE_3,
1189 .name = "GENERAL 03",
1190 .priority_high = 0,
1191
1192 .param.config = flags_memcpy_config,
1193 .param.ctrl_lli_chained = flags_memcpy_lli_chained,
1194 .param.ctrl_lli = flags_memcpy_lli,
1195 .param.ctrl_lli_last = flags_memcpy_lli_last,
1196 },
1197 {
1198 .number = U300_DMA_GENERAL_PURPOSE_4,
1199 .name = "GENERAL 04",
1200 .priority_high = 0,
1201
1202 .param.config = flags_memcpy_config,
1203 .param.ctrl_lli_chained = flags_memcpy_lli_chained,
1204 .param.ctrl_lli = flags_memcpy_lli,
1205 .param.ctrl_lli_last = flags_memcpy_lli_last,
1206 },
1207 {
1208 .number = U300_DMA_GENERAL_PURPOSE_5,
1209 .name = "GENERAL 05",
1210 .priority_high = 0,
1211
1212 .param.config = flags_memcpy_config,
1213 .param.ctrl_lli_chained = flags_memcpy_lli_chained,
1214 .param.ctrl_lli = flags_memcpy_lli,
1215 .param.ctrl_lli_last = flags_memcpy_lli_last,
1216 },
1217 {
1218 .number = U300_DMA_GENERAL_PURPOSE_6,
1219 .name = "GENERAL 06",
1220 .priority_high = 0,
1221
1222 .param.config = flags_memcpy_config,
1223 .param.ctrl_lli_chained = flags_memcpy_lli_chained,
1224 .param.ctrl_lli = flags_memcpy_lli,
1225 .param.ctrl_lli_last = flags_memcpy_lli_last,
1226 },
1227 {
1228 .number = U300_DMA_GENERAL_PURPOSE_7,
1229 .name = "GENERAL 07",
1230 .priority_high = 0,
1231
1232 .param.config = flags_memcpy_config,
1233 .param.ctrl_lli_chained = flags_memcpy_lli_chained,
1234 .param.ctrl_lli = flags_memcpy_lli,
1235 .param.ctrl_lli_last = flags_memcpy_lli_last,
1236 },
1237 {
1238 .number = U300_DMA_GENERAL_PURPOSE_8,
1239 .name = "GENERAL 08",
1240 .priority_high = 0,
1241
1242 .param.config = flags_memcpy_config,
1243 .param.ctrl_lli_chained = flags_memcpy_lli_chained,
1244 .param.ctrl_lli = flags_memcpy_lli,
1245 .param.ctrl_lli_last = flags_memcpy_lli_last,
1246 },
1247 {
1248 .number = U300_DMA_UART1_TX,
1249 .name = "UART1 TX",
1250 .priority_high = 0,
1251 },
1252 {
1253 .number = U300_DMA_UART1_RX,
1254 .name = "UART1 RX",
1255 .priority_high = 0,
1256 }
1257};
1258
29#define COHC_2_DEV(cohc) (&cohc->chan.dev->device) 1259#define COHC_2_DEV(cohc) (&cohc->chan.dev->device)
30 1260
31#ifdef VERBOSE_DEBUG 1261#ifdef VERBOSE_DEBUG
@@ -54,7 +1284,6 @@ struct coh901318_base {
54 struct dma_device dma_slave; 1284 struct dma_device dma_slave;
55 struct dma_device dma_memcpy; 1285 struct dma_device dma_memcpy;
56 struct coh901318_chan *chans; 1286 struct coh901318_chan *chans;
57 struct coh901318_platform *platform;
58}; 1287};
59 1288
60struct coh901318_chan { 1289struct coh901318_chan {
@@ -75,8 +1304,8 @@ struct coh901318_chan {
75 unsigned long nbr_active_done; 1304 unsigned long nbr_active_done;
76 unsigned long busy; 1305 unsigned long busy;
77 1306
78 u32 runtime_addr; 1307 u32 addr;
79 u32 runtime_ctrl; 1308 u32 ctrl;
80 1309
81 struct coh901318_base *base; 1310 struct coh901318_base *base;
82}; 1311};
@@ -122,7 +1351,7 @@ static int coh901318_debugfs_read(struct file *file, char __user *buf,
122 1351
123 tmp += sprintf(tmp, "DMA -- enabled dma channels\n"); 1352 tmp += sprintf(tmp, "DMA -- enabled dma channels\n");
124 1353
125 for (i = 0; i < debugfs_dma_base->platform->max_channels; i++) 1354 for (i = 0; i < U300_DMA_CHANNELS; i++)
126 if (started_channels & (1 << i)) 1355 if (started_channels & (1 << i))
127 tmp += sprintf(tmp, "channel %d\n", i); 1356 tmp += sprintf(tmp, "channel %d\n", i);
128 1357
@@ -187,25 +1416,16 @@ static inline struct coh901318_chan *to_coh901318_chan(struct dma_chan *chan)
187 return container_of(chan, struct coh901318_chan, chan); 1416 return container_of(chan, struct coh901318_chan, chan);
188} 1417}
189 1418
190static inline dma_addr_t
191cohc_dev_addr(struct coh901318_chan *cohc)
192{
193 /* Runtime supplied address will take precedence */
194 if (cohc->runtime_addr)
195 return cohc->runtime_addr;
196 return cohc->base->platform->chan_conf[cohc->id].dev_addr;
197}
198
199static inline const struct coh901318_params * 1419static inline const struct coh901318_params *
200cohc_chan_param(struct coh901318_chan *cohc) 1420cohc_chan_param(struct coh901318_chan *cohc)
201{ 1421{
202 return &cohc->base->platform->chan_conf[cohc->id].param; 1422 return &chan_config[cohc->id].param;
203} 1423}
204 1424
205static inline const struct coh_dma_channel * 1425static inline const struct coh_dma_channel *
206cohc_chan_conf(struct coh901318_chan *cohc) 1426cohc_chan_conf(struct coh901318_chan *cohc)
207{ 1427{
208 return &cohc->base->platform->chan_conf[cohc->id]; 1428 return &chan_config[cohc->id];
209} 1429}
210 1430
211static void enable_powersave(struct coh901318_chan *cohc) 1431static void enable_powersave(struct coh901318_chan *cohc)
@@ -217,12 +1437,6 @@ static void enable_powersave(struct coh901318_chan *cohc)
217 1437
218 pm->started_channels &= ~(1ULL << cohc->id); 1438 pm->started_channels &= ~(1ULL << cohc->id);
219 1439
220 if (!pm->started_channels) {
221 /* DMA no longer intends to access memory */
222 cohc->base->platform->access_memory_state(cohc->base->dev,
223 false);
224 }
225
226 spin_unlock_irqrestore(&pm->lock, flags); 1440 spin_unlock_irqrestore(&pm->lock, flags);
227} 1441}
228static void disable_powersave(struct coh901318_chan *cohc) 1442static void disable_powersave(struct coh901318_chan *cohc)
@@ -232,12 +1446,6 @@ static void disable_powersave(struct coh901318_chan *cohc)
232 1446
233 spin_lock_irqsave(&pm->lock, flags); 1447 spin_lock_irqsave(&pm->lock, flags);
234 1448
235 if (!pm->started_channels) {
236 /* DMA intends to access memory */
237 cohc->base->platform->access_memory_state(cohc->base->dev,
238 true);
239 }
240
241 pm->started_channels |= (1ULL << cohc->id); 1449 pm->started_channels |= (1ULL << cohc->id);
242 1450
243 spin_unlock_irqrestore(&pm->lock, flags); 1451 spin_unlock_irqrestore(&pm->lock, flags);
@@ -596,7 +1804,7 @@ static int coh901318_config(struct coh901318_chan *cohc,
596 if (param) 1804 if (param)
597 p = param; 1805 p = param;
598 else 1806 else
599 p = &cohc->base->platform->chan_conf[channel].param; 1807 p = cohc_chan_param(cohc);
600 1808
601 /* Clear any pending BE or TC interrupt */ 1809 /* Clear any pending BE or TC interrupt */
602 if (channel < 32) { 1810 if (channel < 32) {
@@ -1052,9 +2260,9 @@ coh901318_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
1052 * sure the bits you set per peripheral channel are 2260 * sure the bits you set per peripheral channel are
1053 * cleared in the default config from the platform. 2261 * cleared in the default config from the platform.
1054 */ 2262 */
1055 ctrl_chained |= cohc->runtime_ctrl; 2263 ctrl_chained |= cohc->ctrl;
1056 ctrl_last |= cohc->runtime_ctrl; 2264 ctrl_last |= cohc->ctrl;
1057 ctrl |= cohc->runtime_ctrl; 2265 ctrl |= cohc->ctrl;
1058 2266
1059 if (direction == DMA_MEM_TO_DEV) { 2267 if (direction == DMA_MEM_TO_DEV) {
1060 u32 tx_flags = COH901318_CX_CTRL_PRDD_SOURCE | 2268 u32 tx_flags = COH901318_CX_CTRL_PRDD_SOURCE |
@@ -1103,7 +2311,7 @@ coh901318_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
1103 2311
1104 /* initiate allocated lli list */ 2312 /* initiate allocated lli list */
1105 ret = coh901318_lli_fill_sg(&cohc->base->pool, lli, sgl, sg_len, 2313 ret = coh901318_lli_fill_sg(&cohc->base->pool, lli, sgl, sg_len,
1106 cohc_dev_addr(cohc), 2314 cohc->addr,
1107 ctrl_chained, 2315 ctrl_chained,
1108 ctrl, 2316 ctrl,
1109 ctrl_last, 2317 ctrl_last,
@@ -1244,7 +2452,7 @@ static void coh901318_dma_set_runtimeconfig(struct dma_chan *chan,
1244 dma_addr_t addr; 2452 dma_addr_t addr;
1245 enum dma_slave_buswidth addr_width; 2453 enum dma_slave_buswidth addr_width;
1246 u32 maxburst; 2454 u32 maxburst;
1247 u32 runtime_ctrl = 0; 2455 u32 ctrl = 0;
1248 int i = 0; 2456 int i = 0;
1249 2457
1250 /* We only support mem to per or per to mem transfers */ 2458 /* We only support mem to per or per to mem transfers */
@@ -1265,7 +2473,7 @@ static void coh901318_dma_set_runtimeconfig(struct dma_chan *chan,
1265 addr_width); 2473 addr_width);
1266 switch (addr_width) { 2474 switch (addr_width) {
1267 case DMA_SLAVE_BUSWIDTH_1_BYTE: 2475 case DMA_SLAVE_BUSWIDTH_1_BYTE:
1268 runtime_ctrl |= 2476 ctrl |=
1269 COH901318_CX_CTRL_SRC_BUS_SIZE_8_BITS | 2477 COH901318_CX_CTRL_SRC_BUS_SIZE_8_BITS |
1270 COH901318_CX_CTRL_DST_BUS_SIZE_8_BITS; 2478 COH901318_CX_CTRL_DST_BUS_SIZE_8_BITS;
1271 2479
@@ -1277,7 +2485,7 @@ static void coh901318_dma_set_runtimeconfig(struct dma_chan *chan,
1277 2485
1278 break; 2486 break;
1279 case DMA_SLAVE_BUSWIDTH_2_BYTES: 2487 case DMA_SLAVE_BUSWIDTH_2_BYTES:
1280 runtime_ctrl |= 2488 ctrl |=
1281 COH901318_CX_CTRL_SRC_BUS_SIZE_16_BITS | 2489 COH901318_CX_CTRL_SRC_BUS_SIZE_16_BITS |
1282 COH901318_CX_CTRL_DST_BUS_SIZE_16_BITS; 2490 COH901318_CX_CTRL_DST_BUS_SIZE_16_BITS;
1283 2491
@@ -1290,7 +2498,7 @@ static void coh901318_dma_set_runtimeconfig(struct dma_chan *chan,
1290 break; 2498 break;
1291 case DMA_SLAVE_BUSWIDTH_4_BYTES: 2499 case DMA_SLAVE_BUSWIDTH_4_BYTES:
1292 /* Direction doesn't matter here, it's 32/32 bits */ 2500 /* Direction doesn't matter here, it's 32/32 bits */
1293 runtime_ctrl |= 2501 ctrl |=
1294 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | 2502 COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS |
1295 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS; 2503 COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS;
1296 2504
@@ -1307,13 +2515,13 @@ static void coh901318_dma_set_runtimeconfig(struct dma_chan *chan,
1307 return; 2515 return;
1308 } 2516 }
1309 2517
1310 runtime_ctrl |= burst_sizes[i].reg; 2518 ctrl |= burst_sizes[i].reg;
1311 dev_dbg(COHC_2_DEV(cohc), 2519 dev_dbg(COHC_2_DEV(cohc),
1312 "selected burst size %d bytes for address width %d bytes, maxburst %d\n", 2520 "selected burst size %d bytes for address width %d bytes, maxburst %d\n",
1313 burst_sizes[i].burst_8bit, addr_width, maxburst); 2521 burst_sizes[i].burst_8bit, addr_width, maxburst);
1314 2522
1315 cohc->runtime_addr = addr; 2523 cohc->addr = addr;
1316 cohc->runtime_ctrl = runtime_ctrl; 2524 cohc->ctrl = ctrl;
1317} 2525}
1318 2526
1319static int 2527static int
@@ -1431,7 +2639,6 @@ void coh901318_base_init(struct dma_device *dma, const int *pick_chans,
1431static int __init coh901318_probe(struct platform_device *pdev) 2639static int __init coh901318_probe(struct platform_device *pdev)
1432{ 2640{
1433 int err = 0; 2641 int err = 0;
1434 struct coh901318_platform *pdata;
1435 struct coh901318_base *base; 2642 struct coh901318_base *base;
1436 int irq; 2643 int irq;
1437 struct resource *io; 2644 struct resource *io;
@@ -1447,13 +2654,9 @@ static int __init coh901318_probe(struct platform_device *pdev)
1447 pdev->dev.driver->name) == NULL) 2654 pdev->dev.driver->name) == NULL)
1448 return -ENOMEM; 2655 return -ENOMEM;
1449 2656
1450 pdata = pdev->dev.platform_data;
1451 if (!pdata)
1452 return -ENODEV;
1453
1454 base = devm_kzalloc(&pdev->dev, 2657 base = devm_kzalloc(&pdev->dev,
1455 ALIGN(sizeof(struct coh901318_base), 4) + 2658 ALIGN(sizeof(struct coh901318_base), 4) +
1456 pdata->max_channels * 2659 U300_DMA_CHANNELS *
1457 sizeof(struct coh901318_chan), 2660 sizeof(struct coh901318_chan),
1458 GFP_KERNEL); 2661 GFP_KERNEL);
1459 if (!base) 2662 if (!base)
@@ -1466,7 +2669,6 @@ static int __init coh901318_probe(struct platform_device *pdev)
1466 return -ENOMEM; 2669 return -ENOMEM;
1467 2670
1468 base->dev = &pdev->dev; 2671 base->dev = &pdev->dev;
1469 base->platform = pdata;
1470 spin_lock_init(&base->pm.lock); 2672 spin_lock_init(&base->pm.lock);
1471 base->pm.started_channels = 0; 2673 base->pm.started_channels = 0;
1472 2674
@@ -1488,7 +2690,7 @@ static int __init coh901318_probe(struct platform_device *pdev)
1488 return err; 2690 return err;
1489 2691
1490 /* init channels for device transfers */ 2692 /* init channels for device transfers */
1491 coh901318_base_init(&base->dma_slave, base->platform->chans_slave, 2693 coh901318_base_init(&base->dma_slave, dma_slave_channels,
1492 base); 2694 base);
1493 2695
1494 dma_cap_zero(base->dma_slave.cap_mask); 2696 dma_cap_zero(base->dma_slave.cap_mask);
@@ -1508,7 +2710,7 @@ static int __init coh901318_probe(struct platform_device *pdev)
1508 goto err_register_slave; 2710 goto err_register_slave;
1509 2711
1510 /* init channels for memcpy */ 2712 /* init channels for memcpy */
1511 coh901318_base_init(&base->dma_memcpy, base->platform->chans_memcpy, 2713 coh901318_base_init(&base->dma_memcpy, dma_memcpy_channels,
1512 base); 2714 base);
1513 2715
1514 dma_cap_zero(base->dma_memcpy.cap_mask); 2716 dma_cap_zero(base->dma_memcpy.cap_mask);
diff --git a/drivers/dma/coh901318_lli.h b/drivers/dma/coh901318.h
index abff3714fdda..95ce1e2123ec 100644
--- a/drivers/dma/coh901318_lli.h
+++ b/drivers/dma/coh901318.h
@@ -1,16 +1,15 @@
1/* 1/*
2 * driver/dma/coh901318_lli.h 2 * Copyright (C) 2007-2013 ST-Ericsson
3 *
4 * Copyright (C) 2007-2009 ST-Ericsson
5 * License terms: GNU General Public License (GPL) version 2 3 * License terms: GNU General Public License (GPL) version 2
6 * Support functions for handling lli for coh901318 4 * DMA driver for COH 901 318
7 * Author: Per Friden <per.friden@stericsson.com> 5 * Author: Per Friden <per.friden@stericsson.com>
8 */ 6 */
9 7
10#ifndef COH901318_LLI_H 8#ifndef COH901318_H
11#define COH901318_LLI_H 9#define COH901318_H
12 10
13#include <mach/coh901318.h> 11#define MAX_DMA_PACKET_SIZE_SHIFT 11
12#define MAX_DMA_PACKET_SIZE (1 << MAX_DMA_PACKET_SIZE_SHIFT)
14 13
15struct device; 14struct device;
16 15
@@ -24,7 +23,25 @@ struct coh901318_pool {
24#endif 23#endif
25}; 24};
26 25
27struct device; 26/**
27 * struct coh901318_lli - linked list item for DMAC
28 * @control: control settings for DMAC
29 * @src_addr: transfer source address
30 * @dst_addr: transfer destination address
31 * @link_addr: physical address to next lli
32 * @virt_link_addr: virtual address of next lli (only used by pool_free)
33 * @phy_this: physical address of current lli (only used by pool_free)
34 */
35struct coh901318_lli {
36 u32 control;
37 dma_addr_t src_addr;
38 dma_addr_t dst_addr;
39 dma_addr_t link_addr;
40
41 void *virt_link_addr;
42 dma_addr_t phy_this;
43};
44
28/** 45/**
29 * coh901318_pool_create() - Creates an dma pool for lli:s 46 * coh901318_pool_create() - Creates an dma pool for lli:s
30 * @pool: pool handle 47 * @pool: pool handle
@@ -121,4 +138,4 @@ coh901318_lli_fill_sg(struct coh901318_pool *pool,
121 u32 ctrl, u32 ctrl_last, 138 u32 ctrl, u32 ctrl_last,
122 enum dma_transfer_direction dir, u32 ctrl_irq_mask); 139 enum dma_transfer_direction dir, u32 ctrl_irq_mask);
123 140
124#endif /* COH901318_LLI_H */ 141#endif /* COH901318_H */
diff --git a/drivers/dma/coh901318_lli.c b/drivers/dma/coh901318_lli.c
index 780e0429b38c..3e96610e18e2 100644
--- a/drivers/dma/coh901318_lli.c
+++ b/drivers/dma/coh901318_lli.c
@@ -11,9 +11,9 @@
11#include <linux/memory.h> 11#include <linux/memory.h>
12#include <linux/gfp.h> 12#include <linux/gfp.h>
13#include <linux/dmapool.h> 13#include <linux/dmapool.h>
14#include <mach/coh901318.h> 14#include <linux/dmaengine.h>
15 15
16#include "coh901318_lli.h" 16#include "coh901318.h"
17 17
18#if (defined(CONFIG_DEBUG_FS) && defined(CONFIG_U300_DEBUG)) 18#if (defined(CONFIG_DEBUG_FS) && defined(CONFIG_U300_DEBUG))
19#define DEBUGFS_POOL_COUNTER_RESET(pool) (pool->debugfs_pool_counter = 0) 19#define DEBUGFS_POOL_COUNTER_RESET(pool) (pool->debugfs_pool_counter = 0)
diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c
index 1192518e1aca..a2bacf95b59e 100644
--- a/drivers/mfd/db8500-prcmu.c
+++ b/drivers/mfd/db8500-prcmu.c
@@ -3102,8 +3102,8 @@ static struct mfd_cell db8500_prcmu_devs[] = {
3102 .pdata_size = sizeof(db8500_regulators), 3102 .pdata_size = sizeof(db8500_regulators),
3103 }, 3103 },
3104 { 3104 {
3105 .name = "cpufreq-u8500", 3105 .name = "cpufreq-ux500",
3106 .of_compatible = "stericsson,cpufreq-u8500", 3106 .of_compatible = "stericsson,cpufreq-ux500",
3107 .platform_data = &db8500_cpufreq_table, 3107 .platform_data = &db8500_cpufreq_table,
3108 .pdata_size = sizeof(db8500_cpufreq_table), 3108 .pdata_size = sizeof(db8500_cpufreq_table),
3109 }, 3109 },
diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
index 0002d5e94f0d..1d333497cfcb 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -1332,6 +1332,7 @@ static int omap_nand_probe(struct platform_device *pdev)
1332 dma_cap_mask_t mask; 1332 dma_cap_mask_t mask;
1333 unsigned sig; 1333 unsigned sig;
1334 struct resource *res; 1334 struct resource *res;
1335 struct mtd_part_parser_data ppdata = {};
1335 1336
1336 pdata = pdev->dev.platform_data; 1337 pdata = pdev->dev.platform_data;
1337 if (pdata == NULL) { 1338 if (pdata == NULL) {
@@ -1557,7 +1558,8 @@ static int omap_nand_probe(struct platform_device *pdev)
1557 goto out_release_mem_region; 1558 goto out_release_mem_region;
1558 } 1559 }
1559 1560
1560 mtd_device_parse_register(&info->mtd, NULL, NULL, pdata->parts, 1561 ppdata.of_node = pdata->of_node;
1562 mtd_device_parse_register(&info->mtd, NULL, &ppdata, pdata->parts,
1561 pdata->nr_parts); 1563 pdata->nr_parts);
1562 1564
1563 platform_set_drvdata(pdev, &info->mtd); 1565 platform_set_drvdata(pdev, &info->mtd);
diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
index 065f3fe02a2f..eec2aedb4ab8 100644
--- a/drivers/mtd/onenand/omap2.c
+++ b/drivers/mtd/onenand/omap2.c
@@ -637,6 +637,7 @@ static int omap2_onenand_probe(struct platform_device *pdev)
637 struct onenand_chip *this; 637 struct onenand_chip *this;
638 int r; 638 int r;
639 struct resource *res; 639 struct resource *res;
640 struct mtd_part_parser_data ppdata = {};
640 641
641 pdata = pdev->dev.platform_data; 642 pdata = pdev->dev.platform_data;
642 if (pdata == NULL) { 643 if (pdata == NULL) {
@@ -767,7 +768,8 @@ static int omap2_onenand_probe(struct platform_device *pdev)
767 if ((r = onenand_scan(&c->mtd, 1)) < 0) 768 if ((r = onenand_scan(&c->mtd, 1)) < 0)
768 goto err_release_regulator; 769 goto err_release_regulator;
769 770
770 r = mtd_device_parse_register(&c->mtd, NULL, NULL, 771 ppdata.of_node = pdata->of_node;
772 r = mtd_device_parse_register(&c->mtd, NULL, &ppdata,
771 pdata ? pdata->parts : NULL, 773 pdata ? pdata->parts : NULL,
772 pdata ? pdata->nr_parts : 0); 774 pdata ? pdata->nr_parts : 0);
773 if (r) 775 if (r)
diff --git a/arch/arm/include/asm/hardware/sp810.h b/include/linux/amba/sp810.h
index 6636430dd0e6..6636430dd0e6 100644
--- a/arch/arm/include/asm/hardware/sp810.h
+++ b/include/linux/amba/sp810.h
diff --git a/include/linux/platform_data/dma-coh901318.h b/include/linux/platform_data/dma-coh901318.h
new file mode 100644
index 000000000000..c4cb9590d115
--- /dev/null
+++ b/include/linux/platform_data/dma-coh901318.h
@@ -0,0 +1,72 @@
1/*
2 * Platform data for the COH901318 DMA controller
3 * Copyright (C) 2007-2013 ST-Ericsson
4 * License terms: GNU General Public License (GPL) version 2
5 */
6
7#ifndef PLAT_COH901318_H
8#define PLAT_COH901318_H
9
10#ifdef CONFIG_COH901318
11
12/* We only support the U300 DMA channels */
13#define U300_DMA_MSL_TX_0 0
14#define U300_DMA_MSL_TX_1 1
15#define U300_DMA_MSL_TX_2 2
16#define U300_DMA_MSL_TX_3 3
17#define U300_DMA_MSL_TX_4 4
18#define U300_DMA_MSL_TX_5 5
19#define U300_DMA_MSL_TX_6 6
20#define U300_DMA_MSL_RX_0 7
21#define U300_DMA_MSL_RX_1 8
22#define U300_DMA_MSL_RX_2 9
23#define U300_DMA_MSL_RX_3 10
24#define U300_DMA_MSL_RX_4 11
25#define U300_DMA_MSL_RX_5 12
26#define U300_DMA_MSL_RX_6 13
27#define U300_DMA_MMCSD_RX_TX 14
28#define U300_DMA_MSPRO_TX 15
29#define U300_DMA_MSPRO_RX 16
30#define U300_DMA_UART0_TX 17
31#define U300_DMA_UART0_RX 18
32#define U300_DMA_APEX_TX 19
33#define U300_DMA_APEX_RX 20
34#define U300_DMA_PCM_I2S0_TX 21
35#define U300_DMA_PCM_I2S0_RX 22
36#define U300_DMA_PCM_I2S1_TX 23
37#define U300_DMA_PCM_I2S1_RX 24
38#define U300_DMA_XGAM_CDI 25
39#define U300_DMA_XGAM_PDI 26
40#define U300_DMA_SPI_TX 27
41#define U300_DMA_SPI_RX 28
42#define U300_DMA_GENERAL_PURPOSE_0 29
43#define U300_DMA_GENERAL_PURPOSE_1 30
44#define U300_DMA_GENERAL_PURPOSE_2 31
45#define U300_DMA_GENERAL_PURPOSE_3 32
46#define U300_DMA_GENERAL_PURPOSE_4 33
47#define U300_DMA_GENERAL_PURPOSE_5 34
48#define U300_DMA_GENERAL_PURPOSE_6 35
49#define U300_DMA_GENERAL_PURPOSE_7 36
50#define U300_DMA_GENERAL_PURPOSE_8 37
51#define U300_DMA_UART1_TX 38
52#define U300_DMA_UART1_RX 39
53
54#define U300_DMA_DEVICE_CHANNELS 32
55#define U300_DMA_CHANNELS 40
56
57/**
58 * coh901318_filter_id() - DMA channel filter function
59 * @chan: dma channel handle
60 * @chan_id: id of dma channel to be filter out
61 *
62 * In dma_request_channel() it specifies what channel id to be requested
63 */
64bool coh901318_filter_id(struct dma_chan *chan, void *chan_id);
65#else
66static inline bool coh901318_filter_id(struct dma_chan *chan, void *chan_id)
67{
68 return false;
69}
70#endif
71
72#endif /* PLAT_COH901318_H */
diff --git a/include/linux/platform_data/mtd-nand-omap2.h b/include/linux/platform_data/mtd-nand-omap2.h
index 24d32ca34bef..6bf9ef43ddb1 100644
--- a/include/linux/platform_data/mtd-nand-omap2.h
+++ b/include/linux/platform_data/mtd-nand-omap2.h
@@ -60,6 +60,8 @@ struct omap_nand_platform_data {
60 int devsize; 60 int devsize;
61 enum omap_ecc ecc_opt; 61 enum omap_ecc ecc_opt;
62 struct gpmc_nand_regs reg; 62 struct gpmc_nand_regs reg;
63};
64 63
64 /* for passing the partitions */
65 struct device_node *of_node;
66};
65#endif 67#endif
diff --git a/include/linux/platform_data/mtd-onenand-omap2.h b/include/linux/platform_data/mtd-onenand-omap2.h
index 685af7e8b120..e9a9fb188f97 100644
--- a/include/linux/platform_data/mtd-onenand-omap2.h
+++ b/include/linux/platform_data/mtd-onenand-omap2.h
@@ -29,5 +29,8 @@ struct omap_onenand_platform_data {
29 u8 flags; 29 u8 flags;
30 u8 regulator_can_sleep; 30 u8 regulator_can_sleep;
31 u8 skip_initial_unlocking; 31 u8 skip_initial_unlocking;
32
33 /* for passing the partitions */
34 struct device_node *of_node;
32}; 35};
33#endif 36#endif