@@ -71,40 +71,6 @@ static void __iomem *imx3_ioremap_caller(phys_addr_t phys_addr, size_t size,
7171 return __arm_ioremap_caller (phys_addr , size , mtype , caller );
7272}
7373
74- static void __init imx3_init_l2x0 (void )
75- {
76- #ifdef CONFIG_CACHE_L2X0
77- void __iomem * l2x0_base ;
78- void __iomem * clkctl_base ;
79-
80- /*
81- * First of all, we must repair broken chip settings. There are some
82- * i.MX35 CPUs in the wild, comming with bogus L2 cache settings. These
83- * misconfigured CPUs will run amok immediately when the L2 cache gets enabled.
84- * Workaraound is to setup the correct register setting prior enabling the
85- * L2 cache. This should not hurt already working CPUs, as they are using the
86- * same value.
87- */
88- #define L2_MEM_VAL 0x10
89-
90- clkctl_base = ioremap (MX35_CLKCTL_BASE_ADDR , 4096 );
91- if (clkctl_base != NULL ) {
92- writel (0x00000515 , clkctl_base + L2_MEM_VAL );
93- iounmap (clkctl_base );
94- } else {
95- pr_err ("L2 cache: Cannot fix timing. Trying to continue without\n" );
96- }
97-
98- l2x0_base = ioremap (MX3x_L2CC_BASE_ADDR , 4096 );
99- if (!l2x0_base ) {
100- printk (KERN_ERR "remapping L2 cache area failed\n" );
101- return ;
102- }
103-
104- l2x0_init (l2x0_base , 0x00030024 , 0x00000000 );
105- #endif
106- }
107-
10874#ifdef CONFIG_SOC_IMX31
10975static struct map_desc mx31_io_desc [] __initdata = {
11076 imx_map_entry (MX31 , X_MEMC , MT_DEVICE ),
@@ -145,61 +111,6 @@ void __init mx31_init_irq(void)
145111{
146112 mxc_init_irq (MX31_IO_ADDRESS (MX31_AVIC_BASE_ADDR ));
147113}
148-
149- static struct sdma_script_start_addrs imx31_to1_sdma_script __initdata = {
150- .per_2_per_addr = 1677 ,
151- };
152-
153- static struct sdma_script_start_addrs imx31_to2_sdma_script __initdata = {
154- .ap_2_ap_addr = 423 ,
155- .ap_2_bp_addr = 829 ,
156- .bp_2_ap_addr = 1029 ,
157- };
158-
159- static struct sdma_platform_data imx31_sdma_pdata __initdata = {
160- .fw_name = "sdma-imx31-to2.bin" ,
161- .script_addrs = & imx31_to2_sdma_script ,
162- };
163-
164- static const struct resource imx31_audmux_res [] __initconst = {
165- DEFINE_RES_MEM (MX31_AUDMUX_BASE_ADDR , SZ_16K ),
166- };
167-
168- static const struct resource imx31_rnga_res [] __initconst = {
169- DEFINE_RES_MEM (MX31_RNGA_BASE_ADDR , SZ_16K ),
170- };
171-
172- void __init imx31_soc_init (void )
173- {
174- int to_version = mx31_revision () >> 4 ;
175-
176- imx3_init_l2x0 ();
177-
178- mxc_arch_reset_init (MX31_IO_ADDRESS (MX31_WDOG_BASE_ADDR ));
179- mxc_device_init ();
180-
181- mxc_register_gpio ("imx31-gpio" , 0 , MX31_GPIO1_BASE_ADDR , SZ_16K , MX31_INT_GPIO1 , 0 );
182- mxc_register_gpio ("imx31-gpio" , 1 , MX31_GPIO2_BASE_ADDR , SZ_16K , MX31_INT_GPIO2 , 0 );
183- mxc_register_gpio ("imx31-gpio" , 2 , MX31_GPIO3_BASE_ADDR , SZ_16K , MX31_INT_GPIO3 , 0 );
184-
185- pinctrl_provide_dummies ();
186-
187- if (to_version == 1 ) {
188- strncpy (imx31_sdma_pdata .fw_name , "sdma-imx31-to1.bin" ,
189- strlen (imx31_sdma_pdata .fw_name ));
190- imx31_sdma_pdata .script_addrs = & imx31_to1_sdma_script ;
191- }
192-
193- imx_add_imx_sdma ("imx31-sdma" , MX31_SDMA_BASE_ADDR , MX31_INT_SDMA , & imx31_sdma_pdata );
194-
195- imx_set_aips (MX31_IO_ADDRESS (MX31_AIPS1_BASE_ADDR ));
196- imx_set_aips (MX31_IO_ADDRESS (MX31_AIPS2_BASE_ADDR ));
197-
198- platform_device_register_simple ("imx31-audmux" , 0 , imx31_audmux_res ,
199- ARRAY_SIZE (imx31_audmux_res ));
200- platform_device_register_simple ("mxc_rnga" , -1 , imx31_rnga_res ,
201- ARRAY_SIZE (imx31_rnga_res ));
202- }
203114#endif /* ifdef CONFIG_SOC_IMX31 */
204115
205116#ifdef CONFIG_SOC_IMX35
@@ -239,74 +150,4 @@ void __init mx35_init_irq(void)
239150{
240151 mxc_init_irq (MX35_IO_ADDRESS (MX35_AVIC_BASE_ADDR ));
241152}
242-
243- static struct sdma_script_start_addrs imx35_to1_sdma_script __initdata = {
244- .ap_2_ap_addr = 642 ,
245- .uart_2_mcu_addr = 817 ,
246- .mcu_2_app_addr = 747 ,
247- .uartsh_2_mcu_addr = 1183 ,
248- .per_2_shp_addr = 1033 ,
249- .mcu_2_shp_addr = 961 ,
250- .ata_2_mcu_addr = 1333 ,
251- .mcu_2_ata_addr = 1252 ,
252- .app_2_mcu_addr = 683 ,
253- .shp_2_per_addr = 1111 ,
254- .shp_2_mcu_addr = 892 ,
255- };
256-
257- static struct sdma_script_start_addrs imx35_to2_sdma_script __initdata = {
258- .ap_2_ap_addr = 729 ,
259- .uart_2_mcu_addr = 904 ,
260- .per_2_app_addr = 1597 ,
261- .mcu_2_app_addr = 834 ,
262- .uartsh_2_mcu_addr = 1270 ,
263- .per_2_shp_addr = 1120 ,
264- .mcu_2_shp_addr = 1048 ,
265- .ata_2_mcu_addr = 1429 ,
266- .mcu_2_ata_addr = 1339 ,
267- .app_2_per_addr = 1531 ,
268- .app_2_mcu_addr = 770 ,
269- .shp_2_per_addr = 1198 ,
270- .shp_2_mcu_addr = 979 ,
271- };
272-
273- static struct sdma_platform_data imx35_sdma_pdata __initdata = {
274- .fw_name = "sdma-imx35-to2.bin" ,
275- .script_addrs = & imx35_to2_sdma_script ,
276- };
277-
278- static const struct resource imx35_audmux_res [] __initconst = {
279- DEFINE_RES_MEM (MX35_AUDMUX_BASE_ADDR , SZ_16K ),
280- };
281-
282- void __init imx35_soc_init (void )
283- {
284- int to_version = mx35_revision () >> 4 ;
285-
286- imx3_init_l2x0 ();
287-
288- mxc_arch_reset_init (MX35_IO_ADDRESS (MX35_WDOG_BASE_ADDR ));
289- mxc_device_init ();
290-
291- mxc_register_gpio ("imx35-gpio" , 0 , MX35_GPIO1_BASE_ADDR , SZ_16K , MX35_INT_GPIO1 , 0 );
292- mxc_register_gpio ("imx35-gpio" , 1 , MX35_GPIO2_BASE_ADDR , SZ_16K , MX35_INT_GPIO2 , 0 );
293- mxc_register_gpio ("imx35-gpio" , 2 , MX35_GPIO3_BASE_ADDR , SZ_16K , MX35_INT_GPIO3 , 0 );
294-
295- pinctrl_provide_dummies ();
296- if (to_version == 1 ) {
297- strncpy (imx35_sdma_pdata .fw_name , "sdma-imx35-to1.bin" ,
298- strlen (imx35_sdma_pdata .fw_name ));
299- imx35_sdma_pdata .script_addrs = & imx35_to1_sdma_script ;
300- }
301-
302- imx_add_imx_sdma ("imx35-sdma" , MX35_SDMA_BASE_ADDR , MX35_INT_SDMA , & imx35_sdma_pdata );
303-
304- /* Setup AIPS registers */
305- imx_set_aips (MX35_IO_ADDRESS (MX35_AIPS1_BASE_ADDR ));
306- imx_set_aips (MX35_IO_ADDRESS (MX35_AIPS2_BASE_ADDR ));
307-
308- /* i.mx35 has the i.mx31 type audmux */
309- platform_device_register_simple ("imx31-audmux" , 0 , imx35_audmux_res ,
310- ARRAY_SIZE (imx35_audmux_res ));
311- }
312153#endif /* ifdef CONFIG_SOC_IMX35 */
0 commit comments