Skip to content

Commit

Permalink
mmc: atmel-mci: use endian agnostic IO
Browse files Browse the repository at this point in the history
Change the __raw IO functions to endian agnostic relaxed ones to allow
the driver to function on big endian ARM systems.

Signed-off-by: Ben Dooks <[email protected]>
Acked-by: Ludovic Desroches <[email protected]>
Signed-off-by: Ulf Hansson <[email protected]>
  • Loading branch information
bjdooks-ct authored and storulf committed Mar 25, 2015
1 parent 2530fd7 commit 1a467ab
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions drivers/mmc/host/atmel-mci-regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,17 @@
#define ATMCI_REGS_SIZE 0x100

/* Register access macros */
#define atmci_readl(port,reg) \
#ifdef CONFIG_AVR32
#define atmci_readl(port, reg) \
__raw_readl((port)->regs + reg)
#define atmci_writel(port,reg,value) \
#define atmci_writel(port, reg, value) \
__raw_writel((value), (port)->regs + reg)
#else
#define atmci_readl(port, reg) \
readl_relaxed((port)->regs + reg)
#define atmci_writel(port, reg, value) \
writel_relaxed((value), (port)->regs + reg)
#endif

/* On AVR chips the Peripheral DMA Controller is not connected to MCI. */
#ifdef CONFIG_AVR32
Expand Down

0 comments on commit 1a467ab

Please sign in to comment.