Re: [PATCH v2 03/12] Add initial RISC-V architecture support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 29 Jun 2018 13:32:55 +0200
Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> wrote:

> On Fri, Jun 29, 2018 at 01:27:10PM +0300, Antony Pavlov wrote:
> > On Fri, 29 Jun 2018 09:29:08 +0200
> > > 
> > > Do you need these __bare_init* stuff? If not I would prefer to remove
> > > it.
> > 
> > 
> > Hmmm. You are right! I have not realized PBL for RISC-V yet so it's better
> > to drop all these bare_inits.
> 
> This isn't needed for PBL either. It is only for cases where the boot
> ROM only loads the initial image portion.
> 
> > > 
> > > > +static int of_riscv_init(void)
> > > > +{
> > > > +	struct device_node *root;
> > > > +
> > > > +	root = of_get_root_node();
> > > > +	if (root)
> > > > +		return 0;
> > > > +
> > > > +	root = of_unflatten_dtb(__dtb_start);
> > > > +	if (!IS_ERR(root)) {
> > > > +		pr_debug("using internal DTB\n");
> > > > +		of_set_root_node(root);
> > > > +		if (IS_ENABLED(CONFIG_OFDEVICE))
> > > > +			of_probe();
> > > > +	}
> > > 
> > > Can we just call of_unflatten_dtb()/of_set_root_node() from the board
> > > code and use obj-dtb-y to include the dtb?
> > > 
> > > That way a board can specify the dtb and not the config.
> > 
> > Good idea! MIPS code lacks this feature at the moment.
> > 
> > Can I use of_arm_init() as a reference?
> 
> Not sure what you mean. of_riscv_init() is nearly a copy of
> of_arm_init() already.

Actually of_riscv_init() is a copy of of_mips_init().

-- 
Best regards,
  Antony Pavlov

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




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux