diff options
Diffstat (limited to 'include/asm-powerpc')
| -rw-r--r-- | include/asm-powerpc/backlight.h | 4 | ||||
| -rw-r--r-- | include/asm-powerpc/io.h | 7 | ||||
| -rw-r--r-- | include/asm-powerpc/ipic.h | 12 | ||||
| -rw-r--r-- | include/asm-powerpc/kexec.h | 3 | ||||
| -rw-r--r-- | include/asm-powerpc/kprobes.h | 1 | ||||
| -rw-r--r-- | include/asm-powerpc/mpc86xx.h | 3 | ||||
| -rw-r--r-- | include/asm-powerpc/mpic.h | 125 | ||||
| -rw-r--r-- | include/asm-powerpc/pgalloc.h | 2 | ||||
| -rw-r--r-- | include/asm-powerpc/prom.h | 4 | ||||
| -rw-r--r-- | include/asm-powerpc/rtas.h | 1 | ||||
| -rw-r--r-- | include/asm-powerpc/system.h | 9 | ||||
| -rw-r--r-- | include/asm-powerpc/time.h | 4 | ||||
| -rw-r--r-- | include/asm-powerpc/tsi108.h | 14 | ||||
| -rw-r--r-- | include/asm-powerpc/tsi108_irq.h | 124 |
14 files changed, 291 insertions, 22 deletions
diff --git a/include/asm-powerpc/backlight.h b/include/asm-powerpc/backlight.h index 58d4b6f8d827..8cf5c37c3817 100644 --- a/include/asm-powerpc/backlight.h +++ b/include/asm-powerpc/backlight.h | |||
| @@ -30,8 +30,12 @@ static inline void pmac_backlight_key_down(void) | |||
| 30 | pmac_backlight_key(1); | 30 | pmac_backlight_key(1); |
| 31 | } | 31 | } |
| 32 | 32 | ||
| 33 | extern void pmac_backlight_set_legacy_brightness_pmu(int brightness); | ||
| 33 | extern int pmac_backlight_set_legacy_brightness(int brightness); | 34 | extern int pmac_backlight_set_legacy_brightness(int brightness); |
| 34 | extern int pmac_backlight_get_legacy_brightness(void); | 35 | extern int pmac_backlight_get_legacy_brightness(void); |
| 35 | 36 | ||
| 37 | extern void pmac_backlight_enable(void); | ||
| 38 | extern void pmac_backlight_disable(void); | ||
| 39 | |||
| 36 | #endif /* __KERNEL__ */ | 40 | #endif /* __KERNEL__ */ |
| 37 | #endif | 41 | #endif |
diff --git a/include/asm-powerpc/io.h b/include/asm-powerpc/io.h index a9496f34b048..36c4c34bf565 100644 --- a/include/asm-powerpc/io.h +++ b/include/asm-powerpc/io.h | |||
| @@ -72,6 +72,9 @@ extern unsigned long pci_io_base; | |||
| 72 | * Neither do the standard versions now, these are just here | 72 | * Neither do the standard versions now, these are just here |
| 73 | * for older code. | 73 | * for older code. |
| 74 | */ | 74 | */ |
| 75 | #define insb(port, buf, ns) _insb((u8 __iomem *)((port)+pci_io_base), (buf), (ns)) | ||
| 76 | #define insw(port, buf, ns) _insw_ns((u8 __iomem *)((port)+pci_io_base), (buf), (ns)) | ||
| 77 | #define insl(port, buf, nl) _insl_ns((u8 __iomem *)((port)+pci_io_base), (buf), (nl)) | ||
| 75 | #define insw_ns(port, buf, ns) _insw_ns((u16 __iomem *)((port)+pci_io_base), (buf), (ns)) | 78 | #define insw_ns(port, buf, ns) _insw_ns((u16 __iomem *)((port)+pci_io_base), (buf), (ns)) |
| 76 | #define insl_ns(port, buf, nl) _insl_ns((u32 __iomem *)((port)+pci_io_base), (buf), (nl)) | 79 | #define insl_ns(port, buf, nl) _insl_ns((u32 __iomem *)((port)+pci_io_base), (buf), (nl)) |
| 77 | #else | 80 | #else |
| @@ -137,12 +140,12 @@ static inline void __raw_writeq(unsigned long v, volatile void __iomem *addr) | |||
| 137 | #define insw_ns(port, buf, ns) eeh_insw_ns((port), (buf), (ns)) | 140 | #define insw_ns(port, buf, ns) eeh_insw_ns((port), (buf), (ns)) |
| 138 | #define insl_ns(port, buf, nl) eeh_insl_ns((port), (buf), (nl)) | 141 | #define insl_ns(port, buf, nl) eeh_insl_ns((port), (buf), (nl)) |
| 139 | 142 | ||
| 143 | #endif | ||
| 144 | |||
| 140 | #define outsb(port, buf, ns) _outsb((u8 __iomem *)((port)+pci_io_base), (buf), (ns)) | 145 | #define outsb(port, buf, ns) _outsb((u8 __iomem *)((port)+pci_io_base), (buf), (ns)) |
| 141 | #define outsw(port, buf, ns) _outsw_ns((u16 __iomem *)((port)+pci_io_base), (buf), (ns)) | 146 | #define outsw(port, buf, ns) _outsw_ns((u16 __iomem *)((port)+pci_io_base), (buf), (ns)) |
| 142 | #define outsl(port, buf, nl) _outsl_ns((u32 __iomem *)((port)+pci_io_base), (buf), (nl)) | 147 | #define outsl(port, buf, nl) _outsl_ns((u32 __iomem *)((port)+pci_io_base), (buf), (nl)) |
| 143 | 148 | ||
| 144 | #endif | ||
| 145 | |||
| 146 | #define readb_relaxed(addr) readb(addr) | 149 | #define readb_relaxed(addr) readb(addr) |
| 147 | #define readw_relaxed(addr) readw(addr) | 150 | #define readw_relaxed(addr) readw(addr) |
| 148 | #define readl_relaxed(addr) readl(addr) | 151 | #define readl_relaxed(addr) readl(addr) |
diff --git a/include/asm-powerpc/ipic.h b/include/asm-powerpc/ipic.h index 0fe396a2b666..53079ec3a515 100644 --- a/include/asm-powerpc/ipic.h +++ b/include/asm-powerpc/ipic.h | |||
| @@ -69,9 +69,6 @@ enum ipic_mcp_irq { | |||
| 69 | IPIC_MCP_MU = 7, | 69 | IPIC_MCP_MU = 7, |
| 70 | }; | 70 | }; |
| 71 | 71 | ||
| 72 | extern void ipic_init(phys_addr_t phys_addr, unsigned int flags, | ||
| 73 | unsigned int irq_offset, | ||
| 74 | unsigned char *senses, unsigned int senses_count); | ||
| 75 | extern int ipic_set_priority(unsigned int irq, unsigned int priority); | 72 | extern int ipic_set_priority(unsigned int irq, unsigned int priority); |
| 76 | extern void ipic_set_highest_priority(unsigned int irq); | 73 | extern void ipic_set_highest_priority(unsigned int irq); |
| 77 | extern void ipic_set_default_priority(void); | 74 | extern void ipic_set_default_priority(void); |
| @@ -79,7 +76,16 @@ extern void ipic_enable_mcp(enum ipic_mcp_irq mcp_irq); | |||
| 79 | extern void ipic_disable_mcp(enum ipic_mcp_irq mcp_irq); | 76 | extern void ipic_disable_mcp(enum ipic_mcp_irq mcp_irq); |
| 80 | extern u32 ipic_get_mcp_status(void); | 77 | extern u32 ipic_get_mcp_status(void); |
| 81 | extern void ipic_clear_mcp_status(u32 mask); | 78 | extern void ipic_clear_mcp_status(u32 mask); |
| 79 | |||
| 80 | #ifdef CONFIG_PPC_MERGE | ||
| 81 | extern void ipic_init(struct device_node *node, unsigned int flags); | ||
| 82 | extern unsigned int ipic_get_irq(struct pt_regs *regs); | ||
| 83 | #else | ||
| 84 | extern void ipic_init(phys_addr_t phys_addr, unsigned int flags, | ||
| 85 | unsigned int irq_offset, | ||
| 86 | unsigned char *senses, unsigned int senses_count); | ||
| 82 | extern int ipic_get_irq(struct pt_regs *regs); | 87 | extern int ipic_get_irq(struct pt_regs *regs); |
| 88 | #endif | ||
| 83 | 89 | ||
| 84 | #endif /* __ASM_IPIC_H__ */ | 90 | #endif /* __ASM_IPIC_H__ */ |
| 85 | #endif /* __KERNEL__ */ | 91 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-powerpc/kexec.h b/include/asm-powerpc/kexec.h index 8f7fd5cfec34..11cbdf81fd2e 100644 --- a/include/asm-powerpc/kexec.h +++ b/include/asm-powerpc/kexec.h | |||
| @@ -32,6 +32,7 @@ | |||
| 32 | #endif | 32 | #endif |
| 33 | 33 | ||
| 34 | #ifndef __ASSEMBLY__ | 34 | #ifndef __ASSEMBLY__ |
| 35 | #include <linux/cpumask.h> | ||
| 35 | 36 | ||
| 36 | #ifdef CONFIG_KEXEC | 37 | #ifdef CONFIG_KEXEC |
| 37 | 38 | ||
| @@ -109,7 +110,6 @@ static inline void crash_setup_regs(struct pt_regs *newregs, | |||
| 109 | 110 | ||
| 110 | #define MAX_NOTE_BYTES 1024 | 111 | #define MAX_NOTE_BYTES 1024 |
| 111 | 112 | ||
| 112 | #ifdef __powerpc64__ | ||
| 113 | extern void kexec_smp_wait(void); /* get and clear naca physid, wait for | 113 | extern void kexec_smp_wait(void); /* get and clear naca physid, wait for |
| 114 | master to copy new code to 0 */ | 114 | master to copy new code to 0 */ |
| 115 | extern int crashing_cpu; | 115 | extern int crashing_cpu; |
| @@ -119,7 +119,6 @@ static inline int kexec_sr_activated(int cpu) | |||
| 119 | { | 119 | { |
| 120 | return cpu_isset(cpu,cpus_in_sr); | 120 | return cpu_isset(cpu,cpus_in_sr); |
| 121 | } | 121 | } |
| 122 | #endif /* __powerpc64 __ */ | ||
| 123 | 122 | ||
| 124 | struct kimage; | 123 | struct kimage; |
| 125 | struct pt_regs; | 124 | struct pt_regs; |
diff --git a/include/asm-powerpc/kprobes.h b/include/asm-powerpc/kprobes.h index 2d0af52c823d..34e1f89a5fa0 100644 --- a/include/asm-powerpc/kprobes.h +++ b/include/asm-powerpc/kprobes.h | |||
| @@ -51,6 +51,7 @@ typedef unsigned int kprobe_opcode_t; | |||
| 51 | 51 | ||
| 52 | #define ARCH_SUPPORTS_KRETPROBES | 52 | #define ARCH_SUPPORTS_KRETPROBES |
| 53 | #define ARCH_INACTIVE_KPROBE_COUNT 1 | 53 | #define ARCH_INACTIVE_KPROBE_COUNT 1 |
| 54 | #define flush_insn_slot(p) do { } while (0) | ||
| 54 | 55 | ||
| 55 | void kretprobe_trampoline(void); | 56 | void kretprobe_trampoline(void); |
| 56 | extern void arch_remove_kprobe(struct kprobe *p); | 57 | extern void arch_remove_kprobe(struct kprobe *p); |
diff --git a/include/asm-powerpc/mpc86xx.h b/include/asm-powerpc/mpc86xx.h index f260382739fa..b85df45b1a84 100644 --- a/include/asm-powerpc/mpc86xx.h +++ b/include/asm-powerpc/mpc86xx.h | |||
| @@ -23,8 +23,6 @@ | |||
| 23 | #define _ISA_MEM_BASE isa_mem_base | 23 | #define _ISA_MEM_BASE isa_mem_base |
| 24 | #ifdef CONFIG_PCI | 24 | #ifdef CONFIG_PCI |
| 25 | #define PCI_DRAM_OFFSET pci_dram_offset | 25 | #define PCI_DRAM_OFFSET pci_dram_offset |
| 26 | #else | ||
| 27 | #define PCI_DRAM_OFFSET 0 | ||
| 28 | #endif | 26 | #endif |
| 29 | 27 | ||
| 30 | #define CPU0_BOOT_RELEASE 0x01000000 | 28 | #define CPU0_BOOT_RELEASE 0x01000000 |
| @@ -33,7 +31,6 @@ | |||
| 33 | #define MCM_PORT_CONFIG_OFFSET 0x1010 | 31 | #define MCM_PORT_CONFIG_OFFSET 0x1010 |
| 34 | 32 | ||
| 35 | /* Offset from CCSRBAR */ | 33 | /* Offset from CCSRBAR */ |
| 36 | #define MPC86xx_OPENPIC_OFFSET (0x40000) | ||
| 37 | #define MPC86xx_MCM_OFFSET (0x00000) | 34 | #define MPC86xx_MCM_OFFSET (0x00000) |
| 38 | #define MPC86xx_MCM_SIZE (0x02000) | 35 | #define MPC86xx_MCM_SIZE (0x02000) |
| 39 | 36 | ||
diff --git a/include/asm-powerpc/mpic.h b/include/asm-powerpc/mpic.h index eb241c99c457..a9f9604b9eff 100644 --- a/include/asm-powerpc/mpic.h +++ b/include/asm-powerpc/mpic.h | |||
| @@ -41,6 +41,7 @@ | |||
| 41 | #define MPIC_GREG_IPI_VECTOR_PRI_1 0x000b0 | 41 | #define MPIC_GREG_IPI_VECTOR_PRI_1 0x000b0 |
| 42 | #define MPIC_GREG_IPI_VECTOR_PRI_2 0x000c0 | 42 | #define MPIC_GREG_IPI_VECTOR_PRI_2 0x000c0 |
| 43 | #define MPIC_GREG_IPI_VECTOR_PRI_3 0x000d0 | 43 | #define MPIC_GREG_IPI_VECTOR_PRI_3 0x000d0 |
| 44 | #define MPIC_GREG_IPI_STRIDE 0x10 | ||
| 44 | #define MPIC_GREG_SPURIOUS 0x000e0 | 45 | #define MPIC_GREG_SPURIOUS 0x000e0 |
| 45 | #define MPIC_GREG_TIMER_FREQ 0x000f0 | 46 | #define MPIC_GREG_TIMER_FREQ 0x000f0 |
| 46 | 47 | ||
| @@ -68,6 +69,7 @@ | |||
| 68 | #define MPIC_CPU_IPI_DISPATCH_1 0x00050 | 69 | #define MPIC_CPU_IPI_DISPATCH_1 0x00050 |
| 69 | #define MPIC_CPU_IPI_DISPATCH_2 0x00060 | 70 | #define MPIC_CPU_IPI_DISPATCH_2 0x00060 |
| 70 | #define MPIC_CPU_IPI_DISPATCH_3 0x00070 | 71 | #define MPIC_CPU_IPI_DISPATCH_3 0x00070 |
| 72 | #define MPIC_CPU_IPI_DISPATCH_STRIDE 0x00010 | ||
| 71 | #define MPIC_CPU_CURRENT_TASK_PRI 0x00080 | 73 | #define MPIC_CPU_CURRENT_TASK_PRI 0x00080 |
| 72 | #define MPIC_CPU_TASKPRI_MASK 0x0000000f | 74 | #define MPIC_CPU_TASKPRI_MASK 0x0000000f |
| 73 | #define MPIC_CPU_WHOAMI 0x00090 | 75 | #define MPIC_CPU_WHOAMI 0x00090 |
| @@ -114,6 +116,103 @@ | |||
| 114 | #define MPIC_VEC_TIMER_1 248 | 116 | #define MPIC_VEC_TIMER_1 248 |
| 115 | #define MPIC_VEC_TIMER_0 247 | 117 | #define MPIC_VEC_TIMER_0 247 |
| 116 | 118 | ||
| 119 | /* | ||
| 120 | * Tsi108 implementation of MPIC has many differences from the original one | ||
| 121 | */ | ||
| 122 | |||
| 123 | /* | ||
| 124 | * Global registers | ||
| 125 | */ | ||
| 126 | |||
| 127 | #define TSI108_GREG_BASE 0x00000 | ||
| 128 | #define TSI108_GREG_FEATURE_0 0x00000 | ||
| 129 | #define TSI108_GREG_GLOBAL_CONF_0 0x00004 | ||
| 130 | #define TSI108_GREG_VENDOR_ID 0x0000c | ||
| 131 | #define TSI108_GREG_IPI_VECTOR_PRI_0 0x00204 /* Doorbell 0 */ | ||
| 132 | #define TSI108_GREG_IPI_STRIDE 0x0c | ||
| 133 | #define TSI108_GREG_SPURIOUS 0x00010 | ||
| 134 | #define TSI108_GREG_TIMER_FREQ 0x00014 | ||
| 135 | |||
| 136 | /* | ||
| 137 | * Timer registers | ||
| 138 | */ | ||
| 139 | #define TSI108_TIMER_BASE 0x0030 | ||
| 140 | #define TSI108_TIMER_STRIDE 0x10 | ||
| 141 | #define TSI108_TIMER_CURRENT_CNT 0x00000 | ||
| 142 | #define TSI108_TIMER_BASE_CNT 0x00004 | ||
| 143 | #define TSI108_TIMER_VECTOR_PRI 0x00008 | ||
| 144 | #define TSI108_TIMER_DESTINATION 0x0000c | ||
| 145 | |||
| 146 | /* | ||
| 147 | * Per-Processor registers | ||
| 148 | */ | ||
| 149 | #define TSI108_CPU_BASE 0x00300 | ||
| 150 | #define TSI108_CPU_STRIDE 0x00040 | ||
| 151 | #define TSI108_CPU_IPI_DISPATCH_0 0x00200 | ||
| 152 | #define TSI108_CPU_IPI_DISPATCH_STRIDE 0x00000 | ||
| 153 | #define TSI108_CPU_CURRENT_TASK_PRI 0x00000 | ||
| 154 | #define TSI108_CPU_WHOAMI 0xffffffff | ||
| 155 | #define TSI108_CPU_INTACK 0x00004 | ||
| 156 | #define TSI108_CPU_EOI 0x00008 | ||
| 157 | |||
| 158 | /* | ||
| 159 | * Per-source registers | ||
| 160 | */ | ||
| 161 | #define TSI108_IRQ_BASE 0x00100 | ||
| 162 | #define TSI108_IRQ_STRIDE 0x00008 | ||
| 163 | #define TSI108_IRQ_VECTOR_PRI 0x00000 | ||
| 164 | #define TSI108_VECPRI_VECTOR_MASK 0x000000ff | ||
| 165 | #define TSI108_VECPRI_POLARITY_POSITIVE 0x01000000 | ||
| 166 | #define TSI108_VECPRI_POLARITY_NEGATIVE 0x00000000 | ||
| 167 | #define TSI108_VECPRI_SENSE_LEVEL 0x02000000 | ||
| 168 | #define TSI108_VECPRI_SENSE_EDGE 0x00000000 | ||
| 169 | #define TSI108_VECPRI_POLARITY_MASK 0x01000000 | ||
| 170 | #define TSI108_VECPRI_SENSE_MASK 0x02000000 | ||
| 171 | #define TSI108_IRQ_DESTINATION 0x00004 | ||
| 172 | |||
| 173 | /* weird mpic register indices and mask bits in the HW info array */ | ||
| 174 | enum { | ||
| 175 | MPIC_IDX_GREG_BASE = 0, | ||
| 176 | MPIC_IDX_GREG_FEATURE_0, | ||
| 177 | MPIC_IDX_GREG_GLOBAL_CONF_0, | ||
| 178 | MPIC_IDX_GREG_VENDOR_ID, | ||
| 179 | MPIC_IDX_GREG_IPI_VECTOR_PRI_0, | ||
| 180 | MPIC_IDX_GREG_IPI_STRIDE, | ||
| 181 | MPIC_IDX_GREG_SPURIOUS, | ||
| 182 | MPIC_IDX_GREG_TIMER_FREQ, | ||
| 183 | |||
| 184 | MPIC_IDX_TIMER_BASE, | ||
| 185 | MPIC_IDX_TIMER_STRIDE, | ||
| 186 | MPIC_IDX_TIMER_CURRENT_CNT, | ||
| 187 | MPIC_IDX_TIMER_BASE_CNT, | ||
| 188 | MPIC_IDX_TIMER_VECTOR_PRI, | ||
| 189 | MPIC_IDX_TIMER_DESTINATION, | ||
| 190 | |||
| 191 | MPIC_IDX_CPU_BASE, | ||
| 192 | MPIC_IDX_CPU_STRIDE, | ||
| 193 | MPIC_IDX_CPU_IPI_DISPATCH_0, | ||
| 194 | MPIC_IDX_CPU_IPI_DISPATCH_STRIDE, | ||
| 195 | MPIC_IDX_CPU_CURRENT_TASK_PRI, | ||
| 196 | MPIC_IDX_CPU_WHOAMI, | ||
| 197 | MPIC_IDX_CPU_INTACK, | ||
| 198 | MPIC_IDX_CPU_EOI, | ||
| 199 | |||
| 200 | MPIC_IDX_IRQ_BASE, | ||
| 201 | MPIC_IDX_IRQ_STRIDE, | ||
| 202 | MPIC_IDX_IRQ_VECTOR_PRI, | ||
| 203 | |||
| 204 | MPIC_IDX_VECPRI_VECTOR_MASK, | ||
| 205 | MPIC_IDX_VECPRI_POLARITY_POSITIVE, | ||
| 206 | MPIC_IDX_VECPRI_POLARITY_NEGATIVE, | ||
| 207 | MPIC_IDX_VECPRI_SENSE_LEVEL, | ||
| 208 | MPIC_IDX_VECPRI_SENSE_EDGE, | ||
| 209 | MPIC_IDX_VECPRI_POLARITY_MASK, | ||
| 210 | MPIC_IDX_VECPRI_SENSE_MASK, | ||
| 211 | MPIC_IDX_IRQ_DESTINATION, | ||
| 212 | MPIC_IDX_END | ||
| 213 | }; | ||
| 214 | |||
| 215 | |||
| 117 | #ifdef CONFIG_MPIC_BROKEN_U3 | 216 | #ifdef CONFIG_MPIC_BROKEN_U3 |
| 118 | /* Fixup table entry */ | 217 | /* Fixup table entry */ |
| 119 | struct mpic_irq_fixup | 218 | struct mpic_irq_fixup |
| @@ -171,15 +270,29 @@ struct mpic | |||
| 171 | volatile u32 __iomem *cpuregs[MPIC_MAX_CPUS]; | 270 | volatile u32 __iomem *cpuregs[MPIC_MAX_CPUS]; |
| 172 | volatile u32 __iomem *isus[MPIC_MAX_ISU]; | 271 | volatile u32 __iomem *isus[MPIC_MAX_ISU]; |
| 173 | 272 | ||
| 273 | #ifdef CONFIG_MPIC_WEIRD | ||
| 274 | /* Pointer to HW info array */ | ||
| 275 | u32 *hw_set; | ||
| 276 | #endif | ||
| 277 | |||
| 174 | /* link */ | 278 | /* link */ |
| 175 | struct mpic *next; | 279 | struct mpic *next; |
| 176 | }; | 280 | }; |
| 177 | 281 | ||
| 282 | /* | ||
| 283 | * MPIC flags (passed to mpic_alloc) | ||
| 284 | * | ||
| 285 | * The top 4 bits contain an MPIC bhw id that is used to index the | ||
| 286 | * register offsets and some masks when CONFIG_MPIC_WEIRD is set. | ||
| 287 | * Note setting any ID (leaving those bits to 0) means standard MPIC | ||
| 288 | */ | ||
| 289 | |||
| 178 | /* This is the primary controller, only that one has IPIs and | 290 | /* This is the primary controller, only that one has IPIs and |
| 179 | * has afinity control. A non-primary MPIC always uses CPU0 | 291 | * has afinity control. A non-primary MPIC always uses CPU0 |
| 180 | * registers only | 292 | * registers only |
| 181 | */ | 293 | */ |
| 182 | #define MPIC_PRIMARY 0x00000001 | 294 | #define MPIC_PRIMARY 0x00000001 |
| 295 | |||
| 183 | /* Set this for a big-endian MPIC */ | 296 | /* Set this for a big-endian MPIC */ |
| 184 | #define MPIC_BIG_ENDIAN 0x00000002 | 297 | #define MPIC_BIG_ENDIAN 0x00000002 |
| 185 | /* Broken U3 MPIC */ | 298 | /* Broken U3 MPIC */ |
| @@ -188,6 +301,18 @@ struct mpic | |||
| 188 | #define MPIC_BROKEN_IPI 0x00000008 | 301 | #define MPIC_BROKEN_IPI 0x00000008 |
| 189 | /* MPIC wants a reset */ | 302 | /* MPIC wants a reset */ |
| 190 | #define MPIC_WANTS_RESET 0x00000010 | 303 | #define MPIC_WANTS_RESET 0x00000010 |
| 304 | /* Spurious vector requires EOI */ | ||
| 305 | #define MPIC_SPV_EOI 0x00000020 | ||
| 306 | /* No passthrough disable */ | ||
| 307 | #define MPIC_NO_PTHROU_DIS 0x00000040 | ||
| 308 | |||
| 309 | /* MPIC HW modification ID */ | ||
| 310 | #define MPIC_REGSET_MASK 0xf0000000 | ||
| 311 | #define MPIC_REGSET(val) (((val) & 0xf ) << 28) | ||
| 312 | #define MPIC_GET_REGSET(flags) (((flags) >> 28) & 0xf) | ||
| 313 | |||
| 314 | #define MPIC_REGSET_STANDARD MPIC_REGSET(0) /* Original MPIC */ | ||
| 315 | #define MPIC_REGSET_TSI108 MPIC_REGSET(1) /* Tsi108/109 PIC */ | ||
| 191 | 316 | ||
| 192 | /* Allocate the controller structure and setup the linux irq descs | 317 | /* Allocate the controller structure and setup the linux irq descs |
| 193 | * for the range if interrupts passed in. No HW initialization is | 318 | * for the range if interrupts passed in. No HW initialization is |
diff --git a/include/asm-powerpc/pgalloc.h b/include/asm-powerpc/pgalloc.h index 9f0917c68659..ae63db7b3e7d 100644 --- a/include/asm-powerpc/pgalloc.h +++ b/include/asm-powerpc/pgalloc.h | |||
| @@ -117,7 +117,7 @@ static inline void pte_free(struct page *ptepage) | |||
| 117 | pte_free_kernel(page_address(ptepage)); | 117 | pte_free_kernel(page_address(ptepage)); |
| 118 | } | 118 | } |
| 119 | 119 | ||
| 120 | #define PGF_CACHENUM_MASK 0xf | 120 | #define PGF_CACHENUM_MASK 0x3 |
| 121 | 121 | ||
| 122 | typedef struct pgtable_free { | 122 | typedef struct pgtable_free { |
| 123 | unsigned long val; | 123 | unsigned long val; |
diff --git a/include/asm-powerpc/prom.h b/include/asm-powerpc/prom.h index b095a285c84b..d0fa1b9aed35 100644 --- a/include/asm-powerpc/prom.h +++ b/include/asm-powerpc/prom.h | |||
| @@ -276,6 +276,7 @@ extern void of_irq_map_init(unsigned int flags); | |||
| 276 | * of_irq_map_raw - Low level interrupt tree parsing | 276 | * of_irq_map_raw - Low level interrupt tree parsing |
| 277 | * @parent: the device interrupt parent | 277 | * @parent: the device interrupt parent |
| 278 | * @intspec: interrupt specifier ("interrupts" property of the device) | 278 | * @intspec: interrupt specifier ("interrupts" property of the device) |
| 279 | * @ointsize: size of the passed in interrupt specifier | ||
| 279 | * @addr: address specifier (start of "reg" property of the device) | 280 | * @addr: address specifier (start of "reg" property of the device) |
| 280 | * @out_irq: structure of_irq filled by this function | 281 | * @out_irq: structure of_irq filled by this function |
| 281 | * | 282 | * |
| @@ -288,7 +289,8 @@ extern void of_irq_map_init(unsigned int flags); | |||
| 288 | * | 289 | * |
| 289 | */ | 290 | */ |
| 290 | 291 | ||
| 291 | extern int of_irq_map_raw(struct device_node *parent, u32 *intspec, u32 *addr, | 292 | extern int of_irq_map_raw(struct device_node *parent, u32 *intspec, |
| 293 | u32 ointsize, u32 *addr, | ||
| 292 | struct of_irq *out_irq); | 294 | struct of_irq *out_irq); |
| 293 | 295 | ||
| 294 | 296 | ||
diff --git a/include/asm-powerpc/rtas.h b/include/asm-powerpc/rtas.h index a33c6acffa61..82a27e9a041f 100644 --- a/include/asm-powerpc/rtas.h +++ b/include/asm-powerpc/rtas.h | |||
| @@ -170,6 +170,7 @@ extern int rtas_get_sensor(int sensor, int index, int *state); | |||
| 170 | extern int rtas_get_power_level(int powerdomain, int *level); | 170 | extern int rtas_get_power_level(int powerdomain, int *level); |
| 171 | extern int rtas_set_power_level(int powerdomain, int level, int *setlevel); | 171 | extern int rtas_set_power_level(int powerdomain, int level, int *setlevel); |
| 172 | extern int rtas_set_indicator(int indicator, int index, int new_value); | 172 | extern int rtas_set_indicator(int indicator, int index, int new_value); |
| 173 | extern int rtas_set_indicator_fast(int indicator, int index, int new_value); | ||
| 173 | extern void rtas_progress(char *s, unsigned short hex); | 174 | extern void rtas_progress(char *s, unsigned short hex); |
| 174 | extern void rtas_initialize(void); | 175 | extern void rtas_initialize(void); |
| 175 | 176 | ||
diff --git a/include/asm-powerpc/system.h b/include/asm-powerpc/system.h index 7307aa775671..4c9f5229e833 100644 --- a/include/asm-powerpc/system.h +++ b/include/asm-powerpc/system.h | |||
| @@ -53,6 +53,15 @@ | |||
| 53 | #define smp_read_barrier_depends() do { } while(0) | 53 | #define smp_read_barrier_depends() do { } while(0) |
| 54 | #endif /* CONFIG_SMP */ | 54 | #endif /* CONFIG_SMP */ |
| 55 | 55 | ||
| 56 | /* | ||
| 57 | * This is a barrier which prevents following instructions from being | ||
| 58 | * started until the value of the argument x is known. For example, if | ||
| 59 | * x is a variable loaded from memory, this prevents following | ||
| 60 | * instructions from being executed until the load has been performed. | ||
| 61 | */ | ||
| 62 | #define data_barrier(x) \ | ||
| 63 | asm volatile("twi 0,%0,0; isync" : : "r" (x) : "memory"); | ||
| 64 | |||
| 56 | struct task_struct; | 65 | struct task_struct; |
| 57 | struct pt_regs; | 66 | struct pt_regs; |
| 58 | 67 | ||
diff --git a/include/asm-powerpc/time.h b/include/asm-powerpc/time.h index dcde4410348d..5785ac4737b5 100644 --- a/include/asm-powerpc/time.h +++ b/include/asm-powerpc/time.h | |||
| @@ -30,10 +30,6 @@ extern unsigned long tb_ticks_per_usec; | |||
| 30 | extern unsigned long tb_ticks_per_sec; | 30 | extern unsigned long tb_ticks_per_sec; |
| 31 | extern u64 tb_to_xs; | 31 | extern u64 tb_to_xs; |
| 32 | extern unsigned tb_to_us; | 32 | extern unsigned tb_to_us; |
| 33 | extern unsigned long tb_last_stamp; | ||
| 34 | extern u64 tb_last_jiffy; | ||
| 35 | |||
| 36 | DECLARE_PER_CPU(unsigned long, last_jiffy); | ||
| 37 | 33 | ||
| 38 | struct rtc_time; | 34 | struct rtc_time; |
| 39 | extern void to_tm(int tim, struct rtc_time * tm); | 35 | extern void to_tm(int tim, struct rtc_time * tm); |
diff --git a/include/asm-powerpc/tsi108.h b/include/asm-powerpc/tsi108.h index c4c278d72f71..2c702d35a7cf 100644 --- a/include/asm-powerpc/tsi108.h +++ b/include/asm-powerpc/tsi108.h | |||
| @@ -1,16 +1,18 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * include/asm-ppc/tsi108.h | ||
| 3 | * | ||
| 4 | * common routine and memory layout for Tundra TSI108(Grendel) host bridge | 2 | * common routine and memory layout for Tundra TSI108(Grendel) host bridge |
| 5 | * memory controller. | 3 | * memory controller. |
| 6 | * | 4 | * |
| 7 | * Author: Jacob Pan (jacob.pan@freescale.com) | 5 | * Author: Jacob Pan (jacob.pan@freescale.com) |
| 8 | * Alex Bounine (alexandreb@tundra.com) | 6 | * Alex Bounine (alexandreb@tundra.com) |
| 9 | * 2004 (c) Freescale Semiconductor Inc. This file is licensed under | 7 | * |
| 10 | * the terms of the GNU General Public License version 2. This program | 8 | * Copyright 2004-2006 Freescale Semiconductor, Inc. |
| 11 | * is licensed "as is" without any warranty of any kind, whether express | 9 | * |
| 12 | * or implied. | 10 | * This program is free software; you can redistribute it and/or |
| 11 | * modify it under the terms of the GNU General Public License | ||
| 12 | * as published by the Free Software Foundation; either version | ||
| 13 | * 2 of the License, or (at your option) any later version. | ||
| 13 | */ | 14 | */ |
| 15 | |||
| 14 | #ifndef __PPC_KERNEL_TSI108_H | 16 | #ifndef __PPC_KERNEL_TSI108_H |
| 15 | #define __PPC_KERNEL_TSI108_H | 17 | #define __PPC_KERNEL_TSI108_H |
| 16 | 18 | ||
diff --git a/include/asm-powerpc/tsi108_irq.h b/include/asm-powerpc/tsi108_irq.h new file mode 100644 index 000000000000..3e4d04effa57 --- /dev/null +++ b/include/asm-powerpc/tsi108_irq.h | |||
| @@ -0,0 +1,124 @@ | |||
| 1 | /* | ||
| 2 | * (C) Copyright 2005 Tundra Semiconductor Corp. | ||
| 3 | * Alex Bounine, <alexandreb at tundra.com). | ||
| 4 | * | ||
| 5 | * See file CREDITS for list of people who contributed to this | ||
| 6 | * project. | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or | ||
| 9 | * modify it under the terms of the GNU General Public License as | ||
| 10 | * published by the Free Software Foundation; either version 2 of | ||
| 11 | * the License, or (at your option) any later version. | ||
| 12 | * | ||
| 13 | * This program is distributed in the hope that it will be useful, | ||
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 16 | * GNU General Public License for more details. | ||
| 17 | * | ||
| 18 | * You should have received a copy of the GNU General Public License | ||
| 19 | * along with this program; if not, write to the Free Software | ||
| 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | ||
| 21 | * MA 02111-1307 USA | ||
| 22 | */ | ||
| 23 | |||
| 24 | /* | ||
| 25 | * definitions for interrupt controller initialization and external interrupt | ||
| 26 | * demultiplexing on TSI108EMU/SVB boards. | ||
| 27 | */ | ||
| 28 | |||
| 29 | #ifndef _ASM_PPC_TSI108_IRQ_H | ||
| 30 | #define _ASM_PPC_TSI108_IRQ_H | ||
| 31 | |||
| 32 | /* | ||
| 33 | * Tsi108 interrupts | ||
| 34 | */ | ||
| 35 | #ifndef TSI108_IRQ_REG_BASE | ||
| 36 | #define TSI108_IRQ_REG_BASE 0 | ||
| 37 | #endif | ||
| 38 | |||
| 39 | #define TSI108_IRQ(x) (TSI108_IRQ_REG_BASE + (x)) | ||
| 40 | |||
| 41 | #define TSI108_MAX_VECTORS (36 + 4) /* 36 sources + PCI INT demux */ | ||
| 42 | #define MAX_TASK_PRIO 0xF | ||
| 43 | |||
| 44 | #define TSI108_IRQ_SPURIOUS (TSI108_MAX_VECTORS) | ||
| 45 | |||
| 46 | #define DEFAULT_PRIO_LVL 10 /* initial priority level */ | ||
| 47 | |||
| 48 | /* Interrupt vectors assignment to external and internal | ||
| 49 | * sources of requests. */ | ||
| 50 | |||
| 51 | /* EXTERNAL INTERRUPT SOURCES */ | ||
| 52 | |||
| 53 | #define IRQ_TSI108_EXT_INT0 TSI108_IRQ(0) /* External Source at INT[0] */ | ||
| 54 | #define IRQ_TSI108_EXT_INT1 TSI108_IRQ(1) /* External Source at INT[1] */ | ||
| 55 | #define IRQ_TSI108_EXT_INT2 TSI108_IRQ(2) /* External Source at INT[2] */ | ||
| 56 | #define IRQ_TSI108_EXT_INT3 TSI108_IRQ(3) /* External Source at INT[3] */ | ||
| 57 | |||
| 58 | /* INTERNAL INTERRUPT SOURCES */ | ||
| 59 | |||
| 60 | #define IRQ_TSI108_RESERVED0 TSI108_IRQ(4) /* Reserved IRQ */ | ||
| 61 | #define IRQ_TSI108_RESERVED1 TSI108_IRQ(5) /* Reserved IRQ */ | ||
| 62 | #define IRQ_TSI108_RESERVED2 TSI108_IRQ(6) /* Reserved IRQ */ | ||
| 63 | #define IRQ_TSI108_RESERVED3 TSI108_IRQ(7) /* Reserved IRQ */ | ||
| 64 | #define IRQ_TSI108_DMA0 TSI108_IRQ(8) /* DMA0 */ | ||
| 65 | #define IRQ_TSI108_DMA1 TSI108_IRQ(9) /* DMA1 */ | ||
| 66 | #define IRQ_TSI108_DMA2 TSI108_IRQ(10) /* DMA2 */ | ||
| 67 | #define IRQ_TSI108_DMA3 TSI108_IRQ(11) /* DMA3 */ | ||
| 68 | #define IRQ_TSI108_UART0 TSI108_IRQ(12) /* UART0 */ | ||
| 69 | #define IRQ_TSI108_UART1 TSI108_IRQ(13) /* UART1 */ | ||
| 70 | #define IRQ_TSI108_I2C TSI108_IRQ(14) /* I2C */ | ||
| 71 | #define IRQ_TSI108_GPIO TSI108_IRQ(15) /* GPIO */ | ||
| 72 | #define IRQ_TSI108_GIGE0 TSI108_IRQ(16) /* GIGE0 */ | ||
| 73 | #define IRQ_TSI108_GIGE1 TSI108_IRQ(17) /* GIGE1 */ | ||
| 74 | #define IRQ_TSI108_RESERVED4 TSI108_IRQ(18) /* Reserved IRQ */ | ||
| 75 | #define IRQ_TSI108_HLP TSI108_IRQ(19) /* HLP */ | ||
| 76 | #define IRQ_TSI108_SDRAM TSI108_IRQ(20) /* SDC */ | ||
| 77 | #define IRQ_TSI108_PROC_IF TSI108_IRQ(21) /* Processor IF */ | ||
| 78 | #define IRQ_TSI108_RESERVED5 TSI108_IRQ(22) /* Reserved IRQ */ | ||
| 79 | #define IRQ_TSI108_PCI TSI108_IRQ(23) /* PCI/X block */ | ||
| 80 | |||
| 81 | #define IRQ_TSI108_MBOX0 TSI108_IRQ(24) /* Mailbox 0 register */ | ||
| 82 | #define IRQ_TSI108_MBOX1 TSI108_IRQ(25) /* Mailbox 1 register */ | ||
| 83 | #define IRQ_TSI108_MBOX2 TSI108_IRQ(26) /* Mailbox 2 register */ | ||
| 84 | #define IRQ_TSI108_MBOX3 TSI108_IRQ(27) /* Mailbox 3 register */ | ||
| 85 | |||
| 86 | #define IRQ_TSI108_DBELL0 TSI108_IRQ(28) /* Doorbell 0 */ | ||
| 87 | #define IRQ_TSI108_DBELL1 TSI108_IRQ(29) /* Doorbell 1 */ | ||
| 88 | #define IRQ_TSI108_DBELL2 TSI108_IRQ(30) /* Doorbell 2 */ | ||
| 89 | #define IRQ_TSI108_DBELL3 TSI108_IRQ(31) /* Doorbell 3 */ | ||
| 90 | |||
| 91 | #define IRQ_TSI108_TIMER0 TSI108_IRQ(32) /* Global Timer 0 */ | ||
| 92 | #define IRQ_TSI108_TIMER1 TSI108_IRQ(33) /* Global Timer 1 */ | ||
| 93 | #define IRQ_TSI108_TIMER2 TSI108_IRQ(34) /* Global Timer 2 */ | ||
| 94 | #define IRQ_TSI108_TIMER3 TSI108_IRQ(35) /* Global Timer 3 */ | ||
| 95 | |||
| 96 | /* | ||
| 97 | * PCI bus INTA# - INTD# lines demultiplexor | ||
| 98 | */ | ||
| 99 | #define IRQ_PCI_INTAD_BASE TSI108_IRQ(36) | ||
| 100 | #define IRQ_PCI_INTA (IRQ_PCI_INTAD_BASE + 0) | ||
| 101 | #define IRQ_PCI_INTB (IRQ_PCI_INTAD_BASE + 1) | ||
| 102 | #define IRQ_PCI_INTC (IRQ_PCI_INTAD_BASE + 2) | ||
| 103 | #define IRQ_PCI_INTD (IRQ_PCI_INTAD_BASE + 3) | ||
| 104 | #define NUM_PCI_IRQS (4) | ||
| 105 | |||
| 106 | /* number of entries in vector dispatch table */ | ||
| 107 | #define IRQ_TSI108_TAB_SIZE (TSI108_MAX_VECTORS + 1) | ||
| 108 | |||
| 109 | /* Mapping of MPIC outputs to processors' interrupt pins */ | ||
| 110 | |||
| 111 | #define IDIR_INT_OUT0 0x1 | ||
| 112 | #define IDIR_INT_OUT1 0x2 | ||
| 113 | #define IDIR_INT_OUT2 0x4 | ||
| 114 | #define IDIR_INT_OUT3 0x8 | ||
| 115 | |||
| 116 | /*--------------------------------------------------------------- | ||
| 117 | * IRQ line configuration parameters */ | ||
| 118 | |||
| 119 | /* Interrupt delivery modes */ | ||
| 120 | typedef enum { | ||
| 121 | TSI108_IRQ_DIRECTED, | ||
| 122 | TSI108_IRQ_DISTRIBUTED, | ||
| 123 | } TSI108_IRQ_MODE; | ||
| 124 | #endif /* _ASM_PPC_TSI108_IRQ_H */ | ||
