From patchwork Sat Jun 6 21:13:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 241859 List-Id: U-Boot discussion From: xypron.glpk at gmx.de (Heinrich Schuchardt) Date: Sat, 6 Jun 2020 23:13:53 +0200 Subject: [PATCH 1/1] mtd: cfi_flash: use __raw_writeq(), __raw_readq() Message-ID: <20200606211353.17905-1-xypron.glpk@gmx.de> Functions __raw_writeq(), __raw_readq() are available for all architectures. So let's use them. Signed-off-by: Heinrich Schuchardt --- drivers/mtd/cfi_flash.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) -- 2.26.2 diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c index b7289ba539..e31e07ca80 100644 --- a/drivers/mtd/cfi_flash.c +++ b/drivers/mtd/cfi_flash.c @@ -155,8 +155,7 @@ __maybe_weak void flash_write32(u32 value, void *addr) __maybe_weak void flash_write64(u64 value, void *addr) { - /* No architectures currently implement __raw_writeq() */ - *(volatile u64 *)addr = value; + __raw_writeq(value, addr); } __maybe_weak u8 flash_read8(void *addr) @@ -176,8 +175,7 @@ __maybe_weak u32 flash_read32(void *addr) __maybe_weak u64 flash_read64(void *addr) { - /* No architectures currently implement __raw_readq() */ - return *(volatile u64 *)addr; + return __raw_readq(addr); } /*-----------------------------------------------------------------------