Re: [PATCH] ARM: clps711x: Switch to devicetree usage

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

 



Hello.

пт, 20 мая 2022 г. в 12:56, Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>:
>
> Hello,
>
> On 20.05.22 10:24, Alexander Shiyan wrote:
> > This is a complex patch that switches the ARM CLPS711X architecture
> > to work with the device tree. Includes changes to board initialization
> > and any architecture drivers used.
...
> > +static __init int clep7212_fixup(void)
> > +{
> > +     if (of_machine_is_compatible("cirrus,ep7209"))
> > +             of_register_fixup(clep7212_dt_fixup, NULL);
> > +
> > +     return 0;
> > +}
> > +postcore_initcall(clep7212_fixup);
>
> You can replace this with the new barebox_set_serial_number(), see:
> https://git.pengutronix.de/cgit/barebox/commit/?h=next&id=f6756e9ce6f26dc22506e25bd5cf1a4f6a173636

This change is currently in the next branch, but Ok.

> > +ENTRY_FUNCTION(start_ep7212_clep7212, r0, r1, r2)
> >  {
> > +     void *fdt;
> > +
> >       arm_cpu_lowlevel_init();
> >
> > -     clps711x_barebox_entry(CLPS711X_CPU_PLL_MULT, NULL);
> > +     /* Stack in SRAM */
> > +     arm_setup_stack(CS6_BASE - 16);
>
> please use ENTRY_FUNCTION_WITHSTACK instead to be a bit more
> future-proof. Also - 16 is not necessary, see
> 6b3dc4abd884 ("ARM: Cleanup stack offset cargo cult").

Ok.

> > +static void clps711x_bus_patch(struct device_node *node,
> > +                            u32 compare, u32 change)
> > +{
>
> Could you add a comment why this is necessary?

Because the barebox cannot use address 0 (NOR MTD in my case), the bus driver
scans for devices that start at zero address and maps them to a
different unused address.
To start the kernel, a fixup is used that rewrites the address of the
patched device to its original state.

_______________________________________________
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