|
@@ -0,0 +1,63 @@
|
|
|
+/*
|
|
|
+ * OMAP4 PRM module functions
|
|
|
+ *
|
|
|
+ * Copyright (C) 2011-2012 Texas Instruments, Inc.
|
|
|
+ * Copyright (C) 2010 Nokia Corporation
|
|
|
+ * Benoît Cousson
|
|
|
+ * Paul Walmsley
|
|
|
+ * Rajendra Nayak <rnayak@ti.com>
|
|
|
+ *
|
|
|
+ * This program is free software; you can redistribute it and/or modify
|
|
|
+ * it under the terms of the GNU General Public License version 2 as
|
|
|
+ * published by the Free Software Foundation.
|
|
|
+ */
|
|
|
+
|
|
|
+#include <linux/kernel.h>
|
|
|
+#include <linux/delay.h>
|
|
|
+#include <linux/errno.h>
|
|
|
+#include <linux/err.h>
|
|
|
+#include <linux/io.h>
|
|
|
+
|
|
|
+
|
|
|
+#include "soc.h"
|
|
|
+#include "iomap.h"
|
|
|
+#include "common.h"
|
|
|
+#include "vp.h"
|
|
|
+#include "prm44xx.h"
|
|
|
+#include "prm-regbits-44xx.h"
|
|
|
+#include "prcm44xx.h"
|
|
|
+#include "prminst44xx.h"
|
|
|
+#include "powerdomain.h"
|
|
|
+
|
|
|
+/* Static data */
|
|
|
+
|
|
|
+static const struct omap_prcm_irq omap4_prcm_irqs[] = {
|
|
|
+ OMAP_PRCM_IRQ("wkup", 0, 0),
|
|
|
+ OMAP_PRCM_IRQ("io", 9, 1),
|
|
|
+};
|
|
|
+
|
|
|
+static struct omap_prcm_irq_setup omap4_prcm_irq_setup = {
|
|
|
+ .ack = OMAP4_PRM_IRQSTATUS_MPU_OFFSET,
|
|
|
+ .mask = OMAP4_PRM_IRQENABLE_MPU_OFFSET,
|
|
|
+ .nr_regs = 2,
|
|
|
+ .irqs = omap4_prcm_irqs,
|
|
|
+ .nr_irqs = ARRAY_SIZE(omap4_prcm_irqs),
|
|
|
+ .irq = 11 + OMAP44XX_IRQ_GIC_START,
|
|
|
+ .read_pending_irqs = &omap44xx_prm_read_pending_irqs,
|
|
|
+ .ocp_barrier = &omap44xx_prm_ocp_barrier,
|
|
|
+ .save_and_clear_irqen = &omap44xx_prm_save_and_clear_irqen,
|
|
|
+ .restore_irqen = &omap44xx_prm_restore_irqen,
|
|
|
+};
|
|
|
+
|
|
|
+/*
|
|
|
+ * omap44xx_prm_reset_src_map - map from bits in the PRM_RSTST
|
|
|
+ * hardware register (which are specific to OMAP44xx SoCs) to reset
|
|
|
+ * source ID bit shifts (which is an OMAP SoC-independent
|
|
|
+ * enumeration)
|
|
|
+ */
|
|
|
+static struct prm_reset_src_map omap44xx_prm_reset_src_map[] = {
|
|
|
+ { OMAP4430_GLOBAL_WARM_SW_RST_SHIFT,
|
|
|
+ OMAP_GLOBAL_WARM_RST_SRC_ID_SHIFT },
|
|
|
+ { OMAP4430_GLOBAL_COLD_RST_SHIFT,
|
|
|
+ OMAP_GLOBAL_COLD_RST_SRC_ID_SHIFT },
|
|
|
+ { OMAP4430_MPU_SECURITY_VIOL_RST_SHIFT,
|