diff options
author | Alexander Shiyan <shc_work@mail.ru> | 2012-05-06 09:21:57 +0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-05-11 16:18:01 +0200 |
commit | 304b2c684e42af5b72d643322f783d88538dc817 (patch) | |
tree | 9e5fac4f8873a228a1f433f6f1e4dc6d8ad91f2e /drivers | |
parent | 69964ea4c7b68c9399f7977aa5b9aa6539a6a98a (diff) |
ARM: clps711x: Using a single definition for the PHYS and VIRT registers offset
Using a single definition for the physical and virtual address register for all
variants boards clps711x. This patch also includes the use of a single function
clps_read/write in some units.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/nand/autcpu12.c | 10 | ||||
-rw-r--r-- | drivers/mtd/nand/h1910.c | 2 | ||||
-rw-r--r-- | drivers/tty/serial/clps711x.c | 1 | ||||
-rw-r--r-- | drivers/video/clps711xfb.c | 1 |
4 files changed, 5 insertions, 9 deletions
diff --git a/drivers/mtd/nand/autcpu12.c b/drivers/mtd/nand/autcpu12.c index 2e42ec2e8ff4..04769a49a7cb 100644 --- a/drivers/mtd/nand/autcpu12.c +++ b/drivers/mtd/nand/autcpu12.c @@ -102,10 +102,10 @@ static void autcpu12_hwcontrol(struct mtd_info *mtd, int cmd, void __iomem *addr; unsigned char bits; - addr = CS89712_VIRT_BASE + AUTCPU12_SMC_PORT_OFFSET; - bits = (ctrl & NAND_CLE) << 4; + bits = clps_readb(AUTCPU12_SMC_PORT_OFFSET) & ~0x30; + bits |= (ctrl & NAND_CLE) << 4; bits |= (ctrl & NAND_ALE) << 2; - writeb((readb(addr) & ~0x30) | bits, addr); + clps_writeb(bits, AUTCPU12_SMC_PORT_OFFSET); addr = autcpu12_fio_base + AUTCPU12_SMC_SELECT_OFFSET; writeb((readb(addr) & ~0x1) | (ctrl & NAND_NCE), addr); @@ -120,9 +120,7 @@ static void autcpu12_hwcontrol(struct mtd_info *mtd, int cmd, */ int autcpu12_device_ready(struct mtd_info *mtd) { - void __iomem *addr = CS89712_VIRT_BASE + AUTCPU12_SMC_PORT_OFFSET; - - return readb(addr) & AUTCPU12_SMC_RDY; + return clps_readb(AUTCPU12_SMC_PORT_OFFSET) & AUTCPU12_SMC_RDY; } /* diff --git a/drivers/mtd/nand/h1910.c b/drivers/mtd/nand/h1910.c index 11e487813428..9bf5ce5fa22d 100644 --- a/drivers/mtd/nand/h1910.c +++ b/drivers/mtd/nand/h1910.c @@ -24,7 +24,7 @@ #include <linux/mtd/nand.h> #include <linux/mtd/partitions.h> #include <asm/io.h> -#include <mach/hardware.h> /* for CLPS7111_VIRT_BASE */ +#include <mach/hardware.h> #include <asm/sizes.h> #include <mach/h1900-gpio.h> #include <mach/ipaq.h> diff --git a/drivers/tty/serial/clps711x.c b/drivers/tty/serial/clps711x.c index 836fe2731234..d0f719fafc84 100644 --- a/drivers/tty/serial/clps711x.c +++ b/drivers/tty/serial/clps711x.c @@ -40,7 +40,6 @@ #include <mach/hardware.h> #include <asm/irq.h> -#include <asm/hardware/clps7111.h> #define UART_NR 2 diff --git a/drivers/video/clps711xfb.c b/drivers/video/clps711xfb.c index 99b354b8e257..f994c8b8f10a 100644 --- a/drivers/video/clps711xfb.c +++ b/drivers/video/clps711xfb.c @@ -33,7 +33,6 @@ #include <asm/mach-types.h> #include <linux/uaccess.h> -#include <asm/hardware/clps7111.h> #include <mach/syspld.h> struct fb_info *cfb; |