uboot-kirkwood: update to 2019.01
[openwrt/openwrt.git] / package / boot / uboot-kirkwood / patches / 007-nsa310-uboot-generic.patch
index 10d8d4405c952bdff3c6c1c3d01a1f27ced9e32f..25d252d13fd5ea400d3ccf0649147201218ee868 100644 (file)
@@ -23,31 +23,26 @@ Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
 NOTE: this patch is ready for upstream, LEDE-specific parts are in
       another patch
 
-diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
-index 9205b1e..819bd3b 100644
 --- a/arch/arm/mach-kirkwood/Kconfig
 +++ b/arch/arm/mach-kirkwood/Kconfig
 @@ -56,6 +56,9 @@ config TARGET_GOFLEXHOME
  config TARGET_NAS220
        bool "BlackArmor NAS220"
+
 +config TARGET_NSA310
 +      bool "Zyxel NSA310 Board"
 +
  config TARGET_NSA310S
        bool "Zyxel NSA310S"
-@@ -80,6 +83,7 @@ source "board/raidsonic/ib62x0/Kconfig"
+
+@@ -86,6 +89,7 @@ source "board/raidsonic/ib62x0/Kconfig"
  source "board/Seagate/dockstar/Kconfig"
  source "board/Seagate/goflexhome/Kconfig"
  source "board/Seagate/nas220/Kconfig"
 +source "board/zyxel/nsa310/Kconfig"
  source "board/zyxel/nsa310s/Kconfig"
- endif
-diff --git a/board/zyxel/nsa310/Kconfig b/board/zyxel/nsa310/Kconfig
-new file mode 100644
-index 0000000..145ade6
+ source "board/alliedtelesis/SBx81LIFKW/Kconfig"
+ source "board/alliedtelesis/SBx81LIFXCAT/Kconfig"
 --- /dev/null
 +++ b/board/zyxel/nsa310/Kconfig
 @@ -0,0 +1,12 @@
@@ -63,9 +58,6 @@ index 0000000..145ade6
 +      default "nsa310"
 +
 +endif
-diff --git a/board/zyxel/nsa310/MAINTAINERS b/board/zyxel/nsa310/MAINTAINERS
-new file mode 100644
-index 0000000..d09f1ab
 --- /dev/null
 +++ b/board/zyxel/nsa310/MAINTAINERS
 @@ -0,0 +1,6 @@
@@ -75,9 +67,6 @@ index 0000000..d09f1ab
 +F:    board/zyxel/nsa310/
 +F:    include/configs/nsa310.h
 +F:    configs/nsa310_defconfig
-diff --git a/board/zyxel/nsa310/Makefile b/board/zyxel/nsa310/Makefile
-new file mode 100644
-index 0000000..dfe93cc
 --- /dev/null
 +++ b/board/zyxel/nsa310/Makefile
 @@ -0,0 +1,12 @@
@@ -93,9 +82,6 @@ index 0000000..dfe93cc
 +#
 +
 +obj-y := nsa310.o
-diff --git a/board/zyxel/nsa310/kwbimage.cfg b/board/zyxel/nsa310/kwbimage.cfg
-new file mode 100644
-index 0000000..f60e1d2
 --- /dev/null
 +++ b/board/zyxel/nsa310/kwbimage.cfg
 @@ -0,0 +1,166 @@
@@ -265,9 +251,6 @@ index 0000000..f60e1d2
 +
 +# End of Header extension
 +DATA 0x0 0x0
-diff --git a/board/zyxel/nsa310/nsa310.c b/board/zyxel/nsa310/nsa310.c
-new file mode 100644
-index 0000000..eee3f1a
 --- /dev/null
 +++ b/board/zyxel/nsa310/nsa310.c
 @@ -0,0 +1,190 @@
@@ -461,9 +444,6 @@ index 0000000..eee3f1a
 +      }
 +}
 +#endif
-diff --git a/board/zyxel/nsa310/nsa310.h b/board/zyxel/nsa310/nsa310.h
-new file mode 100644
-index 0000000..6634a4f
 --- /dev/null
 +++ b/board/zyxel/nsa310/nsa310.h
 @@ -0,0 +1,56 @@
@@ -501,19 +481,19 @@ index 0000000..6634a4f
 +/* GPIO's */
 +#define SYS_GREEN_LED         (1 << 28)
 +#define SYS_RED_LED           (1 << 29)
-+#define SATA1_GREEN_LED               (1 << 41)
-+#define SATA1_RED_LED         (1 << 42)
++#define SATA1_GREEN_LED               (1ULL << 41)
++#define SATA1_RED_LED         (1ULL << 42)
 +#define SATA2_GREEN_LED               (1 << 12)
 +#define SATA2_RED_LED         (1 << 13)
 +#define USB_GREEN_LED         (1 << 15)
 +#define USB_RED_LED           (1 << 21)
-+#define COPY_GREEN_LED                (1 << 39)
-+#define COPY_RED_LED          (1 << 40)
++#define COPY_GREEN_LED                (1ULL << 39)
++#define COPY_RED_LED          (1ULL << 40)
 +
 +#define NSA310_OE_LOW   (0)
 +#define NSA310_VAL_LOW    (SYS_GREEN_LED)
-+#define NSA310_OE_HIGH                ((COPY_GREEN_LED | COPY_RED_LED | \
-+                                   SATA1_GREEN_LED | SATA1_RED_LED))
++#define NSA310_OE_HIGH                (((COPY_GREEN_LED | COPY_RED_LED | \
++                                   SATA1_GREEN_LED | SATA1_RED_LED)) >> 32UL)
 +#define NSA310_VAL_HIGH               (0)
 +
 +/* PHY related */
@@ -523,20 +503,21 @@ index 0000000..6634a4f
 +#define MV88E1318_RGMII_RXTM_CTRL     (1 << 5)
 +
 +#endif /* __NSA310_H */
-diff --git a/configs/nsa310_defconfig b/configs/nsa310_defconfig
-new file mode 100644
-index 0000000..d26ef35
 --- /dev/null
 +++ b/configs/nsa310_defconfig
-@@ -0,0 +1,34 @@
+@@ -0,0 +1,40 @@
 +CONFIG_ARM=y
 +CONFIG_KIRKWOOD=y
++CONFIG_SYS_TEXT_BASE=0x600000
 +CONFIG_TARGET_NSA310=y
 +CONFIG_IDENT_STRING="\nZyXEL NSA310 1-Bay Power Media Server"
++CONFIG_NR_DRAM_BANKS=2
 +CONFIG_BOOTDELAY=3
 +CONFIG_SYS_PROMPT="NSA310> "
 +# CONFIG_CMD_IMLS is not set
 +# CONFIG_CMD_FLASH is not set
++CONFIG_MVGBE=y
++CONFIG_MII=y
 +CONFIG_SYS_NS16550=y
 +CONFIG_CMD_FDT=y
 +CONFIG_OF_LIBFDT=y
@@ -552,6 +533,7 @@ index 0000000..d26ef35
 +CONFIG_CMD_EXT4=y
 +CONFIG_CMD_FAT=y
 +CONFIG_CMD_JFFS2=y
++CONFIG_MTDPARTS_DEFAULT="mtdparts=orion_nand:0x0c0000(uboot),0x80000(uboot_env),0x7ec0000(ubi)"
 +CONFIG_CMD_MTDPARTS=y
 +CONFIG_CMD_ENV=y
 +CONFIG_CMD_NAND=y
@@ -563,12 +545,10 @@ index 0000000..d26ef35
 +CONFIG_USB_STORAGE=y
 +CONFIG_LZMA=y
 +CONFIG_LZO=y
-diff --git a/include/configs/nsa310.h b/include/configs/nsa310.h
-new file mode 100644
-index 0000000..86ef825
++CONFIG_SYS_LONGHELP=y
 --- /dev/null
 +++ b/include/configs/nsa310.h
-@@ -0,0 +1,126 @@
+@@ -0,0 +1,117 @@
 +/* Copyright (C) 2015-2016 bodhi <mibodhi@gmail.com>
 + *
 + * Based on
@@ -617,7 +597,6 @@ index 0000000..86ef825
 +/*
 + * Commands configuration
 + */
-+#define CONFIG_SYS_LONGHELP
 +#define CONFIG_PREBOOT
 +
 +/*
@@ -648,16 +627,10 @@ index 0000000..86ef825
 +      "ubi read 0x800000 kernel; " \
 +      "bootm 0x800000"
 +
-+#define CONFIG_MTDPARTS \
-+      "mtdparts=orion_nand:" \
-+      "0x0c0000(uboot)," \
-+      "0x80000(uboot_env)," \
-+      "0x7ec0000(ubi)\0"
-+
 +#define CONFIG_EXTRA_ENV_SETTINGS \
 +      "console=console=ttyS0,115200\0"        \
 +      "mtdids=nand0=orion_nand\0"             \
-+      "mtdparts="CONFIG_MTDPARTS              \
++      "mtdparts="CONFIG_MTDPARTS_DEFAULT "\0" \
 +      "bootargs_root=\0"
 +
 +/*
@@ -684,8 +657,6 @@ index 0000000..86ef825
 + */
 +#define CONFIG_JFFS2_NAND
 +#define CONFIG_JFFS2_LZO
-+#define CONFIG_MTD_DEVICE               /* needed for mtdparts commands */
-+#define CONFIG_MTD_PARTITIONS
 +
 +/*
 + *  Date Time