[coreboot-gerrit] Patch set updated for coreboot: 9cd5ebe exynos5250: ungate the product ID register

David Hendricks (dhendrix@chromium.org) gerrit at coreboot.org
Tue Apr 23 01:58:27 CEST 2013


David Hendricks (dhendrix at chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3121

-gerrit

commit 9cd5ebe34dae69febebce240ca0123d4f4f9d2ec
Author: David Hendricks <dhendrix at chromium.org>
Date:   Mon Apr 22 16:03:11 2013 -0700

    exynos5250: ungate the product ID register
    
    This makes sure that the product ID (PRO_ID) register can be read
    when the OS kernel is figuring out what kind of CPU it's running on.
    
    For historical reference, the original U-Boot code seems to have
    worked basically by accident here. The hardware has a quirk where by
    reading the value before gating the IP block keeps the value
    persistent. U-Boot reads the chip ID early on to distinguish between
    chip family, but we do not mix code the same way so we do not read
    the chip ID. Since the value has been read before the clock gating
    happens, the value remains available for the kernel to use during the
    decompression stage. We don't want to rely on that behavior when using
    coreboot. Instead the kernel should gate unused IPs.
    
    (credit to Gabe for finding symptom in the kernel)
    
    Change-Id: Iaa21e6e718b9000b5558f568020f393779fd208e
    Signed-off-by: Gabe Black <gabeblack at chromium.org>
    Signed-off-by: David Hendricks <dhendrix at chromium.org>
---
 src/cpu/samsung/exynos5250/clock_init.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/cpu/samsung/exynos5250/clock_init.c b/src/cpu/samsung/exynos5250/clock_init.c
index c94cadf..0989b88 100644
--- a/src/cpu/samsung/exynos5250/clock_init.c
+++ b/src/cpu/samsung/exynos5250/clock_init.c
@@ -416,7 +416,12 @@ void clock_gate(void)
 					  CLK_SPI2_MASK |
 					  CLK_SPI0_MASK);
 
-	/* CLK_GATE_IP_PERIS */
+	/*
+	 * CLK_GATE_IP_PERIS
+	 * Note: Keep CHIPID_APBIF ungated to ensure reading the product ID
+	 * register (PRO_ID) works correctly when the OS kernel determines
+	 * which chip it is running on.
+	 */
 	clrbits_le32(&clk->gate_ip_peris, CLK_RTC_MASK |
 					  CLK_TZPC9_MASK |
 					  CLK_TZPC8_MASK |
@@ -427,8 +432,7 @@ void clock_gate(void)
 					  CLK_TZPC3_MASK |
 					  CLK_TZPC2_MASK |
 					  CLK_TZPC1_MASK |
-					  CLK_TZPC0_MASK |
-					  CLK_CHIPID_MASK);
+					  CLK_TZPC0_MASK);
 
 	/* CLK_GATE_BLOCK */
 	clrbits_le32(&clk->gate_block, CLK_ACP_MASK);



More information about the coreboot-gerrit mailing list