1 #ifndef __I386_LITHIUM_H
2 #define __I386_LITHIUM_H
3 
4 #include <linux/config.h>
5 
6 /*
7  * Lithium is the I/O ASIC on the SGI 320 and 540 Visual Workstations
8  */
9 
10 #define	LI_PCI_A_PHYS		0xfc000000	/* Enet is dev 3 */
11 #define	LI_PCI_B_PHYS		0xfd000000	/* PIIX4 is here */
12 
13 /* see set_fixmap() and asm/fixmap.h */
14 #define LI_PCIA_VADDR   (fix_to_virt(FIX_LI_PCIA))
15 #define LI_PCIB_VADDR   (fix_to_virt(FIX_LI_PCIB))
16 
17 /* Not a standard PCI? (not in linux/pci.h) */
18 #define	LI_PCI_BUSNUM	0x44			/* lo8: primary, hi8: sub */
19 #define LI_PCI_INTEN    0x46
20 
21 #ifdef CONFIG_X86_VISWS_APIC
22 /* More special purpose macros... */
li_pcia_write16(unsigned long reg,unsigned short v)23 static __inline void li_pcia_write16(unsigned long reg, unsigned short v)
24 {
25 	*((volatile unsigned short *)(LI_PCIA_VADDR+reg))=v;
26 }
27 
li_pcia_read16(unsigned long reg)28 static __inline unsigned short li_pcia_read16(unsigned long reg)
29 {
30 	 return *((volatile unsigned short *)(LI_PCIA_VADDR+reg));
31 }
32 
li_pcib_write16(unsigned long reg,unsigned short v)33 static __inline void li_pcib_write16(unsigned long reg, unsigned short v)
34 {
35 	*((volatile unsigned short *)(LI_PCIB_VADDR+reg))=v;
36 }
37 
li_pcib_read16(unsigned long reg)38 static __inline unsigned short li_pcib_read16(unsigned long reg)
39 {
40 	return *((volatile unsigned short *)(LI_PCIB_VADDR+reg));
41 }
42 #endif
43 
44 #endif
45 
46