diff options
Diffstat (limited to 'arch/sh/include')
55 files changed, 1769 insertions, 473 deletions
diff --git a/arch/sh/include/asm/bitops-llsc.h b/arch/sh/include/asm/bitops-llsc.h new file mode 100644 index 000000000000..43b8e1a8239e --- /dev/null +++ b/arch/sh/include/asm/bitops-llsc.h | |||
@@ -0,0 +1,144 @@ | |||
1 | #ifndef __ASM_SH_BITOPS_LLSC_H | ||
2 | #define __ASM_SH_BITOPS_LLSC_H | ||
3 | |||
4 | static inline void set_bit(int nr, volatile void * addr) | ||
5 | { | ||
6 | int mask; | ||
7 | volatile unsigned int *a = addr; | ||
8 | unsigned long tmp; | ||
9 | |||
10 | a += nr >> 5; | ||
11 | mask = 1 << (nr & 0x1f); | ||
12 | |||
13 | __asm__ __volatile__ ( | ||
14 | "1: \n\t" | ||
15 | "movli.l @%1, %0 ! set_bit \n\t" | ||
16 | "or %3, %0 \n\t" | ||
17 | "movco.l %0, @%1 \n\t" | ||
18 | "bf 1b \n\t" | ||
19 | : "=&z" (tmp), "=r" (a) | ||
20 | : "1" (a), "r" (mask) | ||
21 | : "t", "memory" | ||
22 | ); | ||
23 | } | ||
24 | |||
25 | static inline void clear_bit(int nr, volatile void * addr) | ||
26 | { | ||
27 | int mask; | ||
28 | volatile unsigned int *a = addr; | ||
29 | unsigned long tmp; | ||
30 | |||
31 | a += nr >> 5; | ||
32 | mask = 1 << (nr & 0x1f); | ||
33 | |||
34 | __asm__ __volatile__ ( | ||
35 | "1: \n\t" | ||
36 | "movli.l @%1, %0 ! clear_bit \n\t" | ||
37 | "and %3, %0 \n\t" | ||
38 | "movco.l %0, @%1 \n\t" | ||
39 | "bf 1b \n\t" | ||
40 | : "=&z" (tmp), "=r" (a) | ||
41 | : "1" (a), "r" (~mask) | ||
42 | : "t", "memory" | ||
43 | ); | ||
44 | } | ||
45 | |||
46 | static inline void change_bit(int nr, volatile void * addr) | ||
47 | { | ||
48 | int mask; | ||
49 | volatile unsigned int *a = addr; | ||
50 | unsigned long tmp; | ||
51 | |||
52 | a += nr >> 5; | ||
53 | mask = 1 << (nr & 0x1f); | ||
54 | |||
55 | __asm__ __volatile__ ( | ||
56 | "1: \n\t" | ||
57 | "movli.l @%1, %0 ! change_bit \n\t" | ||
58 | "xor %3, %0 \n\t" | ||
59 | "movco.l %0, @%1 \n\t" | ||
60 | "bf 1b \n\t" | ||
61 | : "=&z" (tmp), "=r" (a) | ||
62 | : "1" (a), "r" (mask) | ||
63 | : "t", "memory" | ||
64 | ); | ||
65 | } | ||
66 | |||
67 | static inline int test_and_set_bit(int nr, volatile void * addr) | ||
68 | { | ||
69 | int mask, retval; | ||
70 | volatile unsigned int *a = addr; | ||
71 | unsigned long tmp; | ||
72 | |||
73 | a += nr >> 5; | ||
74 | mask = 1 << (nr & 0x1f); | ||
75 | |||
76 | __asm__ __volatile__ ( | ||
77 | "1: \n\t" | ||
78 | "movli.l @%1, %0 ! test_and_set_bit \n\t" | ||
79 | "mov %0, %2 \n\t" | ||
80 | "or %4, %0 \n\t" | ||
81 | "movco.l %0, @%1 \n\t" | ||
82 | "bf 1b \n\t" | ||
83 | "and %4, %2 \n\t" | ||
84 | : "=&z" (tmp), "=r" (a), "=&r" (retval) | ||
85 | : "1" (a), "r" (mask) | ||
86 | : "t", "memory" | ||
87 | ); | ||
88 | |||
89 | return retval != 0; | ||
90 | } | ||
91 | |||
92 | static inline int test_and_clear_bit(int nr, volatile void * addr) | ||
93 | { | ||
94 | int mask, retval; | ||
95 | volatile unsigned int *a = addr; | ||
96 | unsigned long tmp; | ||
97 | |||
98 | a += nr >> 5; | ||
99 | mask = 1 << (nr & 0x1f); | ||
100 | |||
101 | __asm__ __volatile__ ( | ||
102 | "1: \n\t" | ||
103 | "movli.l @%1, %0 ! test_and_clear_bit \n\t" | ||
104 | "mov %0, %2 \n\t" | ||
105 | "and %5, %0 \n\t" | ||
106 | "movco.l %0, @%1 \n\t" | ||
107 | "bf 1b \n\t" | ||
108 | "and %4, %2 \n\t" | ||
109 | "synco \n\t" | ||
110 | : "=&z" (tmp), "=r" (a), "=&r" (retval) | ||
111 | : "1" (a), "r" (mask), "r" (~mask) | ||
112 | : "t", "memory" | ||
113 | ); | ||
114 | |||
115 | return retval != 0; | ||
116 | } | ||
117 | |||
118 | static inline int test_and_change_bit(int nr, volatile void * addr) | ||
119 | { | ||
120 | int mask, retval; | ||
121 | volatile unsigned int *a = addr; | ||
122 | unsigned long tmp; | ||
123 | |||
124 | a += nr >> 5; | ||
125 | mask = 1 << (nr & 0x1f); | ||
126 | |||
127 | __asm__ __volatile__ ( | ||
128 | "1: \n\t" | ||
129 | "movli.l @%1, %0 ! test_and_change_bit \n\t" | ||
130 | "mov %0, %2 \n\t" | ||
131 | "xor %4, %0 \n\t" | ||
132 | "movco.l %0, @%1 \n\t" | ||
133 | "bf 1b \n\t" | ||
134 | "and %4, %2 \n\t" | ||
135 | "synco \n\t" | ||
136 | : "=&z" (tmp), "=r" (a), "=&r" (retval) | ||
137 | : "1" (a), "r" (mask) | ||
138 | : "t", "memory" | ||
139 | ); | ||
140 | |||
141 | return retval != 0; | ||
142 | } | ||
143 | |||
144 | #endif /* __ASM_SH_BITOPS_LLSC_H */ | ||
diff --git a/arch/sh/include/asm/bitops.h b/arch/sh/include/asm/bitops.h index d7d382f63ee5..367930d8e5ae 100644 --- a/arch/sh/include/asm/bitops.h +++ b/arch/sh/include/asm/bitops.h | |||
@@ -13,6 +13,8 @@ | |||
13 | 13 | ||
14 | #ifdef CONFIG_GUSA_RB | 14 | #ifdef CONFIG_GUSA_RB |
15 | #include <asm/bitops-grb.h> | 15 | #include <asm/bitops-grb.h> |
16 | #elif defined(CONFIG_CPU_SH4A) | ||
17 | #include <asm/bitops-llsc.h> | ||
16 | #else | 18 | #else |
17 | #include <asm/bitops-irq.h> | 19 | #include <asm/bitops-irq.h> |
18 | #endif | 20 | #endif |
diff --git a/arch/sh/include/asm/clock.h b/arch/sh/include/asm/clock.h index 720dfab7b15e..f9c88583d90a 100644 --- a/arch/sh/include/asm/clock.h +++ b/arch/sh/include/asm/clock.h | |||
@@ -39,6 +39,7 @@ struct clk { | |||
39 | 39 | ||
40 | /* Should be defined by processor-specific code */ | 40 | /* Should be defined by processor-specific code */ |
41 | void arch_init_clk_ops(struct clk_ops **, int type); | 41 | void arch_init_clk_ops(struct clk_ops **, int type); |
42 | int __init arch_clk_init(void); | ||
42 | 43 | ||
43 | /* arch/sh/kernel/cpu/clock.c */ | 44 | /* arch/sh/kernel/cpu/clock.c */ |
44 | int clk_init(void); | 45 | int clk_init(void); |
diff --git a/arch/sh/include/asm/cmpxchg-llsc.h b/arch/sh/include/asm/cmpxchg-llsc.h new file mode 100644 index 000000000000..aee3bf286581 --- /dev/null +++ b/arch/sh/include/asm/cmpxchg-llsc.h | |||
@@ -0,0 +1,71 @@ | |||
1 | #ifndef __ASM_SH_CMPXCHG_LLSC_H | ||
2 | #define __ASM_SH_CMPXCHG_LLSC_H | ||
3 | |||
4 | static inline unsigned long xchg_u32(volatile u32 *m, unsigned long val) | ||
5 | { | ||
6 | unsigned long retval; | ||
7 | unsigned long tmp; | ||
8 | |||
9 | __asm__ __volatile__ ( | ||
10 | "1: \n\t" | ||
11 | "movli.l @%1, %0 ! xchg_u32 \n\t" | ||
12 | "mov %0, %2 \n\t" | ||
13 | "mov %4, %0 \n\t" | ||
14 | "movco.l %0, @%1 \n\t" | ||
15 | "bf 1b \n\t" | ||
16 | "synco \n\t" | ||
17 | : "=&z"(tmp), "=r" (m), "=&r" (retval) | ||
18 | : "1" (m), "r" (val) | ||
19 | : "t", "memory" | ||
20 | ); | ||
21 | |||
22 | return retval; | ||
23 | } | ||
24 | |||
25 | static inline unsigned long xchg_u8(volatile u8 *m, unsigned long val) | ||
26 | { | ||
27 | unsigned long retval; | ||
28 | unsigned long tmp; | ||
29 | |||
30 | __asm__ __volatile__ ( | ||
31 | "1: \n\t" | ||
32 | "movli.l @%1, %0 ! xchg_u8 \n\t" | ||
33 | "mov %0, %2 \n\t" | ||
34 | "mov %4, %0 \n\t" | ||
35 | "movco.l %0, @%1 \n\t" | ||
36 | "bf 1b \n\t" | ||
37 | "synco \n\t" | ||
38 | : "=&z"(tmp), "=r" (m), "=&r" (retval) | ||
39 | : "1" (m), "r" (val & 0xff) | ||
40 | : "t", "memory" | ||
41 | ); | ||
42 | |||
43 | return retval; | ||
44 | } | ||
45 | |||
46 | static inline unsigned long | ||
47 | __cmpxchg_u32(volatile int *m, unsigned long old, unsigned long new) | ||
48 | { | ||
49 | unsigned long retval; | ||
50 | unsigned long tmp; | ||
51 | |||
52 | __asm__ __volatile__ ( | ||
53 | "1: \n\t" | ||
54 | "movli.l @%1, %0 ! __cmpxchg_u32 \n\t" | ||
55 | "mov %0, %2 \n\t" | ||
56 | "cmp/eq %2, %4 \n\t" | ||
57 | "bf 2f \n\t" | ||
58 | "mov %5, %0 \n\t" | ||
59 | "2: \n\t" | ||
60 | "movco.l %0, @%1 \n\t" | ||
61 | "bf 1b \n\t" | ||
62 | "synco \n\t" | ||
63 | : "=&z" (tmp), "=r" (m), "=&r" (retval) | ||
64 | : "1" (m), "r" (old), "r" (new) | ||
65 | : "t", "memory" | ||
66 | ); | ||
67 | |||
68 | return retval; | ||
69 | } | ||
70 | |||
71 | #endif /* __ASM_SH_CMPXCHG_LLSC_H */ | ||
diff --git a/arch/sh/include/asm/elf.h b/arch/sh/include/asm/elf.h index ee02db110f0d..9eb9036a1bdc 100644 --- a/arch/sh/include/asm/elf.h +++ b/arch/sh/include/asm/elf.h | |||
@@ -108,6 +108,14 @@ typedef struct user_fpu_struct elf_fpregset_t; | |||
108 | #define elf_check_fdpic(x) ((x)->e_flags & EF_SH_FDPIC) | 108 | #define elf_check_fdpic(x) ((x)->e_flags & EF_SH_FDPIC) |
109 | #define elf_check_const_displacement(x) ((x)->e_flags & EF_SH_PIC) | 109 | #define elf_check_const_displacement(x) ((x)->e_flags & EF_SH_PIC) |
110 | 110 | ||
111 | #ifdef CONFIG_SUPERH32 | ||
112 | /* | ||
113 | * Enable dump using regset. | ||
114 | * This covers all of general/DSP/FPU regs. | ||
115 | */ | ||
116 | #define CORE_DUMP_USE_REGSET | ||
117 | #endif | ||
118 | |||
111 | #define USE_ELF_CORE_DUMP | 119 | #define USE_ELF_CORE_DUMP |
112 | #define ELF_FDPIC_CORE_EFLAGS EF_SH_FDPIC | 120 | #define ELF_FDPIC_CORE_EFLAGS EF_SH_FDPIC |
113 | #define ELF_EXEC_PAGESIZE PAGE_SIZE | 121 | #define ELF_EXEC_PAGESIZE PAGE_SIZE |
@@ -190,12 +198,6 @@ do { \ | |||
190 | #endif | 198 | #endif |
191 | 199 | ||
192 | #define SET_PERSONALITY(ex) set_personality(PER_LINUX_32BIT) | 200 | #define SET_PERSONALITY(ex) set_personality(PER_LINUX_32BIT) |
193 | struct task_struct; | ||
194 | extern int dump_task_regs (struct task_struct *, elf_gregset_t *); | ||
195 | extern int dump_task_fpu (struct task_struct *, elf_fpregset_t *); | ||
196 | |||
197 | #define ELF_CORE_COPY_TASK_REGS(tsk, elf_regs) dump_task_regs(tsk, elf_regs) | ||
198 | #define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) dump_task_fpu(tsk, elf_fpregs) | ||
199 | 201 | ||
200 | #ifdef CONFIG_VSYSCALL | 202 | #ifdef CONFIG_VSYSCALL |
201 | /* vDSO has arch_setup_additional_pages */ | 203 | /* vDSO has arch_setup_additional_pages */ |
diff --git a/arch/sh/include/asm/fpu.h b/arch/sh/include/asm/fpu.h index 91462fea1507..1d3aee04b5cc 100644 --- a/arch/sh/include/asm/fpu.h +++ b/arch/sh/include/asm/fpu.h | |||
@@ -30,8 +30,15 @@ static inline void save_fpu(struct task_struct *tsk, struct pt_regs *regs) | |||
30 | } | 30 | } |
31 | #endif | 31 | #endif |
32 | 32 | ||
33 | struct user_regset; | ||
34 | |||
33 | extern int do_fpu_inst(unsigned short, struct pt_regs *); | 35 | extern int do_fpu_inst(unsigned short, struct pt_regs *); |
34 | 36 | ||
37 | extern int fpregs_get(struct task_struct *target, | ||
38 | const struct user_regset *regset, | ||
39 | unsigned int pos, unsigned int count, | ||
40 | void *kbuf, void __user *ubuf); | ||
41 | |||
35 | static inline void unlazy_fpu(struct task_struct *tsk, struct pt_regs *regs) | 42 | static inline void unlazy_fpu(struct task_struct *tsk, struct pt_regs *regs) |
36 | { | 43 | { |
37 | preempt_disable(); | 44 | preempt_disable(); |
@@ -50,6 +57,18 @@ static inline void clear_fpu(struct task_struct *tsk, struct pt_regs *regs) | |||
50 | preempt_enable(); | 57 | preempt_enable(); |
51 | } | 58 | } |
52 | 59 | ||
60 | static inline int init_fpu(struct task_struct *tsk) | ||
61 | { | ||
62 | if (tsk_used_math(tsk)) { | ||
63 | if ((boot_cpu_data.flags & CPU_HAS_FPU) && tsk == current) | ||
64 | unlazy_fpu(tsk, task_pt_regs(tsk)); | ||
65 | return 0; | ||
66 | } | ||
67 | |||
68 | set_stopped_child_used_math(tsk); | ||
69 | return 0; | ||
70 | } | ||
71 | |||
53 | #endif /* __ASSEMBLY__ */ | 72 | #endif /* __ASSEMBLY__ */ |
54 | 73 | ||
55 | #endif /* __ASM_SH_FPU_H */ | 74 | #endif /* __ASM_SH_FPU_H */ |
diff --git a/arch/sh/include/asm/ftrace.h b/arch/sh/include/asm/ftrace.h new file mode 100644 index 000000000000..3aed362c9463 --- /dev/null +++ b/arch/sh/include/asm/ftrace.h | |||
@@ -0,0 +1,8 @@ | |||
1 | #ifndef __ASM_SH_FTRACE_H | ||
2 | #define __ASM_SH_FTRACE_H | ||
3 | |||
4 | #ifndef __ASSEMBLY__ | ||
5 | extern void mcount(void); | ||
6 | #endif | ||
7 | |||
8 | #endif /* __ASM_SH_FTRACE_H */ | ||
diff --git a/arch/sh/include/asm/gpio.h b/arch/sh/include/asm/gpio.h index cf32bd2df881..9650e7c9c39e 100644 --- a/arch/sh/include/asm/gpio.h +++ b/arch/sh/include/asm/gpio.h | |||
@@ -1,9 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-sh/gpio.h | 2 | * include/asm-sh/gpio.h |
3 | * | 3 | * |
4 | * Copyright (C) 2007 Markus Brunner, Mark Jonas | 4 | * Generic GPIO API and pinmux table support for SuperH. |
5 | * | 5 | * |
6 | * Addresses for the Pin Function Controller | 6 | * Copyright (c) 2008 Magnus Damm |
7 | * | 7 | * |
8 | * 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 |
9 | * 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 |
@@ -16,4 +16,92 @@ | |||
16 | #include <cpu/gpio.h> | 16 | #include <cpu/gpio.h> |
17 | #endif | 17 | #endif |
18 | 18 | ||
19 | typedef unsigned short pinmux_enum_t; | ||
20 | typedef unsigned char pinmux_flag_t; | ||
21 | |||
22 | #define PINMUX_TYPE_NONE 0 | ||
23 | #define PINMUX_TYPE_FUNCTION 1 | ||
24 | #define PINMUX_TYPE_GPIO 2 | ||
25 | #define PINMUX_TYPE_OUTPUT 3 | ||
26 | #define PINMUX_TYPE_INPUT 4 | ||
27 | #define PINMUX_TYPE_INPUT_PULLUP 5 | ||
28 | #define PINMUX_TYPE_INPUT_PULLDOWN 6 | ||
29 | |||
30 | #define PINMUX_FLAG_TYPE (0x7) | ||
31 | #define PINMUX_FLAG_WANT_PULLUP (1 << 3) | ||
32 | #define PINMUX_FLAG_WANT_PULLDOWN (1 << 4) | ||
33 | |||
34 | struct pinmux_gpio { | ||
35 | pinmux_enum_t enum_id; | ||
36 | pinmux_flag_t flags; | ||
37 | }; | ||
38 | |||
39 | #define PINMUX_GPIO(gpio, data_or_mark) [gpio] = { data_or_mark } | ||
40 | #define PINMUX_DATA(data_or_mark, ids...) data_or_mark, ids, 0 | ||
41 | |||
42 | struct pinmux_cfg_reg { | ||
43 | unsigned long reg, reg_width, field_width; | ||
44 | unsigned long *cnt; | ||
45 | pinmux_enum_t *enum_ids; | ||
46 | }; | ||
47 | |||
48 | #define PINMUX_CFG_REG(name, r, r_width, f_width) \ | ||
49 | .reg = r, .reg_width = r_width, .field_width = f_width, \ | ||
50 | .cnt = (unsigned long [r_width / f_width]) {}, \ | ||
51 | .enum_ids = (pinmux_enum_t [(r_width / f_width) * (1 << f_width)]) \ | ||
52 | |||
53 | struct pinmux_data_reg { | ||
54 | unsigned long reg, reg_width; | ||
55 | pinmux_enum_t *enum_ids; | ||
56 | }; | ||
57 | |||
58 | #define PINMUX_DATA_REG(name, r, r_width) \ | ||
59 | .reg = r, .reg_width = r_width, \ | ||
60 | .enum_ids = (pinmux_enum_t [r_width]) \ | ||
61 | |||
62 | struct pinmux_range { | ||
63 | pinmux_enum_t begin; | ||
64 | pinmux_enum_t end; | ||
65 | }; | ||
66 | |||
67 | struct pinmux_info { | ||
68 | char *name; | ||
69 | pinmux_enum_t reserved_id; | ||
70 | struct pinmux_range data; | ||
71 | struct pinmux_range input; | ||
72 | struct pinmux_range input_pd; | ||
73 | struct pinmux_range input_pu; | ||
74 | struct pinmux_range output; | ||
75 | struct pinmux_range mark; | ||
76 | struct pinmux_range function; | ||
77 | |||
78 | unsigned first_gpio, last_gpio; | ||
79 | |||
80 | struct pinmux_gpio *gpios; | ||
81 | struct pinmux_cfg_reg *cfg_regs; | ||
82 | struct pinmux_data_reg *data_regs; | ||
83 | |||
84 | pinmux_enum_t *gpio_data; | ||
85 | unsigned int gpio_data_size; | ||
86 | |||
87 | unsigned long *gpio_in_use; | ||
88 | }; | ||
89 | |||
90 | int register_pinmux(struct pinmux_info *pip); | ||
91 | |||
92 | int __gpio_request(unsigned gpio); | ||
93 | static inline int gpio_request(unsigned gpio, const char *label) | ||
94 | { | ||
95 | return __gpio_request(gpio); | ||
96 | } | ||
97 | void gpio_free(unsigned gpio); | ||
98 | int gpio_direction_input(unsigned gpio); | ||
99 | int gpio_direction_output(unsigned gpio, int value); | ||
100 | int gpio_get_value(unsigned gpio); | ||
101 | void gpio_set_value(unsigned gpio, int value); | ||
102 | static inline int gpio_export(unsigned gpio, bool direction_may_change) | ||
103 | { | ||
104 | return 0; | ||
105 | } | ||
106 | |||
19 | #endif /* __ASM_SH_GPIO_H */ | 107 | #endif /* __ASM_SH_GPIO_H */ |
diff --git a/arch/sh/include/asm/hw_irq.h b/arch/sh/include/asm/hw_irq.h index d557b00111bf..603cdde813d1 100644 --- a/arch/sh/include/asm/hw_irq.h +++ b/arch/sh/include/asm/hw_irq.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define __ASM_SH_HW_IRQ_H | 2 | #define __ASM_SH_HW_IRQ_H |
3 | 3 | ||
4 | #include <linux/init.h> | 4 | #include <linux/init.h> |
5 | #include <linux/sh_intc.h> | ||
5 | #include <asm/atomic.h> | 6 | #include <asm/atomic.h> |
6 | 7 | ||
7 | extern atomic_t irq_err_count; | 8 | extern atomic_t irq_err_count; |
@@ -23,101 +24,12 @@ struct ipr_desc { | |||
23 | 24 | ||
24 | void register_ipr_controller(struct ipr_desc *); | 25 | void register_ipr_controller(struct ipr_desc *); |
25 | 26 | ||
26 | typedef unsigned char intc_enum; | ||
27 | |||
28 | struct intc_vect { | ||
29 | intc_enum enum_id; | ||
30 | unsigned short vect; | ||
31 | }; | ||
32 | |||
33 | #define INTC_VECT(enum_id, vect) { enum_id, vect } | ||
34 | #define INTC_IRQ(enum_id, irq) INTC_VECT(enum_id, irq2evt(irq)) | ||
35 | |||
36 | struct intc_group { | ||
37 | intc_enum enum_id; | ||
38 | intc_enum enum_ids[32]; | ||
39 | }; | ||
40 | |||
41 | #define INTC_GROUP(enum_id, ids...) { enum_id, { ids } } | ||
42 | |||
43 | struct intc_mask_reg { | ||
44 | unsigned long set_reg, clr_reg, reg_width; | ||
45 | intc_enum enum_ids[32]; | ||
46 | #ifdef CONFIG_SMP | ||
47 | unsigned long smp; | ||
48 | #endif | ||
49 | }; | ||
50 | |||
51 | struct intc_prio_reg { | ||
52 | unsigned long set_reg, clr_reg, reg_width, field_width; | ||
53 | intc_enum enum_ids[16]; | ||
54 | #ifdef CONFIG_SMP | ||
55 | unsigned long smp; | ||
56 | #endif | ||
57 | }; | ||
58 | |||
59 | struct intc_sense_reg { | ||
60 | unsigned long reg, reg_width, field_width; | ||
61 | intc_enum enum_ids[16]; | ||
62 | }; | ||
63 | |||
64 | #ifdef CONFIG_SMP | ||
65 | #define INTC_SMP(stride, nr) .smp = (stride) | ((nr) << 8) | ||
66 | #else | ||
67 | #define INTC_SMP(stride, nr) | ||
68 | #endif | ||
69 | |||
70 | struct intc_desc { | ||
71 | struct intc_vect *vectors; | ||
72 | unsigned int nr_vectors; | ||
73 | struct intc_group *groups; | ||
74 | unsigned int nr_groups; | ||
75 | struct intc_mask_reg *mask_regs; | ||
76 | unsigned int nr_mask_regs; | ||
77 | struct intc_prio_reg *prio_regs; | ||
78 | unsigned int nr_prio_regs; | ||
79 | struct intc_sense_reg *sense_regs; | ||
80 | unsigned int nr_sense_regs; | ||
81 | char *name; | ||
82 | #if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4A) | ||
83 | struct intc_mask_reg *ack_regs; | ||
84 | unsigned int nr_ack_regs; | ||
85 | #endif | ||
86 | }; | ||
87 | |||
88 | #define _INTC_ARRAY(a) a, sizeof(a)/sizeof(*a) | ||
89 | #define DECLARE_INTC_DESC(symbol, chipname, vectors, groups, \ | ||
90 | mask_regs, prio_regs, sense_regs) \ | ||
91 | struct intc_desc symbol __initdata = { \ | ||
92 | _INTC_ARRAY(vectors), _INTC_ARRAY(groups), \ | ||
93 | _INTC_ARRAY(mask_regs), _INTC_ARRAY(prio_regs), \ | ||
94 | _INTC_ARRAY(sense_regs), \ | ||
95 | chipname, \ | ||
96 | } | ||
97 | |||
98 | #if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4A) | ||
99 | #define DECLARE_INTC_DESC_ACK(symbol, chipname, vectors, groups, \ | ||
100 | mask_regs, prio_regs, sense_regs, ack_regs) \ | ||
101 | struct intc_desc symbol __initdata = { \ | ||
102 | _INTC_ARRAY(vectors), _INTC_ARRAY(groups), \ | ||
103 | _INTC_ARRAY(mask_regs), _INTC_ARRAY(prio_regs), \ | ||
104 | _INTC_ARRAY(sense_regs), \ | ||
105 | chipname, \ | ||
106 | _INTC_ARRAY(ack_regs), \ | ||
107 | } | ||
108 | #endif | ||
109 | |||
110 | void __init register_intc_controller(struct intc_desc *desc); | ||
111 | int intc_set_priority(unsigned int irq, unsigned int prio); | ||
112 | |||
113 | void __init plat_irq_setup(void); | 27 | void __init plat_irq_setup(void); |
114 | #ifdef CONFIG_CPU_SH3 | ||
115 | void __init plat_irq_setup_sh3(void); | 28 | void __init plat_irq_setup_sh3(void); |
116 | #endif | 29 | void __init plat_irq_setup_pins(int mode); |
117 | 30 | ||
118 | enum { IRQ_MODE_IRQ, IRQ_MODE_IRQ7654, IRQ_MODE_IRQ3210, | 31 | enum { IRQ_MODE_IRQ, IRQ_MODE_IRQ7654, IRQ_MODE_IRQ3210, |
119 | IRQ_MODE_IRL7654_MASK, IRQ_MODE_IRL3210_MASK, | 32 | IRQ_MODE_IRL7654_MASK, IRQ_MODE_IRL3210_MASK, |
120 | IRQ_MODE_IRL7654, IRQ_MODE_IRL3210 }; | 33 | IRQ_MODE_IRL7654, IRQ_MODE_IRL3210 }; |
121 | void __init plat_irq_setup_pins(int mode); | ||
122 | 34 | ||
123 | #endif /* __ASM_SH_HW_IRQ_H */ | 35 | #endif /* __ASM_SH_HW_IRQ_H */ |
diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h index a4fbf0c84fb1..436c28539577 100644 --- a/arch/sh/include/asm/io.h +++ b/arch/sh/include/asm/io.h | |||
@@ -1,27 +1,26 @@ | |||
1 | #ifndef __ASM_SH_IO_H | 1 | #ifndef __ASM_SH_IO_H |
2 | #define __ASM_SH_IO_H | 2 | #define __ASM_SH_IO_H |
3 | |||
4 | /* | 3 | /* |
5 | * Convention: | 4 | * Convention: |
6 | * read{b,w,l}/write{b,w,l} are for PCI, | 5 | * read{b,w,l,q}/write{b,w,l,q} are for PCI, |
7 | * while in{b,w,l}/out{b,w,l} are for ISA | 6 | * while in{b,w,l}/out{b,w,l} are for ISA |
8 | * These may (will) be platform specific function. | 7 | * |
9 | * In addition we have 'pausing' versions: in{b,w,l}_p/out{b,w,l}_p | 8 | * In addition we have 'pausing' versions: in{b,w,l}_p/out{b,w,l}_p |
10 | * and 'string' versions: ins{b,w,l}/outs{b,w,l} | 9 | * and 'string' versions: ins{b,w,l}/outs{b,w,l} |
11 | * For read{b,w,l} and write{b,w,l} there are also __raw versions, which | ||
12 | * do not have a memory barrier after them. | ||
13 | * | 10 | * |
14 | * In addition, we have | 11 | * While read{b,w,l,q} and write{b,w,l,q} contain memory barriers |
15 | * ctrl_in{b,w,l}/ctrl_out{b,w,l} for SuperH specific I/O. | 12 | * automatically, there are also __raw versions, which do not. |
16 | * which are processor specific. | 13 | * |
17 | */ | 14 | * Historically, we have also had ctrl_in{b,w,l,q}/ctrl_out{b,w,l,q} for |
18 | 15 | * SuperH specific I/O (raw I/O to on-chip CPU peripherals). In practice | |
19 | /* | 16 | * these have the same semantics as the __raw variants, and as such, all |
20 | * We follow the Alpha convention here: | 17 | * new code should be using the __raw versions. |
21 | * __inb expands to an inline function call (which calls via the mv) | 18 | * |
22 | * _inb is a real function call (note ___raw fns are _ version of __raw) | 19 | * All ISA I/O routines are wrapped through the machine vector. If a |
23 | * inb by default expands to _inb, but the machine specific code may | 20 | * board does not provide overrides, a generic set that are copied in |
24 | * define it to __inb if it chooses. | 21 | * from the default machine vector are used instead. These are largely |
22 | * for old compat code for I/O offseting to SuperIOs, all of which are | ||
23 | * better handled through the machvec ioport mapping routines these days. | ||
25 | */ | 24 | */ |
26 | #include <asm/cache.h> | 25 | #include <asm/cache.h> |
27 | #include <asm/system.h> | 26 | #include <asm/system.h> |
@@ -31,7 +30,6 @@ | |||
31 | #include <asm-generic/iomap.h> | 30 | #include <asm-generic/iomap.h> |
32 | 31 | ||
33 | #ifdef __KERNEL__ | 32 | #ifdef __KERNEL__ |
34 | |||
35 | /* | 33 | /* |
36 | * Depending on which platform we are running on, we need different | 34 | * Depending on which platform we are running on, we need different |
37 | * I/O functions. | 35 | * I/O functions. |
@@ -40,105 +38,68 @@ | |||
40 | #include <asm/io_generic.h> | 38 | #include <asm/io_generic.h> |
41 | #include <asm/io_trapped.h> | 39 | #include <asm/io_trapped.h> |
42 | 40 | ||
43 | #define maybebadio(port) \ | 41 | #define inb(p) sh_mv.mv_inb((p)) |
44 | printk(KERN_ERR "bad PC-like io %s:%u for port 0x%lx at 0x%08x\n", \ | 42 | #define inw(p) sh_mv.mv_inw((p)) |
45 | __FUNCTION__, __LINE__, (port), (u32)__builtin_return_address(0)) | 43 | #define inl(p) sh_mv.mv_inl((p)) |
46 | 44 | #define outb(x,p) sh_mv.mv_outb((x),(p)) | |
47 | /* | 45 | #define outw(x,p) sh_mv.mv_outw((x),(p)) |
48 | * Since boards are able to define their own set of I/O routines through | 46 | #define outl(x,p) sh_mv.mv_outl((x),(p)) |
49 | * their respective machine vector, we always wrap through the mv. | 47 | |
50 | * | 48 | #define inb_p(p) sh_mv.mv_inb_p((p)) |
51 | * Also, in the event that a board hasn't provided its own definition for | 49 | #define inw_p(p) sh_mv.mv_inw_p((p)) |
52 | * a given routine, it will be wrapped to generic code at run-time. | 50 | #define inl_p(p) sh_mv.mv_inl_p((p)) |
53 | */ | 51 | #define outb_p(x,p) sh_mv.mv_outb_p((x),(p)) |
52 | #define outw_p(x,p) sh_mv.mv_outw_p((x),(p)) | ||
53 | #define outl_p(x,p) sh_mv.mv_outl_p((x),(p)) | ||
54 | |||
55 | #define insb(p,b,c) sh_mv.mv_insb((p), (b), (c)) | ||
56 | #define insw(p,b,c) sh_mv.mv_insw((p), (b), (c)) | ||
57 | #define insl(p,b,c) sh_mv.mv_insl((p), (b), (c)) | ||
58 | #define outsb(p,b,c) sh_mv.mv_outsb((p), (b), (c)) | ||
59 | #define outsw(p,b,c) sh_mv.mv_outsw((p), (b), (c)) | ||
60 | #define outsl(p,b,c) sh_mv.mv_outsl((p), (b), (c)) | ||
61 | |||
62 | #define __raw_writeb(v,a) (__chk_io_ptr(a), *(volatile u8 __force *)(a) = (v)) | ||
63 | #define __raw_writew(v,a) (__chk_io_ptr(a), *(volatile u16 __force *)(a) = (v)) | ||
64 | #define __raw_writel(v,a) (__chk_io_ptr(a), *(volatile u32 __force *)(a) = (v)) | ||
65 | #define __raw_writeq(v,a) (__chk_io_ptr(a), *(volatile u64 __force *)(a) = (v)) | ||
66 | |||
67 | #define __raw_readb(a) (__chk_io_ptr(a), *(volatile u8 __force *)(a)) | ||
68 | #define __raw_readw(a) (__chk_io_ptr(a), *(volatile u16 __force *)(a)) | ||
69 | #define __raw_readl(a) (__chk_io_ptr(a), *(volatile u32 __force *)(a)) | ||
70 | #define __raw_readq(a) (__chk_io_ptr(a), *(volatile u64 __force *)(a)) | ||
71 | |||
72 | #define readb(a) ({ u8 r_ = __raw_readb(a); mb(); r_; }) | ||
73 | #define readw(a) ({ u16 r_ = __raw_readw(a); mb(); r_; }) | ||
74 | #define readl(a) ({ u32 r_ = __raw_readl(a); mb(); r_; }) | ||
75 | #define readq(a) ({ u64 r_ = __raw_readq(a); mb(); r_; }) | ||
76 | |||
77 | #define writeb(v,a) ({ __raw_writeb((v),(a)); mb(); }) | ||
78 | #define writew(v,a) ({ __raw_writew((v),(a)); mb(); }) | ||
79 | #define writel(v,a) ({ __raw_writel((v),(a)); mb(); }) | ||
80 | #define writeq(v,a) ({ __raw_writeq((v),(a)); mb(); }) | ||
54 | 81 | ||
55 | #define __inb(p) sh_mv.mv_inb((p)) | 82 | /* SuperH on-chip I/O functions */ |
56 | #define __inw(p) sh_mv.mv_inw((p)) | 83 | #define ctrl_inb __raw_readb |
57 | #define __inl(p) sh_mv.mv_inl((p)) | 84 | #define ctrl_inw __raw_readw |
58 | #define __outb(x,p) sh_mv.mv_outb((x),(p)) | 85 | #define ctrl_inl __raw_readl |
59 | #define __outw(x,p) sh_mv.mv_outw((x),(p)) | 86 | #define ctrl_inq __raw_readq |
60 | #define __outl(x,p) sh_mv.mv_outl((x),(p)) | ||
61 | |||
62 | #define __inb_p(p) sh_mv.mv_inb_p((p)) | ||
63 | #define __inw_p(p) sh_mv.mv_inw_p((p)) | ||
64 | #define __inl_p(p) sh_mv.mv_inl_p((p)) | ||
65 | #define __outb_p(x,p) sh_mv.mv_outb_p((x),(p)) | ||
66 | #define __outw_p(x,p) sh_mv.mv_outw_p((x),(p)) | ||
67 | #define __outl_p(x,p) sh_mv.mv_outl_p((x),(p)) | ||
68 | |||
69 | #define __insb(p,b,c) sh_mv.mv_insb((p), (b), (c)) | ||
70 | #define __insw(p,b,c) sh_mv.mv_insw((p), (b), (c)) | ||
71 | #define __insl(p,b,c) sh_mv.mv_insl((p), (b), (c)) | ||
72 | #define __outsb(p,b,c) sh_mv.mv_outsb((p), (b), (c)) | ||
73 | #define __outsw(p,b,c) sh_mv.mv_outsw((p), (b), (c)) | ||
74 | #define __outsl(p,b,c) sh_mv.mv_outsl((p), (b), (c)) | ||
75 | |||
76 | #define __readb(a) sh_mv.mv_readb((a)) | ||
77 | #define __readw(a) sh_mv.mv_readw((a)) | ||
78 | #define __readl(a) sh_mv.mv_readl((a)) | ||
79 | #define __writeb(v,a) sh_mv.mv_writeb((v),(a)) | ||
80 | #define __writew(v,a) sh_mv.mv_writew((v),(a)) | ||
81 | #define __writel(v,a) sh_mv.mv_writel((v),(a)) | ||
82 | |||
83 | #define inb __inb | ||
84 | #define inw __inw | ||
85 | #define inl __inl | ||
86 | #define outb __outb | ||
87 | #define outw __outw | ||
88 | #define outl __outl | ||
89 | |||
90 | #define inb_p __inb_p | ||
91 | #define inw_p __inw_p | ||
92 | #define inl_p __inl_p | ||
93 | #define outb_p __outb_p | ||
94 | #define outw_p __outw_p | ||
95 | #define outl_p __outl_p | ||
96 | |||
97 | #define insb __insb | ||
98 | #define insw __insw | ||
99 | #define insl __insl | ||
100 | #define outsb __outsb | ||
101 | #define outsw __outsw | ||
102 | #define outsl __outsl | ||
103 | |||
104 | #define __raw_readb(a) __readb((void __iomem *)(a)) | ||
105 | #define __raw_readw(a) __readw((void __iomem *)(a)) | ||
106 | #define __raw_readl(a) __readl((void __iomem *)(a)) | ||
107 | #define __raw_writeb(v, a) __writeb(v, (void __iomem *)(a)) | ||
108 | #define __raw_writew(v, a) __writew(v, (void __iomem *)(a)) | ||
109 | #define __raw_writel(v, a) __writel(v, (void __iomem *)(a)) | ||
110 | |||
111 | void __raw_writesl(unsigned long addr, const void *data, int longlen); | ||
112 | void __raw_readsl(unsigned long addr, void *data, int longlen); | ||
113 | 87 | ||
114 | /* | 88 | #define ctrl_outb __raw_writeb |
115 | * The platform header files may define some of these macros to use | 89 | #define ctrl_outw __raw_writew |
116 | * the inlined versions where appropriate. These macros may also be | 90 | #define ctrl_outl __raw_writel |
117 | * redefined by userlevel programs. | 91 | #define ctrl_outq __raw_writeq |
118 | */ | ||
119 | #ifdef __readb | ||
120 | # define readb(a) ({ unsigned int r_ = __raw_readb(a); mb(); r_; }) | ||
121 | #endif | ||
122 | #ifdef __raw_readw | ||
123 | # define readw(a) ({ unsigned int r_ = __raw_readw(a); mb(); r_; }) | ||
124 | #endif | ||
125 | #ifdef __raw_readl | ||
126 | # define readl(a) ({ unsigned int r_ = __raw_readl(a); mb(); r_; }) | ||
127 | #endif | ||
128 | 92 | ||
129 | #ifdef __raw_writeb | 93 | static inline void ctrl_delay(void) |
130 | # define writeb(v,a) ({ __raw_writeb((v),(a)); mb(); }) | 94 | { |
131 | #endif | 95 | #ifdef P2SEG |
132 | #ifdef __raw_writew | 96 | __raw_readw(P2SEG); |
133 | # define writew(v,a) ({ __raw_writew((v),(a)); mb(); }) | ||
134 | #endif | ||
135 | #ifdef __raw_writel | ||
136 | # define writel(v,a) ({ __raw_writel((v),(a)); mb(); }) | ||
137 | #endif | 97 | #endif |
98 | } | ||
138 | 99 | ||
139 | #define __BUILD_MEMORY_STRING(bwlq, type) \ | 100 | #define __BUILD_MEMORY_STRING(bwlq, type) \ |
140 | \ | 101 | \ |
141 | static inline void writes##bwlq(volatile void __iomem *mem, \ | 102 | static inline void __raw_writes##bwlq(volatile void __iomem *mem, \ |
142 | const void *addr, unsigned int count) \ | 103 | const void *addr, unsigned int count) \ |
143 | { \ | 104 | { \ |
144 | const volatile type *__addr = addr; \ | 105 | const volatile type *__addr = addr; \ |
@@ -149,8 +110,8 @@ static inline void writes##bwlq(volatile void __iomem *mem, \ | |||
149 | } \ | 110 | } \ |
150 | } \ | 111 | } \ |
151 | \ | 112 | \ |
152 | static inline void reads##bwlq(volatile void __iomem *mem, void *addr, \ | 113 | static inline void __raw_reads##bwlq(volatile void __iomem *mem, \ |
153 | unsigned int count) \ | 114 | void *addr, unsigned int count) \ |
154 | { \ | 115 | { \ |
155 | volatile type *__addr = addr; \ | 116 | volatile type *__addr = addr; \ |
156 | \ | 117 | \ |
@@ -162,106 +123,71 @@ static inline void reads##bwlq(volatile void __iomem *mem, void *addr, \ | |||
162 | 123 | ||
163 | __BUILD_MEMORY_STRING(b, u8) | 124 | __BUILD_MEMORY_STRING(b, u8) |
164 | __BUILD_MEMORY_STRING(w, u16) | 125 | __BUILD_MEMORY_STRING(w, u16) |
165 | #define writesl __raw_writesl | 126 | __BUILD_MEMORY_STRING(q, u64) |
166 | #define readsl __raw_readsl | 127 | |
128 | void __raw_writesl(void __iomem *addr, const void *data, int longlen); | ||
129 | void __raw_readsl(const void __iomem *addr, void *data, int longlen); | ||
130 | |||
131 | #define writesb __raw_writesb | ||
132 | #define writesw __raw_writesw | ||
133 | #define writesl __raw_writesl | ||
134 | |||
135 | #define readsb __raw_readsb | ||
136 | #define readsw __raw_readsw | ||
137 | #define readsl __raw_readsl | ||
167 | 138 | ||
168 | #define readb_relaxed(a) readb(a) | 139 | #define readb_relaxed(a) readb(a) |
169 | #define readw_relaxed(a) readw(a) | 140 | #define readw_relaxed(a) readw(a) |
170 | #define readl_relaxed(a) readl(a) | 141 | #define readl_relaxed(a) readl(a) |
142 | #define readq_relaxed(a) readq(a) | ||
171 | 143 | ||
172 | /* Simple MMIO */ | 144 | /* Simple MMIO */ |
173 | #define ioread8(a) readb(a) | 145 | #define ioread8(a) __raw_readb(a) |
174 | #define ioread16(a) readw(a) | 146 | #define ioread16(a) __raw_readw(a) |
175 | #define ioread16be(a) be16_to_cpu(__raw_readw((a))) | 147 | #define ioread16be(a) be16_to_cpu(__raw_readw((a))) |
176 | #define ioread32(a) readl(a) | 148 | #define ioread32(a) __raw_readl(a) |
177 | #define ioread32be(a) be32_to_cpu(__raw_readl((a))) | 149 | #define ioread32be(a) be32_to_cpu(__raw_readl((a))) |
178 | 150 | ||
179 | #define iowrite8(v,a) writeb((v),(a)) | 151 | #define iowrite8(v,a) __raw_writeb((v),(a)) |
180 | #define iowrite16(v,a) writew((v),(a)) | 152 | #define iowrite16(v,a) __raw_writew((v),(a)) |
181 | #define iowrite16be(v,a) __raw_writew(cpu_to_be16((v)),(a)) | 153 | #define iowrite16be(v,a) __raw_writew(cpu_to_be16((v)),(a)) |
182 | #define iowrite32(v,a) writel((v),(a)) | 154 | #define iowrite32(v,a) __raw_writel((v),(a)) |
183 | #define iowrite32be(v,a) __raw_writel(cpu_to_be32((v)),(a)) | 155 | #define iowrite32be(v,a) __raw_writel(cpu_to_be32((v)),(a)) |
184 | 156 | ||
185 | #define ioread8_rep(a, d, c) readsb((a), (d), (c)) | 157 | #define ioread8_rep(a, d, c) __raw_readsb((a), (d), (c)) |
186 | #define ioread16_rep(a, d, c) readsw((a), (d), (c)) | 158 | #define ioread16_rep(a, d, c) __raw_readsw((a), (d), (c)) |
187 | #define ioread32_rep(a, d, c) readsl((a), (d), (c)) | 159 | #define ioread32_rep(a, d, c) __raw_readsl((a), (d), (c)) |
188 | 160 | ||
189 | #define iowrite8_rep(a, s, c) writesb((a), (s), (c)) | 161 | #define iowrite8_rep(a, s, c) __raw_writesb((a), (s), (c)) |
190 | #define iowrite16_rep(a, s, c) writesw((a), (s), (c)) | 162 | #define iowrite16_rep(a, s, c) __raw_writesw((a), (s), (c)) |
191 | #define iowrite32_rep(a, s, c) writesl((a), (s), (c)) | 163 | #define iowrite32_rep(a, s, c) __raw_writesl((a), (s), (c)) |
192 | 164 | ||
193 | #define mmiowb() wmb() /* synco on SH-4A, otherwise a nop */ | 165 | /* synco on SH-4A, otherwise a nop */ |
166 | #define mmiowb() wmb() | ||
194 | 167 | ||
195 | #define IO_SPACE_LIMIT 0xffffffff | 168 | #define IO_SPACE_LIMIT 0xffffffff |
196 | 169 | ||
170 | extern unsigned long generic_io_base; | ||
171 | |||
197 | /* | 172 | /* |
198 | * This function provides a method for the generic case where a board-specific | 173 | * This function provides a method for the generic case where a |
199 | * ioport_map simply needs to return the port + some arbitrary port base. | 174 | * board-specific ioport_map simply needs to return the port + some |
175 | * arbitrary port base. | ||
200 | * | 176 | * |
201 | * We use this at board setup time to implicitly set the port base, and | 177 | * We use this at board setup time to implicitly set the port base, and |
202 | * as a result, we can use the generic ioport_map. | 178 | * as a result, we can use the generic ioport_map. |
203 | */ | 179 | */ |
204 | static inline void __set_io_port_base(unsigned long pbase) | 180 | static inline void __set_io_port_base(unsigned long pbase) |
205 | { | 181 | { |
206 | extern unsigned long generic_io_base; | ||
207 | |||
208 | generic_io_base = pbase; | 182 | generic_io_base = pbase; |
209 | } | 183 | } |
210 | 184 | ||
211 | #define __ioport_map(p, n) sh_mv.mv_ioport_map((p), (n)) | 185 | #define __ioport_map(p, n) sh_mv.mv_ioport_map((p), (n)) |
212 | 186 | ||
213 | /* We really want to try and get these to memcpy etc */ | 187 | /* We really want to try and get these to memcpy etc */ |
214 | extern void memcpy_fromio(void *, volatile void __iomem *, unsigned long); | 188 | void memcpy_fromio(void *, const volatile void __iomem *, unsigned long); |
215 | extern void memcpy_toio(volatile void __iomem *, const void *, unsigned long); | 189 | void memcpy_toio(volatile void __iomem *, const void *, unsigned long); |
216 | extern void memset_io(volatile void __iomem *, int, unsigned long); | 190 | void memset_io(volatile void __iomem *, int, unsigned long); |
217 | |||
218 | /* SuperH on-chip I/O functions */ | ||
219 | static inline unsigned char ctrl_inb(unsigned long addr) | ||
220 | { | ||
221 | return *(volatile unsigned char*)addr; | ||
222 | } | ||
223 | |||
224 | static inline unsigned short ctrl_inw(unsigned long addr) | ||
225 | { | ||
226 | return *(volatile unsigned short*)addr; | ||
227 | } | ||
228 | |||
229 | static inline unsigned int ctrl_inl(unsigned long addr) | ||
230 | { | ||
231 | return *(volatile unsigned long*)addr; | ||
232 | } | ||
233 | |||
234 | static inline unsigned long long ctrl_inq(unsigned long addr) | ||
235 | { | ||
236 | return *(volatile unsigned long long*)addr; | ||
237 | } | ||
238 | |||
239 | static inline void ctrl_outb(unsigned char b, unsigned long addr) | ||
240 | { | ||
241 | *(volatile unsigned char*)addr = b; | ||
242 | } | ||
243 | |||
244 | static inline void ctrl_outw(unsigned short b, unsigned long addr) | ||
245 | { | ||
246 | *(volatile unsigned short*)addr = b; | ||
247 | } | ||
248 | |||
249 | static inline void ctrl_outl(unsigned int b, unsigned long addr) | ||
250 | { | ||
251 | *(volatile unsigned long*)addr = b; | ||
252 | } | ||
253 | |||
254 | static inline void ctrl_outq(unsigned long long b, unsigned long addr) | ||
255 | { | ||
256 | *(volatile unsigned long long*)addr = b; | ||
257 | } | ||
258 | |||
259 | static inline void ctrl_delay(void) | ||
260 | { | ||
261 | #ifdef P2SEG | ||
262 | ctrl_inw(P2SEG); | ||
263 | #endif | ||
264 | } | ||
265 | 191 | ||
266 | /* Quad-word real-mode I/O, don't ask.. */ | 192 | /* Quad-word real-mode I/O, don't ask.. */ |
267 | unsigned long long peek_real_address_q(unsigned long long addr); | 193 | unsigned long long peek_real_address_q(unsigned long long addr); |
@@ -347,9 +273,15 @@ __ioremap_mode(unsigned long offset, unsigned long size, unsigned long flags) | |||
347 | __ioremap_mode((offset), (size), _PAGE_CACHABLE) | 273 | __ioremap_mode((offset), (size), _PAGE_CACHABLE) |
348 | #define p3_ioremap(offset, size, flags) \ | 274 | #define p3_ioremap(offset, size, flags) \ |
349 | __ioremap((offset), (size), (flags)) | 275 | __ioremap((offset), (size), (flags)) |
276 | #define ioremap_prot(offset, size, flags) \ | ||
277 | __ioremap_mode((offset), (size), (flags)) | ||
350 | #define iounmap(addr) \ | 278 | #define iounmap(addr) \ |
351 | __iounmap((addr)) | 279 | __iounmap((addr)) |
352 | 280 | ||
281 | #define maybebadio(port) \ | ||
282 | printk(KERN_ERR "bad PC-like io %s:%u for port 0x%lx at 0x%08x\n", \ | ||
283 | __func__, __LINE__, (port), (u32)__builtin_return_address(0)) | ||
284 | |||
353 | /* | 285 | /* |
354 | * Convert a physical pointer to a virtual kernel pointer for /dev/mem | 286 | * Convert a physical pointer to a virtual kernel pointer for /dev/mem |
355 | * access | 287 | * access |
diff --git a/arch/sh/include/asm/io_generic.h b/arch/sh/include/asm/io_generic.h index 92fc6070d7b3..1e5d375f55dc 100644 --- a/arch/sh/include/asm/io_generic.h +++ b/arch/sh/include/asm/io_generic.h | |||
@@ -33,13 +33,6 @@ void IO_CONCAT(__IO_PREFIX,outsb)(unsigned long, const void *src, unsigned long | |||
33 | void IO_CONCAT(__IO_PREFIX,outsw)(unsigned long, const void *src, unsigned long count); | 33 | void IO_CONCAT(__IO_PREFIX,outsw)(unsigned long, const void *src, unsigned long count); |
34 | void IO_CONCAT(__IO_PREFIX,outsl)(unsigned long, const void *src, unsigned long count); | 34 | void IO_CONCAT(__IO_PREFIX,outsl)(unsigned long, const void *src, unsigned long count); |
35 | 35 | ||
36 | u8 IO_CONCAT(__IO_PREFIX,readb)(void __iomem *); | ||
37 | u16 IO_CONCAT(__IO_PREFIX,readw)(void __iomem *); | ||
38 | u32 IO_CONCAT(__IO_PREFIX,readl)(void __iomem *); | ||
39 | void IO_CONCAT(__IO_PREFIX,writeb)(u8, void __iomem *); | ||
40 | void IO_CONCAT(__IO_PREFIX,writew)(u16, void __iomem *); | ||
41 | void IO_CONCAT(__IO_PREFIX,writel)(u32, void __iomem *); | ||
42 | |||
43 | void *IO_CONCAT(__IO_PREFIX,ioremap)(unsigned long offset, unsigned long size); | 36 | void *IO_CONCAT(__IO_PREFIX,ioremap)(unsigned long offset, unsigned long size); |
44 | void IO_CONCAT(__IO_PREFIX,iounmap)(void *addr); | 37 | void IO_CONCAT(__IO_PREFIX,iounmap)(void *addr); |
45 | 38 | ||
diff --git a/arch/sh/include/asm/irq.h b/arch/sh/include/asm/irq.h index 6195a531c1b0..d319baaf4fbd 100644 --- a/arch/sh/include/asm/irq.h +++ b/arch/sh/include/asm/irq.h | |||
@@ -41,6 +41,9 @@ static inline int generic_irq_demux(int irq) | |||
41 | #define irq_canonicalize(irq) (irq) | 41 | #define irq_canonicalize(irq) (irq) |
42 | #define irq_demux(irq) sh_mv.mv_irq_demux(irq) | 42 | #define irq_demux(irq) sh_mv.mv_irq_demux(irq) |
43 | 43 | ||
44 | void init_IRQ(void); | ||
45 | asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs); | ||
46 | |||
44 | #ifdef CONFIG_IRQSTACKS | 47 | #ifdef CONFIG_IRQSTACKS |
45 | extern void irq_ctx_init(int cpu); | 48 | extern void irq_ctx_init(int cpu); |
46 | extern void irq_ctx_exit(int cpu); | 49 | extern void irq_ctx_exit(int cpu); |
diff --git a/arch/sh/include/asm/kprobes.h b/arch/sh/include/asm/kprobes.h new file mode 100644 index 000000000000..6078d8e551d4 --- /dev/null +++ b/arch/sh/include/asm/kprobes.h | |||
@@ -0,0 +1,58 @@ | |||
1 | #ifndef __ASM_SH_KPROBES_H | ||
2 | #define __ASM_SH_KPROBES_H | ||
3 | |||
4 | #ifdef CONFIG_KPROBES | ||
5 | |||
6 | #include <linux/types.h> | ||
7 | #include <linux/ptrace.h> | ||
8 | |||
9 | typedef u16 kprobe_opcode_t; | ||
10 | #define BREAKPOINT_INSTRUCTION 0xc33a | ||
11 | |||
12 | #define MAX_INSN_SIZE 16 | ||
13 | #define MAX_STACK_SIZE 64 | ||
14 | #define MIN_STACK_SIZE(ADDR) (((MAX_STACK_SIZE) < \ | ||
15 | (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR))) \ | ||
16 | ? (MAX_STACK_SIZE) \ | ||
17 | : (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR))) | ||
18 | |||
19 | #define regs_return_value(regs) ((regs)->regs[0]) | ||
20 | #define flush_insn_slot(p) do { } while (0) | ||
21 | #define kretprobe_blacklist_size 0 | ||
22 | |||
23 | struct kprobe; | ||
24 | |||
25 | void arch_remove_kprobe(struct kprobe *); | ||
26 | void kretprobe_trampoline(void); | ||
27 | void jprobe_return_end(void); | ||
28 | |||
29 | /* Architecture specific copy of original instruction*/ | ||
30 | struct arch_specific_insn { | ||
31 | /* copy of the original instruction */ | ||
32 | kprobe_opcode_t insn[MAX_INSN_SIZE]; | ||
33 | }; | ||
34 | |||
35 | struct prev_kprobe { | ||
36 | struct kprobe *kp; | ||
37 | unsigned long status; | ||
38 | }; | ||
39 | |||
40 | /* per-cpu kprobe control block */ | ||
41 | struct kprobe_ctlblk { | ||
42 | unsigned long kprobe_status; | ||
43 | unsigned long jprobe_saved_r15; | ||
44 | struct pt_regs jprobe_saved_regs; | ||
45 | kprobe_opcode_t jprobes_stack[MAX_STACK_SIZE]; | ||
46 | struct prev_kprobe prev_kprobe; | ||
47 | }; | ||
48 | |||
49 | extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr); | ||
50 | extern int kprobe_exceptions_notify(struct notifier_block *self, | ||
51 | unsigned long val, void *data); | ||
52 | extern int kprobe_handle_illslot(unsigned long pc); | ||
53 | #else | ||
54 | |||
55 | #define kprobe_handle_illslot(pc) (-1) | ||
56 | |||
57 | #endif /* CONFIG_KPROBES */ | ||
58 | #endif /* __ASM_SH_KPROBES_H */ | ||
diff --git a/arch/sh/include/asm/machvec.h b/arch/sh/include/asm/machvec.h index b2e4124070ae..f1bae02ef7b6 100644 --- a/arch/sh/include/asm/machvec.h +++ b/arch/sh/include/asm/machvec.h | |||
@@ -42,13 +42,6 @@ struct sh_machine_vector { | |||
42 | void (*mv_outsw)(unsigned long, const void *src, unsigned long count); | 42 | void (*mv_outsw)(unsigned long, const void *src, unsigned long count); |
43 | void (*mv_outsl)(unsigned long, const void *src, unsigned long count); | 43 | void (*mv_outsl)(unsigned long, const void *src, unsigned long count); |
44 | 44 | ||
45 | u8 (*mv_readb)(void __iomem *); | ||
46 | u16 (*mv_readw)(void __iomem *); | ||
47 | u32 (*mv_readl)(void __iomem *); | ||
48 | void (*mv_writeb)(u8, void __iomem *); | ||
49 | void (*mv_writew)(u16, void __iomem *); | ||
50 | void (*mv_writel)(u32, void __iomem *); | ||
51 | |||
52 | int (*mv_irq_demux)(int irq); | 45 | int (*mv_irq_demux)(int irq); |
53 | 46 | ||
54 | void (*mv_init_irq)(void); | 47 | void (*mv_init_irq)(void); |
diff --git a/arch/sh/include/asm/mmzone.h b/arch/sh/include/asm/mmzone.h index 2969253c4042..7f5363b29ba0 100644 --- a/arch/sh/include/asm/mmzone.h +++ b/arch/sh/include/asm/mmzone.h | |||
@@ -4,6 +4,8 @@ | |||
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | 5 | ||
6 | #ifdef CONFIG_NEED_MULTIPLE_NODES | 6 | #ifdef CONFIG_NEED_MULTIPLE_NODES |
7 | #include <linux/numa.h> | ||
8 | |||
7 | extern struct pglist_data *node_data[]; | 9 | extern struct pglist_data *node_data[]; |
8 | #define NODE_DATA(nid) (node_data[nid]) | 10 | #define NODE_DATA(nid) (node_data[nid]) |
9 | 11 | ||
diff --git a/arch/sh/include/asm/page.h b/arch/sh/include/asm/page.h index 77fb8bf02e4e..5871d78e47e5 100644 --- a/arch/sh/include/asm/page.h +++ b/arch/sh/include/asm/page.h | |||
@@ -104,6 +104,8 @@ typedef struct { unsigned long pgd; } pgd_t; | |||
104 | 104 | ||
105 | typedef struct page *pgtable_t; | 105 | typedef struct page *pgtable_t; |
106 | 106 | ||
107 | #define pte_pgprot(x) __pgprot(pte_val(x) & PTE_FLAGS_MASK) | ||
108 | |||
107 | #endif /* !__ASSEMBLY__ */ | 109 | #endif /* !__ASSEMBLY__ */ |
108 | 110 | ||
109 | /* | 111 | /* |
diff --git a/arch/sh/include/asm/pgtable.h b/arch/sh/include/asm/pgtable.h index a4a8f8b93463..52220d70a096 100644 --- a/arch/sh/include/asm/pgtable.h +++ b/arch/sh/include/asm/pgtable.h | |||
@@ -76,6 +76,7 @@ extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)]; | |||
76 | #endif | 76 | #endif |
77 | 77 | ||
78 | #define PTE_PHYS_MASK (PHYS_ADDR_MASK & PAGE_MASK) | 78 | #define PTE_PHYS_MASK (PHYS_ADDR_MASK & PAGE_MASK) |
79 | #define PTE_FLAGS_MASK (~(PTE_PHYS_MASK) << PAGE_SHIFT) | ||
79 | 80 | ||
80 | #ifdef CONFIG_SUPERH32 | 81 | #ifdef CONFIG_SUPERH32 |
81 | #define VMALLOC_START (P3SEG) | 82 | #define VMALLOC_START (P3SEG) |
diff --git a/arch/sh/include/asm/processor.h b/arch/sh/include/asm/processor.h index 15d9f92ca383..693364a20ad7 100644 --- a/arch/sh/include/asm/processor.h +++ b/arch/sh/include/asm/processor.h | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | #include <asm/cpu-features.h> | 4 | #include <asm/cpu-features.h> |
5 | #include <asm/segment.h> | 5 | #include <asm/segment.h> |
6 | #include <asm/cache.h> | ||
6 | 7 | ||
7 | #ifndef __ASSEMBLY__ | 8 | #ifndef __ASSEMBLY__ |
8 | /* | 9 | /* |
@@ -43,11 +44,52 @@ enum cpu_type { | |||
43 | CPU_SH_NONE | 44 | CPU_SH_NONE |
44 | }; | 45 | }; |
45 | 46 | ||
47 | /* | ||
48 | * TLB information structure | ||
49 | * | ||
50 | * Defined for both I and D tlb, per-processor. | ||
51 | */ | ||
52 | struct tlb_info { | ||
53 | unsigned long long next; | ||
54 | unsigned long long first; | ||
55 | unsigned long long last; | ||
56 | |||
57 | unsigned int entries; | ||
58 | unsigned int step; | ||
59 | |||
60 | unsigned long flags; | ||
61 | }; | ||
62 | |||
63 | struct sh_cpuinfo { | ||
64 | unsigned int type; | ||
65 | int cut_major, cut_minor; | ||
66 | unsigned long loops_per_jiffy; | ||
67 | unsigned long asid_cache; | ||
68 | |||
69 | struct cache_info icache; /* Primary I-cache */ | ||
70 | struct cache_info dcache; /* Primary D-cache */ | ||
71 | struct cache_info scache; /* Secondary cache */ | ||
72 | |||
73 | /* TLB info */ | ||
74 | struct tlb_info itlb; | ||
75 | struct tlb_info dtlb; | ||
76 | |||
77 | unsigned long flags; | ||
78 | } __attribute__ ((aligned(L1_CACHE_BYTES))); | ||
79 | |||
80 | extern struct sh_cpuinfo cpu_data[]; | ||
81 | #define boot_cpu_data cpu_data[0] | ||
82 | #define current_cpu_data cpu_data[smp_processor_id()] | ||
83 | #define raw_current_cpu_data cpu_data[raw_smp_processor_id()] | ||
84 | |||
46 | /* Forward decl */ | 85 | /* Forward decl */ |
47 | struct sh_cpuinfo; | 86 | struct seq_operations; |
87 | |||
88 | extern struct pt_regs fake_swapper_regs; | ||
48 | 89 | ||
49 | /* arch/sh/kernel/setup.c */ | 90 | /* arch/sh/kernel/setup.c */ |
50 | const char *get_cpu_subtype(struct sh_cpuinfo *c); | 91 | const char *get_cpu_subtype(struct sh_cpuinfo *c); |
92 | extern const struct seq_operations cpuinfo_op; | ||
51 | 93 | ||
52 | #ifdef CONFIG_VSYSCALL | 94 | #ifdef CONFIG_VSYSCALL |
53 | int vsyscall_init(void); | 95 | int vsyscall_init(void); |
diff --git a/arch/sh/include/asm/processor_32.h b/arch/sh/include/asm/processor_32.h index 0dadd75bd93c..a46a0207e977 100644 --- a/arch/sh/include/asm/processor_32.h +++ b/arch/sh/include/asm/processor_32.h | |||
@@ -10,9 +10,9 @@ | |||
10 | #ifdef __KERNEL__ | 10 | #ifdef __KERNEL__ |
11 | 11 | ||
12 | #include <linux/compiler.h> | 12 | #include <linux/compiler.h> |
13 | #include <linux/linkage.h> | ||
13 | #include <asm/page.h> | 14 | #include <asm/page.h> |
14 | #include <asm/types.h> | 15 | #include <asm/types.h> |
15 | #include <asm/cache.h> | ||
16 | #include <asm/ptrace.h> | 16 | #include <asm/ptrace.h> |
17 | 17 | ||
18 | /* | 18 | /* |
@@ -26,23 +26,7 @@ | |||
26 | #define CCN_CVR 0xff000040 | 26 | #define CCN_CVR 0xff000040 |
27 | #define CCN_PRR 0xff000044 | 27 | #define CCN_PRR 0xff000044 |
28 | 28 | ||
29 | struct sh_cpuinfo { | 29 | asmlinkage void __init sh_cpu_init(void); |
30 | unsigned int type; | ||
31 | int cut_major, cut_minor; | ||
32 | unsigned long loops_per_jiffy; | ||
33 | unsigned long asid_cache; | ||
34 | |||
35 | struct cache_info icache; /* Primary I-cache */ | ||
36 | struct cache_info dcache; /* Primary D-cache */ | ||
37 | struct cache_info scache; /* Secondary cache */ | ||
38 | |||
39 | unsigned long flags; | ||
40 | } __attribute__ ((aligned(L1_CACHE_BYTES))); | ||
41 | |||
42 | extern struct sh_cpuinfo cpu_data[]; | ||
43 | #define boot_cpu_data cpu_data[0] | ||
44 | #define current_cpu_data cpu_data[smp_processor_id()] | ||
45 | #define raw_current_cpu_data cpu_data[raw_smp_processor_id()] | ||
46 | 30 | ||
47 | /* | 31 | /* |
48 | * User space process size: 2GB. | 32 | * User space process size: 2GB. |
@@ -196,6 +180,8 @@ extern unsigned long get_wchan(struct task_struct *p); | |||
196 | #define KSTK_EIP(tsk) (task_pt_regs(tsk)->pc) | 180 | #define KSTK_EIP(tsk) (task_pt_regs(tsk)->pc) |
197 | #define KSTK_ESP(tsk) (task_pt_regs(tsk)->regs[15]) | 181 | #define KSTK_ESP(tsk) (task_pt_regs(tsk)->regs[15]) |
198 | 182 | ||
183 | #define user_stack_pointer(regs) ((regs)->regs[15]) | ||
184 | |||
199 | #define cpu_sleep() __asm__ __volatile__ ("sleep" : : : "memory") | 185 | #define cpu_sleep() __asm__ __volatile__ ("sleep" : : : "memory") |
200 | #define cpu_relax() barrier() | 186 | #define cpu_relax() barrier() |
201 | 187 | ||
diff --git a/arch/sh/include/asm/processor_64.h b/arch/sh/include/asm/processor_64.h index 770d5169983b..b0b4824dfc4c 100644 --- a/arch/sh/include/asm/processor_64.h +++ b/arch/sh/include/asm/processor_64.h | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/compiler.h> | 17 | #include <linux/compiler.h> |
18 | #include <asm/page.h> | 18 | #include <asm/page.h> |
19 | #include <asm/types.h> | 19 | #include <asm/types.h> |
20 | #include <asm/cache.h> | ||
21 | #include <asm/ptrace.h> | 20 | #include <asm/ptrace.h> |
22 | #include <cpu/registers.h> | 21 | #include <cpu/registers.h> |
23 | 22 | ||
@@ -36,46 +35,6 @@ __asm__("gettr tr0, %1\n\t" \ | |||
36 | : "1" (__dummy)); \ | 35 | : "1" (__dummy)); \ |
37 | pc; }) | 36 | pc; }) |
38 | 37 | ||
39 | /* | ||
40 | * TLB information structure | ||
41 | * | ||
42 | * Defined for both I and D tlb, per-processor. | ||
43 | */ | ||
44 | struct tlb_info { | ||
45 | unsigned long long next; | ||
46 | unsigned long long first; | ||
47 | unsigned long long last; | ||
48 | |||
49 | unsigned int entries; | ||
50 | unsigned int step; | ||
51 | |||
52 | unsigned long flags; | ||
53 | }; | ||
54 | |||
55 | struct sh_cpuinfo { | ||
56 | enum cpu_type type; | ||
57 | unsigned long loops_per_jiffy; | ||
58 | unsigned long asid_cache; | ||
59 | |||
60 | unsigned int cpu_clock, master_clock, bus_clock, module_clock; | ||
61 | |||
62 | /* Cache info */ | ||
63 | struct cache_info icache; | ||
64 | struct cache_info dcache; | ||
65 | struct cache_info scache; | ||
66 | |||
67 | /* TLB info */ | ||
68 | struct tlb_info itlb; | ||
69 | struct tlb_info dtlb; | ||
70 | |||
71 | unsigned long flags; | ||
72 | }; | ||
73 | |||
74 | extern struct sh_cpuinfo cpu_data[]; | ||
75 | #define boot_cpu_data cpu_data[0] | ||
76 | #define current_cpu_data cpu_data[smp_processor_id()] | ||
77 | #define raw_current_cpu_data cpu_data[raw_smp_processor_id()] | ||
78 | |||
79 | #endif | 38 | #endif |
80 | 39 | ||
81 | /* | 40 | /* |
@@ -169,8 +128,6 @@ struct thread_struct { | |||
169 | #define INIT_MMAP \ | 128 | #define INIT_MMAP \ |
170 | { &init_mm, 0, 0, NULL, PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC, 1, NULL, NULL } | 129 | { &init_mm, 0, 0, NULL, PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC, 1, NULL, NULL } |
171 | 130 | ||
172 | extern struct pt_regs fake_swapper_regs; | ||
173 | |||
174 | #define INIT_THREAD { \ | 131 | #define INIT_THREAD { \ |
175 | .sp = sizeof(init_stack) + \ | 132 | .sp = sizeof(init_stack) + \ |
176 | (long) &init_stack, \ | 133 | (long) &init_stack, \ |
@@ -269,6 +226,8 @@ extern unsigned long get_wchan(struct task_struct *p); | |||
269 | #define KSTK_EIP(tsk) ((tsk)->thread.pc) | 226 | #define KSTK_EIP(tsk) ((tsk)->thread.pc) |
270 | #define KSTK_ESP(tsk) ((tsk)->thread.sp) | 227 | #define KSTK_ESP(tsk) ((tsk)->thread.sp) |
271 | 228 | ||
229 | #define user_stack_pointer(regs) ((regs)->sp) | ||
230 | |||
272 | #define cpu_relax() barrier() | 231 | #define cpu_relax() barrier() |
273 | 232 | ||
274 | #endif /* __ASSEMBLY__ */ | 233 | #endif /* __ASSEMBLY__ */ |
diff --git a/arch/sh/include/asm/ptrace.h b/arch/sh/include/asm/ptrace.h index b86aeabba61a..3ad18e91bca6 100644 --- a/arch/sh/include/asm/ptrace.h +++ b/arch/sh/include/asm/ptrace.h | |||
@@ -87,12 +87,18 @@ struct pt_dspregs { | |||
87 | unsigned long mod; | 87 | unsigned long mod; |
88 | }; | 88 | }; |
89 | 89 | ||
90 | #define PTRACE_GETREGS 12 /* General registers */ | ||
91 | #define PTRACE_SETREGS 13 | ||
92 | |||
93 | #define PTRACE_GETFPREGS 14 /* FPU registers */ | ||
94 | #define PTRACE_SETFPREGS 15 | ||
95 | |||
90 | #define PTRACE_GETFDPIC 31 /* get the ELF fdpic loadmap address */ | 96 | #define PTRACE_GETFDPIC 31 /* get the ELF fdpic loadmap address */ |
91 | 97 | ||
92 | #define PTRACE_GETFDPIC_EXEC 0 /* [addr] request the executable loadmap */ | 98 | #define PTRACE_GETFDPIC_EXEC 0 /* [addr] request the executable loadmap */ |
93 | #define PTRACE_GETFDPIC_INTERP 1 /* [addr] request the interpreter loadmap */ | 99 | #define PTRACE_GETFDPIC_INTERP 1 /* [addr] request the interpreter loadmap */ |
94 | 100 | ||
95 | #define PTRACE_GETDSPREGS 55 | 101 | #define PTRACE_GETDSPREGS 55 /* DSP registers */ |
96 | #define PTRACE_SETDSPREGS 56 | 102 | #define PTRACE_SETDSPREGS 56 |
97 | #endif | 103 | #endif |
98 | 104 | ||
@@ -117,6 +123,9 @@ extern void user_disable_single_step(struct task_struct *); | |||
117 | #define task_pt_regs(task) \ | 123 | #define task_pt_regs(task) \ |
118 | ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE \ | 124 | ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE \ |
119 | - sizeof(struct pt_dspregs) - sizeof(unsigned long)) - 1) | 125 | - sizeof(struct pt_dspregs) - sizeof(unsigned long)) - 1) |
126 | #define task_pt_dspregs(task) \ | ||
127 | ((struct pt_dspregs *) (task_stack_page(task) + THREAD_SIZE \ | ||
128 | - sizeof(unsigned long)) - 1) | ||
120 | #else | 129 | #else |
121 | #define task_pt_regs(task) \ | 130 | #define task_pt_regs(task) \ |
122 | ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE \ | 131 | ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE \ |
diff --git a/arch/sh/include/asm/rtc.h b/arch/sh/include/asm/rtc.h index 1813f4202a24..f7b010d48af7 100644 --- a/arch/sh/include/asm/rtc.h +++ b/arch/sh/include/asm/rtc.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef _ASM_RTC_H | 1 | #ifndef _ASM_RTC_H |
2 | #define _ASM_RTC_H | 2 | #define _ASM_RTC_H |
3 | 3 | ||
4 | void time_init(void); | ||
4 | extern void (*board_time_init)(void); | 5 | extern void (*board_time_init)(void); |
5 | extern void (*rtc_sh_get_time)(struct timespec *); | 6 | extern void (*rtc_sh_get_time)(struct timespec *); |
6 | extern int (*rtc_sh_set_time)(const time_t); | 7 | extern int (*rtc_sh_set_time)(const time_t); |
diff --git a/arch/sh/include/asm/setup.h b/arch/sh/include/asm/setup.h index 55a2bd328d99..d450bcf59ee2 100644 --- a/arch/sh/include/asm/setup.h +++ b/arch/sh/include/asm/setup.h | |||
@@ -4,7 +4,6 @@ | |||
4 | #define COMMAND_LINE_SIZE 256 | 4 | #define COMMAND_LINE_SIZE 256 |
5 | 5 | ||
6 | #ifdef __KERNEL__ | 6 | #ifdef __KERNEL__ |
7 | |||
8 | /* | 7 | /* |
9 | * This is set up by the setup-routine at boot-time | 8 | * This is set up by the setup-routine at boot-time |
10 | */ | 9 | */ |
diff --git a/arch/sh/include/asm/sh_mobile_lcdc.h b/arch/sh/include/asm/sh_mobile_lcdc.h deleted file mode 100644 index 130102f663f5..000000000000 --- a/arch/sh/include/asm/sh_mobile_lcdc.h +++ /dev/null | |||
@@ -1,72 +0,0 @@ | |||
1 | #ifndef __ASM_SH_MOBILE_LCDC_H__ | ||
2 | #define __ASM_SH_MOBILE_LCDC_H__ | ||
3 | |||
4 | #include <linux/fb.h> | ||
5 | |||
6 | enum { RGB8, /* 24bpp, 8:8:8 */ | ||
7 | RGB9, /* 18bpp, 9:9 */ | ||
8 | RGB12A, /* 24bpp, 12:12 */ | ||
9 | RGB12B, /* 12bpp */ | ||
10 | RGB16, /* 16bpp */ | ||
11 | RGB18, /* 18bpp */ | ||
12 | RGB24, /* 24bpp */ | ||
13 | SYS8A, /* 24bpp, 8:8:8 */ | ||
14 | SYS8B, /* 18bpp, 8:8:2 */ | ||
15 | SYS8C, /* 18bpp, 2:8:8 */ | ||
16 | SYS8D, /* 16bpp, 8:8 */ | ||
17 | SYS9, /* 18bpp, 9:9 */ | ||
18 | SYS12, /* 24bpp, 12:12 */ | ||
19 | SYS16A, /* 16bpp */ | ||
20 | SYS16B, /* 18bpp, 16:2 */ | ||
21 | SYS16C, /* 18bpp, 2:16 */ | ||
22 | SYS18, /* 18bpp */ | ||
23 | SYS24 };/* 24bpp */ | ||
24 | |||
25 | enum { LCDC_CHAN_DISABLED = 0, | ||
26 | LCDC_CHAN_MAINLCD, | ||
27 | LCDC_CHAN_SUBLCD }; | ||
28 | |||
29 | enum { LCDC_CLK_BUS, LCDC_CLK_PERIPHERAL, LCDC_CLK_EXTERNAL }; | ||
30 | |||
31 | struct sh_mobile_lcdc_sys_bus_cfg { | ||
32 | unsigned long ldmt2r; | ||
33 | unsigned long ldmt3r; | ||
34 | }; | ||
35 | |||
36 | struct sh_mobile_lcdc_sys_bus_ops { | ||
37 | void (*write_index)(void *handle, unsigned long data); | ||
38 | void (*write_data)(void *handle, unsigned long data); | ||
39 | unsigned long (*read_data)(void *handle); | ||
40 | }; | ||
41 | |||
42 | struct sh_mobile_lcdc_board_cfg { | ||
43 | void *board_data; | ||
44 | int (*setup_sys)(void *board_data, void *sys_ops_handle, | ||
45 | struct sh_mobile_lcdc_sys_bus_ops *sys_ops); | ||
46 | void (*display_on)(void *board_data); | ||
47 | void (*display_off)(void *board_data); | ||
48 | }; | ||
49 | |||
50 | struct sh_mobile_lcdc_lcd_size_cfg { /* width and height of panel in mm */ | ||
51 | unsigned long width; | ||
52 | unsigned long height; | ||
53 | }; | ||
54 | |||
55 | struct sh_mobile_lcdc_chan_cfg { | ||
56 | int chan; | ||
57 | int bpp; | ||
58 | int interface_type; /* selects RGBn or SYSn I/F, see above */ | ||
59 | int clock_divider; | ||
60 | struct fb_videomode lcd_cfg; | ||
61 | struct sh_mobile_lcdc_lcd_size_cfg lcd_size_cfg; | ||
62 | struct sh_mobile_lcdc_board_cfg board_cfg; | ||
63 | struct sh_mobile_lcdc_sys_bus_cfg sys_bus_cfg; /* only for SYSn I/F */ | ||
64 | }; | ||
65 | |||
66 | struct sh_mobile_lcdc_info { | ||
67 | unsigned long lddckr; | ||
68 | int clock_source; | ||
69 | struct sh_mobile_lcdc_chan_cfg ch[2]; | ||
70 | }; | ||
71 | |||
72 | #endif /* __ASM_SH_MOBILE_LCDC_H__ */ | ||
diff --git a/arch/sh/include/asm/sizes.h b/arch/sh/include/asm/sizes.h new file mode 100644 index 000000000000..3a1fb97770f1 --- /dev/null +++ b/arch/sh/include/asm/sizes.h | |||
@@ -0,0 +1,61 @@ | |||
1 | /* | ||
2 | * This program is free software; you can redistribute it and/or modify | ||
3 | * it under the terms of the GNU General Public License as published by | ||
4 | * the Free Software Foundation; either version 2 of the License, or | ||
5 | * (at your option) any later version. | ||
6 | * | ||
7 | * This program is distributed in the hope that it will be useful, | ||
8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
10 | * GNU General Public License for more details. | ||
11 | * | ||
12 | * You should have received a copy of the GNU General Public License | ||
13 | * along with this program; if not, write to the Free Software | ||
14 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
15 | */ | ||
16 | /* DO NOT EDIT!! - this file automatically generated | ||
17 | * from .s file by awk -f s2h.awk | ||
18 | */ | ||
19 | /* Size definitions | ||
20 | * Copyright (C) ARM Limited 1998. All rights reserved. | ||
21 | */ | ||
22 | |||
23 | #ifndef __sizes_h | ||
24 | #define __sizes_h 1 | ||
25 | |||
26 | /* handy sizes */ | ||
27 | #define SZ_16 0x00000010 | ||
28 | #define SZ_32 0x00000020 | ||
29 | #define SZ_64 0x00000040 | ||
30 | #define SZ_128 0x00000080 | ||
31 | #define SZ_256 0x00000100 | ||
32 | #define SZ_512 0x00000200 | ||
33 | |||
34 | #define SZ_1K 0x00000400 | ||
35 | #define SZ_4K 0x00001000 | ||
36 | #define SZ_8K 0x00002000 | ||
37 | #define SZ_16K 0x00004000 | ||
38 | #define SZ_32K 0x00008000 | ||
39 | #define SZ_64K 0x00010000 | ||
40 | #define SZ_128K 0x00020000 | ||
41 | #define SZ_256K 0x00040000 | ||
42 | #define SZ_512K 0x00080000 | ||
43 | |||
44 | #define SZ_1M 0x00100000 | ||
45 | #define SZ_2M 0x00200000 | ||
46 | #define SZ_4M 0x00400000 | ||
47 | #define SZ_8M 0x00800000 | ||
48 | #define SZ_16M 0x01000000 | ||
49 | #define SZ_26M 0x01a00000 | ||
50 | #define SZ_32M 0x02000000 | ||
51 | #define SZ_64M 0x04000000 | ||
52 | #define SZ_128M 0x08000000 | ||
53 | #define SZ_256M 0x10000000 | ||
54 | #define SZ_512M 0x20000000 | ||
55 | |||
56 | #define SZ_1G 0x40000000 | ||
57 | #define SZ_2G 0x80000000 | ||
58 | |||
59 | #endif | ||
60 | |||
61 | /* END */ | ||
diff --git a/arch/sh/include/asm/smp.h b/arch/sh/include/asm/smp.h index 593343cd26ee..85b660c17eb0 100644 --- a/arch/sh/include/asm/smp.h +++ b/arch/sh/include/asm/smp.h | |||
@@ -21,25 +21,29 @@ extern int __cpu_number_map[NR_CPUS]; | |||
21 | extern int __cpu_logical_map[NR_CPUS]; | 21 | extern int __cpu_logical_map[NR_CPUS]; |
22 | #define cpu_logical_map(cpu) __cpu_logical_map[cpu] | 22 | #define cpu_logical_map(cpu) __cpu_logical_map[cpu] |
23 | 23 | ||
24 | /* I've no idea what the real meaning of this is */ | 24 | enum { |
25 | #define PROC_CHANGE_PENALTY 20 | 25 | SMP_MSG_FUNCTION, |
26 | SMP_MSG_RESCHEDULE, | ||
27 | SMP_MSG_FUNCTION_SINGLE, | ||
28 | SMP_MSG_TIMER, | ||
26 | 29 | ||
27 | #define NO_PROC_ID (-1) | 30 | SMP_MSG_NR, /* must be last */ |
31 | }; | ||
28 | 32 | ||
29 | #define SMP_MSG_FUNCTION 0 | 33 | void smp_message_recv(unsigned int msg); |
30 | #define SMP_MSG_RESCHEDULE 1 | 34 | void smp_timer_broadcast(cpumask_t mask); |
31 | #define SMP_MSG_FUNCTION_SINGLE 2 | 35 | |
32 | #define SMP_MSG_NR 3 | 36 | void local_timer_interrupt(void); |
37 | void local_timer_setup(unsigned int cpu); | ||
33 | 38 | ||
34 | void plat_smp_setup(void); | 39 | void plat_smp_setup(void); |
35 | void plat_prepare_cpus(unsigned int max_cpus); | 40 | void plat_prepare_cpus(unsigned int max_cpus); |
36 | int plat_smp_processor_id(void); | 41 | int plat_smp_processor_id(void); |
37 | void plat_start_cpu(unsigned int cpu, unsigned long entry_point); | 42 | void plat_start_cpu(unsigned int cpu, unsigned long entry_point); |
38 | void plat_send_ipi(unsigned int cpu, unsigned int message); | 43 | void plat_send_ipi(unsigned int cpu, unsigned int message); |
39 | int plat_register_ipi_handler(unsigned int message, | 44 | |
40 | void (*handler)(void *), void *arg); | 45 | void arch_send_call_function_single_ipi(int cpu); |
41 | extern void arch_send_call_function_single_ipi(int cpu); | 46 | void arch_send_call_function_ipi(cpumask_t mask); |
42 | extern void arch_send_call_function_ipi(cpumask_t mask); | ||
43 | 47 | ||
44 | #else | 48 | #else |
45 | 49 | ||
diff --git a/arch/sh/include/asm/syscall.h b/arch/sh/include/asm/syscall.h new file mode 100644 index 000000000000..6a381429ee9d --- /dev/null +++ b/arch/sh/include/asm/syscall.h | |||
@@ -0,0 +1,10 @@ | |||
1 | #ifndef __ASM_SH_SYSCALL_H | ||
2 | #define __ASM_SH_SYSCALL_H | ||
3 | |||
4 | #ifdef CONFIG_SUPERH32 | ||
5 | # include "syscall_32.h" | ||
6 | #else | ||
7 | # include "syscall_64.h" | ||
8 | #endif | ||
9 | |||
10 | #endif /* __ASM_SH_SYSCALL_H */ | ||
diff --git a/arch/sh/include/asm/syscall_32.h b/arch/sh/include/asm/syscall_32.h new file mode 100644 index 000000000000..54773f26cd44 --- /dev/null +++ b/arch/sh/include/asm/syscall_32.h | |||
@@ -0,0 +1,110 @@ | |||
1 | #ifndef __ASM_SH_SYSCALL_32_H | ||
2 | #define __ASM_SH_SYSCALL_32_H | ||
3 | |||
4 | #include <linux/kernel.h> | ||
5 | #include <linux/sched.h> | ||
6 | #include <asm/ptrace.h> | ||
7 | |||
8 | /* The system call number is given by the user in %g1 */ | ||
9 | static inline long syscall_get_nr(struct task_struct *task, | ||
10 | struct pt_regs *regs) | ||
11 | { | ||
12 | return (regs->tra >= 0) ? regs->regs[3] : -1L; | ||
13 | } | ||
14 | |||
15 | static inline void syscall_rollback(struct task_struct *task, | ||
16 | struct pt_regs *regs) | ||
17 | { | ||
18 | /* | ||
19 | * XXX: This needs some thought. On SH we don't | ||
20 | * save away the original r0 value anywhere. | ||
21 | */ | ||
22 | } | ||
23 | |||
24 | static inline bool syscall_has_error(struct pt_regs *regs) | ||
25 | { | ||
26 | return (regs->sr & 0x1) ? true : false; | ||
27 | } | ||
28 | static inline void syscall_set_error(struct pt_regs *regs) | ||
29 | { | ||
30 | regs->sr |= 0x1; | ||
31 | } | ||
32 | static inline void syscall_clear_error(struct pt_regs *regs) | ||
33 | { | ||
34 | regs->sr &= ~0x1; | ||
35 | } | ||
36 | |||
37 | static inline long syscall_get_error(struct task_struct *task, | ||
38 | struct pt_regs *regs) | ||
39 | { | ||
40 | return syscall_has_error(regs) ? regs->regs[0] : 0; | ||
41 | } | ||
42 | |||
43 | static inline long syscall_get_return_value(struct task_struct *task, | ||
44 | struct pt_regs *regs) | ||
45 | { | ||
46 | return regs->regs[0]; | ||
47 | } | ||
48 | |||
49 | static inline void syscall_set_return_value(struct task_struct *task, | ||
50 | struct pt_regs *regs, | ||
51 | int error, long val) | ||
52 | { | ||
53 | if (error) { | ||
54 | syscall_set_error(regs); | ||
55 | regs->regs[0] = -error; | ||
56 | } else { | ||
57 | syscall_clear_error(regs); | ||
58 | regs->regs[0] = val; | ||
59 | } | ||
60 | } | ||
61 | |||
62 | static inline void syscall_get_arguments(struct task_struct *task, | ||
63 | struct pt_regs *regs, | ||
64 | unsigned int i, unsigned int n, | ||
65 | unsigned long *args) | ||
66 | { | ||
67 | /* | ||
68 | * Do this simply for now. If we need to start supporting | ||
69 | * fetching arguments from arbitrary indices, this will need some | ||
70 | * extra logic. Presently there are no in-tree users that depend | ||
71 | * on this behaviour. | ||
72 | */ | ||
73 | BUG_ON(i); | ||
74 | |||
75 | /* Argument pattern is: R4, R5, R6, R7, R0, R1 */ | ||
76 | switch (n) { | ||
77 | case 6: args[5] = regs->regs[1]; | ||
78 | case 5: args[4] = regs->regs[0]; | ||
79 | case 4: args[3] = regs->regs[7]; | ||
80 | case 3: args[2] = regs->regs[6]; | ||
81 | case 2: args[1] = regs->regs[5]; | ||
82 | case 1: args[0] = regs->regs[4]; | ||
83 | break; | ||
84 | default: | ||
85 | BUG(); | ||
86 | } | ||
87 | } | ||
88 | |||
89 | static inline void syscall_set_arguments(struct task_struct *task, | ||
90 | struct pt_regs *regs, | ||
91 | unsigned int i, unsigned int n, | ||
92 | const unsigned long *args) | ||
93 | { | ||
94 | /* Same note as above applies */ | ||
95 | BUG_ON(i); | ||
96 | |||
97 | switch (n) { | ||
98 | case 6: regs->regs[1] = args[5]; | ||
99 | case 5: regs->regs[0] = args[4]; | ||
100 | case 4: regs->regs[7] = args[3]; | ||
101 | case 3: regs->regs[6] = args[2]; | ||
102 | case 2: regs->regs[5] = args[1]; | ||
103 | case 1: regs->regs[4] = args[0]; | ||
104 | break; | ||
105 | default: | ||
106 | BUG(); | ||
107 | } | ||
108 | } | ||
109 | |||
110 | #endif /* __ASM_SH_SYSCALL_32_H */ | ||
diff --git a/arch/sh/include/asm/syscall_64.h b/arch/sh/include/asm/syscall_64.h new file mode 100644 index 000000000000..bcaaa8ca4d70 --- /dev/null +++ b/arch/sh/include/asm/syscall_64.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef __ASM_SH_SYSCALL_64_H | ||
2 | #define __ASM_SH_SYSCALL_64_H | ||
3 | |||
4 | #include <asm-generic/syscall.h> | ||
5 | |||
6 | #endif /* __ASM_SH_SYSCALL_64_H */ | ||
diff --git a/arch/sh/include/asm/syscalls.h b/arch/sh/include/asm/syscalls.h new file mode 100644 index 000000000000..c1e2b8deb837 --- /dev/null +++ b/arch/sh/include/asm/syscalls.h | |||
@@ -0,0 +1,25 @@ | |||
1 | #ifndef __ASM_SH_SYSCALLS_H | ||
2 | #define __ASM_SH_SYSCALLS_H | ||
3 | |||
4 | #ifdef __KERNEL__ | ||
5 | |||
6 | struct old_utsname; | ||
7 | |||
8 | asmlinkage int old_mmap(unsigned long addr, unsigned long len, | ||
9 | unsigned long prot, unsigned long flags, | ||
10 | int fd, unsigned long off); | ||
11 | asmlinkage long sys_mmap2(unsigned long addr, unsigned long len, | ||
12 | unsigned long prot, unsigned long flags, | ||
13 | unsigned long fd, unsigned long pgoff); | ||
14 | asmlinkage int sys_ipc(uint call, int first, int second, | ||
15 | int third, void __user *ptr, long fifth); | ||
16 | asmlinkage int sys_uname(struct old_utsname __user *name); | ||
17 | |||
18 | #ifdef CONFIG_SUPERH32 | ||
19 | # include "syscalls_32.h" | ||
20 | #else | ||
21 | # include "syscalls_64.h" | ||
22 | #endif | ||
23 | |||
24 | #endif /* __KERNEL__ */ | ||
25 | #endif /* __ASM_SH_SYSCALLS_H */ | ||
diff --git a/arch/sh/include/asm/syscalls_32.h b/arch/sh/include/asm/syscalls_32.h new file mode 100644 index 000000000000..104c5e686106 --- /dev/null +++ b/arch/sh/include/asm/syscalls_32.h | |||
@@ -0,0 +1,56 @@ | |||
1 | #ifndef __ASM_SH_SYSCALLS_32_H | ||
2 | #define __ASM_SH_SYSCALLS_32_H | ||
3 | |||
4 | #ifdef __KERNEL__ | ||
5 | |||
6 | #include <linux/compiler.h> | ||
7 | #include <linux/linkage.h> | ||
8 | #include <linux/types.h> | ||
9 | |||
10 | struct pt_regs; | ||
11 | |||
12 | asmlinkage int sys_fork(unsigned long r4, unsigned long r5, | ||
13 | unsigned long r6, unsigned long r7, | ||
14 | struct pt_regs __regs); | ||
15 | asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp, | ||
16 | unsigned long parent_tidptr, | ||
17 | unsigned long child_tidptr, | ||
18 | struct pt_regs __regs); | ||
19 | asmlinkage int sys_vfork(unsigned long r4, unsigned long r5, | ||
20 | unsigned long r6, unsigned long r7, | ||
21 | struct pt_regs __regs); | ||
22 | asmlinkage int sys_execve(char __user *ufilename, char __user * __user *uargv, | ||
23 | char __user * __user *uenvp, unsigned long r7, | ||
24 | struct pt_regs __regs); | ||
25 | asmlinkage int sys_sigsuspend(old_sigset_t mask, unsigned long r5, | ||
26 | unsigned long r6, unsigned long r7, | ||
27 | struct pt_regs __regs); | ||
28 | asmlinkage int sys_sigaction(int sig, const struct old_sigaction __user *act, | ||
29 | struct old_sigaction __user *oact); | ||
30 | asmlinkage int sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss, | ||
31 | unsigned long r6, unsigned long r7, | ||
32 | struct pt_regs __regs); | ||
33 | asmlinkage int sys_sigreturn(unsigned long r4, unsigned long r5, | ||
34 | unsigned long r6, unsigned long r7, | ||
35 | struct pt_regs __regs); | ||
36 | asmlinkage int sys_rt_sigreturn(unsigned long r4, unsigned long r5, | ||
37 | unsigned long r6, unsigned long r7, | ||
38 | struct pt_regs __regs); | ||
39 | asmlinkage int sys_pipe(unsigned long r4, unsigned long r5, | ||
40 | unsigned long r6, unsigned long r7, | ||
41 | struct pt_regs __regs); | ||
42 | asmlinkage ssize_t sys_pread_wrapper(unsigned int fd, char __user *buf, | ||
43 | size_t count, long dummy, loff_t pos); | ||
44 | asmlinkage ssize_t sys_pwrite_wrapper(unsigned int fd, const char __user *buf, | ||
45 | size_t count, long dummy, loff_t pos); | ||
46 | asmlinkage int sys_fadvise64_64_wrapper(int fd, u32 offset0, u32 offset1, | ||
47 | u32 len0, u32 len1, int advice); | ||
48 | |||
49 | /* Misc syscall related bits */ | ||
50 | asmlinkage long do_syscall_trace_enter(struct pt_regs *regs); | ||
51 | asmlinkage void do_syscall_trace_leave(struct pt_regs *regs); | ||
52 | asmlinkage void do_notify_resume(struct pt_regs *regs, unsigned int save_r0, | ||
53 | unsigned long thread_info_flags); | ||
54 | |||
55 | #endif /* __KERNEL__ */ | ||
56 | #endif /* __ASM_SH_SYSCALLS_32_H */ | ||
diff --git a/arch/sh/include/asm/syscalls_64.h b/arch/sh/include/asm/syscalls_64.h new file mode 100644 index 000000000000..751fd8811364 --- /dev/null +++ b/arch/sh/include/asm/syscalls_64.h | |||
@@ -0,0 +1,34 @@ | |||
1 | #ifndef __ASM_SH_SYSCALLS_64_H | ||
2 | #define __ASM_SH_SYSCALLS_64_H | ||
3 | |||
4 | #ifdef __KERNEL__ | ||
5 | |||
6 | #include <linux/compiler.h> | ||
7 | #include <linux/linkage.h> | ||
8 | #include <linux/types.h> | ||
9 | |||
10 | struct pt_regs; | ||
11 | |||
12 | asmlinkage int sys_fork(unsigned long r2, unsigned long r3, | ||
13 | unsigned long r4, unsigned long r5, | ||
14 | unsigned long r6, unsigned long r7, | ||
15 | struct pt_regs *pregs); | ||
16 | asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp, | ||
17 | unsigned long r4, unsigned long r5, | ||
18 | unsigned long r6, unsigned long r7, | ||
19 | struct pt_regs *pregs); | ||
20 | asmlinkage int sys_vfork(unsigned long r2, unsigned long r3, | ||
21 | unsigned long r4, unsigned long r5, | ||
22 | unsigned long r6, unsigned long r7, | ||
23 | struct pt_regs *pregs); | ||
24 | asmlinkage int sys_execve(char *ufilename, char **uargv, | ||
25 | char **uenvp, unsigned long r5, | ||
26 | unsigned long r6, unsigned long r7, | ||
27 | struct pt_regs *pregs); | ||
28 | |||
29 | /* Misc syscall related bits */ | ||
30 | asmlinkage long long do_syscall_trace_enter(struct pt_regs *regs); | ||
31 | asmlinkage void do_syscall_trace_leave(struct pt_regs *regs); | ||
32 | |||
33 | #endif /* __KERNEL__ */ | ||
34 | #endif /* __ASM_SH_SYSCALLS_64_H */ | ||
diff --git a/arch/sh/include/asm/system.h b/arch/sh/include/asm/system.h index 056d68cd2108..6160fe445161 100644 --- a/arch/sh/include/asm/system.h +++ b/arch/sh/include/asm/system.h | |||
@@ -70,6 +70,8 @@ | |||
70 | 70 | ||
71 | #ifdef CONFIG_GUSA_RB | 71 | #ifdef CONFIG_GUSA_RB |
72 | #include <asm/cmpxchg-grb.h> | 72 | #include <asm/cmpxchg-grb.h> |
73 | #elif defined(CONFIG_CPU_SH4A) | ||
74 | #include <asm/cmpxchg-llsc.h> | ||
73 | #else | 75 | #else |
74 | #include <asm/cmpxchg-irq.h> | 76 | #include <asm/cmpxchg-irq.h> |
75 | #endif | 77 | #endif |
@@ -125,6 +127,8 @@ static inline unsigned long __cmpxchg(volatile void * ptr, unsigned long old, | |||
125 | }) | 127 | }) |
126 | 128 | ||
127 | extern void die(const char *str, struct pt_regs *regs, long err) __attribute__ ((noreturn)); | 129 | extern void die(const char *str, struct pt_regs *regs, long err) __attribute__ ((noreturn)); |
130 | void free_initmem(void); | ||
131 | void free_initrd_mem(unsigned long start, unsigned long end); | ||
128 | 132 | ||
129 | extern void *set_exception_table_vec(unsigned int vec, void *handler); | 133 | extern void *set_exception_table_vec(unsigned int vec, void *handler); |
130 | 134 | ||
@@ -177,8 +181,8 @@ BUILD_TRAP_HANDLER(fpu_state_restore); | |||
177 | #define arch_align_stack(x) (x) | 181 | #define arch_align_stack(x) (x) |
178 | 182 | ||
179 | struct mem_access { | 183 | struct mem_access { |
180 | unsigned long (*from)(void *dst, const void *src, unsigned long cnt); | 184 | unsigned long (*from)(void *dst, const void __user *src, unsigned long cnt); |
181 | unsigned long (*to)(void *dst, const void *src, unsigned long cnt); | 185 | unsigned long (*to)(void __user *dst, const void *src, unsigned long cnt); |
182 | }; | 186 | }; |
183 | 187 | ||
184 | #ifdef CONFIG_SUPERH32 | 188 | #ifdef CONFIG_SUPERH32 |
diff --git a/arch/sh/include/asm/system_32.h b/arch/sh/include/asm/system_32.h index f11bcf0855ed..a726d5d07277 100644 --- a/arch/sh/include/asm/system_32.h +++ b/arch/sh/include/asm/system_32.h | |||
@@ -58,7 +58,8 @@ do { \ | |||
58 | last = __last; \ | 58 | last = __last; \ |
59 | } while (0) | 59 | } while (0) |
60 | 60 | ||
61 | #define __uses_jump_to_uncached __attribute__ ((__section__ (".uncached.text"))) | 61 | #define __uses_jump_to_uncached \ |
62 | noinline __attribute__ ((__section__ (".uncached.text"))) | ||
62 | 63 | ||
63 | /* | 64 | /* |
64 | * Jump to uncached area. | 65 | * Jump to uncached area. |
@@ -96,7 +97,48 @@ do { \ | |||
96 | : "=&r" (__dummy)); \ | 97 | : "=&r" (__dummy)); \ |
97 | } while (0) | 98 | } while (0) |
98 | 99 | ||
100 | #ifdef CONFIG_CPU_HAS_SR_RB | ||
101 | #define lookup_exception_vector() \ | ||
102 | ({ \ | ||
103 | unsigned long _vec; \ | ||
104 | \ | ||
105 | __asm__ __volatile__ ( \ | ||
106 | "stc r2_bank, %0\n\t" \ | ||
107 | : "=r" (_vec) \ | ||
108 | ); \ | ||
109 | \ | ||
110 | _vec; \ | ||
111 | }) | ||
112 | #else | ||
113 | #define lookup_exception_vector() \ | ||
114 | ({ \ | ||
115 | unsigned long _vec; \ | ||
116 | __asm__ __volatile__ ( \ | ||
117 | "mov r4, %0\n\t" \ | ||
118 | : "=r" (_vec) \ | ||
119 | ); \ | ||
120 | \ | ||
121 | _vec; \ | ||
122 | }) | ||
123 | #endif | ||
124 | |||
99 | int handle_unaligned_access(opcode_t instruction, struct pt_regs *regs, | 125 | int handle_unaligned_access(opcode_t instruction, struct pt_regs *regs, |
100 | struct mem_access *ma); | 126 | struct mem_access *ma); |
101 | 127 | ||
128 | asmlinkage void do_address_error(struct pt_regs *regs, | ||
129 | unsigned long writeaccess, | ||
130 | unsigned long address); | ||
131 | asmlinkage void do_divide_error(unsigned long r4, unsigned long r5, | ||
132 | unsigned long r6, unsigned long r7, | ||
133 | struct pt_regs __regs); | ||
134 | asmlinkage void do_reserved_inst(unsigned long r4, unsigned long r5, | ||
135 | unsigned long r6, unsigned long r7, | ||
136 | struct pt_regs __regs); | ||
137 | asmlinkage void do_illegal_slot_inst(unsigned long r4, unsigned long r5, | ||
138 | unsigned long r6, unsigned long r7, | ||
139 | struct pt_regs __regs); | ||
140 | asmlinkage void do_exception_error(unsigned long r4, unsigned long r5, | ||
141 | unsigned long r6, unsigned long r7, | ||
142 | struct pt_regs __regs); | ||
143 | |||
102 | #endif /* __ASM_SH_SYSTEM_32_H */ | 144 | #endif /* __ASM_SH_SYSTEM_32_H */ |
diff --git a/arch/sh/include/asm/thread_info.h b/arch/sh/include/asm/thread_info.h index 0a894cafb1dd..f09ac4806294 100644 --- a/arch/sh/include/asm/thread_info.h +++ b/arch/sh/include/asm/thread_info.h | |||
@@ -33,20 +33,12 @@ struct thread_info { | |||
33 | #define PREEMPT_ACTIVE 0x10000000 | 33 | #define PREEMPT_ACTIVE 0x10000000 |
34 | 34 | ||
35 | #if defined(CONFIG_4KSTACKS) | 35 | #if defined(CONFIG_4KSTACKS) |
36 | #define THREAD_SIZE_ORDER (0) | 36 | #define THREAD_SHIFT 12 |
37 | #elif defined(CONFIG_PAGE_SIZE_4KB) | ||
38 | #define THREAD_SIZE_ORDER (1) | ||
39 | #elif defined(CONFIG_PAGE_SIZE_8KB) | ||
40 | #define THREAD_SIZE_ORDER (1) | ||
41 | #elif defined(CONFIG_PAGE_SIZE_16KB) | ||
42 | #define THREAD_SIZE_ORDER (0) | ||
43 | #elif defined(CONFIG_PAGE_SIZE_64KB) | ||
44 | #define THREAD_SIZE_ORDER (0) | ||
45 | #else | 37 | #else |
46 | #error "Unknown thread size" | 38 | #define THREAD_SHIFT 13 |
47 | #endif | 39 | #endif |
48 | 40 | ||
49 | #define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER) | 41 | #define THREAD_SIZE (1 << THREAD_SHIFT) |
50 | #define STACK_WARN (THREAD_SIZE >> 3) | 42 | #define STACK_WARN (THREAD_SIZE >> 3) |
51 | 43 | ||
52 | /* | 44 | /* |
@@ -94,15 +86,19 @@ static inline struct thread_info *current_thread_info(void) | |||
94 | return ti; | 86 | return ti; |
95 | } | 87 | } |
96 | 88 | ||
89 | /* thread information allocation */ | ||
90 | #if THREAD_SHIFT >= PAGE_SHIFT | ||
91 | |||
92 | #define THREAD_SIZE_ORDER (THREAD_SHIFT - PAGE_SHIFT) | ||
93 | |||
94 | #else /* THREAD_SHIFT < PAGE_SHIFT */ | ||
95 | |||
97 | #define __HAVE_ARCH_THREAD_INFO_ALLOCATOR | 96 | #define __HAVE_ARCH_THREAD_INFO_ALLOCATOR |
98 | 97 | ||
99 | /* thread information allocation */ | 98 | extern struct thread_info *alloc_thread_info(struct task_struct *tsk); |
100 | #ifdef CONFIG_DEBUG_STACK_USAGE | 99 | extern void free_thread_info(struct thread_info *ti); |
101 | #define alloc_thread_info(ti) kzalloc(THREAD_SIZE, GFP_KERNEL) | 100 | |
102 | #else | 101 | #endif /* THREAD_SHIFT < PAGE_SHIFT */ |
103 | #define alloc_thread_info(ti) kmalloc(THREAD_SIZE, GFP_KERNEL) | ||
104 | #endif | ||
105 | #define free_thread_info(ti) kfree(ti) | ||
106 | 102 | ||
107 | #endif /* __ASSEMBLY__ */ | 103 | #endif /* __ASSEMBLY__ */ |
108 | 104 | ||
diff --git a/arch/sh/include/asm/uaccess_64.h b/arch/sh/include/asm/uaccess_64.h index 5580fd471003..56fd20b8cdcc 100644 --- a/arch/sh/include/asm/uaccess_64.h +++ b/arch/sh/include/asm/uaccess_64.h | |||
@@ -26,16 +26,20 @@ do { \ | |||
26 | retval = 0; \ | 26 | retval = 0; \ |
27 | switch (size) { \ | 27 | switch (size) { \ |
28 | case 1: \ | 28 | case 1: \ |
29 | retval = __get_user_asm_b(x, ptr); \ | 29 | retval = __get_user_asm_b((void *)&x, \ |
30 | (long)ptr); \ | ||
30 | break; \ | 31 | break; \ |
31 | case 2: \ | 32 | case 2: \ |
32 | retval = __get_user_asm_w(x, ptr); \ | 33 | retval = __get_user_asm_w((void *)&x, \ |
34 | (long)ptr); \ | ||
33 | break; \ | 35 | break; \ |
34 | case 4: \ | 36 | case 4: \ |
35 | retval = __get_user_asm_l(x, ptr); \ | 37 | retval = __get_user_asm_l((void *)&x, \ |
38 | (long)ptr); \ | ||
36 | break; \ | 39 | break; \ |
37 | case 8: \ | 40 | case 8: \ |
38 | retval = __get_user_asm_q(x, ptr); \ | 41 | retval = __get_user_asm_q((void *)&x, \ |
42 | (long)ptr); \ | ||
39 | break; \ | 43 | break; \ |
40 | default: \ | 44 | default: \ |
41 | __get_user_unknown(); \ | 45 | __get_user_unknown(); \ |
@@ -54,16 +58,20 @@ do { \ | |||
54 | retval = 0; \ | 58 | retval = 0; \ |
55 | switch (size) { \ | 59 | switch (size) { \ |
56 | case 1: \ | 60 | case 1: \ |
57 | retval = __put_user_asm_b(x, ptr); \ | 61 | retval = __put_user_asm_b((void *)&x, \ |
62 | (long)ptr); \ | ||
58 | break; \ | 63 | break; \ |
59 | case 2: \ | 64 | case 2: \ |
60 | retval = __put_user_asm_w(x, ptr); \ | 65 | retval = __put_user_asm_w((void *)&x, \ |
66 | (long)ptr); \ | ||
61 | break; \ | 67 | break; \ |
62 | case 4: \ | 68 | case 4: \ |
63 | retval = __put_user_asm_l(x, ptr); \ | 69 | retval = __put_user_asm_l((void *)&x, \ |
70 | (long)ptr); \ | ||
64 | break; \ | 71 | break; \ |
65 | case 8: \ | 72 | case 8: \ |
66 | retval = __put_user_asm_q(x, ptr); \ | 73 | retval = __put_user_asm_q((void *)&x, \ |
74 | (long)ptr); \ | ||
67 | break; \ | 75 | break; \ |
68 | default: \ | 76 | default: \ |
69 | __put_user_unknown(); \ | 77 | __put_user_unknown(); \ |
@@ -77,5 +85,7 @@ extern long __put_user_asm_q(void *, long); | |||
77 | extern void __put_user_unknown(void); | 85 | extern void __put_user_unknown(void); |
78 | 86 | ||
79 | extern long __strnlen_user(const char *__s, long __n); | 87 | extern long __strnlen_user(const char *__s, long __n); |
88 | extern int __strncpy_from_user(unsigned long __dest, | ||
89 | unsigned long __user __src, int __count); | ||
80 | 90 | ||
81 | #endif /* __ASM_SH_UACCESS_64_H */ | 91 | #endif /* __ASM_SH_UACCESS_64_H */ |
diff --git a/arch/sh/include/cpu-sh2a/cpu/sh7203.h b/arch/sh/include/cpu-sh2a/cpu/sh7203.h new file mode 100644 index 000000000000..79f93159018d --- /dev/null +++ b/arch/sh/include/cpu-sh2a/cpu/sh7203.h | |||
@@ -0,0 +1,143 @@ | |||
1 | #ifndef __ASM_SH7203_H__ | ||
2 | #define __ASM_SH7203_H__ | ||
3 | |||
4 | enum { | ||
5 | /* PA */ | ||
6 | GPIO_PA7, GPIO_PA6, GPIO_PA5, GPIO_PA4, | ||
7 | GPIO_PA3, GPIO_PA2, GPIO_PA1, GPIO_PA0, | ||
8 | |||
9 | /* PB */ | ||
10 | GPIO_PB12, | ||
11 | GPIO_PB11, GPIO_PB10, GPIO_PB9, GPIO_PB8, | ||
12 | GPIO_PB7, GPIO_PB6, GPIO_PB5, GPIO_PB4, | ||
13 | GPIO_PB3, GPIO_PB2, GPIO_PB1, GPIO_PB0, | ||
14 | |||
15 | /* PC */ | ||
16 | GPIO_PC14, GPIO_PC13, GPIO_PC12, | ||
17 | GPIO_PC11, GPIO_PC10, GPIO_PC9, GPIO_PC8, | ||
18 | GPIO_PC7, GPIO_PC6, GPIO_PC5, GPIO_PC4, | ||
19 | GPIO_PC3, GPIO_PC2, GPIO_PC1, GPIO_PC0, | ||
20 | |||
21 | /* PD */ | ||
22 | GPIO_PD15, GPIO_PD14, GPIO_PD13, GPIO_PD12, | ||
23 | GPIO_PD11, GPIO_PD10, GPIO_PD9, GPIO_PD8, | ||
24 | GPIO_PD7, GPIO_PD6, GPIO_PD5, GPIO_PD4, | ||
25 | GPIO_PD3, GPIO_PD2, GPIO_PD1, GPIO_PD0, | ||
26 | |||
27 | /* PE */ | ||
28 | GPIO_PE15, GPIO_PE14, GPIO_PE13, GPIO_PE12, | ||
29 | GPIO_PE11, GPIO_PE10, GPIO_PE9, GPIO_PE8, | ||
30 | GPIO_PE7, GPIO_PE6, GPIO_PE5, GPIO_PE4, | ||
31 | GPIO_PE3, GPIO_PE2, GPIO_PE1, GPIO_PE0, | ||
32 | |||
33 | /* PF */ | ||
34 | GPIO_PF30, GPIO_PF29, GPIO_PF28, | ||
35 | GPIO_PF27, GPIO_PF26, GPIO_PF25, GPIO_PF24, | ||
36 | GPIO_PF23, GPIO_PF22, GPIO_PF21, GPIO_PF20, | ||
37 | GPIO_PF19, GPIO_PF18, GPIO_PF17, GPIO_PF16, | ||
38 | GPIO_PF15, GPIO_PF14, GPIO_PF13, GPIO_PF12, | ||
39 | GPIO_PF11, GPIO_PF10, GPIO_PF9, GPIO_PF8, | ||
40 | GPIO_PF7, GPIO_PF6, GPIO_PF5, GPIO_PF4, | ||
41 | GPIO_PF3, GPIO_PF2, GPIO_PF1, GPIO_PF0, | ||
42 | |||
43 | /* INTC: IRQ and PINT on PB/PD/PE */ | ||
44 | GPIO_FN_PINT7_PB, GPIO_FN_PINT6_PB, GPIO_FN_PINT5_PB, GPIO_FN_PINT4_PB, | ||
45 | GPIO_FN_PINT3_PB, GPIO_FN_PINT2_PB, GPIO_FN_PINT1_PB, GPIO_FN_PINT0_PB, | ||
46 | GPIO_FN_PINT7_PD, GPIO_FN_PINT6_PD, GPIO_FN_PINT5_PD, GPIO_FN_PINT4_PD, | ||
47 | GPIO_FN_PINT3_PD, GPIO_FN_PINT2_PD, GPIO_FN_PINT1_PD, GPIO_FN_PINT0_PD, | ||
48 | GPIO_FN_IRQ7_PB, GPIO_FN_IRQ6_PB, GPIO_FN_IRQ5_PB, GPIO_FN_IRQ4_PB, | ||
49 | GPIO_FN_IRQ3_PB, GPIO_FN_IRQ2_PB, GPIO_FN_IRQ1_PB, GPIO_FN_IRQ0_PB, | ||
50 | GPIO_FN_IRQ7_PD, GPIO_FN_IRQ6_PD, GPIO_FN_IRQ5_PD, GPIO_FN_IRQ4_PD, | ||
51 | GPIO_FN_IRQ3_PD, GPIO_FN_IRQ2_PD, GPIO_FN_IRQ1_PD, GPIO_FN_IRQ0_PD, | ||
52 | GPIO_FN_IRQ7_PE, GPIO_FN_IRQ6_PE, GPIO_FN_IRQ5_PE, GPIO_FN_IRQ4_PE, | ||
53 | GPIO_FN_IRQ3_PE, GPIO_FN_IRQ2_PE, GPIO_FN_IRQ1_PE, GPIO_FN_IRQ0_PE, | ||
54 | |||
55 | GPIO_FN_WDTOVF, GPIO_FN_IRQOUT, GPIO_FN_REFOUT, GPIO_FN_IRQOUT_REFOUT, | ||
56 | GPIO_FN_UBCTRG, | ||
57 | |||
58 | /* CAN */ | ||
59 | GPIO_FN_CTX1, GPIO_FN_CRX1, GPIO_FN_CTX0, GPIO_FN_CTX0_CTX1, | ||
60 | GPIO_FN_CRX0, GPIO_FN_CRX0_CRX1, | ||
61 | |||
62 | /* IIC3 */ | ||
63 | GPIO_FN_SDA3, GPIO_FN_SCL3, | ||
64 | GPIO_FN_SDA2, GPIO_FN_SCL2, | ||
65 | GPIO_FN_SDA1, GPIO_FN_SCL1, | ||
66 | GPIO_FN_SDA0, GPIO_FN_SCL0, | ||
67 | |||
68 | /* DMAC */ | ||
69 | GPIO_FN_TEND0_PD, GPIO_FN_TEND0_PE, GPIO_FN_DACK0_PD, | ||
70 | GPIO_FN_DACK0_PE, GPIO_FN_DREQ0_PD, GPIO_FN_DREQ0_PE, | ||
71 | GPIO_FN_TEND1_PD, GPIO_FN_TEND1_PE, GPIO_FN_DACK1_PD, | ||
72 | GPIO_FN_DACK1_PE, GPIO_FN_DREQ1_PD, GPIO_FN_DREQ1_PE, | ||
73 | GPIO_FN_DACK2, GPIO_FN_DREQ2, | ||
74 | GPIO_FN_DACK3, GPIO_FN_DREQ3, | ||
75 | |||
76 | /* ADC */ | ||
77 | GPIO_FN_ADTRG_PD, GPIO_FN_ADTRG_PE, | ||
78 | |||
79 | /* BSC */ | ||
80 | GPIO_FN_D31, GPIO_FN_D30, GPIO_FN_D29, GPIO_FN_D28, | ||
81 | GPIO_FN_D27, GPIO_FN_D26, GPIO_FN_D25, GPIO_FN_D24, | ||
82 | GPIO_FN_D23, GPIO_FN_D22, GPIO_FN_D21, GPIO_FN_D20, | ||
83 | GPIO_FN_D19, GPIO_FN_D18, GPIO_FN_D17, GPIO_FN_D16, | ||
84 | GPIO_FN_A25, GPIO_FN_A24, GPIO_FN_A23, GPIO_FN_A22, | ||
85 | GPIO_FN_A21, GPIO_FN_CS4, GPIO_FN_MRES, GPIO_FN_BS, | ||
86 | GPIO_FN_IOIS16, GPIO_FN_CS1, GPIO_FN_CS6_CE1B, | ||
87 | GPIO_FN_CE2B, GPIO_FN_CS5_CE1A, GPIO_FN_CE2A, | ||
88 | GPIO_FN_FRAME, GPIO_FN_WAIT, GPIO_FN_RDWR, | ||
89 | GPIO_FN_CKE, GPIO_FN_CASU, GPIO_FN_BREQ, GPIO_FN_RASU, | ||
90 | GPIO_FN_BACK, GPIO_FN_CASL, GPIO_FN_RASL, | ||
91 | GPIO_FN_WE3_DQMUU_AH_ICIO_WR, GPIO_FN_WE2_DQMUL_ICIORD, | ||
92 | GPIO_FN_WE1_DQMLU_WE, GPIO_FN_WE0_DQMLL, | ||
93 | GPIO_FN_CS3, GPIO_FN_CS2, GPIO_FN_A1, GPIO_FN_A0, GPIO_FN_CS7, | ||
94 | |||
95 | /* TMU */ | ||
96 | GPIO_FN_TIOC4D, GPIO_FN_TIOC4C, GPIO_FN_TIOC4B, GPIO_FN_TIOC4A, | ||
97 | GPIO_FN_TIOC3D, GPIO_FN_TIOC3C, GPIO_FN_TIOC3B, GPIO_FN_TIOC3A, | ||
98 | GPIO_FN_TIOC2B, GPIO_FN_TIOC1B, GPIO_FN_TIOC2A, GPIO_FN_TIOC1A, | ||
99 | GPIO_FN_TIOC0D, GPIO_FN_TIOC0C, GPIO_FN_TIOC0B, GPIO_FN_TIOC0A, | ||
100 | GPIO_FN_TCLKD_PD, GPIO_FN_TCLKC_PD, GPIO_FN_TCLKB_PD, GPIO_FN_TCLKA_PD, | ||
101 | GPIO_FN_TCLKD_PF, GPIO_FN_TCLKC_PF, GPIO_FN_TCLKB_PF, GPIO_FN_TCLKA_PF, | ||
102 | |||
103 | /* SSU */ | ||
104 | GPIO_FN_SCS0_PD, GPIO_FN_SSO0_PD, GPIO_FN_SSI0_PD, GPIO_FN_SSCK0_PD, | ||
105 | GPIO_FN_SCS0_PF, GPIO_FN_SSO0_PF, GPIO_FN_SSI0_PF, GPIO_FN_SSCK0_PF, | ||
106 | GPIO_FN_SCS1_PD, GPIO_FN_SSO1_PD, GPIO_FN_SSI1_PD, GPIO_FN_SSCK1_PD, | ||
107 | GPIO_FN_SCS1_PF, GPIO_FN_SSO1_PF, GPIO_FN_SSI1_PF, GPIO_FN_SSCK1_PF, | ||
108 | |||
109 | /* SCIF */ | ||
110 | GPIO_FN_TXD0, GPIO_FN_RXD0, GPIO_FN_SCK0, | ||
111 | GPIO_FN_TXD1, GPIO_FN_RXD1, GPIO_FN_SCK1, | ||
112 | GPIO_FN_TXD2, GPIO_FN_RXD2, GPIO_FN_SCK2, | ||
113 | GPIO_FN_RTS3, GPIO_FN_CTS3, GPIO_FN_TXD3, GPIO_FN_RXD3, GPIO_FN_SCK3, | ||
114 | |||
115 | /* SSI */ | ||
116 | GPIO_FN_AUDIO_CLK, | ||
117 | GPIO_FN_SSIDATA3, GPIO_FN_SSIWS3, GPIO_FN_SSISCK3, | ||
118 | GPIO_FN_SSIDATA2, GPIO_FN_SSIWS2, GPIO_FN_SSISCK2, | ||
119 | GPIO_FN_SSIDATA1, GPIO_FN_SSIWS1, GPIO_FN_SSISCK1, | ||
120 | GPIO_FN_SSIDATA0, GPIO_FN_SSIWS0, GPIO_FN_SSISCK0, | ||
121 | |||
122 | /* FLCTL */ | ||
123 | GPIO_FN_FCE, GPIO_FN_FRB, | ||
124 | GPIO_FN_NAF7, GPIO_FN_NAF6, GPIO_FN_NAF5, GPIO_FN_NAF4, | ||
125 | GPIO_FN_NAF3, GPIO_FN_NAF2, GPIO_FN_NAF1, GPIO_FN_NAF0, | ||
126 | GPIO_FN_FSC, GPIO_FN_FOE, GPIO_FN_FCDE, GPIO_FN_FWE, | ||
127 | |||
128 | /* LCDC */ | ||
129 | GPIO_FN_LCD_VEPWC, GPIO_FN_LCD_VCPWC, | ||
130 | GPIO_FN_LCD_CLK, GPIO_FN_LCD_FLM, | ||
131 | GPIO_FN_LCD_M_DISP, GPIO_FN_LCD_CL2, | ||
132 | GPIO_FN_LCD_CL1, GPIO_FN_LCD_DON, | ||
133 | GPIO_FN_LCD_DATA15, GPIO_FN_LCD_DATA14, | ||
134 | GPIO_FN_LCD_DATA13, GPIO_FN_LCD_DATA12, | ||
135 | GPIO_FN_LCD_DATA11, GPIO_FN_LCD_DATA10, | ||
136 | GPIO_FN_LCD_DATA9, GPIO_FN_LCD_DATA8, | ||
137 | GPIO_FN_LCD_DATA7, GPIO_FN_LCD_DATA6, | ||
138 | GPIO_FN_LCD_DATA5, GPIO_FN_LCD_DATA4, | ||
139 | GPIO_FN_LCD_DATA3, GPIO_FN_LCD_DATA2, | ||
140 | GPIO_FN_LCD_DATA1, GPIO_FN_LCD_DATA0, | ||
141 | }; | ||
142 | |||
143 | #endif /* __ASM_SH7203_H__ */ | ||
diff --git a/arch/sh/include/cpu-sh3/cpu/sh7720.h b/arch/sh/include/cpu-sh3/cpu/sh7720.h new file mode 100644 index 000000000000..41c1406d6da2 --- /dev/null +++ b/arch/sh/include/cpu-sh3/cpu/sh7720.h | |||
@@ -0,0 +1,174 @@ | |||
1 | #ifndef __ASM_SH7720_H__ | ||
2 | #define __ASM_SH7720_H__ | ||
3 | |||
4 | enum { | ||
5 | /* PTA */ | ||
6 | GPIO_PTA7, GPIO_PTA6, GPIO_PTA5, GPIO_PTA4, | ||
7 | GPIO_PTA3, GPIO_PTA2, GPIO_PTA1, GPIO_PTA0, | ||
8 | |||
9 | /* PTB */ | ||
10 | GPIO_PTB7, GPIO_PTB6, GPIO_PTB5, GPIO_PTB4, | ||
11 | GPIO_PTB3, GPIO_PTB2, GPIO_PTB1, GPIO_PTB0, | ||
12 | |||
13 | /* PTC */ | ||
14 | GPIO_PTC7, GPIO_PTC6, GPIO_PTC5, GPIO_PTC4, | ||
15 | GPIO_PTC3, GPIO_PTC2, GPIO_PTC1, GPIO_PTC0, | ||
16 | |||
17 | /* PTD */ | ||
18 | GPIO_PTD7, GPIO_PTD6, GPIO_PTD5, GPIO_PTD4, | ||
19 | GPIO_PTD3, GPIO_PTD2, GPIO_PTD1, GPIO_PTD0, | ||
20 | |||
21 | /* PTE */ | ||
22 | GPIO_PTE6, GPIO_PTE5, GPIO_PTE4, GPIO_PTE3, | ||
23 | GPIO_PTE2, GPIO_PTE1, GPIO_PTE0, | ||
24 | |||
25 | /* PTF */ | ||
26 | GPIO_PTF6, GPIO_PTF5, GPIO_PTF4, GPIO_PTF3, | ||
27 | GPIO_PTF2, GPIO_PTF1, GPIO_PTF0, GPIO_PTG6, | ||
28 | |||
29 | /* PTG */ | ||
30 | GPIO_PTG5, GPIO_PTG4, GPIO_PTG3, GPIO_PTG2, | ||
31 | GPIO_PTG1, GPIO_PTG0, | ||
32 | |||
33 | /* PTH */ | ||
34 | GPIO_PTH6, GPIO_PTH5, GPIO_PTH4, GPIO_PTH3, | ||
35 | GPIO_PTH2, GPIO_PTH1, GPIO_PTH0, | ||
36 | |||
37 | /* PTJ */ | ||
38 | GPIO_PTJ6, GPIO_PTJ5, GPIO_PTJ4, GPIO_PTJ3, | ||
39 | GPIO_PTJ2, GPIO_PTJ1, GPIO_PTJ0, | ||
40 | |||
41 | /* PTK */ | ||
42 | GPIO_PTK3, GPIO_PTK2, GPIO_PTK1, GPIO_PTK0, | ||
43 | |||
44 | /* PTL */ | ||
45 | GPIO_PTL7, GPIO_PTL6, GPIO_PTL5, GPIO_PTL4, GPIO_PTL3, | ||
46 | |||
47 | /* PTM */ | ||
48 | GPIO_PTM7, GPIO_PTM6, GPIO_PTM5, GPIO_PTM4, | ||
49 | GPIO_PTM3, GPIO_PTM2, GPIO_PTM1, GPIO_PTM0, | ||
50 | |||
51 | /* PTP */ | ||
52 | GPIO_PTP4, GPIO_PTP3, GPIO_PTP2, GPIO_PTP1, GPIO_PTP0, | ||
53 | |||
54 | /* PTR */ | ||
55 | GPIO_PTR7, GPIO_PTR6, GPIO_PTR5, GPIO_PTR4, | ||
56 | GPIO_PTR3, GPIO_PTR2, GPIO_PTR1, GPIO_PTR0, | ||
57 | |||
58 | /* PTS */ | ||
59 | GPIO_PTS4, GPIO_PTS3, GPIO_PTS2, GPIO_PTS1, GPIO_PTS0, | ||
60 | |||
61 | /* PTT */ | ||
62 | GPIO_PTT4, GPIO_PTT3, GPIO_PTT2, GPIO_PTT1, GPIO_PTT0, | ||
63 | |||
64 | /* PTU */ | ||
65 | GPIO_PTU4, GPIO_PTU3, GPIO_PTU2, GPIO_PTU1, GPIO_PTU0, | ||
66 | |||
67 | /* PTV */ | ||
68 | GPIO_PTV4, GPIO_PTV3, GPIO_PTV2, GPIO_PTV1, GPIO_PTV0, | ||
69 | |||
70 | /* BSC */ | ||
71 | GPIO_FN_D31, GPIO_FN_D30, GPIO_FN_D29, GPIO_FN_D28, | ||
72 | GPIO_FN_D27, GPIO_FN_D26, GPIO_FN_D25, GPIO_FN_D24, | ||
73 | GPIO_FN_D23, GPIO_FN_D22, GPIO_FN_D21, GPIO_FN_D20, | ||
74 | GPIO_FN_D19, GPIO_FN_D18, GPIO_FN_D17, GPIO_FN_D16, | ||
75 | GPIO_FN_IOIS16, GPIO_FN_RAS, GPIO_FN_CAS, GPIO_FN_CKE, | ||
76 | GPIO_FN_CS5B_CE1A, GPIO_FN_CS6B_CE1B, | ||
77 | GPIO_FN_A25, GPIO_FN_A24, GPIO_FN_A23, GPIO_FN_A22, | ||
78 | GPIO_FN_A21, GPIO_FN_A20, GPIO_FN_A19, GPIO_FN_A0, | ||
79 | GPIO_FN_REFOUT, GPIO_FN_IRQOUT, | ||
80 | |||
81 | /* LCDC */ | ||
82 | GPIO_FN_LCD_DATA15, GPIO_FN_LCD_DATA14, | ||
83 | GPIO_FN_LCD_DATA13, GPIO_FN_LCD_DATA12, | ||
84 | GPIO_FN_LCD_DATA11, GPIO_FN_LCD_DATA10, | ||
85 | GPIO_FN_LCD_DATA9, GPIO_FN_LCD_DATA8, | ||
86 | GPIO_FN_LCD_DATA7, GPIO_FN_LCD_DATA6, | ||
87 | GPIO_FN_LCD_DATA5, GPIO_FN_LCD_DATA4, | ||
88 | GPIO_FN_LCD_DATA3, GPIO_FN_LCD_DATA2, | ||
89 | GPIO_FN_LCD_DATA1, GPIO_FN_LCD_DATA0, | ||
90 | GPIO_FN_LCD_M_DISP, | ||
91 | GPIO_FN_LCD_CL1, GPIO_FN_LCD_CL2, | ||
92 | GPIO_FN_LCD_DON, GPIO_FN_LCD_FLM, | ||
93 | GPIO_FN_LCD_VEPWC, GPIO_FN_LCD_VCPWC, | ||
94 | |||
95 | /* AFEIF */ | ||
96 | GPIO_FN_AFE_RXIN, GPIO_FN_AFE_RDET, | ||
97 | GPIO_FN_AFE_FS, GPIO_FN_AFE_TXOUT, | ||
98 | GPIO_FN_AFE_SCLK, GPIO_FN_AFE_RLYCNT, | ||
99 | GPIO_FN_AFE_HC1, | ||
100 | |||
101 | /* IIC */ | ||
102 | GPIO_FN_IIC_SCL, GPIO_FN_IIC_SDA, | ||
103 | |||
104 | /* DAC */ | ||
105 | GPIO_FN_DA1, GPIO_FN_DA0, | ||
106 | |||
107 | /* ADC */ | ||
108 | GPIO_FN_AN3, GPIO_FN_AN2, GPIO_FN_AN1, GPIO_FN_AN0, GPIO_FN_ADTRG, | ||
109 | |||
110 | /* USB */ | ||
111 | GPIO_FN_USB1D_RCV, GPIO_FN_USB1D_TXSE0, | ||
112 | GPIO_FN_USB1D_TXDPLS, GPIO_FN_USB1D_DMNS, | ||
113 | GPIO_FN_USB1D_DPLS, GPIO_FN_USB1D_SPEED, | ||
114 | GPIO_FN_USB1D_TXENL, GPIO_FN_USB2_PWR_EN, | ||
115 | GPIO_FN_USB1_PWR_EN_USBF_UPLUP, GPIO_FN_USB1D_SUSPEND, | ||
116 | |||
117 | /* INTC */ | ||
118 | GPIO_FN_IRQ5, GPIO_FN_IRQ4, | ||
119 | GPIO_FN_IRQ3_IRL3, GPIO_FN_IRQ2_IRL2, | ||
120 | GPIO_FN_IRQ1_IRL1, GPIO_FN_IRQ0_IRL0, | ||
121 | |||
122 | /* PCC */ | ||
123 | GPIO_FN_PCC_REG, GPIO_FN_PCC_DRV, | ||
124 | GPIO_FN_PCC_BVD2, GPIO_FN_PCC_BVD1, | ||
125 | GPIO_FN_PCC_CD2, GPIO_FN_PCC_CD1, | ||
126 | GPIO_FN_PCC_RESET, GPIO_FN_PCC_RDY, | ||
127 | GPIO_FN_PCC_VS2, GPIO_FN_PCC_VS1, | ||
128 | |||
129 | /* HUDI */ | ||
130 | GPIO_FN_AUDATA3, GPIO_FN_AUDATA2, GPIO_FN_AUDATA1, GPIO_FN_AUDATA0, | ||
131 | GPIO_FN_AUDCK, GPIO_FN_AUDSYNC, GPIO_FN_ASEBRKAK, GPIO_FN_TRST, | ||
132 | GPIO_FN_TMS, GPIO_FN_TDO, GPIO_FN_TDI, GPIO_FN_TCK, | ||
133 | |||
134 | /* DMAC */ | ||
135 | GPIO_FN_DACK1, GPIO_FN_DREQ1, GPIO_FN_DACK0, GPIO_FN_DREQ0, | ||
136 | GPIO_FN_TEND1, GPIO_FN_TEND0, | ||
137 | |||
138 | /* SIOF0 */ | ||
139 | GPIO_FN_SIOF0_SYNC, GPIO_FN_SIOF0_MCLK, | ||
140 | GPIO_FN_SIOF0_TXD, GPIO_FN_SIOF0_RXD, | ||
141 | GPIO_FN_SIOF0_SCK, | ||
142 | |||
143 | /* SIOF1 */ | ||
144 | GPIO_FN_SIOF1_SYNC, GPIO_FN_SIOF1_MCLK, | ||
145 | GPIO_FN_SIOF1_TXD, GPIO_FN_SIOF1_RXD, | ||
146 | GPIO_FN_SIOF1_SCK, | ||
147 | |||
148 | /* SCIF0 */ | ||
149 | GPIO_FN_SCIF0_TXD, GPIO_FN_SCIF0_RXD, | ||
150 | GPIO_FN_SCIF0_RTS, GPIO_FN_SCIF0_CTS, GPIO_FN_SCIF0_SCK, | ||
151 | |||
152 | /* SCIF1 */ | ||
153 | GPIO_FN_SCIF1_TXD, GPIO_FN_SCIF1_RXD, | ||
154 | GPIO_FN_SCIF1_RTS, GPIO_FN_SCIF1_CTS, GPIO_FN_SCIF1_SCK, | ||
155 | |||
156 | /* TPU */ | ||
157 | GPIO_FN_TPU_TO1, GPIO_FN_TPU_TO0, | ||
158 | GPIO_FN_TPU_TI3B, GPIO_FN_TPU_TI3A, | ||
159 | GPIO_FN_TPU_TI2B, GPIO_FN_TPU_TI2A, | ||
160 | GPIO_FN_TPU_TO3, GPIO_FN_TPU_TO2, | ||
161 | |||
162 | /* SIM */ | ||
163 | GPIO_FN_SIM_D, GPIO_FN_SIM_CLK, GPIO_FN_SIM_RST, | ||
164 | |||
165 | /* MMC */ | ||
166 | GPIO_FN_MMC_DAT, GPIO_FN_MMC_CMD, | ||
167 | GPIO_FN_MMC_CLK, GPIO_FN_MMC_VDDON, | ||
168 | GPIO_FN_MMC_ODMOD, | ||
169 | |||
170 | /* SYSC */ | ||
171 | GPIO_FN_STATUS0, GPIO_FN_STATUS1, | ||
172 | }; | ||
173 | |||
174 | #endif /* __ASM_SH7720_H__ */ | ||
diff --git a/arch/sh/include/cpu-sh4/cpu/sh7722.h b/arch/sh/include/cpu-sh4/cpu/sh7722.h new file mode 100644 index 000000000000..4b3096f5307b --- /dev/null +++ b/arch/sh/include/cpu-sh4/cpu/sh7722.h | |||
@@ -0,0 +1,210 @@ | |||
1 | #ifndef __ASM_SH7722_H__ | ||
2 | #define __ASM_SH7722_H__ | ||
3 | |||
4 | enum { | ||
5 | /* PTA */ | ||
6 | GPIO_PTA7, GPIO_PTA6, GPIO_PTA5, GPIO_PTA4, | ||
7 | GPIO_PTA3, GPIO_PTA2, GPIO_PTA1, GPIO_PTA0, | ||
8 | |||
9 | /* PTB */ | ||
10 | GPIO_PTB7, GPIO_PTB6, GPIO_PTB5, GPIO_PTB4, | ||
11 | GPIO_PTB3, GPIO_PTB2, GPIO_PTB1, GPIO_PTB0, | ||
12 | |||
13 | /* PTC */ | ||
14 | GPIO_PTC7, GPIO_PTC5, GPIO_PTC4, GPIO_PTC3, | ||
15 | GPIO_PTC2, GPIO_PTC0, | ||
16 | |||
17 | /* PTD */ | ||
18 | GPIO_PTD7, GPIO_PTD6, GPIO_PTD5, GPIO_PTD4, | ||
19 | GPIO_PTD3, GPIO_PTD2, GPIO_PTD1, GPIO_PTD0, | ||
20 | |||
21 | /* PTE */ | ||
22 | GPIO_PTE7, GPIO_PTE6, GPIO_PTE5, GPIO_PTE4, | ||
23 | GPIO_PTE1, GPIO_PTE0, | ||
24 | |||
25 | /* PTF */ | ||
26 | GPIO_PTF6, GPIO_PTF5, GPIO_PTF4, GPIO_PTF3, | ||
27 | GPIO_PTF2, GPIO_PTF1, GPIO_PTF0, | ||
28 | |||
29 | /* PTG */ | ||
30 | GPIO_PTG4, GPIO_PTG3, GPIO_PTG2, GPIO_PTG1, GPIO_PTG0, | ||
31 | |||
32 | /* PTH */ | ||
33 | GPIO_PTH7, GPIO_PTH6, GPIO_PTH5, GPIO_PTH4, | ||
34 | GPIO_PTH3, GPIO_PTH2, GPIO_PTH1, GPIO_PTH0, | ||
35 | |||
36 | /* PTJ */ | ||
37 | GPIO_PTJ7, GPIO_PTJ6, GPIO_PTJ5, GPIO_PTJ1, GPIO_PTJ0, | ||
38 | |||
39 | /* PTK */ | ||
40 | GPIO_PTK6, GPIO_PTK5, GPIO_PTK4, GPIO_PTK3, | ||
41 | GPIO_PTK2, GPIO_PTK1, GPIO_PTK0, | ||
42 | |||
43 | /* PTL */ | ||
44 | GPIO_PTL7, GPIO_PTL6, GPIO_PTL5, GPIO_PTL4, | ||
45 | GPIO_PTL3, GPIO_PTL2, GPIO_PTL1, GPIO_PTL0, | ||
46 | |||
47 | /* PTM */ | ||
48 | GPIO_PTM7, GPIO_PTM6, GPIO_PTM5, GPIO_PTM4, | ||
49 | GPIO_PTM3, GPIO_PTM2, GPIO_PTM1, GPIO_PTM0, | ||
50 | |||
51 | /* PTN */ | ||
52 | GPIO_PTN7, GPIO_PTN6, GPIO_PTN5, GPIO_PTN4, | ||
53 | GPIO_PTN3, GPIO_PTN2, GPIO_PTN1, GPIO_PTN0, | ||
54 | |||
55 | /* PTQ */ | ||
56 | GPIO_PTQ7, GPIO_PTQ6, GPIO_PTQ5, GPIO_PTQ4, | ||
57 | GPIO_PTQ3, GPIO_PTQ2, GPIO_PTQ1, GPIO_PTQ0, | ||
58 | |||
59 | /* PTR */ | ||
60 | GPIO_PTR4, GPIO_PTR3, GPIO_PTR2, GPIO_PTR1, GPIO_PTR0, | ||
61 | |||
62 | /* PTS */ | ||
63 | GPIO_PTS4, GPIO_PTS3, GPIO_PTS2, GPIO_PTS1, GPIO_PTS0, | ||
64 | |||
65 | /* PTT */ | ||
66 | GPIO_PTT4, GPIO_PTT3, GPIO_PTT2, GPIO_PTT1, GPIO_PTT0, | ||
67 | |||
68 | /* PTU */ | ||
69 | GPIO_PTU4, GPIO_PTU3, GPIO_PTU2, GPIO_PTU1, GPIO_PTU0, | ||
70 | |||
71 | /* PTV */ | ||
72 | GPIO_PTV4, GPIO_PTV3, GPIO_PTV2, GPIO_PTV1, GPIO_PTV0, | ||
73 | |||
74 | /* PTW */ | ||
75 | GPIO_PTW6, GPIO_PTW5, GPIO_PTW4, GPIO_PTW3, | ||
76 | GPIO_PTW2, GPIO_PTW1, GPIO_PTW0, | ||
77 | |||
78 | /* PTX */ | ||
79 | GPIO_PTX6, GPIO_PTX5, GPIO_PTX4, GPIO_PTX3, | ||
80 | GPIO_PTX2, GPIO_PTX1, GPIO_PTX0, | ||
81 | |||
82 | /* PTY */ | ||
83 | GPIO_PTY5, GPIO_PTY4, GPIO_PTY3, GPIO_PTY2, | ||
84 | GPIO_PTY1, GPIO_PTY0, | ||
85 | |||
86 | /* PTZ */ | ||
87 | GPIO_PTZ5, GPIO_PTZ4, GPIO_PTZ3, GPIO_PTZ2, GPIO_PTZ1, | ||
88 | |||
89 | /* SCIF0 */ | ||
90 | GPIO_FN_SCIF0_TXD, GPIO_FN_SCIF0_RXD, | ||
91 | GPIO_FN_SCIF0_RTS, GPIO_FN_SCIF0_CTS, GPIO_FN_SCIF0_SCK, | ||
92 | |||
93 | /* SCIF1 */ | ||
94 | GPIO_FN_SCIF1_TXD, GPIO_FN_SCIF1_RXD, | ||
95 | GPIO_FN_SCIF1_RTS, GPIO_FN_SCIF1_CTS, GPIO_FN_SCIF1_SCK, | ||
96 | |||
97 | /* SCIF2 */ | ||
98 | GPIO_FN_SCIF2_TXD, GPIO_FN_SCIF2_RXD, | ||
99 | GPIO_FN_SCIF2_RTS, GPIO_FN_SCIF2_CTS, GPIO_FN_SCIF2_SCK, | ||
100 | |||
101 | /* SIO */ | ||
102 | GPIO_FN_SIOTXD, GPIO_FN_SIORXD, | ||
103 | GPIO_FN_SIOD, GPIO_FN_SIOSTRB0, GPIO_FN_SIOSTRB1, | ||
104 | GPIO_FN_SIOSCK, GPIO_FN_SIOMCK, | ||
105 | |||
106 | /* CEU */ | ||
107 | GPIO_FN_VIO_D15, GPIO_FN_VIO_D14, GPIO_FN_VIO_D13, GPIO_FN_VIO_D12, | ||
108 | GPIO_FN_VIO_D11, GPIO_FN_VIO_D10, GPIO_FN_VIO_D9, GPIO_FN_VIO_D8, | ||
109 | GPIO_FN_VIO_D7, GPIO_FN_VIO_D6, GPIO_FN_VIO_D5, GPIO_FN_VIO_D4, | ||
110 | GPIO_FN_VIO_D3, GPIO_FN_VIO_D2, GPIO_FN_VIO_D1, GPIO_FN_VIO_D0, | ||
111 | GPIO_FN_VIO_FLD, GPIO_FN_VIO_CKO, GPIO_FN_VIO_STEX, GPIO_FN_VIO_STEM, | ||
112 | GPIO_FN_VIO_VD, GPIO_FN_VIO_HD, GPIO_FN_VIO_CLK, | ||
113 | GPIO_FN_VIO_VD2, GPIO_FN_VIO_HD2, GPIO_FN_VIO_CLK2, | ||
114 | |||
115 | /* LCDC */ | ||
116 | GPIO_FN_LCDD23, GPIO_FN_LCDD22, GPIO_FN_LCDD21, GPIO_FN_LCDD20, | ||
117 | GPIO_FN_LCDD19, GPIO_FN_LCDD18, GPIO_FN_LCDD17, GPIO_FN_LCDD16, | ||
118 | GPIO_FN_LCDD15, GPIO_FN_LCDD14, GPIO_FN_LCDD13, GPIO_FN_LCDD12, | ||
119 | GPIO_FN_LCDD11, GPIO_FN_LCDD10, GPIO_FN_LCDD9, GPIO_FN_LCDD8, | ||
120 | GPIO_FN_LCDD7, GPIO_FN_LCDD6, GPIO_FN_LCDD5, GPIO_FN_LCDD4, | ||
121 | GPIO_FN_LCDD3, GPIO_FN_LCDD2, GPIO_FN_LCDD1, GPIO_FN_LCDD0, | ||
122 | GPIO_FN_LCDLCLK, | ||
123 | /* Main LCD */ | ||
124 | GPIO_FN_LCDDON, GPIO_FN_LCDVCPWC, GPIO_FN_LCDVEPWC, GPIO_FN_LCDVSYN, | ||
125 | /* Main LCD - RGB Mode */ | ||
126 | GPIO_FN_LCDDCK, GPIO_FN_LCDHSYN, GPIO_FN_LCDDISP, | ||
127 | /* Main LCD - SYS Mode */ | ||
128 | GPIO_FN_LCDRS, GPIO_FN_LCDCS, GPIO_FN_LCDWR, GPIO_FN_LCDRD, | ||
129 | /* Sub LCD - SYS Mode */ | ||
130 | GPIO_FN_LCDDON2, GPIO_FN_LCDVCPWC2, GPIO_FN_LCDVEPWC2, | ||
131 | GPIO_FN_LCDVSYN2, GPIO_FN_LCDCS2, | ||
132 | |||
133 | /* BSC */ | ||
134 | GPIO_FN_IOIS16, GPIO_FN_A25, GPIO_FN_A24, GPIO_FN_A23, GPIO_FN_A22, | ||
135 | GPIO_FN_BS, GPIO_FN_CS6B_CE1B, GPIO_FN_WAIT, GPIO_FN_CS6A_CE2B, | ||
136 | |||
137 | /* SBSC */ | ||
138 | GPIO_FN_HPD63, GPIO_FN_HPD62, GPIO_FN_HPD61, GPIO_FN_HPD60, | ||
139 | GPIO_FN_HPD59, GPIO_FN_HPD58, GPIO_FN_HPD57, GPIO_FN_HPD56, | ||
140 | GPIO_FN_HPD55, GPIO_FN_HPD54, GPIO_FN_HPD53, GPIO_FN_HPD52, | ||
141 | GPIO_FN_HPD51, GPIO_FN_HPD50, GPIO_FN_HPD49, GPIO_FN_HPD48, | ||
142 | GPIO_FN_HPDQM7, GPIO_FN_HPDQM6, GPIO_FN_HPDQM5, GPIO_FN_HPDQM4, | ||
143 | |||
144 | /* IRQ */ | ||
145 | GPIO_FN_IRQ0, GPIO_FN_IRQ1, GPIO_FN_IRQ2, GPIO_FN_IRQ3, | ||
146 | GPIO_FN_IRQ4, GPIO_FN_IRQ5, GPIO_FN_IRQ6, GPIO_FN_IRQ7, | ||
147 | |||
148 | /* SDHI */ | ||
149 | GPIO_FN_SDHICD, GPIO_FN_SDHIWP, GPIO_FN_SDHID3, GPIO_FN_SDHID2, | ||
150 | GPIO_FN_SDHID1, GPIO_FN_SDHID0, GPIO_FN_SDHICMD, GPIO_FN_SDHICLK, | ||
151 | |||
152 | /* SIU - Port A */ | ||
153 | GPIO_FN_SIUAOLR, GPIO_FN_SIUAOBT, GPIO_FN_SIUAISLD, GPIO_FN_SIUAILR, | ||
154 | GPIO_FN_SIUAIBT, GPIO_FN_SIUAOSLD, GPIO_FN_SIUMCKA, GPIO_FN_SIUFCKA, | ||
155 | |||
156 | /* SIU - Port B */ | ||
157 | GPIO_FN_SIUBOLR, GPIO_FN_SIUBOBT, GPIO_FN_SIUBISLD, GPIO_FN_SIUBILR, | ||
158 | GPIO_FN_SIUBIBT, GPIO_FN_SIUBOSLD, GPIO_FN_SIUMCKB, GPIO_FN_SIUFCKB, | ||
159 | |||
160 | /* AUD */ | ||
161 | GPIO_FN_AUDSYNC, GPIO_FN_AUDATA3, GPIO_FN_AUDATA2, GPIO_FN_AUDATA1, | ||
162 | GPIO_FN_AUDATA0, | ||
163 | |||
164 | /* DMAC */ | ||
165 | GPIO_FN_DACK, GPIO_FN_DREQ0, | ||
166 | |||
167 | /* VOU */ | ||
168 | GPIO_FN_DV_CLKI, GPIO_FN_DV_CLK, GPIO_FN_DV_HSYNC, GPIO_FN_DV_VSYNC, | ||
169 | GPIO_FN_DV_D15, GPIO_FN_DV_D14, GPIO_FN_DV_D13, GPIO_FN_DV_D12, | ||
170 | GPIO_FN_DV_D11, GPIO_FN_DV_D10, GPIO_FN_DV_D9, GPIO_FN_DV_D8, | ||
171 | GPIO_FN_DV_D7, GPIO_FN_DV_D6, GPIO_FN_DV_D5, GPIO_FN_DV_D4, | ||
172 | GPIO_FN_DV_D3, GPIO_FN_DV_D2, GPIO_FN_DV_D1, GPIO_FN_DV_D0, | ||
173 | |||
174 | /* CPG */ | ||
175 | GPIO_FN_STATUS0, GPIO_FN_PDSTATUS, | ||
176 | |||
177 | /* SIOF0 */ | ||
178 | GPIO_FN_SIOF0_MCK, GPIO_FN_SIOF0_SCK, | ||
179 | GPIO_FN_SIOF0_SYNC, GPIO_FN_SIOF0_SS1, GPIO_FN_SIOF0_SS2, | ||
180 | GPIO_FN_SIOF0_TXD, GPIO_FN_SIOF0_RXD, | ||
181 | |||
182 | /* SIOF1 */ | ||
183 | GPIO_FN_SIOF1_MCK, GPIO_FN_SIOF1_SCK, | ||
184 | GPIO_FN_SIOF1_SYNC, GPIO_FN_SIOF1_SS1, GPIO_FN_SIOF1_SS2, | ||
185 | GPIO_FN_SIOF1_TXD, GPIO_FN_SIOF1_RXD, | ||
186 | |||
187 | /* SIM */ | ||
188 | GPIO_FN_SIM_D, GPIO_FN_SIM_CLK, GPIO_FN_SIM_RST, | ||
189 | |||
190 | /* TSIF */ | ||
191 | GPIO_FN_TS_SDAT, GPIO_FN_TS_SCK, GPIO_FN_TS_SDEN, GPIO_FN_TS_SPSYNC, | ||
192 | |||
193 | /* IRDA */ | ||
194 | GPIO_FN_IRDA_IN, GPIO_FN_IRDA_OUT, | ||
195 | |||
196 | /* TPU */ | ||
197 | GPIO_FN_TPUTO, | ||
198 | |||
199 | /* FLCTL */ | ||
200 | GPIO_FN_FCE, GPIO_FN_NAF7, GPIO_FN_NAF6, GPIO_FN_NAF5, GPIO_FN_NAF4, | ||
201 | GPIO_FN_NAF3, GPIO_FN_NAF2, GPIO_FN_NAF1, GPIO_FN_NAF0, GPIO_FN_FCDE, | ||
202 | GPIO_FN_FOE, GPIO_FN_FSC, GPIO_FN_FWE, GPIO_FN_FRB, | ||
203 | |||
204 | /* KEYSC */ | ||
205 | GPIO_FN_KEYIN0, GPIO_FN_KEYIN1, GPIO_FN_KEYIN2, GPIO_FN_KEYIN3, | ||
206 | GPIO_FN_KEYIN4, GPIO_FN_KEYOUT0, GPIO_FN_KEYOUT1, GPIO_FN_KEYOUT2, | ||
207 | GPIO_FN_KEYOUT3, GPIO_FN_KEYOUT4_IN6, GPIO_FN_KEYOUT5_IN5, | ||
208 | }; | ||
209 | |||
210 | #endif /* __ASM_SH7722_H__ */ | ||
diff --git a/arch/sh/include/cpu-sh4/cpu/sh7723.h b/arch/sh/include/cpu-sh4/cpu/sh7723.h new file mode 100644 index 000000000000..9d2f6d7aa938 --- /dev/null +++ b/arch/sh/include/cpu-sh4/cpu/sh7723.h | |||
@@ -0,0 +1,254 @@ | |||
1 | #ifndef __ASM_SH7723_H__ | ||
2 | #define __ASM_SH7723_H__ | ||
3 | |||
4 | enum { | ||
5 | /* PTA */ | ||
6 | GPIO_PTA7, GPIO_PTA6, GPIO_PTA5, GPIO_PTA4, | ||
7 | GPIO_PTA3, GPIO_PTA2, GPIO_PTA1, GPIO_PTA0, | ||
8 | |||
9 | /* PTB */ | ||
10 | GPIO_PTB7, GPIO_PTB6, GPIO_PTB5, GPIO_PTB4, | ||
11 | GPIO_PTB3, GPIO_PTB2, GPIO_PTB1, GPIO_PTB0, | ||
12 | |||
13 | /* PTC */ | ||
14 | GPIO_PTC7, GPIO_PTC6, GPIO_PTC5, GPIO_PTC4, | ||
15 | GPIO_PTC3, GPIO_PTC2, GPIO_PTC1, GPIO_PTC0, | ||
16 | |||
17 | /* PTD */ | ||
18 | GPIO_PTD7, GPIO_PTD6, GPIO_PTD5, GPIO_PTD4, | ||
19 | GPIO_PTD3, GPIO_PTD2, GPIO_PTD1, GPIO_PTD0, | ||
20 | |||
21 | /* PTE */ | ||
22 | GPIO_PTE5, GPIO_PTE4, GPIO_PTE3, GPIO_PTE2, | ||
23 | GPIO_PTE1, GPIO_PTE0, | ||
24 | |||
25 | /* PTF */ | ||
26 | GPIO_PTF7, GPIO_PTF6, GPIO_PTF5, GPIO_PTF4, | ||
27 | GPIO_PTF3, GPIO_PTF2, GPIO_PTF1, GPIO_PTF0, | ||
28 | |||
29 | /* PTG */ | ||
30 | GPIO_PTG5, GPIO_PTG4, GPIO_PTG3, GPIO_PTG2, | ||
31 | GPIO_PTG1, GPIO_PTG0, | ||
32 | |||
33 | /* PTH */ | ||
34 | GPIO_PTH7, GPIO_PTH6, GPIO_PTH5, GPIO_PTH4, | ||
35 | GPIO_PTH3, GPIO_PTH2, GPIO_PTH1, GPIO_PTH0, | ||
36 | |||
37 | /* PTJ */ | ||
38 | GPIO_PTJ7, GPIO_PTJ5, GPIO_PTJ3, GPIO_PTJ2, | ||
39 | GPIO_PTJ1, GPIO_PTJ0, | ||
40 | |||
41 | /* PTK */ | ||
42 | GPIO_PTK7, GPIO_PTK6, GPIO_PTK5, GPIO_PTK4, | ||
43 | GPIO_PTK3, GPIO_PTK2, GPIO_PTK1, GPIO_PTK0, | ||
44 | |||
45 | /* PTL */ | ||
46 | GPIO_PTL7, GPIO_PTL6, GPIO_PTL5, GPIO_PTL4, | ||
47 | GPIO_PTL3, GPIO_PTL2, GPIO_PTL1, GPIO_PTL0, | ||
48 | |||
49 | /* PTM */ | ||
50 | GPIO_PTM7, GPIO_PTM6, GPIO_PTM5, GPIO_PTM4, | ||
51 | GPIO_PTM3, GPIO_PTM2, GPIO_PTM1, GPIO_PTM0, | ||
52 | |||
53 | /* PTN */ | ||
54 | GPIO_PTN7, GPIO_PTN6, GPIO_PTN5, GPIO_PTN4, | ||
55 | GPIO_PTN3, GPIO_PTN2, GPIO_PTN1, GPIO_PTN0, | ||
56 | |||
57 | /* PTQ */ | ||
58 | GPIO_PTQ3, GPIO_PTQ2, GPIO_PTQ1, GPIO_PTQ0, | ||
59 | |||
60 | /* PTR */ | ||
61 | GPIO_PTR7, GPIO_PTR6, GPIO_PTR5, GPIO_PTR4, | ||
62 | GPIO_PTR3, GPIO_PTR2, GPIO_PTR1, GPIO_PTR0, | ||
63 | |||
64 | /* PTS */ | ||
65 | GPIO_PTS7, GPIO_PTS6, GPIO_PTS5, GPIO_PTS4, | ||
66 | GPIO_PTS3, GPIO_PTS2, GPIO_PTS1, GPIO_PTS0, | ||
67 | |||
68 | /* PTT */ | ||
69 | GPIO_PTT5, GPIO_PTT4, GPIO_PTT3, GPIO_PTT2, | ||
70 | GPIO_PTT1, GPIO_PTT0, | ||
71 | |||
72 | /* PTU */ | ||
73 | GPIO_PTU5, GPIO_PTU4, GPIO_PTU3, GPIO_PTU2, | ||
74 | GPIO_PTU1, GPIO_PTU0, | ||
75 | |||
76 | /* PTV */ | ||
77 | GPIO_PTV7, GPIO_PTV6, GPIO_PTV5, GPIO_PTV4, | ||
78 | GPIO_PTV3, GPIO_PTV2, GPIO_PTV1, GPIO_PTV0, | ||
79 | |||
80 | /* PTW */ | ||
81 | GPIO_PTW7, GPIO_PTW6, GPIO_PTW5, GPIO_PTW4, | ||
82 | GPIO_PTW3, GPIO_PTW2, GPIO_PTW1, GPIO_PTW0, | ||
83 | |||
84 | /* PTX */ | ||
85 | GPIO_PTX7, GPIO_PTX6, GPIO_PTX5, GPIO_PTX4, | ||
86 | GPIO_PTX3, GPIO_PTX2, GPIO_PTX1, GPIO_PTX0, | ||
87 | |||
88 | /* PTY */ | ||
89 | GPIO_PTY7, GPIO_PTY6, GPIO_PTY5, GPIO_PTY4, | ||
90 | GPIO_PTY3, GPIO_PTY2, GPIO_PTY1, GPIO_PTY0, | ||
91 | |||
92 | /* PTZ */ | ||
93 | GPIO_PTZ7, GPIO_PTZ6, GPIO_PTZ5, GPIO_PTZ4, | ||
94 | GPIO_PTZ3, GPIO_PTZ2, GPIO_PTZ1, GPIO_PTZ0, | ||
95 | |||
96 | /* SCIF0 (SCIF: 3 pin PTT/PTU) */ | ||
97 | GPIO_FN_SCIF0_PTT_TXD, GPIO_FN_SCIF0_PTT_RXD, GPIO_FN_SCIF0_PTT_SCK, | ||
98 | GPIO_FN_SCIF0_PTU_TXD, GPIO_FN_SCIF0_PTU_RXD, GPIO_FN_SCIF0_PTU_SCK, | ||
99 | |||
100 | /* SCIF1 (SCIF: 3 pin PTS/PTV) */ | ||
101 | GPIO_FN_SCIF1_PTS_TXD, GPIO_FN_SCIF1_PTS_RXD, GPIO_FN_SCIF1_PTS_SCK, | ||
102 | GPIO_FN_SCIF1_PTV_TXD, GPIO_FN_SCIF1_PTV_RXD, GPIO_FN_SCIF1_PTV_SCK, | ||
103 | |||
104 | /* SCIF2 (SCIF: 3 pin PTT/PTU) */ | ||
105 | GPIO_FN_SCIF2_PTT_TXD, GPIO_FN_SCIF2_PTT_RXD, GPIO_FN_SCIF2_PTT_SCK, | ||
106 | GPIO_FN_SCIF2_PTU_TXD, GPIO_FN_SCIF2_PTU_RXD, GPIO_FN_SCIF2_PTU_SCK, | ||
107 | |||
108 | /* SCIF3 (SCIFA: 5 pin PTS/PTV) */ | ||
109 | GPIO_FN_SCIF3_PTS_TXD, GPIO_FN_SCIF3_PTS_RXD, GPIO_FN_SCIF3_PTS_SCK, | ||
110 | GPIO_FN_SCIF3_PTS_RTS, GPIO_FN_SCIF3_PTS_CTS, | ||
111 | GPIO_FN_SCIF3_PTV_TXD, GPIO_FN_SCIF3_PTV_RXD, GPIO_FN_SCIF3_PTV_SCK, | ||
112 | GPIO_FN_SCIF3_PTV_RTS, GPIO_FN_SCIF3_PTV_CTS, | ||
113 | |||
114 | /* SCIF4 (SCIFA: 3 pin PTE/PTN) */ | ||
115 | GPIO_FN_SCIF4_PTE_TXD, GPIO_FN_SCIF4_PTE_RXD, GPIO_FN_SCIF4_PTE_SCK, | ||
116 | GPIO_FN_SCIF4_PTN_TXD, GPIO_FN_SCIF4_PTN_RXD, GPIO_FN_SCIF4_PTN_SCK, | ||
117 | |||
118 | /* SCIF5 (SCIFA: 3 pin PTE/PTN) */ | ||
119 | GPIO_FN_SCIF5_PTE_TXD, GPIO_FN_SCIF5_PTE_RXD, GPIO_FN_SCIF5_PTE_SCK, | ||
120 | GPIO_FN_SCIF5_PTN_TXD, GPIO_FN_SCIF5_PTN_RXD, GPIO_FN_SCIF5_PTN_SCK, | ||
121 | |||
122 | /* CEU */ | ||
123 | GPIO_FN_VIO_D15, GPIO_FN_VIO_D14, GPIO_FN_VIO_D13, GPIO_FN_VIO_D12, | ||
124 | GPIO_FN_VIO_D11, GPIO_FN_VIO_D10, GPIO_FN_VIO_D9, GPIO_FN_VIO_D8, | ||
125 | GPIO_FN_VIO_D7, GPIO_FN_VIO_D6, GPIO_FN_VIO_D5, GPIO_FN_VIO_D4, | ||
126 | GPIO_FN_VIO_D3, GPIO_FN_VIO_D2, GPIO_FN_VIO_D1, GPIO_FN_VIO_D0, | ||
127 | GPIO_FN_VIO_FLD, GPIO_FN_VIO_CKO, | ||
128 | GPIO_FN_VIO_VD1, GPIO_FN_VIO_HD1, GPIO_FN_VIO_CLK1, | ||
129 | GPIO_FN_VIO_VD2, GPIO_FN_VIO_HD2, GPIO_FN_VIO_CLK2, | ||
130 | |||
131 | /* LCDC */ | ||
132 | GPIO_FN_LCDD23, GPIO_FN_LCDD22, GPIO_FN_LCDD21, GPIO_FN_LCDD20, | ||
133 | GPIO_FN_LCDD19, GPIO_FN_LCDD18, GPIO_FN_LCDD17, GPIO_FN_LCDD16, | ||
134 | GPIO_FN_LCDD15, GPIO_FN_LCDD14, GPIO_FN_LCDD13, GPIO_FN_LCDD12, | ||
135 | GPIO_FN_LCDD11, GPIO_FN_LCDD10, GPIO_FN_LCDD9, GPIO_FN_LCDD8, | ||
136 | GPIO_FN_LCDD7, GPIO_FN_LCDD6, GPIO_FN_LCDD5, GPIO_FN_LCDD4, | ||
137 | GPIO_FN_LCDD3, GPIO_FN_LCDD2, GPIO_FN_LCDD1, GPIO_FN_LCDD0, | ||
138 | GPIO_FN_LCDLCLK_PTR, GPIO_FN_LCDLCLK_PTW, | ||
139 | /* Main LCD */ | ||
140 | GPIO_FN_LCDDON, GPIO_FN_LCDVCPWC, GPIO_FN_LCDVEPWC, GPIO_FN_LCDVSYN, | ||
141 | /* Main LCD - RGB Mode */ | ||
142 | GPIO_FN_LCDDCK, GPIO_FN_LCDHSYN, GPIO_FN_LCDDISP, | ||
143 | /* Main LCD - SYS Mode */ | ||
144 | GPIO_FN_LCDRS, GPIO_FN_LCDCS, GPIO_FN_LCDWR, GPIO_FN_LCDRD, | ||
145 | |||
146 | /* IRQ */ | ||
147 | GPIO_FN_IRQ0, GPIO_FN_IRQ1, GPIO_FN_IRQ2, GPIO_FN_IRQ3, | ||
148 | GPIO_FN_IRQ4, GPIO_FN_IRQ5, GPIO_FN_IRQ6, GPIO_FN_IRQ7, | ||
149 | |||
150 | /* AUD */ | ||
151 | GPIO_FN_AUDATA3, GPIO_FN_AUDATA2, GPIO_FN_AUDATA1, GPIO_FN_AUDATA0, | ||
152 | GPIO_FN_AUDCK, GPIO_FN_AUDSYNC, | ||
153 | |||
154 | /* SDHI0 (PTD) */ | ||
155 | GPIO_FN_SDHI0CD_PTD, GPIO_FN_SDHI0WP_PTD, | ||
156 | GPIO_FN_SDHI0D3_PTD, GPIO_FN_SDHI0D2_PTD, | ||
157 | GPIO_FN_SDHI0D1_PTD, GPIO_FN_SDHI0D0_PTD, | ||
158 | GPIO_FN_SDHI0CMD_PTD, GPIO_FN_SDHI0CLK_PTD, | ||
159 | |||
160 | /* SDHI0 (PTS) */ | ||
161 | GPIO_FN_SDHI0CD_PTS, GPIO_FN_SDHI0WP_PTS, | ||
162 | GPIO_FN_SDHI0D3_PTS, GPIO_FN_SDHI0D2_PTS, | ||
163 | GPIO_FN_SDHI0D1_PTS, GPIO_FN_SDHI0D0_PTS, | ||
164 | GPIO_FN_SDHI0CMD_PTS, GPIO_FN_SDHI0CLK_PTS, | ||
165 | |||
166 | /* SDHI1 */ | ||
167 | GPIO_FN_SDHI1CD, GPIO_FN_SDHI1WP, GPIO_FN_SDHI1D3, GPIO_FN_SDHI1D2, | ||
168 | GPIO_FN_SDHI1D1, GPIO_FN_SDHI1D0, GPIO_FN_SDHI1CMD, GPIO_FN_SDHI1CLK, | ||
169 | |||
170 | /* SIUA */ | ||
171 | GPIO_FN_SIUAFCK, GPIO_FN_SIUAILR, GPIO_FN_SIUAIBT, GPIO_FN_SIUAISLD, | ||
172 | GPIO_FN_SIUAOLR, GPIO_FN_SIUAOBT, GPIO_FN_SIUAOSLD, GPIO_FN_SIUAMCK, | ||
173 | GPIO_FN_SIUAISPD, GPIO_FN_SIUOSPD, | ||
174 | |||
175 | /* SIUB */ | ||
176 | GPIO_FN_SIUBFCK, GPIO_FN_SIUBILR, GPIO_FN_SIUBIBT, GPIO_FN_SIUBISLD, | ||
177 | GPIO_FN_SIUBOLR, GPIO_FN_SIUBOBT, GPIO_FN_SIUBOSLD, GPIO_FN_SIUBMCK, | ||
178 | |||
179 | /* IRDA */ | ||
180 | GPIO_FN_IRDA_IN, GPIO_FN_IRDA_OUT, | ||
181 | |||
182 | /* VOU */ | ||
183 | GPIO_FN_DV_CLKI, GPIO_FN_DV_CLK, GPIO_FN_DV_HSYNC, GPIO_FN_DV_VSYNC, | ||
184 | GPIO_FN_DV_D15, GPIO_FN_DV_D14, GPIO_FN_DV_D13, GPIO_FN_DV_D12, | ||
185 | GPIO_FN_DV_D11, GPIO_FN_DV_D10, GPIO_FN_DV_D9, GPIO_FN_DV_D8, | ||
186 | GPIO_FN_DV_D7, GPIO_FN_DV_D6, GPIO_FN_DV_D5, GPIO_FN_DV_D4, | ||
187 | GPIO_FN_DV_D3, GPIO_FN_DV_D2, GPIO_FN_DV_D1, GPIO_FN_DV_D0, | ||
188 | |||
189 | /* KEYSC */ | ||
190 | GPIO_FN_KEYIN0, GPIO_FN_KEYIN1, GPIO_FN_KEYIN2, GPIO_FN_KEYIN3, | ||
191 | GPIO_FN_KEYIN4, GPIO_FN_KEYOUT0, GPIO_FN_KEYOUT1, GPIO_FN_KEYOUT2, | ||
192 | GPIO_FN_KEYOUT3, GPIO_FN_KEYOUT4_IN6, GPIO_FN_KEYOUT5_IN5, | ||
193 | |||
194 | /* MSIOF0 (PTF) */ | ||
195 | GPIO_FN_MSIOF0_PTF_TXD, GPIO_FN_MSIOF0_PTF_RXD, GPIO_FN_MSIOF0_PTF_MCK, | ||
196 | GPIO_FN_MSIOF0_PTF_TSYNC, GPIO_FN_MSIOF0_PTF_TSCK, | ||
197 | GPIO_FN_MSIOF0_PTF_RSYNC, GPIO_FN_MSIOF0_PTF_RSCK, | ||
198 | GPIO_FN_MSIOF0_PTF_SS1, GPIO_FN_MSIOF0_PTF_SS2, | ||
199 | |||
200 | /* MSIOF0 (PTT+PTX) */ | ||
201 | GPIO_FN_MSIOF0_PTT_TXD, GPIO_FN_MSIOF0_PTT_RXD, GPIO_FN_MSIOF0_PTX_MCK, | ||
202 | GPIO_FN_MSIOF0_PTT_TSYNC, GPIO_FN_MSIOF0_PTT_TSCK, | ||
203 | GPIO_FN_MSIOF0_PTT_RSYNC, GPIO_FN_MSIOF0_PTT_RSCK, | ||
204 | GPIO_FN_MSIOF0_PTT_SS1, GPIO_FN_MSIOF0_PTT_SS2, | ||
205 | |||
206 | /* MSIOF1 */ | ||
207 | GPIO_FN_MSIOF1_TXD, GPIO_FN_MSIOF1_RXD, GPIO_FN_MSIOF1_MCK, | ||
208 | GPIO_FN_MSIOF1_TSYNC, GPIO_FN_MSIOF1_TSCK, | ||
209 | GPIO_FN_MSIOF1_RSYNC, GPIO_FN_MSIOF1_RSCK, | ||
210 | GPIO_FN_MSIOF1_SS1, GPIO_FN_MSIOF1_SS2, | ||
211 | |||
212 | /* TSIF */ | ||
213 | GPIO_FN_TS0_SDAT, GPIO_FN_TS0_SCK, GPIO_FN_TS0_SDEN, GPIO_FN_TS0_SPSYNC, | ||
214 | |||
215 | /* FLCTL */ | ||
216 | GPIO_FN_FCE, GPIO_FN_NAF7, GPIO_FN_NAF6, GPIO_FN_NAF5, GPIO_FN_NAF4, | ||
217 | GPIO_FN_NAF3, GPIO_FN_NAF2, GPIO_FN_NAF1, GPIO_FN_NAF0, GPIO_FN_FCDE, | ||
218 | GPIO_FN_FOE, GPIO_FN_FSC, GPIO_FN_FWE, GPIO_FN_FRB, | ||
219 | |||
220 | /* DMAC */ | ||
221 | GPIO_FN_DACK1, GPIO_FN_DREQ1, GPIO_FN_DACK0, GPIO_FN_DREQ0, | ||
222 | |||
223 | /* ADC */ | ||
224 | GPIO_FN_AN3, GPIO_FN_AN2, GPIO_FN_AN1, GPIO_FN_AN0, GPIO_FN_ADTRG, | ||
225 | |||
226 | /* CPG */ | ||
227 | GPIO_FN_STATUS0, GPIO_FN_PDSTATUS, | ||
228 | |||
229 | /* TPU */ | ||
230 | GPIO_FN_TPUTO3, GPIO_FN_TPUTO2, GPIO_FN_TPUTO1, GPIO_FN_TPUTO0, | ||
231 | |||
232 | /* BSC */ | ||
233 | GPIO_FN_D31, GPIO_FN_D30, GPIO_FN_D29, GPIO_FN_D28, | ||
234 | GPIO_FN_D27, GPIO_FN_D26, GPIO_FN_D25, GPIO_FN_D24, | ||
235 | GPIO_FN_D23, GPIO_FN_D22, GPIO_FN_D21, GPIO_FN_D20, | ||
236 | GPIO_FN_D19, GPIO_FN_D18, GPIO_FN_D17, GPIO_FN_D16, | ||
237 | GPIO_FN_IOIS16, GPIO_FN_WAIT, GPIO_FN_BS, | ||
238 | GPIO_FN_A25, GPIO_FN_A24, GPIO_FN_A23, GPIO_FN_A22, | ||
239 | GPIO_FN_CS6B_CE1B, GPIO_FN_CS6A_CE2B, | ||
240 | GPIO_FN_CS5B_CE1A, GPIO_FN_CS5A_CE2A, | ||
241 | GPIO_FN_WE3_ICIOWR, GPIO_FN_WE2_ICIORD, | ||
242 | |||
243 | /* ATAPI */ | ||
244 | GPIO_FN_IDED15, GPIO_FN_IDED14, GPIO_FN_IDED13, GPIO_FN_IDED12, | ||
245 | GPIO_FN_IDED11, GPIO_FN_IDED10, GPIO_FN_IDED9, GPIO_FN_IDED8, | ||
246 | GPIO_FN_IDED7, GPIO_FN_IDED6, GPIO_FN_IDED5, GPIO_FN_IDED4, | ||
247 | GPIO_FN_IDED3, GPIO_FN_IDED2, GPIO_FN_IDED1, GPIO_FN_IDED0, | ||
248 | GPIO_FN_DIRECTION, GPIO_FN_EXBUF_ENB, GPIO_FN_IDERST, GPIO_FN_IODACK, | ||
249 | GPIO_FN_IODREQ, GPIO_FN_IDEIORDY, GPIO_FN_IDEINT, GPIO_FN_IDEIOWR, | ||
250 | GPIO_FN_IDEIORD, GPIO_FN_IDECS1, GPIO_FN_IDECS0, GPIO_FN_IDEA2, | ||
251 | GPIO_FN_IDEA1, GPIO_FN_IDEA0, | ||
252 | }; | ||
253 | |||
254 | #endif /* __ASM_SH7723_H__ */ | ||
diff --git a/arch/sh/include/asm/edosk7705.h b/arch/sh/include/mach-common/mach/edosk7705.h index 5bdc9d9be3de..5bdc9d9be3de 100644 --- a/arch/sh/include/asm/edosk7705.h +++ b/arch/sh/include/mach-common/mach/edosk7705.h | |||
diff --git a/arch/sh/include/asm/r7780rp.h b/arch/sh/include/mach-common/mach/highlander.h index 306f7359f7d4..306f7359f7d4 100644 --- a/arch/sh/include/asm/r7780rp.h +++ b/arch/sh/include/mach-common/mach/highlander.h | |||
diff --git a/arch/sh/include/asm/hp6xx.h b/arch/sh/include/mach-common/mach/hp6xx.h index 0d4165a32dcd..0d4165a32dcd 100644 --- a/arch/sh/include/asm/hp6xx.h +++ b/arch/sh/include/mach-common/mach/hp6xx.h | |||
diff --git a/arch/sh/include/asm/lboxre2.h b/arch/sh/include/mach-common/mach/lboxre2.h index e6d160504923..e6d160504923 100644 --- a/arch/sh/include/asm/lboxre2.h +++ b/arch/sh/include/mach-common/mach/lboxre2.h | |||
diff --git a/arch/sh/include/asm/magicpanelr2.h b/arch/sh/include/mach-common/mach/magicpanelr2.h index c644a77ee357..c644a77ee357 100644 --- a/arch/sh/include/asm/magicpanelr2.h +++ b/arch/sh/include/mach-common/mach/magicpanelr2.h | |||
diff --git a/arch/sh/include/asm/microdev.h b/arch/sh/include/mach-common/mach/microdev.h index 1aed15856e11..1aed15856e11 100644 --- a/arch/sh/include/asm/microdev.h +++ b/arch/sh/include/mach-common/mach/microdev.h | |||
diff --git a/arch/sh/include/asm/migor.h b/arch/sh/include/mach-common/mach/migor.h index c12b632c540b..e451f0229e00 100644 --- a/arch/sh/include/asm/migor.h +++ b/arch/sh/include/mach-common/mach/migor.h | |||
@@ -52,9 +52,11 @@ | |||
52 | #define PORT_HIZCRB 0xa405015a | 52 | #define PORT_HIZCRB 0xa405015a |
53 | #define PORT_HIZCRC 0xa405015c | 53 | #define PORT_HIZCRC 0xa405015c |
54 | 54 | ||
55 | #define BSC_CS4BCR 0xfec10010 | ||
55 | #define BSC_CS6ABCR 0xfec1001c | 56 | #define BSC_CS6ABCR 0xfec1001c |
57 | #define BSC_CS4WCR 0xfec10030 | ||
56 | 58 | ||
57 | #include <asm/sh_mobile_lcdc.h> | 59 | #include <video/sh_mobile_lcdc.h> |
58 | 60 | ||
59 | int migor_lcd_qvga_setup(void *board_data, void *sys_ops_handle, | 61 | int migor_lcd_qvga_setup(void *board_data, void *sys_ops_handle, |
60 | struct sh_mobile_lcdc_sys_bus_ops *sys_ops); | 62 | struct sh_mobile_lcdc_sys_bus_ops *sys_ops); |
diff --git a/arch/sh/include/asm/rts7751r2d.h b/arch/sh/include/mach-common/mach/r2d.h index 0a800157b826..0a800157b826 100644 --- a/arch/sh/include/asm/rts7751r2d.h +++ b/arch/sh/include/mach-common/mach/r2d.h | |||
diff --git a/arch/sh/include/asm/sdk7780.h b/arch/sh/include/mach-common/mach/sdk7780.h index 697dc865f21b..697dc865f21b 100644 --- a/arch/sh/include/asm/sdk7780.h +++ b/arch/sh/include/mach-common/mach/sdk7780.h | |||
diff --git a/arch/sh/include/asm/sh7763rdp.h b/arch/sh/include/mach-common/mach/sh7763rdp.h index 8750cc852977..8750cc852977 100644 --- a/arch/sh/include/asm/sh7763rdp.h +++ b/arch/sh/include/mach-common/mach/sh7763rdp.h | |||
diff --git a/arch/sh/include/asm/sh7785lcr.h b/arch/sh/include/mach-common/mach/sh7785lcr.h index 1ce27d5c7491..1ce27d5c7491 100644 --- a/arch/sh/include/asm/sh7785lcr.h +++ b/arch/sh/include/mach-common/mach/sh7785lcr.h | |||
diff --git a/arch/sh/include/asm/shmin.h b/arch/sh/include/mach-common/mach/shmin.h index 36ba138a81fb..36ba138a81fb 100644 --- a/arch/sh/include/asm/shmin.h +++ b/arch/sh/include/mach-common/mach/shmin.h | |||
diff --git a/arch/sh/include/asm/snapgear.h b/arch/sh/include/mach-common/mach/snapgear.h index 042d95f51c4d..042d95f51c4d 100644 --- a/arch/sh/include/asm/snapgear.h +++ b/arch/sh/include/mach-common/mach/snapgear.h | |||
diff --git a/arch/sh/include/asm/systemh7751.h b/arch/sh/include/mach-common/mach/systemh7751.h index 4161122c84ef..4161122c84ef 100644 --- a/arch/sh/include/asm/systemh7751.h +++ b/arch/sh/include/mach-common/mach/systemh7751.h | |||
diff --git a/arch/sh/include/asm/titan.h b/arch/sh/include/mach-common/mach/titan.h index 03f3583c8918..03f3583c8918 100644 --- a/arch/sh/include/asm/titan.h +++ b/arch/sh/include/mach-common/mach/titan.h | |||