aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-mxc
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2010-11-04 10:50:38 -0400
committerSascha Hauer <s.hauer@pengutronix.de>2010-12-03 05:05:08 -0500
commit4e5cf41eeb254b7e50666496ac5697188b31320b (patch)
treeea04707294dda9dd8f6cfd7c7368b16e946877bb /arch/arm/plat-mxc
parent5b28aa319bba96987316425a1131813d87cbab35 (diff)
ARM i.MX SDMA: Add ROM script addresses to platform_data
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/plat-mxc')
-rw-r--r--arch/arm/plat-mxc/devices/platform-imx-dma.c105
1 files changed, 97 insertions, 8 deletions
diff --git a/arch/arm/plat-mxc/devices/platform-imx-dma.c b/arch/arm/plat-mxc/devices/platform-imx-dma.c
index 10f41ccf4146..93e2fdc3d65b 100644
--- a/arch/arm/plat-mxc/devices/platform-imx-dma.c
+++ b/arch/arm/plat-mxc/devices/platform-imx-dma.c
@@ -40,7 +40,7 @@ struct imx_imx_sdma_data {
40 } 40 }
41 41
42#ifdef CONFIG_SOC_IMX25 42#ifdef CONFIG_SOC_IMX25
43const struct imx_imx_sdma_data imx25_imx_sdma_data __initconst = 43struct imx_imx_sdma_data imx25_imx_sdma_data __initconst =
44 imx_imx_sdma_data_entry_single(MX25, 1, "imx25", 0); 44 imx_imx_sdma_data_entry_single(MX25, 1, "imx25", 0);
45#endif /* ifdef CONFIG_SOC_IMX25 */ 45#endif /* ifdef CONFIG_SOC_IMX25 */
46 46
@@ -55,7 +55,7 @@ struct imx_imx_sdma_data imx35_imx_sdma_data __initdata =
55#endif /* ifdef CONFIG_SOC_IMX35 */ 55#endif /* ifdef CONFIG_SOC_IMX35 */
56 56
57#ifdef CONFIG_ARCH_MX51 57#ifdef CONFIG_ARCH_MX51
58const struct imx_imx_sdma_data imx51_imx_sdma_data __initconst = 58struct imx_imx_sdma_data imx51_imx_sdma_data __initconst =
59 imx_imx_sdma_data_entry_single(MX51, 2, "imx51", 0); 59 imx_imx_sdma_data_entry_single(MX51, 2, "imx51", 0);
60#endif /* ifdef CONFIG_ARCH_MX51 */ 60#endif /* ifdef CONFIG_ARCH_MX51 */
61 61
@@ -84,6 +84,83 @@ static struct platform_device __init __maybe_unused *imx_add_imx_dma(void)
84 return imx_add_platform_device("imx-dma", -1, NULL, 0, NULL, 0); 84 return imx_add_platform_device("imx-dma", -1, NULL, 0, NULL, 0);
85} 85}
86 86
87#ifdef CONFIG_ARCH_MX25
88static struct sdma_script_start_addrs addr_imx25_to1 = {
89 .ap_2_ap_addr = 729,
90 .uart_2_mcu_addr = 904,
91 .per_2_app_addr = 1255,
92 .mcu_2_app_addr = 834,
93 .uartsh_2_mcu_addr = 1120,
94 .per_2_shp_addr = 1329,
95 .mcu_2_shp_addr = 1048,
96 .ata_2_mcu_addr = 1560,
97 .mcu_2_ata_addr = 1479,
98 .app_2_per_addr = 1189,
99 .app_2_mcu_addr = 770,
100 .shp_2_per_addr = 1407,
101 .shp_2_mcu_addr = 979,
102};
103#endif
104
105#ifdef CONFIG_ARCH_MX31
106static struct sdma_script_start_addrs addr_imx31_to1 = {
107 .per_2_per_addr = 1677,
108};
109
110static struct sdma_script_start_addrs addr_imx31_to2 = {
111 .ap_2_ap_addr = 423,
112 .ap_2_bp_addr = 829,
113 .bp_2_ap_addr = 1029,
114};
115#endif
116
117#ifdef CONFIG_ARCH_MX35
118static struct sdma_script_start_addrs addr_imx35_to1 = {
119 .ap_2_ap_addr = 642,
120 .uart_2_mcu_addr = 817,
121 .mcu_2_app_addr = 747,
122 .uartsh_2_mcu_addr = 1183,
123 .per_2_shp_addr = 1033,
124 .mcu_2_shp_addr = 961,
125 .ata_2_mcu_addr = 1333,
126 .mcu_2_ata_addr = 1252,
127 .app_2_mcu_addr = 683,
128 .shp_2_per_addr = 1111,
129 .shp_2_mcu_addr = 892,
130};
131
132static struct sdma_script_start_addrs addr_imx35_to2 = {
133 .ap_2_ap_addr = 729,
134 .uart_2_mcu_addr = 904,
135 .per_2_app_addr = 1597,
136 .mcu_2_app_addr = 834,
137 .uartsh_2_mcu_addr = 1270,
138 .per_2_shp_addr = 1120,
139 .mcu_2_shp_addr = 1048,
140 .ata_2_mcu_addr = 1429,
141 .mcu_2_ata_addr = 1339,
142 .app_2_per_addr = 1531,
143 .app_2_mcu_addr = 770,
144 .shp_2_per_addr = 1198,
145 .shp_2_mcu_addr = 979,
146};
147#endif
148
149#ifdef CONFIG_ARCH_MX51
150static struct sdma_script_start_addrs addr_imx51_to1 = {
151 .ap_2_ap_addr = 642,
152 .uart_2_mcu_addr = 817,
153 .mcu_2_app_addr = 747,
154 .mcu_2_shp_addr = 961,
155 .ata_2_mcu_addr = 1473,
156 .mcu_2_ata_addr = 1392,
157 .app_2_per_addr = 1033,
158 .app_2_mcu_addr = 683,
159 .shp_2_per_addr = 1251,
160 .shp_2_mcu_addr = 892,
161};
162#endif
163
87static int __init imxXX_add_imx_dma(void) 164static int __init imxXX_add_imx_dma(void)
88{ 165{
89 struct platform_device *ret; 166 struct platform_device *ret;
@@ -95,29 +172,41 @@ static int __init imxXX_add_imx_dma(void)
95#endif 172#endif
96 173
97#if defined(CONFIG_SOC_IMX25) 174#if defined(CONFIG_SOC_IMX25)
98 if (cpu_is_mx25()) 175 if (cpu_is_mx25()) {
176 imx25_imx_sdma_data.pdata.script_addrs = &addr_imx25_to1;
99 ret = imx_add_imx_sdma(&imx25_imx_sdma_data); 177 ret = imx_add_imx_sdma(&imx25_imx_sdma_data);
100 else 178 } else
101#endif 179#endif
102 180
103#if defined(CONFIG_SOC_IMX31) 181#if defined(CONFIG_SOC_IMX31)
104 if (cpu_is_mx31()) { 182 if (cpu_is_mx31()) {
105 imx31_imx_sdma_data.pdata.to_version = mx31_revision() >> 4; 183 int to_version = mx31_revision() >> 4;
184 imx31_imx_sdma_data.pdata.to_version = to_version;
185 if (to_version == 1)
186 imx31_imx_sdma_data.pdata.script_addrs = &addr_imx31_to1;
187 else
188 imx31_imx_sdma_data.pdata.script_addrs = &addr_imx31_to2;
106 ret = imx_add_imx_sdma(&imx31_imx_sdma_data); 189 ret = imx_add_imx_sdma(&imx31_imx_sdma_data);
107 } else 190 } else
108#endif 191#endif
109 192
110#if defined(CONFIG_SOC_IMX35) 193#if defined(CONFIG_SOC_IMX35)
111 if (cpu_is_mx35()) { 194 if (cpu_is_mx35()) {
112 imx35_imx_sdma_data.pdata.to_version = mx35_revision() >> 4; 195 int to_version = mx35_revision() >> 4;
196 imx35_imx_sdma_data.pdata.to_version = to_version;
197 if (to_version == 1)
198 imx35_imx_sdma_data.pdata.script_addrs = &addr_imx35_to1;
199 else
200 imx35_imx_sdma_data.pdata.script_addrs = &addr_imx35_to2;
113 ret = imx_add_imx_sdma(&imx35_imx_sdma_data); 201 ret = imx_add_imx_sdma(&imx35_imx_sdma_data);
114 } else 202 } else
115#endif 203#endif
116 204
117#if defined(CONFIG_ARCH_MX51) 205#if defined(CONFIG_ARCH_MX51)
118 if (cpu_is_mx51()) 206 if (cpu_is_mx51()) {
207 imx51_imx_sdma_data.pdata.script_addrs = &addr_imx51_to1;
119 ret = imx_add_imx_sdma(&imx51_imx_sdma_data); 208 ret = imx_add_imx_sdma(&imx51_imx_sdma_data);
120 else 209 } else
121#endif 210#endif
122 ret = ERR_PTR(-ENODEV); 211 ret = ERR_PTR(-ENODEV);
123 212