mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Trent Piepho <trent.piepho@igorinstitute.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH 7/9] ARM: rk3568: Detect USB boot
Date: Mon, 11 Oct 2021 10:53:07 -0700
Message-ID: <CAMHeXxP1MycJ4zarcdc74BH9Wi9eiT+JFgbeYB12751FriKpLw@mail.gmail.com> (raw)
In-Reply-To: <20211011080346.37197-8-s.hauer@pengutronix.de>

On Mon, Oct 11, 2021 at 1:04 AM Sascha Hauer <s.hauer@pengutronix.de> wrote:
> @@ -151,6 +151,11 @@ static struct rk_bootsource bootdev_map[] = {
>         { .src = BOOTSOURCE_SPI_NOR, .instance = 0 },
>         { .src = BOOTSOURCE_SPI_NAND, .instance = 0 },
>         { .src = BOOTSOURCE_MMC, .instance = 1 },
> +       { .src = BOOTSOURCE_UNKNOWN, .instance = 0 },
> +       { .src = BOOTSOURCE_UNKNOWN, .instance = 0 },
> +       { .src = BOOTSOURCE_UNKNOWN, .instance = 0 },
> +       { .src = BOOTSOURCE_UNKNOWN, .instance = 0 },
> +       { .src = BOOTSOURCE_USB, .instance = 0 },
>  };

Instead of blank entries, one could do designated array initialization
(since BOOTSOURCE_UNKNOWN is 0):

static struct rk_bootsource bootdev_map[] = {
       [0x01] = { .src = BOOTSOURCE_NAND, .instance = 0 },
       [0x02] = { .src = BOOTSOURCE_MMC, .instance = 0 },
       [0x03] = { .src = BOOTSOURCE_SPI_NOR, .instance = 0 },
       [0x04] = { .src = BOOTSOURCE_SPI_NAND, .instance = 0 },
       [0x05] = { .src = BOOTSOURCE_MMC, .instance = 1 },
       [0x0a] =  { .src = BOOTSOURCE_USB, .instance = 0 },
};

I also like the way the register value shows up in the table.

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


  reply	other threads:[~2021-10-11 17:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-11  8:03 [PATCH 0/9] RK3568 updates Sascha Hauer
2021-10-11  8:03 ` [PATCH 1/9] phy: rockchip: Add dummy driver for child node Sascha Hauer
2021-10-11  8:03 ` [PATCH 2/9] ARM: Rockchip rk3568 EVB: Enable deep probe Sascha Hauer
2021-10-11  8:03 ` [PATCH 3/9] ARM: Rockchip: rk3568 EVB: use 64bit partition sizes Sascha Hauer
2021-10-11  8:03 ` [PATCH 4/9] phy: rockchip-inno-usb2: handle disabled child nodes gracefully Sascha Hauer
2021-10-11  8:03 ` [PATCH 5/9] usb: dwc3: reset controller before using it Sascha Hauer
2021-10-11  8:03 ` [PATCH 6/9] usb: dwc3: Clarify error message Sascha Hauer
2021-10-11 17:43   ` Trent Piepho
2021-10-12  7:10     ` Sascha Hauer
2021-10-11  8:03 ` [PATCH 7/9] ARM: rk3568: Detect USB boot Sascha Hauer
2021-10-11 17:53   ` Trent Piepho [this message]
2021-10-12  7:15     ` Sascha Hauer
2021-10-11  8:03 ` [PATCH 8/9] cdev: Add function to get unallocated start of device Sascha Hauer
2021-10-11  8:03 ` [PATCH 9/9] ARM: Rockchip: RK3568: implement failsafe barebox update Sascha Hauer
2021-10-11  9:59   ` Michael Riesch

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=CAMHeXxP1MycJ4zarcdc74BH9Wi9eiT+JFgbeYB12751FriKpLw@mail.gmail.com \
    --to=trent.piepho@igorinstitute.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.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

mail archive of the barebox mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://lore.barebox.org/barebox/0 barebox/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 barebox barebox/ https://lore.barebox.org/barebox \
		barebox@lists.infradead.org
	public-inbox-index barebox

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git