diff options
Diffstat (limited to 'package/boot/uboot-kirkwood/patches/007-nsa310-uboot-generic.patch')
-rw-r--r-- | package/boot/uboot-kirkwood/patches/007-nsa310-uboot-generic.patch | 54 |
1 files changed, 12 insertions, 42 deletions
diff --git a/package/boot/uboot-kirkwood/patches/007-nsa310-uboot-generic.patch b/package/boot/uboot-kirkwood/patches/007-nsa310-uboot-generic.patch index 10d8d4405c..2ff916eb88 100644 --- a/package/boot/uboot-kirkwood/patches/007-nsa310-uboot-generic.patch +++ b/package/boot/uboot-kirkwood/patches/007-nsa310-uboot-generic.patch @@ -23,8 +23,6 @@ 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 @@ -45,9 +43,6 @@ index 9205b1e..819bd3b 100644 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 --- /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,14 +503,12 @@ 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,37 @@ +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_BOOTDELAY=3 @@ -552,6 +530,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 +542,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,119 @@ +/* Copyright (C) 2015-2016 bodhi <mibodhi@gmail.com> + * + * Based on @@ -617,7 +594,6 @@ index 0000000..86ef825 +/* + * Commands configuration + */ -+#define CONFIG_SYS_LONGHELP +#define CONFIG_PREBOOT + +/* @@ -648,16 +624,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 \ + "bootargs_root=\0" + +/* |