From 54a06dde40f6a01e323d49390d78b8c9f1dfacc0 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Wed, 13 Aug 2014 13:45:00 +0200 Subject: [PATCH 01/11] ARM: shmobile: r8a7778: Add missing call to shmobile_init_late() Add the missing call to shmobile_init_late() to r8a7778_init_late(). This should make sure Suspend-to-RAM and CPUIdle are setup as expected on bockw. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/setup-r8a7778.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c index f00a488dcf43..383e43bf1cb6 100644 --- a/arch/arm/mach-shmobile/setup-r8a7778.c +++ b/arch/arm/mach-shmobile/setup-r8a7778.c @@ -520,6 +520,7 @@ void __init r8a7778_add_standard_devices(void) void __init r8a7778_init_late(void) { + shmobile_init_late(); platform_device_register_full(&ehci_info); platform_device_register_full(&ohci_info); } From e604d80971e65c7ae895a4b38caed3838cf07554 Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Thu, 31 Jul 2014 08:32:15 +0900 Subject: [PATCH 02/11] ARM: shmobile: sh73a0: Add shmobile_init_late() Extend sh73a0 SoC 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/setup-sh73a0.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c index 2c802ae9b241..002291881eb3 100644 --- a/arch/arm/mach-shmobile/setup-sh73a0.c +++ b/arch/arm/mach-shmobile/setup-sh73a0.c @@ -799,6 +799,7 @@ DT_MACHINE_START(SH73A0_DT, "Generic SH73A0 (Flattened Device Tree)") .init_early = sh73a0_init_delay, .nr_irqs = NR_IRQS_LEGACY, .init_machine = sh73a0_add_standard_devices_dt, + .init_late = shmobile_init_late, .dt_compat = sh73a0_boards_compat_dt, MACHINE_END #endif /* CONFIG_USE_OF */ From d5b00b90705d5fff53f611ba4746d79fedbb52be Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Thu, 31 Jul 2014 08:32:33 +0900 Subject: [PATCH 03/11] ARM: shmobile: r8a7779: Fix shmobile_init_late() Fix r8a7779 SoC machine vector to include shmobile_init_late() so Suspend-to-RAM and CPUIdle are setup and platform devices are omitted as expected. Signed-off-by: Magnus Damm Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/setup-r8a7779.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c index 236c1befb9e3..6875a9fe28c2 100644 --- a/arch/arm/mach-shmobile/setup-r8a7779.c +++ b/arch/arm/mach-shmobile/setup-r8a7779.c @@ -774,7 +774,7 @@ DT_MACHINE_START(R8A7779_DT, "Generic R8A7779 (Flattened Device Tree)") .nr_irqs = NR_IRQS_LEGACY, .init_irq = r8a7779_init_irq_dt, .init_machine = r8a7779_add_standard_devices_dt, - .init_late = r8a7779_init_late, + .init_late = shmobile_init_late, .dt_compat = r8a7779_compat_dt, MACHINE_END #endif /* CONFIG_USE_OF */ From 7759a7a8e9b07a9046c1bdb2cd4c9ce197280392 Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Thu, 31 Jul 2014 08:32:50 +0900 Subject: [PATCH 04/11] ARM: shmobile: r8a7778: Fix shmobile_init_late() Fix r8a7778 SoC machine vector to include shmobile_init_late() so Suspend-to-RAM and CPUIdle are setup and platform devices are omitted as expected. Signed-off-by: Magnus Damm Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/setup-r8a7778.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c index 383e43bf1cb6..e1a477bce447 100644 --- a/arch/arm/mach-shmobile/setup-r8a7778.c +++ b/arch/arm/mach-shmobile/setup-r8a7778.c @@ -610,8 +610,8 @@ static const char *r8a7778_compat_dt[] __initdata = { DT_MACHINE_START(R8A7778_DT, "Generic R8A7778 (Flattened Device Tree)") .init_early = r8a7778_init_delay, .init_irq = r8a7778_init_irq_dt, + .init_late = shmobile_init_late, .dt_compat = r8a7778_compat_dt, - .init_late = r8a7778_init_late, MACHINE_END #endif /* CONFIG_USE_OF */ From 0592d1b5d296b0b6a24b7e48b7b48662164d3117 Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Thu, 31 Jul 2014 08:33:08 +0900 Subject: [PATCH 05/11] ARM: shmobile: r8a73a4: Add shmobile_init_late() Extend r8a73a4 SoC 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/setup-r8a73a4.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-shmobile/setup-r8a73a4.c b/arch/arm/mach-shmobile/setup-r8a73a4.c index 6683072a9d98..6fbcdcc39d53 100644 --- a/arch/arm/mach-shmobile/setup-r8a73a4.c +++ b/arch/arm/mach-shmobile/setup-r8a73a4.c @@ -311,6 +311,7 @@ static const char *r8a73a4_boards_compat_dt[] __initdata = { DT_MACHINE_START(R8A73A4_DT, "Generic R8A73A4 (Flattened Device Tree)") .init_early = r8a73a4_init_early, + .init_late = shmobile_init_late, .dt_compat = r8a73a4_boards_compat_dt, MACHINE_END #endif /* CONFIG_USE_OF */ From 9b0fd79af38cb1d68f5faf4fb528713116480e9f Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Thu, 31 Jul 2014 08:33:26 +0900 Subject: [PATCH 06/11] ARM: shmobile: r7s72100: Add shmobile_init_late() Extend r7s72100 SoC 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/setup-r7s72100.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-shmobile/setup-r7s72100.c b/arch/arm/mach-shmobile/setup-r7s72100.c index f3b3b14ba972..8cdc25d146a9 100644 --- a/arch/arm/mach-shmobile/setup-r7s72100.c +++ b/arch/arm/mach-shmobile/setup-r7s72100.c @@ -53,6 +53,7 @@ static const char *r7s72100_boards_compat_dt[] __initdata = { DT_MACHINE_START(R7S72100_DT, "Generic R7S72100 (Flattened Device Tree)") .init_early = shmobile_init_delay, + .init_late = shmobile_init_late, .dt_compat = r7s72100_boards_compat_dt, MACHINE_END #endif /* CONFIG_USE_OF */ From f2acab52e77650044b0772a6d7abbfef1eb4cede Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Thu, 31 Jul 2014 09:25:15 +0900 Subject: [PATCH 07/11] ARM: shmobile: Rework multiplatform include workaround Now when the majority of the include files have moved from arch/arm/mach-shmobile/include/mach/ to arch/arm/mach-shmobile/ remove the header include file workaround in the Makefile... ... and add another workaround in irqs.h to cope with the fact that needs to be where it is until the PFC code has been updated to remove legacy non-DT interfaces. Signed-off-by: Magnus Damm Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/Makefile | 2 -- arch/arm/mach-shmobile/irqs.h | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile index fe3878a1a69a..a6a1dc0335ae 100644 --- a/arch/arm/mach-shmobile/Makefile +++ b/arch/arm/mach-shmobile/Makefile @@ -2,8 +2,6 @@ # Makefile for the linux kernel. # -ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/arch/arm/mach-shmobile/include - # Common objects obj-y := timer.o console.o diff --git a/arch/arm/mach-shmobile/irqs.h b/arch/arm/mach-shmobile/irqs.h index 4ff2d2aa94f0..8e28223f1b3c 100644 --- a/arch/arm/mach-shmobile/irqs.h +++ b/arch/arm/mach-shmobile/irqs.h @@ -2,7 +2,7 @@ #define __SHMOBILE_IRQS_H #include -#include +#include "include/mach/irqs.h" /* GIC */ #define gic_spi(nr) ((nr) + 32) From fe8abe0bc2afb20b126e7e0759081dc0df2cd60d Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Tue, 5 Aug 2014 15:21:29 +0200 Subject: [PATCH 08/11] ARM: shmobile: dma: Use defines instead of hardcoded numbers Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/dma-register.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-shmobile/dma-register.h b/arch/arm/mach-shmobile/dma-register.h index 97c40bd9b94f..52a2f66e600f 100644 --- a/arch/arm/mach-shmobile/dma-register.h +++ b/arch/arm/mach-shmobile/dma-register.h @@ -52,8 +52,8 @@ static const unsigned int dma_ts_shift[] = { ((((i) & TS_LOW_BIT) << TS_LOW_SHIFT) |\ (((i) & TS_HI_BIT) << TS_HI_SHIFT)) -#define CHCR_TX(xmit_sz) (DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL((xmit_sz))) -#define CHCR_RX(xmit_sz) (DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL((xmit_sz))) +#define CHCR_TX(xmit_sz) (DM_FIX | SM_INC | RS_ERS | TS_INDEX2VAL((xmit_sz))) +#define CHCR_RX(xmit_sz) (DM_INC | SM_FIX | RS_ERS | TS_INDEX2VAL((xmit_sz))) /* From 93f05252514a8c7b6bf5a132f6b20f10215cb59c Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Fri, 8 Aug 2014 20:49:04 +0900 Subject: [PATCH 09/11] ARM: shmobile: r8a7779: Remove NR_IRQS_LEGACY Remove NR_IRQS_LEGACY from the r8a7779 generic machine vector. The generic r8a7779 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/setup-r8a7779.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c index 6875a9fe28c2..6829cd19ea72 100644 --- a/arch/arm/mach-shmobile/setup-r8a7779.c +++ b/arch/arm/mach-shmobile/setup-r8a7779.c @@ -771,7 +771,6 @@ static const char *r8a7779_compat_dt[] __initdata = { DT_MACHINE_START(R8A7779_DT, "Generic R8A7779 (Flattened Device Tree)") .map_io = r8a7779_map_io, .init_early = shmobile_init_delay, - .nr_irqs = NR_IRQS_LEGACY, .init_irq = r8a7779_init_irq_dt, .init_machine = r8a7779_add_standard_devices_dt, .init_late = shmobile_init_late, From ea2e46086969e11b759a8f2c111c9b007d1b35c9 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Wed, 13 Aug 2014 13:56:56 +0200 Subject: [PATCH 10/11] ARM: shmobile: sh7372: 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/setup-sh7372.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c index 9cdfcdfd38fc..3731eccccef4 100644 --- a/arch/arm/mach-shmobile/setup-sh7372.c +++ b/arch/arm/mach-shmobile/setup-sh7372.c @@ -1008,7 +1008,6 @@ static const char *sh7372_boards_compat_dt[] __initdata = { DT_MACHINE_START(SH7372_DT, "Generic SH7372 (Flattened Device Tree)") .map_io = sh7372_map_io, .init_early = sh7372_add_early_devices_dt, - .nr_irqs = NR_IRQS_LEGACY, .init_irq = sh7372_init_irq, .handle_irq = shmobile_handle_irq_intc, .init_machine = sh7372_add_standard_devices_dt, From 5ac9e7f35db00e630c9f95a1f73ac329371cdbbf Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Wed, 13 Aug 2014 13:56:57 +0200 Subject: [PATCH 11/11] ARM: shmobile: sh73a0: 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/setup-sh73a0.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c index 002291881eb3..e7a0296b81b1 100644 --- a/arch/arm/mach-shmobile/setup-sh73a0.c +++ b/arch/arm/mach-shmobile/setup-sh73a0.c @@ -797,7 +797,6 @@ DT_MACHINE_START(SH73A0_DT, "Generic SH73A0 (Flattened Device Tree)") .smp = smp_ops(sh73a0_smp_ops), .map_io = sh73a0_map_io, .init_early = sh73a0_init_delay, - .nr_irqs = NR_IRQS_LEGACY, .init_machine = sh73a0_add_standard_devices_dt, .init_late = shmobile_init_late, .dt_compat = sh73a0_boards_compat_dt,