mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-29 08:01:08 +00:00
ARM: uniphier: add functions to get SoC model/revision
We sometimes have to implement different code depending on the SoC revision. This commit adds functions to get the model/revision number. Note: Model number: incremented on major changes of the SoC Revision number: incremented on minor changes of the SoC The "Model 2" exists for PH1-sLD3, ProXstream2/PH1-LD6b. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
This commit is contained in:
parent
b00543e553
commit
2071f149e5
2 changed files with 15 additions and 0 deletions
|
@ -60,4 +60,7 @@ static inline enum uniphier_soc_id uniphier_get_soc_type(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
int uniphier_get_soc_model(void);
|
||||||
|
int uniphier_get_soc_revision(void);
|
||||||
|
|
||||||
#endif /* __MACH_SOC_INFO_H__ */
|
#endif /* __MACH_SOC_INFO_H__ */
|
||||||
|
|
|
@ -59,3 +59,15 @@ enum uniphier_soc_id uniphier_get_soc_type(void)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#endif
|
#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;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue