diff --git a/drivers/soc/tegra/fuse/tegra-apbmisc.c b/drivers/soc/tegra/fuse/tegra-apbmisc.c index 5b18f6ffa45c798a9c8d138a4f0fb647551b4932..b1f8b23277b9417a8d8be220fbe79e2a3754d308 100644 --- a/drivers/soc/tegra/fuse/tegra-apbmisc.c +++ b/drivers/soc/tegra/fuse/tegra-apbmisc.c @@ -38,17 +38,17 @@ static void __iomem *strapping_base; static bool long_ram_code; u32 tegra_read_chipid(void) -{ - return readl_relaxed(apbmisc_base + 4); -} - -u8 tegra_get_chip_id(void) { if (!apbmisc_base) { WARN(1, "Tegra Chip ID not yet available\n"); return 0; } + return readl_relaxed(apbmisc_base + 4); +} + +u8 tegra_get_chip_id(void) +{ return (tegra_read_chipid() >> 8) & 0xff; }