From eeed09e8116f9932b55aa284d109bdea1e2ddc46 Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Thu, 31 Jul 2014 08:32:24 +0900 Subject: [PATCH 1/8] ARM: shmobile: kzm9g: Add shmobile_init_late() Extend board specific KZM9D DT reference machine vector to include shmobile_init_late() so Suspend-to-RAM and CPUIdle are setup as expected. Signed-off-by: Magnus Damm Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-kzm9g-reference.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-shmobile/board-kzm9g-reference.c b/arch/arm/mach-shmobile/board-kzm9g-reference.c index 5d2621f202d1..9ec98871e292 100644 --- a/arch/arm/mach-shmobile/board-kzm9g-reference.c +++ b/arch/arm/mach-shmobile/board-kzm9g-reference.c @@ -54,5 +54,6 @@ DT_MACHINE_START(KZM9G_DT, "kzm9g-reference") .init_early = sh73a0_init_delay, .nr_irqs = NR_IRQS_LEGACY, .init_machine = kzm_init, + .init_late = shmobile_init_late, .dt_compat = kzm9g_boards_compat_dt, MACHINE_END From b9c9281339376521d0feb78c9051fedfbb3cf111 Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Thu, 31 Jul 2014 08:32:41 +0900 Subject: [PATCH 2/8] ARM: shmobile: marzen: Add shmobile_init_late() Extend board specific Marzen DT reference machine vector to include shmobile_init_late() so Suspend-to-RAM and CPUIdle are setup as expected. Signed-off-by: Magnus Damm Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-marzen-reference.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-shmobile/board-marzen-reference.c b/arch/arm/mach-shmobile/board-marzen-reference.c index 21b3e1ca2261..9194bce1812c 100644 --- a/arch/arm/mach-shmobile/board-marzen-reference.c +++ b/arch/arm/mach-shmobile/board-marzen-reference.c @@ -67,5 +67,6 @@ DT_MACHINE_START(MARZEN, "marzen") .nr_irqs = NR_IRQS_LEGACY, .init_irq = r8a7779_init_irq_dt, .init_machine = marzen_init, + .init_late = shmobile_init_late, .dt_compat = marzen_boards_compat_dt, MACHINE_END From 6e15a3873aa9b4ab2980f781b05bfc5c99bf4b99 Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Thu, 31 Jul 2014 08:32:59 +0900 Subject: [PATCH 3/8] ARM: shmobile: bockw: Add shmobile_init_late() Extend board specific Bock-W DT reference machine vector to include shmobile_init_late() so Suspend-to-RAM and CPUIdle are setup as expected. Signed-off-by: Magnus Damm Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-bockw-reference.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-shmobile/board-bockw-reference.c b/arch/arm/mach-shmobile/board-bockw-reference.c index ba840cd333b9..9202f1641a16 100644 --- a/arch/arm/mach-shmobile/board-bockw-reference.c +++ b/arch/arm/mach-shmobile/board-bockw-reference.c @@ -83,5 +83,6 @@ DT_MACHINE_START(BOCKW_DT, "bockw") .init_early = r8a7778_init_delay, .init_irq = r8a7778_init_irq_dt, .init_machine = bockw_init, + .init_late = shmobile_init_late, .dt_compat = bockw_boards_compat_dt, MACHINE_END From 509c42a5fce00f8769f68847580ba3c4dc884218 Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Thu, 31 Jul 2014 08:33:17 +0900 Subject: [PATCH 4/8] ARM: shmobile: ape6evm: Add shmobile_init_late() Extend board specific APE6EVM reference machine vectors to include shmobile_init_late() so Suspend-to-RAM and CPUIdle are setup as expected. Signed-off-by: Magnus Damm Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-ape6evm-reference.c | 1 + arch/arm/mach-shmobile/board-ape6evm.c | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/arm/mach-shmobile/board-ape6evm-reference.c b/arch/arm/mach-shmobile/board-ape6evm-reference.c index 2f7723e5fe91..1ecda4b58828 100644 --- a/arch/arm/mach-shmobile/board-ape6evm-reference.c +++ b/arch/arm/mach-shmobile/board-ape6evm-reference.c @@ -61,5 +61,6 @@ static const char *ape6evm_boards_compat_dt[] __initdata = { DT_MACHINE_START(APE6EVM_DT, "ape6evm") .init_early = r8a73a4_init_early, .init_machine = ape6evm_add_standard_devices, + .init_late = shmobile_init_late, .dt_compat = ape6evm_boards_compat_dt, MACHINE_END diff --git a/arch/arm/mach-shmobile/board-ape6evm.c b/arch/arm/mach-shmobile/board-ape6evm.c index 1585b8830b13..befbae03a1ec 100644 --- a/arch/arm/mach-shmobile/board-ape6evm.c +++ b/arch/arm/mach-shmobile/board-ape6evm.c @@ -285,5 +285,6 @@ static const char *ape6evm_boards_compat_dt[] __initdata = { DT_MACHINE_START(APE6EVM_DT, "ape6evm") .init_early = r8a73a4_init_early, .init_machine = ape6evm_add_standard_devices, + .init_late = shmobile_init_late, .dt_compat = ape6evm_boards_compat_dt, MACHINE_END From 911f7cec78af1445d4b0f5f79907cb5bd4522ce5 Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Thu, 31 Jul 2014 08:45:00 +0900 Subject: [PATCH 5/8] ARM: shmobile: ape6evm: Use shmobile_init_delay() The r8a73a4 DTS includes CPU Frequency information so adjust the APE6EVM board code to use shmobile_init_delay() instead of relying on CPU Frequency information included in r8a73a4_init_delay() that is specified in C. Signed-off-by: Magnus Damm Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-ape6evm-reference.c | 2 +- arch/arm/mach-shmobile/board-ape6evm.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-shmobile/board-ape6evm-reference.c b/arch/arm/mach-shmobile/board-ape6evm-reference.c index 1ecda4b58828..9e99b1511a90 100644 --- a/arch/arm/mach-shmobile/board-ape6evm-reference.c +++ b/arch/arm/mach-shmobile/board-ape6evm-reference.c @@ -59,7 +59,7 @@ static const char *ape6evm_boards_compat_dt[] __initdata = { }; DT_MACHINE_START(APE6EVM_DT, "ape6evm") - .init_early = r8a73a4_init_early, + .init_early = shmobile_init_delay, .init_machine = ape6evm_add_standard_devices, .init_late = shmobile_init_late, .dt_compat = ape6evm_boards_compat_dt, diff --git a/arch/arm/mach-shmobile/board-ape6evm.c b/arch/arm/mach-shmobile/board-ape6evm.c index befbae03a1ec..b222f68d55b7 100644 --- a/arch/arm/mach-shmobile/board-ape6evm.c +++ b/arch/arm/mach-shmobile/board-ape6evm.c @@ -283,7 +283,7 @@ static const char *ape6evm_boards_compat_dt[] __initdata = { }; DT_MACHINE_START(APE6EVM_DT, "ape6evm") - .init_early = r8a73a4_init_early, + .init_early = shmobile_init_delay, .init_machine = ape6evm_add_standard_devices, .init_late = shmobile_init_late, .dt_compat = ape6evm_boards_compat_dt, From 322163c437b200b70ecb87ab102dfedce0ba0e91 Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Fri, 8 Aug 2014 20:49:13 +0900 Subject: [PATCH 6/8] ARM: shmobile: marzen: Remove NR_IRQS_LEGACY Remove NR_IRQS_LEGACY from the Marzen Reference code. The Marzen Reference machine vector requires use of Multiplatform, and in such case SPARSE_IRQ is enabled by default. This in turns means that the default value of .nr_irqs equals NR_IRQS and NR_IRQS_LEGACY. Because of this we can simply remove NR_IRQS_LEGACY and move one step closer to a cruft-free environment. Signed-off-by: Magnus Damm Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-marzen-reference.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/mach-shmobile/board-marzen-reference.c b/arch/arm/mach-shmobile/board-marzen-reference.c index 9194bce1812c..c3dfa6c89a9e 100644 --- a/arch/arm/mach-shmobile/board-marzen-reference.c +++ b/arch/arm/mach-shmobile/board-marzen-reference.c @@ -64,7 +64,6 @@ DT_MACHINE_START(MARZEN, "marzen") .map_io = r8a7779_map_io, .init_early = shmobile_init_delay, .init_time = marzen_init_timer, - .nr_irqs = NR_IRQS_LEGACY, .init_irq = r8a7779_init_irq_dt, .init_machine = marzen_init, .init_late = shmobile_init_late, From f185a01b3877880135ea73ddfcec52bd9a4d4864 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Wed, 13 Aug 2014 13:56:59 +0200 Subject: [PATCH 7/8] ARM: shmobile: kzm9g: Remove unneeded nr_irqs initialization As per arch_probe_nr_irqs(), the default value is NR_IRQS, which maps to NR_IRQS_LEGACY if CONFIG_SPARSE_IRQ=y. Since SPARSE_IRQ is selected by both ARCH_MULTIPLATFORM and ARCH_SHMOBILE_LEGACY, it's always enabled on shmobile. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-kzm9g.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c index f8bc7f8f86ad..36593cb20e57 100644 --- a/arch/arm/mach-shmobile/board-kzm9g.c +++ b/arch/arm/mach-shmobile/board-kzm9g.c @@ -910,7 +910,6 @@ DT_MACHINE_START(KZM9G_DT, "kzm9g") .smp = smp_ops(sh73a0_smp_ops), .map_io = sh73a0_map_io, .init_early = sh73a0_add_early_devices, - .nr_irqs = NR_IRQS_LEGACY, .init_irq = sh73a0_init_irq, .init_machine = kzm_init, .init_late = shmobile_init_late, From 3969d6490ba35b01f84bb12472c29c6029f7298b Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Wed, 13 Aug 2014 13:56:58 +0200 Subject: [PATCH 8/8] ARM: shmobile: kzm9g-reference: Remove unneeded nr_irqs initialization As per arch_probe_nr_irqs(), the default value is NR_IRQS, which maps to NR_IRQS_LEGACY if CONFIG_SPARSE_IRQ=y. Since SPARSE_IRQ is selected by both ARCH_MULTIPLATFORM and ARCH_SHMOBILE_LEGACY, it's always enabled on shmobile. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-kzm9g-reference.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/mach-shmobile/board-kzm9g-reference.c b/arch/arm/mach-shmobile/board-kzm9g-reference.c index 9ec98871e292..1694a1609296 100644 --- a/arch/arm/mach-shmobile/board-kzm9g-reference.c +++ b/arch/arm/mach-shmobile/board-kzm9g-reference.c @@ -52,7 +52,6 @@ DT_MACHINE_START(KZM9G_DT, "kzm9g-reference") .smp = smp_ops(sh73a0_smp_ops), .map_io = sh73a0_map_io, .init_early = sh73a0_init_delay, - .nr_irqs = NR_IRQS_LEGACY, .init_machine = kzm_init, .init_late = shmobile_init_late, .dt_compat = kzm9g_boards_compat_dt,