diff options
Diffstat (limited to 'arch/sh/kernel/cpu/sh3')
-rw-r--r-- | arch/sh/kernel/cpu/sh3/Makefile | 2 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh3/clock-sh7712.c | 71 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh3/entry.S | 24 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh3/ex.S | 2 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh3/probe.c | 9 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh3/setup-sh7705.c | 10 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh3/setup-sh770x.c | 11 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh3/setup-sh7710.c | 16 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh3/setup-sh7720.c | 78 |
9 files changed, 173 insertions, 50 deletions
diff --git a/arch/sh/kernel/cpu/sh3/Makefile b/arch/sh/kernel/cpu/sh3/Makefile index 646eb693361..3ae4d9111f1 100644 --- a/arch/sh/kernel/cpu/sh3/Makefile +++ b/arch/sh/kernel/cpu/sh3/Makefile | |||
@@ -13,6 +13,7 @@ obj-$(CONFIG_CPU_SUBTYPE_SH7709) += setup-sh770x.o | |||
13 | obj-$(CONFIG_CPU_SUBTYPE_SH7710) += setup-sh7710.o | 13 | obj-$(CONFIG_CPU_SUBTYPE_SH7710) += setup-sh7710.o |
14 | obj-$(CONFIG_CPU_SUBTYPE_SH7712) += setup-sh7710.o | 14 | obj-$(CONFIG_CPU_SUBTYPE_SH7712) += setup-sh7710.o |
15 | obj-$(CONFIG_CPU_SUBTYPE_SH7720) += setup-sh7720.o | 15 | obj-$(CONFIG_CPU_SUBTYPE_SH7720) += setup-sh7720.o |
16 | obj-$(CONFIG_CPU_SUBTYPE_SH7721) += setup-sh7720.o | ||
16 | 17 | ||
17 | # Primary on-chip clocks (common) | 18 | # Primary on-chip clocks (common) |
18 | clock-$(CONFIG_CPU_SH3) := clock-sh3.o | 19 | clock-$(CONFIG_CPU_SH3) := clock-sh3.o |
@@ -21,5 +22,6 @@ clock-$(CONFIG_CPU_SUBTYPE_SH7706) := clock-sh7706.o | |||
21 | clock-$(CONFIG_CPU_SUBTYPE_SH7709) := clock-sh7709.o | 22 | clock-$(CONFIG_CPU_SUBTYPE_SH7709) := clock-sh7709.o |
22 | clock-$(CONFIG_CPU_SUBTYPE_SH7710) := clock-sh7710.o | 23 | clock-$(CONFIG_CPU_SUBTYPE_SH7710) := clock-sh7710.o |
23 | clock-$(CONFIG_CPU_SUBTYPE_SH7720) := clock-sh7710.o | 24 | clock-$(CONFIG_CPU_SUBTYPE_SH7720) := clock-sh7710.o |
25 | clock-$(CONFIG_CPU_SUBTYPE_SH7712) := clock-sh7712.o | ||
24 | 26 | ||
25 | obj-y += $(clock-y) | 27 | obj-y += $(clock-y) |
diff --git a/arch/sh/kernel/cpu/sh3/clock-sh7712.c b/arch/sh/kernel/cpu/sh3/clock-sh7712.c new file mode 100644 index 00000000000..54f54df51ef --- /dev/null +++ b/arch/sh/kernel/cpu/sh3/clock-sh7712.c | |||
@@ -0,0 +1,71 @@ | |||
1 | /* | ||
2 | * arch/sh/kernel/cpu/sh3/clock-sh7712.c | ||
3 | * | ||
4 | * SH7712 support for the clock framework | ||
5 | * | ||
6 | * Copyright (C) 2007 Andrew Murray <amurray@mpc-data.co.uk> | ||
7 | * | ||
8 | * Based on arch/sh/kernel/cpu/sh3/clock-sh3.c | ||
9 | * Copyright (C) 2005 Paul Mundt | ||
10 | * | ||
11 | * This file is subject to the terms and conditions of the GNU General Public | ||
12 | * License. See the file "COPYING" in the main directory of this archive | ||
13 | * for more details. | ||
14 | */ | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/kernel.h> | ||
17 | #include <asm/clock.h> | ||
18 | #include <asm/freq.h> | ||
19 | #include <asm/io.h> | ||
20 | |||
21 | static int multipliers[] = { 1, 2, 3 }; | ||
22 | static int divisors[] = { 1, 2, 3, 4, 6 }; | ||
23 | |||
24 | static void master_clk_init(struct clk *clk) | ||
25 | { | ||
26 | int frqcr = ctrl_inw(FRQCR); | ||
27 | int idx = (frqcr & 0x0300) >> 8; | ||
28 | |||
29 | clk->rate *= multipliers[idx]; | ||
30 | } | ||
31 | |||
32 | static struct clk_ops sh7712_master_clk_ops = { | ||
33 | .init = master_clk_init, | ||
34 | }; | ||
35 | |||
36 | static void module_clk_recalc(struct clk *clk) | ||
37 | { | ||
38 | int frqcr = ctrl_inw(FRQCR); | ||
39 | int idx = frqcr & 0x0007; | ||
40 | |||
41 | clk->rate = clk->parent->rate / divisors[idx]; | ||
42 | } | ||
43 | |||
44 | static struct clk_ops sh7712_module_clk_ops = { | ||
45 | .recalc = module_clk_recalc, | ||
46 | }; | ||
47 | |||
48 | static void cpu_clk_recalc(struct clk *clk) | ||
49 | { | ||
50 | int frqcr = ctrl_inw(FRQCR); | ||
51 | int idx = (frqcr & 0x0030) >> 4; | ||
52 | |||
53 | clk->rate = clk->parent->rate / divisors[idx]; | ||
54 | } | ||
55 | |||
56 | static struct clk_ops sh7712_cpu_clk_ops = { | ||
57 | .recalc = cpu_clk_recalc, | ||
58 | }; | ||
59 | |||
60 | static struct clk_ops *sh7712_clk_ops[] = { | ||
61 | &sh7712_master_clk_ops, | ||
62 | &sh7712_module_clk_ops, | ||
63 | &sh7712_cpu_clk_ops, | ||
64 | }; | ||
65 | |||
66 | void __init arch_init_clk_ops(struct clk_ops **ops, int idx) | ||
67 | { | ||
68 | if (idx < ARRAY_SIZE(sh7712_clk_ops)) | ||
69 | *ops = sh7712_clk_ops[idx]; | ||
70 | } | ||
71 | |||
diff --git a/arch/sh/kernel/cpu/sh3/entry.S b/arch/sh/kernel/cpu/sh3/entry.S index 0d12a124055..4004073f98c 100644 --- a/arch/sh/kernel/cpu/sh3/entry.S +++ b/arch/sh/kernel/cpu/sh3/entry.S | |||
@@ -13,8 +13,9 @@ | |||
13 | #include <linux/linkage.h> | 13 | #include <linux/linkage.h> |
14 | #include <asm/asm-offsets.h> | 14 | #include <asm/asm-offsets.h> |
15 | #include <asm/thread_info.h> | 15 | #include <asm/thread_info.h> |
16 | #include <asm/cpu/mmu_context.h> | ||
17 | #include <asm/unistd.h> | 16 | #include <asm/unistd.h> |
17 | #include <asm/cpu/mmu_context.h> | ||
18 | #include <asm/page.h> | ||
18 | 19 | ||
19 | ! NOTE: | 20 | ! NOTE: |
20 | ! GNU as (as of 2.9.1) changes bf/s into bt/s and bra, when the address | 21 | ! GNU as (as of 2.9.1) changes bf/s into bt/s and bra, when the address |
@@ -409,6 +410,27 @@ ENTRY(handle_exception) | |||
409 | ! Using k0, k1 for scratch registers (r0_bank1, r1_bank), | 410 | ! Using k0, k1 for scratch registers (r0_bank1, r1_bank), |
410 | ! save all registers onto stack. | 411 | ! save all registers onto stack. |
411 | ! | 412 | ! |
413 | |||
414 | #ifdef CONFIG_GUSA | ||
415 | ! Check for roll back gRB (User and Kernel) | ||
416 | mov r15, k0 | ||
417 | shll k0 | ||
418 | bf/s 1f | ||
419 | shll k0 | ||
420 | bf/s 1f | ||
421 | stc spc, k1 | ||
422 | stc r0_bank, k0 | ||
423 | cmp/hs k0, k1 ! test k1 (saved PC) >= k0 (saved r0) | ||
424 | bt/s 2f | ||
425 | stc r1_bank, k1 | ||
426 | |||
427 | add #-2, k0 | ||
428 | add r15, k0 | ||
429 | ldc k0, spc ! PC = saved r0 + r15 - 2 | ||
430 | 2: mov k1, r15 ! SP = r1 | ||
431 | 1: | ||
432 | #endif | ||
433 | |||
412 | stc ssr, k0 ! Is it from kernel space? | 434 | stc ssr, k0 ! Is it from kernel space? |
413 | shll k0 ! Check MD bit (bit30) by shifting it into... | 435 | shll k0 ! Check MD bit (bit30) by shifting it into... |
414 | shll k0 ! ...the T bit | 436 | shll k0 ! ...the T bit |
diff --git a/arch/sh/kernel/cpu/sh3/ex.S b/arch/sh/kernel/cpu/sh3/ex.S index b6abf38d3a8..11b6d9c6eda 100644 --- a/arch/sh/kernel/cpu/sh3/ex.S +++ b/arch/sh/kernel/cpu/sh3/ex.S | |||
@@ -36,7 +36,7 @@ ENTRY(exception_handling_table) | |||
36 | .long exception_error ! address error store /* 100 */ | 36 | .long exception_error ! address error store /* 100 */ |
37 | #endif | 37 | #endif |
38 | #if defined(CONFIG_SH_FPU) | 38 | #if defined(CONFIG_SH_FPU) |
39 | .long do_fpu_error /* 120 */ | 39 | .long fpu_error_trap_handler /* 120 */ |
40 | #else | 40 | #else |
41 | .long exception_error /* 120 */ | 41 | .long exception_error /* 120 */ |
42 | #endif | 42 | #endif |
diff --git a/arch/sh/kernel/cpu/sh3/probe.c b/arch/sh/kernel/cpu/sh3/probe.c index bf579e061e0..fcc80bb7bee 100644 --- a/arch/sh/kernel/cpu/sh3/probe.c +++ b/arch/sh/kernel/cpu/sh3/probe.c | |||
@@ -16,11 +16,11 @@ | |||
16 | #include <asm/cache.h> | 16 | #include <asm/cache.h> |
17 | #include <asm/io.h> | 17 | #include <asm/io.h> |
18 | 18 | ||
19 | int __init detect_cpu_and_cache_system(void) | 19 | int __uses_jump_to_uncached detect_cpu_and_cache_system(void) |
20 | { | 20 | { |
21 | unsigned long addr0, addr1, data0, data1, data2, data3; | 21 | unsigned long addr0, addr1, data0, data1, data2, data3; |
22 | 22 | ||
23 | jump_to_P2(); | 23 | jump_to_uncached(); |
24 | /* | 24 | /* |
25 | * Check if the entry shadows or not. | 25 | * Check if the entry shadows or not. |
26 | * When shadowed, it's 128-entry system. | 26 | * When shadowed, it's 128-entry system. |
@@ -48,7 +48,7 @@ int __init detect_cpu_and_cache_system(void) | |||
48 | ctrl_outl(data0&~SH_CACHE_VALID, addr0); | 48 | ctrl_outl(data0&~SH_CACHE_VALID, addr0); |
49 | ctrl_outl(data2&~SH_CACHE_VALID, addr1); | 49 | ctrl_outl(data2&~SH_CACHE_VALID, addr1); |
50 | 50 | ||
51 | back_to_P1(); | 51 | back_to_cached(); |
52 | 52 | ||
53 | boot_cpu_data.dcache.ways = 4; | 53 | boot_cpu_data.dcache.ways = 4; |
54 | boot_cpu_data.dcache.entry_shift = 4; | 54 | boot_cpu_data.dcache.entry_shift = 4; |
@@ -84,6 +84,9 @@ int __init detect_cpu_and_cache_system(void) | |||
84 | #if defined(CONFIG_CPU_SUBTYPE_SH7720) | 84 | #if defined(CONFIG_CPU_SUBTYPE_SH7720) |
85 | boot_cpu_data.type = CPU_SH7720; | 85 | boot_cpu_data.type = CPU_SH7720; |
86 | #endif | 86 | #endif |
87 | #if defined(CONFIG_CPU_SUBTYPE_SH7721) | ||
88 | boot_cpu_data.type = CPU_SH7721; | ||
89 | #endif | ||
87 | #if defined(CONFIG_CPU_SUBTYPE_SH7705) | 90 | #if defined(CONFIG_CPU_SUBTYPE_SH7705) |
88 | boot_cpu_data.type = CPU_SH7705; | 91 | boot_cpu_data.type = CPU_SH7705; |
89 | 92 | ||
diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7705.c b/arch/sh/kernel/cpu/sh3/setup-sh7705.c index f6c65f2659e..dd0a20a685f 100644 --- a/arch/sh/kernel/cpu/sh3/setup-sh7705.c +++ b/arch/sh/kernel/cpu/sh3/setup-sh7705.c | |||
@@ -66,12 +66,6 @@ static struct intc_group groups[] __initdata = { | |||
66 | INTC_GROUP(SCIF2, SCIF2_ERI, SCIF2_RXI, SCIF2_TXI), | 66 | INTC_GROUP(SCIF2, SCIF2_ERI, SCIF2_RXI, SCIF2_TXI), |
67 | }; | 67 | }; |
68 | 68 | ||
69 | static struct intc_prio priorities[] __initdata = { | ||
70 | INTC_PRIO(DMAC, 7), | ||
71 | INTC_PRIO(SCIF2, 3), | ||
72 | INTC_PRIO(SCIF0, 3), | ||
73 | }; | ||
74 | |||
75 | static struct intc_prio_reg prio_registers[] __initdata = { | 69 | static struct intc_prio_reg prio_registers[] __initdata = { |
76 | { 0xfffffee2, 0, 16, 4, /* IPRA */ { TMU0, TMU1, TMU2, RTC } }, | 70 | { 0xfffffee2, 0, 16, 4, /* IPRA */ { TMU0, TMU1, TMU2, RTC } }, |
77 | { 0xfffffee4, 0, 16, 4, /* IPRB */ { WDT, REF_RCMI, 0, 0 } }, | 71 | { 0xfffffee4, 0, 16, 4, /* IPRB */ { WDT, REF_RCMI, 0, 0 } }, |
@@ -85,7 +79,7 @@ static struct intc_prio_reg prio_registers[] __initdata = { | |||
85 | }; | 79 | }; |
86 | 80 | ||
87 | static DECLARE_INTC_DESC(intc_desc, "sh7705", vectors, groups, | 81 | static DECLARE_INTC_DESC(intc_desc, "sh7705", vectors, groups, |
88 | priorities, NULL, prio_registers, NULL); | 82 | NULL, prio_registers, NULL); |
89 | 83 | ||
90 | static struct intc_vect vectors_irq[] __initdata = { | 84 | static struct intc_vect vectors_irq[] __initdata = { |
91 | INTC_VECT(IRQ0, 0x600), INTC_VECT(IRQ1, 0x620), | 85 | INTC_VECT(IRQ0, 0x600), INTC_VECT(IRQ1, 0x620), |
@@ -93,7 +87,7 @@ static struct intc_vect vectors_irq[] __initdata = { | |||
93 | }; | 87 | }; |
94 | 88 | ||
95 | static DECLARE_INTC_DESC(intc_desc_irq, "sh7705-irq", vectors_irq, NULL, | 89 | static DECLARE_INTC_DESC(intc_desc_irq, "sh7705-irq", vectors_irq, NULL, |
96 | priorities, NULL, prio_registers, NULL); | 90 | NULL, prio_registers, NULL); |
97 | 91 | ||
98 | static struct plat_sci_port sci_platform_data[] = { | 92 | static struct plat_sci_port sci_platform_data[] = { |
99 | { | 93 | { |
diff --git a/arch/sh/kernel/cpu/sh3/setup-sh770x.c b/arch/sh/kernel/cpu/sh3/setup-sh770x.c index 60b04b1f945..969804bb523 100644 --- a/arch/sh/kernel/cpu/sh3/setup-sh770x.c +++ b/arch/sh/kernel/cpu/sh3/setup-sh770x.c | |||
@@ -81,13 +81,6 @@ static struct intc_group groups[] __initdata = { | |||
81 | INTC_GROUP(SCIF2, SCIF2_ERI, SCIF2_RXI, SCIF2_BRI, SCIF2_TXI), | 81 | INTC_GROUP(SCIF2, SCIF2_ERI, SCIF2_RXI, SCIF2_BRI, SCIF2_TXI), |
82 | }; | 82 | }; |
83 | 83 | ||
84 | static struct intc_prio priorities[] __initdata = { | ||
85 | INTC_PRIO(DMAC, 7), | ||
86 | INTC_PRIO(SCI, 3), | ||
87 | INTC_PRIO(SCIF2, 3), | ||
88 | INTC_PRIO(SCIF0, 3), | ||
89 | }; | ||
90 | |||
91 | static struct intc_prio_reg prio_registers[] __initdata = { | 84 | static struct intc_prio_reg prio_registers[] __initdata = { |
92 | { 0xfffffee2, 0, 16, 4, /* IPRA */ { TMU0, TMU1, TMU2, RTC } }, | 85 | { 0xfffffee2, 0, 16, 4, /* IPRA */ { TMU0, TMU1, TMU2, RTC } }, |
93 | { 0xfffffee4, 0, 16, 4, /* IPRB */ { WDT, REF, SCI, 0 } }, | 86 | { 0xfffffee4, 0, 16, 4, /* IPRB */ { WDT, REF, SCI, 0 } }, |
@@ -109,7 +102,7 @@ static struct intc_prio_reg prio_registers[] __initdata = { | |||
109 | }; | 102 | }; |
110 | 103 | ||
111 | static DECLARE_INTC_DESC(intc_desc, "sh770x", vectors, groups, | 104 | static DECLARE_INTC_DESC(intc_desc, "sh770x", vectors, groups, |
112 | priorities, NULL, prio_registers, NULL); | 105 | NULL, prio_registers, NULL); |
113 | 106 | ||
114 | #if defined(CONFIG_CPU_SUBTYPE_SH7706) || \ | 107 | #if defined(CONFIG_CPU_SUBTYPE_SH7706) || \ |
115 | defined(CONFIG_CPU_SUBTYPE_SH7707) || \ | 108 | defined(CONFIG_CPU_SUBTYPE_SH7707) || \ |
@@ -120,7 +113,7 @@ static struct intc_vect vectors_irq[] __initdata = { | |||
120 | }; | 113 | }; |
121 | 114 | ||
122 | static DECLARE_INTC_DESC(intc_desc_irq, "sh770x-irq", vectors_irq, NULL, | 115 | static DECLARE_INTC_DESC(intc_desc_irq, "sh770x-irq", vectors_irq, NULL, |
123 | priorities, NULL, prio_registers, NULL); | 116 | NULL, prio_registers, NULL); |
124 | #endif | 117 | #endif |
125 | 118 | ||
126 | static struct resource rtc_resources[] = { | 119 | static struct resource rtc_resources[] = { |
diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7710.c b/arch/sh/kernel/cpu/sh3/setup-sh7710.c index 84e5629fa84..0cc0e2bf135 100644 --- a/arch/sh/kernel/cpu/sh3/setup-sh7710.c +++ b/arch/sh/kernel/cpu/sh3/setup-sh7710.c | |||
@@ -73,18 +73,6 @@ static struct intc_group groups[] __initdata = { | |||
73 | INTC_GROUP(SIOF1, SIOF1_ERI, SIOF1_TXI, SIOF1_RXI, SIOF1_CCI), | 73 | INTC_GROUP(SIOF1, SIOF1_ERI, SIOF1_TXI, SIOF1_RXI, SIOF1_CCI), |
74 | }; | 74 | }; |
75 | 75 | ||
76 | static struct intc_prio priorities[] __initdata = { | ||
77 | INTC_PRIO(DMAC1, 7), | ||
78 | INTC_PRIO(DMAC2, 7), | ||
79 | INTC_PRIO(SCIF0, 3), | ||
80 | INTC_PRIO(SCIF1, 3), | ||
81 | INTC_PRIO(SIOF0, 3), | ||
82 | INTC_PRIO(SIOF1, 3), | ||
83 | INTC_PRIO(EDMAC0, 5), | ||
84 | INTC_PRIO(EDMAC1, 5), | ||
85 | INTC_PRIO(EDMAC2, 5), | ||
86 | }; | ||
87 | |||
88 | static struct intc_prio_reg prio_registers[] __initdata = { | 76 | static struct intc_prio_reg prio_registers[] __initdata = { |
89 | { 0xfffffee2, 0, 16, 4, /* IPRA */ { TMU0, TMU1, TMU2, RTC } }, | 77 | { 0xfffffee2, 0, 16, 4, /* IPRA */ { TMU0, TMU1, TMU2, RTC } }, |
90 | { 0xfffffee4, 0, 16, 4, /* IPRB */ { WDT, REF, 0, 0 } }, | 78 | { 0xfffffee4, 0, 16, 4, /* IPRB */ { WDT, REF, 0, 0 } }, |
@@ -101,7 +89,7 @@ static struct intc_prio_reg prio_registers[] __initdata = { | |||
101 | }; | 89 | }; |
102 | 90 | ||
103 | static DECLARE_INTC_DESC(intc_desc, "sh7710", vectors, groups, | 91 | static DECLARE_INTC_DESC(intc_desc, "sh7710", vectors, groups, |
104 | priorities, NULL, prio_registers, NULL); | 92 | NULL, prio_registers, NULL); |
105 | 93 | ||
106 | static struct intc_vect vectors_irq[] __initdata = { | 94 | static struct intc_vect vectors_irq[] __initdata = { |
107 | INTC_VECT(IRQ0, 0x600), INTC_VECT(IRQ1, 0x620), | 95 | INTC_VECT(IRQ0, 0x600), INTC_VECT(IRQ1, 0x620), |
@@ -109,7 +97,7 @@ static struct intc_vect vectors_irq[] __initdata = { | |||
109 | }; | 97 | }; |
110 | 98 | ||
111 | static DECLARE_INTC_DESC(intc_desc_irq, "sh7710-irq", vectors_irq, NULL, | 99 | static DECLARE_INTC_DESC(intc_desc_irq, "sh7710-irq", vectors_irq, NULL, |
112 | priorities, NULL, prio_registers, NULL); | 100 | NULL, prio_registers, NULL); |
113 | 101 | ||
114 | static struct resource rtc_resources[] = { | 102 | static struct resource rtc_resources[] = { |
115 | [0] = { | 103 | [0] = { |
diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7720.c b/arch/sh/kernel/cpu/sh3/setup-sh7720.c index a0929b8a95a..3855ea4c21c 100644 --- a/arch/sh/kernel/cpu/sh3/setup-sh7720.c +++ b/arch/sh/kernel/cpu/sh3/setup-sh7720.c | |||
@@ -85,9 +85,62 @@ static struct platform_device sci_device = { | |||
85 | }, | 85 | }, |
86 | }; | 86 | }; |
87 | 87 | ||
88 | static struct resource usb_ohci_resources[] = { | ||
89 | [0] = { | ||
90 | .start = 0xA4428000, | ||
91 | .end = 0xA44280FF, | ||
92 | .flags = IORESOURCE_MEM, | ||
93 | }, | ||
94 | [1] = { | ||
95 | .start = 67, | ||
96 | .end = 67, | ||
97 | .flags = IORESOURCE_IRQ, | ||
98 | }, | ||
99 | }; | ||
100 | |||
101 | static u64 usb_ohci_dma_mask = 0xffffffffUL; | ||
102 | static struct platform_device usb_ohci_device = { | ||
103 | .name = "sh_ohci", | ||
104 | .id = -1, | ||
105 | .dev = { | ||
106 | .dma_mask = &usb_ohci_dma_mask, | ||
107 | .coherent_dma_mask = 0xffffffff, | ||
108 | }, | ||
109 | .num_resources = ARRAY_SIZE(usb_ohci_resources), | ||
110 | .resource = usb_ohci_resources, | ||
111 | }; | ||
112 | |||
113 | static struct resource usbf_resources[] = { | ||
114 | [0] = { | ||
115 | .name = "sh_udc", | ||
116 | .start = 0xA4420000, | ||
117 | .end = 0xA44200FF, | ||
118 | .flags = IORESOURCE_MEM, | ||
119 | }, | ||
120 | [1] = { | ||
121 | .name = "sh_udc", | ||
122 | .start = 65, | ||
123 | .end = 65, | ||
124 | .flags = IORESOURCE_IRQ, | ||
125 | }, | ||
126 | }; | ||
127 | |||
128 | static struct platform_device usbf_device = { | ||
129 | .name = "sh_udc", | ||
130 | .id = -1, | ||
131 | .dev = { | ||
132 | .dma_mask = NULL, | ||
133 | .coherent_dma_mask = 0xffffffff, | ||
134 | }, | ||
135 | .num_resources = ARRAY_SIZE(usbf_resources), | ||
136 | .resource = usbf_resources, | ||
137 | }; | ||
138 | |||
88 | static struct platform_device *sh7720_devices[] __initdata = { | 139 | static struct platform_device *sh7720_devices[] __initdata = { |
89 | &rtc_device, | 140 | &rtc_device, |
90 | &sci_device, | 141 | &sci_device, |
142 | &usb_ohci_device, | ||
143 | &usbf_device, | ||
91 | }; | 144 | }; |
92 | 145 | ||
93 | static int __init sh7720_devices_setup(void) | 146 | static int __init sh7720_devices_setup(void) |
@@ -127,8 +180,11 @@ static struct intc_vect vectors[] __initdata = { | |||
127 | INTC_VECT(USBF_SPD, 0x6e0), INTC_VECT(DMAC1_DEI0, 0x800), | 180 | INTC_VECT(USBF_SPD, 0x6e0), INTC_VECT(DMAC1_DEI0, 0x800), |
128 | INTC_VECT(DMAC1_DEI1, 0x820), INTC_VECT(DMAC1_DEI2, 0x840), | 181 | INTC_VECT(DMAC1_DEI1, 0x820), INTC_VECT(DMAC1_DEI2, 0x840), |
129 | INTC_VECT(DMAC1_DEI3, 0x860), INTC_VECT(LCDC, 0x900), | 182 | INTC_VECT(DMAC1_DEI3, 0x860), INTC_VECT(LCDC, 0x900), |
130 | INTC_VECT(SSL, 0x980), INTC_VECT(USBFI0, 0xa20), | 183 | #if defined(CONFIG_CPU_SUBTYPE_SH7720) |
131 | INTC_VECT(USBFI1, 0xa40), INTC_VECT(USBHI, 0xa60), | 184 | INTC_VECT(SSL, 0x980), |
185 | #endif | ||
186 | INTC_VECT(USBFI0, 0xa20), INTC_VECT(USBFI1, 0xa40), | ||
187 | INTC_VECT(USBHI, 0xa60), | ||
132 | INTC_VECT(DMAC2_DEI4, 0xb80), INTC_VECT(DMAC2_DEI5, 0xba0), | 188 | INTC_VECT(DMAC2_DEI4, 0xb80), INTC_VECT(DMAC2_DEI5, 0xba0), |
133 | INTC_VECT(ADC, 0xbe0), INTC_VECT(SCIF0, 0xc00), | 189 | INTC_VECT(ADC, 0xbe0), INTC_VECT(SCIF0, 0xc00), |
134 | INTC_VECT(SCIF1, 0xc20), INTC_VECT(PINT07, 0xc80), | 190 | INTC_VECT(SCIF1, 0xc20), INTC_VECT(PINT07, 0xc80), |
@@ -153,22 +209,16 @@ static struct intc_group groups[] __initdata = { | |||
153 | INTC_GROUP(MMC, MMCI0, MMCI1, MMCI2, MMCI3), | 209 | INTC_GROUP(MMC, MMCI0, MMCI1, MMCI2, MMCI3), |
154 | }; | 210 | }; |
155 | 211 | ||
156 | static struct intc_prio priorities[] __initdata = { | ||
157 | INTC_PRIO(SCIF0, 2), | ||
158 | INTC_PRIO(SCIF1, 2), | ||
159 | INTC_PRIO(DMAC1, 1), | ||
160 | INTC_PRIO(DMAC2, 1), | ||
161 | INTC_PRIO(RTC, 2), | ||
162 | INTC_PRIO(TMU, 2), | ||
163 | INTC_PRIO(TPU, 2), | ||
164 | }; | ||
165 | |||
166 | static struct intc_prio_reg prio_registers[] __initdata = { | 212 | static struct intc_prio_reg prio_registers[] __initdata = { |
167 | { 0xA414FEE2UL, 0, 16, 4, /* IPRA */ { TMU0, TMU1, TMU2, RTC } }, | 213 | { 0xA414FEE2UL, 0, 16, 4, /* IPRA */ { TMU0, TMU1, TMU2, RTC } }, |
168 | { 0xA414FEE4UL, 0, 16, 4, /* IPRB */ { WDT, REF_RCMI, SIM, 0 } }, | 214 | { 0xA414FEE4UL, 0, 16, 4, /* IPRB */ { WDT, REF_RCMI, SIM, 0 } }, |
169 | { 0xA4140016UL, 0, 16, 4, /* IPRC */ { IRQ3, IRQ2, IRQ1, IRQ0 } }, | 215 | { 0xA4140016UL, 0, 16, 4, /* IPRC */ { IRQ3, IRQ2, IRQ1, IRQ0 } }, |
170 | { 0xA4140018UL, 0, 16, 4, /* IPRD */ { USBF_SPD, TMU_SUNI, IRQ5, IRQ4 } }, | 216 | { 0xA4140018UL, 0, 16, 4, /* IPRD */ { USBF_SPD, TMU_SUNI, IRQ5, IRQ4 } }, |
217 | #if defined(CONFIG_CPU_SUBTYPE_SH7720) | ||
171 | { 0xA414001AUL, 0, 16, 4, /* IPRE */ { DMAC1, 0, LCDC, SSL } }, | 218 | { 0xA414001AUL, 0, 16, 4, /* IPRE */ { DMAC1, 0, LCDC, SSL } }, |
219 | #else | ||
220 | { 0xA414001AUL, 0, 16, 4, /* IPRE */ { DMAC1, 0, LCDC, 0 } }, | ||
221 | #endif | ||
172 | { 0xA4080000UL, 0, 16, 4, /* IPRF */ { ADC, DMAC2, USBFI, CMT } }, | 222 | { 0xA4080000UL, 0, 16, 4, /* IPRF */ { ADC, DMAC2, USBFI, CMT } }, |
173 | { 0xA4080002UL, 0, 16, 4, /* IPRG */ { SCIF0, SCIF1, 0, 0 } }, | 223 | { 0xA4080002UL, 0, 16, 4, /* IPRG */ { SCIF0, SCIF1, 0, 0 } }, |
174 | { 0xA4080004UL, 0, 16, 4, /* IPRH */ { PINT07, PINT815, TPU, IIC } }, | 224 | { 0xA4080004UL, 0, 16, 4, /* IPRH */ { PINT07, PINT815, TPU, IIC } }, |
@@ -177,7 +227,7 @@ static struct intc_prio_reg prio_registers[] __initdata = { | |||
177 | }; | 227 | }; |
178 | 228 | ||
179 | static DECLARE_INTC_DESC(intc_desc, "sh7720", vectors, groups, | 229 | static DECLARE_INTC_DESC(intc_desc, "sh7720", vectors, groups, |
180 | priorities, NULL, prio_registers, NULL); | 230 | NULL, prio_registers, NULL); |
181 | 231 | ||
182 | static struct intc_sense_reg sense_registers[] __initdata = { | 232 | static struct intc_sense_reg sense_registers[] __initdata = { |
183 | { INTC_ICR1, 16, 2, { 0, 0, IRQ5, IRQ4, IRQ3, IRQ2, IRQ1, IRQ0 } }, | 233 | { INTC_ICR1, 16, 2, { 0, 0, IRQ5, IRQ4, IRQ3, IRQ2, IRQ1, IRQ0 } }, |
@@ -190,7 +240,7 @@ static struct intc_vect vectors_irq[] __initdata = { | |||
190 | }; | 240 | }; |
191 | 241 | ||
192 | static DECLARE_INTC_DESC(intc_irq_desc, "sh7720-irq", vectors_irq, | 242 | static DECLARE_INTC_DESC(intc_irq_desc, "sh7720-irq", vectors_irq, |
193 | NULL, priorities, NULL, prio_registers, sense_registers); | 243 | NULL, NULL, prio_registers, sense_registers); |
194 | 244 | ||
195 | void __init plat_irq_setup_pins(int mode) | 245 | void __init plat_irq_setup_pins(int mode) |
196 | { | 246 | { |