]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
ARM: rpi_b: detect board revision
authorStephen Warren <swarren@wwwdotorg.org>
Wed, 19 Nov 2014 04:40:21 +0000 (21:40 -0700)
committerTom Rini <trini@ti.com>
Mon, 8 Dec 2014 14:35:42 +0000 (09:35 -0500)
commit6fe7845a9823c12aa673ad3590059528c184b987
tree0a7ae3d163810facecf4576530befac2f05b903d
parent4c5bbc2328a24f5e1ee990c9a9527e48e5fb3b5f
ARM: rpi_b: detect board revision

Detect the board revision early during boot, and print the decoded
model name.

Eventually, this information can be used for tasks such as:
- Allowing/preventing USB device mode; some models have a USB device on-
  board so only host mode makes sense. Others connect the SoC directly
  to the USB connector, so device-mode might make sense.
- The on-board USB hub/Ethernet requires different GPIOs to enable it,
  although luckily the default appears to be fine so far.
- The compute module contains an on-board eMMC device, so we could store
  the environment there. Other models use an SD card and so don't support
  saving the environment (unless we store it in a file on the FAT boot
  partition...)

Set $fdtfile based on this information. At present, the mainline Linux
kernel doesn't contain a separate DTB for most models, but I hope that
will change soon.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
arch/arm/include/asm/arch-bcm2835/mbox.h
board/raspberrypi/rpi_b/rpi_b.c
include/configs/rpi_b.h