diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-01 23:11:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-01 23:11:00 -0400 |
commit | 952414505f55afe5cd6dc004765076aa22b3ed7e (patch) | |
tree | eba11ed702ae02fea7f1a0d422346454fc98296f /arch/arm/mach-imx | |
parent | 68e24ba70465b82ad24e0774ceab5360180d4627 (diff) | |
parent | 3e965b176341b78620f7404fd8b7f9a0d061f8a2 (diff) |
Merge branch 'next/cleanup' of git://git.linaro.org/people/arnd/arm-soc
* 'next/cleanup' of git://git.linaro.org/people/arnd/arm-soc: (125 commits)
ARM: mach-mxs: fix machines' initializers order
mmc: mxcmmc: explicitly includes mach/hardware.h
arm/imx: explicitly includes mach/hardware.h in pm-imx27.c
arm/imx: remove mx27_setup_weimcs() from mx27.h
arm/imx: explicitly includes mach/hardware.h in mach-kzm_arm11_01.c
arm/imx: remove mx31_setup_weimcs() from mx31.h
ARM: tegra: devices.c should include devices.h
ARM: tegra: cpu-tegra: unexport two functions
ARM: tegra: cpu-tegra: sparse type fix
ARM: tegra: dma: staticify some tables and functions
ARM: tegra: tegra2_clocks: don't export some tables
ARM: tegra: tegra_powergate_is_powered should be static
ARM: tegra: tegra_rtc_read_ms should be static
ARM: tegra: tegra_init_cache should be static
ARM: tegra: pcie: 0 -> NULL changes
ARM: tegra: pcie: include board.h
ARM: tegra: pcie: don't cast __iomem pointers
ARM: tegra: tegra2_clocks: 0 -> NULL changes
ARM: tegra: tegra2_clocks: don't cast __iomem pointers
ARM: tegra: timer: don't cast __iomem pointers
...
Fix up trivial conflicts in
arch/arm/mach-omap2/Makefile,
arch/arm/mach-u300/{Makefile.boot,core.c}
arch/arm/plat-{mxc,omap}/devices.c
Diffstat (limited to 'arch/arm/mach-imx')
-rw-r--r-- | arch/arm/mach-imx/Makefile | 15 | ||||
-rw-r--r-- | arch/arm/mach-imx/cache-l2x0.c | 56 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-armadillo5x0.c | 18 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-cpuimx35.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-kzm_arm11_01.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-mx1ads.c | 15 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-mx27_3ds.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-pcm038.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-qong.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-vpr200.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-imx/mm-imx3.c | 256 | ||||
-rw-r--r-- | arch/arm/mach-imx/mm-imx31.c | 91 | ||||
-rw-r--r-- | arch/arm/mach-imx/mm-imx35.c | 109 | ||||
-rw-r--r-- | arch/arm/mach-imx/pm-imx27.c | 2 |
14 files changed, 287 insertions, 291 deletions
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile index e9eb36dad888..6cc821384ccd 100644 --- a/arch/arm/mach-imx/Makefile +++ b/arch/arm/mach-imx/Makefile | |||
@@ -1,16 +1,15 @@ | |||
1 | obj-$(CONFIG_IMX_HAVE_DMA_V1) += dma-v1.o | 1 | obj-$(CONFIG_IMX_HAVE_DMA_V1) += dma-v1.o |
2 | 2 | ||
3 | obj-$(CONFIG_ARCH_MX1) += clock-imx1.o mm-imx1.o | 3 | obj-$(CONFIG_SOC_IMX1) += clock-imx1.o mm-imx1.o |
4 | obj-$(CONFIG_MACH_MX21) += clock-imx21.o mm-imx21.o | 4 | obj-$(CONFIG_SOC_IMX21) += clock-imx21.o mm-imx21.o |
5 | 5 | ||
6 | obj-$(CONFIG_ARCH_MX25) += clock-imx25.o mm-imx25.o ehci-imx25.o | 6 | obj-$(CONFIG_SOC_IMX25) += clock-imx25.o mm-imx25.o ehci-imx25.o |
7 | 7 | ||
8 | obj-$(CONFIG_MACH_MX27) += cpu-imx27.o pm-imx27.o | 8 | obj-$(CONFIG_SOC_IMX27) += cpu-imx27.o pm-imx27.o |
9 | obj-$(CONFIG_MACH_MX27) += clock-imx27.o mm-imx27.o ehci-imx27.o | 9 | obj-$(CONFIG_SOC_IMX27) += clock-imx27.o mm-imx27.o ehci-imx27.o |
10 | 10 | ||
11 | obj-$(CONFIG_SOC_IMX31) += mm-imx31.o cpu-imx31.o clock-imx31.o iomux-imx31.o ehci-imx31.o | 11 | obj-$(CONFIG_SOC_IMX31) += mm-imx3.o cpu-imx31.o clock-imx31.o iomux-imx31.o ehci-imx31.o |
12 | obj-$(CONFIG_SOC_IMX35) += mm-imx35.o cpu-imx35.o clock-imx35.o ehci-imx35.o | 12 | obj-$(CONFIG_SOC_IMX35) += mm-imx3.o cpu-imx35.o clock-imx35.o ehci-imx35.o |
13 | obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o | ||
14 | 13 | ||
15 | # Support for CMOS sensor interface | 14 | # Support for CMOS sensor interface |
16 | obj-$(CONFIG_MX1_VIDEO) += mx1-camera-fiq.o mx1-camera-fiq-ksym.o | 15 | obj-$(CONFIG_MX1_VIDEO) += mx1-camera-fiq.o mx1-camera-fiq-ksym.o |
diff --git a/arch/arm/mach-imx/cache-l2x0.c b/arch/arm/mach-imx/cache-l2x0.c deleted file mode 100644 index 69d1322add3c..000000000000 --- a/arch/arm/mach-imx/cache-l2x0.c +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009-2010 Pengutronix | ||
3 | * Sascha Hauer <s.hauer@pengutronix.de> | ||
4 | * Juergen Beisert <j.beisert@pengutronix.de> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it under | ||
7 | * the terms of the GNU General Public License version 2 as published by the | ||
8 | * Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #include <linux/init.h> | ||
12 | #include <linux/err.h> | ||
13 | #include <linux/kernel.h> | ||
14 | |||
15 | #include <asm/hardware/cache-l2x0.h> | ||
16 | |||
17 | #include <mach/hardware.h> | ||
18 | |||
19 | static int mxc_init_l2x0(void) | ||
20 | { | ||
21 | void __iomem *l2x0_base; | ||
22 | void __iomem *clkctl_base; | ||
23 | |||
24 | if (!cpu_is_mx31() && !cpu_is_mx35()) | ||
25 | return 0; | ||
26 | |||
27 | /* | ||
28 | * First of all, we must repair broken chip settings. There are some | ||
29 | * i.MX35 CPUs in the wild, comming with bogus L2 cache settings. These | ||
30 | * misconfigured CPUs will run amok immediately when the L2 cache gets enabled. | ||
31 | * Workaraound is to setup the correct register setting prior enabling the | ||
32 | * L2 cache. This should not hurt already working CPUs, as they are using the | ||
33 | * same value. | ||
34 | */ | ||
35 | #define L2_MEM_VAL 0x10 | ||
36 | |||
37 | clkctl_base = ioremap(MX35_CLKCTL_BASE_ADDR, 4096); | ||
38 | if (clkctl_base != NULL) { | ||
39 | writel(0x00000515, clkctl_base + L2_MEM_VAL); | ||
40 | iounmap(clkctl_base); | ||
41 | } else { | ||
42 | pr_err("L2 cache: Cannot fix timing. Trying to continue without\n"); | ||
43 | } | ||
44 | |||
45 | l2x0_base = ioremap(MX3x_L2CC_BASE_ADDR, 4096); | ||
46 | if (IS_ERR(l2x0_base)) { | ||
47 | printk(KERN_ERR "remapping L2 cache area failed with %ld\n", | ||
48 | PTR_ERR(l2x0_base)); | ||
49 | return 0; | ||
50 | } | ||
51 | |||
52 | l2x0_init(l2x0_base, 0x00030024, 0x00000000); | ||
53 | |||
54 | return 0; | ||
55 | } | ||
56 | arch_initcall(mxc_init_l2x0); | ||
diff --git a/arch/arm/mach-imx/mach-armadillo5x0.c b/arch/arm/mach-imx/mach-armadillo5x0.c index 215259083945..fa2b97df5846 100644 --- a/arch/arm/mach-imx/mach-armadillo5x0.c +++ b/arch/arm/mach-imx/mach-armadillo5x0.c | |||
@@ -314,25 +314,19 @@ static struct mtd_partition armadillo5x0_nor_flash_partitions[] = { | |||
314 | }, | 314 | }, |
315 | }; | 315 | }; |
316 | 316 | ||
317 | static struct physmap_flash_data armadillo5x0_nor_flash_pdata = { | 317 | static const struct physmap_flash_data |
318 | armadillo5x0_nor_flash_pdata __initconst = { | ||
318 | .width = 2, | 319 | .width = 2, |
319 | .parts = armadillo5x0_nor_flash_partitions, | 320 | .parts = armadillo5x0_nor_flash_partitions, |
320 | .nr_parts = ARRAY_SIZE(armadillo5x0_nor_flash_partitions), | 321 | .nr_parts = ARRAY_SIZE(armadillo5x0_nor_flash_partitions), |
321 | }; | 322 | }; |
322 | 323 | ||
323 | static struct resource armadillo5x0_nor_flash_resource = { | 324 | static const struct resource armadillo5x0_nor_flash_resource __initconst = { |
324 | .flags = IORESOURCE_MEM, | 325 | .flags = IORESOURCE_MEM, |
325 | .start = MX31_CS0_BASE_ADDR, | 326 | .start = MX31_CS0_BASE_ADDR, |
326 | .end = MX31_CS0_BASE_ADDR + SZ_64M - 1, | 327 | .end = MX31_CS0_BASE_ADDR + SZ_64M - 1, |
327 | }; | 328 | }; |
328 | 329 | ||
329 | static struct platform_device armadillo5x0_nor_flash = { | ||
330 | .name = "physmap-flash", | ||
331 | .id = -1, | ||
332 | .num_resources = 1, | ||
333 | .resource = &armadillo5x0_nor_flash_resource, | ||
334 | }; | ||
335 | |||
336 | /* | 330 | /* |
337 | * FB support | 331 | * FB support |
338 | */ | 332 | */ |
@@ -514,8 +508,10 @@ static void __init armadillo5x0_init(void) | |||
514 | imx31_add_mx3_sdc_fb(&mx3fb_pdata); | 508 | imx31_add_mx3_sdc_fb(&mx3fb_pdata); |
515 | 509 | ||
516 | /* Register NOR Flash */ | 510 | /* Register NOR Flash */ |
517 | mxc_register_device(&armadillo5x0_nor_flash, | 511 | platform_device_register_resndata(NULL, "physmap-flash", -1, |
518 | &armadillo5x0_nor_flash_pdata); | 512 | &armadillo5x0_nor_flash_resource, 1, |
513 | &armadillo5x0_nor_flash_pdata, | ||
514 | sizeof(armadillo5x0_nor_flash_pdata)); | ||
519 | 515 | ||
520 | /* Register NAND Flash */ | 516 | /* Register NAND Flash */ |
521 | imx31_add_mxc_nand(&armadillo5x0_nand_board_info); | 517 | imx31_add_mxc_nand(&armadillo5x0_nand_board_info); |
diff --git a/arch/arm/mach-imx/mach-cpuimx35.c b/arch/arm/mach-imx/mach-cpuimx35.c index 470b654b0e6e..ea6c9c3468a6 100644 --- a/arch/arm/mach-imx/mach-cpuimx35.c +++ b/arch/arm/mach-imx/mach-cpuimx35.c | |||
@@ -66,7 +66,7 @@ static struct i2c_board_info eukrea_cpuimx35_i2c_devices[] = { | |||
66 | I2C_BOARD_INFO("tsc2007", 0x48), | 66 | I2C_BOARD_INFO("tsc2007", 0x48), |
67 | .type = "tsc2007", | 67 | .type = "tsc2007", |
68 | .platform_data = &tsc2007_info, | 68 | .platform_data = &tsc2007_info, |
69 | .irq = gpio_to_irq(TSC2007_IRQGPIO), | 69 | .irq = IMX_GPIO_TO_IRQ(TSC2007_IRQGPIO), |
70 | }, | 70 | }, |
71 | }; | 71 | }; |
72 | 72 | ||
diff --git a/arch/arm/mach-imx/mach-kzm_arm11_01.c b/arch/arm/mach-imx/mach-kzm_arm11_01.c index 7c20e9e58006..4e030ac58847 100644 --- a/arch/arm/mach-imx/mach-kzm_arm11_01.c +++ b/arch/arm/mach-imx/mach-kzm_arm11_01.c | |||
@@ -36,6 +36,7 @@ | |||
36 | 36 | ||
37 | #include <mach/clock.h> | 37 | #include <mach/clock.h> |
38 | #include <mach/common.h> | 38 | #include <mach/common.h> |
39 | #include <mach/hardware.h> | ||
39 | #include <mach/iomux-mx3.h> | 40 | #include <mach/iomux-mx3.h> |
40 | 41 | ||
41 | #include "devices-imx31.h" | 42 | #include "devices-imx31.h" |
diff --git a/arch/arm/mach-imx/mach-mx1ads.c b/arch/arm/mach-imx/mach-mx1ads.c index 530ea08dbafd..b4a5e0382634 100644 --- a/arch/arm/mach-imx/mach-mx1ads.c +++ b/arch/arm/mach-imx/mach-mx1ads.c | |||
@@ -68,23 +68,16 @@ static const struct imxuart_platform_data uart1_pdata __initconst = { | |||
68 | * Physmap flash | 68 | * Physmap flash |
69 | */ | 69 | */ |
70 | 70 | ||
71 | static struct physmap_flash_data mx1ads_flash_data = { | 71 | static const struct physmap_flash_data mx1ads_flash_data __initconst = { |
72 | .width = 4, /* bankwidth in bytes */ | 72 | .width = 4, /* bankwidth in bytes */ |
73 | }; | 73 | }; |
74 | 74 | ||
75 | static struct resource flash_resource = { | 75 | static const struct resource flash_resource __initconst = { |
76 | .start = MX1_CS0_PHYS, | 76 | .start = MX1_CS0_PHYS, |
77 | .end = MX1_CS0_PHYS + SZ_32M - 1, | 77 | .end = MX1_CS0_PHYS + SZ_32M - 1, |
78 | .flags = IORESOURCE_MEM, | 78 | .flags = IORESOURCE_MEM, |
79 | }; | 79 | }; |
80 | 80 | ||
81 | static struct platform_device flash_device = { | ||
82 | .name = "physmap-flash", | ||
83 | .id = 0, | ||
84 | .resource = &flash_resource, | ||
85 | .num_resources = 1, | ||
86 | }; | ||
87 | |||
88 | /* | 81 | /* |
89 | * I2C | 82 | * I2C |
90 | */ | 83 | */ |
@@ -125,7 +118,9 @@ static void __init mx1ads_init(void) | |||
125 | imx1_add_imx_uart1(&uart1_pdata); | 118 | imx1_add_imx_uart1(&uart1_pdata); |
126 | 119 | ||
127 | /* Physmap flash */ | 120 | /* Physmap flash */ |
128 | mxc_register_device(&flash_device, &mx1ads_flash_data); | 121 | platform_device_register_resndata(NULL, "physmap-flash", 0, |
122 | &flash_resource, 1, | ||
123 | &mx1ads_flash_data, sizeof(mx1ads_flash_data)); | ||
129 | 124 | ||
130 | /* I2C */ | 125 | /* I2C */ |
131 | i2c_register_board_info(0, mx1ads_i2c_devices, | 126 | i2c_register_board_info(0, mx1ads_i2c_devices, |
diff --git a/arch/arm/mach-imx/mach-mx27_3ds.c b/arch/arm/mach-imx/mach-mx27_3ds.c index 377230497dcc..04bc86de2c57 100644 --- a/arch/arm/mach-imx/mach-mx27_3ds.c +++ b/arch/arm/mach-imx/mach-mx27_3ds.c | |||
@@ -357,7 +357,7 @@ static struct spi_board_info mx27_3ds_spi_devs[] __initdata = { | |||
357 | .bus_num = 1, | 357 | .bus_num = 1, |
358 | .chip_select = 0, /* SS0 */ | 358 | .chip_select = 0, /* SS0 */ |
359 | .platform_data = &mc13783_pdata, | 359 | .platform_data = &mc13783_pdata, |
360 | .irq = gpio_to_irq(PMIC_INT), | 360 | .irq = IMX_GPIO_TO_IRQ(PMIC_INT), |
361 | .mode = SPI_CS_HIGH, | 361 | .mode = SPI_CS_HIGH, |
362 | }, { | 362 | }, { |
363 | .modalias = "l4f00242t03", | 363 | .modalias = "l4f00242t03", |
diff --git a/arch/arm/mach-imx/mach-pcm038.c b/arch/arm/mach-imx/mach-pcm038.c index 091bcf87e1a0..a497a2997002 100644 --- a/arch/arm/mach-imx/mach-pcm038.c +++ b/arch/arm/mach-imx/mach-pcm038.c | |||
@@ -176,7 +176,9 @@ static struct platform_device *platform_devices[] __initdata = { | |||
176 | * setup other stuffs to access the sram. */ | 176 | * setup other stuffs to access the sram. */ |
177 | static void __init pcm038_init_sram(void) | 177 | static void __init pcm038_init_sram(void) |
178 | { | 178 | { |
179 | mx27_setup_weimcs(1, 0x0000d843, 0x22252521, 0x22220a00); | 179 | __raw_writel(0x0000d843, MX27_IO_ADDRESS(MX27_WEIM_CSCRxU(1))); |
180 | __raw_writel(0x22252521, MX27_IO_ADDRESS(MX27_WEIM_CSCRxL(1))); | ||
181 | __raw_writel(0x22220a00, MX27_IO_ADDRESS(MX27_WEIM_CSCRxA(1))); | ||
180 | } | 182 | } |
181 | 183 | ||
182 | static const struct imxi2c_platform_data pcm038_i2c1_data __initconst = { | 184 | static const struct imxi2c_platform_data pcm038_i2c1_data __initconst = { |
diff --git a/arch/arm/mach-imx/mach-qong.c b/arch/arm/mach-imx/mach-qong.c index 9e11359c324c..c33ab00845f6 100644 --- a/arch/arm/mach-imx/mach-qong.c +++ b/arch/arm/mach-imx/mach-qong.c | |||
@@ -190,7 +190,10 @@ static struct platform_device qong_nand_device = { | |||
190 | static void __init qong_init_nand_mtd(void) | 190 | static void __init qong_init_nand_mtd(void) |
191 | { | 191 | { |
192 | /* init CS */ | 192 | /* init CS */ |
193 | mx31_setup_weimcs(3, 0x00004f00, 0x20013b31, 0x00020800); | 193 | __raw_writel(0x00004f00, MX31_IO_ADDRESS(MX31_WEIM_CSCRxU(3))); |
194 | __raw_writel(0x20013b31, MX31_IO_ADDRESS(MX31_WEIM_CSCRxL(3))); | ||
195 | __raw_writel(0x00020800, MX31_IO_ADDRESS(MX31_WEIM_CSCRxA(3))); | ||
196 | |||
194 | mxc_iomux_set_gpr(MUX_SDCTL_CSD1_SEL, true); | 197 | mxc_iomux_set_gpr(MUX_SDCTL_CSD1_SEL, true); |
195 | 198 | ||
196 | /* enable pin */ | 199 | /* enable pin */ |
diff --git a/arch/arm/mach-imx/mach-vpr200.c b/arch/arm/mach-imx/mach-vpr200.c index 7d8e012a6335..5250283479e7 100644 --- a/arch/arm/mach-imx/mach-vpr200.c +++ b/arch/arm/mach-imx/mach-vpr200.c | |||
@@ -162,7 +162,7 @@ static struct i2c_board_info vpr200_i2c_devices[] = { | |||
162 | }, { | 162 | }, { |
163 | I2C_BOARD_INFO("mc13892", 0x08), | 163 | I2C_BOARD_INFO("mc13892", 0x08), |
164 | .platform_data = &vpr200_pmic, | 164 | .platform_data = &vpr200_pmic, |
165 | .irq = gpio_to_irq(GPIO_PMIC_INT), | 165 | .irq = IMX_GPIO_TO_IRQ(GPIO_PMIC_INT), |
166 | } | 166 | } |
167 | }; | 167 | }; |
168 | 168 | ||
diff --git a/arch/arm/mach-imx/mm-imx3.c b/arch/arm/mach-imx/mm-imx3.c new file mode 100644 index 000000000000..9f0e82ec3398 --- /dev/null +++ b/arch/arm/mach-imx/mm-imx3.c | |||
@@ -0,0 +1,256 @@ | |||
1 | /* | ||
2 | * Copyright (C) 1999,2000 Arm Limited | ||
3 | * Copyright (C) 2000 Deep Blue Solutions Ltd | ||
4 | * Copyright (C) 2002 Shane Nay (shane@minirl.com) | ||
5 | * Copyright 2005-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
6 | * - add MX31 specific definitions | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | */ | ||
18 | |||
19 | #include <linux/mm.h> | ||
20 | #include <linux/init.h> | ||
21 | #include <linux/err.h> | ||
22 | |||
23 | #include <asm/pgtable.h> | ||
24 | #include <asm/hardware/cache-l2x0.h> | ||
25 | #include <asm/mach/map.h> | ||
26 | |||
27 | #include <mach/common.h> | ||
28 | #include <mach/devices-common.h> | ||
29 | #include <mach/hardware.h> | ||
30 | #include <mach/iomux-v3.h> | ||
31 | #include <mach/irqs.h> | ||
32 | |||
33 | static void imx3_idle(void) | ||
34 | { | ||
35 | unsigned long reg = 0; | ||
36 | __asm__ __volatile__( | ||
37 | /* disable I and D cache */ | ||
38 | "mrc p15, 0, %0, c1, c0, 0\n" | ||
39 | "bic %0, %0, #0x00001000\n" | ||
40 | "bic %0, %0, #0x00000004\n" | ||
41 | "mcr p15, 0, %0, c1, c0, 0\n" | ||
42 | /* invalidate I cache */ | ||
43 | "mov %0, #0\n" | ||
44 | "mcr p15, 0, %0, c7, c5, 0\n" | ||
45 | /* clear and invalidate D cache */ | ||
46 | "mov %0, #0\n" | ||
47 | "mcr p15, 0, %0, c7, c14, 0\n" | ||
48 | /* WFI */ | ||
49 | "mov %0, #0\n" | ||
50 | "mcr p15, 0, %0, c7, c0, 4\n" | ||
51 | "nop\n" "nop\n" "nop\n" "nop\n" | ||
52 | "nop\n" "nop\n" "nop\n" | ||
53 | /* enable I and D cache */ | ||
54 | "mrc p15, 0, %0, c1, c0, 0\n" | ||
55 | "orr %0, %0, #0x00001000\n" | ||
56 | "orr %0, %0, #0x00000004\n" | ||
57 | "mcr p15, 0, %0, c1, c0, 0\n" | ||
58 | : "=r" (reg)); | ||
59 | } | ||
60 | |||
61 | static void __iomem *imx3_ioremap(unsigned long phys_addr, size_t size, | ||
62 | unsigned int mtype) | ||
63 | { | ||
64 | if (mtype == MT_DEVICE) { | ||
65 | /* | ||
66 | * Access all peripherals below 0x80000000 as nonshared device | ||
67 | * on mx3, but leave l2cc alone. Otherwise cache corruptions | ||
68 | * can occur. | ||
69 | */ | ||
70 | if (phys_addr < 0x80000000 && | ||
71 | !addr_in_module(phys_addr, MX3x_L2CC)) | ||
72 | mtype = MT_DEVICE_NONSHARED; | ||
73 | } | ||
74 | |||
75 | return __arm_ioremap(phys_addr, size, mtype); | ||
76 | } | ||
77 | |||
78 | void imx3_init_l2x0(void) | ||
79 | { | ||
80 | void __iomem *l2x0_base; | ||
81 | void __iomem *clkctl_base; | ||
82 | |||
83 | /* | ||
84 | * First of all, we must repair broken chip settings. There are some | ||
85 | * i.MX35 CPUs in the wild, comming with bogus L2 cache settings. These | ||
86 | * misconfigured CPUs will run amok immediately when the L2 cache gets enabled. | ||
87 | * Workaraound is to setup the correct register setting prior enabling the | ||
88 | * L2 cache. This should not hurt already working CPUs, as they are using the | ||
89 | * same value. | ||
90 | */ | ||
91 | #define L2_MEM_VAL 0x10 | ||
92 | |||
93 | clkctl_base = ioremap(MX35_CLKCTL_BASE_ADDR, 4096); | ||
94 | if (clkctl_base != NULL) { | ||
95 | writel(0x00000515, clkctl_base + L2_MEM_VAL); | ||
96 | iounmap(clkctl_base); | ||
97 | } else { | ||
98 | pr_err("L2 cache: Cannot fix timing. Trying to continue without\n"); | ||
99 | } | ||
100 | |||
101 | l2x0_base = ioremap(MX3x_L2CC_BASE_ADDR, 4096); | ||
102 | if (IS_ERR(l2x0_base)) { | ||
103 | printk(KERN_ERR "remapping L2 cache area failed with %ld\n", | ||
104 | PTR_ERR(l2x0_base)); | ||
105 | return; | ||
106 | } | ||
107 | |||
108 | l2x0_init(l2x0_base, 0x00030024, 0x00000000); | ||
109 | } | ||
110 | |||
111 | static struct map_desc mx31_io_desc[] __initdata = { | ||
112 | imx_map_entry(MX31, X_MEMC, MT_DEVICE), | ||
113 | imx_map_entry(MX31, AVIC, MT_DEVICE_NONSHARED), | ||
114 | imx_map_entry(MX31, AIPS1, MT_DEVICE_NONSHARED), | ||
115 | imx_map_entry(MX31, AIPS2, MT_DEVICE_NONSHARED), | ||
116 | imx_map_entry(MX31, SPBA0, MT_DEVICE_NONSHARED), | ||
117 | }; | ||
118 | |||
119 | /* | ||
120 | * This function initializes the memory map. It is called during the | ||
121 | * system startup to create static physical to virtual memory mappings | ||
122 | * for the IO modules. | ||
123 | */ | ||
124 | void __init mx31_map_io(void) | ||
125 | { | ||
126 | iotable_init(mx31_io_desc, ARRAY_SIZE(mx31_io_desc)); | ||
127 | } | ||
128 | |||
129 | static struct map_desc mx35_io_desc[] __initdata = { | ||
130 | imx_map_entry(MX35, X_MEMC, MT_DEVICE), | ||
131 | imx_map_entry(MX35, AVIC, MT_DEVICE_NONSHARED), | ||
132 | imx_map_entry(MX35, AIPS1, MT_DEVICE_NONSHARED), | ||
133 | imx_map_entry(MX35, AIPS2, MT_DEVICE_NONSHARED), | ||
134 | imx_map_entry(MX35, SPBA0, MT_DEVICE_NONSHARED), | ||
135 | }; | ||
136 | |||
137 | void __init mx35_map_io(void) | ||
138 | { | ||
139 | iotable_init(mx35_io_desc, ARRAY_SIZE(mx35_io_desc)); | ||
140 | } | ||
141 | |||
142 | void __init imx31_init_early(void) | ||
143 | { | ||
144 | mxc_set_cpu_type(MXC_CPU_MX31); | ||
145 | mxc_arch_reset_init(MX31_IO_ADDRESS(MX31_WDOG_BASE_ADDR)); | ||
146 | imx_idle = imx3_idle; | ||
147 | imx_ioremap = imx3_ioremap; | ||
148 | } | ||
149 | |||
150 | void __init imx35_init_early(void) | ||
151 | { | ||
152 | mxc_set_cpu_type(MXC_CPU_MX35); | ||
153 | mxc_iomux_v3_init(MX35_IO_ADDRESS(MX35_IOMUXC_BASE_ADDR)); | ||
154 | mxc_arch_reset_init(MX35_IO_ADDRESS(MX35_WDOG_BASE_ADDR)); | ||
155 | imx_idle = imx3_idle; | ||
156 | imx_ioremap = imx3_ioremap; | ||
157 | } | ||
158 | |||
159 | void __init mx31_init_irq(void) | ||
160 | { | ||
161 | mxc_init_irq(MX31_IO_ADDRESS(MX31_AVIC_BASE_ADDR)); | ||
162 | } | ||
163 | |||
164 | void __init mx35_init_irq(void) | ||
165 | { | ||
166 | mxc_init_irq(MX35_IO_ADDRESS(MX35_AVIC_BASE_ADDR)); | ||
167 | } | ||
168 | |||
169 | static struct sdma_script_start_addrs imx31_to1_sdma_script __initdata = { | ||
170 | .per_2_per_addr = 1677, | ||
171 | }; | ||
172 | |||
173 | static struct sdma_script_start_addrs imx31_to2_sdma_script __initdata = { | ||
174 | .ap_2_ap_addr = 423, | ||
175 | .ap_2_bp_addr = 829, | ||
176 | .bp_2_ap_addr = 1029, | ||
177 | }; | ||
178 | |||
179 | static struct sdma_platform_data imx31_sdma_pdata __initdata = { | ||
180 | .fw_name = "sdma-imx31-to2.bin", | ||
181 | .script_addrs = &imx31_to2_sdma_script, | ||
182 | }; | ||
183 | |||
184 | void __init imx31_soc_init(void) | ||
185 | { | ||
186 | int to_version = mx31_revision() >> 4; | ||
187 | |||
188 | imx3_init_l2x0(); | ||
189 | |||
190 | mxc_register_gpio("imx31-gpio", 0, MX31_GPIO1_BASE_ADDR, SZ_16K, MX31_INT_GPIO1, 0); | ||
191 | mxc_register_gpio("imx31-gpio", 1, MX31_GPIO2_BASE_ADDR, SZ_16K, MX31_INT_GPIO2, 0); | ||
192 | mxc_register_gpio("imx31-gpio", 2, MX31_GPIO3_BASE_ADDR, SZ_16K, MX31_INT_GPIO3, 0); | ||
193 | |||
194 | if (to_version == 1) { | ||
195 | strncpy(imx31_sdma_pdata.fw_name, "sdma-imx31-to1.bin", | ||
196 | strlen(imx31_sdma_pdata.fw_name)); | ||
197 | imx31_sdma_pdata.script_addrs = &imx31_to1_sdma_script; | ||
198 | } | ||
199 | |||
200 | imx_add_imx_sdma("imx31-sdma", MX31_SDMA_BASE_ADDR, MX31_INT_SDMA, &imx31_sdma_pdata); | ||
201 | } | ||
202 | |||
203 | static struct sdma_script_start_addrs imx35_to1_sdma_script __initdata = { | ||
204 | .ap_2_ap_addr = 642, | ||
205 | .uart_2_mcu_addr = 817, | ||
206 | .mcu_2_app_addr = 747, | ||
207 | .uartsh_2_mcu_addr = 1183, | ||
208 | .per_2_shp_addr = 1033, | ||
209 | .mcu_2_shp_addr = 961, | ||
210 | .ata_2_mcu_addr = 1333, | ||
211 | .mcu_2_ata_addr = 1252, | ||
212 | .app_2_mcu_addr = 683, | ||
213 | .shp_2_per_addr = 1111, | ||
214 | .shp_2_mcu_addr = 892, | ||
215 | }; | ||
216 | |||
217 | static struct sdma_script_start_addrs imx35_to2_sdma_script __initdata = { | ||
218 | .ap_2_ap_addr = 729, | ||
219 | .uart_2_mcu_addr = 904, | ||
220 | .per_2_app_addr = 1597, | ||
221 | .mcu_2_app_addr = 834, | ||
222 | .uartsh_2_mcu_addr = 1270, | ||
223 | .per_2_shp_addr = 1120, | ||
224 | .mcu_2_shp_addr = 1048, | ||
225 | .ata_2_mcu_addr = 1429, | ||
226 | .mcu_2_ata_addr = 1339, | ||
227 | .app_2_per_addr = 1531, | ||
228 | .app_2_mcu_addr = 770, | ||
229 | .shp_2_per_addr = 1198, | ||
230 | .shp_2_mcu_addr = 979, | ||
231 | }; | ||
232 | |||
233 | static struct sdma_platform_data imx35_sdma_pdata __initdata = { | ||
234 | .fw_name = "sdma-imx35-to2.bin", | ||
235 | .script_addrs = &imx35_to2_sdma_script, | ||
236 | }; | ||
237 | |||
238 | void __init imx35_soc_init(void) | ||
239 | { | ||
240 | int to_version = mx35_revision() >> 4; | ||
241 | |||
242 | imx3_init_l2x0(); | ||
243 | |||
244 | /* i.mx35 has the i.mx31 type gpio */ | ||
245 | mxc_register_gpio("imx31-gpio", 0, MX35_GPIO1_BASE_ADDR, SZ_16K, MX35_INT_GPIO1, 0); | ||
246 | mxc_register_gpio("imx31-gpio", 1, MX35_GPIO2_BASE_ADDR, SZ_16K, MX35_INT_GPIO2, 0); | ||
247 | mxc_register_gpio("imx31-gpio", 2, MX35_GPIO3_BASE_ADDR, SZ_16K, MX35_INT_GPIO3, 0); | ||
248 | |||
249 | if (to_version == 1) { | ||
250 | strncpy(imx35_sdma_pdata.fw_name, "sdma-imx35-to1.bin", | ||
251 | strlen(imx35_sdma_pdata.fw_name)); | ||
252 | imx35_sdma_pdata.script_addrs = &imx35_to1_sdma_script; | ||
253 | } | ||
254 | |||
255 | imx_add_imx_sdma("imx35-sdma", MX35_SDMA_BASE_ADDR, MX35_INT_SDMA, &imx35_sdma_pdata); | ||
256 | } | ||
diff --git a/arch/arm/mach-imx/mm-imx31.c b/arch/arm/mach-imx/mm-imx31.c deleted file mode 100644 index b7c55e7db000..000000000000 --- a/arch/arm/mach-imx/mm-imx31.c +++ /dev/null | |||
@@ -1,91 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 1999,2000 Arm Limited | ||
3 | * Copyright (C) 2000 Deep Blue Solutions Ltd | ||
4 | * Copyright (C) 2002 Shane Nay (shane@minirl.com) | ||
5 | * Copyright 2005-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
6 | * - add MX31 specific definitions | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | */ | ||
18 | |||
19 | #include <linux/mm.h> | ||
20 | #include <linux/init.h> | ||
21 | #include <linux/err.h> | ||
22 | |||
23 | #include <asm/pgtable.h> | ||
24 | #include <asm/mach/map.h> | ||
25 | |||
26 | #include <mach/common.h> | ||
27 | #include <mach/devices-common.h> | ||
28 | #include <mach/hardware.h> | ||
29 | #include <mach/iomux-v3.h> | ||
30 | #include <mach/irqs.h> | ||
31 | |||
32 | static struct map_desc mx31_io_desc[] __initdata = { | ||
33 | imx_map_entry(MX31, X_MEMC, MT_DEVICE), | ||
34 | imx_map_entry(MX31, AVIC, MT_DEVICE_NONSHARED), | ||
35 | imx_map_entry(MX31, AIPS1, MT_DEVICE_NONSHARED), | ||
36 | imx_map_entry(MX31, AIPS2, MT_DEVICE_NONSHARED), | ||
37 | imx_map_entry(MX31, SPBA0, MT_DEVICE_NONSHARED), | ||
38 | }; | ||
39 | |||
40 | /* | ||
41 | * This function initializes the memory map. It is called during the | ||
42 | * system startup to create static physical to virtual memory mappings | ||
43 | * for the IO modules. | ||
44 | */ | ||
45 | void __init mx31_map_io(void) | ||
46 | { | ||
47 | iotable_init(mx31_io_desc, ARRAY_SIZE(mx31_io_desc)); | ||
48 | } | ||
49 | |||
50 | void __init imx31_init_early(void) | ||
51 | { | ||
52 | mxc_set_cpu_type(MXC_CPU_MX31); | ||
53 | mxc_arch_reset_init(MX31_IO_ADDRESS(MX31_WDOG_BASE_ADDR)); | ||
54 | } | ||
55 | |||
56 | void __init mx31_init_irq(void) | ||
57 | { | ||
58 | mxc_init_irq(MX31_IO_ADDRESS(MX31_AVIC_BASE_ADDR)); | ||
59 | } | ||
60 | |||
61 | static struct sdma_script_start_addrs imx31_to1_sdma_script __initdata = { | ||
62 | .per_2_per_addr = 1677, | ||
63 | }; | ||
64 | |||
65 | static struct sdma_script_start_addrs imx31_to2_sdma_script __initdata = { | ||
66 | .ap_2_ap_addr = 423, | ||
67 | .ap_2_bp_addr = 829, | ||
68 | .bp_2_ap_addr = 1029, | ||
69 | }; | ||
70 | |||
71 | static struct sdma_platform_data imx31_sdma_pdata __initdata = { | ||
72 | .fw_name = "sdma-imx31-to2.bin", | ||
73 | .script_addrs = &imx31_to2_sdma_script, | ||
74 | }; | ||
75 | |||
76 | void __init imx31_soc_init(void) | ||
77 | { | ||
78 | int to_version = mx31_revision() >> 4; | ||
79 | |||
80 | mxc_register_gpio("imx31-gpio", 0, MX31_GPIO1_BASE_ADDR, SZ_16K, MX31_INT_GPIO1, 0); | ||
81 | mxc_register_gpio("imx31-gpio", 1, MX31_GPIO2_BASE_ADDR, SZ_16K, MX31_INT_GPIO2, 0); | ||
82 | mxc_register_gpio("imx31-gpio", 2, MX31_GPIO3_BASE_ADDR, SZ_16K, MX31_INT_GPIO3, 0); | ||
83 | |||
84 | if (to_version == 1) { | ||
85 | strncpy(imx31_sdma_pdata.fw_name, "sdma-imx31-to1.bin", | ||
86 | strlen(imx31_sdma_pdata.fw_name)); | ||
87 | imx31_sdma_pdata.script_addrs = &imx31_to1_sdma_script; | ||
88 | } | ||
89 | |||
90 | imx_add_imx_sdma("imx31-sdma", MX31_SDMA_BASE_ADDR, MX31_INT_SDMA, &imx31_sdma_pdata); | ||
91 | } | ||
diff --git a/arch/arm/mach-imx/mm-imx35.c b/arch/arm/mach-imx/mm-imx35.c deleted file mode 100644 index f49bac7a1ede..000000000000 --- a/arch/arm/mach-imx/mm-imx35.c +++ /dev/null | |||
@@ -1,109 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 1999,2000 Arm Limited | ||
3 | * Copyright (C) 2000 Deep Blue Solutions Ltd | ||
4 | * Copyright (C) 2002 Shane Nay (shane@minirl.com) | ||
5 | * Copyright 2005-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
6 | * - add MX31 specific definitions | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | */ | ||
18 | |||
19 | #include <linux/mm.h> | ||
20 | #include <linux/init.h> | ||
21 | #include <linux/err.h> | ||
22 | |||
23 | #include <asm/pgtable.h> | ||
24 | #include <asm/mach/map.h> | ||
25 | #include <asm/hardware/cache-l2x0.h> | ||
26 | |||
27 | #include <mach/common.h> | ||
28 | #include <mach/devices-common.h> | ||
29 | #include <mach/hardware.h> | ||
30 | #include <mach/iomux-v3.h> | ||
31 | #include <mach/irqs.h> | ||
32 | |||
33 | static struct map_desc mx35_io_desc[] __initdata = { | ||
34 | imx_map_entry(MX35, X_MEMC, MT_DEVICE), | ||
35 | imx_map_entry(MX35, AVIC, MT_DEVICE_NONSHARED), | ||
36 | imx_map_entry(MX35, AIPS1, MT_DEVICE_NONSHARED), | ||
37 | imx_map_entry(MX35, AIPS2, MT_DEVICE_NONSHARED), | ||
38 | imx_map_entry(MX35, SPBA0, MT_DEVICE_NONSHARED), | ||
39 | }; | ||
40 | |||
41 | void __init mx35_map_io(void) | ||
42 | { | ||
43 | iotable_init(mx35_io_desc, ARRAY_SIZE(mx35_io_desc)); | ||
44 | } | ||
45 | |||
46 | void __init imx35_init_early(void) | ||
47 | { | ||
48 | mxc_set_cpu_type(MXC_CPU_MX35); | ||
49 | mxc_iomux_v3_init(MX35_IO_ADDRESS(MX35_IOMUXC_BASE_ADDR)); | ||
50 | mxc_arch_reset_init(MX35_IO_ADDRESS(MX35_WDOG_BASE_ADDR)); | ||
51 | } | ||
52 | |||
53 | void __init mx35_init_irq(void) | ||
54 | { | ||
55 | mxc_init_irq(MX35_IO_ADDRESS(MX35_AVIC_BASE_ADDR)); | ||
56 | } | ||
57 | |||
58 | static struct sdma_script_start_addrs imx35_to1_sdma_script __initdata = { | ||
59 | .ap_2_ap_addr = 642, | ||
60 | .uart_2_mcu_addr = 817, | ||
61 | .mcu_2_app_addr = 747, | ||
62 | .uartsh_2_mcu_addr = 1183, | ||
63 | .per_2_shp_addr = 1033, | ||
64 | .mcu_2_shp_addr = 961, | ||
65 | .ata_2_mcu_addr = 1333, | ||
66 | .mcu_2_ata_addr = 1252, | ||
67 | .app_2_mcu_addr = 683, | ||
68 | .shp_2_per_addr = 1111, | ||
69 | .shp_2_mcu_addr = 892, | ||
70 | }; | ||
71 | |||
72 | static struct sdma_script_start_addrs imx35_to2_sdma_script __initdata = { | ||
73 | .ap_2_ap_addr = 729, | ||
74 | .uart_2_mcu_addr = 904, | ||
75 | .per_2_app_addr = 1597, | ||
76 | .mcu_2_app_addr = 834, | ||
77 | .uartsh_2_mcu_addr = 1270, | ||
78 | .per_2_shp_addr = 1120, | ||
79 | .mcu_2_shp_addr = 1048, | ||
80 | .ata_2_mcu_addr = 1429, | ||
81 | .mcu_2_ata_addr = 1339, | ||
82 | .app_2_per_addr = 1531, | ||
83 | .app_2_mcu_addr = 770, | ||
84 | .shp_2_per_addr = 1198, | ||
85 | .shp_2_mcu_addr = 979, | ||
86 | }; | ||
87 | |||
88 | static struct sdma_platform_data imx35_sdma_pdata __initdata = { | ||
89 | .fw_name = "sdma-imx35-to2.bin", | ||
90 | .script_addrs = &imx35_to2_sdma_script, | ||
91 | }; | ||
92 | |||
93 | void __init imx35_soc_init(void) | ||
94 | { | ||
95 | int to_version = mx35_revision() >> 4; | ||
96 | |||
97 | /* i.mx35 has the i.mx31 type gpio */ | ||
98 | mxc_register_gpio("imx31-gpio", 0, MX35_GPIO1_BASE_ADDR, SZ_16K, MX35_INT_GPIO1, 0); | ||
99 | mxc_register_gpio("imx31-gpio", 1, MX35_GPIO2_BASE_ADDR, SZ_16K, MX35_INT_GPIO2, 0); | ||
100 | mxc_register_gpio("imx31-gpio", 2, MX35_GPIO3_BASE_ADDR, SZ_16K, MX35_INT_GPIO3, 0); | ||
101 | |||
102 | if (to_version == 1) { | ||
103 | strncpy(imx35_sdma_pdata.fw_name, "sdma-imx35-to1.bin", | ||
104 | strlen(imx35_sdma_pdata.fw_name)); | ||
105 | imx35_sdma_pdata.script_addrs = &imx35_to1_sdma_script; | ||
106 | } | ||
107 | |||
108 | imx_add_imx_sdma("imx35-sdma", MX35_SDMA_BASE_ADDR, MX35_INT_SDMA, &imx35_sdma_pdata); | ||
109 | } | ||
diff --git a/arch/arm/mach-imx/pm-imx27.c b/arch/arm/mach-imx/pm-imx27.c index acf17691d2cc..e455d2f855bf 100644 --- a/arch/arm/mach-imx/pm-imx27.c +++ b/arch/arm/mach-imx/pm-imx27.c | |||
@@ -11,7 +11,7 @@ | |||
11 | #include <linux/suspend.h> | 11 | #include <linux/suspend.h> |
12 | #include <linux/io.h> | 12 | #include <linux/io.h> |
13 | #include <mach/system.h> | 13 | #include <mach/system.h> |
14 | #include <mach/mx27.h> | 14 | #include <mach/hardware.h> |
15 | 15 | ||
16 | static int mx27_suspend_enter(suspend_state_t state) | 16 | static int mx27_suspend_enter(suspend_state_t state) |
17 | { | 17 | { |