提交 b590bc5c 编写于 作者: L Lennert Buytenhek 提交者: Nicolas Pitre

Orion: move I/O macros out of orion.h

Move the Orion register accessor macros out of orion.h, to prevent
them from ending up in the decompressor image (Orion uncompress.h
includes orion.h.)  Move them into io.h, which seems a better place
for this kind of stuff.
Signed-off-by: NLennert Buytenhek <buytenh@marvell.com>
Reviewed-by: NTzachi Perelstein <tzachi@marvell.com>
Acked-by: NRussell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: NNicolas Pitre <nico@marvell.com>
上级 da14d88e
......@@ -14,6 +14,7 @@
#include <linux/init.h>
#include <linux/mbus.h>
#include <asm/hardware.h>
#include <asm/io.h>
#include "common.h"
/*
......
......@@ -16,6 +16,7 @@
#include <linux/spinlock.h>
#include <linux/bitops.h>
#include <asm/gpio.h>
#include <asm/io.h>
#include <asm/arch/orion.h>
#include "common.h"
......
......@@ -14,6 +14,7 @@
#include <linux/init.h>
#include <linux/irq.h>
#include <asm/gpio.h>
#include <asm/io.h>
#include <asm/arch/orion.h>
#include <asm/plat-orion/irq.h>
#include "common.h"
......
......@@ -24,4 +24,19 @@ static inline void __iomem *__io(unsigned long addr)
#define __io(a) __io(a)
#define __mem_pci(a) (a)
/*****************************************************************************
* Helpers to access Orion registers
****************************************************************************/
#define orion_read(r) __raw_readl(r)
#define orion_write(r, val) __raw_writel(val, r)
/*
* These are not preempt-safe. Locks, if needed, must be taken
* care of by the caller.
*/
#define orion_setbits(r, mask) orion_write((r), orion_read(r) | (mask))
#define orion_clrbits(r, mask) orion_write((r), orion_read(r) & ~(mask))
#endif
......@@ -156,23 +156,5 @@
#define TIMER_VIRT_BASE (ORION_BRIDGE_VIRT_BASE | 0x300)
#ifndef __ASSEMBLY__
/*******************************************************************************
* Helpers to access Orion registers
******************************************************************************/
#include <asm/types.h>
#include <asm/io.h>
#define orion_read(r) __raw_readl(r)
#define orion_write(r, val) __raw_writel(val, r)
/*
* These are not preempt safe. Locks, if needed, must be taken care by caller.
*/
#define orion_setbits(r, mask) orion_write((r), orion_read(r) | (mask))
#define orion_clrbits(r, mask) orion_write((r), orion_read(r) & ~(mask))
#endif /* __ASSEMBLY__ */
#endif /* __ASM_ARCH_ORION_H__ */
#endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册