public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Andes <uboot@andestech.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/9] riscv: ax25: Create a simple-bus driver for the soc node
Date: Tue, 19 Mar 2019 17:07:42 +0800	[thread overview]
Message-ID: <20190319090750.8923-2-uboot@andestech.com> (raw)
In-Reply-To: <20190319090750.8923-1-uboot@andestech.com>

From: Rick Chen <rick@andestech.com>

To enumerate devices on the /soc/ node, create a "simple-bus"
driver to match "andestech,riscv-ae350-soc".

Signed-off-by: Rick Chen <rick@andestech.com>
Cc: Greentime Hu <greentime@andestech.com>
---
 arch/riscv/cpu/ax25/cpu.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/arch/riscv/cpu/ax25/cpu.c b/arch/riscv/cpu/ax25/cpu.c
index 76689b2..e6e7404 100644
--- a/arch/riscv/cpu/ax25/cpu.c
+++ b/arch/riscv/cpu/ax25/cpu.c
@@ -7,6 +7,7 @@
 /* CPU specific code */
 #include <common.h>
 #include <asm/cache.h>
+#include <dm.h>
 
 /*
  * cleanup_before_linux() is called just before we call linux
@@ -25,3 +26,18 @@ int cleanup_before_linux(void)
 
 	return 0;
 }
+
+/* To enumerate devices on the /soc/ node, create a "simple-bus" driver */
+static const struct udevice_id riscv_ae350_soc_ids[] = {
+	{
+		.compatible = "andestech,riscv-ae350-soc",
+	},
+	{ }
+};
+
+U_BOOT_DRIVER(riscv_ae350_soc_ids) = {
+	.name = "andestech,riscv-ae350-soc",
+	.id = UCLASS_SIMPLE_BUS,
+	.of_match = riscv_ae350_soc_ids,
+	.flags = DM_FLAG_PRE_RELOC,
+};
-- 
2.7.4

  reply	other threads:[~2019-03-19  9:07 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-19  9:07 [U-Boot] [PATCH 0/9] AE350 SMP support RISC-V Andes
2019-03-19  9:07 ` Andes [this message]
2019-03-20  7:22   ` [U-Boot] [PATCH 1/9] riscv: ax25: Create a simple-bus driver for the soc node Bin Meng
2019-03-21  6:49     ` Rick Chen
2019-03-21  7:01       ` Bin Meng
2019-03-21  8:28         ` Rick Chen
2019-03-21  8:49           ` Bin Meng
2019-03-21  9:01             ` Rick Chen
2019-03-21  9:16               ` Bin Meng
2019-04-10  9:05                 ` Rick Chen
2019-04-10  9:21                   ` Auer, Lukas
2019-04-10  9:30                     ` Rick Chen
2019-03-19  9:07 ` [U-Boot] [PATCH 2/9] riscv: Add a SYSCON driver for Andestech's PLIC Andes
2019-03-20  7:22   ` Bin Meng
2019-03-21  7:04     ` Rick Chen
2019-03-21  7:32       ` Bin Meng
2019-03-21  8:39         ` Rick Chen
2019-03-21 16:24           ` Troy Benjegerdes
2019-03-19  9:07 ` [U-Boot] [PATCH 3/9] riscv: Add a SYSCON driver for Andestech's PLMT Andes
2019-03-20  7:22   ` Bin Meng
2019-03-21  8:41     ` Rick Chen
2019-03-19  9:07 ` [U-Boot] [PATCH 4/9] riscv: ae350: initialize PLIC Andes
2019-03-19  9:07 ` [U-Boot] [PATCH 5/9] riscv: ae350: disable ATCPIT100 timer Andes
2019-03-20  7:22   ` Bin Meng
2019-03-19  9:07 ` [U-Boot] [PATCH 6/9] riscv: ax25: Add platform-specific Kconfig options Andes
2019-03-20  7:22   ` Bin Meng
2019-03-19  9:07 ` [U-Boot] [PATCH 7/9] riscv: ax25: Andes specific cache shall only support in M-mode Andes
2019-03-20  7:22   ` Bin Meng
2019-03-21  8:42     ` Rick Chen
2019-03-19  9:07 ` [U-Boot] [PATCH 8/9] riscv: dts: ae350 support SMP Andes
2019-03-20  7:22   ` Bin Meng
2019-03-21  8:51     ` Rick Chen
2019-03-21  9:15       ` Bin Meng
2019-03-21  9:38         ` Rick Chen
2019-03-21 10:12           ` Bin Meng
2019-03-21 10:16             ` Rick Chen
2019-03-19  9:07 ` [U-Boot] [PATCH 9/9] riscv: ae350: enable SMP Andes
2019-03-20  7:22   ` Bin Meng

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=20190319090750.8923-2-uboot@andestech.com \
    --to=uboot@andestech.com \
    --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