[RFC 1/8] ARM: OMAP: Rearranging EMIF4 definitions

Sascha Hauer sha at pengutronix.de
Tue Jun 7 00:38:41 PDT 2022


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.

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list