patch-2.4.22 linux-2.4.22/include/asm-mips64/mips-boards/malta.h
Next file: linux-2.4.22/include/asm-mips64/mips-boards/msc01_pci.h
Previous file: linux-2.4.22/include/asm-mips64/mips-boards/gt64120.h
Back to the patch index
Back to the overall index
- Lines: 59
- Date:
2003-08-25 04:44:44.000000000 -0700
- Orig file:
linux-2.4.21/include/asm-mips64/mips-boards/malta.h
- Orig date:
2002-11-28 15:53:15.000000000 -0800
diff -urN linux-2.4.21/include/asm-mips64/mips-boards/malta.h linux-2.4.22/include/asm-mips64/mips-boards/malta.h
@@ -2,8 +2,6 @@
* Carsten Langgaard, carstenl@mips.com
* Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved.
*
- * ########################################################################
- *
* This program is free software; you can distribute it and/or modify it
* under the terms of the GNU General Public License (Version 2) as
* published by the Free Software Foundation.
@@ -17,13 +15,10 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
- * ########################################################################
- *
* Defines of the Malta board specific address-MAP, registers, etc.
- *
*/
-#ifndef _MIPS_MALTA_H
-#define _MIPS_MALTA_H
+#ifndef __ASM_MIPS_BOARDS_MALTA_H
+#define __ASM_MIPS_BOARDS_MALTA_H
#include <asm/addrspace.h>
#include <asm/io.h>
@@ -32,9 +27,23 @@
* Malta I/O ports base address for the Galileo GT64120 and Algorithmics
* Bonito system controllers.
*/
-#define MALTA_GT_PORT_BASE (KSEG1ADDR(0x18000000))
+#define MALTA_GT_PORT_BASE get_gt_port_base(GT_PCI0IOLD_OFS)
#define MALTA_BONITO_PORT_BASE (KSEG1ADDR(0x1fd00000))
-#define MALTA_MSC_PORT_BASE (KSEG1ADDR(0x18000000))
+#define MALTA_MSC_PORT_BASE get_msc_port_base(MSC01_PCI_SC2PIOBASL)
+
+static inline unsigned long get_gt_port_base(unsigned long reg)
+{
+ unsigned long addr;
+ addr = GT_READ(reg);
+ return KSEG1ADDR((addr & 0xffff) << 21);
+}
+
+static inline unsigned long get_msc_port_base(unsigned long reg)
+{
+ unsigned long addr;
+ MSC_READ(reg, addr);
+ return KSEG1ADDR(addr);
+}
/*
* Malta RTC-device indirect register access.
@@ -59,4 +68,6 @@
#define SMSC_WRITE(x,a) outb(x,a)
-#endif /* !(_MIPS_MALTA_H) */
+#define MALTA_JMPRS_REG (KSEG1ADDR(0x1f000210))
+
+#endif /* __ASM_MIPS_BOARDS_MALTA_H */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)