diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2005-07-14 11:57:16 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2005-10-29 14:31:53 -0400 |
commit | e01402b115cccb6357f956649487aca2c6f7fbba (patch) | |
tree | 256e14f8d2762de98b992219b1a47e8f56b4b0da /include/asm-mips | |
parent | 86071b637db7baf599df26fdf820dce2fc55ca9f (diff) |
More AP / SP bits for the 34K, the Malta bits and things. Still wants
a little polishing.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'include/asm-mips')
-rw-r--r-- | include/asm-mips/mips-boards/maltaint.h | 58 | ||||
-rw-r--r-- | include/asm-mips/rtlx.h | 56 | ||||
-rw-r--r-- | include/asm-mips/system.h | 4 | ||||
-rw-r--r-- | include/asm-mips/traps.h | 3 |
4 files changed, 119 insertions, 2 deletions
diff --git a/include/asm-mips/mips-boards/maltaint.h b/include/asm-mips/mips-boards/maltaint.h index 376181882e81..da6cc2fbbc78 100644 --- a/include/asm-mips/mips-boards/maltaint.h +++ b/include/asm-mips/mips-boards/maltaint.h | |||
@@ -25,9 +25,63 @@ | |||
25 | #ifndef _MIPS_MALTAINT_H | 25 | #ifndef _MIPS_MALTAINT_H |
26 | #define _MIPS_MALTAINT_H | 26 | #define _MIPS_MALTAINT_H |
27 | 27 | ||
28 | /* Number of IRQ supported on hw interrupt 0. */ | 28 | /* |
29 | #define MALTAINT_END 16 | 29 | * Interrupts 0..15 are used for Malta ISA compatible interrupts |
30 | */ | ||
31 | #define MALTA_INT_BASE 0 | ||
32 | |||
33 | /* | ||
34 | * Interrupts 16..23 are used for Malta CPU interrupts (nonEIC mode) | ||
35 | */ | ||
36 | #define MIPSCPU_INT_BASE 16 | ||
37 | |||
38 | /* CPU interrupt offsets */ | ||
39 | #define MIPSCPU_INT_SW0 0 | ||
40 | #define MIPSCPU_INT_SW1 1 | ||
41 | #define MIPSCPU_INT_MB0 2 | ||
42 | #define MIPSCPU_INT_I8259A MIPSCPU_INT_MB0 | ||
43 | #define MIPSCPU_INT_MB1 3 | ||
44 | #define MIPSCPU_INT_SMI MIPSCPU_INT_MB1 | ||
45 | #define MIPSCPU_INT_MB2 4 | ||
46 | #define MIPSCPU_INT_MB3 5 | ||
47 | #define MIPSCPU_INT_COREHI MIPSCPU_INT_MB3 | ||
48 | #define MIPSCPU_INT_MB4 6 | ||
49 | #define MIPSCPU_INT_CORELO MIPSCPU_INT_MB4 | ||
50 | #define MIPSCPU_INT_CPUCTR 7 | ||
51 | |||
52 | /* | ||
53 | * Interrupts 64..127 are used for Soc-it Classic interrupts | ||
54 | */ | ||
55 | #define MSC01C_INT_BASE 64 | ||
56 | |||
57 | /* SOC-it Classic interrupt offsets */ | ||
58 | #define MSC01C_INT_TMR 0 | ||
59 | #define MSC01C_INT_PCI 1 | ||
60 | |||
61 | /* | ||
62 | * Interrupts 64..127 are used for Soc-it EIC interrupts | ||
63 | */ | ||
64 | #define MSC01E_INT_BASE 64 | ||
65 | |||
66 | /* SOC-it EIC interrupt offsets */ | ||
67 | #define MSC01E_INT_SW0 1 | ||
68 | #define MSC01E_INT_SW1 2 | ||
69 | #define MSC01E_INT_MB0 3 | ||
70 | #define MSC01E_INT_I8259A MSC01E_INT_MB0 | ||
71 | #define MSC01E_INT_MB1 4 | ||
72 | #define MSC01E_INT_SMI MSC01E_INT_MB1 | ||
73 | #define MSC01E_INT_MB2 5 | ||
74 | #define MSC01E_INT_MB3 6 | ||
75 | #define MSC01E_INT_COREHI MSC01E_INT_MB3 | ||
76 | #define MSC01E_INT_MB4 7 | ||
77 | #define MSC01E_INT_CORELO MSC01E_INT_MB4 | ||
78 | #define MSC01E_INT_TMR 8 | ||
79 | #define MSC01E_INT_PCI 9 | ||
80 | #define MSC01E_INT_PERFCTR 10 | ||
81 | #define MSC01E_INT_CPUCTR 11 | ||
30 | 82 | ||
83 | #ifndef __ASSEMBLY__ | ||
31 | extern void maltaint_init(void); | 84 | extern void maltaint_init(void); |
85 | #endif | ||
32 | 86 | ||
33 | #endif /* !(_MIPS_MALTAINT_H) */ | 87 | #endif /* !(_MIPS_MALTAINT_H) */ |
diff --git a/include/asm-mips/rtlx.h b/include/asm-mips/rtlx.h new file mode 100644 index 000000000000..83cdf6ab0d1f --- /dev/null +++ b/include/asm-mips/rtlx.h | |||
@@ -0,0 +1,56 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2004, 2005 MIPS Technologies, Inc. All rights reserved. | ||
3 | * | ||
4 | */ | ||
5 | |||
6 | #ifndef _RTLX_H | ||
7 | #define _RTLX_H_ | ||
8 | |||
9 | #define LX_NODE_BASE 10 | ||
10 | |||
11 | #define MIPSCPU_INT_BASE 16 | ||
12 | #define MIPS_CPU_RTLX_IRQ 0 | ||
13 | |||
14 | #define RTLX_VERSION 1 | ||
15 | #define RTLX_xID 0x12345600 | ||
16 | #define RTLX_ID (RTLX_xID | RTLX_VERSION) | ||
17 | #define RTLX_CHANNELS 8 | ||
18 | |||
19 | enum rtlx_state { | ||
20 | RTLX_STATE_UNUSED = 0, | ||
21 | RTLX_STATE_INITIALISED, | ||
22 | RTLX_STATE_REMOTE_READY, | ||
23 | RTLX_STATE_OPENED | ||
24 | }; | ||
25 | |||
26 | #define RTLX_BUFFER_SIZE 1024 | ||
27 | /* each channel supports read and write. | ||
28 | linux (vpe0) reads lx_buffer and writes rt_buffer | ||
29 | SP (vpe1) reads rt_buffer and writes lx_buffer | ||
30 | */ | ||
31 | typedef struct rtlx_channel { | ||
32 | enum rtlx_state rt_state; | ||
33 | enum rtlx_state lx_state; | ||
34 | |||
35 | int buffer_size; | ||
36 | |||
37 | /* read and write indexes per buffer */ | ||
38 | int rt_write, rt_read; | ||
39 | char *rt_buffer; | ||
40 | |||
41 | int lx_write, lx_read; | ||
42 | char *lx_buffer; | ||
43 | |||
44 | void *queues; | ||
45 | |||
46 | } rtlx_channel_t; | ||
47 | |||
48 | typedef struct rtlx_info { | ||
49 | unsigned long id; | ||
50 | enum rtlx_state state; | ||
51 | |||
52 | struct rtlx_channel channel[RTLX_CHANNELS]; | ||
53 | |||
54 | } rtlx_info_t; | ||
55 | |||
56 | #endif | ||
diff --git a/include/asm-mips/system.h b/include/asm-mips/system.h index 36f34d8ddfac..384f0bd854c4 100644 --- a/include/asm-mips/system.h +++ b/include/asm-mips/system.h | |||
@@ -431,6 +431,10 @@ static inline unsigned long __cmpxchg(volatile void * ptr, unsigned long old, | |||
431 | 431 | ||
432 | #define cmpxchg(ptr,old,new) ((__typeof__(*(ptr)))__cmpxchg((ptr), (unsigned long)(old), (unsigned long)(new),sizeof(*(ptr)))) | 432 | #define cmpxchg(ptr,old,new) ((__typeof__(*(ptr)))__cmpxchg((ptr), (unsigned long)(old), (unsigned long)(new),sizeof(*(ptr)))) |
433 | 433 | ||
434 | extern void set_handler (unsigned long offset, void *addr, unsigned long len); | ||
435 | extern void set_uncached_handler (unsigned long offset, void *addr, unsigned long len); | ||
436 | extern void *set_vi_handler (int n, void *addr); | ||
437 | extern void *set_vi_srs_handler (int n, void *addr, int regset); | ||
434 | extern void *set_except_vector(int n, void *addr); | 438 | extern void *set_except_vector(int n, void *addr); |
435 | extern void per_cpu_trap_init(void); | 439 | extern void per_cpu_trap_init(void); |
436 | 440 | ||
diff --git a/include/asm-mips/traps.h b/include/asm-mips/traps.h index 179012263007..d02e019b0127 100644 --- a/include/asm-mips/traps.h +++ b/include/asm-mips/traps.h | |||
@@ -21,4 +21,7 @@ | |||
21 | extern void (*board_be_init)(void); | 21 | extern void (*board_be_init)(void); |
22 | extern int (*board_be_handler)(struct pt_regs *regs, int is_fixup); | 22 | extern int (*board_be_handler)(struct pt_regs *regs, int is_fixup); |
23 | 23 | ||
24 | extern void (*board_nmi_handler_setup)(void); | ||
25 | extern void (*board_ejtag_handler_setup)(void); | ||
26 | |||
24 | #endif /* _ASM_TRAPS_H */ | 27 | #endif /* _ASM_TRAPS_H */ |