[U-Boot] [PATCH 05/14] tegra: Add tegra_get_chip_type() to detect SKU
Stephen Warren
swarren at nvidia.com
Tue Jan 10 00:24:40 CET 2012
On 12/26/2011 12:32 PM, Simon Glass wrote:
> We want to know which type of chip we are running on - the Tegra
> family has several SKUs. This can be determined by reading a
> fuse register, so add this function to ap20.
...
> diff --git a/arch/arm/cpu/armv7/tegra2/ap20.c b/arch/arm/cpu/armv7/tegra2/ap20.c
...
> +int tegra_get_chip_type(void)
> +{
> + struct fuse_regs *fuse = (struct fuse_regs *)TEGRA2_FUSE_BASE;
> + uint tegra_sku_id;
> +
> + tegra_sku_id = readl(&fuse->sku_info) & 0xff;
> +
> + switch (tegra_sku_id) {
I think this should read/validate/switch-on the SoC ID field too; I
assume the SKU IDs can only be interpreted relative to some specific SoC ID.
Chip ID is bits 15:8 of the register APB_MISC + 0x804, and has value
0x20 for Tegra20, 0x30 for Tegra30.
--
nvpublic
More information about the U-Boot
mailing list