Commit b4e086f6 authored by Olof Johansson's avatar Olof Johansson

Merge tag 'renesas-cleanup-for-v3.13' of...

Merge tag 'renesas-cleanup-for-v3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/cleanup

From Simon Horman:
Renesas ARM based SoC cleanups for v3.13

* Constify platform data and resources of r8a7790 SoC
* Rename to r8a7790_init_delay() as r8a7790_init_early()
  - This is in preparation for doing more than just initialising the delay
* Rename r8a73a4_init_delay() as r8a73a4_init_early()
  - This is in preparation for doing more than just initialising the delay

* tag 'renesas-cleanup-for-v3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: r8a7790: Constify platform data and resources
  ARM: shmobile: Rename to r8a7790_init_early()
  ARM: shmobile: Rename to r8a73a4_init_early()
Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
parents 933b4f0f cde214a8
...@@ -57,7 +57,7 @@ static const char *ape6evm_boards_compat_dt[] __initdata = { ...@@ -57,7 +57,7 @@ static const char *ape6evm_boards_compat_dt[] __initdata = {
}; };
DT_MACHINE_START(APE6EVM_DT, "ape6evm") DT_MACHINE_START(APE6EVM_DT, "ape6evm")
.init_early = r8a73a4_init_delay, .init_early = r8a73a4_init_early,
.init_machine = ape6evm_add_standard_devices, .init_machine = ape6evm_add_standard_devices,
.dt_compat = ape6evm_boards_compat_dt, .dt_compat = ape6evm_boards_compat_dt,
MACHINE_END MACHINE_END
...@@ -240,7 +240,7 @@ static const char *ape6evm_boards_compat_dt[] __initdata = { ...@@ -240,7 +240,7 @@ static const char *ape6evm_boards_compat_dt[] __initdata = {
}; };
DT_MACHINE_START(APE6EVM_DT, "ape6evm") DT_MACHINE_START(APE6EVM_DT, "ape6evm")
.init_early = r8a73a4_init_delay, .init_early = r8a73a4_init_early,
.init_machine = ape6evm_add_standard_devices, .init_machine = ape6evm_add_standard_devices,
.dt_compat = ape6evm_boards_compat_dt, .dt_compat = ape6evm_boards_compat_dt,
MACHINE_END MACHINE_END
...@@ -38,7 +38,7 @@ static const char *lager_boards_compat_dt[] __initdata = { ...@@ -38,7 +38,7 @@ static const char *lager_boards_compat_dt[] __initdata = {
}; };
DT_MACHINE_START(LAGER_DT, "lager") DT_MACHINE_START(LAGER_DT, "lager")
.init_early = r8a7790_init_delay, .init_early = r8a7790_init_early,
.init_machine = lager_add_standard_devices, .init_machine = lager_add_standard_devices,
.init_time = r8a7790_timer_init, .init_time = r8a7790_timer_init,
.dt_compat = lager_boards_compat_dt, .dt_compat = lager_boards_compat_dt,
......
...@@ -186,7 +186,7 @@ static const char *lager_boards_compat_dt[] __initdata = { ...@@ -186,7 +186,7 @@ static const char *lager_boards_compat_dt[] __initdata = {
}; };
DT_MACHINE_START(LAGER_DT, "lager") DT_MACHINE_START(LAGER_DT, "lager")
.init_early = r8a7790_init_delay, .init_early = r8a7790_init_early,
.init_time = r8a7790_timer_init, .init_time = r8a7790_timer_init,
.init_machine = lager_init, .init_machine = lager_init,
.dt_compat = lager_boards_compat_dt, .dt_compat = lager_boards_compat_dt,
......
...@@ -5,6 +5,6 @@ void r8a73a4_add_standard_devices(void); ...@@ -5,6 +5,6 @@ void r8a73a4_add_standard_devices(void);
void r8a73a4_add_dt_devices(void); void r8a73a4_add_dt_devices(void);
void r8a73a4_clock_init(void); void r8a73a4_clock_init(void);
void r8a73a4_pinmux_init(void); void r8a73a4_pinmux_init(void);
void r8a73a4_init_delay(void); void r8a73a4_init_early(void);
#endif /* __ASM_R8A73A4_H__ */ #endif /* __ASM_R8A73A4_H__ */
...@@ -5,7 +5,7 @@ void r8a7790_add_standard_devices(void); ...@@ -5,7 +5,7 @@ void r8a7790_add_standard_devices(void);
void r8a7790_add_dt_devices(void); void r8a7790_add_dt_devices(void);
void r8a7790_clock_init(void); void r8a7790_clock_init(void);
void r8a7790_pinmux_init(void); void r8a7790_pinmux_init(void);
void r8a7790_init_delay(void); void r8a7790_init_early(void);
void r8a7790_timer_init(void); void r8a7790_timer_init(void);
#define MD(nr) BIT(nr) #define MD(nr) BIT(nr)
......
...@@ -207,7 +207,7 @@ void __init r8a73a4_add_standard_devices(void) ...@@ -207,7 +207,7 @@ void __init r8a73a4_add_standard_devices(void)
r8a73a4_register_thermal(); r8a73a4_register_thermal();
} }
void __init r8a73a4_init_delay(void) void __init r8a73a4_init_early(void)
{ {
#ifndef CONFIG_ARM_ARCH_TIMER #ifndef CONFIG_ARM_ARCH_TIMER
shmobile_setup_delay(1500, 2, 4); /* Cortex-A15 @ 1500MHz */ shmobile_setup_delay(1500, 2, 4); /* Cortex-A15 @ 1500MHz */
...@@ -222,7 +222,7 @@ static const char *r8a73a4_boards_compat_dt[] __initdata = { ...@@ -222,7 +222,7 @@ static const char *r8a73a4_boards_compat_dt[] __initdata = {
}; };
DT_MACHINE_START(R8A73A4_DT, "Generic R8A73A4 (Flattened Device Tree)") DT_MACHINE_START(R8A73A4_DT, "Generic R8A73A4 (Flattened Device Tree)")
.init_early = r8a73a4_init_delay, .init_early = r8a73a4_init_early,
.dt_compat = r8a73a4_boards_compat_dt, .dt_compat = r8a73a4_boards_compat_dt,
MACHINE_END MACHINE_END
#endif /* CONFIG_USE_OF */ #endif /* CONFIG_USE_OF */
...@@ -31,17 +31,18 @@ ...@@ -31,17 +31,18 @@
#include <mach/r8a7790.h> #include <mach/r8a7790.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
static struct resource pfc_resources[] __initdata = { static const struct resource pfc_resources[] __initconst = {
DEFINE_RES_MEM(0xe6060000, 0x250), DEFINE_RES_MEM(0xe6060000, 0x250),
}; };
#define R8A7790_GPIO(idx) \ #define R8A7790_GPIO(idx) \
static struct resource r8a7790_gpio##idx##_resources[] __initdata = { \ static const struct resource r8a7790_gpio##idx##_resources[] __initconst = { \
DEFINE_RES_MEM(0xe6050000 + 0x1000 * (idx), 0x50), \ DEFINE_RES_MEM(0xe6050000 + 0x1000 * (idx), 0x50), \
DEFINE_RES_IRQ(gic_spi(4 + (idx))), \ DEFINE_RES_IRQ(gic_spi(4 + (idx))), \
}; \ }; \
\ \
static struct gpio_rcar_config r8a7790_gpio##idx##_platform_data __initdata = { \ static const struct gpio_rcar_config \
r8a7790_gpio##idx##_platform_data __initconst = { \
.gpio_base = 32 * (idx), \ .gpio_base = 32 * (idx), \
.irq_base = 0, \ .irq_base = 0, \
.number_of_pins = 32, \ .number_of_pins = 32, \
...@@ -112,7 +113,7 @@ void __init r8a7790_pinmux_init(void) ...@@ -112,7 +113,7 @@ void __init r8a7790_pinmux_init(void)
enum { SCIFA0, SCIFA1, SCIFB0, SCIFB1, SCIFB2, SCIFA2, SCIF0, SCIF1, enum { SCIFA0, SCIFA1, SCIFB0, SCIFB1, SCIFB2, SCIFA2, SCIF0, SCIF1,
HSCIF0, HSCIF1 }; HSCIF0, HSCIF1 };
static struct plat_sci_port scif[] __initdata = { static const struct plat_sci_port scif[] __initconst = {
SCIFA_DATA(SCIFA0, 0xe6c40000, gic_spi(144)), /* SCIFA0 */ SCIFA_DATA(SCIFA0, 0xe6c40000, gic_spi(144)), /* SCIFA0 */
SCIFA_DATA(SCIFA1, 0xe6c50000, gic_spi(145)), /* SCIFA1 */ SCIFA_DATA(SCIFA1, 0xe6c50000, gic_spi(145)), /* SCIFA1 */
SCIFB_DATA(SCIFB0, 0xe6c20000, gic_spi(148)), /* SCIFB0 */ SCIFB_DATA(SCIFB0, 0xe6c20000, gic_spi(148)), /* SCIFB0 */
...@@ -131,11 +132,11 @@ static inline void r8a7790_register_scif(int idx) ...@@ -131,11 +132,11 @@ static inline void r8a7790_register_scif(int idx)
sizeof(struct plat_sci_port)); sizeof(struct plat_sci_port));
} }
static struct renesas_irqc_config irqc0_data __initdata = { static const struct renesas_irqc_config irqc0_data __initconst = {
.irq_base = irq_pin(0), /* IRQ0 -> IRQ3 */ .irq_base = irq_pin(0), /* IRQ0 -> IRQ3 */
}; };
static struct resource irqc0_resources[] __initdata = { static const struct resource irqc0_resources[] __initconst = {
DEFINE_RES_MEM(0xe61c0000, 0x200), /* IRQC Event Detector Block_0 */ DEFINE_RES_MEM(0xe61c0000, 0x200), /* IRQC Event Detector Block_0 */
DEFINE_RES_IRQ(gic_spi(0)), /* IRQ0 */ DEFINE_RES_IRQ(gic_spi(0)), /* IRQ0 */
DEFINE_RES_IRQ(gic_spi(1)), /* IRQ1 */ DEFINE_RES_IRQ(gic_spi(1)), /* IRQ1 */
...@@ -150,7 +151,7 @@ static struct resource irqc0_resources[] __initdata = { ...@@ -150,7 +151,7 @@ static struct resource irqc0_resources[] __initdata = {
&irqc##idx##_data, \ &irqc##idx##_data, \
sizeof(struct renesas_irqc_config)) sizeof(struct renesas_irqc_config))
static struct resource thermal_resources[] __initdata = { static const struct resource thermal_resources[] __initconst = {
DEFINE_RES_MEM(0xe61f0000, 0x14), DEFINE_RES_MEM(0xe61f0000, 0x14),
DEFINE_RES_MEM(0xe61f0100, 0x38), DEFINE_RES_MEM(0xe61f0100, 0x38),
DEFINE_RES_IRQ(gic_spi(69)), DEFINE_RES_IRQ(gic_spi(69)),
...@@ -161,13 +162,13 @@ static struct resource thermal_resources[] __initdata = { ...@@ -161,13 +162,13 @@ static struct resource thermal_resources[] __initdata = {
thermal_resources, \ thermal_resources, \
ARRAY_SIZE(thermal_resources)) ARRAY_SIZE(thermal_resources))
static struct sh_timer_config cmt00_platform_data __initdata = { static const struct sh_timer_config cmt00_platform_data __initconst = {
.name = "CMT00", .name = "CMT00",
.timer_bit = 0, .timer_bit = 0,
.clockevent_rating = 80, .clockevent_rating = 80,
}; };
static struct resource cmt00_resources[] __initdata = { static const struct resource cmt00_resources[] __initconst = {
DEFINE_RES_MEM(0xffca0510, 0x0c), DEFINE_RES_MEM(0xffca0510, 0x0c),
DEFINE_RES_MEM(0xffca0500, 0x04), DEFINE_RES_MEM(0xffca0500, 0x04),
DEFINE_RES_IRQ(gic_spi(142)), /* CMT0_0 */ DEFINE_RES_IRQ(gic_spi(142)), /* CMT0_0 */
...@@ -267,7 +268,7 @@ void __init r8a7790_timer_init(void) ...@@ -267,7 +268,7 @@ void __init r8a7790_timer_init(void)
clocksource_of_init(); clocksource_of_init();
} }
void __init r8a7790_init_delay(void) void __init r8a7790_init_early(void)
{ {
#ifndef CONFIG_ARM_ARCH_TIMER #ifndef CONFIG_ARM_ARCH_TIMER
shmobile_setup_delay(1300, 2, 4); /* Cortex-A15 @ 1300MHz */ shmobile_setup_delay(1300, 2, 4); /* Cortex-A15 @ 1300MHz */
...@@ -276,13 +277,13 @@ void __init r8a7790_init_delay(void) ...@@ -276,13 +277,13 @@ void __init r8a7790_init_delay(void)
#ifdef CONFIG_USE_OF #ifdef CONFIG_USE_OF
static const char *r8a7790_boards_compat_dt[] __initdata = { static const char * const r8a7790_boards_compat_dt[] __initconst = {
"renesas,r8a7790", "renesas,r8a7790",
NULL, NULL,
}; };
DT_MACHINE_START(R8A7790_DT, "Generic R8A7790 (Flattened Device Tree)") DT_MACHINE_START(R8A7790_DT, "Generic R8A7790 (Flattened Device Tree)")
.init_early = r8a7790_init_delay, .init_early = r8a7790_init_early,
.init_time = r8a7790_timer_init, .init_time = r8a7790_timer_init,
.dt_compat = r8a7790_boards_compat_dt, .dt_compat = r8a7790_boards_compat_dt,
MACHINE_END MACHINE_END
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment