diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-01 23:31:25 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-01 23:31:25 -0400 |
commit | 16ee792e45cf0c97ce061fce03c36cab5551ec72 (patch) | |
tree | dc68af705fbac4b5d71325aa972730199bb187dd /arch/arm/mach-imx | |
parent | f906fb1d70e016726fccfb0d978c5d425503db9d (diff) | |
parent | efa62e1355f0495f37f1296754b8880947c8da72 (diff) |
Merge branch 'next/devel' of git://git.linaro.org/people/arnd/arm-soc
* 'next/devel' of git://git.linaro.org/people/arnd/arm-soc: (50 commits)
ARM: tegra: update defconfig
arm/tegra: Harmony: Configure PMC for low-level interrupts
arm/tegra: device tree support for ventana board
arm/tegra: add support for ventana pinmuxing
arm/tegra: prepare Seaboard pinmux code for derived boards
arm/tegra: pinmux: ioremap registers
gpio/tegra: Convert to a platform device
arm/tegra: Convert pinmux driver to a platform device
arm/dt: Tegra: Add pinmux node to tegra20.dtsi
arm/tegra: Prep boards for gpio/pinmux conversion to pdevs
ARM: mx5: fix clock usage for suspend
ARM i.MX entry-macro.S: remove now unused code
ARM i.MX boards: use CONFIG_MULTI_IRQ_HANDLER
ARM i.MX tzic: add handle_irq function
ARM i.MX avic: add handle_irq function
ARM: mx25: Add the missing IIM base definition
ARM i.MX avic: convert to use generic irq chip
mx31moboard: Add poweroff support
ARM: mach-qong: Add watchdog support
ARM: davinci: AM18x: Add wl1271/wlan support
...
Fix up conflicts in:
arch/arm/mach-at91/at91sam9g45.c
arch/arm/mach-mx5/devices-imx53.h
arch/arm/plat-mxc/include/mach/memory.h
Diffstat (limited to 'arch/arm/mach-imx')
39 files changed, 185 insertions, 90 deletions
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index e9c2968005dc..e605900ffe1d 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig | |||
@@ -5,6 +5,18 @@ config IMX_HAVE_DMA_V1 | |||
5 | # Some usages assume that having one of them implies not having (e.g.) ARCH_MX2. | 5 | # Some usages assume that having one of them implies not having (e.g.) ARCH_MX2. |
6 | # To easily distinguish good and reviewed from unreviewed usages new (and IMHO | 6 | # To easily distinguish good and reviewed from unreviewed usages new (and IMHO |
7 | # more sensible) names are used: SOC_IMX31 and SOC_IMX35 | 7 | # more sensible) names are used: SOC_IMX31 and SOC_IMX35 |
8 | config ARCH_MX1 | ||
9 | bool | ||
10 | |||
11 | config MACH_MX21 | ||
12 | bool | ||
13 | |||
14 | config ARCH_MX25 | ||
15 | bool | ||
16 | |||
17 | config MACH_MX27 | ||
18 | bool | ||
19 | |||
8 | config ARCH_MX31 | 20 | config ARCH_MX31 |
9 | bool | 21 | bool |
10 | 22 | ||
@@ -13,6 +25,7 @@ config ARCH_MX35 | |||
13 | 25 | ||
14 | config SOC_IMX1 | 26 | config SOC_IMX1 |
15 | bool | 27 | bool |
28 | select ARCH_MX1 | ||
16 | select CPU_ARM920T | 29 | select CPU_ARM920T |
17 | select IMX_HAVE_DMA_V1 | 30 | select IMX_HAVE_DMA_V1 |
18 | select IMX_HAVE_IOMUX_V1 | 31 | select IMX_HAVE_IOMUX_V1 |
@@ -20,6 +33,7 @@ config SOC_IMX1 | |||
20 | 33 | ||
21 | config SOC_IMX21 | 34 | config SOC_IMX21 |
22 | bool | 35 | bool |
36 | select MACH_MX21 | ||
23 | select CPU_ARM926T | 37 | select CPU_ARM926T |
24 | select ARCH_MXC_AUDMUX_V1 | 38 | select ARCH_MXC_AUDMUX_V1 |
25 | select IMX_HAVE_DMA_V1 | 39 | select IMX_HAVE_DMA_V1 |
@@ -28,6 +42,7 @@ config SOC_IMX21 | |||
28 | 42 | ||
29 | config SOC_IMX25 | 43 | config SOC_IMX25 |
30 | bool | 44 | bool |
45 | select ARCH_MX25 | ||
31 | select CPU_ARM926T | 46 | select CPU_ARM926T |
32 | select ARCH_MXC_AUDMUX_V2 | 47 | select ARCH_MXC_AUDMUX_V2 |
33 | select ARCH_MXC_IOMUX_V3 | 48 | select ARCH_MXC_IOMUX_V3 |
@@ -35,6 +50,7 @@ config SOC_IMX25 | |||
35 | 50 | ||
36 | config SOC_IMX27 | 51 | config SOC_IMX27 |
37 | bool | 52 | bool |
53 | select MACH_MX27 | ||
38 | select CPU_ARM926T | 54 | select CPU_ARM926T |
39 | select ARCH_MXC_AUDMUX_V1 | 55 | select ARCH_MXC_AUDMUX_V1 |
40 | select IMX_HAVE_DMA_V1 | 56 | select IMX_HAVE_DMA_V1 |
@@ -59,7 +75,7 @@ config SOC_IMX35 | |||
59 | select MXC_AVIC | 75 | select MXC_AVIC |
60 | 76 | ||
61 | 77 | ||
62 | if ARCH_MX1 | 78 | if ARCH_IMX_V4_V5 |
63 | 79 | ||
64 | comment "MX1 platforms:" | 80 | comment "MX1 platforms:" |
65 | config MACH_MXLADS | 81 | config MACH_MXLADS |
@@ -87,30 +103,6 @@ config MACH_APF9328 | |||
87 | help | 103 | help |
88 | Say Yes here if you are using the Armadeus APF9328 development board | 104 | Say Yes here if you are using the Armadeus APF9328 development board |
89 | 105 | ||
90 | endif | ||
91 | |||
92 | if ARCH_MX2 | ||
93 | |||
94 | choice | ||
95 | prompt "CPUs:" | ||
96 | default MACH_MX21 | ||
97 | |||
98 | config MACH_MX21 | ||
99 | bool "i.MX21 support" | ||
100 | help | ||
101 | This enables support for Freescale's MX2 based i.MX21 processor. | ||
102 | |||
103 | config MACH_MX27 | ||
104 | bool "i.MX27 support" | ||
105 | help | ||
106 | This enables support for Freescale's MX2 based i.MX27 processor. | ||
107 | |||
108 | endchoice | ||
109 | |||
110 | endif | ||
111 | |||
112 | if MACH_MX21 | ||
113 | |||
114 | comment "MX21 platforms:" | 106 | comment "MX21 platforms:" |
115 | 107 | ||
116 | config MACH_MX21ADS | 108 | config MACH_MX21ADS |
@@ -124,15 +116,12 @@ config MACH_MX21ADS | |||
124 | Include support for MX21ADS platform. This includes specific | 116 | Include support for MX21ADS platform. This includes specific |
125 | configurations for the board and its peripherals. | 117 | configurations for the board and its peripherals. |
126 | 118 | ||
127 | endif | ||
128 | |||
129 | if ARCH_MX25 | ||
130 | |||
131 | comment "MX25 platforms:" | 119 | comment "MX25 platforms:" |
132 | 120 | ||
133 | config MACH_MX25_3DS | 121 | config MACH_MX25_3DS |
134 | bool "Support MX25PDK (3DS) Platform" | 122 | bool "Support MX25PDK (3DS) Platform" |
135 | select SOC_IMX25 | 123 | select SOC_IMX25 |
124 | select IMX_HAVE_PLATFORM_FLEXCAN | ||
136 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC | 125 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC |
137 | select IMX_HAVE_PLATFORM_IMX2_WDT | 126 | select IMX_HAVE_PLATFORM_IMX2_WDT |
138 | select IMX_HAVE_PLATFORM_IMXDI_RTC | 127 | select IMX_HAVE_PLATFORM_IMXDI_RTC |
@@ -174,10 +163,6 @@ config MACH_EUKREA_MBIMXSD25_BASEBOARD | |||
174 | 163 | ||
175 | endchoice | 164 | endchoice |
176 | 165 | ||
177 | endif | ||
178 | |||
179 | if MACH_MX27 | ||
180 | |||
181 | comment "MX27 platforms:" | 166 | comment "MX27 platforms:" |
182 | 167 | ||
183 | config MACH_MX27ADS | 168 | config MACH_MX27ADS |
@@ -486,6 +471,7 @@ config MACH_QONG | |||
486 | bool "Support Dave/DENX QongEVB-LITE platform" | 471 | bool "Support Dave/DENX QongEVB-LITE platform" |
487 | select SOC_IMX31 | 472 | select SOC_IMX31 |
488 | select IMX_HAVE_PLATFORM_IMX_UART | 473 | select IMX_HAVE_PLATFORM_IMX_UART |
474 | select IMX_HAVE_PLATFORM_IMX2_WDT | ||
489 | help | 475 | help |
490 | Include support for Dave/DENX QongEVB-LITE platform. This includes | 476 | Include support for Dave/DENX QongEVB-LITE platform. This includes |
491 | specific configurations for the board and its peripherals. | 477 | specific configurations for the board and its peripherals. |
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile index 6cc821384ccd..116d4b2d2817 100644 --- a/arch/arm/mach-imx/Makefile +++ b/arch/arm/mach-imx/Makefile | |||
@@ -3,7 +3,7 @@ obj-$(CONFIG_IMX_HAVE_DMA_V1) += dma-v1.o | |||
3 | obj-$(CONFIG_SOC_IMX1) += clock-imx1.o mm-imx1.o | 3 | obj-$(CONFIG_SOC_IMX1) += clock-imx1.o mm-imx1.o |
4 | obj-$(CONFIG_SOC_IMX21) += clock-imx21.o mm-imx21.o | 4 | obj-$(CONFIG_SOC_IMX21) += clock-imx21.o mm-imx21.o |
5 | 5 | ||
6 | obj-$(CONFIG_SOC_IMX25) += clock-imx25.o mm-imx25.o ehci-imx25.o | 6 | obj-$(CONFIG_SOC_IMX25) += clock-imx25.o mm-imx25.o ehci-imx25.o cpu-imx25.o |
7 | 7 | ||
8 | obj-$(CONFIG_SOC_IMX27) += cpu-imx27.o pm-imx27.o | 8 | obj-$(CONFIG_SOC_IMX27) += cpu-imx27.o pm-imx27.o |
9 | obj-$(CONFIG_SOC_IMX27) += clock-imx27.o mm-imx27.o ehci-imx27.o | 9 | obj-$(CONFIG_SOC_IMX27) += clock-imx27.o mm-imx27.o ehci-imx27.o |
diff --git a/arch/arm/mach-imx/clock-imx25.c b/arch/arm/mach-imx/clock-imx25.c index e63e23504fe5..b0fec74c8c91 100644 --- a/arch/arm/mach-imx/clock-imx25.c +++ b/arch/arm/mach-imx/clock-imx25.c | |||
@@ -263,6 +263,7 @@ DEFINE_CLOCK(audmux_clk, 0, CCM_CGCR1, 0, NULL, NULL, NULL); | |||
263 | DEFINE_CLOCK(csi_clk, 0, CCM_CGCR1, 4, get_rate_csi, NULL, &csi_per_clk); | 263 | DEFINE_CLOCK(csi_clk, 0, CCM_CGCR1, 4, get_rate_csi, NULL, &csi_per_clk); |
264 | DEFINE_CLOCK(can1_clk, 0, CCM_CGCR1, 2, get_rate_ipg, NULL, NULL); | 264 | DEFINE_CLOCK(can1_clk, 0, CCM_CGCR1, 2, get_rate_ipg, NULL, NULL); |
265 | DEFINE_CLOCK(can2_clk, 1, CCM_CGCR1, 3, get_rate_ipg, NULL, NULL); | 265 | DEFINE_CLOCK(can2_clk, 1, CCM_CGCR1, 3, get_rate_ipg, NULL, NULL); |
266 | DEFINE_CLOCK(iim_clk, 0, CCM_CGCR1, 26, NULL, NULL, NULL); | ||
266 | 267 | ||
267 | #define _REGISTER_CLOCK(d, n, c) \ | 268 | #define _REGISTER_CLOCK(d, n, c) \ |
268 | { \ | 269 | { \ |
@@ -310,6 +311,7 @@ static struct clk_lookup lookups[] = { | |||
310 | _REGISTER_CLOCK("flexcan.1", NULL, can2_clk) | 311 | _REGISTER_CLOCK("flexcan.1", NULL, can2_clk) |
311 | /* i.mx25 has the i.mx35 type sdma */ | 312 | /* i.mx25 has the i.mx35 type sdma */ |
312 | _REGISTER_CLOCK("imx35-sdma", NULL, sdma_clk) | 313 | _REGISTER_CLOCK("imx35-sdma", NULL, sdma_clk) |
314 | _REGISTER_CLOCK(NULL, "iim", iim_clk) | ||
313 | }; | 315 | }; |
314 | 316 | ||
315 | int __init mx25_clocks_init(void) | 317 | int __init mx25_clocks_init(void) |
@@ -334,6 +336,10 @@ int __init mx25_clocks_init(void) | |||
334 | /* Clock source for gpt is ahb_div */ | 336 | /* Clock source for gpt is ahb_div */ |
335 | __raw_writel(__raw_readl(CRM_BASE+0x64) & ~(1 << 5), CRM_BASE + 0x64); | 337 | __raw_writel(__raw_readl(CRM_BASE+0x64) & ~(1 << 5), CRM_BASE + 0x64); |
336 | 338 | ||
339 | clk_enable(&iim_clk); | ||
340 | imx_print_silicon_rev("i.MX25", mx25_revision()); | ||
341 | clk_disable(&iim_clk); | ||
342 | |||
337 | mxc_timer_init(&gpt_clk, MX25_IO_ADDRESS(MX25_GPT1_BASE_ADDR), 54); | 343 | mxc_timer_init(&gpt_clk, MX25_IO_ADDRESS(MX25_GPT1_BASE_ADDR), 54); |
338 | 344 | ||
339 | return 0; | 345 | return 0; |
diff --git a/arch/arm/mach-imx/clock-imx27.c b/arch/arm/mach-imx/clock-imx27.c index becc92e0b95d..88fe00a146e3 100644 --- a/arch/arm/mach-imx/clock-imx27.c +++ b/arch/arm/mach-imx/clock-imx27.c | |||
@@ -751,6 +751,8 @@ int __init mx27_clocks_init(unsigned long fref) | |||
751 | clk_enable(&gpio_clk); | 751 | clk_enable(&gpio_clk); |
752 | clk_enable(&emi_clk); | 752 | clk_enable(&emi_clk); |
753 | clk_enable(&iim_clk); | 753 | clk_enable(&iim_clk); |
754 | imx_print_silicon_rev("i.MX27", mx27_revision()); | ||
755 | clk_disable(&iim_clk); | ||
754 | 756 | ||
755 | #if defined(CONFIG_DEBUG_LL) && !defined(CONFIG_DEBUG_ICEDCC) | 757 | #if defined(CONFIG_DEBUG_LL) && !defined(CONFIG_DEBUG_ICEDCC) |
756 | clk_enable(&uart1_clk); | 758 | clk_enable(&uart1_clk); |
diff --git a/arch/arm/mach-imx/clock-imx31.c b/arch/arm/mach-imx/clock-imx31.c index 58ea0a857ef4..988a28178d4c 100644 --- a/arch/arm/mach-imx/clock-imx31.c +++ b/arch/arm/mach-imx/clock-imx31.c | |||
@@ -611,11 +611,11 @@ int __init mx31_clocks_init(unsigned long fref) | |||
611 | clk_enable(&gpt_clk); | 611 | clk_enable(&gpt_clk); |
612 | clk_enable(&emi_clk); | 612 | clk_enable(&emi_clk); |
613 | clk_enable(&iim_clk); | 613 | clk_enable(&iim_clk); |
614 | mx31_revision(); | ||
615 | clk_disable(&iim_clk); | ||
614 | 616 | ||
615 | clk_enable(&serial_pll_clk); | 617 | clk_enable(&serial_pll_clk); |
616 | 618 | ||
617 | mx31_read_cpu_rev(); | ||
618 | |||
619 | if (mx31_revision() >= IMX_CHIP_REVISION_2_0) { | 619 | if (mx31_revision() >= IMX_CHIP_REVISION_2_0) { |
620 | reg = __raw_readl(MXC_CCM_PMCR1); | 620 | reg = __raw_readl(MXC_CCM_PMCR1); |
621 | /* No PLL restart on DVFS switch; enable auto EMI handshake */ | 621 | /* No PLL restart on DVFS switch; enable auto EMI handshake */ |
diff --git a/arch/arm/mach-imx/clock-imx35.c b/arch/arm/mach-imx/clock-imx35.c index c39f5c3e20b4..8116f119517d 100644 --- a/arch/arm/mach-imx/clock-imx35.c +++ b/arch/arm/mach-imx/clock-imx35.c | |||
@@ -537,7 +537,8 @@ int __init mx35_clocks_init() | |||
537 | __raw_writel(cgr3, CCM_BASE + CCM_CGR3); | 537 | __raw_writel(cgr3, CCM_BASE + CCM_CGR3); |
538 | 538 | ||
539 | clk_enable(&iim_clk); | 539 | clk_enable(&iim_clk); |
540 | mx35_read_cpu_rev(); | 540 | imx_print_silicon_rev("i.MX35", mx35_revision()); |
541 | clk_disable(&iim_clk); | ||
541 | 542 | ||
542 | #ifdef CONFIG_MXC_USE_EPIT | 543 | #ifdef CONFIG_MXC_USE_EPIT |
543 | epit_timer_init(&epit1_clk, | 544 | epit_timer_init(&epit1_clk, |
diff --git a/arch/arm/mach-imx/cpu-imx25.c b/arch/arm/mach-imx/cpu-imx25.c new file mode 100644 index 000000000000..6914bcbf84e4 --- /dev/null +++ b/arch/arm/mach-imx/cpu-imx25.c | |||
@@ -0,0 +1,41 @@ | |||
1 | /* | ||
2 | * MX25 CPU type detection | ||
3 | * | ||
4 | * Copyright (c) 2009 Daniel Mack <daniel@caiaq.de> | ||
5 | * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | */ | ||
12 | #include <linux/module.h> | ||
13 | #include <linux/io.h> | ||
14 | #include <mach/hardware.h> | ||
15 | #include <mach/iim.h> | ||
16 | |||
17 | static int mx25_cpu_rev = -1; | ||
18 | |||
19 | static int mx25_read_cpu_rev(void) | ||
20 | { | ||
21 | u32 rev; | ||
22 | |||
23 | rev = __raw_readl(MX25_IO_ADDRESS(MX25_IIM_BASE_ADDR + MXC_IIMSREV)); | ||
24 | switch (rev) { | ||
25 | case 0x00: | ||
26 | return IMX_CHIP_REVISION_1_0; | ||
27 | case 0x01: | ||
28 | return IMX_CHIP_REVISION_1_1; | ||
29 | default: | ||
30 | return IMX_CHIP_REVISION_UNKNOWN; | ||
31 | } | ||
32 | } | ||
33 | |||
34 | int mx25_revision(void) | ||
35 | { | ||
36 | if (mx25_cpu_rev == -1) | ||
37 | mx25_cpu_rev = mx25_read_cpu_rev(); | ||
38 | |||
39 | return mx25_cpu_rev; | ||
40 | } | ||
41 | EXPORT_SYMBOL(mx25_revision); | ||
diff --git a/arch/arm/mach-imx/cpu-imx27.c b/arch/arm/mach-imx/cpu-imx27.c index 3b117be37bd2..ff38e1505f67 100644 --- a/arch/arm/mach-imx/cpu-imx27.c +++ b/arch/arm/mach-imx/cpu-imx27.c | |||
@@ -26,12 +26,12 @@ | |||
26 | 26 | ||
27 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
28 | 28 | ||
29 | static int cpu_silicon_rev = -1; | 29 | static int mx27_cpu_rev = -1; |
30 | static int cpu_partnumber; | 30 | static int mx27_cpu_partnumber; |
31 | 31 | ||
32 | #define SYS_CHIP_ID 0x00 /* The offset of CHIP ID register */ | 32 | #define SYS_CHIP_ID 0x00 /* The offset of CHIP ID register */ |
33 | 33 | ||
34 | static void query_silicon_parameter(void) | 34 | static int mx27_read_cpu_rev(void) |
35 | { | 35 | { |
36 | u32 val; | 36 | u32 val; |
37 | /* | 37 | /* |
@@ -42,20 +42,18 @@ static void query_silicon_parameter(void) | |||
42 | val = __raw_readl(MX27_IO_ADDRESS(MX27_SYSCTRL_BASE_ADDR | 42 | val = __raw_readl(MX27_IO_ADDRESS(MX27_SYSCTRL_BASE_ADDR |
43 | + SYS_CHIP_ID)); | 43 | + SYS_CHIP_ID)); |
44 | 44 | ||
45 | mx27_cpu_partnumber = (int)((val >> 12) & 0xFFFF); | ||
46 | |||
45 | switch (val >> 28) { | 47 | switch (val >> 28) { |
46 | case 0: | 48 | case 0: |
47 | cpu_silicon_rev = IMX_CHIP_REVISION_1_0; | 49 | return IMX_CHIP_REVISION_1_0; |
48 | break; | ||
49 | case 1: | 50 | case 1: |
50 | cpu_silicon_rev = IMX_CHIP_REVISION_2_0; | 51 | return IMX_CHIP_REVISION_2_0; |
51 | break; | ||
52 | case 2: | 52 | case 2: |
53 | cpu_silicon_rev = IMX_CHIP_REVISION_2_1; | 53 | return IMX_CHIP_REVISION_2_1; |
54 | break; | ||
55 | default: | 54 | default: |
56 | cpu_silicon_rev = IMX_CHIP_REVISION_UNKNOWN; | 55 | return IMX_CHIP_REVISION_UNKNOWN; |
57 | } | 56 | } |
58 | cpu_partnumber = (int)((val >> 12) & 0xFFFF); | ||
59 | } | 57 | } |
60 | 58 | ||
61 | /* | 59 | /* |
@@ -65,12 +63,12 @@ static void query_silicon_parameter(void) | |||
65 | */ | 63 | */ |
66 | int mx27_revision(void) | 64 | int mx27_revision(void) |
67 | { | 65 | { |
68 | if (cpu_silicon_rev == -1) | 66 | if (mx27_cpu_rev == -1) |
69 | query_silicon_parameter(); | 67 | mx27_cpu_rev = mx27_read_cpu_rev(); |
70 | 68 | ||
71 | if (cpu_partnumber != 0x8821) | 69 | if (mx27_cpu_partnumber != 0x8821) |
72 | return -EINVAL; | 70 | return -EINVAL; |
73 | 71 | ||
74 | return cpu_silicon_rev; | 72 | return mx27_cpu_rev; |
75 | } | 73 | } |
76 | EXPORT_SYMBOL(mx27_revision); | 74 | EXPORT_SYMBOL(mx27_revision); |
diff --git a/arch/arm/mach-imx/cpu-imx31.c b/arch/arm/mach-imx/cpu-imx31.c index a3780700a882..3f2345f0cdaf 100644 --- a/arch/arm/mach-imx/cpu-imx31.c +++ b/arch/arm/mach-imx/cpu-imx31.c | |||
@@ -13,45 +13,50 @@ | |||
13 | #include <linux/io.h> | 13 | #include <linux/io.h> |
14 | #include <mach/hardware.h> | 14 | #include <mach/hardware.h> |
15 | #include <mach/iim.h> | 15 | #include <mach/iim.h> |
16 | #include <mach/common.h> | ||
16 | 17 | ||
17 | unsigned int mx31_cpu_rev; | 18 | static int mx31_cpu_rev = -1; |
18 | EXPORT_SYMBOL(mx31_cpu_rev); | ||
19 | 19 | ||
20 | static struct { | 20 | static struct { |
21 | u8 srev; | 21 | u8 srev; |
22 | const char *name; | 22 | const char *name; |
23 | const char *v; | ||
24 | unsigned int rev; | 23 | unsigned int rev; |
25 | } mx31_cpu_type[] __initdata = { | 24 | } mx31_cpu_type[] = { |
26 | { .srev = 0x00, .name = "i.MX31(L)", .v = "1.0", .rev = IMX_CHIP_REVISION_1_0 }, | 25 | { .srev = 0x00, .name = "i.MX31(L)", .rev = IMX_CHIP_REVISION_1_0 }, |
27 | { .srev = 0x10, .name = "i.MX31", .v = "1.1", .rev = IMX_CHIP_REVISION_1_1 }, | 26 | { .srev = 0x10, .name = "i.MX31", .rev = IMX_CHIP_REVISION_1_1 }, |
28 | { .srev = 0x11, .name = "i.MX31L", .v = "1.1", .rev = IMX_CHIP_REVISION_1_1 }, | 27 | { .srev = 0x11, .name = "i.MX31L", .rev = IMX_CHIP_REVISION_1_1 }, |
29 | { .srev = 0x12, .name = "i.MX31", .v = "1.15", .rev = IMX_CHIP_REVISION_1_1 }, | 28 | { .srev = 0x12, .name = "i.MX31", .rev = IMX_CHIP_REVISION_1_1 }, |
30 | { .srev = 0x13, .name = "i.MX31L", .v = "1.15", .rev = IMX_CHIP_REVISION_1_1 }, | 29 | { .srev = 0x13, .name = "i.MX31L", .rev = IMX_CHIP_REVISION_1_1 }, |
31 | { .srev = 0x14, .name = "i.MX31", .v = "1.2", .rev = IMX_CHIP_REVISION_1_2 }, | 30 | { .srev = 0x14, .name = "i.MX31", .rev = IMX_CHIP_REVISION_1_2 }, |
32 | { .srev = 0x15, .name = "i.MX31L", .v = "1.2", .rev = IMX_CHIP_REVISION_1_2 }, | 31 | { .srev = 0x15, .name = "i.MX31L", .rev = IMX_CHIP_REVISION_1_2 }, |
33 | { .srev = 0x28, .name = "i.MX31", .v = "2.0", .rev = IMX_CHIP_REVISION_2_0 }, | 32 | { .srev = 0x28, .name = "i.MX31", .rev = IMX_CHIP_REVISION_2_0 }, |
34 | { .srev = 0x29, .name = "i.MX31L", .v = "2.0", .rev = IMX_CHIP_REVISION_2_0 }, | 33 | { .srev = 0x29, .name = "i.MX31L", .rev = IMX_CHIP_REVISION_2_0 }, |
35 | }; | 34 | }; |
36 | 35 | ||
37 | void __init mx31_read_cpu_rev(void) | 36 | static int mx31_read_cpu_rev(void) |
38 | { | 37 | { |
39 | u32 i, srev; | 38 | u32 i, srev; |
40 | 39 | ||
41 | /* read SREV register from IIM module */ | 40 | /* read SREV register from IIM module */ |
42 | srev = __raw_readl(MX31_IO_ADDRESS(MX31_IIM_BASE_ADDR + MXC_IIMSREV)); | 41 | srev = __raw_readl(MX31_IO_ADDRESS(MX31_IIM_BASE_ADDR + MXC_IIMSREV)); |
42 | srev &= 0xff; | ||
43 | 43 | ||
44 | for (i = 0; i < ARRAY_SIZE(mx31_cpu_type); i++) | 44 | for (i = 0; i < ARRAY_SIZE(mx31_cpu_type); i++) |
45 | if (srev == mx31_cpu_type[i].srev) { | 45 | if (srev == mx31_cpu_type[i].srev) { |
46 | printk(KERN_INFO | 46 | imx_print_silicon_rev(mx31_cpu_type[i].name, |
47 | "CPU identified as %s, silicon rev %s\n", | 47 | mx31_cpu_type[i].rev); |
48 | mx31_cpu_type[i].name, mx31_cpu_type[i].v); | 48 | return mx31_cpu_type[i].rev; |
49 | |||
50 | mx31_cpu_rev = mx31_cpu_type[i].rev; | ||
51 | return; | ||
52 | } | 49 | } |
53 | 50 | ||
54 | mx31_cpu_rev = IMX_CHIP_REVISION_UNKNOWN; | 51 | imx_print_silicon_rev("i.MX31", IMX_CHIP_REVISION_UNKNOWN); |
52 | return IMX_CHIP_REVISION_UNKNOWN; | ||
53 | } | ||
54 | |||
55 | int mx31_revision(void) | ||
56 | { | ||
57 | if (mx31_cpu_rev == -1) | ||
58 | mx31_cpu_rev = mx31_read_cpu_rev(); | ||
55 | 59 | ||
56 | printk(KERN_WARNING "Unknown CPU identifier. srev = %02x\n", srev); | 60 | return mx31_cpu_rev; |
57 | } | 61 | } |
62 | EXPORT_SYMBOL(mx31_revision); | ||
diff --git a/arch/arm/mach-imx/cpu-imx35.c b/arch/arm/mach-imx/cpu-imx35.c index 6637cd819ecb..846e46eb8cbf 100644 --- a/arch/arm/mach-imx/cpu-imx35.c +++ b/arch/arm/mach-imx/cpu-imx35.c | |||
@@ -13,32 +13,30 @@ | |||
13 | #include <mach/hardware.h> | 13 | #include <mach/hardware.h> |
14 | #include <mach/iim.h> | 14 | #include <mach/iim.h> |
15 | 15 | ||
16 | unsigned int mx35_cpu_rev; | 16 | static int mx35_cpu_rev = -1; |
17 | EXPORT_SYMBOL(mx35_cpu_rev); | ||
18 | 17 | ||
19 | void __init mx35_read_cpu_rev(void) | 18 | static int mx35_read_cpu_rev(void) |
20 | { | 19 | { |
21 | u32 rev; | 20 | u32 rev; |
22 | char *srev; | ||
23 | 21 | ||
24 | rev = __raw_readl(MX35_IO_ADDRESS(MX35_IIM_BASE_ADDR + MXC_IIMSREV)); | 22 | rev = __raw_readl(MX35_IO_ADDRESS(MX35_IIM_BASE_ADDR + MXC_IIMSREV)); |
25 | switch (rev) { | 23 | switch (rev) { |
26 | case 0x00: | 24 | case 0x00: |
27 | mx35_cpu_rev = IMX_CHIP_REVISION_1_0; | 25 | return IMX_CHIP_REVISION_1_0; |
28 | srev = "1.0"; | ||
29 | break; | ||
30 | case 0x10: | 26 | case 0x10: |
31 | mx35_cpu_rev = IMX_CHIP_REVISION_2_0; | 27 | return IMX_CHIP_REVISION_2_0; |
32 | srev = "2.0"; | ||
33 | break; | ||
34 | case 0x11: | 28 | case 0x11: |
35 | mx35_cpu_rev = IMX_CHIP_REVISION_2_1; | 29 | return IMX_CHIP_REVISION_2_1; |
36 | srev = "2.1"; | ||
37 | break; | ||
38 | default: | 30 | default: |
39 | mx35_cpu_rev = IMX_CHIP_REVISION_UNKNOWN; | 31 | return IMX_CHIP_REVISION_UNKNOWN; |
40 | srev = "unknown"; | ||
41 | } | 32 | } |
33 | } | ||
34 | |||
35 | int mx35_revision(void) | ||
36 | { | ||
37 | if (mx35_cpu_rev == -1) | ||
38 | mx35_cpu_rev = mx35_read_cpu_rev(); | ||
42 | 39 | ||
43 | printk(KERN_INFO "CPU identified as i.MX35, silicon rev %s\n", srev); | 40 | return mx35_cpu_rev; |
44 | } | 41 | } |
42 | EXPORT_SYMBOL(mx35_revision); | ||
diff --git a/arch/arm/mach-imx/mach-apf9328.c b/arch/arm/mach-imx/mach-apf9328.c index a404c89485ca..1e486e67dabb 100644 --- a/arch/arm/mach-imx/mach-apf9328.c +++ b/arch/arm/mach-imx/mach-apf9328.c | |||
@@ -136,6 +136,7 @@ MACHINE_START(APF9328, "Armadeus APF9328") | |||
136 | .map_io = mx1_map_io, | 136 | .map_io = mx1_map_io, |
137 | .init_early = imx1_init_early, | 137 | .init_early = imx1_init_early, |
138 | .init_irq = mx1_init_irq, | 138 | .init_irq = mx1_init_irq, |
139 | .handle_irq = imx1_handle_irq, | ||
139 | .timer = &apf9328_timer, | 140 | .timer = &apf9328_timer, |
140 | .init_machine = apf9328_init, | 141 | .init_machine = apf9328_init, |
141 | MACHINE_END | 142 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-armadillo5x0.c b/arch/arm/mach-imx/mach-armadillo5x0.c index fa2b97df5846..c9a9cf67755e 100644 --- a/arch/arm/mach-imx/mach-armadillo5x0.c +++ b/arch/arm/mach-imx/mach-armadillo5x0.c | |||
@@ -558,6 +558,7 @@ MACHINE_START(ARMADILLO5X0, "Armadillo-500") | |||
558 | .map_io = mx31_map_io, | 558 | .map_io = mx31_map_io, |
559 | .init_early = imx31_init_early, | 559 | .init_early = imx31_init_early, |
560 | .init_irq = mx31_init_irq, | 560 | .init_irq = mx31_init_irq, |
561 | .handle_irq = imx31_handle_irq, | ||
561 | .timer = &armadillo5x0_timer, | 562 | .timer = &armadillo5x0_timer, |
562 | .init_machine = armadillo5x0_init, | 563 | .init_machine = armadillo5x0_init, |
563 | MACHINE_END | 564 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-bug.c b/arch/arm/mach-imx/mach-bug.c index f49470553bdf..313f62ddc1ef 100644 --- a/arch/arm/mach-imx/mach-bug.c +++ b/arch/arm/mach-imx/mach-bug.c | |||
@@ -62,6 +62,7 @@ MACHINE_START(BUG, "BugLabs BUGBase") | |||
62 | .map_io = mx31_map_io, | 62 | .map_io = mx31_map_io, |
63 | .init_early = imx31_init_early, | 63 | .init_early = imx31_init_early, |
64 | .init_irq = mx31_init_irq, | 64 | .init_irq = mx31_init_irq, |
65 | .handle_irq = imx31_handle_irq, | ||
65 | .timer = &bug_timer, | 66 | .timer = &bug_timer, |
66 | .init_machine = bug_board_init, | 67 | .init_machine = bug_board_init, |
67 | MACHINE_END | 68 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-cpuimx27.c b/arch/arm/mach-imx/mach-cpuimx27.c index b1ec2cf53bb0..edb373052576 100644 --- a/arch/arm/mach-imx/mach-cpuimx27.c +++ b/arch/arm/mach-imx/mach-cpuimx27.c | |||
@@ -315,6 +315,7 @@ MACHINE_START(EUKREA_CPUIMX27, "EUKREA CPUIMX27") | |||
315 | .map_io = mx27_map_io, | 315 | .map_io = mx27_map_io, |
316 | .init_early = imx27_init_early, | 316 | .init_early = imx27_init_early, |
317 | .init_irq = mx27_init_irq, | 317 | .init_irq = mx27_init_irq, |
318 | .handle_irq = imx27_handle_irq, | ||
318 | .timer = &eukrea_cpuimx27_timer, | 319 | .timer = &eukrea_cpuimx27_timer, |
319 | .init_machine = eukrea_cpuimx27_init, | 320 | .init_machine = eukrea_cpuimx27_init, |
320 | MACHINE_END | 321 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-cpuimx35.c b/arch/arm/mach-imx/mach-cpuimx35.c index ea6c9c3468a6..66af2e8f7e57 100644 --- a/arch/arm/mach-imx/mach-cpuimx35.c +++ b/arch/arm/mach-imx/mach-cpuimx35.c | |||
@@ -198,6 +198,7 @@ MACHINE_START(EUKREA_CPUIMX35SD, "Eukrea CPUIMX35") | |||
198 | .map_io = mx35_map_io, | 198 | .map_io = mx35_map_io, |
199 | .init_early = imx35_init_early, | 199 | .init_early = imx35_init_early, |
200 | .init_irq = mx35_init_irq, | 200 | .init_irq = mx35_init_irq, |
201 | .handle_irq = imx35_handle_irq, | ||
201 | .timer = &eukrea_cpuimx35_timer, | 202 | .timer = &eukrea_cpuimx35_timer, |
202 | .init_machine = eukrea_cpuimx35_init, | 203 | .init_machine = eukrea_cpuimx35_init, |
203 | MACHINE_END | 204 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-eukrea_cpuimx25.c b/arch/arm/mach-imx/mach-eukrea_cpuimx25.c index 9163318e95a2..ab8fbcc472b5 100644 --- a/arch/arm/mach-imx/mach-eukrea_cpuimx25.c +++ b/arch/arm/mach-imx/mach-eukrea_cpuimx25.c | |||
@@ -167,6 +167,7 @@ MACHINE_START(EUKREA_CPUIMX25SD, "Eukrea CPUIMX25") | |||
167 | .map_io = mx25_map_io, | 167 | .map_io = mx25_map_io, |
168 | .init_early = imx25_init_early, | 168 | .init_early = imx25_init_early, |
169 | .init_irq = mx25_init_irq, | 169 | .init_irq = mx25_init_irq, |
170 | .handle_irq = imx25_handle_irq, | ||
170 | .timer = &eukrea_cpuimx25_timer, | 171 | .timer = &eukrea_cpuimx25_timer, |
171 | .init_machine = eukrea_cpuimx25_init, | 172 | .init_machine = eukrea_cpuimx25_init, |
172 | MACHINE_END | 173 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c index 22306ce28658..38eb9e45110b 100644 --- a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c +++ b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c | |||
@@ -279,6 +279,7 @@ MACHINE_START(IMX27_VISSTRIM_M10, "Vista Silicon Visstrim_M10") | |||
279 | .map_io = mx27_map_io, | 279 | .map_io = mx27_map_io, |
280 | .init_early = imx27_init_early, | 280 | .init_early = imx27_init_early, |
281 | .init_irq = mx27_init_irq, | 281 | .init_irq = mx27_init_irq, |
282 | .handle_irq = imx27_handle_irq, | ||
282 | .timer = &visstrim_m10_timer, | 283 | .timer = &visstrim_m10_timer, |
283 | .init_machine = visstrim_m10_board_init, | 284 | .init_machine = visstrim_m10_board_init, |
284 | MACHINE_END | 285 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-imx27ipcam.c b/arch/arm/mach-imx/mach-imx27ipcam.c index 8da48b33fc53..7052155d0557 100644 --- a/arch/arm/mach-imx/mach-imx27ipcam.c +++ b/arch/arm/mach-imx/mach-imx27ipcam.c | |||
@@ -75,6 +75,7 @@ MACHINE_START(IMX27IPCAM, "Freescale IMX27IPCAM") | |||
75 | .map_io = mx27_map_io, | 75 | .map_io = mx27_map_io, |
76 | .init_early = imx27_init_early, | 76 | .init_early = imx27_init_early, |
77 | .init_irq = mx27_init_irq, | 77 | .init_irq = mx27_init_irq, |
78 | .handle_irq = imx27_handle_irq, | ||
78 | .timer = &mx27ipcam_timer, | 79 | .timer = &mx27ipcam_timer, |
79 | .init_machine = mx27ipcam_init, | 80 | .init_machine = mx27ipcam_init, |
80 | MACHINE_END | 81 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-imx27lite.c b/arch/arm/mach-imx/mach-imx27lite.c index 21a14a20e2c3..8d6a63521f17 100644 --- a/arch/arm/mach-imx/mach-imx27lite.c +++ b/arch/arm/mach-imx/mach-imx27lite.c | |||
@@ -81,6 +81,7 @@ MACHINE_START(IMX27LITE, "LogicPD i.MX27LITE") | |||
81 | .map_io = mx27_map_io, | 81 | .map_io = mx27_map_io, |
82 | .init_early = imx27_init_early, | 82 | .init_early = imx27_init_early, |
83 | .init_irq = mx27_init_irq, | 83 | .init_irq = mx27_init_irq, |
84 | .handle_irq = imx27_handle_irq, | ||
84 | .timer = &mx27lite_timer, | 85 | .timer = &mx27lite_timer, |
85 | .init_machine = mx27lite_init, | 86 | .init_machine = mx27lite_init, |
86 | MACHINE_END | 87 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-kzm_arm11_01.c b/arch/arm/mach-imx/mach-kzm_arm11_01.c index 4e030ac58847..5f37f89e40fa 100644 --- a/arch/arm/mach-imx/mach-kzm_arm11_01.c +++ b/arch/arm/mach-imx/mach-kzm_arm11_01.c | |||
@@ -276,6 +276,7 @@ MACHINE_START(KZM_ARM11_01, "Kyoto Microcomputer Co., Ltd. KZM-ARM11-01") | |||
276 | .map_io = kzm_map_io, | 276 | .map_io = kzm_map_io, |
277 | .init_early = imx31_init_early, | 277 | .init_early = imx31_init_early, |
278 | .init_irq = mx31_init_irq, | 278 | .init_irq = mx31_init_irq, |
279 | .handle_irq = imx31_handle_irq, | ||
279 | .timer = &kzm_timer, | 280 | .timer = &kzm_timer, |
280 | .init_machine = kzm_board_init, | 281 | .init_machine = kzm_board_init, |
281 | MACHINE_END | 282 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx1ads.c b/arch/arm/mach-imx/mach-mx1ads.c index b4a5e0382634..fc49785e7340 100644 --- a/arch/arm/mach-imx/mach-mx1ads.c +++ b/arch/arm/mach-imx/mach-mx1ads.c | |||
@@ -144,6 +144,7 @@ MACHINE_START(MX1ADS, "Freescale MX1ADS") | |||
144 | .map_io = mx1_map_io, | 144 | .map_io = mx1_map_io, |
145 | .init_early = imx1_init_early, | 145 | .init_early = imx1_init_early, |
146 | .init_irq = mx1_init_irq, | 146 | .init_irq = mx1_init_irq, |
147 | .handle_irq = imx1_handle_irq, | ||
147 | .timer = &mx1ads_timer, | 148 | .timer = &mx1ads_timer, |
148 | .init_machine = mx1ads_init, | 149 | .init_machine = mx1ads_init, |
149 | MACHINE_END | 150 | MACHINE_END |
@@ -153,6 +154,7 @@ MACHINE_START(MXLADS, "Freescale MXLADS") | |||
153 | .map_io = mx1_map_io, | 154 | .map_io = mx1_map_io, |
154 | .init_early = imx1_init_early, | 155 | .init_early = imx1_init_early, |
155 | .init_irq = mx1_init_irq, | 156 | .init_irq = mx1_init_irq, |
157 | .handle_irq = imx1_handle_irq, | ||
156 | .timer = &mx1ads_timer, | 158 | .timer = &mx1ads_timer, |
157 | .init_machine = mx1ads_init, | 159 | .init_machine = mx1ads_init, |
158 | MACHINE_END | 160 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx21ads.c b/arch/arm/mach-imx/mach-mx21ads.c index e56828da26b2..25f84028d055 100644 --- a/arch/arm/mach-imx/mach-mx21ads.c +++ b/arch/arm/mach-imx/mach-mx21ads.c | |||
@@ -309,6 +309,7 @@ MACHINE_START(MX21ADS, "Freescale i.MX21ADS") | |||
309 | .map_io = mx21ads_map_io, | 309 | .map_io = mx21ads_map_io, |
310 | .init_early = imx21_init_early, | 310 | .init_early = imx21_init_early, |
311 | .init_irq = mx21_init_irq, | 311 | .init_irq = mx21_init_irq, |
312 | .handle_irq = imx21_handle_irq, | ||
312 | .timer = &mx21ads_timer, | 313 | .timer = &mx21ads_timer, |
313 | .init_machine = mx21ads_board_init, | 314 | .init_machine = mx21ads_board_init, |
314 | MACHINE_END | 315 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx25_3ds.c b/arch/arm/mach-imx/mach-mx25_3ds.c index dd25ee82e70a..88dccf122243 100644 --- a/arch/arm/mach-imx/mach-mx25_3ds.c +++ b/arch/arm/mach-imx/mach-mx25_3ds.c | |||
@@ -43,6 +43,8 @@ | |||
43 | 43 | ||
44 | #include "devices-imx25.h" | 44 | #include "devices-imx25.h" |
45 | 45 | ||
46 | #define MX25PDK_CAN_PWDN IMX_GPIO_NR(4, 6) | ||
47 | |||
46 | static const struct imxuart_platform_data uart_pdata __initconst = { | 48 | static const struct imxuart_platform_data uart_pdata __initconst = { |
47 | .flags = IMXUART_HAVE_RTSCTS, | 49 | .flags = IMXUART_HAVE_RTSCTS, |
48 | }; | 50 | }; |
@@ -108,6 +110,11 @@ static iomux_v3_cfg_t mx25pdk_pads[] = { | |||
108 | /* I2C1 */ | 110 | /* I2C1 */ |
109 | MX25_PAD_I2C1_CLK__I2C1_CLK, | 111 | MX25_PAD_I2C1_CLK__I2C1_CLK, |
110 | MX25_PAD_I2C1_DAT__I2C1_DAT, | 112 | MX25_PAD_I2C1_DAT__I2C1_DAT, |
113 | |||
114 | /* CAN1 */ | ||
115 | MX25_PAD_GPIO_A__CAN1_TX, | ||
116 | MX25_PAD_GPIO_B__CAN1_RX, | ||
117 | MX25_PAD_D14__GPIO_4_6, /* CAN_PWDN */ | ||
111 | }; | 118 | }; |
112 | 119 | ||
113 | static const struct fec_platform_data mx25_fec_pdata __initconst = { | 120 | static const struct fec_platform_data mx25_fec_pdata __initconst = { |
@@ -240,6 +247,9 @@ static void __init mx25pdk_init(void) | |||
240 | 247 | ||
241 | imx25_add_sdhci_esdhc_imx(0, &mx25pdk_esdhc_pdata); | 248 | imx25_add_sdhci_esdhc_imx(0, &mx25pdk_esdhc_pdata); |
242 | imx25_add_imx_i2c0(&mx25_3ds_i2c0_data); | 249 | imx25_add_imx_i2c0(&mx25_3ds_i2c0_data); |
250 | |||
251 | gpio_request_one(MX25PDK_CAN_PWDN, GPIOF_OUT_INIT_LOW, "can-pwdn"); | ||
252 | imx25_add_flexcan0(NULL); | ||
243 | } | 253 | } |
244 | 254 | ||
245 | static void __init mx25pdk_timer_init(void) | 255 | static void __init mx25pdk_timer_init(void) |
@@ -257,6 +267,7 @@ MACHINE_START(MX25_3DS, "Freescale MX25PDK (3DS)") | |||
257 | .map_io = mx25_map_io, | 267 | .map_io = mx25_map_io, |
258 | .init_early = imx25_init_early, | 268 | .init_early = imx25_init_early, |
259 | .init_irq = mx25_init_irq, | 269 | .init_irq = mx25_init_irq, |
270 | .handle_irq = imx25_handle_irq, | ||
260 | .timer = &mx25pdk_timer, | 271 | .timer = &mx25pdk_timer, |
261 | .init_machine = mx25pdk_init, | 272 | .init_machine = mx25pdk_init, |
262 | MACHINE_END | 273 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx27_3ds.c b/arch/arm/mach-imx/mach-mx27_3ds.c index 04bc86de2c57..cfa84178eb26 100644 --- a/arch/arm/mach-imx/mach-mx27_3ds.c +++ b/arch/arm/mach-imx/mach-mx27_3ds.c | |||
@@ -423,6 +423,7 @@ MACHINE_START(MX27_3DS, "Freescale MX27PDK") | |||
423 | .map_io = mx27_map_io, | 423 | .map_io = mx27_map_io, |
424 | .init_early = imx27_init_early, | 424 | .init_early = imx27_init_early, |
425 | .init_irq = mx27_init_irq, | 425 | .init_irq = mx27_init_irq, |
426 | .handle_irq = imx27_handle_irq, | ||
426 | .timer = &mx27pdk_timer, | 427 | .timer = &mx27pdk_timer, |
427 | .init_machine = mx27pdk_init, | 428 | .init_machine = mx27pdk_init, |
428 | MACHINE_END | 429 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx27ads.c b/arch/arm/mach-imx/mach-mx27ads.c index 635b0509068b..74dd5731eb61 100644 --- a/arch/arm/mach-imx/mach-mx27ads.c +++ b/arch/arm/mach-imx/mach-mx27ads.c | |||
@@ -348,6 +348,7 @@ MACHINE_START(MX27ADS, "Freescale i.MX27ADS") | |||
348 | .map_io = mx27ads_map_io, | 348 | .map_io = mx27ads_map_io, |
349 | .init_early = imx27_init_early, | 349 | .init_early = imx27_init_early, |
350 | .init_irq = mx27_init_irq, | 350 | .init_irq = mx27_init_irq, |
351 | .handle_irq = imx27_handle_irq, | ||
351 | .timer = &mx27ads_timer, | 352 | .timer = &mx27ads_timer, |
352 | .init_machine = mx27ads_board_init, | 353 | .init_machine = mx27ads_board_init, |
353 | MACHINE_END | 354 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx31_3ds.c b/arch/arm/mach-imx/mach-mx31_3ds.c index 0de4d1835ea4..60f1fda6ce97 100644 --- a/arch/arm/mach-imx/mach-mx31_3ds.c +++ b/arch/arm/mach-imx/mach-mx31_3ds.c | |||
@@ -766,6 +766,7 @@ MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)") | |||
766 | .map_io = mx31_map_io, | 766 | .map_io = mx31_map_io, |
767 | .init_early = imx31_init_early, | 767 | .init_early = imx31_init_early, |
768 | .init_irq = mx31_init_irq, | 768 | .init_irq = mx31_init_irq, |
769 | .handle_irq = imx31_handle_irq, | ||
769 | .timer = &mx31_3ds_timer, | 770 | .timer = &mx31_3ds_timer, |
770 | .init_machine = mx31_3ds_init, | 771 | .init_machine = mx31_3ds_init, |
771 | .reserve = mx31_3ds_reserve, | 772 | .reserve = mx31_3ds_reserve, |
diff --git a/arch/arm/mach-imx/mach-mx31ads.c b/arch/arm/mach-imx/mach-mx31ads.c index 910c4561d35f..9cc1a49053bb 100644 --- a/arch/arm/mach-imx/mach-mx31ads.c +++ b/arch/arm/mach-imx/mach-mx31ads.c | |||
@@ -539,6 +539,7 @@ MACHINE_START(MX31ADS, "Freescale MX31ADS") | |||
539 | .map_io = mx31ads_map_io, | 539 | .map_io = mx31ads_map_io, |
540 | .init_early = imx31_init_early, | 540 | .init_early = imx31_init_early, |
541 | .init_irq = mx31ads_init_irq, | 541 | .init_irq = mx31ads_init_irq, |
542 | .handle_irq = imx31_handle_irq, | ||
542 | .timer = &mx31ads_timer, | 543 | .timer = &mx31ads_timer, |
543 | .init_machine = mx31ads_init, | 544 | .init_machine = mx31ads_init, |
544 | MACHINE_END | 545 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx31lilly.c b/arch/arm/mach-imx/mach-mx31lilly.c index e92eaf91a7be..5defd8e70fc4 100644 --- a/arch/arm/mach-imx/mach-mx31lilly.c +++ b/arch/arm/mach-imx/mach-mx31lilly.c | |||
@@ -299,6 +299,7 @@ MACHINE_START(LILLY1131, "INCO startec LILLY-1131") | |||
299 | .map_io = mx31_map_io, | 299 | .map_io = mx31_map_io, |
300 | .init_early = imx31_init_early, | 300 | .init_early = imx31_init_early, |
301 | .init_irq = mx31_init_irq, | 301 | .init_irq = mx31_init_irq, |
302 | .handle_irq = imx31_handle_irq, | ||
302 | .timer = &mx31lilly_timer, | 303 | .timer = &mx31lilly_timer, |
303 | .init_machine = mx31lilly_board_init, | 304 | .init_machine = mx31lilly_board_init, |
304 | MACHINE_END | 305 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx31lite.c b/arch/arm/mach-imx/mach-mx31lite.c index 5242cb78b563..c97c26d814ed 100644 --- a/arch/arm/mach-imx/mach-mx31lite.c +++ b/arch/arm/mach-imx/mach-mx31lite.c | |||
@@ -284,6 +284,7 @@ MACHINE_START(MX31LITE, "LogicPD i.MX31 SOM") | |||
284 | .map_io = mx31lite_map_io, | 284 | .map_io = mx31lite_map_io, |
285 | .init_early = imx31_init_early, | 285 | .init_early = imx31_init_early, |
286 | .init_irq = mx31_init_irq, | 286 | .init_irq = mx31_init_irq, |
287 | .handle_irq = imx31_handle_irq, | ||
287 | .timer = &mx31lite_timer, | 288 | .timer = &mx31lite_timer, |
288 | .init_machine = mx31lite_init, | 289 | .init_machine = mx31lite_init, |
289 | MACHINE_END | 290 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx31moboard.c b/arch/arm/mach-imx/mach-mx31moboard.c index 1d01ef28f25d..fff7791b7e7c 100644 --- a/arch/arm/mach-imx/mach-mx31moboard.c +++ b/arch/arm/mach-imx/mach-mx31moboard.c | |||
@@ -28,6 +28,9 @@ | |||
28 | #include <linux/spi/spi.h> | 28 | #include <linux/spi/spi.h> |
29 | #include <linux/types.h> | 29 | #include <linux/types.h> |
30 | #include <linux/memblock.h> | 30 | #include <linux/memblock.h> |
31 | #include <linux/clk.h> | ||
32 | #include <linux/io.h> | ||
33 | #include <linux/err.h> | ||
31 | 34 | ||
32 | #include <linux/usb/otg.h> | 35 | #include <linux/usb/otg.h> |
33 | #include <linux/usb/ulpi.h> | 36 | #include <linux/usb/ulpi.h> |
@@ -490,6 +493,18 @@ err: | |||
490 | 493 | ||
491 | } | 494 | } |
492 | 495 | ||
496 | static void mx31moboard_poweroff(void) | ||
497 | { | ||
498 | struct clk *clk = clk_get_sys("imx2-wdt.0", NULL); | ||
499 | |||
500 | if (!IS_ERR(clk)) | ||
501 | clk_enable(clk); | ||
502 | |||
503 | mxc_iomux_mode(MX31_PIN_WATCHDOG_RST__WATCHDOG_RST); | ||
504 | |||
505 | __raw_writew(1 << 6 | 1 << 2, MX31_IO_ADDRESS(MX31_WDOG_BASE_ADDR)); | ||
506 | } | ||
507 | |||
493 | static int mx31moboard_baseboard; | 508 | static int mx31moboard_baseboard; |
494 | core_param(mx31moboard_baseboard, mx31moboard_baseboard, int, 0444); | 509 | core_param(mx31moboard_baseboard, mx31moboard_baseboard, int, 0444); |
495 | 510 | ||
@@ -528,6 +543,8 @@ static void __init mx31moboard_init(void) | |||
528 | 543 | ||
529 | moboard_usbh2_init(); | 544 | moboard_usbh2_init(); |
530 | 545 | ||
546 | pm_power_off = mx31moboard_poweroff; | ||
547 | |||
531 | switch (mx31moboard_baseboard) { | 548 | switch (mx31moboard_baseboard) { |
532 | case MX31NOBOARD: | 549 | case MX31NOBOARD: |
533 | break; | 550 | break; |
@@ -572,6 +589,7 @@ MACHINE_START(MX31MOBOARD, "EPFL Mobots mx31moboard") | |||
572 | .map_io = mx31_map_io, | 589 | .map_io = mx31_map_io, |
573 | .init_early = imx31_init_early, | 590 | .init_early = imx31_init_early, |
574 | .init_irq = mx31_init_irq, | 591 | .init_irq = mx31_init_irq, |
592 | .handle_irq = imx31_handle_irq, | ||
575 | .timer = &mx31moboard_timer, | 593 | .timer = &mx31moboard_timer, |
576 | .init_machine = mx31moboard_init, | 594 | .init_machine = mx31moboard_init, |
577 | MACHINE_END | 595 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx35_3ds.c b/arch/arm/mach-imx/mach-mx35_3ds.c index f2a873dc08ce..7a462025a0f7 100644 --- a/arch/arm/mach-imx/mach-mx35_3ds.c +++ b/arch/arm/mach-imx/mach-mx35_3ds.c | |||
@@ -221,6 +221,7 @@ MACHINE_START(MX35_3DS, "Freescale MX35PDK") | |||
221 | .map_io = mx35_map_io, | 221 | .map_io = mx35_map_io, |
222 | .init_early = imx35_init_early, | 222 | .init_early = imx35_init_early, |
223 | .init_irq = mx35_init_irq, | 223 | .init_irq = mx35_init_irq, |
224 | .handle_irq = imx35_handle_irq, | ||
224 | .timer = &mx35pdk_timer, | 225 | .timer = &mx35pdk_timer, |
225 | .init_machine = mx35_3ds_init, | 226 | .init_machine = mx35_3ds_init, |
226 | MACHINE_END | 227 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mxt_td60.c b/arch/arm/mach-imx/mach-mxt_td60.c index 5ec3989704fd..125c19643b0f 100644 --- a/arch/arm/mach-imx/mach-mxt_td60.c +++ b/arch/arm/mach-imx/mach-mxt_td60.c | |||
@@ -271,6 +271,7 @@ MACHINE_START(MXT_TD60, "Maxtrack i-MXT TD60") | |||
271 | .map_io = mx27_map_io, | 271 | .map_io = mx27_map_io, |
272 | .init_early = imx27_init_early, | 272 | .init_early = imx27_init_early, |
273 | .init_irq = mx27_init_irq, | 273 | .init_irq = mx27_init_irq, |
274 | .handle_irq = imx27_handle_irq, | ||
274 | .timer = &mxt_td60_timer, | 275 | .timer = &mxt_td60_timer, |
275 | .init_machine = mxt_td60_board_init, | 276 | .init_machine = mxt_td60_board_init, |
276 | MACHINE_END | 277 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-pca100.c b/arch/arm/mach-imx/mach-pca100.c index 0f6bd1199038..26072f4b02e3 100644 --- a/arch/arm/mach-imx/mach-pca100.c +++ b/arch/arm/mach-imx/mach-pca100.c | |||
@@ -439,6 +439,7 @@ MACHINE_START(PCA100, "phyCARD-i.MX27") | |||
439 | .map_io = mx27_map_io, | 439 | .map_io = mx27_map_io, |
440 | .init_early = imx27_init_early, | 440 | .init_early = imx27_init_early, |
441 | .init_irq = mx27_init_irq, | 441 | .init_irq = mx27_init_irq, |
442 | .handle_irq = imx27_handle_irq, | ||
442 | .init_machine = pca100_init, | 443 | .init_machine = pca100_init, |
443 | .timer = &pca100_timer, | 444 | .timer = &pca100_timer, |
444 | MACHINE_END | 445 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-pcm037.c b/arch/arm/mach-imx/mach-pcm037.c index 186d4eb90796..efd6b536ef6a 100644 --- a/arch/arm/mach-imx/mach-pcm037.c +++ b/arch/arm/mach-imx/mach-pcm037.c | |||
@@ -693,6 +693,7 @@ MACHINE_START(PCM037, "Phytec Phycore pcm037") | |||
693 | .map_io = mx31_map_io, | 693 | .map_io = mx31_map_io, |
694 | .init_early = imx31_init_early, | 694 | .init_early = imx31_init_early, |
695 | .init_irq = mx31_init_irq, | 695 | .init_irq = mx31_init_irq, |
696 | .handle_irq = imx31_handle_irq, | ||
696 | .timer = &pcm037_timer, | 697 | .timer = &pcm037_timer, |
697 | .init_machine = pcm037_init, | 698 | .init_machine = pcm037_init, |
698 | MACHINE_END | 699 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-pcm038.c b/arch/arm/mach-imx/mach-pcm038.c index a497a2997002..100bc733ce93 100644 --- a/arch/arm/mach-imx/mach-pcm038.c +++ b/arch/arm/mach-imx/mach-pcm038.c | |||
@@ -355,6 +355,7 @@ MACHINE_START(PCM038, "phyCORE-i.MX27") | |||
355 | .map_io = mx27_map_io, | 355 | .map_io = mx27_map_io, |
356 | .init_early = imx27_init_early, | 356 | .init_early = imx27_init_early, |
357 | .init_irq = mx27_init_irq, | 357 | .init_irq = mx27_init_irq, |
358 | .handle_irq = imx27_handle_irq, | ||
358 | .timer = &pcm038_timer, | 359 | .timer = &pcm038_timer, |
359 | .init_machine = pcm038_init, | 360 | .init_machine = pcm038_init, |
360 | MACHINE_END | 361 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-pcm043.c b/arch/arm/mach-imx/mach-pcm043.c index 0a4d31de7738..7366c2ae3ea5 100644 --- a/arch/arm/mach-imx/mach-pcm043.c +++ b/arch/arm/mach-imx/mach-pcm043.c | |||
@@ -422,6 +422,7 @@ MACHINE_START(PCM043, "Phytec Phycore pcm043") | |||
422 | .map_io = mx35_map_io, | 422 | .map_io = mx35_map_io, |
423 | .init_early = imx35_init_early, | 423 | .init_early = imx35_init_early, |
424 | .init_irq = mx35_init_irq, | 424 | .init_irq = mx35_init_irq, |
425 | .handle_irq = imx35_handle_irq, | ||
425 | .timer = &pcm043_timer, | 426 | .timer = &pcm043_timer, |
426 | .init_machine = pcm043_init, | 427 | .init_machine = pcm043_init, |
427 | MACHINE_END | 428 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-qong.c b/arch/arm/mach-imx/mach-qong.c index c33ab00845f6..4ff5faf102a8 100644 --- a/arch/arm/mach-imx/mach-qong.c +++ b/arch/arm/mach-imx/mach-qong.c | |||
@@ -252,6 +252,7 @@ static void __init qong_init(void) | |||
252 | mxc_init_imx_uart(); | 252 | mxc_init_imx_uart(); |
253 | qong_init_nor_mtd(); | 253 | qong_init_nor_mtd(); |
254 | qong_init_fpga(); | 254 | qong_init_fpga(); |
255 | imx31_add_imx2_wdt(NULL); | ||
255 | } | 256 | } |
256 | 257 | ||
257 | static void __init qong_timer_init(void) | 258 | static void __init qong_timer_init(void) |
@@ -269,6 +270,7 @@ MACHINE_START(QONG, "Dave/DENX QongEVB-LITE") | |||
269 | .map_io = mx31_map_io, | 270 | .map_io = mx31_map_io, |
270 | .init_early = imx31_init_early, | 271 | .init_early = imx31_init_early, |
271 | .init_irq = mx31_init_irq, | 272 | .init_irq = mx31_init_irq, |
273 | .handle_irq = imx31_handle_irq, | ||
272 | .timer = &qong_timer, | 274 | .timer = &qong_timer, |
273 | .init_machine = qong_init, | 275 | .init_machine = qong_init, |
274 | MACHINE_END | 276 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-scb9328.c b/arch/arm/mach-imx/mach-scb9328.c index 85d32845ee1e..bb6e5b25d8d0 100644 --- a/arch/arm/mach-imx/mach-scb9328.c +++ b/arch/arm/mach-imx/mach-scb9328.c | |||
@@ -141,6 +141,7 @@ MACHINE_START(SCB9328, "Synertronixx scb9328") | |||
141 | .map_io = mx1_map_io, | 141 | .map_io = mx1_map_io, |
142 | .init_early = imx1_init_early, | 142 | .init_early = imx1_init_early, |
143 | .init_irq = mx1_init_irq, | 143 | .init_irq = mx1_init_irq, |
144 | .handle_irq = imx1_handle_irq, | ||
144 | .timer = &scb9328_timer, | 145 | .timer = &scb9328_timer, |
145 | .init_machine = scb9328_init, | 146 | .init_machine = scb9328_init, |
146 | MACHINE_END | 147 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-vpr200.c b/arch/arm/mach-imx/mach-vpr200.c index 5250283479e7..69092458f2d9 100644 --- a/arch/arm/mach-imx/mach-vpr200.c +++ b/arch/arm/mach-imx/mach-vpr200.c | |||
@@ -319,6 +319,7 @@ MACHINE_START(VPR200, "VPR200") | |||
319 | .map_io = mx35_map_io, | 319 | .map_io = mx35_map_io, |
320 | .init_early = imx35_init_early, | 320 | .init_early = imx35_init_early, |
321 | .init_irq = mx35_init_irq, | 321 | .init_irq = mx35_init_irq, |
322 | .handle_irq = imx35_handle_irq, | ||
322 | .timer = &vpr200_timer, | 323 | .timer = &vpr200_timer, |
323 | .init_machine = vpr200_board_init, | 324 | .init_machine = vpr200_board_init, |
324 | MACHINE_END | 325 | MACHINE_END |