ARM: dove: convert legacy dove to PMU support
PATCH v3 3/3 ARM: dove: convert legacy dove to PMU support
Since Dove has non-DT support for various facilities in the PMU, convert the legacy support to use the new PMU driver.
Acked-by Arnd Bergmann <[email protected]>
Signed-off-by Russell King <[email protected]>
---
v3: add irq_domain_start initialiser
arch/arm/Kconfig | 1 + arch/arm/mach-dove/common.c | 26 +++++++++++ arch/arm/mach-dove/include/mach/pm.h | 17 ------- arch/arm/mach-dove/irq.c | 88 ------------------------------------ 4 files changed, 27 insertions(+), 105 deletions(-)
arch/arm/Kconfig +1 -0
@@ -514,6 +514,7 @@ config ARCH_DOVE select PINCTRL select PINCTRL_DOVE select PLAT_ORION_LEGACY + select PM_GENERIC_DOMAINS if PM help Support for the Marvell Dove SoC 88AP510
arch/arm/mach-dove/common.c +26 -0
@@ -16,6 +16,7 @@#include <linux/platform_data/dma-mv_xor.h> #include <linux/platform_data/usb-ehci-orion.h> #include <linux/platform_device.h> +#include <linux/soc/dove/pmu.h> #include <asm/hardware/cache-tauros2.h> #include <asm/mach/arch.h> #include <asm/mach/map.h>
@@ -375,6 +376,30 @@ void __init dove_setup_cpu_wins(void) DOVE_SCRATCHPAD_SIZE); } +static const struct dove_pmu_domain_initdata pmu_domains[]__initconst = { + { + .pwr_mask =PMU_PWR_VPU_PWR_DWN_MASK , + .rst_mask =PMU_SW_RST_VIDEO_MASK , + .iso_mask =PMU_ISO_VIDEO_MASK , + .name ="vpu-domain" , + }, { + .pwr_mask =PMU_PWR_GPU_PWR_DWN_MASK , + .rst_mask =PMU_SW_RST_GPU_MASK , + .iso_mask =PMU_ISO_GPU_MASK , + .name ="gpu-domain" , + }, { +/* sentinel */ + }, +}; + +static const struct dove_pmu_initdata pmu_data__initconst = { + .pmc_base =DOVE_PMU_VIRT_BASE , + .pmu_base =DOVE_PMU_VIRT_BASE +0x8000 , + .irq =IRQ_DOVE_PMU , + .irq_domain_start =IRQ_DOVE_PMU_START , + .domains = pmu_domains, +}; +void __init dove_init (void ) { pr_info("Dove 88AP510 SoC, TCLK = %d MHz.\n",
@@ -389,6 +414,7 @@ void __init dove_init(void)dove_clk_init ();/* internal devices that every board has */ +dove_init_pmu_legacy (&pmu_data);dove_rtc_init ();dove_xor0_init ();dove_xor1_init ();
arch/arm/mach-dove/include/mach/pm.h +0 -17
@@ -51,22 +51,5 @@#define CLOCK_GATING_GIGA_PHY_MASK (1 << CLOCK_GATING_BIT_GIGA_PHY)#define PMU_INTERRUPT_CAUSE (DOVE_PMU_VIRT_BASE + 0x50) -#define PMU_INTERRUPT_MASK (DOVE_PMU_VIRT_BASE + 0x54) - -static inline int pmu_to_irq (int pin) -{ -if (pin <NR_PMU_IRQS ) -return pin +IRQ_DOVE_PMU_START ; - -return -EINVAL ; -} - -static inline int irq_to_pmu (int irq) -{ -if (IRQ_DOVE_PMU_START <= irq && irq <NR_IRQS ) -return irq -IRQ_DOVE_PMU_START ; - -return -EINVAL ; -}#endif
arch/arm/mach-dove/irq.c +0 -88
112 lines not on this page · raw message
Signature · 1 line
2.1.0