From d37e9b0b20dd7670946ad6034b4aa93b7e7048aa Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Wed, 14 May 2014 16:47:45 +0200 Subject: ARM: shmobile: koelsch-reference: Remove workarounds for core clock issues Now the core clock issues have been fixed by commit 3c90c55dcde745bed81f6447f24ba96bda43d984 ("drivers: sh: compile drivers/sh/pm_runtime.c if ARCH_SHMOBILE_MULTI"), revert the following 3 commits: - 4dcb4c80380dfa482874b931e308fd382597feab ("ARM: shmobile: Add Koelsch clock workarounds for SDHI"), - 8e4f394b20a0fe474dd88204d76978191566decf ("ARM: shmobile: koelsch-reference: Annotate clk_enables as __initconst"), - 3d75d9ea74fee6f5a4bdcbbdf2d577661d047eef ("ARM: shmobile: koelsch-reference: Work around core clock issues"). Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-koelsch-reference.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/arch/arm/mach-shmobile/board-koelsch-reference.c b/arch/arm/mach-shmobile/board-koelsch-reference.c index 1d3f67d4ccd6..28e3c45c8b90 100644 --- a/arch/arm/mach-shmobile/board-koelsch-reference.c +++ b/arch/arm/mach-shmobile/board-koelsch-reference.c @@ -92,24 +92,9 @@ static const struct clk_name clk_names[] __initconst = { { "lvds0", "lvds.0", "rcar-du-r8a7791" }, }; -/* - * This is a really crude hack to work around core platform clock issues - */ -static const struct clk_name clk_enables[] __initconst = { - { "ether", NULL, "ee700000.ethernet" }, - { "i2c2", NULL, "e6530000.i2c" }, - { "msiof0", NULL, "e6e20000.spi" }, - { "qspi_mod", NULL, "e6b10000.spi" }, - { "sdhi0", NULL, "ee100000.sd" }, - { "sdhi1", NULL, "ee140000.sd" }, - { "sdhi2", NULL, "ee160000.sd" }, - { "thermal", NULL, "e61f0000.thermal" }, -}; - static void __init koelsch_add_standard_devices(void) { shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), false); - shmobile_clk_workaround(clk_enables, ARRAY_SIZE(clk_enables), true); r8a7791_add_dt_devices(); of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); -- cgit v1.2.3 From f47b9e1ec3a1d694f07fcc0d5ba0c2582acce099 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Wed, 14 May 2014 16:47:46 +0200 Subject: ARM: shmobile: lager-reference: Remove workarounds for core clock issues Now the core clock issues have been fixed by commit 3c90c55dcde745bed81f6447f24ba96bda43d984 ("drivers: sh: compile drivers/sh/pm_runtime.c if ARCH_SHMOBILE_MULTI"), revert the following 2 commits: - f98b55d730492e664fb2649bd7054fec0fe81acd ("ARM: shmobile: Add Lager clock workarounds for SDHI and MMCIF"), - aa5de826afe747c353162bbc116c63ab5335f91c ("ARM: shmobile: lager-reference: Work around core clock issues"). Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-lager-reference.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c index 4f0af91ebc81..9e0624e1b2f0 100644 --- a/arch/arm/mach-shmobile/board-lager-reference.c +++ b/arch/arm/mach-shmobile/board-lager-reference.c @@ -98,23 +98,9 @@ static const struct clk_name clk_names[] __initconst = { { "lvds1", "lvds.1", "rcar-du-r8a7790" }, }; -/* - * This is a really crude hack to work around core platform clock issues - */ -static const struct clk_name clk_enables[] __initconst = { - { "ether", NULL, "ee700000.ethernet" }, - { "msiof1", NULL, "e6e10000.spi" }, - { "mmcif1", NULL, "ee220000.mmc" }, - { "qspi_mod", NULL, "e6b10000.spi" }, - { "sdhi0", NULL, "ee100000.sd" }, - { "sdhi2", NULL, "ee140000.sd" }, - { "thermal", NULL, "e61f0000.thermal" }, -}; - static void __init lager_add_standard_devices(void) { shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), false); - shmobile_clk_workaround(clk_enables, ARRAY_SIZE(clk_enables), true); r8a7790_add_dt_devices(); of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); -- cgit v1.2.3 From 111bcc1360235ad1cdab4bc27f5ccca943ca8af5 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Wed, 14 May 2014 16:51:21 +0200 Subject: ARM: shmobile: armadillo800eva legacy: Add LED support Cfr. r8a7740-armadillo800eva-reference.dts Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-armadillo800eva.c | 35 ++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c index 53d03e85750a..395638da837c 100644 --- a/arch/arm/mach-shmobile/board-armadillo800eva.c +++ b/arch/arm/mach-shmobile/board-armadillo800eva.c @@ -578,6 +578,40 @@ static struct platform_device hdmi_lcdc_device = { }, }; +/* LEDS */ +static struct gpio_led gpio_leds[] = { + { + .name = "LED3", + .gpio = 102, + .default_state = LEDS_GPIO_DEFSTATE_ON, + }, { + .name = "LED4", + .gpio = 111, + .default_state = LEDS_GPIO_DEFSTATE_ON, + }, { + .name = "LED5", + .gpio = 110, + .default_state = LEDS_GPIO_DEFSTATE_ON, + }, { + .name = "LED6", + .gpio = 177, + .default_state = LEDS_GPIO_DEFSTATE_ON, + }, +}; + +static struct gpio_led_platform_data leds_gpio_info = { + .leds = gpio_leds, + .num_leds = ARRAY_SIZE(gpio_leds), +}; + +static struct platform_device leds_gpio_device = { + .name = "leds-gpio", + .id = -1, + .dev = { + .platform_data = &leds_gpio_info, + }, +}; + /* GPIO KEY */ #define GPIO_KEY(c, g, d, ...) \ { .code = c, .gpio = g, .desc = d, .active_low = 1, __VA_ARGS__ } @@ -1069,6 +1103,7 @@ static struct platform_device *eva_devices[] __initdata = { &lcdc0_device, &pwm_device, &pwm_backlight_device, + &leds_gpio_device, &gpio_keys_device, &sh_eth_device, &vcc_sdhi0, -- cgit v1.2.3 From 8a0d1a2fcfd019adf9893076f6c65a9a05712853 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Wed, 14 May 2014 16:51:20 +0200 Subject: ARM: shmobile: armadillo800eva reference: Spelling s/ED/LED/ And add missing spaces before opening parentheses Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-armadillo800eva-reference.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c index 368518b3b8ec..0ae49823e67f 100644 --- a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c +++ b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c @@ -53,11 +53,11 @@ * CON22 Serial * CON23 LAN * CON24 USB3 - * LED1 Camera LED(Yellow) + * LED1 Camera LED (Yellow) * LED2 Power LED (Green) - * ED3-LED6 User LED(Yellow) - * LED7 LAN link LED(Green) - * LED8 LAN activity LED(Yellow) + * LED3-LED6 User LED (Yellow) + * LED7 LAN link LED (Green) + * LED8 LAN activity LED (Yellow) */ /* -- cgit v1.2.3 From 5f65c5bd58bf027eb2bacc2294a98e7aea81c630 Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Mon, 9 Jun 2014 21:38:53 +0900 Subject: ARM: shmobile: Enable R-Car Gen2 CMA code in board files Hook in the R-Car Gen2 CMA reservation code in the board files for Lager and Koelsch. Both the DT-reference code and the legacy code is modified. Signed-off-by: Magnus Damm Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-koelsch-reference.c | 1 + arch/arm/mach-shmobile/board-koelsch.c | 1 + arch/arm/mach-shmobile/board-lager-reference.c | 1 + arch/arm/mach-shmobile/board-lager.c | 1 + 4 files changed, 4 insertions(+) diff --git a/arch/arm/mach-shmobile/board-koelsch-reference.c b/arch/arm/mach-shmobile/board-koelsch-reference.c index 28e3c45c8b90..5e0375fdc6f7 100644 --- a/arch/arm/mach-shmobile/board-koelsch-reference.c +++ b/arch/arm/mach-shmobile/board-koelsch-reference.c @@ -113,5 +113,6 @@ DT_MACHINE_START(KOELSCH_DT, "koelsch") .init_time = rcar_gen2_timer_init, .init_machine = koelsch_add_standard_devices, .init_late = shmobile_init_late, + .reserve = rcar_gen2_reserve, .dt_compat = koelsch_boards_compat_dt, MACHINE_END diff --git a/arch/arm/mach-shmobile/board-koelsch.c b/arch/arm/mach-shmobile/board-koelsch.c index 0d44e7eb6508..db4b8a311c75 100644 --- a/arch/arm/mach-shmobile/board-koelsch.c +++ b/arch/arm/mach-shmobile/board-koelsch.c @@ -526,5 +526,6 @@ DT_MACHINE_START(KOELSCH_DT, "koelsch") .init_time = rcar_gen2_timer_init, .init_machine = koelsch_init, .init_late = shmobile_init_late, + .reserve = rcar_gen2_reserve, .dt_compat = koelsch_boards_compat_dt, MACHINE_END diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c index 9e0624e1b2f0..c5e656e3bae3 100644 --- a/arch/arm/mach-shmobile/board-lager-reference.c +++ b/arch/arm/mach-shmobile/board-lager-reference.c @@ -119,5 +119,6 @@ DT_MACHINE_START(LAGER_DT, "lager") .init_time = rcar_gen2_timer_init, .init_machine = lager_add_standard_devices, .init_late = shmobile_init_late, + .reserve = rcar_gen2_reserve, .dt_compat = lager_boards_compat_dt, MACHINE_END diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c index 83bbb5c48863..a51d202cddcf 100644 --- a/arch/arm/mach-shmobile/board-lager.c +++ b/arch/arm/mach-shmobile/board-lager.c @@ -891,5 +891,6 @@ DT_MACHINE_START(LAGER_DT, "lager") .init_time = rcar_gen2_timer_init, .init_machine = lager_init, .init_late = shmobile_init_late, + .reserve = rcar_gen2_reserve, .dt_compat = lager_boards_compat_dt, MACHINE_END -- cgit v1.2.3