[U-Boot] [PATCH] drivers/block/systemace: replaced in16/out16 with more common readw/writew macros

Michal Simek monstr at monstr.eu
Wed Jan 2 16:19:07 CET 2013


2013/1/2 Alexey Brodkin <alexey.brodkin at gmail.com>:
> Most architectures don't have symbols "in16"/"out16" defined.
> Only Microblaze/PowerPC/Spark architectures do have them defined.
>
> At the same time there're much more common macros "readw"/"writew" for
> 16-bit data access defined in most of architectures (in
> linux kernel header "io.h").
>
> So use of "readw"/"writew" makes it possible to build this driver for
> virtually any architecture.
>
> Signed-off-by: Alexey Brodkin <alexey.brodkin at gmail.com>
> ---
>  drivers/block/systemace.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/block/systemace.c b/drivers/block/systemace.c
> index 88561a7..32c9169 100644
> --- a/drivers/block/systemace.c
> +++ b/drivers/block/systemace.c
> @@ -67,7 +67,7 @@ static void ace_writew(u16 val, unsigned off)
>  #endif
>         }
>         else
> -               out16(base + off, val);
> +               writew(val, base + off);
>  }
>
>  static u16 ace_readw(unsigned off)
> @@ -80,7 +80,7 @@ static u16 ace_readw(unsigned off)
>  #endif
>         }
>         else
> -               return in16(base + off);
> +               return readw(base + off);
>  }

Same as before in this part of the code.
But idea is OK.

M



-- 
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian


More information about the U-Boot mailing list