Go to the documentation of this file. 1 #ifndef _ASM_X86_VISWS_COBALT_H
2 #define _ASM_X86_VISWS_COBALT_H
4 #include <asm/fixmap.h>
10 #define CO_CPU_NUM_PHYS 0x1e00
11 #define CO_CPU_TAB_PHYS (CO_CPU_NUM_PHYS + 2)
15 #define CO_CPU_PHYS 0xc2000000
16 #define CO_APIC_PHYS 0xc4000000
19 #define CO_CPU_VADDR (fix_to_virt(FIX_CO_CPU))
20 #define CO_APIC_VADDR (fix_to_virt(FIX_CO_APIC))
23 #define CO_CPU_REV 0x08
24 #define CO_CPU_CTRL 0x10
25 #define CO_CPU_STAT 0x20
26 #define CO_CPU_TIMEVAL 0x30
29 #define CO_CTRL_TIMERUN 0x04
30 #define CO_CTRL_TIMEMASK 0x08
33 #define CO_STAT_TIMEINTR 0x02
36 #define CO_TIME_HZ 100000000
39 #define CO_APIC_HI(n) (((n) * 0x10) + 4)
40 #define CO_APIC_LO(n) ((n) * 0x10)
41 #define CO_APIC_ID 0x0ffc
44 #define CO_APIC_ENABLE 0x00000100
47 #define CO_APIC_MASK 0x00010000
48 #define CO_APIC_LEVEL 0x00008000
54 #define CO_APIC_IDE0 4
55 #define CO_APIC_IDE1 2
57 #define CO_APIC_8259 12
60 #define CO_APIC_PCIA_BASE0 0
61 #define CO_APIC_PCIA_BASE123 5
63 #define CO_APIC_PIIX4_USB 7
66 #define CO_APIC_PCIB_BASE0 8
67 #define CO_APIC_PCIB_BASE123 13
69 #define CO_APIC_VIDOUT0 16
70 #define CO_APIC_VIDOUT1 17
71 #define CO_APIC_VIDIN0 18
72 #define CO_APIC_VIDIN1 19
74 #define CO_APIC_LI_AUDIO 22
79 #define CO_APIC_CPU 28
80 #define CO_APIC_NMI 29
81 #define CO_APIC_LAST CO_APIC_NMI
88 #define CO_IRQ_APIC0 16
89 #define IS_CO_APIC(irq) ((irq) >= CO_IRQ_APIC0)
90 #define CO_IRQ(apic) (CO_IRQ_APIC0 + (apic))
91 #define CO_APIC(irq) ((irq) - CO_IRQ_APIC0)
92 #define CO_IRQ_IDE0 14
93 #define CO_IRQ_IDE1 15
94 #define CO_IRQ_8259 CO_IRQ(CO_APIC_8259)
96 #ifdef CONFIG_X86_VISWS_APIC
97 static inline void co_cpu_write(
unsigned long reg,
unsigned long v)
102 static inline unsigned long co_cpu_read(
unsigned long reg)
107 static inline void co_apic_write(
unsigned long reg,
unsigned long v)
112 static inline unsigned long co_apic_read(
unsigned long reg)