Linux-RISC-V Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Anderson <seanga2@gmail.com>
To: Damien Le Moal <damien.lemoal@wdc.com>,
	linux-riscv@lists.infradead.org,
	Palmer Dabbelt <palmer@dabbelt.com>
Cc: Anup Patel <Anup.Patel@wdc.com>
Subject: Re: [PATCH v2 3/9] riscv: Add SOC early init support
Date: Thu, 12 Mar 2020 14:21:05 -0400	[thread overview]
Message-ID: <b19153eb-dba4-15b2-234b-0d14d23aa164@gmail.com> (raw)
In-Reply-To: <20200312051107.1454880-4-damien.lemoal@wdc.com>

On 3/12/20 1:11 AM, Damien Le Moal wrote:
> Add a mechanism for early SoC initialization for platforms that need
> additional hardware initialization not possible through the regular
> device tree and drivers mechanism. With this, a SoC specific
> initialization function can be called very early, before DTB parsing
> is done by parse_dtb() in Linux RISC-V kernel setup code.

Why does it need to be called that early (e.g. before parsing dtb)?

> 
> This can be very useful for early hardware initialization for No-MMU
> kernels booted directly in M-mode because it is quite likely that no
> other booting stage exist prior to the No-MMU kernel.
> 
> Example use of a SoC early initialization is as follows:
> 
> static void vendor_abc_early_init(const void *fdt)
> {
> 	/*
> 	 * some early init code here that can use simple matches
> 	 * against the flat device tree file.
> 	 */
> }
> SOC_EARLY_INIT_DECLARE("vendor,abc", abc_early_init);
> 
> This early initialization function is executed only if the flat device
> tree for the board has a 'compatible = "vendor,abc"' entry;
> 
> Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
> Signed-off-by: Anup Patel <anup.patel@wdc.com>
> Reviewed-by: Palmer Dabbelt <palmerdabbelt@google.com>

--Sean


  reply	other threads:[~2020-03-12 18:21 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-12  5:10 [PATCH v2 0/9] Kendryte k210 SoC boards support Damien Le Moal
2020-03-12  5:10 ` [PATCH v2 1/9] riscv: Unaligned load/store handling for M_MODE Damien Le Moal
2020-03-12  5:11 ` [PATCH v2 2/9] riscv: Add BUILTIN_DTB support Damien Le Moal
2020-03-12 20:03   ` Atish Patra
2020-03-12  5:11 ` [PATCH v2 3/9] riscv: Add SOC early init support Damien Le Moal
2020-03-12 18:21   ` Sean Anderson [this message]
2020-03-13  5:52     ` Damien Le Moal
2020-03-12 19:50   ` Atish Patra
2020-03-12 20:53   ` Atish Patra
2020-03-13  6:42     ` Damien Le Moal
2020-03-13 21:10       ` Atish Patra
2020-03-16  0:34         ` Damien Le Moal
2020-03-12  5:11 ` [PATCH v2 4/9] riscv: Add Kendryte K210 SoC support Damien Le Moal
2020-03-12 18:19   ` Sean Anderson
2020-03-13  5:43     ` Damien Le Moal
2020-03-12  5:11 ` [PATCH v2 5/9] riscv: Select required drivers for Kendryte SOC Damien Le Moal
2020-03-12  5:11 ` [PATCH v2 6/9] riscv: Add Kendryte K210 device tree Damien Le Moal
2020-03-12 18:16   ` Sean Anderson
2020-03-13  5:29     ` Damien Le Moal
2020-03-12  5:11 ` [PATCH v2 7/9] riscv: Kendryte K210 default config Damien Le Moal
2020-03-12 19:03   ` Atish Patra
2020-03-13  5:52     ` Damien Le Moal
2020-03-12  5:11 ` [PATCH v2 8/9] riscv: create a loader.bin boot image for Kendryte SoC Damien Le Moal
2020-03-12  5:11 ` [PATCH v2 9/9] riscv: Do not initialize PMP on " Damien Le Moal
2020-03-12 15:20   ` Sean Anderson
2020-03-12 18:10     ` Atish Patra
2020-03-12 18:14       ` Sean Anderson
2020-03-12 18:29         ` Atish Patra
2020-03-12 18:49           ` Sean Anderson
2020-03-12 19:12             ` Atish Patra
2020-03-12 20:09               ` Sean Anderson
2020-03-13  6:03               ` Damien Le Moal
2020-03-13  5:40             ` Anup Patel
2020-03-13  5:25       ` Damien Le Moal
2020-03-13  5:47         ` Atish Patra

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=b19153eb-dba4-15b2-234b-0d14d23aa164@gmail.com \
    --to=seanga2@gmail.com \
    --cc=Anup.Patel@wdc.com \
    --cc=damien.lemoal@wdc.com \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    /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