#include <linux/io.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/sys_soc.h>
#include <linux/bitfield.h>
#include <linux/regmap.h>
#include <linux/mfd/syscon.h>
#define MESON_SOCINFO_MAJOR_VER_MESON6 …
#define MESON_SOCINFO_MAJOR_VER_MESON8 …
#define MESON_SOCINFO_MAJOR_VER_MESON8B …
#define MESON_MX_ASSIST_HW_REV …
#define MESON_MX_ANALOG_TOP_METAL_REVISION …
#define MESON_MX_BOOTROM_MISC_VER …
static const char *meson_mx_socinfo_revision(unsigned int major_ver,
unsigned int misc_ver,
unsigned int metal_rev)
{ … }
static const char *meson_mx_socinfo_soc_id(unsigned int major_ver,
unsigned int metal_rev)
{ … }
static const struct of_device_id meson_mx_socinfo_analog_top_ids[] = …;
static int __init meson_mx_socinfo_init(void)
{ … }
device_initcall(meson_mx_socinfo_init);