1
0
mirror of https://git.yoctoproject.org/meta-ti synced 2026-05-07 03:49:20 +00:00

u-boot 2011.12: fix beagleboard C4 memory detection

Test results (which emberassingly enough lack an actual C4):

BeagleBoard B6:

	OMAP3530-GP ES2.1, CPU-OPP2, L3-165MHz, Max CPU Clock 600 mHz
	OMAP3 Beagle board + LPDDR/NAND
	I2C:   ready
	DRAM:  128 MiB
	NAND:  256 MiB
	[..]
	Beagle Rev Ax/Bx

BeagleBoard C3:

	OMAP3530-GP ES3.0, CPU-OPP2, L3-165MHz, Max CPU Clock 600 mHz
	OMAP3 Beagle board + LPDDR/NAND
	I2C:   ready
	DRAM:  256 MiB
	NAND:  256 MiB
	[..]
	Beagle Rev C1/C2/C3

BeagleBoard C5:

	OMAP3530-GP ES3.1, CPU-OPP2, L3-165MHz, Max CPU Clock 720 mHz
	OMAP3 Beagle board + LPDDR/NAND
	I2C:   ready
	DRAM:  256 MiB
	NAND:  512 MiB
	[..]
	Beagle Rev C4

BeagleBoard xM A:

	OMAP3630/3730-GP ES1.1, CPU-OPP2, L3-165MHz, Max CPU Clock 1 Ghz
	OMAP3 Beagle board + LPDDR/NAND
	I2C:   ready
	DRAM:  512 MiB
	NAND:  0 MiB
	[..]
	Beagle xM Rev A

BeagleBoard xM C:

	OMAP3630/3730-GP ES1.2, CPU-OPP2, L3-165MHz, Max CPU Clock 1 Ghz
	OMAP3 Beagle board + LPDDR/NAND
	I2C:   ready
	DRAM:  512 MiB
	NAND:  0 MiB
	[..]
	Beagle xM Rev C

