summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2014-06-05 12:09:07 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-06-05 12:12:01 +0200
commite546f6d469ccbc2b155adad1a40a725a5a7e2f2b (patch)
treede4e3de5cd6481a21a5256bf0fabbacce79b5691
parentcbe45af87eaf64ddcaae8696b267381da8a45ae7 (diff)
downloadbarebox-e546f6d469ccbc2b155adad1a40a725a5a7e2f2b.tar.gz
ARM: AM335x: Beaglebone: Use stripped down devicetree for MLO
The beaglebone white and black have different devicetrees. Both get linked into the MLO which makes it too big. Use a devicetree generated from am335x-bone-common.dtsi which both board variants can share. This reduces the binary size by about 30k. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--arch/arm/boards/beaglebone/lowlevel.c10
-rw-r--r--arch/arm/dts/Makefile3
-rw-r--r--arch/arm/dts/am335x-bone-common.dts9
3 files changed, 16 insertions, 6 deletions
diff --git a/arch/arm/boards/beaglebone/lowlevel.c b/arch/arm/boards/beaglebone/lowlevel.c
index 66fd371..9b60092 100644
--- a/arch/arm/boards/beaglebone/lowlevel.c
+++ b/arch/arm/boards/beaglebone/lowlevel.c
@@ -104,6 +104,7 @@ static const struct am33xx_emif_regs ddr3_regs = {
};
extern char __dtb_am335x_boneblack_start[];
+extern char __dtb_am335x_bone_common_start[];
extern char __dtb_am335x_bone_start[];
/**
@@ -120,13 +121,12 @@ static noinline int beaglebone_sram_init(void)
uint32_t sdram_size;
void *fdt;
- if (is_beaglebone_black()) {
+ fdt = __dtb_am335x_bone_common_start;
+
+ if (is_beaglebone_black())
sdram_size = SZ_512M;
- fdt = __dtb_am335x_boneblack_start;
- } else {
+ else
sdram_size = SZ_256M;
- fdt = __dtb_am335x_bone_start;
- }
/* WDT1 is already running when the bootloader gets control
* Disable it to avoid "random" resets
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 76fba43..a79ac17 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -1,6 +1,7 @@
dtb-$(CONFIG_ARCH_AM33XX) += \
am335x-bone.dtb \
am335x-boneblack.dtb \
+ am335x-bone-common.dtb \
am335x-phytec-phycore.dtb
dtb-$(CONFIG_ARCH_IMX25) += imx25-karo-tx25.dtb
dtb-$(CONFIG_ARCH_IMX27) += imx27-phytec-phycard-s-rdk-bb.dtb
@@ -42,7 +43,7 @@ dtb-$(CONFIG_ARCH_TEGRA) += \
BUILTIN_DTB := $(patsubst "%",%,$(CONFIG_BUILTIN_DTB_NAME))
obj-$(CONFIG_BUILTIN_DTB) += $(BUILTIN_DTB).dtb.o
-pbl-$(CONFIG_MACH_BEAGLEBONE) += am335x-bone.dtb.o am335x-boneblack.dtb.o
+pbl-$(CONFIG_MACH_BEAGLEBONE) += am335x-bone.dtb.o am335x-boneblack.dtb.o am335x-bone-common.dtb.o
pbl-$(CONFIG_MACH_EFIKA_MX_SMARTBOOK) += imx51-genesi-efika-sb.dtb.o
pbl-$(CONFIG_MACH_EMBEST_RIOTBOARD) += imx6s-riotboard.dtb.o
pbl-$(CONFIG_MACH_FREESCALE_MX51_PDK) += imx51-babbage.dtb.o
diff --git a/arch/arm/dts/am335x-bone-common.dts b/arch/arm/dts/am335x-bone-common.dts
new file mode 100644
index 0000000..bbc5561
--- /dev/null
+++ b/arch/arm/dts/am335x-bone-common.dts
@@ -0,0 +1,9 @@
+/dts-v1/;
+
+#include "am33xx.dtsi"
+#include "am335x-bone-common.dtsi"
+
+/ {
+ model = "TI AM335x BeagleBone";
+ compatible = "ti,am335x-bone", "ti,am33xx";
+};