Renesas ARM Based SoC Boards Updates for v3.17
* armadillo800eva LED support * Remove now unnecessary work arounds for c\lock issues * Enable R-Car Gen2 CMA code -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJTqnrGAAoJENfPZGlqN0++EMgP/iQRcS2YfZ8lg+vUI9Upcihf ypBXWYUvCZ59A0fkiRYkU5jIDFqr4BpAAzDGjBQWhxtbZYCb/OZrxGzsDBYpG96H QTAHFKU4iqc3b1YJmQFQfvWMcDaFT/WpwOSvfBYxmw1zT6emTth3amqmT7vtgmxh x7/i7dGUjORxyBG1SwGropSK9FqMamFDTfDos7a+Qmc7lPtWOtsmQ0YcLN9Expxx iqRzCMI3ePd1OrvQZ0QSQ4gD/D7xvFm0uDgiUmy4wGsy60IZDfq6PuMMllAEztU5 WArNa/8NQEGxjDVK8OeT1dZSQW2NIRwQyfar62dCxTBf9gKT3PJyqgvt45pyAtNp kqupwSTEZtSrH3hoDao0pNAUSB5K6ioPaZmnhaDubOwNdrTqGoDmJNhth2+jZ/Qp /kDQNnTjcVhsKqbqGIqcuVTcQu50aCXw1/aZshcXFoGK2uVKg9VJTA9JwGnqFQDY JUPLDHN6AzvJ5uLI0pmge8a+fevpB26pAgfKUDPp47pNN558NUohANDeDIF9TkJe YoL1eiLIyBVMj00xpmkdbPu9jw+IfSO7jEKo/qsyPOpNdW3w/Bs7pcerABnVvUbC 48xb/tGA615td4OmcXFCHKRW0JHjBFcFGV25PfTzWad9Qh7VHSXuYEXGsxV/t2Sb uHhak3TLi8bapMM/rqAr =/jQc -----END PGP SIGNATURE----- Merge tag 'renesas-boards-for-v3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/boards Merge "Renesas ARM Based SoC Boards Updates for v3.17" from Simon Horman: - armadillo800eva LED support - Remove now unnecessary work arounds for c\lock issues - Enable R-Car Gen2 CMA code * tag 'renesas-boards-for-v3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: shmobile: Enable R-Car Gen2 CMA code in board files ARM: shmobile: armadillo800eva reference: Spelling s/ED/LED/ ARM: shmobile: armadillo800eva legacy: Add LED support ARM: shmobile: lager-reference: Remove workarounds for core clock issues ARM: shmobile: koelsch-reference: Remove workarounds for core clock issues Signed-off-by: Olof Johansson <olof@lixom.net>
This commit is contained in:
commit
bdd18e8f76
|
@ -12,6 +12,8 @@ menuconfig ARCH_SHMOBILE_MULTI
|
|||
select NO_IOPORT_MAP
|
||||
select PINCTRL
|
||||
select ARCH_REQUIRE_GPIOLIB
|
||||
select ARCH_HAS_CPUFREQ
|
||||
select ARCH_HAS_OPP
|
||||
|
||||
if ARCH_SHMOBILE_MULTI
|
||||
|
||||
|
|
|
@ -53,6 +53,7 @@ obj-$(CONFIG_ARCH_SH73A0) += pm-sh73a0.o
|
|||
obj-$(CONFIG_ARCH_R8A7740) += pm-r8a7740.o pm-rmobile.o
|
||||
obj-$(CONFIG_ARCH_R8A7779) += pm-r8a7779.o pm-rcar.o
|
||||
obj-$(CONFIG_ARCH_R8A7790) += pm-r8a7790.o pm-rcar.o
|
||||
obj-$(CONFIG_ARCH_R8A7791) += pm-r8a7791.o pm-rcar.o
|
||||
|
||||
# Board objects
|
||||
ifdef CONFIG_ARCH_SHMOBILE_MULTI
|
||||
|
|
|
@ -24,10 +24,10 @@
|
|||
#include <linux/pinctrl/machine.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/sh_clk.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/r8a73a4.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include "common.h"
|
||||
|
||||
static void __init ape6evm_add_standard_devices(void)
|
||||
{
|
||||
|
|
|
@ -33,11 +33,11 @@
|
|||
#include <linux/regulator/machine.h>
|
||||
#include <linux/sh_clk.h>
|
||||
#include <linux/smsc911x.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/irqs.h>
|
||||
#include <mach/r8a73a4.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include "common.h"
|
||||
#include "irqs.h"
|
||||
|
||||
/* LEDS */
|
||||
static struct gpio_led ape6evm_leds[] = {
|
||||
|
|
|
@ -24,10 +24,10 @@
|
|||
#include <linux/kernel.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/io.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/r8a7740.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/hardware/cache-l2x0.h>
|
||||
#include "common.h"
|
||||
|
||||
/*
|
||||
* CON1 Camera Module
|
||||
|
@ -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)
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -45,8 +45,6 @@
|
|||
#include <linux/mmc/sh_mobile_sdhi.h>
|
||||
#include <linux/i2c-gpio.h>
|
||||
#include <linux/reboot.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/irqs.h>
|
||||
#include <mach/r8a7740.h>
|
||||
#include <media/mt9t112.h>
|
||||
#include <media/sh_mobile_ceu.h>
|
||||
|
@ -61,7 +59,9 @@
|
|||
#include <video/sh_mobile_hdmi.h>
|
||||
#include <sound/sh_fsi.h>
|
||||
#include <sound/simple_card.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "irqs.h"
|
||||
#include "pm-rmobile.h"
|
||||
#include "sh-gpio.h"
|
||||
|
||||
/*
|
||||
|
@ -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,
|
||||
|
|
|
@ -19,9 +19,9 @@
|
|||
*/
|
||||
|
||||
#include <linux/of_platform.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/r8a7778.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include "common.h"
|
||||
|
||||
/*
|
||||
* see board-bock.c for checking detail of dip-switch
|
||||
|
|
|
@ -35,12 +35,12 @@
|
|||
#include <linux/spi/flash.h>
|
||||
#include <linux/usb/renesas_usbhs.h>
|
||||
#include <media/soc_camera.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/irqs.h>
|
||||
#include <mach/r8a7778.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <sound/rcar_snd.h>
|
||||
#include <sound/simple_card.h>
|
||||
#include "common.h"
|
||||
#include "irqs.h"
|
||||
|
||||
#define FPGA 0x18200000
|
||||
#define IRQ0MR 0x30
|
||||
|
|
|
@ -20,11 +20,11 @@
|
|||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <mach/clock.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/r7s72100.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include "clock.h"
|
||||
#include "common.h"
|
||||
|
||||
/*
|
||||
* This is a really crude hack to provide clkdev support to platform
|
||||
|
|
|
@ -25,11 +25,11 @@
|
|||
#include <linux/sh_eth.h>
|
||||
#include <linux/spi/rspi.h>
|
||||
#include <linux/spi/spi.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/irqs.h>
|
||||
#include <mach/r7s72100.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include "common.h"
|
||||
#include "irqs.h"
|
||||
|
||||
/* Ether */
|
||||
static const struct sh_eth_plat_data ether_pdata __initconst = {
|
||||
|
|
|
@ -23,12 +23,12 @@
|
|||
#include <linux/kernel.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/platform_data/rcar-du.h>
|
||||
#include <mach/clock.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/irqs.h>
|
||||
#include <mach/rcar-gen2.h>
|
||||
#include <mach/r8a7791.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include "clock.h"
|
||||
#include "common.h"
|
||||
#include "irqs.h"
|
||||
#include "rcar-gen2.h"
|
||||
|
||||
/* DU */
|
||||
static struct rcar_du_encoder_data koelsch_du_encoders[] = {
|
||||
|
@ -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);
|
||||
|
||||
|
@ -128,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
|
||||
|
|
|
@ -45,12 +45,12 @@
|
|||
#include <linux/spi/flash.h>
|
||||
#include <linux/spi/rspi.h>
|
||||
#include <linux/spi/spi.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/irqs.h>
|
||||
#include <mach/r8a7791.h>
|
||||
#include <mach/rcar-gen2.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include "common.h"
|
||||
#include "irqs.h"
|
||||
#include "rcar-gen2.h"
|
||||
|
||||
/* DU */
|
||||
static struct rcar_du_encoder_data koelsch_du_encoders[] = {
|
||||
|
@ -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
|
||||
|
|
|
@ -26,10 +26,10 @@
|
|||
#include <linux/input.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <mach/sh73a0.h>
|
||||
#include <mach/common.h>
|
||||
#include <asm/hardware/cache-l2x0.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include "common.h"
|
||||
|
||||
static void __init kzm_init(void)
|
||||
{
|
||||
|
|
|
@ -43,13 +43,13 @@
|
|||
#include <linux/videodev2.h>
|
||||
#include <sound/sh_fsi.h>
|
||||
#include <sound/simple_card.h>
|
||||
#include <mach/irqs.h>
|
||||
#include <mach/sh73a0.h>
|
||||
#include <mach/common.h>
|
||||
#include <asm/hardware/cache-l2x0.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <video/sh_mobile_lcdc.h>
|
||||
#include "common.h"
|
||||
#include "irqs.h"
|
||||
|
||||
/*
|
||||
* external GPIO
|
||||
|
|
|
@ -22,12 +22,12 @@
|
|||
#include <linux/init.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/platform_data/rcar-du.h>
|
||||
#include <mach/clock.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/irqs.h>
|
||||
#include <mach/rcar-gen2.h>
|
||||
#include <mach/r8a7790.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include "clock.h"
|
||||
#include "common.h"
|
||||
#include "irqs.h"
|
||||
#include "rcar-gen2.h"
|
||||
|
||||
/* DU */
|
||||
static struct rcar_du_encoder_data lager_du_encoders[] = {
|
||||
|
@ -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);
|
||||
|
||||
|
@ -133,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
|
||||
|
|
|
@ -45,8 +45,6 @@
|
|||
#include <linux/sh_eth.h>
|
||||
#include <linux/usb/phy.h>
|
||||
#include <linux/usb/renesas_usbhs.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/irqs.h>
|
||||
#include <mach/r8a7790.h>
|
||||
#include <media/soc_camera.h>
|
||||
#include <asm/mach-types.h>
|
||||
|
@ -58,6 +56,9 @@
|
|||
#include <linux/spi/spi.h>
|
||||
#include <sound/rcar_snd.h>
|
||||
#include <sound/simple_card.h>
|
||||
#include "common.h"
|
||||
#include "irqs.h"
|
||||
#include "rcar-gen2.h"
|
||||
|
||||
/*
|
||||
* SSI-AK4643
|
||||
|
@ -890,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
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
#include <linux/regulator/fixed.h>
|
||||
#include <linux/regulator/machine.h>
|
||||
#include <linux/smsc911x.h>
|
||||
#include <linux/sh_intc.h>
|
||||
#include <linux/sh_clk.h>
|
||||
#include <linux/tca6416_keypad.h>
|
||||
#include <linux/usb/renesas_usbhs.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
|
@ -58,14 +58,12 @@
|
|||
#include <media/soc_camera_platform.h>
|
||||
#include <sound/sh_fsi.h>
|
||||
#include <sound/simple_card.h>
|
||||
|
||||
#include <mach/common.h>
|
||||
#include <mach/irqs.h>
|
||||
#include <mach/sh7372.h>
|
||||
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach-types.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "irqs.h"
|
||||
#include "pm-rmobile.h"
|
||||
#include "sh-gpio.h"
|
||||
|
||||
/*
|
||||
|
|
|
@ -20,10 +20,10 @@
|
|||
*/
|
||||
|
||||
#include <mach/r8a7779.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/irqs.h>
|
||||
#include <asm/irq.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include "common.h"
|
||||
#include "irqs.h"
|
||||
|
||||
static void __init marzen_init(void)
|
||||
{
|
||||
|
|
|
@ -43,11 +43,11 @@
|
|||
#include <linux/mfd/tmio.h>
|
||||
#include <media/soc_camera.h>
|
||||
#include <mach/r8a7779.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/irqs.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/traps.h>
|
||||
#include "common.h"
|
||||
#include "irqs.h"
|
||||
|
||||
/* Fixed 3.3V regulator to be used by SDHI0 */
|
||||
static struct regulator_consumer_supply fixed3v3_power_consumers[] = {
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
#include <linux/io.h>
|
||||
#include <linux/sh_clk.h>
|
||||
#include <linux/clkdev.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/r7s72100.h>
|
||||
#include "common.h"
|
||||
|
||||
/* Frequency Control Registers */
|
||||
#define FRQCR 0xfcfe0010
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
#include <linux/kernel.h>
|
||||
#include <linux/sh_clk.h>
|
||||
#include <linux/clkdev.h>
|
||||
#include <mach/clock.h>
|
||||
#include <mach/common.h>
|
||||
#include "common.h"
|
||||
#include "clock.h"
|
||||
|
||||
#define CPG_BASE 0xe6150000
|
||||
#define CPG_LEN 0x270
|
||||
|
|
|
@ -22,9 +22,9 @@
|
|||
#include <linux/io.h>
|
||||
#include <linux/sh_clk.h>
|
||||
#include <linux/clkdev.h>
|
||||
#include <mach/clock.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/r8a7740.h>
|
||||
#include "clock.h"
|
||||
#include "common.h"
|
||||
|
||||
/*
|
||||
* | MDx | XTAL1/EXTAL1 | System | EXTALR |
|
||||
|
|
|
@ -39,8 +39,8 @@
|
|||
#include <linux/io.h>
|
||||
#include <linux/sh_clk.h>
|
||||
#include <linux/clkdev.h>
|
||||
#include <mach/clock.h>
|
||||
#include <mach/common.h>
|
||||
#include "clock.h"
|
||||
#include "common.h"
|
||||
|
||||
#define MSTPCR0 IOMEM(0xffc80030)
|
||||
#define MSTPCR1 IOMEM(0xffc80034)
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
#include <linux/io.h>
|
||||
#include <linux/sh_clk.h>
|
||||
#include <linux/clkdev.h>
|
||||
#include <mach/clock.h>
|
||||
#include <mach/common.h>
|
||||
#include "clock.h"
|
||||
#include "common.h"
|
||||
|
||||
/*
|
||||
* MD1 = 1 MD1 = 0
|
||||
|
|
|
@ -22,9 +22,10 @@
|
|||
#include <linux/kernel.h>
|
||||
#include <linux/sh_clk.h>
|
||||
#include <linux/clkdev.h>
|
||||
#include <mach/clock.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/r8a7790.h>
|
||||
#include "clock.h"
|
||||
#include "common.h"
|
||||
#include "rcar-gen2.h"
|
||||
|
||||
/*
|
||||
* MD EXTAL PLL0 PLL1 PLL3
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
#include <linux/kernel.h>
|
||||
#include <linux/sh_clk.h>
|
||||
#include <linux/clkdev.h>
|
||||
#include <mach/clock.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/rcar-gen2.h>
|
||||
#include "clock.h"
|
||||
#include "common.h"
|
||||
#include "rcar-gen2.h"
|
||||
|
||||
/*
|
||||
* MD EXTAL PLL0 PLL1 PLL3
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
#include <linux/io.h>
|
||||
#include <linux/sh_clk.h>
|
||||
#include <linux/clkdev.h>
|
||||
#include <mach/clock.h>
|
||||
#include <mach/common.h>
|
||||
#include "clock.h"
|
||||
#include "common.h"
|
||||
|
||||
/* SH7372 registers */
|
||||
#define FRQCRA IOMEM(0xe6150000)
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
#include <linux/sh_clk.h>
|
||||
#include <linux/clkdev.h>
|
||||
#include <asm/processor.h>
|
||||
#include <mach/clock.h>
|
||||
#include <mach/common.h>
|
||||
#include "clock.h"
|
||||
#include "common.h"
|
||||
|
||||
#define FRQCRA IOMEM(0xe6150000)
|
||||
#define FRQCRB IOMEM(0xe6150004)
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#ifdef CONFIG_COMMON_CLK
|
||||
#include <linux/clk.h>
|
||||
#include <linux/clkdev.h>
|
||||
#include <mach/clock.h>
|
||||
#include "clock.h"
|
||||
|
||||
void __init shmobile_clk_workaround(const struct clk_name *clks,
|
||||
int nr_clks, bool enable)
|
||||
|
@ -49,8 +49,8 @@ void __init shmobile_clk_workaround(const struct clk_name *clks,
|
|||
#else /* CONFIG_COMMON_CLK */
|
||||
#include <linux/sh_clk.h>
|
||||
#include <linux/export.h>
|
||||
#include <mach/clock.h>
|
||||
#include <mach/common.h>
|
||||
#include "clock.h"
|
||||
#include "common.h"
|
||||
|
||||
unsigned long shmobile_fixed_ratio_clk_recalc(struct clk *clk)
|
||||
{
|
||||
|
|
|
@ -35,8 +35,10 @@ extern void shmobile_cpuidle_set_driver(struct cpuidle_driver *drv);
|
|||
|
||||
#ifdef CONFIG_SUSPEND
|
||||
int shmobile_suspend_init(void);
|
||||
void shmobile_smp_apmu_suspend_init(void);
|
||||
#else
|
||||
static inline int shmobile_suspend_init(void) { return 0; }
|
||||
static inline void shmobile_smp_apmu_suspend_init(void) { }
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CPU_IDLE
|
|
@ -19,8 +19,8 @@
|
|||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <mach/common.h>
|
||||
#include <asm/mach/map.h>
|
||||
#include "common.h"
|
||||
|
||||
void __init shmobile_setup_console(void)
|
||||
{
|
||||
|
|
|
@ -1,24 +1,10 @@
|
|||
#ifndef __ASM_MACH_IRQS_H
|
||||
#define __ASM_MACH_IRQS_H
|
||||
|
||||
#include <linux/sh_intc.h>
|
||||
|
||||
/* GIC */
|
||||
#define gic_spi(nr) ((nr) + 32)
|
||||
#define gic_iid(nr) (nr) /* ICCIAR / interrupt ID */
|
||||
|
||||
/* INTCS */
|
||||
#define INTCS_VECT_BASE 0x3400
|
||||
#define INTCS_VECT(n, vect) INTC_VECT((n), INTCS_VECT_BASE + (vect))
|
||||
#define intcs_evt2irq(evt) evt2irq(INTCS_VECT_BASE + (evt))
|
||||
/* Stuck here until drivers/pinctl/sh-pfc gets rid of legacy code */
|
||||
|
||||
/* External IRQ pins */
|
||||
#define IRQPIN_BASE 2000
|
||||
#define irq_pin(nr) ((nr) + IRQPIN_BASE)
|
||||
|
||||
/* GPIO IRQ */
|
||||
#define _GPIO_IRQ_BASE 2500
|
||||
#define GPIO_IRQ_BASE(x) (_GPIO_IRQ_BASE + (32 * x))
|
||||
#define GPIO_IRQ(x, y) (_GPIO_IRQ_BASE + (32 * x) + y)
|
||||
|
||||
#endif /* __ASM_MACH_IRQS_H */
|
||||
|
|
|
@ -19,8 +19,6 @@
|
|||
#ifndef __ASM_R8A7740_H__
|
||||
#define __ASM_R8A7740_H__
|
||||
|
||||
#include <mach/pm-rmobile.h>
|
||||
|
||||
/*
|
||||
* MD_CKx pin
|
||||
*/
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
#define __ASM_R8A7779_H__
|
||||
|
||||
#include <linux/sh_clk.h>
|
||||
#include <linux/pm_domain.h>
|
||||
#include <mach/pm-rcar.h>
|
||||
|
||||
/* HPB-DMA slave IDs */
|
||||
enum {
|
||||
|
@ -12,16 +10,6 @@ enum {
|
|||
HPBDMA_SLAVE_SDHI0_RX,
|
||||
};
|
||||
|
||||
struct r8a7779_pm_domain {
|
||||
struct generic_pm_domain genpd;
|
||||
struct rcar_sysc_ch ch;
|
||||
};
|
||||
|
||||
static inline struct rcar_sysc_ch *to_r8a7779_ch(struct generic_pm_domain *d)
|
||||
{
|
||||
return &container_of(d, struct r8a7779_pm_domain, genpd)->ch;
|
||||
}
|
||||
|
||||
extern void r8a7779_init_delay(void);
|
||||
extern void r8a7779_init_irq_extpin(int irlm);
|
||||
extern void r8a7779_init_irq_extpin_dt(int irlm);
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
#ifndef __ASM_R8A7790_H__
|
||||
#define __ASM_R8A7790_H__
|
||||
|
||||
#include <mach/rcar-gen2.h>
|
||||
|
||||
/* DMA slave IDs */
|
||||
enum {
|
||||
RCAR_DMA_SLAVE_INVALID,
|
||||
|
|
|
@ -5,6 +5,7 @@ void r8a7791_add_standard_devices(void);
|
|||
void r8a7791_add_dt_devices(void);
|
||||
void r8a7791_clock_init(void);
|
||||
void r8a7791_pinmux_init(void);
|
||||
void r8a7791_pm_init(void);
|
||||
extern struct smp_operations r8a7791_smp_ops;
|
||||
|
||||
#endif /* __ASM_R8A7791_H__ */
|
||||
|
|
|
@ -11,10 +11,6 @@
|
|||
#ifndef __ASM_SH7372_H__
|
||||
#define __ASM_SH7372_H__
|
||||
|
||||
#include <linux/sh_clk.h>
|
||||
#include <linux/pm_domain.h>
|
||||
#include <mach/pm-rmobile.h>
|
||||
|
||||
/* DMA slave IDs */
|
||||
enum {
|
||||
SHDMA_SLAVE_INVALID,
|
||||
|
|
|
@ -22,11 +22,10 @@
|
|||
#include <linux/module.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/sh_intc.h>
|
||||
#include <mach/intc.h>
|
||||
#include <mach/irqs.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include "intc.h"
|
||||
#include "irqs.h"
|
||||
|
||||
enum {
|
||||
UNUSED_INTCA = 0,
|
||||
|
|
|
@ -22,14 +22,13 @@
|
|||
#include <linux/module.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/sh_intc.h>
|
||||
#include <linux/irqchip.h>
|
||||
#include <linux/irqchip/arm-gic.h>
|
||||
#include <mach/intc.h>
|
||||
#include <mach/irqs.h>
|
||||
#include <mach/sh73a0.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include "intc.h"
|
||||
#include "irqs.h"
|
||||
|
||||
enum {
|
||||
UNUSED = 0,
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
#ifndef __SHMOBILE_IRQS_H
|
||||
#define __SHMOBILE_IRQS_H
|
||||
|
||||
#include <linux/sh_intc.h>
|
||||
#include <mach/irqs.h>
|
||||
|
||||
/* GIC */
|
||||
#define gic_spi(nr) ((nr) + 32)
|
||||
#define gic_iid(nr) (nr) /* ICCIAR / interrupt ID */
|
||||
|
||||
/* INTCS */
|
||||
#define INTCS_VECT_BASE 0x3400
|
||||
#define INTCS_VECT(n, vect) INTC_VECT((n), INTCS_VECT_BASE + (vect))
|
||||
#define intcs_evt2irq(evt) evt2irq(INTCS_VECT_BASE + (evt))
|
||||
|
||||
/* GPIO IRQ */
|
||||
#define _GPIO_IRQ_BASE 2500
|
||||
#define GPIO_IRQ_BASE(x) (_GPIO_IRQ_BASE + (32 * x))
|
||||
#define GPIO_IRQ(x, y) (_GPIO_IRQ_BASE + (32 * x) + y)
|
||||
|
||||
#endif /* __SHMOBILE_IRQS_H */
|
|
@ -7,16 +7,20 @@
|
|||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
#include <linux/cpu_pm.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/suspend.h>
|
||||
#include <asm/cacheflush.h>
|
||||
#include <asm/cp15.h>
|
||||
#include <asm/proc-fns.h>
|
||||
#include <asm/smp_plat.h>
|
||||
#include <mach/common.h>
|
||||
#include <asm/suspend.h>
|
||||
#include "common.h"
|
||||
|
||||
static struct {
|
||||
void __iomem *iomem;
|
||||
|
@ -141,7 +145,7 @@ int shmobile_smp_apmu_boot_secondary(unsigned int cpu, struct task_struct *idle)
|
|||
return apmu_wrap(cpu, apmu_power_on);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_HOTPLUG_CPU
|
||||
#if defined(CONFIG_HOTPLUG_CPU) || defined(CONFIG_SUSPEND)
|
||||
/* nicked from arch/arm/mach-exynos/hotplug.c */
|
||||
static inline void cpu_enter_lowpower_a15(void)
|
||||
{
|
||||
|
@ -172,16 +176,40 @@ static inline void cpu_enter_lowpower_a15(void)
|
|||
dsb();
|
||||
}
|
||||
|
||||
void shmobile_smp_apmu_cpu_die(unsigned int cpu)
|
||||
void shmobile_smp_apmu_cpu_shutdown(unsigned int cpu)
|
||||
{
|
||||
/* For this particular CPU deregister boot vector */
|
||||
shmobile_smp_hook(cpu, 0, 0);
|
||||
|
||||
/* Select next sleep mode using the APMU */
|
||||
apmu_wrap(cpu, apmu_power_off);
|
||||
|
||||
/* Do ARM specific CPU shutdown */
|
||||
cpu_enter_lowpower_a15();
|
||||
}
|
||||
|
||||
static inline void cpu_leave_lowpower(void)
|
||||
{
|
||||
unsigned int v;
|
||||
|
||||
asm volatile("mrc p15, 0, %0, c1, c0, 0\n"
|
||||
" orr %0, %0, %1\n"
|
||||
" mcr p15, 0, %0, c1, c0, 0\n"
|
||||
" mrc p15, 0, %0, c1, c0, 1\n"
|
||||
" orr %0, %0, %2\n"
|
||||
" mcr p15, 0, %0, c1, c0, 1\n"
|
||||
: "=&r" (v)
|
||||
: "Ir" (CR_C), "Ir" (0x40)
|
||||
: "cc");
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_HOTPLUG_CPU)
|
||||
void shmobile_smp_apmu_cpu_die(unsigned int cpu)
|
||||
{
|
||||
/* For this particular CPU deregister boot vector */
|
||||
shmobile_smp_hook(cpu, 0, 0);
|
||||
|
||||
/* Shutdown CPU core */
|
||||
shmobile_smp_apmu_cpu_shutdown(cpu);
|
||||
|
||||
/* jump to shared mach-shmobile sleep / reset code */
|
||||
shmobile_smp_sleep();
|
||||
|
@ -192,3 +220,27 @@ int shmobile_smp_apmu_cpu_kill(unsigned int cpu)
|
|||
return apmu_wrap(cpu, apmu_power_off_poll);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SUSPEND)
|
||||
static int shmobile_smp_apmu_do_suspend(unsigned long cpu)
|
||||
{
|
||||
shmobile_smp_hook(cpu, virt_to_phys(cpu_resume), 0);
|
||||
shmobile_smp_apmu_cpu_shutdown(cpu);
|
||||
cpu_do_idle(); /* WFI selects Core Standby */
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int shmobile_smp_apmu_enter_suspend(suspend_state_t state)
|
||||
{
|
||||
cpu_suspend(smp_processor_id(), shmobile_smp_apmu_do_suspend);
|
||||
cpu_leave_lowpower();
|
||||
return 0;
|
||||
}
|
||||
|
||||
void shmobile_smp_apmu_suspend_init(void)
|
||||
{
|
||||
shmobile_suspend_ops.enter = shmobile_smp_apmu_enter_suspend;
|
||||
}
|
||||
#else
|
||||
void shmobile_smp_apmu_suspend_init(void) {}
|
||||
#endif
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include <asm/cacheflush.h>
|
||||
#include <asm/smp_plat.h>
|
||||
#include <asm/smp_scu.h>
|
||||
#include <mach/common.h>
|
||||
#include "common.h"
|
||||
|
||||
static int shmobile_smp_scu_notifier_call(struct notifier_block *nfb,
|
||||
unsigned long action, void *hcpu)
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include <linux/init.h>
|
||||
#include <asm/cacheflush.h>
|
||||
#include <asm/smp_plat.h>
|
||||
#include <mach/common.h>
|
||||
#include "common.h"
|
||||
|
||||
extern unsigned long shmobile_smp_fn[];
|
||||
extern unsigned long shmobile_smp_arg[];
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
*/
|
||||
#include <linux/console.h>
|
||||
#include <linux/suspend.h>
|
||||
#include <mach/pm-rmobile.h>
|
||||
#include <mach/common.h>
|
||||
#include "common.h"
|
||||
#include "pm-rmobile.h"
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
static int r8a7740_pd_a4s_suspend(void)
|
||||
|
|
|
@ -13,20 +13,31 @@
|
|||
#include <linux/suspend.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/pm_clock.h>
|
||||
#include <linux/pm_domain.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/console.h>
|
||||
#include <asm/io.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/pm-rcar.h>
|
||||
#include <mach/r8a7779.h>
|
||||
#include "common.h"
|
||||
#include "pm-rcar.h"
|
||||
|
||||
/* SYSC */
|
||||
#define SYSCIER 0x0c
|
||||
#define SYSCIMR 0x10
|
||||
|
||||
struct r8a7779_pm_domain {
|
||||
struct generic_pm_domain genpd;
|
||||
struct rcar_sysc_ch ch;
|
||||
};
|
||||
|
||||
static inline struct rcar_sysc_ch *to_r8a7779_ch(struct generic_pm_domain *d)
|
||||
{
|
||||
return &container_of(d, struct r8a7779_pm_domain, genpd)->ch;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_PM) || defined(CONFIG_SMP)
|
||||
|
||||
static void __init r8a7779_sysc_init(void)
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
|
||||
#include <linux/kernel.h>
|
||||
#include <asm/io.h>
|
||||
#include <mach/pm-rcar.h>
|
||||
#include <mach/r8a7790.h>
|
||||
#include "pm-rcar.h"
|
||||
|
||||
/* SYSC */
|
||||
#define SYSCIER 0x0c
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
* r8a7791 Power management support
|
||||
*
|
||||
* Copyright (C) 2014 Renesas Electronics Corporation
|
||||
* Copyright (C) 2011 Renesas Solutions Corp.
|
||||
* Copyright (C) 2011 Magnus Damm
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*/
|
||||
|
||||
#include <asm/io.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <mach/r8a7791.h>
|
||||
#include "pm-rcar.h"
|
||||
|
||||
/* SYSC */
|
||||
#define SYSCIER 0x0c
|
||||
#define SYSCIMR 0x10
|
||||
|
||||
#if defined(CONFIG_SMP)
|
||||
|
||||
static void __init r8a7791_sysc_init(void)
|
||||
{
|
||||
void __iomem *base = rcar_sysc_init(0xe6180000);
|
||||
|
||||
/* enable all interrupt sources, but do not use interrupt handler */
|
||||
iowrite32(0x0131000e, base + SYSCIER);
|
||||
iowrite32(0, base + SYSCIMR);
|
||||
}
|
||||
|
||||
#else /* CONFIG_SMP */
|
||||
|
||||
static inline void r8a7791_sysc_init(void) {}
|
||||
|
||||
#endif /* CONFIG_SMP */
|
||||
|
||||
void __init r8a7791_pm_init(void)
|
||||
{
|
||||
static int once;
|
||||
|
||||
if (once++)
|
||||
return;
|
||||
|
||||
r8a7791_sysc_init();
|
||||
}
|
|
@ -13,7 +13,7 @@
|
|||
#include <linux/mm.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <asm/io.h>
|
||||
#include <mach/pm-rcar.h>
|
||||
#include "pm-rcar.h"
|
||||
|
||||
/* SYSC */
|
||||
#define SYSCSR 0x00
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include <linux/pm.h>
|
||||
#include <linux/pm_clock.h>
|
||||
#include <asm/io.h>
|
||||
#include <mach/pm-rmobile.h>
|
||||
#include "pm-rmobile.h"
|
||||
|
||||
/* SYSC */
|
||||
#define SPDCR IOMEM(0xe6180008)
|
||||
|
|
|
@ -25,9 +25,9 @@
|
|||
#include <asm/io.h>
|
||||
#include <asm/tlbflush.h>
|
||||
#include <asm/suspend.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/sh7372.h>
|
||||
#include <mach/pm-rmobile.h>
|
||||
#include "common.h"
|
||||
#include "pm-rmobile.h"
|
||||
|
||||
/* DBG */
|
||||
#define DBGREG1 IOMEM(0xe6100020)
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/suspend.h>
|
||||
#include <mach/common.h>
|
||||
#include "common.h"
|
||||
|
||||
#ifdef CONFIG_SUSPEND
|
||||
static int sh73a0_enter_suspend(suspend_state_t suspend_state)
|
||||
|
|
|
@ -4,5 +4,6 @@
|
|||
void rcar_gen2_timer_init(void);
|
||||
#define MD(nr) BIT(nr)
|
||||
u32 rcar_gen2_read_mode_pins(void);
|
||||
void rcar_gen2_reserve(void);
|
||||
|
||||
#endif /* __ASM_RCAR_GEN2_H__ */
|
|
@ -20,10 +20,10 @@
|
|||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <mach/common.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/map.h>
|
||||
#include "common.h"
|
||||
|
||||
static struct map_desc emev2_io_desc[] __initdata = {
|
||||
#ifdef CONFIG_SMP
|
||||
|
|
|
@ -22,10 +22,10 @@
|
|||
#include <linux/kernel.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/sh_timer.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/irqs.h>
|
||||
#include <mach/r7s72100.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include "common.h"
|
||||
#include "irqs.h"
|
||||
|
||||
static struct resource mtu2_resources[] __initdata = {
|
||||
DEFINE_RES_MEM(0xfcff0000, 0x400),
|
||||
|
|
|
@ -24,11 +24,11 @@
|
|||
#include <linux/serial_sci.h>
|
||||
#include <linux/sh_dma.h>
|
||||
#include <linux/sh_timer.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/dma-register.h>
|
||||
#include <mach/irqs.h>
|
||||
#include <mach/r8a73a4.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include "common.h"
|
||||
#include "dma-register.h"
|
||||
#include "irqs.h"
|
||||
|
||||
static const struct resource pfc_resources[] = {
|
||||
DEFINE_RES_MEM(0xe6050000, 0x9000),
|
||||
|
|
|
@ -31,15 +31,15 @@
|
|||
#include <linux/sh_dma.h>
|
||||
#include <linux/sh_timer.h>
|
||||
#include <linux/platform_data/sh_ipmmu.h>
|
||||
#include <mach/dma-register.h>
|
||||
#include <mach/r8a7740.h>
|
||||
#include <mach/pm-rmobile.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/irqs.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/map.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/time.h>
|
||||
#include "common.h"
|
||||
#include "dma-register.h"
|
||||
#include "irqs.h"
|
||||
#include "pm-rmobile.h"
|
||||
|
||||
static struct map_desc r8a7740_io_desc[] __initdata = {
|
||||
/*
|
||||
|
|
|
@ -37,11 +37,11 @@
|
|||
#include <linux/usb/ehci_pdriver.h>
|
||||
#include <linux/usb/ohci_pdriver.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <mach/irqs.h>
|
||||
#include <mach/r8a7778.h>
|
||||
#include <mach/common.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/hardware/cache-l2x0.h>
|
||||
#include "common.h"
|
||||
#include "irqs.h"
|
||||
|
||||
/* SCIF */
|
||||
#define R8A7778_SCIF(index, baseaddr, irq) \
|
||||
|
|
|
@ -40,14 +40,14 @@
|
|||
#include <linux/usb/ehci_pdriver.h>
|
||||
#include <linux/usb/ohci_pdriver.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <mach/irqs.h>
|
||||
#include <mach/r8a7779.h>
|
||||
#include <mach/common.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/time.h>
|
||||
#include <asm/mach/map.h>
|
||||
#include <asm/hardware/cache-l2x0.h>
|
||||
#include "common.h"
|
||||
#include "irqs.h"
|
||||
|
||||
static struct map_desc r8a7779_io_desc[] __initdata = {
|
||||
/* 2M entity map for 0xf0000000 (MPCORE) */
|
||||
|
|
|
@ -26,11 +26,12 @@
|
|||
#include <linux/serial_sci.h>
|
||||
#include <linux/sh_dma.h>
|
||||
#include <linux/sh_timer.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/dma-register.h>
|
||||
#include <mach/irqs.h>
|
||||
#include <mach/r8a7790.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include "common.h"
|
||||
#include "dma-register.h"
|
||||
#include "irqs.h"
|
||||
#include "rcar-gen2.h"
|
||||
|
||||
/* Audio-DMAC */
|
||||
#define AUDIO_DMAC_SLAVE(_id, _addr, t, r) \
|
||||
|
@ -325,6 +326,8 @@ DT_MACHINE_START(R8A7790_DT, "Generic R8A7790 (Flattened Device Tree)")
|
|||
.smp = smp_ops(r8a7790_smp_ops),
|
||||
.init_early = r8a7790_init_early,
|
||||
.init_time = rcar_gen2_timer_init,
|
||||
.init_late = shmobile_init_late,
|
||||
.reserve = rcar_gen2_reserve,
|
||||
.dt_compat = r8a7790_boards_compat_dt,
|
||||
MACHINE_END
|
||||
#endif /* CONFIG_USE_OF */
|
||||
|
|
|
@ -26,11 +26,11 @@
|
|||
#include <linux/platform_data/irq-renesas-irqc.h>
|
||||
#include <linux/serial_sci.h>
|
||||
#include <linux/sh_timer.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/irqs.h>
|
||||
#include <mach/r8a7791.h>
|
||||
#include <mach/rcar-gen2.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include "common.h"
|
||||
#include "irqs.h"
|
||||
#include "rcar-gen2.h"
|
||||
|
||||
static const struct resource pfc_resources[] __initconst = {
|
||||
DEFINE_RES_MEM(0xe6060000, 0x250),
|
||||
|
@ -217,6 +217,8 @@ DT_MACHINE_START(R8A7791_DT, "Generic R8A7791 (Flattened Device Tree)")
|
|||
.smp = smp_ops(r8a7791_smp_ops),
|
||||
.init_early = shmobile_init_delay,
|
||||
.init_time = rcar_gen2_timer_init,
|
||||
.init_late = shmobile_init_late,
|
||||
.reserve = rcar_gen2_reserve,
|
||||
.dt_compat = r8a7791_boards_compat_dt,
|
||||
MACHINE_END
|
||||
#endif /* CONFIG_USE_OF */
|
||||
|
|
|
@ -20,11 +20,14 @@
|
|||
|
||||
#include <linux/clk/shmobile.h>
|
||||
#include <linux/clocksource.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/dma-contiguous.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/rcar-gen2.h>
|
||||
#include <linux/of_fdt.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include "common.h"
|
||||
#include "rcar-gen2.h"
|
||||
|
||||
#define MODEMR 0xe6160060
|
||||
|
||||
|
@ -110,3 +113,72 @@ void __init rcar_gen2_timer_init(void)
|
|||
#endif
|
||||
clocksource_of_init();
|
||||
}
|
||||
|
||||
struct memory_reserve_config {
|
||||
u64 reserved;
|
||||
u64 base, size;
|
||||
};
|
||||
|
||||
static int __init rcar_gen2_scan_mem(unsigned long node, const char *uname,
|
||||
int depth, void *data)
|
||||
{
|
||||
const char *type = of_get_flat_dt_prop(node, "device_type", NULL);
|
||||
const __be32 *reg, *endp;
|
||||
int l;
|
||||
struct memory_reserve_config *mrc = data;
|
||||
u64 lpae_start = 1ULL << 32;
|
||||
|
||||
/* We are scanning "memory" nodes only */
|
||||
if (type == NULL || strcmp(type, "memory"))
|
||||
return 0;
|
||||
|
||||
reg = of_get_flat_dt_prop(node, "linux,usable-memory", &l);
|
||||
if (reg == NULL)
|
||||
reg = of_get_flat_dt_prop(node, "reg", &l);
|
||||
if (reg == NULL)
|
||||
return 0;
|
||||
|
||||
endp = reg + (l / sizeof(__be32));
|
||||
while ((endp - reg) >= (dt_root_addr_cells + dt_root_size_cells)) {
|
||||
u64 base, size;
|
||||
|
||||
base = dt_mem_next_cell(dt_root_addr_cells, ®);
|
||||
size = dt_mem_next_cell(dt_root_size_cells, ®);
|
||||
|
||||
if (base >= lpae_start)
|
||||
continue;
|
||||
|
||||
if ((base + size) >= lpae_start)
|
||||
size = lpae_start - base;
|
||||
|
||||
if (size < mrc->reserved)
|
||||
continue;
|
||||
|
||||
if (base < mrc->base)
|
||||
continue;
|
||||
|
||||
/* keep the area at top near the 32-bit legacy limit */
|
||||
mrc->base = base + size - mrc->reserved;
|
||||
mrc->size = mrc->reserved;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct cma *rcar_gen2_dma_contiguous;
|
||||
|
||||
void __init rcar_gen2_reserve(void)
|
||||
{
|
||||
struct memory_reserve_config mrc;
|
||||
|
||||
/* reserve 256 MiB at the top of the physical legacy 32-bit space */
|
||||
memset(&mrc, 0, sizeof(mrc));
|
||||
mrc.reserved = SZ_256M;
|
||||
|
||||
of_scan_flat_dt(rcar_gen2_scan_mem, &mrc);
|
||||
#ifdef CONFIG_DMA_CMA
|
||||
if (mrc.size)
|
||||
dma_contiguous_reserve_area(mrc.size, mrc.base, 0,
|
||||
&rcar_gen2_dma_contiguous);
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -29,19 +29,19 @@
|
|||
#include <linux/io.h>
|
||||
#include <linux/serial_sci.h>
|
||||
#include <linux/sh_dma.h>
|
||||
#include <linux/sh_intc.h>
|
||||
#include <linux/sh_timer.h>
|
||||
#include <linux/pm_domain.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/platform_data/sh_ipmmu.h>
|
||||
#include <mach/dma-register.h>
|
||||
#include <mach/irqs.h>
|
||||
#include <mach/sh7372.h>
|
||||
#include <mach/common.h>
|
||||
#include <asm/mach/map.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/time.h>
|
||||
#include "common.h"
|
||||
#include "dma-register.h"
|
||||
#include "irqs.h"
|
||||
#include "pm-rmobile.h"
|
||||
|
||||
static struct map_desc sh7372_io_desc[] __initdata = {
|
||||
/* create a 1:1 entity map for 0xe6xxxxxx
|
||||
|
|
|
@ -29,18 +29,17 @@
|
|||
#include <linux/io.h>
|
||||
#include <linux/serial_sci.h>
|
||||
#include <linux/sh_dma.h>
|
||||
#include <linux/sh_intc.h>
|
||||
#include <linux/sh_timer.h>
|
||||
#include <linux/platform_data/sh_ipmmu.h>
|
||||
#include <linux/platform_data/irq-renesas-intc-irqpin.h>
|
||||
#include <mach/dma-register.h>
|
||||
#include <mach/irqs.h>
|
||||
#include <mach/sh73a0.h>
|
||||
#include <mach/common.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/map.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/time.h>
|
||||
#include "common.h"
|
||||
#include "dma-register.h"
|
||||
#include "irqs.h"
|
||||
|
||||
static struct map_desc sh73a0_io_desc[] __initdata = {
|
||||
/* create a 1:1 entity map for 0xe6xxxxxx
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
#include <linux/spinlock.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/delay.h>
|
||||
#include <mach/common.h>
|
||||
#include <asm/smp_plat.h>
|
||||
#include <asm/smp_scu.h>
|
||||
#include "common.h"
|
||||
|
||||
#define EMEV2_SCU_BASE 0x1e000000
|
||||
#define EMEV2_SMU_BASE 0xe0110000
|
||||
|
|
|
@ -23,13 +23,13 @@
|
|||
#include <linux/spinlock.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/delay.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/pm-rcar.h>
|
||||
#include <mach/r8a7779.h>
|
||||
#include <asm/cacheflush.h>
|
||||
#include <asm/smp_plat.h>
|
||||
#include <asm/smp_scu.h>
|
||||
#include <asm/smp_twd.h>
|
||||
#include "common.h"
|
||||
#include "pm-rcar.h"
|
||||
|
||||
#define AVECR IOMEM(0xfe700040)
|
||||
#define R8A7779_SCU_BASE 0xf0000000
|
||||
|
|
|
@ -18,9 +18,9 @@
|
|||
#include <linux/smp.h>
|
||||
#include <linux/io.h>
|
||||
#include <asm/smp_plat.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/pm-rcar.h>
|
||||
#include <mach/r8a7790.h>
|
||||
#include "common.h"
|
||||
#include "pm-rcar.h"
|
||||
|
||||
#define RST 0xe6160000
|
||||
#define CA15BAR 0x0020
|
||||
|
@ -69,6 +69,7 @@ static void __init r8a7790_smp_prepare_cpus(unsigned int max_cpus)
|
|||
|
||||
/* turn on power to SCU */
|
||||
r8a7790_pm_init();
|
||||
shmobile_smp_apmu_suspend_init();
|
||||
rcar_sysc_power_up(&r8a7790_ca15_scu);
|
||||
rcar_sysc_power_up(&r8a7790_ca7_scu);
|
||||
}
|
||||
|
|
|
@ -18,9 +18,9 @@
|
|||
#include <linux/smp.h>
|
||||
#include <linux/io.h>
|
||||
#include <asm/smp_plat.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/r8a7791.h>
|
||||
#include <mach/rcar-gen2.h>
|
||||
#include "common.h"
|
||||
#include "rcar-gen2.h"
|
||||
|
||||
#define RST 0xe6160000
|
||||
#define CA15BAR 0x0020
|
||||
|
@ -50,6 +50,9 @@ static void __init r8a7791_smp_prepare_cpus(unsigned int max_cpus)
|
|||
writel_relaxed((readl_relaxed(p + CA15RESCNT) & ~0x0f) | 0xa5a50000,
|
||||
p + CA15RESCNT);
|
||||
iounmap(p);
|
||||
|
||||
r8a7791_pm_init();
|
||||
shmobile_smp_apmu_suspend_init();
|
||||
}
|
||||
|
||||
static int r8a7791_smp_boot_secondary(unsigned int cpu,
|
||||
|
|
|
@ -22,10 +22,10 @@
|
|||
#include <linux/smp.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/delay.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/sh73a0.h>
|
||||
#include <asm/smp_plat.h>
|
||||
#include <asm/smp_twd.h>
|
||||
#include "common.h"
|
||||
|
||||
#define WUPCR IOMEM(0xe6151010)
|
||||
#define SRESCR IOMEM(0xe6151018)
|
||||
|
|
Loading…
Reference in New Issue