Original kernel 2.4.37.5
[tomato.git] / release / src / linux / linux / include / asm-ppc / ibm4xx.h
blobfd5158ef98c74a867ee99e1e2afe97b5615038c7
1 /*
3 * Copyright (c) 1999 Grant Erickson <grant@lcse.umn.edu>
5 * Module name: ibm4xx.h
7 * Description:
8 * A generic include file which pulls in appropriate include files
9 * for specific board types based on configuration settings.
13 #ifdef __KERNEL__
14 #ifndef __ASM_IBM4XX_H__
15 #define __ASM_IBM4XX_H__
17 #include <linux/config.h>
18 #include <asm/types.h>
20 #ifdef CONFIG_4xx
22 #ifndef __ASSEMBLY__
24 * The "residual" board information structure the boot loader passes
25 * into the kernel.
27 extern unsigned char __res[];
29 /* Device Control Registers */
31 #define stringify(s) tostring(s)
32 #define tostring(s) #s
34 #define mfdcr_or_dflt(rn,default_rval) \
35 ({unsigned int rval; \
36 if (rn == 0) \
37 rval = default_rval; \
38 else \
39 asm volatile("mfdcr %0," stringify(rn) : "=r" (rval)); \
40 rval;})
42 /* R/W of indirect DCRs make use of standard naming conventions for DCRs */
44 #define mfdcri(base, reg) \
45 ({ \
46 mtdcr(base##_CFGADDR, base##_##reg); \
47 mfdcr(base##_CFGDATA); \
50 #define mtdcri(base, reg, data) \
51 do { \
52 mtdcr(base##_CFGADDR, base##_##reg); \
53 mtdcr(base##_CFGDATA, data); \
54 } while (0)
55 #endif /* __ASSEMBLY__ */
57 #endif /* CONFIG_4xx */
59 #ifdef CONFIG_40x
61 #if defined(CONFIG_CPCI405)
62 #include <platforms/cpci405.h>
63 #endif
65 #if defined(CONFIG_EP405)
66 #include <platforms/ep405.h>
67 #endif
69 #if defined(CONFIG_OAK)
70 #include <platforms/oak.h>
71 #endif
73 #if defined(CONFIG_REDWOOD_5)
74 #include <platforms/redwood5.h>
75 #endif
77 #if defined(CONFIG_REDWOOD_6)
78 #include <platforms/redwood6.h>
79 #endif
81 #if defined(CONFIG_WALNUT)
82 #include <platforms/walnut.h>
83 #endif
85 #ifndef PPC4xx_MACHINE_NAME
86 #define PPC4xx_MACHINE_NAME "Unidentified 4xx class"
87 #endif
89 /* IO_BASE is for PCI I/O.
90 * ISA not supported, just here to resolve copilation.
93 #ifndef _IO_BASE
94 #define _IO_BASE 0xe8000000 /* The PCI address window */
95 #define _ISA_MEM_BASE 0
96 #define PCI_DRAM_OFFSET 0
97 #endif
99 #elif CONFIG_44x
101 #if defined(CONFIG_EBONY)
102 #include <platforms/ebony.h>
103 #endif
105 #if defined(CONFIG_OCOTEA)
106 #include <platforms/ocotea.h>
107 #endif
109 #endif /* CONFIG_40x */
111 #ifndef __ASSEMBLY__
112 #if defined(EMAC_NUMS) && EMAC_NUMS > 0
114 * Per EMAC map of PHY ids which should be probed by emac_probe.
115 * Different EMACs can have overlapping maps.
117 * Note, this map uses inverse logic for bits:
118 * 0 - id should be probed
119 * 1 - id should be ignored
121 * Default value of 0x00000000 - will result in usual
122 * auto-detection logic.
125 extern u32 emac_phy_map[EMAC_NUMS];
126 #endif
127 #endif /* __ASSEMBLY__ */
129 #endif /* __ASM_IBM4XX_H__ */
130 #endif /* __KERNEL__ */