@@ -94,7 +94,7 @@
};
omap3_pmx_core: pinmux@48002030 {
- compatible = "ti,omap3-padconf", "pinctrl-single";
+ compatible = "ti,omap3-padconf";
reg = <0x48002030 0x05cc>;
#address-cells = <1>;
#size-cells = <0>;
@@ -103,7 +103,7 @@
};
omap3_pmx_wkup: pinmux@0x48002a00 {
- compatible = "ti,omap3-padconf", "pinctrl-single";
+ compatible = "ti,omap3-padconf";
reg = <0x48002a00 0x5c>;
#address-cells = <1>;
#size-cells = <0>;
@@ -107,7 +107,7 @@
};
omap4_pmx_core: pinmux@4a100040 {
- compatible = "ti,omap4-padconf", "pinctrl-single";
+ compatible = "ti,omap4-padconf";
reg = <0x4a100040 0x0196>;
#address-cells = <1>;
#size-cells = <0>;
@@ -115,7 +115,7 @@
pinctrl-single,function-mask = <0x7fff>;
};
omap4_pmx_wkup: pinmux@4a31e040 {
- compatible = "ti,omap4-padconf", "pinctrl-single";
+ compatible = "ti,omap4-padconf";
reg = <0x4a31e040 0x0038>;
#address-cells = <1>;
#size-cells = <0>;
@@ -100,7 +100,7 @@
};
omap5_pmx_core: pinmux@4a002840 {
- compatible = "ti,omap4-padconf", "pinctrl-single";
+ compatible = "ti,omap4-padconf";
reg = <0x4a002840 0x01b6>;
#address-cells = <1>;
#size-cells = <0>;
@@ -108,7 +108,7 @@
pinctrl-single,function-mask = <0x7fff>;
};
omap5_pmx_wkup: pinmux@4ae0c840 {
- compatible = "ti,omap4-padconf", "pinctrl-single";
+ compatible = "ti,omap4-padconf";
reg = <0x4ae0c840 0x0038>;
#address-cells = <1>;
#size-cells = <0>;
@@ -811,6 +811,12 @@ int __init omap_mux_late_init(void)
}
}
+ omap_mux_dbg_init();
+
+ /* see pinctrl-single-omap for the wake-up interrupt handling */
+ if (of_have_populated_dt())
+ return 0;
+
ret = request_irq(omap_prcm_event_to_irq("io"),
omap_hwmod_mux_handle_irq, IRQF_SHARED | IRQF_NO_SUSPEND,
"hwmod_io", omap_mux_late_init);
@@ -818,8 +824,6 @@ int __init omap_mux_late_init(void)
if (ret)
pr_warning("mux: Failed to setup hwmod io irq %d\n", ret);
- omap_mux_dbg_init();
-
return 0;
}
@@ -172,6 +172,8 @@ static int prcm_clear_mod_irqs(s16 module, u8 regs, u32 ignore_bits)
wkst = omap2_prm_read_mod_reg(module, wkst_off);
wkst &= ~ignore_bits;
c++;
+ if (c > 10)
+ break;
}
omap2_cm_write_mod_reg(iclk, module, iclk_off);
omap2_cm_write_mod_reg(fclk, module, fclk_off);
@@ -22,8 +22,10 @@
#include <linux/io.h>
#include <linux/irq.h>
#include <linux/interrupt.h>
+#include <linux/platform_data/pinctrl-single-omap.h>
#include <linux/slab.h>
+#include "soc.h"
#include "prm2xxx_3xxx.h"
#include "prm2xxx.h"
#include "prm3xxx.h"
@@ -95,6 +97,7 @@ static void omap_prcm_irq_handler(unsigned int irq, struct irq_desc *desc)
struct irq_chip *chip = irq_desc_get_chip(desc);
unsigned int virtirq;
int nr_irq = prcm_irq_setup->nr_regs * 32;
+ int retries = 20;
/*
* If we are suspended, mask all interrupts from PRCM level,
@@ -136,6 +139,9 @@ static void omap_prcm_irq_handler(unsigned int irq, struct irq_desc *desc)
/* Serve normal events next */
for_each_set_bit(virtirq, pending, nr_irq)
generic_handle_irq(prcm_irq_setup->base_irq + virtirq);
+
+ if (retries-- < 1)
+ break;
}
if (chip->irq_ack)
chip->irq_ack(&desc->irq_data);
@@ -234,6 +240,15 @@ void omap_prcm_irq_complete(void)
prcm_irq_setup->restore_irqen(prcm_irq_setup->saved_mask);
}
+static struct pcs_omap_pdata pcs_pdata;
+
+static struct platform_device pinctrl_single_omap = {
+ .name = "pinctrl-single-omap-soc",
+ .dev = {
+ .platform_data = &pcs_pdata,
+ },
+};
+
/**
* omap_prcm_register_chain_handler - initializes the prcm chained interrupt
* handler based on provided parameters
@@ -322,6 +337,17 @@ int omap_prcm_register_chain_handler(struct omap_prcm_irq_setup *irq_setup)
prcm_irq_chips[i] = gc;
}
+ if (of_have_populated_dt()) {
+ pcs_pdata.irq = omap_prcm_event_to_irq("io");
+ if (cpu_is_omap34xx())
+ pcs_pdata.reconfigure_io_chain =
+ omap3xxx_prm_reconfigure_io_chain;
+ else
+ pcs_pdata.reconfigure_io_chain =
+ omap44xx_prm_reconfigure_io_chain;
+ platform_device_register(&pinctrl_single_omap);
+ }
+
return 0;
err: