diff options
author | Arnd Bergmann <arnd@arndb.de> | 2012-01-09 12:06:36 -0500 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-01-09 12:06:36 -0500 |
commit | 421b759b86eb8a914cbbd11f6d09a74f411762c6 (patch) | |
tree | 505ca7f23987d8eaaa519a7e8506b854e2c0d030 /arch/arm/mach-imx | |
parent | e067096c8d57d191f29d734cd5692695c95cc36e (diff) | |
parent | a07613a54d700a974f3a4a657da78ef5d097315d (diff) |
Merge branch 'samsung/cleanup' into next/boards
Conflicts:
arch/arm/mach-imx/mach-imx6q.c
arch/arm/mach-omap2/board-ti8168evm.c
arch/arm/mach-s3c64xx/Kconfig
arch/arm/mach-tegra/Makefile
arch/arm/mach-tegra/board-dt-tegra20.c
arch/arm/mach-tegra/common.c
Lots of relatively simple conflicts between the board
changes and stuff from the arm tree. This pulls in
the resolution from the samsung/cleanup tree, so we
don't get conflicting merges.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-imx')
35 files changed, 111 insertions, 20 deletions
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index d0a27303edb8..9d8598f29fda 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig | |||
@@ -133,7 +133,7 @@ config MACH_MX25_3DS | |||
133 | select IMX_HAVE_PLATFORM_MXC_NAND | 133 | select IMX_HAVE_PLATFORM_MXC_NAND |
134 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | 134 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX |
135 | 135 | ||
136 | config MACH_EUKREA_CPUIMX25 | 136 | config MACH_EUKREA_CPUIMX25SD |
137 | bool "Support Eukrea CPUIMX25 Platform" | 137 | bool "Support Eukrea CPUIMX25 Platform" |
138 | select SOC_IMX25 | 138 | select SOC_IMX25 |
139 | select IMX_HAVE_PLATFORM_FLEXCAN | 139 | select IMX_HAVE_PLATFORM_FLEXCAN |
@@ -149,7 +149,7 @@ config MACH_EUKREA_CPUIMX25 | |||
149 | 149 | ||
150 | choice | 150 | choice |
151 | prompt "Baseboard" | 151 | prompt "Baseboard" |
152 | depends on MACH_EUKREA_CPUIMX25 | 152 | depends on MACH_EUKREA_CPUIMX25SD |
153 | default MACH_EUKREA_MBIMXSD25_BASEBOARD | 153 | default MACH_EUKREA_MBIMXSD25_BASEBOARD |
154 | 154 | ||
155 | config MACH_EUKREA_MBIMXSD25_BASEBOARD | 155 | config MACH_EUKREA_MBIMXSD25_BASEBOARD |
@@ -543,7 +543,7 @@ config MACH_MX35_3DS | |||
543 | Include support for MX35PDK platform. This includes specific | 543 | Include support for MX35PDK platform. This includes specific |
544 | configurations for the board and its peripherals. | 544 | configurations for the board and its peripherals. |
545 | 545 | ||
546 | config MACH_EUKREA_CPUIMX35 | 546 | config MACH_EUKREA_CPUIMX35SD |
547 | bool "Support Eukrea CPUIMX35 Platform" | 547 | bool "Support Eukrea CPUIMX35 Platform" |
548 | select SOC_IMX35 | 548 | select SOC_IMX35 |
549 | select IMX_HAVE_PLATFORM_FLEXCAN | 549 | select IMX_HAVE_PLATFORM_FLEXCAN |
@@ -561,7 +561,7 @@ config MACH_EUKREA_CPUIMX35 | |||
561 | 561 | ||
562 | choice | 562 | choice |
563 | prompt "Baseboard" | 563 | prompt "Baseboard" |
564 | depends on MACH_EUKREA_CPUIMX35 | 564 | depends on MACH_EUKREA_CPUIMX35SD |
565 | default MACH_EUKREA_MBIMXSD35_BASEBOARD | 565 | default MACH_EUKREA_MBIMXSD35_BASEBOARD |
566 | 566 | ||
567 | config MACH_EUKREA_MBIMXSD35_BASEBOARD | 567 | config MACH_EUKREA_MBIMXSD35_BASEBOARD |
@@ -597,12 +597,12 @@ comment "i.MX6 family:" | |||
597 | config SOC_IMX6Q | 597 | config SOC_IMX6Q |
598 | bool "i.MX6 Quad support" | 598 | bool "i.MX6 Quad support" |
599 | select ARM_GIC | 599 | select ARM_GIC |
600 | select CACHE_L2X0 | ||
601 | select CPU_V7 | 600 | select CPU_V7 |
602 | select HAVE_ARM_SCU | 601 | select HAVE_ARM_SCU |
603 | select HAVE_IMX_GPC | 602 | select HAVE_IMX_GPC |
604 | select HAVE_IMX_MMDC | 603 | select HAVE_IMX_MMDC |
605 | select HAVE_IMX_SRC | 604 | select HAVE_IMX_SRC |
605 | select HAVE_SMP | ||
606 | select USE_OF | 606 | select USE_OF |
607 | 607 | ||
608 | help | 608 | help |
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile index aba73214c2a8..d97f409ce98b 100644 --- a/arch/arm/mach-imx/Makefile +++ b/arch/arm/mach-imx/Makefile | |||
@@ -24,7 +24,7 @@ obj-$(CONFIG_MACH_MX21ADS) += mach-mx21ads.o | |||
24 | 24 | ||
25 | # i.MX25 based machines | 25 | # i.MX25 based machines |
26 | obj-$(CONFIG_MACH_MX25_3DS) += mach-mx25_3ds.o | 26 | obj-$(CONFIG_MACH_MX25_3DS) += mach-mx25_3ds.o |
27 | obj-$(CONFIG_MACH_EUKREA_CPUIMX25) += mach-eukrea_cpuimx25.o | 27 | obj-$(CONFIG_MACH_EUKREA_CPUIMX25SD) += mach-eukrea_cpuimx25.o |
28 | obj-$(CONFIG_MACH_EUKREA_MBIMXSD25_BASEBOARD) += eukrea_mbimxsd25-baseboard.o | 28 | obj-$(CONFIG_MACH_EUKREA_MBIMXSD25_BASEBOARD) += eukrea_mbimxsd25-baseboard.o |
29 | 29 | ||
30 | # i.MX27 based machines | 30 | # i.MX27 based machines |
@@ -57,7 +57,7 @@ obj-$(CONFIG_MACH_BUG) += mach-bug.o | |||
57 | # i.MX35 based machines | 57 | # i.MX35 based machines |
58 | obj-$(CONFIG_MACH_PCM043) += mach-pcm043.o | 58 | obj-$(CONFIG_MACH_PCM043) += mach-pcm043.o |
59 | obj-$(CONFIG_MACH_MX35_3DS) += mach-mx35_3ds.o | 59 | obj-$(CONFIG_MACH_MX35_3DS) += mach-mx35_3ds.o |
60 | obj-$(CONFIG_MACH_EUKREA_CPUIMX35) += mach-cpuimx35.o | 60 | obj-$(CONFIG_MACH_EUKREA_CPUIMX35SD) += mach-cpuimx35.o |
61 | obj-$(CONFIG_MACH_EUKREA_MBIMXSD35_BASEBOARD) += eukrea_mbimxsd35-baseboard.o | 61 | obj-$(CONFIG_MACH_EUKREA_MBIMXSD35_BASEBOARD) += eukrea_mbimxsd35-baseboard.o |
62 | obj-$(CONFIG_MACH_VPR200) += mach-vpr200.o | 62 | obj-$(CONFIG_MACH_VPR200) += mach-vpr200.o |
63 | 63 | ||
diff --git a/arch/arm/mach-imx/clock-imx35.c b/arch/arm/mach-imx/clock-imx35.c index 8116f119517d..ac8238caecb9 100644 --- a/arch/arm/mach-imx/clock-imx35.c +++ b/arch/arm/mach-imx/clock-imx35.c | |||
@@ -507,7 +507,7 @@ static struct clk_lookup lookups[] = { | |||
507 | 507 | ||
508 | int __init mx35_clocks_init() | 508 | int __init mx35_clocks_init() |
509 | { | 509 | { |
510 | unsigned int cgr2 = 3 << 26, cgr3 = 0; | 510 | unsigned int cgr2 = 3 << 26; |
511 | 511 | ||
512 | #if defined(CONFIG_DEBUG_LL) && !defined(CONFIG_DEBUG_ICEDCC) | 512 | #if defined(CONFIG_DEBUG_LL) && !defined(CONFIG_DEBUG_ICEDCC) |
513 | cgr2 |= 3 << 16; | 513 | cgr2 |= 3 << 16; |
@@ -521,6 +521,12 @@ int __init mx35_clocks_init() | |||
521 | __raw_writel((3 << 18), CCM_BASE + CCM_CGR0); | 521 | __raw_writel((3 << 18), CCM_BASE + CCM_CGR0); |
522 | __raw_writel((3 << 2) | (3 << 4) | (3 << 6) | (3 << 8) | (3 << 16), | 522 | __raw_writel((3 << 2) | (3 << 4) | (3 << 6) | (3 << 8) | (3 << 16), |
523 | CCM_BASE + CCM_CGR1); | 523 | CCM_BASE + CCM_CGR1); |
524 | __raw_writel(cgr2, CCM_BASE + CCM_CGR2); | ||
525 | __raw_writel(0, CCM_BASE + CCM_CGR3); | ||
526 | |||
527 | clk_enable(&iim_clk); | ||
528 | imx_print_silicon_rev("i.MX35", mx35_revision()); | ||
529 | clk_disable(&iim_clk); | ||
524 | 530 | ||
525 | /* | 531 | /* |
526 | * Check if we came up in internal boot mode. If yes, we need some | 532 | * Check if we came up in internal boot mode. If yes, we need some |
@@ -529,17 +535,11 @@ int __init mx35_clocks_init() | |||
529 | */ | 535 | */ |
530 | if (!(__raw_readl(CCM_BASE + CCM_RCSR) & (3 << 10))) { | 536 | if (!(__raw_readl(CCM_BASE + CCM_RCSR) & (3 << 10))) { |
531 | /* Additionally turn on UART1, SCC, and IIM clocks */ | 537 | /* Additionally turn on UART1, SCC, and IIM clocks */ |
532 | cgr2 |= 3 << 16 | 3 << 4; | 538 | clk_enable(&iim_clk); |
533 | cgr3 |= 3 << 2; | 539 | clk_enable(&uart1_clk); |
540 | clk_enable(&scc_clk); | ||
534 | } | 541 | } |
535 | 542 | ||
536 | __raw_writel(cgr2, CCM_BASE + CCM_CGR2); | ||
537 | __raw_writel(cgr3, CCM_BASE + CCM_CGR3); | ||
538 | |||
539 | clk_enable(&iim_clk); | ||
540 | imx_print_silicon_rev("i.MX35", mx35_revision()); | ||
541 | clk_disable(&iim_clk); | ||
542 | |||
543 | #ifdef CONFIG_MXC_USE_EPIT | 543 | #ifdef CONFIG_MXC_USE_EPIT |
544 | epit_timer_init(&epit1_clk, | 544 | epit_timer_init(&epit1_clk, |
545 | MX35_IO_ADDRESS(MX35_EPIT1_BASE_ADDR), MX35_INT_EPIT1); | 545 | MX35_IO_ADDRESS(MX35_EPIT1_BASE_ADDR), MX35_INT_EPIT1); |
diff --git a/arch/arm/mach-imx/clock-imx6q.c b/arch/arm/mach-imx/clock-imx6q.c index 039a7abb165a..9273c2a24b54 100644 --- a/arch/arm/mach-imx/clock-imx6q.c +++ b/arch/arm/mach-imx/clock-imx6q.c | |||
@@ -1931,14 +1931,12 @@ int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode) | |||
1931 | val |= 0x1 << BP_CLPCR_LPM; | 1931 | val |= 0x1 << BP_CLPCR_LPM; |
1932 | val &= ~BM_CLPCR_VSTBY; | 1932 | val &= ~BM_CLPCR_VSTBY; |
1933 | val &= ~BM_CLPCR_SBYOS; | 1933 | val &= ~BM_CLPCR_SBYOS; |
1934 | val |= BM_CLPCR_BYP_MMDC_CH1_LPM_HS; | ||
1935 | break; | 1934 | break; |
1936 | case STOP_POWER_OFF: | 1935 | case STOP_POWER_OFF: |
1937 | val |= 0x2 << BP_CLPCR_LPM; | 1936 | val |= 0x2 << BP_CLPCR_LPM; |
1938 | val |= 0x3 << BP_CLPCR_STBY_COUNT; | 1937 | val |= 0x3 << BP_CLPCR_STBY_COUNT; |
1939 | val |= BM_CLPCR_VSTBY; | 1938 | val |= BM_CLPCR_VSTBY; |
1940 | val |= BM_CLPCR_SBYOS; | 1939 | val |= BM_CLPCR_SBYOS; |
1941 | val |= BM_CLPCR_BYP_MMDC_CH1_LPM_HS; | ||
1942 | break; | 1940 | break; |
1943 | default: | 1941 | default: |
1944 | return -EINVAL; | 1942 | return -EINVAL; |
diff --git a/arch/arm/mach-imx/mach-apf9328.c b/arch/arm/mach-imx/mach-apf9328.c index c71dbcc37b11..f4a63ee9e217 100644 --- a/arch/arm/mach-imx/mach-apf9328.c +++ b/arch/arm/mach-imx/mach-apf9328.c | |||
@@ -149,4 +149,5 @@ MACHINE_START(APF9328, "Armadeus APF9328") | |||
149 | .handle_irq = imx1_handle_irq, | 149 | .handle_irq = imx1_handle_irq, |
150 | .timer = &apf9328_timer, | 150 | .timer = &apf9328_timer, |
151 | .init_machine = apf9328_init, | 151 | .init_machine = apf9328_init, |
152 | .restart = mxc_restart, | ||
152 | MACHINE_END | 153 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-armadillo5x0.c b/arch/arm/mach-imx/mach-armadillo5x0.c index c9a9cf67755e..e4f426a09899 100644 --- a/arch/arm/mach-imx/mach-armadillo5x0.c +++ b/arch/arm/mach-imx/mach-armadillo5x0.c | |||
@@ -561,4 +561,5 @@ MACHINE_START(ARMADILLO5X0, "Armadillo-500") | |||
561 | .handle_irq = imx31_handle_irq, | 561 | .handle_irq = imx31_handle_irq, |
562 | .timer = &armadillo5x0_timer, | 562 | .timer = &armadillo5x0_timer, |
563 | .init_machine = armadillo5x0_init, | 563 | .init_machine = armadillo5x0_init, |
564 | .restart = mxc_restart, | ||
564 | MACHINE_END | 565 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-bug.c b/arch/arm/mach-imx/mach-bug.c index 313f62ddc1ef..9a9897749dd6 100644 --- a/arch/arm/mach-imx/mach-bug.c +++ b/arch/arm/mach-imx/mach-bug.c | |||
@@ -65,4 +65,5 @@ MACHINE_START(BUG, "BugLabs BUGBase") | |||
65 | .handle_irq = imx31_handle_irq, | 65 | .handle_irq = imx31_handle_irq, |
66 | .timer = &bug_timer, | 66 | .timer = &bug_timer, |
67 | .init_machine = bug_board_init, | 67 | .init_machine = bug_board_init, |
68 | .restart = mxc_restart, | ||
68 | MACHINE_END | 69 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-cpuimx27.c b/arch/arm/mach-imx/mach-cpuimx27.c index edb373052576..d085aea08709 100644 --- a/arch/arm/mach-imx/mach-cpuimx27.c +++ b/arch/arm/mach-imx/mach-cpuimx27.c | |||
@@ -318,4 +318,5 @@ MACHINE_START(EUKREA_CPUIMX27, "EUKREA CPUIMX27") | |||
318 | .handle_irq = imx27_handle_irq, | 318 | .handle_irq = imx27_handle_irq, |
319 | .timer = &eukrea_cpuimx27_timer, | 319 | .timer = &eukrea_cpuimx27_timer, |
320 | .init_machine = eukrea_cpuimx27_init, | 320 | .init_machine = eukrea_cpuimx27_init, |
321 | .restart = mxc_restart, | ||
321 | MACHINE_END | 322 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-cpuimx35.c b/arch/arm/mach-imx/mach-cpuimx35.c index 66af2e8f7e57..8ecc872b2547 100644 --- a/arch/arm/mach-imx/mach-cpuimx35.c +++ b/arch/arm/mach-imx/mach-cpuimx35.c | |||
@@ -53,12 +53,18 @@ static const struct imxi2c_platform_data | |||
53 | .bitrate = 100000, | 53 | .bitrate = 100000, |
54 | }; | 54 | }; |
55 | 55 | ||
56 | #define TSC2007_IRQGPIO IMX_GPIO_NR(3, 2) | ||
57 | static int tsc2007_get_pendown_state(void) | ||
58 | { | ||
59 | return !gpio_get_value(TSC2007_IRQGPIO); | ||
60 | } | ||
61 | |||
56 | static struct tsc2007_platform_data tsc2007_info = { | 62 | static struct tsc2007_platform_data tsc2007_info = { |
57 | .model = 2007, | 63 | .model = 2007, |
58 | .x_plate_ohms = 180, | 64 | .x_plate_ohms = 180, |
65 | .get_pendown_state = tsc2007_get_pendown_state, | ||
59 | }; | 66 | }; |
60 | 67 | ||
61 | #define TSC2007_IRQGPIO IMX_GPIO_NR(3, 2) | ||
62 | static struct i2c_board_info eukrea_cpuimx35_i2c_devices[] = { | 68 | static struct i2c_board_info eukrea_cpuimx35_i2c_devices[] = { |
63 | { | 69 | { |
64 | I2C_BOARD_INFO("pcf8563", 0x51), | 70 | I2C_BOARD_INFO("pcf8563", 0x51), |
@@ -201,4 +207,5 @@ MACHINE_START(EUKREA_CPUIMX35SD, "Eukrea CPUIMX35") | |||
201 | .handle_irq = imx35_handle_irq, | 207 | .handle_irq = imx35_handle_irq, |
202 | .timer = &eukrea_cpuimx35_timer, | 208 | .timer = &eukrea_cpuimx35_timer, |
203 | .init_machine = eukrea_cpuimx35_init, | 209 | .init_machine = eukrea_cpuimx35_init, |
210 | .restart = mxc_restart, | ||
204 | MACHINE_END | 211 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-eukrea_cpuimx25.c b/arch/arm/mach-imx/mach-eukrea_cpuimx25.c index ab8fbcc472b5..76a97a598b9e 100644 --- a/arch/arm/mach-imx/mach-eukrea_cpuimx25.c +++ b/arch/arm/mach-imx/mach-eukrea_cpuimx25.c | |||
@@ -170,4 +170,5 @@ MACHINE_START(EUKREA_CPUIMX25SD, "Eukrea CPUIMX25") | |||
170 | .handle_irq = imx25_handle_irq, | 170 | .handle_irq = imx25_handle_irq, |
171 | .timer = &eukrea_cpuimx25_timer, | 171 | .timer = &eukrea_cpuimx25_timer, |
172 | .init_machine = eukrea_cpuimx25_init, | 172 | .init_machine = eukrea_cpuimx25_init, |
173 | .restart = mxc_restart, | ||
173 | MACHINE_END | 174 | 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 38eb9e45110b..c2766ae02b4f 100644 --- a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c +++ b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c | |||
@@ -282,4 +282,5 @@ MACHINE_START(IMX27_VISSTRIM_M10, "Vista Silicon Visstrim_M10") | |||
282 | .handle_irq = imx27_handle_irq, | 282 | .handle_irq = imx27_handle_irq, |
283 | .timer = &visstrim_m10_timer, | 283 | .timer = &visstrim_m10_timer, |
284 | .init_machine = visstrim_m10_board_init, | 284 | .init_machine = visstrim_m10_board_init, |
285 | .restart = mxc_restart, | ||
285 | MACHINE_END | 286 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-imx27ipcam.c b/arch/arm/mach-imx/mach-imx27ipcam.c index 7052155d0557..c9d350c5dcc8 100644 --- a/arch/arm/mach-imx/mach-imx27ipcam.c +++ b/arch/arm/mach-imx/mach-imx27ipcam.c | |||
@@ -78,4 +78,5 @@ MACHINE_START(IMX27IPCAM, "Freescale IMX27IPCAM") | |||
78 | .handle_irq = imx27_handle_irq, | 78 | .handle_irq = imx27_handle_irq, |
79 | .timer = &mx27ipcam_timer, | 79 | .timer = &mx27ipcam_timer, |
80 | .init_machine = mx27ipcam_init, | 80 | .init_machine = mx27ipcam_init, |
81 | .restart = mxc_restart, | ||
81 | MACHINE_END | 82 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-imx27lite.c b/arch/arm/mach-imx/mach-imx27lite.c index 8d6a63521f17..1f45b9189229 100644 --- a/arch/arm/mach-imx/mach-imx27lite.c +++ b/arch/arm/mach-imx/mach-imx27lite.c | |||
@@ -84,4 +84,5 @@ MACHINE_START(IMX27LITE, "LogicPD i.MX27LITE") | |||
84 | .handle_irq = imx27_handle_irq, | 84 | .handle_irq = imx27_handle_irq, |
85 | .timer = &mx27lite_timer, | 85 | .timer = &mx27lite_timer, |
86 | .init_machine = mx27lite_init, | 86 | .init_machine = mx27lite_init, |
87 | .restart = mxc_restart, | ||
87 | MACHINE_END | 88 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index bee633496f7b..c25728106917 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c | |||
@@ -10,10 +10,13 @@ | |||
10 | * http://www.gnu.org/copyleft/gpl.html | 10 | * http://www.gnu.org/copyleft/gpl.html |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/delay.h> | ||
13 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/io.h> | ||
14 | #include <linux/irq.h> | 16 | #include <linux/irq.h> |
15 | #include <linux/irqdomain.h> | 17 | #include <linux/irqdomain.h> |
16 | #include <linux/of.h> | 18 | #include <linux/of.h> |
19 | #include <linux/of_address.h> | ||
17 | #include <linux/of_irq.h> | 20 | #include <linux/of_irq.h> |
18 | #include <linux/of_platform.h> | 21 | #include <linux/of_platform.h> |
19 | #include <linux/phy.h> | 22 | #include <linux/phy.h> |
@@ -25,6 +28,36 @@ | |||
25 | #include <mach/common.h> | 28 | #include <mach/common.h> |
26 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
27 | 30 | ||
31 | void imx6q_restart(char mode, const char *cmd) | ||
32 | { | ||
33 | struct device_node *np; | ||
34 | void __iomem *wdog_base; | ||
35 | |||
36 | np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-wdt"); | ||
37 | wdog_base = of_iomap(np, 0); | ||
38 | if (!wdog_base) | ||
39 | goto soft; | ||
40 | |||
41 | imx_src_prepare_restart(); | ||
42 | |||
43 | /* enable wdog */ | ||
44 | writew_relaxed(1 << 2, wdog_base); | ||
45 | /* write twice to ensure the request will not get ignored */ | ||
46 | writew_relaxed(1 << 2, wdog_base); | ||
47 | |||
48 | /* wait for reset to assert ... */ | ||
49 | mdelay(500); | ||
50 | |||
51 | pr_err("Watchdog reset failed to assert reset\n"); | ||
52 | |||
53 | /* delay to allow the serial port to show the message */ | ||
54 | mdelay(50); | ||
55 | |||
56 | soft: | ||
57 | /* we'll take a jump through zero as a poor second */ | ||
58 | soft_restart(0); | ||
59 | } | ||
60 | |||
28 | /* For imx6q sabrelite board: set KSZ9021RN RGMII pad skew */ | 61 | /* For imx6q sabrelite board: set KSZ9021RN RGMII pad skew */ |
29 | static int ksz9021rn_phy_fixup(struct phy_device *phydev) | 62 | static int ksz9021rn_phy_fixup(struct phy_device *phydev) |
30 | { | 63 | { |
@@ -105,4 +138,5 @@ DT_MACHINE_START(IMX6Q, "Freescale i.MX6 Quad (Device Tree)") | |||
105 | .timer = &imx6q_timer, | 138 | .timer = &imx6q_timer, |
106 | .init_machine = imx6q_init_machine, | 139 | .init_machine = imx6q_init_machine, |
107 | .dt_compat = imx6q_dt_compat, | 140 | .dt_compat = imx6q_dt_compat, |
141 | .restart = imx6q_restart, | ||
108 | MACHINE_END | 142 | 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 5f37f89e40fa..fc78e8071cd1 100644 --- a/arch/arm/mach-imx/mach-kzm_arm11_01.c +++ b/arch/arm/mach-imx/mach-kzm_arm11_01.c | |||
@@ -279,4 +279,5 @@ MACHINE_START(KZM_ARM11_01, "Kyoto Microcomputer Co., Ltd. KZM-ARM11-01") | |||
279 | .handle_irq = imx31_handle_irq, | 279 | .handle_irq = imx31_handle_irq, |
280 | .timer = &kzm_timer, | 280 | .timer = &kzm_timer, |
281 | .init_machine = kzm_board_init, | 281 | .init_machine = kzm_board_init, |
282 | .restart = mxc_restart, | ||
282 | MACHINE_END | 283 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx1ads.c b/arch/arm/mach-imx/mach-mx1ads.c index fc49785e7340..97046088ff1a 100644 --- a/arch/arm/mach-imx/mach-mx1ads.c +++ b/arch/arm/mach-imx/mach-mx1ads.c | |||
@@ -147,6 +147,7 @@ MACHINE_START(MX1ADS, "Freescale MX1ADS") | |||
147 | .handle_irq = imx1_handle_irq, | 147 | .handle_irq = imx1_handle_irq, |
148 | .timer = &mx1ads_timer, | 148 | .timer = &mx1ads_timer, |
149 | .init_machine = mx1ads_init, | 149 | .init_machine = mx1ads_init, |
150 | .restart = mxc_restart, | ||
150 | MACHINE_END | 151 | MACHINE_END |
151 | 152 | ||
152 | MACHINE_START(MXLADS, "Freescale MXLADS") | 153 | MACHINE_START(MXLADS, "Freescale MXLADS") |
@@ -157,4 +158,5 @@ MACHINE_START(MXLADS, "Freescale MXLADS") | |||
157 | .handle_irq = imx1_handle_irq, | 158 | .handle_irq = imx1_handle_irq, |
158 | .timer = &mx1ads_timer, | 159 | .timer = &mx1ads_timer, |
159 | .init_machine = mx1ads_init, | 160 | .init_machine = mx1ads_init, |
161 | .restart = mxc_restart, | ||
160 | MACHINE_END | 162 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx21ads.c b/arch/arm/mach-imx/mach-mx21ads.c index 25f84028d055..8d9f95514b1f 100644 --- a/arch/arm/mach-imx/mach-mx21ads.c +++ b/arch/arm/mach-imx/mach-mx21ads.c | |||
@@ -312,4 +312,5 @@ MACHINE_START(MX21ADS, "Freescale i.MX21ADS") | |||
312 | .handle_irq = imx21_handle_irq, | 312 | .handle_irq = imx21_handle_irq, |
313 | .timer = &mx21ads_timer, | 313 | .timer = &mx21ads_timer, |
314 | .init_machine = mx21ads_board_init, | 314 | .init_machine = mx21ads_board_init, |
315 | .restart = mxc_restart, | ||
315 | MACHINE_END | 316 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx25_3ds.c b/arch/arm/mach-imx/mach-mx25_3ds.c index 88dccf122243..f26734298aa6 100644 --- a/arch/arm/mach-imx/mach-mx25_3ds.c +++ b/arch/arm/mach-imx/mach-mx25_3ds.c | |||
@@ -270,4 +270,5 @@ MACHINE_START(MX25_3DS, "Freescale MX25PDK (3DS)") | |||
270 | .handle_irq = imx25_handle_irq, | 270 | .handle_irq = imx25_handle_irq, |
271 | .timer = &mx25pdk_timer, | 271 | .timer = &mx25pdk_timer, |
272 | .init_machine = mx25pdk_init, | 272 | .init_machine = mx25pdk_init, |
273 | .restart = mxc_restart, | ||
273 | MACHINE_END | 274 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx27_3ds.c b/arch/arm/mach-imx/mach-mx27_3ds.c index ba232d79fa81..18f35816706a 100644 --- a/arch/arm/mach-imx/mach-mx27_3ds.c +++ b/arch/arm/mach-imx/mach-mx27_3ds.c | |||
@@ -425,4 +425,5 @@ MACHINE_START(MX27_3DS, "Freescale MX27PDK") | |||
425 | .handle_irq = imx27_handle_irq, | 425 | .handle_irq = imx27_handle_irq, |
426 | .timer = &mx27pdk_timer, | 426 | .timer = &mx27pdk_timer, |
427 | .init_machine = mx27pdk_init, | 427 | .init_machine = mx27pdk_init, |
428 | .restart = mxc_restart, | ||
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 74dd5731eb61..0228d2e07fe0 100644 --- a/arch/arm/mach-imx/mach-mx27ads.c +++ b/arch/arm/mach-imx/mach-mx27ads.c | |||
@@ -351,4 +351,5 @@ MACHINE_START(MX27ADS, "Freescale i.MX27ADS") | |||
351 | .handle_irq = imx27_handle_irq, | 351 | .handle_irq = imx27_handle_irq, |
352 | .timer = &mx27ads_timer, | 352 | .timer = &mx27ads_timer, |
353 | .init_machine = mx27ads_board_init, | 353 | .init_machine = mx27ads_board_init, |
354 | .restart = mxc_restart, | ||
354 | MACHINE_END | 355 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx31_3ds.c b/arch/arm/mach-imx/mach-mx31_3ds.c index 00bb308ce1cd..89c33258639f 100644 --- a/arch/arm/mach-imx/mach-mx31_3ds.c +++ b/arch/arm/mach-imx/mach-mx31_3ds.c | |||
@@ -770,4 +770,5 @@ MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)") | |||
770 | .timer = &mx31_3ds_timer, | 770 | .timer = &mx31_3ds_timer, |
771 | .init_machine = mx31_3ds_init, | 771 | .init_machine = mx31_3ds_init, |
772 | .reserve = mx31_3ds_reserve, | 772 | .reserve = mx31_3ds_reserve, |
773 | .restart = mxc_restart, | ||
773 | MACHINE_END | 774 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx31ads.c b/arch/arm/mach-imx/mach-mx31ads.c index 9cc1a49053bb..4917aab0e253 100644 --- a/arch/arm/mach-imx/mach-mx31ads.c +++ b/arch/arm/mach-imx/mach-mx31ads.c | |||
@@ -542,4 +542,5 @@ MACHINE_START(MX31ADS, "Freescale MX31ADS") | |||
542 | .handle_irq = imx31_handle_irq, | 542 | .handle_irq = imx31_handle_irq, |
543 | .timer = &mx31ads_timer, | 543 | .timer = &mx31ads_timer, |
544 | .init_machine = mx31ads_init, | 544 | .init_machine = mx31ads_init, |
545 | .restart = mxc_restart, | ||
545 | MACHINE_END | 546 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx31lilly.c b/arch/arm/mach-imx/mach-mx31lilly.c index 102ec99357cc..02401bbd6d53 100644 --- a/arch/arm/mach-imx/mach-mx31lilly.c +++ b/arch/arm/mach-imx/mach-mx31lilly.c | |||
@@ -303,4 +303,5 @@ MACHINE_START(LILLY1131, "INCO startec LILLY-1131") | |||
303 | .handle_irq = imx31_handle_irq, | 303 | .handle_irq = imx31_handle_irq, |
304 | .timer = &mx31lilly_timer, | 304 | .timer = &mx31lilly_timer, |
305 | .init_machine = mx31lilly_board_init, | 305 | .init_machine = mx31lilly_board_init, |
306 | .restart = mxc_restart, | ||
306 | MACHINE_END | 307 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx31lite.c b/arch/arm/mach-imx/mach-mx31lite.c index 5366d2de18fd..ef80751712e7 100644 --- a/arch/arm/mach-imx/mach-mx31lite.c +++ b/arch/arm/mach-imx/mach-mx31lite.c | |||
@@ -287,4 +287,5 @@ MACHINE_START(MX31LITE, "LogicPD i.MX31 SOM") | |||
287 | .handle_irq = imx31_handle_irq, | 287 | .handle_irq = imx31_handle_irq, |
288 | .timer = &mx31lite_timer, | 288 | .timer = &mx31lite_timer, |
289 | .init_machine = mx31lite_init, | 289 | .init_machine = mx31lite_init, |
290 | .restart = mxc_restart, | ||
290 | MACHINE_END | 291 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx31moboard.c b/arch/arm/mach-imx/mach-mx31moboard.c index 93269150309c..b95981dacb2b 100644 --- a/arch/arm/mach-imx/mach-mx31moboard.c +++ b/arch/arm/mach-imx/mach-mx31moboard.c | |||
@@ -600,4 +600,5 @@ MACHINE_START(MX31MOBOARD, "EPFL Mobots mx31moboard") | |||
600 | .handle_irq = imx31_handle_irq, | 600 | .handle_irq = imx31_handle_irq, |
601 | .timer = &mx31moboard_timer, | 601 | .timer = &mx31moboard_timer, |
602 | .init_machine = mx31moboard_init, | 602 | .init_machine = mx31moboard_init, |
603 | .restart = mxc_restart, | ||
603 | MACHINE_END | 604 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx35_3ds.c b/arch/arm/mach-imx/mach-mx35_3ds.c index 7a462025a0f7..0af6c9c5b3fd 100644 --- a/arch/arm/mach-imx/mach-mx35_3ds.c +++ b/arch/arm/mach-imx/mach-mx35_3ds.c | |||
@@ -224,4 +224,5 @@ MACHINE_START(MX35_3DS, "Freescale MX35PDK") | |||
224 | .handle_irq = imx35_handle_irq, | 224 | .handle_irq = imx35_handle_irq, |
225 | .timer = &mx35pdk_timer, | 225 | .timer = &mx35pdk_timer, |
226 | .init_machine = mx35_3ds_init, | 226 | .init_machine = mx35_3ds_init, |
227 | .restart = mxc_restart, | ||
227 | MACHINE_END | 228 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mxt_td60.c b/arch/arm/mach-imx/mach-mxt_td60.c index 125c19643b0f..8b3d3f07d894 100644 --- a/arch/arm/mach-imx/mach-mxt_td60.c +++ b/arch/arm/mach-imx/mach-mxt_td60.c | |||
@@ -274,4 +274,5 @@ MACHINE_START(MXT_TD60, "Maxtrack i-MXT TD60") | |||
274 | .handle_irq = imx27_handle_irq, | 274 | .handle_irq = imx27_handle_irq, |
275 | .timer = &mxt_td60_timer, | 275 | .timer = &mxt_td60_timer, |
276 | .init_machine = mxt_td60_board_init, | 276 | .init_machine = mxt_td60_board_init, |
277 | .restart = mxc_restart, | ||
277 | MACHINE_END | 278 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-pca100.c b/arch/arm/mach-imx/mach-pca100.c index 26072f4b02e3..d3b9c6b5edde 100644 --- a/arch/arm/mach-imx/mach-pca100.c +++ b/arch/arm/mach-imx/mach-pca100.c | |||
@@ -442,4 +442,5 @@ MACHINE_START(PCA100, "phyCARD-i.MX27") | |||
442 | .handle_irq = imx27_handle_irq, | 442 | .handle_irq = imx27_handle_irq, |
443 | .init_machine = pca100_init, | 443 | .init_machine = pca100_init, |
444 | .timer = &pca100_timer, | 444 | .timer = &pca100_timer, |
445 | .restart = mxc_restart, | ||
445 | MACHINE_END | 446 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-pcm037.c b/arch/arm/mach-imx/mach-pcm037.c index efd6b536ef6a..d7e151669ed3 100644 --- a/arch/arm/mach-imx/mach-pcm037.c +++ b/arch/arm/mach-imx/mach-pcm037.c | |||
@@ -696,4 +696,5 @@ MACHINE_START(PCM037, "Phytec Phycore pcm037") | |||
696 | .handle_irq = imx31_handle_irq, | 696 | .handle_irq = imx31_handle_irq, |
697 | .timer = &pcm037_timer, | 697 | .timer = &pcm037_timer, |
698 | .init_machine = pcm037_init, | 698 | .init_machine = pcm037_init, |
699 | .restart = mxc_restart, | ||
699 | MACHINE_END | 700 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-pcm038.c b/arch/arm/mach-imx/mach-pcm038.c index a17e9c7dfca0..16f126da9f8f 100644 --- a/arch/arm/mach-imx/mach-pcm038.c +++ b/arch/arm/mach-imx/mach-pcm038.c | |||
@@ -357,4 +357,5 @@ MACHINE_START(PCM038, "phyCORE-i.MX27") | |||
357 | .handle_irq = imx27_handle_irq, | 357 | .handle_irq = imx27_handle_irq, |
358 | .timer = &pcm038_timer, | 358 | .timer = &pcm038_timer, |
359 | .init_machine = pcm038_init, | 359 | .init_machine = pcm038_init, |
360 | .restart = mxc_restart, | ||
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 7366c2ae3ea5..06dc106519ae 100644 --- a/arch/arm/mach-imx/mach-pcm043.c +++ b/arch/arm/mach-imx/mach-pcm043.c | |||
@@ -425,4 +425,5 @@ MACHINE_START(PCM043, "Phytec Phycore pcm043") | |||
425 | .handle_irq = imx35_handle_irq, | 425 | .handle_irq = imx35_handle_irq, |
426 | .timer = &pcm043_timer, | 426 | .timer = &pcm043_timer, |
427 | .init_machine = pcm043_init, | 427 | .init_machine = pcm043_init, |
428 | .restart = mxc_restart, | ||
428 | MACHINE_END | 429 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-qong.c b/arch/arm/mach-imx/mach-qong.c index 4ff5faf102a8..260621055b6b 100644 --- a/arch/arm/mach-imx/mach-qong.c +++ b/arch/arm/mach-imx/mach-qong.c | |||
@@ -273,4 +273,5 @@ MACHINE_START(QONG, "Dave/DENX QongEVB-LITE") | |||
273 | .handle_irq = imx31_handle_irq, | 273 | .handle_irq = imx31_handle_irq, |
274 | .timer = &qong_timer, | 274 | .timer = &qong_timer, |
275 | .init_machine = qong_init, | 275 | .init_machine = qong_init, |
276 | .restart = mxc_restart, | ||
276 | MACHINE_END | 277 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-scb9328.c b/arch/arm/mach-imx/mach-scb9328.c index bb6e5b25d8d0..cb9ceae2f648 100644 --- a/arch/arm/mach-imx/mach-scb9328.c +++ b/arch/arm/mach-imx/mach-scb9328.c | |||
@@ -144,4 +144,5 @@ MACHINE_START(SCB9328, "Synertronixx scb9328") | |||
144 | .handle_irq = imx1_handle_irq, | 144 | .handle_irq = imx1_handle_irq, |
145 | .timer = &scb9328_timer, | 145 | .timer = &scb9328_timer, |
146 | .init_machine = scb9328_init, | 146 | .init_machine = scb9328_init, |
147 | .restart = mxc_restart, | ||
147 | MACHINE_END | 148 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-vpr200.c b/arch/arm/mach-imx/mach-vpr200.c index 69092458f2d9..033257e553ef 100644 --- a/arch/arm/mach-imx/mach-vpr200.c +++ b/arch/arm/mach-imx/mach-vpr200.c | |||
@@ -322,4 +322,5 @@ MACHINE_START(VPR200, "VPR200") | |||
322 | .handle_irq = imx35_handle_irq, | 322 | .handle_irq = imx35_handle_irq, |
323 | .timer = &vpr200_timer, | 323 | .timer = &vpr200_timer, |
324 | .init_machine = vpr200_board_init, | 324 | .init_machine = vpr200_board_init, |
325 | .restart = mxc_restart, | ||
325 | MACHINE_END | 326 | MACHINE_END |
diff --git a/arch/arm/mach-imx/src.c b/arch/arm/mach-imx/src.c index a8e33681b732..4bde04f99e38 100644 --- a/arch/arm/mach-imx/src.c +++ b/arch/arm/mach-imx/src.c | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | #define SRC_SCR 0x000 | 20 | #define SRC_SCR 0x000 |
21 | #define SRC_GPR1 0x020 | 21 | #define SRC_GPR1 0x020 |
22 | #define BP_SRC_SCR_WARM_RESET_ENABLE 0 | ||
22 | #define BP_SRC_SCR_CORE1_RST 14 | 23 | #define BP_SRC_SCR_CORE1_RST 14 |
23 | #define BP_SRC_SCR_CORE1_ENABLE 22 | 24 | #define BP_SRC_SCR_CORE1_ENABLE 22 |
24 | 25 | ||
@@ -46,11 +47,33 @@ void imx_set_cpu_jump(int cpu, void *jump_addr) | |||
46 | src_base + SRC_GPR1 + cpu * 8); | 47 | src_base + SRC_GPR1 + cpu * 8); |
47 | } | 48 | } |
48 | 49 | ||
50 | void imx_src_prepare_restart(void) | ||
51 | { | ||
52 | u32 val; | ||
53 | |||
54 | /* clear enable bits of secondary cores */ | ||
55 | val = readl_relaxed(src_base + SRC_SCR); | ||
56 | val &= ~(0x7 << BP_SRC_SCR_CORE1_ENABLE); | ||
57 | writel_relaxed(val, src_base + SRC_SCR); | ||
58 | |||
59 | /* clear persistent entry register of primary core */ | ||
60 | writel_relaxed(0, src_base + SRC_GPR1); | ||
61 | } | ||
62 | |||
49 | void __init imx_src_init(void) | 63 | void __init imx_src_init(void) |
50 | { | 64 | { |
51 | struct device_node *np; | 65 | struct device_node *np; |
66 | u32 val; | ||
52 | 67 | ||
53 | np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-src"); | 68 | np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-src"); |
54 | src_base = of_iomap(np, 0); | 69 | src_base = of_iomap(np, 0); |
55 | WARN_ON(!src_base); | 70 | WARN_ON(!src_base); |
71 | |||
72 | /* | ||
73 | * force warm reset sources to generate cold reset | ||
74 | * for a more reliable restart | ||
75 | */ | ||
76 | val = readl_relaxed(src_base + SRC_SCR); | ||
77 | val &= ~(1 << BP_SRC_SCR_WARM_RESET_ENABLE); | ||
78 | writel_relaxed(val, src_base + SRC_SCR); | ||
56 | } | 79 | } |