[RFC 1/8] ARM: OMAP: Rearranging EMIF4 definitions
Alexander Shiyan
eagle.alexander923 at gmail.com
Tue Jun 7 00:47:21 PDT 2022
вт, 7 июн. 2022 г. в 10:38, Sascha Hauer <sha at pengutronix.de>
> On Fri, Jun 03, 2022 at 02:25:33PM +0300, Alexander Shiyan wrote:
> > Currently we have three different definitions for EMIF management:
> > - Offsets
> > - Offsets relative to the base address
> > - Offsets in the structure
> >
> > The patch represents the first attempt to unify this.
> >
> > Signed-off-by: Alexander Shiyan <eagle.alexander923 at gmail.com>
> > ---
> > arch/arm/boards/afi-gf/lowlevel.c | 39 +++++++++---------
> > arch/arm/mach-omap/am33xx_generic.c | 41 +++++++++----------
> > .../mach-omap/include/mach/am33xx-silicon.h | 10 +----
> > 3 files changed, 42 insertions(+), 48 deletions(-)
>
> Looks all good and is a nice cleanup, so applied despite its RFC status.
>
> One thing I found in the context of this patch:
>
> > static void board_config_emif_ddr(void)
> > {
> > + const void __iomem *emif4 = IOMEM(AM33XX_EMIF4_BASE);
> > u32 i;
>
> [...]
>
> >
> > for (i = 0; i < 5000; i++) {
> >
> > }
>
> I wonder if this works. I made the experience that the compiler
> optimizes such loops away when the counter isn't declared as volatile.
Hello.
I did not touch the logic of the procedures, this is a topic for other patches,
although yes, I think this empty loop can be removed.
More information about the barebox
mailing list