mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-02 22:56:42 +07:00
059e58f6f3
Currently each i.MX processor has its own function for displaying the silicon revision. Introduce a generic function for this purpose, so that all i.MX processors can reuse it. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Jason Liu <jason.hui@linaro.org> Cc: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
21 lines
446 B
C
21 lines
446 B
C
|
|
#include <linux/module.h>
|
|
#include <mach/hardware.h>
|
|
|
|
unsigned int __mxc_cpu_type;
|
|
EXPORT_SYMBOL(__mxc_cpu_type);
|
|
|
|
void mxc_set_cpu_type(unsigned int type)
|
|
{
|
|
__mxc_cpu_type = type;
|
|
}
|
|
|
|
void imx_print_silicon_rev(const char *cpu, int srev)
|
|
{
|
|
if (srev == IMX_CHIP_REVISION_UNKNOWN)
|
|
pr_info("CPU identified as %s, unknown revision\n", cpu);
|
|
else
|
|
pr_info("CPU identified as %s, silicon rev %d.%d\n",
|
|
cpu, (srev >> 4) & 0xf, srev & 0xf);
|
|
}
|