#define GPIO_PORT168CR 0xE60520A8
#define SRCR4 0xe61580bc
#define USCCR1 0xE6058144
-#define DEV_LATENCY_NS 250000
static void __init mackerel_init(void)
{
- struct gpd_timing_data latencies = {
- .stop_latency_ns = DEV_LATENCY_NS,
- .start_latency_ns = DEV_LATENCY_NS,
- .save_state_latency_ns = DEV_LATENCY_NS,
- .restore_state_latency_ns = DEV_LATENCY_NS,
+ struct pm_domain_device domain_devices[] = {
+ { "A4LC", &lcdc_device, },
+ { "A4LC", &hdmi_lcdc_device, },
+ { "A4LC", &meram_device, },
+ { "A4MP", &fsi_device, },
+ { "A3SP", &usbhs0_device, },
+ { "A3SP", &usbhs1_device, },
+ { "A3SP", &nand_flash_device, },
+ { "A3SP", &sh_mmcif_device, },
+ { "A3SP", &sdhi0_device, },
+#if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE)
+ { "A3SP", &sdhi1_device, },
+#endif
+ { "A3SP", &sdhi2_device, },
+ { "A4R", &ceu_device, },
};
u32 srcr4;
struct clk *clk;
platform_add_devices(mackerel_devices, ARRAY_SIZE(mackerel_devices));
- rmobile_add_device_to_domain_td("A4LC", &lcdc_device, &latencies);
- rmobile_add_device_to_domain_td("A4LC", &hdmi_lcdc_device, &latencies);
- rmobile_add_device_to_domain_td("A4LC", &meram_device, &latencies);
- rmobile_add_device_to_domain_td("A4MP", &fsi_device, &latencies);
- rmobile_add_device_to_domain_td("A3SP", &usbhs0_device, &latencies);
- rmobile_add_device_to_domain_td("A3SP", &usbhs1_device, &latencies);
- rmobile_add_device_to_domain_td("A3SP", &nand_flash_device, &latencies);
- rmobile_add_device_to_domain_td("A3SP", &sh_mmcif_device, &latencies);
- rmobile_add_device_to_domain_td("A3SP", &sdhi0_device, &latencies);
-#if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE)
- rmobile_add_device_to_domain_td("A3SP", &sdhi1_device, &latencies);
-#endif
- rmobile_add_device_to_domain_td("A3SP", &sdhi2_device, &latencies);
- rmobile_add_device_to_domain_td("A4R", &ceu_device, &latencies);
+ rmobile_add_devices_to_domains(domain_devices,
+ ARRAY_SIZE(domain_devices));
hdmi_init_pm_clock();
sh7372_pm_init();
&spu1_device,
};
-#define DEV_LATENCY_NS 250000
-
void __init sh7372_add_standard_devices(void)
{
- struct gpd_timing_data latencies = {
- .stop_latency_ns = DEV_LATENCY_NS,
- .start_latency_ns = DEV_LATENCY_NS,
- .save_state_latency_ns = DEV_LATENCY_NS,
- .restore_state_latency_ns = DEV_LATENCY_NS,
+ struct pm_domain_device domain_devices[] = {
+ { "A3RV", &vpu_device, },
+ { "A4MP", &spu0_device, },
+ { "A4MP", &spu1_device, },
+ { "A3SP", &scif0_device, },
+ { "A3SP", &scif1_device, },
+ { "A3SP", &scif2_device, },
+ { "A3SP", &scif3_device, },
+ { "A3SP", &scif4_device, },
+ { "A3SP", &scif5_device, },
+ { "A3SP", &scif6_device, },
+ { "A3SP", &iic1_device, },
+ { "A3SP", &dma0_device, },
+ { "A3SP", &dma1_device, },
+ { "A3SP", &dma2_device, },
+ { "A3SP", &usb_dma0_device, },
+ { "A3SP", &usb_dma1_device, },
+ { "A4R", &iic0_device, },
+ { "A4R", &veu0_device, },
+ { "A4R", &veu1_device, },
+ { "A4R", &veu2_device, },
+ { "A4R", &veu3_device, },
+ { "A4R", &jpu_device, },
+ { "A4R", &tmu00_device, },
+ { "A4R", &tmu01_device, },
};
sh7372_init_pm_domains();
platform_add_devices(sh7372_late_devices,
ARRAY_SIZE(sh7372_late_devices));
- rmobile_add_device_to_domain_td("A3RV", &vpu_device, &latencies);
- rmobile_add_device_to_domain_td("A4MP", &spu0_device, &latencies);
- rmobile_add_device_to_domain_td("A4MP", &spu1_device, &latencies);
- rmobile_add_device_to_domain_td("A3SP", &scif0_device, &latencies);
- rmobile_add_device_to_domain_td("A3SP", &scif1_device, &latencies);
- rmobile_add_device_to_domain_td("A3SP", &scif2_device, &latencies);
- rmobile_add_device_to_domain_td("A3SP", &scif3_device, &latencies);
- rmobile_add_device_to_domain_td("A3SP", &scif4_device, &latencies);
- rmobile_add_device_to_domain_td("A3SP", &scif5_device, &latencies);
- rmobile_add_device_to_domain_td("A3SP", &scif6_device, &latencies);
- rmobile_add_device_to_domain_td("A3SP", &iic1_device, &latencies);
- rmobile_add_device_to_domain_td("A3SP", &dma0_device, &latencies);
- rmobile_add_device_to_domain_td("A3SP", &dma1_device, &latencies);
- rmobile_add_device_to_domain_td("A3SP", &dma2_device, &latencies);
- rmobile_add_device_to_domain_td("A3SP", &usb_dma0_device, &latencies);
- rmobile_add_device_to_domain_td("A3SP", &usb_dma1_device, &latencies);
- rmobile_add_device_to_domain_td("A4R", &iic0_device, &latencies);
- rmobile_add_device_to_domain_td("A4R", &veu0_device, &latencies);
- rmobile_add_device_to_domain_td("A4R", &veu1_device, &latencies);
- rmobile_add_device_to_domain_td("A4R", &veu2_device, &latencies);
- rmobile_add_device_to_domain_td("A4R", &veu3_device, &latencies);
- rmobile_add_device_to_domain_td("A4R", &jpu_device, &latencies);
- rmobile_add_device_to_domain_td("A4R", &tmu00_device, &latencies);
- rmobile_add_device_to_domain_td("A4R", &tmu01_device, &latencies);
+ rmobile_add_devices_to_domains(domain_devices,
+ ARRAY_SIZE(domain_devices));
}
static void __init sh7372_earlytimer_init(void)