Revert "bsp: Remove irq0-stub"

This reverts commit ca1609bb7808eaacaaaa8fb71ed7c43e0bfd6371.

Patch 1/2 from Broadcom to fix IR input handling for Nexus 15.3 bcmdriver.
Should not be needed for Nexus 16.1 bcmdriver.

Change-Id: Ib64b1c4dbce7d4b9731a5825b6c05835dd93a6ca
diff --git a/drivers/soc/brcmstb/Kconfig b/drivers/soc/brcmstb/Kconfig
index 8d14aa4..e8124e6 100644
--- a/drivers/soc/brcmstb/Kconfig
+++ b/drivers/soc/brcmstb/Kconfig
@@ -11,6 +11,10 @@
 
 if SOC_BRCMSTB
 
+config BRCMSTB_IRQ0_STUB
+	def_bool y
+	depends on !BCM7120_L2_IRQ
+
 config BRCMSTB_BMEM
 	bool "Enable BMEM reserved A/V memory"
 	depends on HAVE_MEMBLOCK && ARCH_BRCMSTB && BRCMSTB_MEMORY_API
diff --git a/drivers/soc/brcmstb/Makefile b/drivers/soc/brcmstb/Makefile
index 2c37e7b..d59bb09 100644
--- a/drivers/soc/brcmstb/Makefile
+++ b/drivers/soc/brcmstb/Makefile
@@ -3,6 +3,7 @@
 obj-y				+= common.o biuctrl.o
 obj-$(CONFIG_BRCMSTB_BMEM)	+= bmem.o
 obj-$(CONFIG_BRCMSTB_CMA)	+= cma_driver.o
+obj-$(CONFIG_BRCMSTB_IRQ0_STUB)	+= irq0-stub.o
 obj-$(CONFIG_BRCMSTB_MEMORY_API) += memory.o
 obj-$(CONFIG_BRCMSTB_SRPD)	+= srpd.o
 obj-$(CONFIG_BRCMSTB_WKTMR)	+= wktmr.o
diff --git a/drivers/soc/brcmstb/irq0-stub.c b/drivers/soc/brcmstb/irq0-stub.c
new file mode 100644
index 0000000..9a8a006
--- /dev/null
+++ b/drivers/soc/brcmstb/irq0-stub.c
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2015 Broadcom Corporation
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include <linux/brcmstb/brcmstb.h>
+#include <linux/syscore_ops.h>
+#include <soc/brcmstb/common.h>
+
+static void __brcmstb_irq0_init(void)
+{
+	BDEV_WR(BCHP_IRQ0_IRQEN, BCHP_IRQ0_IRQEN_uarta_irqen_MASK
+		| BCHP_IRQ0_IRQEN_uartb_irqen_MASK
+		| BCHP_IRQ0_IRQEN_uartc_irqen_MASK
+	);
+}
+
+#ifdef CONFIG_PM_SLEEP
+static struct syscore_ops brcmstb_irq0_syscore_ops = {
+	.resume         = __brcmstb_irq0_init,
+};
+#endif
+
+static int brcmstb_irq0_init(void)
+{
+	if (!soc_is_brcmstb())
+		return 0;
+
+	__brcmstb_irq0_init();
+#ifdef CONFIG_PM_SLEEP
+	register_syscore_ops(&brcmstb_irq0_syscore_ops);
+#endif
+
+	return 0;
+}
+early_initcall(brcmstb_irq0_init);