Skip to content

Commit

Permalink
Merge tag 'renesas-pm-cleanups-for-v3.18' of git://git.kernel.org/pub…
Browse files Browse the repository at this point in the history
…/scm/linux/kernel/git/horms/renesas into next/cleanup

Pull "Renesas ARM Based SoC PM Cleanups for v3.18" from Simon Horman:

* Make domain_devices[] static __initdata
* Add and use rmobile_add_devices_to_domain

Signed-off-by: Arnd Bergmann <ardn@arndb.de>

* tag 'renesas-pm-cleanups-for-v3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: armadillo800eva legacy: Use rmobile_add_devices_to_domains()
  ARM: shmobile: r8a7740: Clean up pm domain table
  ARM: shmobile: r8a7740: Use rmobile_add_devices_to_domains()
  ARM: shmobile: sh7372: Make domain_devices[] static __initdata
  ARM: shmobile: mackerel: Make domain_devices[] static __initdata
  • Loading branch information
Arnd Bergmann committed Sep 11, 2014
2 parents c40c402 + 834720d commit 9136ce8
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 21 deletions.
8 changes: 6 additions & 2 deletions arch/arm/mach-shmobile/board-armadillo800eva.c
Original file line number Diff line number Diff line change
Expand Up @@ -1231,6 +1231,10 @@ static void __init eva_clock_init(void)
#define GPIO_PORT8CR IOMEM(0xe6050008)
static void __init eva_init(void)
{
static struct pm_domain_device domain_devices[] __initdata = {
{ "A4LC", &lcdc0_device },
{ "A4LC", &hdmi_lcdc_device },
};
struct platform_device *usb = NULL;

regulator_register_always_on(0, "fixed-3.3V", fixed3v3_power_consumers,
Expand Down Expand Up @@ -1316,8 +1320,8 @@ static void __init eva_init(void)
platform_add_devices(eva_devices,
ARRAY_SIZE(eva_devices));

rmobile_add_device_to_domain("A4LC", &lcdc0_device);
rmobile_add_device_to_domain("A4LC", &hdmi_lcdc_device);
rmobile_add_devices_to_domains(domain_devices,
ARRAY_SIZE(domain_devices));
if (usb)
rmobile_add_device_to_domain("A3SP", usb);

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-shmobile/board-mackerel.c
Original file line number Diff line number Diff line change
Expand Up @@ -1420,7 +1420,7 @@ static const struct pinctrl_map mackerel_pinctrl_map[] = {
#define USCCR1 IOMEM(0xE6058144)
static void __init mackerel_init(void)
{
struct pm_domain_device domain_devices[] = {
static struct pm_domain_device domain_devices[] __initdata = {
{ "A4LC", &lcdc_device, },
{ "A4LC", &hdmi_lcdc_device, },
{ "A4LC", &meram_device, },
Expand Down
10 changes: 4 additions & 6 deletions arch/arm/mach-shmobile/pm-r8a7740.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,21 @@ static int r8a7740_pd_a3sp_suspend(void)

static struct rmobile_pm_domain r8a7740_pm_domains[] = {
{
.genpd.name = "A4LC",
.bit_shift = 1,
}, {
.genpd.name = "A4S",
.bit_shift = 10,
.gov = &pm_domain_always_on_gov,
.no_debug = true,
.suspend = r8a7740_pd_a4s_suspend,
},
{
}, {
.genpd.name = "A3SP",
.bit_shift = 11,
.gov = &pm_domain_always_on_gov,
.no_debug = true,
.suspend = r8a7740_pd_a3sp_suspend,
},
{
.genpd.name = "A4LC",
.bit_shift = 1,
},
};

void __init r8a7740_init_pm_domains(void)
Expand Down
26 changes: 15 additions & 11 deletions arch/arm/mach-shmobile/setup-r8a7740.c
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,19 @@ static void r8a7740_i2c_workaround(struct platform_device *pdev)

void __init r8a7740_add_standard_devices(void)
{
static struct pm_domain_device domain_devices[] __initdata = {
{ "A3SP", &scif0_device },
{ "A3SP", &scif1_device },
{ "A3SP", &scif2_device },
{ "A3SP", &scif3_device },
{ "A3SP", &scif4_device },
{ "A3SP", &scif5_device },
{ "A3SP", &scif6_device },
{ "A3SP", &scif7_device },
{ "A3SP", &scif8_device },
{ "A3SP", &i2c1_device },
};

/* I2C work-around */
r8a7740_i2c_workaround(&i2c0_device);
r8a7740_i2c_workaround(&i2c1_device);
Expand All @@ -762,17 +775,8 @@ void __init r8a7740_add_standard_devices(void)
ARRAY_SIZE(r8a7740_late_devices));

/* add devices to PM domain */

rmobile_add_device_to_domain("A3SP", &scif0_device);
rmobile_add_device_to_domain("A3SP", &scif1_device);
rmobile_add_device_to_domain("A3SP", &scif2_device);
rmobile_add_device_to_domain("A3SP", &scif3_device);
rmobile_add_device_to_domain("A3SP", &scif4_device);
rmobile_add_device_to_domain("A3SP", &scif5_device);
rmobile_add_device_to_domain("A3SP", &scif6_device);
rmobile_add_device_to_domain("A3SP", &scif7_device);
rmobile_add_device_to_domain("A3SP", &scif8_device);
rmobile_add_device_to_domain("A3SP", &i2c1_device);
rmobile_add_devices_to_domains(domain_devices,
ARRAY_SIZE(domain_devices));
}

void __init r8a7740_add_early_devices(void)
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-shmobile/setup-sh7372.c
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,7 @@ static struct platform_device *sh7372_late_devices[] __initdata = {

void __init sh7372_add_standard_devices(void)
{
struct pm_domain_device domain_devices[] = {
static struct pm_domain_device domain_devices[] __initdata = {
{ "A3RV", &vpu_device, },
{ "A4MP", &spu0_device, },
{ "A4MP", &spu1_device, },
Expand Down

0 comments on commit 9136ce8

Please sign in to comment.