Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'for-5.10/soc' into for-5.10/firmware

+27 -1
+1 -1
drivers/soc/tegra/fuse/fuse-tegra.c
··· 336 336 * platform type is silicon and all other non-zero values indicate 337 337 * the type of simulation platform is being used. 338 338 */ 339 - return sprintf(buf, "%d\n", (tegra_read_chipid() >> 20) & 0xf); 339 + return sprintf(buf, "%d\n", tegra_get_platform()); 340 340 } 341 341 342 342 static DEVICE_ATTR_RO(platform);
+24
drivers/soc/tegra/fuse/tegra-apbmisc.c
··· 47 47 return (tegra_read_chipid() >> 16) & 0xf; 48 48 } 49 49 50 + u8 tegra_get_platform(void) 51 + { 52 + return (tegra_read_chipid() >> 20) & 0xf; 53 + } 54 + 55 + bool tegra_is_silicon(void) 56 + { 57 + switch (tegra_get_chip_id()) { 58 + case TEGRA194: 59 + if (tegra_get_platform() == 0) 60 + return true; 61 + 62 + return false; 63 + } 64 + 65 + /* 66 + * Chips prior to Tegra194 have a different way of determining whether 67 + * they are silicon or not. Since we never supported simulation on the 68 + * older Tegra chips, don't bother extracting the information and just 69 + * report that we're running on silicon. 70 + */ 71 + return true; 72 + } 73 + 50 74 u32 tegra_read_straps(void) 51 75 { 52 76 WARN(!chipid, "Tegra ABP MISC not yet available\n");
+2
include/soc/tegra/fuse.h
··· 23 23 24 24 u32 tegra_read_chipid(void); 25 25 u8 tegra_get_chip_id(void); 26 + u8 tegra_get_platform(void); 27 + bool tegra_is_silicon(void); 26 28 27 29 enum tegra_revision { 28 30 TEGRA_REVISION_UNKNOWN = 0,