diff --git a/drivers/nor/cfi_flash.c b/drivers/nor/cfi_flash.c index 08e45ef..0efe0d4 100644 --- a/drivers/nor/cfi_flash.c +++ b/drivers/nor/cfi_flash.c @@ -186,6 +186,21 @@ #endif /* + * read a character at a port width address + */ +uchar flash_read_uchar (struct flash_info *info, uint offset) +{ + uchar *cp; + + cp = flash_make_addr (info, 0, offset); +#if defined(__LITTLE_ENDIAN) + return (cp[0]); +#else + return (cp[info->portwidth - 1]); +#endif +} + +/* * read a short word by swapping for ppc format. */ static ushort flash_read_ushort (struct flash_info *info, flash_sect_t sect, uint offset) diff --git a/drivers/nor/cfi_flash.h b/drivers/nor/cfi_flash.h index 047a035..9a299db 100644 --- a/drivers/nor/cfi_flash.h +++ b/drivers/nor/cfi_flash.h @@ -211,20 +211,7 @@ return ((uchar *) (info->start[sect] + (offset * info->portwidth))); } -/* - * read a character at a port width address - */ -static inline uchar flash_read_uchar (struct flash_info *info, uint offset) -{ - uchar *cp; - - cp = flash_make_addr (info, 0, offset); -#if defined(__LITTLE_ENDIAN) - return (cp[0]); -#else - return (cp[info->portwidth - 1]); -#endif -} +uchar flash_read_uchar (struct flash_info *info, uint offset); #ifdef CONFIG_DRIVER_CFI_BANK_WIDTH_1 #define bankwidth_is_1(info) (info->portwidth == 1)