summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2014-05-05 11:06:17 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-05-05 11:06:17 +0200
commit8fb1d4e0758fbeb91dd82541f7c769e2d1e6900a (patch)
treef8d8f474a0882dc0d65dafae17541e1c53fb3507 /arch
parent4626972921355dd8ed97f4a0d71a00950f2364e0 (diff)
parentb7cc37eedf1663edd62179715ad1deb44421444a (diff)
downloadbarebox-8fb1d4e0758fbeb91dd82541f7c769e2d1e6900a.tar.gz
barebox-8fb1d4e0758fbeb91dd82541f7c769e2d1e6900a.tar.xz
Merge branch 'for-next/mips'
Conflicts: arch/mips/boards/loongson-ls1b/serial.c
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/boards/loongson-ls1b/Makefile1
-rw-r--r--arch/mips/boards/loongson-ls1b/ram.c12
-rw-r--r--arch/mips/boards/loongson-ls1b/serial.c12
-rw-r--r--arch/mips/configs/loongson-ls1b_defconfig6
-rw-r--r--arch/mips/configs/tplink-mr3020_defconfig7
-rw-r--r--arch/mips/dts/ar9331.dtsi6
-rw-r--r--arch/mips/dts/loongson-ls1b.dts16
-rw-r--r--arch/mips/dts/ls1b.dtsi43
-rw-r--r--arch/mips/dts/tplink-mr3020.dts20
9 files changed, 97 insertions, 26 deletions
diff --git a/arch/mips/boards/loongson-ls1b/Makefile b/arch/mips/boards/loongson-ls1b/Makefile
index a21952b737..31c062987f 100644
--- a/arch/mips/boards/loongson-ls1b/Makefile
+++ b/arch/mips/boards/loongson-ls1b/Makefile
@@ -1,2 +1 @@
-obj-y += ram.o
obj-y += serial.o
diff --git a/arch/mips/boards/loongson-ls1b/ram.c b/arch/mips/boards/loongson-ls1b/ram.c
deleted file mode 100644
index 9e655aba50..0000000000
--- a/arch/mips/boards/loongson-ls1b/ram.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#include <common.h>
-#include <init.h>
-#include <sizes.h>
-#include <asm/memory.h>
-
-static int mem_init(void)
-{
- mips_add_ram0(SZ_64M);
-
- return 0;
-}
-mem_initcall(mem_init);
diff --git a/arch/mips/boards/loongson-ls1b/serial.c b/arch/mips/boards/loongson-ls1b/serial.c
index 7159ab7a5c..a9453ede28 100644
--- a/arch/mips/boards/loongson-ls1b/serial.c
+++ b/arch/mips/boards/loongson-ls1b/serial.c
@@ -1,22 +1,10 @@
#include <common.h>
#include <init.h>
-#include <ns16550.h>
-
-#include <mach/loongson1.h>
-
-static struct NS16550_plat serial_plat = {
- .clock = 83000000,
- .shift = 0,
-};
static int console_init(void)
{
- barebox_set_model("Loongson Tech LS1B Demo Board");
barebox_set_hostname("ls1b");
- add_ns16550_device(DEVICE_ID_DYNAMIC, KSEG1ADDR(LS1X_UART2_BASE),
- 8, IORESOURCE_MEM | IORESOURCE_MEM_8BIT, &serial_plat);
-
return 0;
}
console_initcall(console_init);
diff --git a/arch/mips/configs/loongson-ls1b_defconfig b/arch/mips/configs/loongson-ls1b_defconfig
index 0322052a3e..bc48abad79 100644
--- a/arch/mips/configs/loongson-ls1b_defconfig
+++ b/arch/mips/configs/loongson-ls1b_defconfig
@@ -1,3 +1,5 @@
+CONFIG_BUILTIN_DTB=y
+CONFIG_BUILTIN_DTB_NAME="loongson-ls1b"
CONFIG_MACH_MIPS_LOONGSON=y
CONFIG_PBL_IMAGE=y
CONFIG_STACK_SIZE=0x7000
@@ -36,7 +38,11 @@ CONFIG_CMD_IOMEM=y
CONFIG_FLEXIBLE_BOOTARGS=y
CONFIG_CMD_RESET=y
CONFIG_CMD_GO=y
+CONFIG_CMD_OFTREE=y
+CONFIG_CMD_OF_PROPERTY=y
+CONFIG_CMD_OF_NODE=y
CONFIG_CMD_TIMEOUT=y
+CONFIG_OFDEVICE=y
# CONFIG_SPI is not set
CONFIG_ZLIB=y
CONFIG_BZLIB=y
diff --git a/arch/mips/configs/tplink-mr3020_defconfig b/arch/mips/configs/tplink-mr3020_defconfig
index 2e925d9e3c..d249919bed 100644
--- a/arch/mips/configs/tplink-mr3020_defconfig
+++ b/arch/mips/configs/tplink-mr3020_defconfig
@@ -14,16 +14,21 @@ CONFIG_CMD_MEMINFO=y
CONFIG_CMD_IOMEM=y
CONFIG_CMD_MM=y
CONFIG_CMD_SHA1SUM=y
+CONFIG_CMD_FLASH=y
# CONFIG_CMD_BOOTM is not set
CONFIG_CMD_RESET=y
CONFIG_CMD_GO=y
CONFIG_CMD_OFTREE=y
CONFIG_CMD_OF_PROPERTY=y
CONFIG_CMD_OF_NODE=y
+CONFIG_CMD_SPI=y
CONFIG_CMD_CLK=y
CONFIG_OFDEVICE=y
CONFIG_DRIVER_SERIAL_AR933X=y
-# CONFIG_SPI is not set
+CONFIG_DRIVER_SPI_ATH79=y
+CONFIG_MTD=y
+# CONFIG_MTD_OOB_DEVICE is not set
+CONFIG_MTD_M25P80=y
CONFIG_MD5=y
CONFIG_SHA224=y
CONFIG_SHA256=y
diff --git a/arch/mips/dts/ar9331.dtsi b/arch/mips/dts/ar9331.dtsi
index 890fda8ab5..9485fbff50 100644
--- a/arch/mips/dts/ar9331.dtsi
+++ b/arch/mips/dts/ar9331.dtsi
@@ -22,5 +22,11 @@
reg = <0xb8050000 0x48>;
#clock-cells = <1>;
};
+
+ spi: spi@bf000000{
+ compatible = "qca,ath79-spi";
+ reg = <0xbf000000 0x01000000>;
+ status = "disabled";
+ };
};
};
diff --git a/arch/mips/dts/loongson-ls1b.dts b/arch/mips/dts/loongson-ls1b.dts
new file mode 100644
index 0000000000..b81a951dc7
--- /dev/null
+++ b/arch/mips/dts/loongson-ls1b.dts
@@ -0,0 +1,16 @@
+/dts-v1/;
+
+#include "ls1b.dtsi"
+
+/ {
+ model = "Loongson Tech LS1B Demo Board";
+ compatible = "loongson,ls1b";
+
+ memory {
+ reg = <0x00000000 0x4000000>;
+ };
+};
+
+&serial2 {
+ status = "okay";
+};
diff --git a/arch/mips/dts/ls1b.dtsi b/arch/mips/dts/ls1b.dtsi
new file mode 100644
index 0000000000..f4ff8b6edd
--- /dev/null
+++ b/arch/mips/dts/ls1b.dtsi
@@ -0,0 +1,43 @@
+#include "skeleton.dtsi"
+
+/ {
+ soc {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "simple-bus";
+ device_type = "soc";
+ ranges;
+
+ serial0: serial@bfe40000 {
+ compatible = "ns16550a";
+ reg = <0xbfe40000 0x8>;
+ reg-shift = <0>;
+ clock-frequency = <83000000>;
+ status = "disabled";
+ };
+
+ serial1: serial@bfe44000 {
+ compatible = "ns16550a";
+ reg = <0xbfe44000 0x8>;
+ reg-shift = <0>;
+ clock-frequency = <83000000>;
+ status = "disabled";
+ };
+
+ serial2: serial@bfe48000 {
+ compatible = "ns16550a";
+ reg = <0xbfe48000 0x8>;
+ reg-shift = <0>;
+ clock-frequency = <83000000>;
+ status = "disabled";
+ };
+
+ serial3: serial@bfe4c000 {
+ compatible = "ns16550a";
+ reg = <0xbfe4c000 0x8>;
+ reg-shift = <0>;
+ clock-frequency = <83000000>;
+ status = "disabled";
+ };
+ };
+};
diff --git a/arch/mips/dts/tplink-mr3020.dts b/arch/mips/dts/tplink-mr3020.dts
index 9845bced75..41be352e5d 100644
--- a/arch/mips/dts/tplink-mr3020.dts
+++ b/arch/mips/dts/tplink-mr3020.dts
@@ -14,3 +14,23 @@
&serial0 {
status = "okay";
};
+
+&spi {
+ num-chipselects = <1>;
+ status = "okay";
+
+ /* Spansion S25FL032PIF SPI flash */
+ spiflash: m25p80@0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "m25p80";
+ spi-max-frequency = <104000000>;
+ reg = <0>;
+ };
+};
+
+/ {
+ aliases {
+ spiflash = &spiflash;
+ };
+};