ARM: mach-shmobile: sh7372 A4R support
Magnus Damm
maintainerPATCH 3/3 ARM: mach-shmobile: sh7372 A4R support
From: Magnus Damm <[email protected]>
This patch adds sh7372 A4R power domain support.
The sh7372 A3SP hardware power domain contains the SH CPU Core and a set of I/O devices including multimedia accelerators and I2C controllers.
One special case about A4R is the INTCS interrupt controller that needs to be saved and restored to keep working as expected. Also the LCDC hardware blocks are in a different hardware power domain but have their IRQs routed only through INTCS. So as long as LCDCs are active we cannot power down INTCS because that would risk losing interrupts.
Signed-off-by Magnus Damm <[email protected]>
---
arch/arm/mach-shmobile/board-ap4evb.c | 1 arch/arm/mach-shmobile/board-mackerel.c | 1 arch/arm/mach-shmobile/include/mach/sh7372.h | 4 + arch/arm/mach-shmobile/intc-sh7372.c | 52 ++++++++++++++++++++++ arch/arm/mach-shmobile/pm-sh7372.c | 59 +++++++++++++++++++++++--- arch/arm/mach-shmobile/setup-sh7372.c | 7 +++ 6 files changed, 118 insertions(+), 6 deletions(-)
arch/arm/mach-shmobile/board-ap4evb.c +1 -0
@@ -1411,6 +1411,7 @@ static void __init ap4evb_init(void)sh7372_add_device_to_domain (&sh7372_a3sp, &sh_mmcif_device);sh7372_add_device_to_domain (&sh7372_a3sp, &sdhi0_device);sh7372_add_device_to_domain (&sh7372_a3sp, &sdhi1_device); +sh7372_add_device_to_domain (&sh7372_a4r, &ceu_device);hdmi_init_pm_clock ();fsi_init_pm_clock ();
arch/arm/mach-shmobile/board-mackerel.c +1 -0
@@ -1596,6 +1596,7 @@ static void __init mackerel_init(void)sh7372_add_device_to_domain (&sh7372_a3sp, &sdhi1_device);#endif sh7372_add_device_to_domain (&sh7372_a3sp, &sdhi2_device); +sh7372_add_device_to_domain (&sh7372_a4r, &ceu_device);hdmi_init_pm_clock ();sh7372_pm_init ();
arch/arm/mach-shmobile/include/mach/sh7372.h +4 -0
@@ -491,6 +491,7 @@ static inline struct sh7372_pm_domain *textern struct sh7372_pm_domain sh7372_a4lc;extern struct sh7372_pm_domain sh7372_a4mp;extern struct sh7372_pm_domain sh7372_d4; +extern struct sh7372_pm_domain sh7372_a4r;extern struct sh7372_pm_domain sh7372_a3rv;extern struct sh7372_pm_domain sh7372_a3ri;extern struct sh7372_pm_domain sh7372_a3sp;
@@ -504,4 +505,7 @@ extern void sh7372_add_device_to_domain(#define sh7372_add_device_to_domain (pd, pdev) do { } while(0)#endif /* CONFIG_PM */ +extern void sh7372_intcs_suspend (void ); +extern void sh7372_intcs_resume (void ); +#endif /* __ASM_SH7372_H__ */
arch/arm/mach-shmobile/intc-sh7372.c +51 -1
63 lines not on this page · raw message
arch/arm/mach-shmobile/pm-sh7372.c +54 -5
97 lines not on this page · raw message
arch/arm/mach-shmobile/setup-sh7372.c +7 -0
@@ -990,6 +990,7 @@ void __init sh7372_add_standard_devices(sh7372_init_pm_domain (&sh7372_a4lc);sh7372_init_pm_domain (&sh7372_a4mp);sh7372_init_pm_domain (&sh7372_d4); +sh7372_init_pm_domain (&sh7372_a4r);sh7372_init_pm_domain (&sh7372_a3rv);sh7372_init_pm_domain (&sh7372_a3ri);sh7372_init_pm_domain (&sh7372_a3sg);
@@ -1017,6 +1018,12 @@ void __init sh7372_add_standard_devices(sh7372_add_device_to_domain (&sh7372_a3sp, &dma2_device);sh7372_add_device_to_domain (&sh7372_a3sp, &usb_dma0_device);sh7372_add_device_to_domain (&sh7372_a3sp, &usb_dma1_device); +sh7372_add_device_to_domain (&sh7372_a4r, &iic0_device); +sh7372_add_device_to_domain (&sh7372_a4r, &veu0_device); +sh7372_add_device_to_domain (&sh7372_a4r, &veu1_device); +sh7372_add_device_to_domain (&sh7372_a4r, &veu2_device); +sh7372_add_device_to_domain (&sh7372_a4r, &veu3_device); +sh7372_add_device_to_domain (&sh7372_a4r, &jpu_device); }void __init sh7372_add_early_devices (void )