[U-Boot] [PATCH 1/9] riscv: ax25: Create a simple-bus driver for the soc node

Rick Chen rickchen36 at gmail.com
Thu Mar 21 09:01:24 UTC 2019


Bin Meng <bmeng.cn at gmail.com> 於 2019年3月21日 週四 下午4:49寫道:
>
> Hi Rick,
>
> On Thu, Mar 21, 2019 at 4:27 PM Rick Chen <rickchen36 at gmail.com> wrote:
> >
> > Hi Bin
> >
> > Bin Meng <bmeng.cn at gmail.com> 於 2019年3月21日 週四 下午3:01寫道:
> > >
> > > Hi Rick,
> > >
> > > On Thu, Mar 21, 2019 at 2:49 PM Rick Chen <rickchen36 at gmail.com> wrote:
> > > >
> > > > Hi Bin
> > > >
> > > > Bin Meng <bmeng.cn at gmail.com> 於 2019年3月20日 週三 下午3:22寫道:
> > > > >
> > > > > Hi Rick,
> > > > >
> > > > > On Tue, Mar 19, 2019 at 5:11 PM Andes <uboot at andestech.com> wrote:
> > > > > >
> > > > > > From: Rick Chen <rick at andestech.com>
> > > > > >
> > > > > > To enumerate devices on the /soc/ node, create a "simple-bus"
> > > > > > driver to match "andestech,riscv-ae350-soc".
> > > > > >
> > > > >
> > > > > Could we change the /soc/ node compatible string to "simple-bus"
> > > > > instead? The QEMU 'virt' created a bad example and we should stop the
> > > > > contamination.
> > > > >
> > > >
> > > > Do you mean change the
> > > > .compatible = "andestech,riscv-ae350-soc",
> > > > as "simple-bus" ???
> > >
> > > Yes, I mean changing the /soc/ node compatible string in
> > > arch/riscv/dts/ae350_{32,64}.dts to "simpble-bus".
> > >
> >
> > So you mean we shall have only riscv simple bus driver.
> > We shall remove
> > U_BOOT_DRIVER(riscv_virtio_soc) in /arch/riscv/cpu/generic/cpu.c
> > U_BOOT_DRIVER(riscv_ae350_soc_ids) in /arch/riscv/cpu/ax25/cpu.c
> > and add
> > static const struct udevice_id riscv_simple_bus_ids[] = {
> > {
> > .compatible = "simple-bus",
> > },
> > { }
> > };
> >
> > U_BOOT_DRIVER(riscv_simple_bus_ids) = {
> > .name = "simple-bus",
> > .id = UCLASS_SIMPLE_BUS,
> > .of_match = riscv_simple_bus_ids,
> > .flags = DM_FLAG_PRE_RELOC,
> > };
> >
> > Does it right ?
>
> No, you don't need add anything to the RISC-V codes. U-Boot provides a
> simple-bus driver and all you need do is to use "simple-bus" in your
> DTS files.
>

But if I only use "simple-bus" in DTS file.
It will fail in syscon_get_first_range that can not get correct
information from reg.

> Regards,
> Bin


More information about the U-Boot mailing list