From 95235d533c5998ad43d4f7467170e6545cb73141 Mon Sep 17 00:00:00 2001 From: Changki Kim Date: Thu, 17 Sep 2015 16:20:48 +0900 Subject: [PATCH] [COMMON] soc: chipid: Add unique_id for adb Change-Id: I144b1d2f806f949bb9a4f2a722296c3fbcbe6b99 Signed-off-by: Changki Kim --- drivers/soc/samsung/exynos-chipid.c | 2 ++ include/linux/soc/samsung/exynos-soc.h | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/drivers/soc/samsung/exynos-chipid.c b/drivers/soc/samsung/exynos-chipid.c index ee5dbc0fa8de..c055c78b0311 100644 --- a/drivers/soc/samsung/exynos-chipid.c +++ b/drivers/soc/samsung/exynos-chipid.c @@ -104,6 +104,8 @@ void __init exynos_chipid_early_init(struct device *dev) panic("%s: failed to map registers\n", __func__); exynos_soc_info.product_id = __raw_readl(exynos_chipid_base); + exynos_soc_info.unique_id = __raw_readl(exynos_chipid_base + UNIQUE_ID1); + exynos_soc_info.unique_id |= (u64)__raw_readl(exynos_chipid_base + UNIQUE_ID2) << 32; exynos_soc_info.revision = exynos_soc_info.product_id & EXYNOS_REV_MASK; } diff --git a/include/linux/soc/samsung/exynos-soc.h b/include/linux/soc/samsung/exynos-soc.h index a354591a6386..08a75534f3ad 100644 --- a/include/linux/soc/samsung/exynos-soc.h +++ b/include/linux/soc/samsung/exynos-soc.h @@ -31,6 +31,9 @@ #define EXYNOS4210_REV_1_0 0x10 #define EXYNOS4210_REV_1_1 0x11 +#define UNIQUE_ID1 0x14 +#define UNIQUE_ID2 0x18 + /** * Struct exynos_chipid_info * @soc_product_id: product id allocated to exynos SoC @@ -40,6 +43,7 @@ struct exynos_chipid_info { u32 product_id; u32 revision; + u64 unique_id; }; extern struct exynos_chipid_info exynos_soc_info; -- 2.20.1