@@ -426,6 +426,20 @@ static ssize_t minor_show(struct device *dev, struct device_attribute *attr,
static DEVICE_ATTR_RO(minor);
+static ssize_t production_show(struct device *dev,
+ struct device_attribute *attr, char *buf)
+{
+ u32 reg = 0;
+
+ if (tegra_is_silicon())
+ if (tegra_fuse_readl(TEGRA_FUSE_PRODUCTION_MODE, ®))
+ dev_err(dev, "failed to read production fuse!\n");
+
+ return sprintf(buf, "%d\n", reg);
+}
+
+static DEVICE_ATTR_RO(production);
+
static struct attribute *tegra_soc_attr[] = {
&dev_attr_major.attr,
&dev_attr_minor.attr,
@@ -456,6 +470,7 @@ static struct attribute *tegra194_soc_attr[] = {
&dev_attr_major.attr,
&dev_attr_minor.attr,
&dev_attr_platform.attr,
+ &dev_attr_production.attr,
NULL,
};
@@ -18,6 +18,7 @@
#define TEGRA194 0x19
#define TEGRA234 0x23
+#define TEGRA_FUSE_PRODUCTION_MODE 0x0
#define TEGRA_FUSE_SKU_CALIB_0 0xf0
#define TEGRA30_FUSE_SATA_CALIB 0x124
#define TEGRA_FUSE_USB_CALIB_EXT_0 0x250