diff options
author | Simon Glass <sjg@chromium.org> | 2011-11-29 16:40:10 -0800 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2011-12-01 17:08:10 -0800 |
commit | dbd0840a39a15a950869901dd9668951fd35d01a (patch) | |
tree | 0a1f757ed598e60a911ad35c615caff12b064ead /arch/arm/include/asm | |
parent | 8d1c7cb54d17a831c8063e27a5187ca30f8d4874 (diff) |
tegra: Move tegra_get_chip_type() to ap20.c
This function is better off in architecture code than board code.
This is quite an invasive change unfortunately.
BUG=chromium-os:23496
TEST=build and boot on Seaboard, T33, Kaen
Change-Id: I17764b134c25b684666d2c0fae2d255ac80e61b1
Reviewed-on: https://gerrit.chromium.org/gerrit/12244
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Simon Glass <sjg@chromium.org>
Commit-Ready: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/arm/include/asm')
-rw-r--r-- | arch/arm/include/asm/arch-tegra/ap20.h | 11 | ||||
-rw-r--r-- | arch/arm/include/asm/arch-tegra/tegra.h | 6 |
2 files changed, 17 insertions, 0 deletions
diff --git a/arch/arm/include/asm/arch-tegra/ap20.h b/arch/arm/include/asm/arch-tegra/ap20.h index 0bc239977b..6c1e57eea3 100644 --- a/arch/arm/include/asm/arch-tegra/ap20.h +++ b/arch/arm/include/asm/arch-tegra/ap20.h @@ -118,3 +118,14 @@ void ap20_init_pllx(int slow); * @return number of CPUs (1-4) */ int ap20_get_num_cpus(void); + +/** + * Works out the SOC type used for clocks settings + * + * Note that T30 will return TEGRA_SOC_T30 until we have the fdt set up, + * when it may change to TEGRA_SOC_T30_408MHZ depending on what we set PLLP + * to. + * + * @return SOC type - see TEGRA_SOC... + */ +int tegra_get_chip_type(void); diff --git a/arch/arm/include/asm/arch-tegra/tegra.h b/arch/arm/include/asm/arch-tegra/tegra.h index 3820918c04..b7119c00b0 100644 --- a/arch/arm/include/asm/arch-tegra/tegra.h +++ b/arch/arm/include/asm/arch-tegra/tegra.h @@ -89,6 +89,12 @@ enum { SKU_ID_T30 = 0x81, /* TBD use real Cardhu value */ }; +/* + * These are used to distinguish SOC types for setting up clocks. Mostly + * we can tell the clocking required by looking at the SOC sku_id, but + * for T30 it is a user option as to whether to run PLLP in fast or slow + * mode, so we have two options there. + */ enum { TEGRA_SOC_T20, TEGRA_SOC_T25, |