[ARM] 4369/1: AT91: Fix circular dependency in header files
Resolve the circular dependency in the AT91 header files (io.h and hardware.h) by moving the at91_sys_read() and at91_sys_write() functions to io.h Signed-off-by: Andrew Victor <andrew@sanpeople.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
f7538ac952
commit
030f4810e7
4 changed files with 20 additions and 18 deletions
|
@ -69,22 +69,5 @@
|
||||||
/* Clocks */
|
/* Clocks */
|
||||||
#define AT91_SLOW_CLOCK 32768 /* slow clock */
|
#define AT91_SLOW_CLOCK 32768 /* slow clock */
|
||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
|
||||||
#include <asm/io.h>
|
|
||||||
|
|
||||||
static inline unsigned int at91_sys_read(unsigned int reg_offset)
|
|
||||||
{
|
|
||||||
void __iomem *addr = (void __iomem *)AT91_VA_BASE_SYS;
|
|
||||||
|
|
||||||
return __raw_readl(addr + reg_offset);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void at91_sys_write(unsigned int reg_offset, unsigned long value)
|
|
||||||
{
|
|
||||||
void __iomem *addr = (void __iomem *)AT91_VA_BASE_SYS;
|
|
||||||
|
|
||||||
__raw_writel(value, addr + reg_offset);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -29,4 +29,22 @@
|
||||||
#define __mem_pci(a) (a)
|
#define __mem_pci(a) (a)
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef __ASSEMBLY__
|
||||||
|
|
||||||
|
static inline unsigned int at91_sys_read(unsigned int reg_offset)
|
||||||
|
{
|
||||||
|
void __iomem *addr = (void __iomem *)AT91_VA_BASE_SYS;
|
||||||
|
|
||||||
|
return __raw_readl(addr + reg_offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void at91_sys_write(unsigned int reg_offset, unsigned long value)
|
||||||
|
{
|
||||||
|
void __iomem *addr = (void __iomem *)AT91_VA_BASE_SYS;
|
||||||
|
|
||||||
|
__raw_writel(value, addr + reg_offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#ifndef __ASM_ARCH_IRQS_H
|
#ifndef __ASM_ARCH_IRQS_H
|
||||||
#define __ASM_ARCH_IRQS_H
|
#define __ASM_ARCH_IRQS_H
|
||||||
|
|
||||||
|
#include <asm/io.h>
|
||||||
#include <asm/arch/at91_aic.h>
|
#include <asm/arch/at91_aic.h>
|
||||||
|
|
||||||
#define NR_AIC_IRQS 32
|
#define NR_AIC_IRQS 32
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#ifndef __ASM_ARCH_UNCOMPRESS_H
|
#ifndef __ASM_ARCH_UNCOMPRESS_H
|
||||||
#define __ASM_ARCH_UNCOMPRESS_H
|
#define __ASM_ARCH_UNCOMPRESS_H
|
||||||
|
|
||||||
#include <asm/hardware.h>
|
#include <asm/io.h>
|
||||||
#include <asm/arch/at91_dbgu.h>
|
#include <asm/arch/at91_dbgu.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Reference in a new issue