From: Haavard Skinnemoen Date: Fri, 8 Dec 2006 13:38:30 +0000 (+0100) Subject: [PATCH] MACB: Use __raw register access X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0f0d84e52cb2a6e0b1d101484a92121410135da1;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git [PATCH] MACB: Use __raw register access Since macb is a chip-internal device, use __raw_readl and __raw_writel instead of readl/writel. This will perform native-endian accesses, which is the right thing to do on both AVR32 and ARM devices. Signed-off-by: Haavard Skinnemoen Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/macb.c b/drivers/net/macb.c index 3496d19c55e1..25b559b5d5ed 100644 --- a/drivers/net/macb.c +++ b/drivers/net/macb.c @@ -264,7 +264,7 @@ static void macb_update_stats(struct macb *bp) WARN_ON((unsigned long)(end - p - 1) != (MACB_TPF - MACB_PFR) / 4); for(; p < end; p++, reg++) - *p += readl(reg); + *p += __raw_readl(reg); } static void macb_periodic_task(struct work_struct *work) diff --git a/drivers/net/macb.h b/drivers/net/macb.h index e3fcb2e06fdc..27bf0ae0f0bb 100644 --- a/drivers/net/macb.h +++ b/drivers/net/macb.h @@ -250,9 +250,9 @@ /* Register access macros */ #define macb_readl(port,reg) \ - readl((port)->regs + MACB_##reg) + __raw_readl((port)->regs + MACB_##reg) #define macb_writel(port,reg,value) \ - writel((value), (port)->regs + MACB_##reg) + __raw_writel((value), (port)->regs + MACB_##reg) struct dma_desc { u32 addr;