Skip to content

Commit

Permalink
[PATCH] MACB: Use __raw register access
Browse files Browse the repository at this point in the history
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 <hskinnemoen@atmel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Haavard Skinnemoen authored and Jeff Garzik committed Dec 11, 2006
1 parent d836cae commit 0f0d84e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/net/macb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/macb.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0f0d84e

Please sign in to comment.