Acked-by: Tom Rini <trini@ti.com>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
This commit is contained in:
Koen Kooi
2012-01-29 13:45:58 +01:00
parent bfbb1cc110
commit 149faa3769
11 changed files with 146 additions and 27 deletions
@@ -1,7 +1,7 @@
From d0556964b6bd443e8b60d5c0b3326795a02cc8a7 Mon Sep 17 00:00:00 2001
From e435374789db01c9499ec169b295496f039ec401 Mon Sep 17 00:00:00 2001
From: Koen Kooi <koen@dominion.thruhere.net>
Date: Sun, 27 Nov 2011 14:43:58 +0100
Subject: [PATCH 1/5] beagleboard: mount rootfs RO instead of RW at boot
Subject: [PATCH 01/10] beagleboard: mount rootfs RO instead of RW at boot
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
@@ -1,7 +1,7 @@
From 28e5cc1f13d817f75638c72eae853e53510a1ab2 Mon Sep 17 00:00:00 2001
From 7c1bb614d0235c69e118f0552cbf46047f557b8c Mon Sep 17 00:00:00 2001
From: Koen Kooi <koen@dominion.thruhere.net>
Date: Sat, 8 Oct 2011 21:56:35 +0200
Subject: [PATCH 2/5] beagleboard: add support for TCT Beacon board
Subject: [PATCH 02/10] beagleboard: add support for TCT Beacon board
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
@@ -1,7 +1,7 @@
From fe9c653a0b0a3fa49d269b697c2058a6a55aa42b Mon Sep 17 00:00:00 2001
From c8c3b1adff56c49f20732846a7087e95f6916e61 Mon Sep 17 00:00:00 2001
From: Koen Kooi <koen@dominion.thruhere.net>
Date: Sun, 27 Nov 2011 14:53:56 +0100
Subject: [PATCH 3/5] beagleboard: add support for scanning loop-through expansionboards like the uLCD-lite
Subject: [PATCH 03/10] beagleboard: add support for scanning loop-through expansionboards like the uLCD-lite
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
@@ -1,7 +1,7 @@
From 90dfb660575f15ba736884139f35bfd4ba927468 Mon Sep 17 00:00:00 2001
From e4ac25df241bc2f3e6e2b7116529e82dfa5aab00 Mon Sep 17 00:00:00 2001
From: Koen Kooi <koen@dominion.thruhere.net>
Date: Thu, 8 Dec 2011 17:22:59 +0100
Subject: [PATCH 4/5] omap4-common: mount root RO
Subject: [PATCH 04/10] omap4-common: mount root RO
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
@@ -1,7 +1,7 @@
From a1f9453f2450762249aa35bd5ae97150acc53eb2 Mon Sep 17 00:00:00 2001
From 9e4679bdc5a2f3908f9d5e757c9706c0040e3643 Mon Sep 17 00:00:00 2001
From: Koen Kooi <koen@dominion.thruhere.net>
Date: Thu, 8 Dec 2011 17:23:24 +0100
Subject: [PATCH 5/5] omap4-common: use ext4 by default
Subject: [PATCH 05/10] omap4-common: use ext4 by default
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
@@ -1,13 +1,10 @@
From patchwork Thu Dec 22 09:56:35 2011
Content-Type: text/plain; charset="utf-8"
From 64e971ecd4bb1dec118b5687dfa7c57790922bba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmx.de>
Date: Wed, 21 Dec 2011 23:56:35 +0000
Subject: [PATCH 06/10] OMAP MMC: Add delay before waiting for status
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Subject: [U-Boot] OMAP MMC: Add delay before waiting for status
Date: Wed, 21 Dec 2011 23:56:35 -0000
From: =?utf-8?q?Andreas_M=C3=BCller_=3Cschnitzeltony=40gmx=2Ede=3E?=
X-Patchwork-Id: 132795
Message-Id: <1324547795-19678-1-git-send-email-schnitzeltony@gmx.de>
To: u-boot@lists.denx.de
Loading kernel from MMC created the following error message reproducable:
@@ -23,9 +20,8 @@ Tested on overo with OMAP3530:
Die ID #112000040000000004035c140101b011
Signed-off-by: Andreas Müller <schnitzeltony@gmx.de>
---
drivers/mmc/omap_hsmmc.c | 4 ++++
drivers/mmc/omap_hsmmc.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c
@@ -43,3 +39,6 @@ index c38b9e6..ac91e5d 100644
start = get_timer(0);
while ((readl(&mmc_base->pstate) & DATI_MASK) == DATI_CMDDIS) {
if (get_timer(0) - start > MAX_RETRY_MS) {
--
1.7.2.5
@@ -0,0 +1,43 @@
From 06fe8be6b5c70853c0e3fac93d7bba9cb3d0292f Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 21 Dec 2011 08:53:02 -0800
Subject: [PATCH 07/10] config: Always use GNU ld
This patch makes sure that we always use the GNU ld. u-boot uses certain
construct e.g. OVERLAY which are not implemented in gold therefore it
always needs GNU ld for linking. It works well if default linker in
toolchain is GNU ld but in some cases we can have gold to be the
default linker and also ship GNU ld but not as default in such cases
its called $(PREFIX)ld.bfd, with this patch we make sure that if
$(PREFIX)ld.bfd exists than we use that for our ld. This way it
does not matter what the default ld is.
Upstream-status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
config.mk | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/config.mk b/config.mk
index ddaa477..59b3e71 100644
--- a/config.mk
+++ b/config.mk
@@ -126,11 +126,13 @@ cc-option = $(strip $(if $(findstring $1,$(CC_OPTIONS)),$1,\
$(if $(call cc-option-sys,$1),$1,$2)))
endif
+exists_bfd_ld = $(shell if $(CROSS_COMPILE)ld.bfd -v >& /dev/null; \
+ then echo "$(1)"; else echo "$(2)"; fi; )
#
# Include the make variables (CC, etc...)
#
AS = $(CROSS_COMPILE)as
-LD = $(CROSS_COMPILE)ld
+LD = $(call exists_bfd_ld, "$(CROSS_COMPILE)ld.bfd", "$(CROSS_COMPILE)ld")
CC = $(CROSS_COMPILE)gcc
CPP = $(CC) -E
AR = $(CROSS_COMPILE)ar
--
1.7.2.5
@@ -1,7 +1,7 @@
From 9ac047a112d8c6fe25e71a78946dbe9d707abd98 Mon Sep 17 00:00:00 2001
From 076f5b5c65a0f0652f5ba8b5328c52c76e951aaa Mon Sep 17 00:00:00 2001
From: Philip Balister <philip@opensdr.com>
Date: Mon, 16 Jan 2012 09:45:11 -0500
Subject: [PATCH] Revert "armv7: disable L2 cache in cleanup_before_linux()"
Subject: [PATCH 08/10] Revert "armv7: disable L2 cache in cleanup_before_linux()"
This reverts commit dc7100f4080952798413fb63bb4134b22c57623a.
---
@@ -21,5 +21,5 @@ index 662c496..091e3e0 100644
/*
* After D-cache is flushed and before it is disabled there may
--
1.7.6.5
1.7.2.5
@@ -0,0 +1,37 @@
From 588d0e7259e17f302cb79d12ed0f47410a0d8697 Mon Sep 17 00:00:00 2001
From: robertcnelson@gmail.com <robertcnelson@gmail.com>
Date: Fri, 27 Jan 2012 07:09:42 +0000
Subject: [PATCH 09/10] Beagleboard: Correct memory size on rev C4
Beagleboard: Correct memory size on rev C4
The logic for the rev C4 boards was missing one of the cases
(variant with Micron NAND and 2x128MB).
Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
board/ti/beagle/beagle.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
index 5ea50d1..4555977 100644
--- a/board/ti/beagle/beagle.c
+++ b/board/ti/beagle/beagle.c
@@ -169,6 +169,13 @@ void get_board_mem_timings(u32 *mcfg, u32 *ctrla, u32 *ctrlb, u32 *rfr_ctrl,
*ctrlb = NUMONYX_V_ACTIMB_165;
*rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_165MHz;
break;
+ } else if (pop_mfr == NAND_MFR_MICRON && pop_id == 0xba) {
+ /* Beagleboard Rev C4, 512MB Nand/256MB DDR*/
+ *mcfg = MICRON_V_MCFG_165(128 << 20);
+ *ctrla = MICRON_V_ACTIMA_165;
+ *ctrlb = MICRON_V_ACTIMB_165;
+ *rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_165MHz;
+ break;
} else if (pop_mfr == NAND_MFR_MICRON && pop_id == 0xbc) {
/* Beagleboard Rev C5, 256MB DDR */
*mcfg = MICRON_V_MCFG_200(256 << 20);
--
1.7.2.5
@@ -0,0 +1,37 @@
From 351fcc22c10beb005f589584b91298269a81aa52 Mon Sep 17 00:00:00 2001
From: Tom Rini <trini@ti.com>
Date: Wed, 18 Jan 2012 08:28:50 +0000
Subject: [PATCH 10/10] OMAP3: Correct get_sdr_cs_offset mask
OMAP3: Correct get_sdr_cs_offset mask
The function get_sdr_cs_offset reads the CS_CFG register in the SDRC
to determine where CS1 is mapped to. make_cs1_contiguous() will set
CS1 to follow after CS0. The CS_CFG register has values in bits 9:8
and 3:0 but we had erroneously been testing 5:4 and 3:0 resulting in
incorrect offsets on platforms with less than 128MB as 3:0 describe
128MB hunks and 9:8 describe 32MB offsets after the 128MB hunk.
Tested-by: Grant Erickson <marathon96@gmail.com>
Signed-off-by: Tom Rini <trini@ti.com>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
arch/arm/cpu/armv7/omap3/sdrc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/cpu/armv7/omap3/sdrc.c b/arch/arm/cpu/armv7/omap3/sdrc.c
index a27b4b1..91f42c0 100644
--- a/arch/arm/cpu/armv7/omap3/sdrc.c
+++ b/arch/arm/cpu/armv7/omap3/sdrc.c
@@ -102,7 +102,7 @@ u32 get_sdr_cs_offset(u32 cs)
return 0;
offset = readl(&sdrc_base->cs_cfg);
- offset = (offset & 15) << 27 | (offset & 0x30) << 17;
+ offset = (offset & 15) << 27 | (offset & 0x300) << 17;
return offset;
}
--
1.7.2.5
+7 -4
View File
@@ -6,13 +6,13 @@ UBOOT_IMAGE = "u-boot-${MACHINE}-${PV}-${PR}.img"
UBOOT_SYMLINK = "u-boot-${MACHINE}.img"
PV = "2011.12"
PR = "r3"
PR = "r4"
# No patches for other machines yet
COMPATIBLE_MACHINE = "(beagleboard|pandaboard|hawkboard|am3517-evm|am37x-evm|omap3evm)"
# Non-omap4 platforms need outer cache turned on
CACHEFIX = "file://2011.12/0001-Revert-armv7-disable-L2-cache-in-cleanup_before_linu.patch"
CACHEFIX = "file://2011.12/0008-Revert-armv7-disable-L2-cache-in-cleanup_before_linu.patch"
CACHEFIX_omap4 = ""
SRC_URI = "git://www.denx.de/git/u-boot.git;protocol=git \
@@ -21,11 +21,14 @@ SRC_URI = "git://www.denx.de/git/u-boot.git;protocol=git \
file://2011.12/0003-beagleboard-add-support-for-scanning-loop-through-ex.patch \
file://2011.12/0004-omap4-common-mount-root-RO.patch \
file://2011.12/0005-omap4-common-use-ext4-by-default.patch \
file://2011.12/U-Boot-OMAP-MMC-Add-delay-before-waiting-for-status.patch \
file://0001-config-Always-use-GNU-ld.patch \
file://2011.12/0006-OMAP-MMC-Add-delay-before-waiting-for-status.patch \
file://2011.12/0007-config-Always-use-GNU-ld.patch \
${CACHEFIX} \
file://2011.12/0009-Beagleboard-Correct-memory-size-on-rev-C4.patch \
file://2011.12/0010-OMAP3-Correct-get_sdr_cs_offset-mask.patch \
"
# v2011.12 tag
SRCREV = "cba9a894fdb1cb49b60fcd1d1d6919cbd7995dd5"