|
@@ -402,3 +402,40 @@ struct pwrdm_ops omap3_pwrdm_operations = {
|
|
|
|
|
|
static struct prm_ll_data omap3xxx_prm_ll_data = {
|
|
|
.read_reset_sources = &omap3xxx_prm_read_reset_sources,
|
|
|
+};
|
|
|
+
|
|
|
+int __init omap3xxx_prm_init(void)
|
|
|
+{
|
|
|
+ if (!cpu_is_omap34xx())
|
|
|
+ return 0;
|
|
|
+
|
|
|
+ return prm_register(&omap3xxx_prm_ll_data);
|
|
|
+}
|
|
|
+
|
|
|
+static int __init omap3xxx_prm_late_init(void)
|
|
|
+{
|
|
|
+ int ret;
|
|
|
+
|
|
|
+ if (!cpu_is_omap34xx())
|
|
|
+ return 0;
|
|
|
+
|
|
|
+ omap3xxx_prm_enable_io_wakeup();
|
|
|
+ ret = omap_prcm_register_chain_handler(&omap3_prcm_irq_setup);
|
|
|
+ if (!ret)
|
|
|
+ irq_set_status_flags(omap_prcm_event_to_irq("io"),
|
|
|
+ IRQ_NOAUTOEN);
|
|
|
+
|
|
|
+ return ret;
|
|
|
+}
|
|
|
+subsys_initcall(omap3xxx_prm_late_init);
|
|
|
+
|
|
|
+static void __exit omap3xxx_prm_exit(void)
|
|
|
+{
|
|
|
+ if (!cpu_is_omap34xx())
|
|
|
+ return;
|
|
|
+
|
|
|
+ /* Should never happen */
|
|
|
+ WARN(prm_unregister(&omap3xxx_prm_ll_data),
|
|
|
+ "%s: prm_ll_data function pointer mismatch\n", __func__);
|
|
|
+}
|
|
|
+__exitcall(omap3xxx_prm_exit);
|