Message ID | 20171208073537.6777-2-yangbo.lu@nxp.com |
---|---|
State | Accepted |
Commit | 4a47bf8a2ba61e21b022b81e2234fdb47570ad22 |
Delegated to: | York Sun |
Headers | show |
Series | [U-Boot,v4,1/3] armv8: ls1012ardb: clean up definitions for I2C IO expanders | expand |
On 12/07/2017 11:54 PM, Yangbo Lu wrote: > Add LS1012ARDB RevC/RevC1/RevC2/RevD/RevE information and > detect it when u-boot starts up. > > Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> > --- > Changes for v4: > - Added this patch. Applied to fsl-qoriq master. Thanks. York
diff --git a/board/freescale/ls1012ardb/ls1012ardb.c b/board/freescale/ls1012ardb/ls1012ardb.c index 2f1d63742a..421b0a7861 100644 --- a/board/freescale/ls1012ardb/ls1012ardb.c +++ b/board/freescale/ls1012ardb/ls1012ardb.c @@ -41,12 +41,32 @@ int checkboard(void) } puts("Version"); - if ((in1 & SW_REV_MASK) == SW_REV_A) + switch (in1 & SW_REV_MASK) { + case SW_REV_A: puts(": RevA"); - else if ((in1 & SW_REV_MASK) == SW_REV_B) + break; + case SW_REV_B: puts(": RevB"); - else + break; + case SW_REV_C: + puts(": RevC"); + break; + case SW_REV_C1: + puts(": RevC1"); + break; + case SW_REV_C2: + puts(": RevC2"); + break; + case SW_REV_D: + puts(": RevD"); + break; + case SW_REV_E: + puts(": RevE"); + break; + default: puts(": unknown"); + break; + } printf(", boot from QSPI"); if ((in1 & SW_BOOT_MASK) == SW_BOOT_EMU) diff --git a/include/configs/ls1012ardb.h b/include/configs/ls1012ardb.h index a1a563cb59..9f471663b8 100644 --- a/include/configs/ls1012ardb.h +++ b/include/configs/ls1012ardb.h @@ -34,6 +34,11 @@ #define SW_REV_MASK 0xF8 #define SW_REV_A 0xF8 #define SW_REV_B 0xF0 +#define SW_REV_C 0xE8 +#define SW_REV_C1 0xE0 +#define SW_REV_C2 0xD8 +#define SW_REV_D 0xD0 +#define SW_REV_E 0xC8 /* MMC */ #ifdef CONFIG_MMC
Add LS1012ARDB RevC/RevC1/RevC2/RevD/RevE information and detect it when u-boot starts up. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> --- Changes for v4: - Added this patch. --- board/freescale/ls1012ardb/ls1012ardb.c | 26 +++++++++++++++++++++++--- include/configs/ls1012ardb.h | 5 +++++ 2 files changed, 28 insertions(+), 3 deletions(-)