uboot-sunxi: various updates - use mainline uboot-sunxi version (2015.01-rc3) - add support for Bananapro

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>

SVN-Revision: 43899
owl
Zoltan Herpai 2015-01-09 19:19:35 +00:00
parent 48d8bc4f97
commit 157e1da749
7 changed files with 25118 additions and 11525 deletions

View File

@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=u-boot
PKG_VERSION:=2014.04
PKG_VERSION:=2015.01-rc3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:= \
http://mirror2.openwrt.org/sources \
ftp://ftp.denx.de/pub/u-boot
PKG_SOURCE_VERSION:=6d2116d1385a66e9a59742caa9d62a54
PKG_SOURCE_VERSION:=e680848838ca20a60d43b66a218d865b
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=GPL-2.0 GPL-2.0+
@ -35,7 +35,7 @@ define uboot/A13-OLinuXino
TITLE:=U-Boot for the A13 OlinuXino
endef
define uboot/A20-OLinuXino_Lime
define uboot/A20-OLinuXino-Lime
TITLE:=U-Boot for the A20 OLinuXino LIME
endef
@ -47,6 +47,10 @@ define uboot/Bananapi
TITLE:=U-Boot for Bananapi
endef
define uboot/Bananapro
TITLE:=U-Boot for Bananapro
endef
define uboot/Cubieboard
TITLE:=U-Boot for Cubieboard
endef
@ -63,12 +67,16 @@ define uboot/Hackberry
TITLE:=U-Boot for the Hackbeery
endef
define uboot/Mele_M9
TITLE:=U-Boot for the Mele M9 (A31)
endef
define uboot/OLIMEX-A13-SOM
TITLE:=U-Boot for the Olimex A13 SOM
endef
define uboot/pcDuino
TITLE:=U-Boot for pcDuino
define uboot/Linksprite_pcDuino
TITLE:=U-Boot for Linksprite pcDuino
endef
define uboot/Linksprite_pcDuino3
@ -78,15 +86,17 @@ endef
UBOOTS:= \
A10-OLinuXino-Lime \
A13-OLinuXino \
A20-OLinuXino_Lime \
A20-OLinuXino-Lime \
A20-OLinuXino_MICRO \
Bananapi \
Bananapro \
Cubieboard \
Cubieboard2 \
Cubietruck \
Hackberry \
Mele_M9 \
OLIMEX-A13-SOM \
pcDuino \
Linksprite_pcDuino \
Linksprite_pcDuino3 \
define Package/uboot/template
@ -115,7 +125,7 @@ endif
define Build/Configure
$(MAKE) -C $(PKG_BUILD_DIR) \
USE_PRIVATE_LIBGCC=yes $(UBOOT_CONFIG)_config
USE_PRIVATE_LIBGCC=yes $(UBOOT_CONFIG)_defconfig
endef
define Build/Compile
@ -133,6 +143,7 @@ define Package/uboot/install/default
$(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot-with-spl.bin
$(CP) uEnv.txt \
$(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-uEnv.txt
mkimage -C none -A arm -T script -d $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-uEnv.txt $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-boot.scr
endef
define Package/uboot/install/template

View File

@ -0,0 +1,71 @@
diff -ruN u-boot-2015.01-rc3.old/board/sunxi/dram_sun4i_408_1024_iow8.c u-boot-2015.01-rc3/board/sunxi/dram_sun4i_408_1024_iow8.c
--- u-boot-2015.01-rc3.old/board/sunxi/dram_sun4i_408_1024_iow8.c 1970-01-01 01:00:00.000000000 +0100
+++ u-boot-2015.01-rc3/board/sunxi/dram_sun4i_408_1024_iow8.c 2015-01-06 00:05:07.843497430 +0100
@@ -0,0 +1,31 @@
+/* this file is generated, don't edit it yourself */
+
+#include <common.h>
+#include <asm/arch/dram.h>
+
+static struct dram_para dram_para = {
+ .clock = 408,
+ .type = 3,
+ .rank_num = 1,
+ .density = 2048,
+ .io_width = 8,
+ .bus_width = 32,
+ .cas = 6,
+ .zq = 123,
+ .odt_en = 0,
+ .size = 1024,
+ .tpr0 = 0x30926692,
+ .tpr1 = 0x1090,
+ .tpr2 = 0x1a0c8,
+ .tpr3 = 0,
+ .tpr4 = 0,
+ .tpr5 = 0,
+ .emr1 = 0,
+ .emr2 = 0,
+ .emr3 = 0,
+};
+
+unsigned long sunxi_dram_init(void)
+{
+ return dramc_init(&dram_para);
+}
diff -ruN u-boot-2015.01-rc3.old/board/sunxi/Kconfig u-boot-2015.01-rc3/board/sunxi/Kconfig
--- u-boot-2015.01-rc3.old/board/sunxi/Kconfig 2014-12-08 22:35:08.000000000 +0100
+++ u-boot-2015.01-rc3/board/sunxi/Kconfig 2015-01-06 00:06:04.218573211 +0100
@@ -99,6 +99,10 @@
bool "IPPO_Q8H_V5"
depends on MACH_SUN8I
+config TARGET_PCDUINO
+ bool "PCDUINO"
+ depends on MACH_SUN4I
+
config TARGET_PCDUINO3
bool "PCDUINO3"
depends on MACH_SUN7I
diff -ruN u-boot-2015.01-rc3.old/board/sunxi/Makefile u-boot-2015.01-rc3/board/sunxi/Makefile
--- u-boot-2015.01-rc3.old/board/sunxi/Makefile 2014-12-08 22:35:08.000000000 +0100
+++ u-boot-2015.01-rc3/board/sunxi/Makefile 2015-01-06 00:05:43.718909285 +0100
@@ -31,6 +31,7 @@
obj-$(CONFIG_TARGET_MELE_M3) += dram_sun7i_384_1024_iow16.o
obj-$(CONFIG_TARGET_MINI_X) += dram_sun4i_360_512.o
obj-$(CONFIG_TARGET_MINI_X_1GB) += dram_sun4i_360_1024_iow16.o
+obj-$(CONFIG_TARGET_PCDUINO) += dram_sun4i_408_1024_iow8.o
obj-$(CONFIG_TARGET_PCDUINO3) += dram_linksprite_pcduino3.o
obj-$(CONFIG_TARGET_QT840A) += dram_sun7i_384_512_busw16_iow16.o
obj-$(CONFIG_TARGET_R7DONGLE) += dram_r7dongle.o
diff -ruN u-boot-2015.01-rc3.old/configs/Linksprite_pcDuino_defconfig u-boot-2015.01-rc3/configs/Linksprite_pcDuino_defconfig
--- u-boot-2015.01-rc3.old/configs/Linksprite_pcDuino_defconfig 1970-01-01 01:00:00.000000000 +0100
+++ u-boot-2015.01-rc3/configs/Linksprite_pcDuino_defconfig 2015-01-06 00:04:37.323997769 +0100
@@ -0,0 +1,7 @@
+CONFIG_SPL=y
+CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_EMAC,USB_EHCI"
+CONFIG_FDTFILE="sun4i-a10-pcduino.dtb"
++S:CONFIG_ARM=y
++S:CONFIG_ARCH_SUNXI=y
++S:CONFIG_MACH_SUN4I=y
++S:CONFIG_TARGET_PCDUINO=y

View File

@ -0,0 +1,22 @@
diff -ruN u-boot-2015.01-rc3.old/board/sunxi/Makefile u-boot-2015.01-rc3/board/sunxi/Makefile
--- u-boot-2015.01-rc3.old/board/sunxi/Makefile 2015-01-04 13:01:29.000000000 +0100
+++ u-boot-2015.01-rc3/board/sunxi/Makefile 2015-01-04 18:06:50.304380318 +0100
@@ -22,6 +22,7 @@
obj-$(CONFIG_TARGET_AUXTEK_T004) += dram_a10s_olinuxino_m.o
obj-$(CONFIG_TARGET_BA10_TV_BOX) += dram_sun4i_384_1024_iow8.o
obj-$(CONFIG_TARGET_BANANAPI) += dram_bananapi.o
+obj-$(CONFIG_TARGET_BANANAPI) += dram_bananapi.o
obj-$(CONFIG_TARGET_CUBIEBOARD) += dram_cubieboard.o
obj-$(CONFIG_TARGET_CUBIEBOARD2) += dram_cubieboard2.o
obj-$(CONFIG_TARGET_CUBIETRUCK) += dram_cubietruck.o
diff -ruN u-boot-2015.01-rc3.old/configs/Bananapro_defconfig u-boot-2015.01-rc3/configs/Bananapro_defconfig
--- u-boot-2015.01-rc3.old/configs/Bananapro_defconfig 1970-01-01 01:00:00.000000000 +0100
+++ u-boot-2015.01-rc3/configs/Bananapro_defconfig 2015-01-04 18:06:19.784880656 +0100
@@ -0,0 +1,7 @@
+CONFIG_SPL=y
+CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_GMAC,RGMII,MACPWR=SUNXI_GPH(23),AHCI,USB_EHCI"
+CONFIG_FDTFILE="sun7i-a20-bananapro.dtb"
++S:CONFIG_ARM=y
++S:CONFIG_ARCH_SUNXI=y
++S:CONFIG_MACH_SUN7I=y
++S:CONFIG_TARGET_BANANAPRO=y

View File

@ -1,20 +0,0 @@
diff --git a/board/sunxi/gmac.c b/board/sunxi/gmac.c
index e7ff952..f58c963 100644
--- a/board/sunxi/gmac.c
+++ b/board/sunxi/gmac.c
@@ -24,6 +24,15 @@ int sunxi_gmac_initialize(bd_t *bis)
CCM_GMAC_CTRL_GPIT_MII);
#endif
+ /*
+ * HdG: this is necessary to get GMAC to work reliable on the
+ * Bananapi. We don't know what these undocumented bits do, so this
+ * is a Bananapi specific hack for now.
+ */
+#ifdef CONFIG_BANANAPI
+ setbits_le32(&ccm->gmac_clk_cfg, 0x3 << 10);
+#endif
+
/* Configure pin mux settings for GMAC */
for (pin = SUNXI_GPA(0); pin <= SUNXI_GPA(16); pin++) {
#ifdef CONFIG_RGMII