brcm63xx: fix brcm, bcm6345-ext-intc interrupt controller
[oweals/openwrt.git] / target / linux / brcm63xx / patches-4.1 / 367-MIPS-BCM63XX-add-support-for-loading-DTB.patch
index 577df55d0ebf4a9f7977a37d993d3e4c2abe3461..5ab76e4310b7064bc149442d76050ad4202d409a 100644 (file)
@@ -1,12 +1,14 @@
-From db896341299cbcb703821228574ba9b79b6a3565 Mon Sep 17 00:00:00 2001
+From 26546e5499d98616322fb3472b977e2e86603f3a Mon Sep 17 00:00:00 2001
 From: Jonas Gorski <jogo@openwrt.org>
 Date: Tue, 24 Jun 2014 10:57:51 +0200
 Subject: [PATCH 45/48] MIPS: BCM63XX: add support for loading DTB
 
+Signed-off-by: Jonas Gorski <jogo@openwrt.org>
 ---
- arch/mips/bcm63xx/boards/Kconfig        |  4 ++++
- arch/mips/bcm63xx/boards/board_common.c | 34 +++++++++++++++++++++++++++++++++
- 2 files changed, 38 insertions(+)
+ arch/mips/bcm63xx/boards/Kconfig        |    4 ++++
+ arch/mips/bcm63xx/boards/board_common.c |   34 +++++++++++++++++++++++++++++++
+ arch/mips/bcm63xx/prom.c                |    6 ++++++
+ 3 files changed, 44 insertions(+)
 
 --- a/arch/mips/bcm63xx/boards/Kconfig
 +++ b/arch/mips/bcm63xx/boards/Kconfig
@@ -23,7 +25,7 @@ Subject: [PATCH 45/48] MIPS: BCM63XX: add support for loading DTB
        select SSB
 --- a/arch/mips/bcm63xx/boards/board_common.c
 +++ b/arch/mips/bcm63xx/boards/board_common.c
-@@ -10,6 +10,8 @@
+@@ -10,12 +10,15 @@
  #include <linux/init.h>
  #include <linux/kernel.h>
  #include <linux/string.h>
@@ -31,8 +33,7 @@ Subject: [PATCH 45/48] MIPS: BCM63XX: add support for loading DTB
 +#include <linux/of_platform.h>
  #include <linux/platform_device.h>
  #include <linux/ssb/ssb.h>
- #include <linux/gpio_keys.h>
-@@ -17,6 +19,7 @@
+ #include <linux/spi/spi.h>
  #include <asm/addrspace.h>
  #include <asm/bootinfo.h>
  #include <asm/fw/cfe/cfe_api.h>
@@ -40,7 +41,7 @@ Subject: [PATCH 45/48] MIPS: BCM63XX: add support for loading DTB
  #include <bcm63xx_board.h>
  #include <bcm63xx_cpu.h>
  #include <bcm63xx_dev_uart.h>
-@@ -129,8 +132,23 @@ void __init board_setup(void)
+@@ -126,8 +129,23 @@ void __init board_setup(void)
        /* make sure we're running on expected cpu */
        if (bcm63xx_get_cpu_id() != board.expected_cpu_id)
                panic("unexpected CPU for bcm963xx board");
@@ -64,8 +65,8 @@ Subject: [PATCH 45/48] MIPS: BCM63XX: add support for loading DTB
  static struct gpio_led_platform_data bcm63xx_led_data;
  
  static struct platform_device bcm63xx_gpio_leds = {
-@@ -149,6 +167,13 @@ static struct platform_device bcm63xx_gp
-       .dev.platform_data = &bcm63xx_gpio_keys_data,
+@@ -136,6 +154,13 @@ static struct platform_device bcm63xx_gp
+       .dev.platform_data      = &bcm63xx_led_data,
  };
  
 +#if CONFIG_OF
@@ -78,8 +79,8 @@ Subject: [PATCH 45/48] MIPS: BCM63XX: add support for loading DTB
  /*
   * third stage init callback, register all board devices.
   */
-@@ -158,6 +183,15 @@ int __init board_register_devices(void)
-       int led_count = 0;
+@@ -143,6 +168,15 @@ int __init board_register_devices(void)
+ {
        int usbh_ports = 0;
  
 +#if CONFIG_OF
@@ -94,3 +95,25 @@ Subject: [PATCH 45/48] MIPS: BCM63XX: add support for loading DTB
        if (board.has_uart0)
                bcm63xx_uart_register(0);
  
+--- a/arch/mips/bcm63xx/prom.c
++++ b/arch/mips/bcm63xx/prom.c
+@@ -8,6 +8,7 @@
+ #include <linux/init.h>
+ #include <linux/bootmem.h>
++#include <linux/of_fdt.h>
+ #include <linux/smp.h>
+ #include <asm/bootinfo.h>
+ #include <asm/bmips.h>
+@@ -23,6 +24,11 @@ void __init prom_init(void)
+ {
+       u32 reg, mask;
++#if CONFIG_OF
++      if (fw_arg0 == -2)
++              early_init_dt_verify((void *)fw_arg1);
++#endif
++
+       bcm63xx_cpu_init();
+       /* stop any running watchdog */