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@chromium.org>
Signed-off-by: David Hendricks <dhendrix@chromium.org>
Reviewed-on: http://review.coreboot.org/3121
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: build bot (Jenkins)
This commit is contained in:
David Hendricks 2013-04-22 16:03:11 -07:00
parent e8a91347b1
commit aee444f453
1 changed files with 7 additions and 3 deletions

View File

@ -416,7 +416,12 @@ void clock_gate(void)
CLK_SPI2_MASK | CLK_SPI2_MASK |
CLK_SPI0_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 | clrbits_le32(&clk->gate_ip_peris, CLK_RTC_MASK |
CLK_TZPC9_MASK | CLK_TZPC9_MASK |
CLK_TZPC8_MASK | CLK_TZPC8_MASK |
@ -427,8 +432,7 @@ void clock_gate(void)
CLK_TZPC3_MASK | CLK_TZPC3_MASK |
CLK_TZPC2_MASK | CLK_TZPC2_MASK |
CLK_TZPC1_MASK | CLK_TZPC1_MASK |
CLK_TZPC0_MASK | CLK_TZPC0_MASK);
CLK_CHIPID_MASK);
/* CLK_GATE_BLOCK */ /* CLK_GATE_BLOCK */
clrbits_le32(&clk->gate_block, CLK_ACP_MASK); clrbits_le32(&clk->gate_block, CLK_ACP_MASK);