Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2584)

Unified Diff: drivers/spi/tegra2_spi.c

Issue 6670098: spi: Tegra2: increase SPI FLASH clock to 24MHz (Closed) Base URL: http://git.chromium.org/git/u-boot-next@chromeos-v2010.09
Patch Set: Fix CLK_SOURCE_SPI mask Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: drivers/spi/tegra2_spi.c
diff --git a/drivers/spi/tegra2_spi.c b/drivers/spi/tegra2_spi.c
index 177bc71b0d148825131f8f231cd1365de5d6d51c..7a85971d3d50eab93b6d4898c1ad0269a050100c 100755
--- a/drivers/spi/tegra2_spi.c
+++ b/drivers/spi/tegra2_spi.c
@@ -91,9 +91,11 @@ void spi_init(void)
NV_CLK_RST_WRITE(0x14, (val | 0x800));
debug("spi_init: ClkEnable = %08x\n", val);
- /* Change default SPI clock from 12MHz to 6MHz, same as BootROM */
+ /* Change SPI clock to 24MHz */
NV_CLK_RST_READ(0x114, val);
- NV_CLK_RST_WRITE(0x114, (val | 0x2));
+ val &= 0x3FFFFF00; /* src = PLLP_OUT0 */
+ val |= ((9-1) << 1); /* div = 9 in 7.1 format */
+ NV_CLK_RST_WRITE(0x114, val);
debug("spi_init: ClkSrc = %08x\n", val);
NV_CLK_RST_READ(0x08, val);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698