summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDave Jiang <dave.jiang@com.rmk.(none)>2005-01-07 23:36:26 +0000
committerRussell King <rmk@flint.arm.linux.org.uk>2005-01-07 23:36:26 +0000
commitcf12055b92d67b2f0f47a1829b37a3378f2cce07 (patch)
tree4b53a8050a652d466fb30b856861d106ea0bba03 /include
parent8400eab4a1d7bb902fef38b865096a9afbef34c2 (diff)
[ARM PATCH] 2362/1: cleanup of PCI defines for IOP321 platforms
Patch from Dave Jiang Signed-off-by: Dave Jiang Major cleanup of the 321 PCI defines to make them more coherent. Unified some groups that were per platform to common proc specific. Removed some magic numbers. Signed-off-by: Russell King
Diffstat (limited to 'include')
-rw-r--r--include/asm-arm/arch-iop3xx/iop321.h28
-rw-r--r--include/asm-arm/arch-iop3xx/iq31244.h12
-rw-r--r--include/asm-arm/arch-iop3xx/iq80321.h11
3 files changed, 19 insertions, 32 deletions
diff --git a/include/asm-arm/arch-iop3xx/iop321.h b/include/asm-arm/arch-iop3xx/iop321.h
index 98908a02c070..f83511f27e39 100644
--- a/include/asm-arm/arch-iop3xx/iop321.h
+++ b/include/asm-arm/arch-iop3xx/iop321.h
@@ -5,6 +5,7 @@
*
* Author: Rory Bolt <rorybolt@pacbell.net>
* Copyright (C) 2002 Rory Bolt
+ * Copyright (C) 2004 Intel Corp.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -30,21 +31,30 @@
/*
* IOP321 I/O and Mem space regions for PCI autoconfiguration
*/
-#define IOP321_PCI_LOWER_IO 0x90000000
-#define IOP321_PCI_UPPER_IO 0x9000ffff
-#define IOP321_PCI_LOWER_MEM 0x80000000
-#define IOP321_PCI_UPPER_MEM 0x83ffffff
-
-#define IOP321_PCI_WINDOW_SIZE 64 * 0x100000
+#define IOP321_PCI_IO_WINDOW_SIZE 0x10000
+#define IOP321_PCI_LOWER_IO_PA 0x90000000
+#define IOP321_PCI_LOWER_IO_VA 0xfe000000
+#define IOP321_PCI_LOWER_IO_BA (*IOP321_OIOWTVR)
+#define IOP321_PCI_UPPER_IO_PA (IOP321_PCI_LOWER_IO_PA + IOP321_PCI_IO_WINDOW_SIZE - 1)
+#define IOP321_PCI_UPPER_IO_VA (IOP321_PCI_LOWER_IO_VA + IOP321_PCI_IO_WINDOW_SIZE - 1)
+#define IOP321_PCI_UPPER_IO_BA (IOP321_PCI_LOWER_IO_BA + IOP321_PCI_IO_WINDOW_SIZE - 1)
+#define IOP321_PCI_IO_OFFSET (IOP321_PCI_LOWER_IO_VA - IOP321_PCI_LOWER_IO_BA)
+
+#define IOP321_PCI_MEM_WINDOW_SIZE (~*IOP321_IALR1 + 1)
+#define IOP321_PCI_LOWER_MEM_PA 0x80000000
+#define IOP321_PCI_LOWER_MEM_VA 0x80000000
+#define IOP321_PCI_LOWER_MEM_BA (*IOP321_OMWTVR0)
+#define IOP321_PCI_UPPER_MEM_PA (IOP321_PCI_LOWER_MEM_PA + IOP321_PCI_MEM_WINDOW_SIZE - 1)
+#define IOP321_PCI_UPPER_MEM_VA (IOP321_PCI_LOWER_MEM_VA + IOP321_PCI_MEM_WINDOW_SIZE - 1)
+#define IOP321_PCI_UPPER_MEM_BA (IOP321_PCI_LOWER_MEM_BA + IOP321_PCI_MEM_WINDOW_SIZE - 1)
+#define IOP321_PCI_MEM_OFFSET (IOP321_PCI_LOWER_MEM_VA - IOP321_PCI_LOWER_MEM_BA)
/*
* IOP321 chipset registers
*/
#define IOP321_VIRT_MEM_BASE 0xfeffe000 /* chip virtual mem address*/
-//#define IOP321_VIRT_MEM_BASE 0xfff00000 /* chip virtual mem address*/
-
-#define IOP321_PHY_MEM_BASE 0xffffe000 /* chip physical memory address */
+#define IOP321_PHYS_MEM_BASE 0xffffe000 /* chip physical memory address */
#define IOP321_REG_ADDR(reg) (IOP321_VIRT_MEM_BASE | (reg))
/* Reserved 0x00000000 through 0x000000FF */
diff --git a/include/asm-arm/arch-iop3xx/iq31244.h b/include/asm-arm/arch-iop3xx/iq31244.h
index c62c216aefd1..4177cfa8100f 100644
--- a/include/asm-arm/arch-iop3xx/iq31244.h
+++ b/include/asm-arm/arch-iop3xx/iq31244.h
@@ -7,8 +7,6 @@
#ifndef _IQ31244_H_
#define _IQ31244_H_
-#define IQ31244_RAMBASE 0xa0000000
-
#define IQ31244_FLASHBASE 0xf0000000 /* Flash */
#define IQ31244_FLASHSIZE 0x00800000
#define IQ31244_FLASHWIDTH 2
@@ -19,16 +17,6 @@
#define IQ31244_ROTARY_SW 0xfe8d0000 /* Rotary Switch */
#define IQ31244_BATT_STAT 0xfe8f0000 /* Battery Status */
-/*
- * IQ31244 PCI I/O and Mem space regions
- */
-#define IQ31244_PCI_IO_BASE 0x90000000
-#define IQ31244_PCI_IO_SIZE 0x00010000
-#define IQ31244_PCI_MEM_BASE 0x80000000
-//#define IQ31244_PCI_MEM_SIZE 0x04000000
-#define IQ31244_PCI_MEM_SIZE 0x08000000
-#define IQ31244_PCI_IO_OFFSET 0x6e000000
-
#ifndef __ASSEMBLY__
extern void iq31244_map_io(void);
#endif
diff --git a/include/asm-arm/arch-iop3xx/iq80321.h b/include/asm-arm/arch-iop3xx/iq80321.h
index e1c543039780..cb8725979ffa 100644
--- a/include/asm-arm/arch-iop3xx/iq80321.h
+++ b/include/asm-arm/arch-iop3xx/iq80321.h
@@ -7,8 +7,6 @@
#ifndef _IQ80321_H_
#define _IQ80321_H_
-#define IQ80321_RAMBASE 0xa0000000
-
#define IQ80321_FLASHBASE 0xf0000000 /* Flash */
#define IQ80321_FLASHSIZE 0x00800000
#define IQ80321_FLASHWIDTH 1
@@ -19,15 +17,6 @@
#define IQ80321_ROTARY_SW 0xfe8d0000 /* Rotary Switch */
#define IQ80321_BATT_STAT 0xfe8f0000 /* Battery Status */
-/*
- * IQ80321 PCI I/O and Mem space regions
- */
-#define IQ80321_PCI_IO_BASE 0x90000000
-#define IQ80321_PCI_IO_SIZE 0x00010000
-#define IQ80321_PCI_MEM_BASE 0x80000000
-#define IQ80321_PCI_MEM_SIZE 0x04000000
-#define IQ80321_PCI_IO_OFFSET 0x6e000000
-
#ifndef __ASSEMBLY__
extern void iq80321_map_io(void);
#endif