#include <linux/io.h>
#include <linux/types.h>
-#include <mach/sg-regs.h>
-#include <mach/soc_info.h>
+
+#include "sg-regs.h"
+#include "soc-info.h"
#if UNIPHIER_MULTI_SOC
enum uniphier_soc_id uniphier_get_soc_type(void)
case 0x2F:
ret = SOC_UNIPHIER_PH1_LD6B;
break;
+#endif
+#ifdef CONFIG_ARCH_UNIPHIER_PH1_LD11
+ case 0x31:
+ ret = SOC_UNIPHIER_PH1_LD11;
+ break;
+#endif
+#ifdef CONFIG_ARCH_UNIPHIER_PH1_LD20
+ case 0x32:
+ ret = SOC_UNIPHIER_PH1_LD20;
+ break;
#endif
default:
ret = SOC_UNIPHIER_UNKNOWN;
return ret;
}
#endif
+
+int uniphier_get_soc_model(void)
+{
+ return (readl(SG_REVISION) & SG_REVISION_MODEL_MASK) >>
+ SG_REVISION_MODEL_SHIFT;
+}
+
+int uniphier_get_soc_revision(void)
+{
+ return (readl(SG_REVISION) & SG_REVISION_REV_MASK) >>
+ SG_REVISION_REV_SHIFT;
+}