]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - patches/0028-ENGR00114367-Add-BABBAGE-machine-id-BBG2.5-rev-id.patch
imported Ka-Ro specific additions to U-Boot 2009.08 for TX28
[karo-tx-uboot.git] / patches / 0028-ENGR00114367-Add-BABBAGE-machine-id-BBG2.5-rev-id.patch
1 From 7603c2bd0f61fb4c14b4cc2e39d4fc8cc4729cdd Mon Sep 17 00:00:00 2001
2 From: Terry Lv <r65388@freescale.com>
3 Date: Thu, 23 Jul 2009 14:53:18 +0800
4 Subject: [PATCH] ENGR00114367: Add BABBAGE machine id, BBG2.5 rev id for rootfs init.
5
6 Update mach-types for BBG board.
7
8 Signed-off-by: Terry Lv <r65388@freescale.com>
9 ---
10  board/freescale/imx51/imx51.c    |   21 ++++++++++++++++++---
11  include/asm-arm/arch-mx51/mx51.h |    1 +
12  2 files changed, 19 insertions(+), 3 deletions(-)
13
14 diff --git a/board/freescale/imx51/imx51.c b/board/freescale/imx51/imx51.c
15 index 5c3c022..c8efa0f 100644
16 --- a/board/freescale/imx51/imx51.c
17 +++ b/board/freescale/imx51/imx51.c
18 @@ -53,7 +53,11 @@ static inline void setup_soc_rev(void)
19                 system_rev = 0x51000 | CHIP_REV_1_1;
20                 break;
21         case 0x10:
22 -               system_rev = 0x51000 | CHIP_REV_2_0;
23 +               if ((__REG(GPIO1_BASE_ADDR + 0x0) & (0x1 << 22)) == 0) {
24 +                       system_rev = 0x51000 | CHIP_REV_2_5;
25 +               } else {
26 +                       system_rev = 0x51000 | CHIP_REV_2_0;
27 +               }
28                 break;
29         default:
30                 system_rev = 0x51000 | CHIP_REV_1_0;
31 @@ -457,7 +461,7 @@ int board_init(void)
32  {
33         setup_soc_rev();
34  
35 -       gd->bd->bi_arch_number = MACH_TYPE_MX51_3DS;    /* board id for linux */
36 +       gd->bd->bi_arch_number = MACH_TYPE_MX51_BABBAGE;        /* board id for linux */
37         /* address of boot parameters */
38         gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
39  
40 @@ -477,7 +481,18 @@ int board_late_init(void)
41  
42  int checkboard(void)
43  {
44 -       printf("Board: MX51 3STACK [");
45 +       printf("Board: MX51 BABBAGE ");
46 +
47 +       if (system_rev & CHIP_REV_2_5) {
48 +               printf("2.5 [");
49 +       } else if (system_rev & CHIP_REV_2_0) {
50 +               printf("2.0 [");
51 +       } else if (system_rev & CHIP_REV_1_1) {
52 +               printf("1.1 [");
53 +       } else {
54 +               printf("1.0 [");
55 +       }
56 +
57         switch (__REG(SRC_BASE_ADDR + 0x8)) {
58         case 0x0001:
59                 printf("POR");
60 diff --git a/include/asm-arm/arch-mx51/mx51.h b/include/asm-arm/arch-mx51/mx51.h
61 index 14c2b2d..533919a 100644
62 --- a/include/asm-arm/arch-mx51/mx51.h
63 +++ b/include/asm-arm/arch-mx51/mx51.h
64 @@ -392,6 +392,7 @@
65  #define CHIP_REV_1_0            0x10
66  #define CHIP_REV_1_1            0x11
67  #define CHIP_REV_2_0            0x20
68 +#define CHIP_REV_2_5           0x120
69  
70  #define BOARD_REV_1_0           0x0
71  #define BOARD_REV_2_0           0x1
72 -- 
73 1.5.4.4
74