+/*
+ * The IP2 line is tied to a PCI/WMAC device. Drivers for these
+ * devices typically allocate coherent DMA memory for the descriptor
+ * ring, however the DMA controller may still have some unsynchronized
+ * data in the FIFO.
+ * Issue a flush in the handlers to ensure that the driver sees
+ * the update.
+ */
+static void ar71xx_ip2_handler(void)
+{
+ ar71xx_ddr_flush(AR71XX_DDR_REG_FLUSH_PCI);
+ do_IRQ(AR71XX_CPU_IRQ_IP2);
+}
+
+static void ar724x_ip2_handler(void)
+{
+ ar71xx_ddr_flush(AR724X_DDR_REG_FLUSH_PCIE);
+ do_IRQ(AR71XX_CPU_IRQ_IP2);
+}
+
+static void ar913x_ip2_handler(void)
+{
+ ar71xx_ddr_flush(AR91XX_DDR_REG_FLUSH_WMAC);
+ do_IRQ(AR71XX_CPU_IRQ_IP2);
+}
+
+static void ar933x_ip2_handler(void)
+{
+ ar71xx_ddr_flush(AR933X_DDR_REG_FLUSH_WMAC);
+ do_IRQ(AR71XX_CPU_IRQ_IP2);
+}
+
+static void ar934x_ip2_handler(void)
+{
+ ar71xx_ddr_flush(AR934X_DDR_REG_FLUSH_PCIE);
+ do_IRQ(AR71XX_CPU_IRQ_IP2);
+}
+
+static void (*ip2_handler)(void);
+