]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
ARM: rpi: support model A+
authorStephen Warren <swarren@wwwdotorg.org>
Wed, 24 Dec 2014 03:01:43 +0000 (20:01 -0700)
committerTom Rini <trini@ti.com>
Mon, 29 Dec 2014 21:31:22 +0000 (16:31 -0500)
Add a board rev entry for the new model A+, and augment the board
rev error handling code to be a bit more verbose.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
arch/arm/include/asm/arch-bcm2835/mbox.h
board/raspberrypi/rpi/rpi.c

index 0289ba6a917e25765aa84995007652612f8d3e5e..88d2ec11a7c204e9f538f14d24edc60b5aa41fb1 100644 (file)
@@ -140,6 +140,7 @@ struct bcm2835_mbox_tag_hdr {
 #define BCM2835_BOARD_REV_B_REV2_f     0xf
 #define BCM2835_BOARD_REV_B_PLUS       0x10
 #define BCM2835_BOARD_REV_CM           0x11
+#define BCM2835_BOARD_REV_A_PLUS       0x12
 
 struct bcm2835_mbox_tag_get_board_rev {
        struct bcm2835_mbox_tag_hdr tag_hdr;
index ca8e86dead6c24b737bb1b3508cddf9492a6e5f9..6227e9bc12bd378600680ed3aadad1107b02c61f 100644 (file)
@@ -149,6 +149,11 @@ static const struct {
                "bcm2835-rpi-cm.dtb",
                false,
        },
+       [BCM2835_BOARD_REV_A_PLUS] = {
+               "Model A+",
+               "bcm2835-rpi-a-plus.dtb",
+               false,
+       },
 };
 
 u32 rpi_board_rev = 0;
@@ -260,12 +265,17 @@ static void get_board_rev(void)
        }
 
        rpi_board_rev = msg->get_board_rev.body.resp.rev;
-       if (rpi_board_rev >= ARRAY_SIZE(models))
+       if (rpi_board_rev >= ARRAY_SIZE(models)) {
+               printf("RPI: Board rev %u outside known range\n",
+                      rpi_board_rev);
                rpi_board_rev = 0;
+       }
 
        name = models[rpi_board_rev].name;
-       if (!name)
+       if (!name) {
+               printf("RPI: Board rev %u unknown\n", rpi_board_rev);
                name = "Unknown model";
+       }
        printf("RPI model: %s\n", name);
 }