Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 304b2c68 authored by Alexander Shiyan's avatar Alexander Shiyan Committed by Arnd Bergmann
Browse files

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: default avatarAlexander Shiyan <shc_work@mail.ru>
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent 69964ea4
Loading
Loading
Loading
Loading
+1 −10
Original line number Diff line number Diff line
@@ -23,16 +23,7 @@
#ifndef __ASM_HARDWARE_CLPS7111_H
#define __ASM_HARDWARE_CLPS7111_H

#define CLPS7111_PHYS_BASE	(0x80000000)

#ifndef __ASSEMBLY__
#define clps_readb(off)		__raw_readb(CLPS7111_BASE + (off))
#define clps_readw(off)		__raw_readw(CLPS7111_BASE + (off))
#define clps_readl(off)		__raw_readl(CLPS7111_BASE + (off))
#define clps_writeb(val,off)	__raw_writeb(val, CLPS7111_BASE + (off))
#define clps_writew(val,off)	__raw_writew(val, CLPS7111_BASE + (off))
#define clps_writel(val,off)	__raw_writel(val, CLPS7111_BASE + (off))
#endif
#define CLPS711X_PHYS_BASE	(0x80000000)

#define PADR		(0x0000)
#define PBDR		(0x0001)
+0 −9
Original line number Diff line number Diff line
@@ -23,15 +23,6 @@
#ifndef __ASM_HARDWARE_EP7211_H
#define __ASM_HARDWARE_EP7211_H

#include <asm/hardware/clps7111.h>

/*
 * define EP7211_BASE to be the base address of the region
 * you want to access.
 */

#define EP7211_PHYS_BASE	(0x80000000)

/*
 * XXX miket@bluemug.com: need to introduce EP7211 registers (those not
 * present in 7212) here.
+0 −12
Original line number Diff line number Diff line
@@ -23,18 +23,6 @@
#ifndef __ASM_HARDWARE_EP7212_H
#define __ASM_HARDWARE_EP7212_H

/*
 * define EP7212_BASE to be the base address of the region
 * you want to access.
 */

#define EP7212_PHYS_BASE	(0x80000000)

#ifndef __ASSEMBLY__
#define ep_readl(off)		__raw_readl(EP7212_BASE + (off))
#define ep_writel(val,off)	__raw_writel(val, EP7212_BASE + (off))
#endif

/*
 * These registers are specific to the EP7212 only
 */
+2 −3
Original line number Diff line number Diff line
@@ -36,7 +36,6 @@
#include <asm/page.h>
#include <asm/mach/map.h>
#include <asm/mach/time.h>
#include <asm/hardware/clps7111.h>
#include <asm/system_misc.h>

/*
@@ -44,8 +43,8 @@
 */
static struct map_desc clps711x_io_desc[] __initdata = {
	{
		.virtual	= CLPS7111_VIRT_BASE,
		.pfn		= __phys_to_pfn(CLPS7111_PHYS_BASE),
		.virtual	= (unsigned long)CLPS711X_VIRT_BASE,
		.pfn		= __phys_to_pfn(CLPS711X_PHYS_BASE),
		.length		= SZ_1M,
		.type		= MT_DEVICE
	}
+2 −3
Original line number Diff line number Diff line
@@ -12,7 +12,6 @@
*/

#include <mach/hardware.h>
#include <asm/hardware/clps7111.h>

		.macro	addruart, rp, rv, tmp
#ifndef CONFIG_DEBUG_CLPS711X_UART2
@@ -20,8 +19,8 @@
#else
		mov	\rp, #0x1000	@ UART2
#endif
		orr	\rv, \rp, #CLPS7111_VIRT_BASE
		orr	\rp, \rp, #CLPS7111_PHYS_BASE
		orr	\rv, \rp, #CLPS711X_VIRT_BASE
		orr	\rp, \rp, #CLPS711X_PHYS_BASE
		.endm

		.macro	senduart,rd,rx
Loading