summaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorLokesh Vutla <lokeshvutla@ti.com>2016-03-04 10:36:41 -0600
committerTom Rini <trini@konsulko.com>2016-03-14 19:18:44 -0400
commitef76ebb1ef7b9b4c72c71b003c6617187e4cd7d9 (patch)
treea09633f36b04fd5b492c7ad3cc8d677fef540801 /arch/arm
parent5cd1f6bd7a44e8c3c62a548257bc5ceff61d1691 (diff)
downloadtalos-obmc-uboot-ef76ebb1ef7b9b4c72c71b003c6617187e4cd7d9.tar.gz
talos-obmc-uboot-ef76ebb1ef7b9b4c72c71b003c6617187e4cd7d9.zip
ARM: keystone2: K2G: Add support for different arm/device speeds
The maximum device and arm speeds can be determined by reading EFUSE_BOOTROM register. As there is already a framework for reading this register, adding support for all possible speeds on k2g devices. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-keystone/clock.c7
-rw-r--r--arch/arm/mach-keystone/include/mach/clock-k2g.h4
-rw-r--r--arch/arm/mach-keystone/include/mach/clock.h4
3 files changed, 11 insertions, 4 deletions
diff --git a/arch/arm/mach-keystone/clock.c b/arch/arm/mach-keystone/clock.c
index 1ae3baf982..b25db1e3fe 100644
--- a/arch/arm/mach-keystone/clock.c
+++ b/arch/arm/mach-keystone/clock.c
@@ -238,8 +238,11 @@ static int get_max_speed(u32 val, u32 speed_supported, int *spds)
return spds[speed];
}
- /* If no bit is set, use SPD800 */
- return SPD800;
+ /* If no bit is set, return minimum speed */
+ if (cpu_is_k2g())
+ return SPD200;
+ else
+ return SPD800;
}
static inline u32 read_efuse_bootrom(void)
diff --git a/arch/arm/mach-keystone/include/mach/clock-k2g.h b/arch/arm/mach-keystone/include/mach/clock-k2g.h
index 214c1d3a83..74de6202fe 100644
--- a/arch/arm/mach-keystone/include/mach/clock-k2g.h
+++ b/arch/arm/mach-keystone/include/mach/clock-k2g.h
@@ -12,8 +12,8 @@
#define PLLSET_CMD_LIST "<pa|arm|ddr3>"
-#define DEV_SUPPORTED_SPEEDS 0xfff
-#define ARM_SUPPORTED_SPEEDS 0xfff
+#define DEV_SUPPORTED_SPEEDS 0x1ff
+#define ARM_SUPPORTED_SPEEDS 0xff
#define KS2_CLK1_6 sys_clk0_6_clk
diff --git a/arch/arm/mach-keystone/include/mach/clock.h b/arch/arm/mach-keystone/include/mach/clock.h
index dfebcb03ea..72724aa4a9 100644
--- a/arch/arm/mach-keystone/include/mach/clock.h
+++ b/arch/arm/mach-keystone/include/mach/clock.h
@@ -63,8 +63,12 @@
#define CLOCK_INDEXES_LIST CLK_LIST(GENERATE_INDX_STR)
enum {
+ SPD200,
+ SPD400,
+ SPD600,
SPD800,
SPD850,
+ SPD900,
SPD1000,
SPD1200,
SPD1250,
OpenPOWER on IntegriCloud