public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH U-Boot] ARM: rpi_b: detect board revision
Date: Mon, 24 Nov 2014 20:38:14 -0700	[thread overview]
Message-ID: <5473F9A6.3010604@wwwdotorg.org> (raw)
In-Reply-To: <CAPnjgZ3M0efTEpBiSPVLJRZgXQN-n6rebT6hB=W_skPf1yw_1A@mail.gmail.com>

On 11/24/2014 08:50 AM, Simon Glass wrote:
> Hi Stephen,
> 
> On 18 November 2014 at 21:40, Stephen Warren <swarren@wwwdotorg.org> wrote:
>> 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>
>> ---
>> I'm considering renaming rpi_b -> rpi in U-Boot since it supports many
>> models. Hopefully I can persuade U-Boot to load the environment from
>> different places at run-time, so we won't need different builds based
>> on whether the environment is in eMMC or not for example.
>>
>>  arch/arm/include/asm/arch-bcm2835/mbox.h |  33 +++++++++
>>  board/raspberrypi/rpi_b/rpi_b.c          | 122 ++++++++++++++++++++++++++++++-
>>  include/configs/rpi_b.h                  |   1 -
>>  3 files changed, 152 insertions(+), 4 deletions(-)
> 
> I tried this out. It worked OK for me except that it can't find the
> device tree file bcm2835-rpi-b-rev2.dtb.
> 
> Oddly I can fatload it from /bcm2835-rpi-b-rev2.dtb but when I try
> from /syslinux/..//bcm2835-rpi-b-rev2.dtb it fails and cannot find the
> file. Reducing the filename length to 8 chars works. I wonder what
> year of my life FAT will stop plaguing me?

That's really odd. Did it work fine with bcm2835-rpi-b.dtb before this
patch? Perhaps this is just a short/long-filename issue, so it'll seem
like it randomly works sometimes and not others?

> Anyway this doesn't seem to be related to this patch, so:
> 
> Reviewed-by: Simon Glass <sjg@chromium.org>
> Tested-by: Simon Glass <sjg@chromium.org>

  reply	other threads:[~2014-11-25  3:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-19  4:40 [U-Boot] [PATCH U-Boot] ARM: rpi_b: detect board revision Stephen Warren
2014-11-19 17:43 ` Stephen Warren
2014-11-19 18:22   ` Matthias Klein
2014-11-24 15:50 ` Simon Glass
2014-11-25  3:38   ` Stephen Warren [this message]
2014-11-25  3:48     ` Simon Glass
2015-07-24  6:26   ` Stephen Warren
2015-08-02 21:29     ` Simon Glass
2014-12-08 21:41 ` [U-Boot] [U-Boot,U-Boot] " Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5473F9A6.3010604@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox