···336336 * platform type is silicon and all other non-zero values indicate337337 * the type of simulation platform is being used.338338 */339339- return sprintf(buf, "%d\n", (tegra_read_chipid() >> 20) & 0xf);339339+ return sprintf(buf, "%d\n", tegra_get_platform());340340}341341342342static DEVICE_ATTR_RO(platform);
+24
drivers/soc/tegra/fuse/tegra-apbmisc.c
···4747 return (tegra_read_chipid() >> 16) & 0xf;4848}49495050+u8 tegra_get_platform(void)5151+{5252+ return (tegra_read_chipid() >> 20) & 0xf;5353+}5454+5555+bool tegra_is_silicon(void)5656+{5757+ switch (tegra_get_chip_id()) {5858+ case TEGRA194:5959+ if (tegra_get_platform() == 0)6060+ return true;6161+6262+ return false;6363+ }6464+6565+ /*6666+ * Chips prior to Tegra194 have a different way of determining whether6767+ * they are silicon or not. Since we never supported simulation on the6868+ * older Tegra chips, don't bother extracting the information and just6969+ * report that we're running on silicon.7070+ */7171+ return true;7272+}7373+5074u32 tegra_read_straps(void)5175{5276 WARN(!chipid, "Tegra ABP MISC not yet available\n");