aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-10-12 11:33:23 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-12 11:33:23 -0400
commit9eb200748878751310cd9848c5dd4d467960beec (patch)
tree16458876279abbc597843a7c1bb8216474691380 /include
parent8770c018da7bbaa3b41371abc401b2aa7e76a71a (diff)
parent8ae91b9ad88a130cd50fc0b78b16e7b9510b8067 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6: sh: SH-4A UBC support sh: interrupt exception handling rework sh: Default enable R7780RP IRQs. sh: Zero-out coherent buffer in consistent_alloc(). sh: Convert IPR-IRQ to IRQ chip. sh: Convert INTC2 IRQ handler to irq_chip. sh: Fix pr_debug statements for sh4 sh: Convert r7780rp IRQ handler to IRQ chip. sh: Updates for IRQ handler changes. sh: Kill off timer_ops get_frequency(). sh: First step at generic timeofday support.
Diffstat (limited to 'include')
-rw-r--r--include/asm-sh/cpu-sh4/ubc.h37
-rw-r--r--include/asm-sh/hw_irq.h4
-rw-r--r--include/asm-sh/irq.h14
-rw-r--r--include/asm-sh/irq_regs.h1
-rw-r--r--include/asm-sh/timer.h13
5 files changed, 55 insertions, 14 deletions
diff --git a/include/asm-sh/cpu-sh4/ubc.h b/include/asm-sh/cpu-sh4/ubc.h
index 3d0943167659..c86e17050935 100644
--- a/include/asm-sh/cpu-sh4/ubc.h
+++ b/include/asm-sh/cpu-sh4/ubc.h
@@ -3,6 +3,7 @@
3 * 3 *
4 * Copyright (C) 1999 Niibe Yutaka 4 * Copyright (C) 1999 Niibe Yutaka
5 * Copyright (C) 2003 Paul Mundt 5 * Copyright (C) 2003 Paul Mundt
6 * Copyright (C) 2006 Lineo Solutions Inc. support SH4A UBC
6 * 7 *
7 * This file is subject to the terms and conditions of the GNU General Public 8 * This file is subject to the terms and conditions of the GNU General Public
8 * License. See the file "COPYING" in the main directory of this archive 9 * License. See the file "COPYING" in the main directory of this archive
@@ -11,6 +12,41 @@
11#ifndef __ASM_CPU_SH4_UBC_H 12#ifndef __ASM_CPU_SH4_UBC_H
12#define __ASM_CPU_SH4_UBC_H 13#define __ASM_CPU_SH4_UBC_H
13 14
15#if defined(CONFIG_CPU_SH4A)
16#define UBC_CBR0 0xff200000
17#define UBC_CRR0 0xff200004
18#define UBC_CAR0 0xff200008
19#define UBC_CAMR0 0xff20000c
20#define UBC_CBR1 0xff200020
21#define UBC_CRR1 0xff200024
22#define UBC_CAR1 0xff200028
23#define UBC_CAMR1 0xff20002c
24#define UBC_CDR1 0xff200030
25#define UBC_CDMR1 0xff200034
26#define UBC_CETR1 0xff200038
27#define UBC_CCMFR 0xff200600
28#define UBC_CBCR 0xff200620
29
30/* CBR */
31#define UBC_CBR_AIE (0x01<<30)
32#define UBC_CBR_ID_INST (0x01<<4)
33#define UBC_CBR_RW_READ (0x01<<1)
34#define UBC_CBR_CE (0x01)
35
36#define UBC_CBR_AIV_MASK (0x00FF0000)
37#define UBC_CBR_AIV_SHIFT (16)
38#define UBC_CBR_AIV_SET(asid) (((asid)<<UBC_CBR_AIV_SHIFT) & UBC_CBR_AIV_MASK)
39
40#define UBC_CBR_INIT 0x20000000
41
42/* CRR */
43#define UBC_CRR_RES (0x01<<13)
44#define UBC_CRR_PCB (0x01<<1)
45#define UBC_CRR_BIE (0x01)
46
47#define UBC_CRR_INIT 0x00002000
48
49#else /* CONFIG_CPU_SH4 */
14#define UBC_BARA 0xff200000 50#define UBC_BARA 0xff200000
15#define UBC_BAMRA 0xff200004 51#define UBC_BAMRA 0xff200004
16#define UBC_BBRA 0xff200008 52#define UBC_BBRA 0xff200008
@@ -22,6 +58,7 @@
22#define UBC_BDRB 0xff200018 58#define UBC_BDRB 0xff200018
23#define UBC_BDMRB 0xff20001c 59#define UBC_BDMRB 0xff20001c
24#define UBC_BRCR 0xff200020 60#define UBC_BRCR 0xff200020
61#endif /* CONFIG_CPU_SH4 */
25 62
26#endif /* __ASM_CPU_SH4_UBC_H */ 63#endif /* __ASM_CPU_SH4_UBC_H */
27 64
diff --git a/include/asm-sh/hw_irq.h b/include/asm-sh/hw_irq.h
index fed26616967a..80ee1cda7498 100644
--- a/include/asm-sh/hw_irq.h
+++ b/include/asm-sh/hw_irq.h
@@ -1,4 +1,8 @@
1#ifndef __ASM_SH_HW_IRQ_H 1#ifndef __ASM_SH_HW_IRQ_H
2#define __ASM_SH_HW_IRQ_H 2#define __ASM_SH_HW_IRQ_H
3 3
4#include <asm/atomic.h>
5
6extern atomic_t irq_err_count;
7
4#endif /* __ASM_SH_HW_IRQ_H */ 8#endif /* __ASM_SH_HW_IRQ_H */
diff --git a/include/asm-sh/irq.h b/include/asm-sh/irq.h
index 0e5f365aff70..28996f9c58cc 100644
--- a/include/asm-sh/irq.h
+++ b/include/asm-sh/irq.h
@@ -697,13 +697,15 @@ extern int ipr_irq_demux(int irq);
697 697
698#define INTC2_INTPRI_OFFSET 0x00 698#define INTC2_INTPRI_OFFSET 0x00
699 699
700void make_intc2_irq(unsigned int irq, 700struct intc2_data {
701 unsigned int ipr_offset, unsigned int ipr_shift, 701 unsigned short irq;
702 unsigned int msk_offset, unsigned int msk_shift, 702 unsigned char ipr_offset, ipr_shift;
703 unsigned int priority); 703 unsigned char msk_offset, msk_shift;
704 unsigned char priority;
705};
706
707void make_intc2_irq(struct intc2_data *);
704void init_IRQ_intc2(void); 708void init_IRQ_intc2(void);
705void intc2_add_clear_irq(int irq, int (*fn)(int));
706
707#endif 709#endif
708 710
709extern int shmse_irq_demux(int irq); 711extern int shmse_irq_demux(int irq);
diff --git a/include/asm-sh/irq_regs.h b/include/asm-sh/irq_regs.h
new file mode 100644
index 000000000000..3dd9c0b70270
--- /dev/null
+++ b/include/asm-sh/irq_regs.h
@@ -0,0 +1 @@
#include <asm-generic/irq_regs.h>
diff --git a/include/asm-sh/timer.h b/include/asm-sh/timer.h
index c7ab28095ba0..5df842bcf7b6 100644
--- a/include/asm-sh/timer.h
+++ b/include/asm-sh/timer.h
@@ -8,8 +8,9 @@ struct sys_timer_ops {
8 int (*init)(void); 8 int (*init)(void);
9 int (*start)(void); 9 int (*start)(void);
10 int (*stop)(void); 10 int (*stop)(void);
11#ifndef CONFIG_GENERIC_TIME
11 unsigned long (*get_offset)(void); 12 unsigned long (*get_offset)(void);
12 unsigned long (*get_frequency)(void); 13#endif
13}; 14};
14 15
15struct sys_timer { 16struct sys_timer {
@@ -24,21 +25,17 @@ struct sys_timer {
24extern struct sys_timer tmu_timer; 25extern struct sys_timer tmu_timer;
25extern struct sys_timer *sys_timer; 26extern struct sys_timer *sys_timer;
26 27
28#ifndef CONFIG_GENERIC_TIME
27static inline unsigned long get_timer_offset(void) 29static inline unsigned long get_timer_offset(void)
28{ 30{
29 return sys_timer->ops->get_offset(); 31 return sys_timer->ops->get_offset();
30} 32}
31 33#endif
32static inline unsigned long get_timer_frequency(void)
33{
34 return sys_timer->ops->get_frequency();
35}
36 34
37/* arch/sh/kernel/timers/timer.c */ 35/* arch/sh/kernel/timers/timer.c */
38struct sys_timer *get_sys_timer(void); 36struct sys_timer *get_sys_timer(void);
39 37
40/* arch/sh/kernel/time.c */ 38/* arch/sh/kernel/time.c */
41void handle_timer_tick(struct pt_regs *); 39void handle_timer_tick(void);
42 40
43#endif /* __ASM_SH_TIMER_H */ 41#endif /* __ASM_SH_TIMER_H */
44