summaryrefslogtreecommitdiff
path: root/board/raspberrypi
diff options
context:
space:
mode:
Diffstat (limited to 'board/raspberrypi')
-rw-r--r--board/raspberrypi/rpi/Kconfig15
-rw-r--r--board/raspberrypi/rpi/rpi.c7
-rw-r--r--board/raspberrypi/rpi_2/Kconfig15
3 files changed, 7 insertions, 30 deletions
diff --git a/board/raspberrypi/rpi/Kconfig b/board/raspberrypi/rpi/Kconfig
deleted file mode 100644
index 6a538cf..0000000
--- a/board/raspberrypi/rpi/Kconfig
+++ /dev/null
@@ -1,15 +0,0 @@
-if TARGET_RPI
-
-config SYS_BOARD
- default "rpi"
-
-config SYS_VENDOR
- default "raspberrypi"
-
-config SYS_SOC
- default "bcm2835"
-
-config SYS_CONFIG_NAME
- default "rpi"
-
-endif
diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
index 50a699b..a105953 100644
--- a/board/raspberrypi/rpi/rpi.c
+++ b/board/raspberrypi/rpi/rpi.c
@@ -278,10 +278,17 @@ static void get_board_rev(void)
* https://github.com/pimoroni/RPi.version/blob/master/RPi/version.py
* http://www.raspberrypi.org/forums/viewtopic.php?f=63&t=99293&p=690282
* (a few posts down)
+ *
+ * For the RPi 1, bit 24 is the "warranty bit", so we mask off just the
+ * lower byte to use as the board rev:
+ * http://www.raspberrypi.org/forums/viewtopic.php?f=63&t=98367&start=250
+ * http://www.raspberrypi.org/forums/viewtopic.php?f=31&t=20594
*/
rpi_board_rev = msg->get_board_rev.body.resp.rev;
if (rpi_board_rev & 0x800000)
rpi_board_rev = (rpi_board_rev >> 4) & 0xff;
+ else
+ rpi_board_rev &= 0xff;
if (rpi_board_rev >= ARRAY_SIZE(models)) {
printf("RPI: Board rev %u outside known range\n",
rpi_board_rev);
diff --git a/board/raspberrypi/rpi_2/Kconfig b/board/raspberrypi/rpi_2/Kconfig
deleted file mode 100644
index 032184d..0000000
--- a/board/raspberrypi/rpi_2/Kconfig
+++ /dev/null
@@ -1,15 +0,0 @@
-if TARGET_RPI_2
-
-config SYS_BOARD
- default "rpi_2"
-
-config SYS_VENDOR
- default "raspberrypi"
-
-config SYS_SOC
- default "bcm2835"
-
-config SYS_CONFIG_NAME
- default "rpi_2"
-
-endif