summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2001-03-26 17:16:42 +0000
committerRalf Baechle <ralf@linux-mips.org>2001-03-26 17:16:42 +0000
commit5e3e4ab42584e5155a776c40c30fd13c83e580ad (patch)
tree69b912cc0bd490ca4a5a0d311415feed4f422373
parent95e509f61d8560e71031a496f5448212089e1f78 (diff)
Prefix CPP symbols from tcmodule.h with TC_ to avoid namespace
collisions.
-rw-r--r--drivers/tc/tc.c18
-rw-r--r--include/asm-mips/dec/tcmodule.h31
2 files changed, 25 insertions, 24 deletions
diff --git a/drivers/tc/tc.c b/drivers/tc/tc.c
index 18e60a60d..8938abfa8 100644
--- a/drivers/tc/tc.c
+++ b/drivers/tc/tc.c
@@ -1,4 +1,4 @@
-/* $Id: tc.c,v 1.3 1999/10/09 00:01:32 ralf Exp $
+/*
* tc-init: We assume the TURBOchannel to be up and running so
* just probe for Modules and fill in the global data structure
* tc_bus.
@@ -8,9 +8,7 @@
* for more details.
*
* Copyright (c) Harald Koerfgen, 1998
- *
*/
-
#include <linux/string.h>
#include <linux/init.h>
#include <linux/ioport.h>
@@ -113,19 +111,19 @@ static void __init tc_probe(unsigned long startaddr, unsigned long size, int max
for (slot = 0; slot <= max_slot; slot++) {
module = (char *)(startaddr + slot * size);
offset = -1;
- if (module[OLDCARD + PATTERN0] == 0x55 && module[OLDCARD + PATTERN1] == 0x00
- && module[OLDCARD + PATTERN2] == 0xaa && module[OLDCARD + PATTERN3] == 0xff)
+ if (module[OLDCARD + TC_PATTERN0] == 0x55 && module[OLDCARD + TC_PATTERN1] == 0x00
+ && module[OLDCARD + TC_PATTERN2] == 0xaa && module[OLDCARD + TC_PATTERN3] == 0xff)
offset = OLDCARD;
- if (module[PATTERN0] == 0x55 && module[PATTERN1] == 0x00
- && module[PATTERN2] == 0xaa && module[PATTERN3] == 0xff)
+ if (module[TC_PATTERN0] == 0x55 && module[TC_PATTERN1] == 0x00
+ && module[TC_PATTERN2] == 0xaa && module[TC_PATTERN3] == 0xff)
offset = 0;
if (offset != -1) {
tc_bus[slot].base_addr = (unsigned long)module;
for(i = 0; i < 8; i++) {
- tc_bus[slot].firmware[i] = module[FIRM_VER + offset + 4 * i];
- tc_bus[slot].vendor[i] = module[VENDOR + offset + 4 * i];
- tc_bus[slot].name[i] = module[MODULE + offset + 4 * i];
+ tc_bus[slot].firmware[i] = module[TC_FIRM_VER + offset + 4 * i];
+ tc_bus[slot].vendor[i] = module[TC_VENDOR + offset + 4 * i];
+ tc_bus[slot].name[i] = module[TC_MODULE + offset + 4 * i];
}
tc_bus[slot].firmware[8] = 0;
tc_bus[slot].vendor[8] = 0;
diff --git a/include/asm-mips/dec/tcmodule.h b/include/asm-mips/dec/tcmodule.h
index 26c5a5e29..40d2b18c4 100644
--- a/include/asm-mips/dec/tcmodule.h
+++ b/include/asm-mips/dec/tcmodule.h
@@ -15,21 +15,24 @@
*
* Jan.1998 Harald Koerfgen
*/
+#ifndef __ASM_DEC_TCMOULE_H
+#define __ASM_DEC_TCMOULE_H
#define OLDCARD 0x3c0000
-#define ROM_WIDTH 0x3e0
-#define ROM_STRIDE 0x3e4
-#define ROM_SIZE 0x3e8
-#define SLOT_SIZE 0x3ec
-#define PATTERN0 0x3f0
-#define PATTERN1 0x3f4
-#define PATTERN2 0x3f8
-#define PATTERN3 0x3fc
-#define FIRM_VER 0x400
-#define VENDOR 0x420
-#define MODULE 0x440
-#define FIRM_TYPE 0x460
-#define FLAGS 0x470
+#define TC_ROM_WIDTH 0x3e0
+#define TC_ROM_STRIDE 0x3e4
+#define TC_ROM_SIZE 0x3e8
+#define TC_SLOT_SIZE 0x3ec
+#define TC_PATTERN0 0x3f0
+#define TC_PATTERN1 0x3f4
+#define TC_PATTERN2 0x3f8
+#define TC_PATTERN3 0x3fc
+#define TC_FIRM_VER 0x400
+#define TC_VENDOR 0x420
+#define TC_MODULE 0x440
+#define TC_FIRM_TYPE 0x460
+#define TC_FLAGS 0x470
+#define TC_ROM_OBJECTS 0x480
-#define ROM_OBJECTS 0x480
+#endif /* __ASM_DEC_TCMOULE_H */