soc: renesas: Identify SoC and register with the SoC bus
authorGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 14 Nov 2016 18:37:08 +0000 (19:37 +0100)
committerSimon Horman <horms+renesas@verge.net.au>
Wed, 23 Nov 2016 19:22:21 +0000 (20:22 +0100)
commit8d6799a9ba23acd675f3243580ee6f1756fb4381
treea65ddb09a2d5afdc39c830eb575520a32232a861
parent5384f45cd9714287f198771bfb057eda799af9a8
soc: renesas: Identify SoC and register with the SoC bus

Identify the SoC type and revision, and register this information with
the SoC bus, so it is available under /sys/devices/soc0/, and can be
checked where needed using soc_device_match().

Identification is done using the Product Register or Common Chip Code
Register, as declared in DT (PRR only for now), or using a hardcoded
fallback if missing.

Example:

    Detected Renesas R-Car Gen2 r8a7791 ES1.0
    ...
    # cat /sys/devices/soc0/{machine,family,soc_id,revision}
    Koelsch
    R-Car Gen2
    r8a7791
    ES1.0

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
arch/arm/mach-shmobile/Kconfig
arch/arm64/Kconfig.platforms
drivers/soc/renesas/Makefile
drivers/soc/renesas/renesas-soc.c [new file with mode: 0644]