diff options
Diffstat (limited to 'arch/sh/boards')
-rw-r--r-- | arch/sh/boards/renesas/hs7751rvoip/Kconfig | 12 | ||||
-rw-r--r-- | arch/sh/boards/renesas/hs7751rvoip/Makefile | 2 | ||||
-rw-r--r-- | arch/sh/boards/renesas/hs7751rvoip/mach.c | 54 | ||||
-rw-r--r-- | arch/sh/boards/renesas/hs7751rvoip/setup.c | 63 |
4 files changed, 64 insertions, 67 deletions
diff --git a/arch/sh/boards/renesas/hs7751rvoip/Kconfig b/arch/sh/boards/renesas/hs7751rvoip/Kconfig new file mode 100644 index 000000000000..1743be477be5 --- /dev/null +++ b/arch/sh/boards/renesas/hs7751rvoip/Kconfig | |||
@@ -0,0 +1,12 @@ | |||
1 | if SH_HS7751RVOIP | ||
2 | |||
3 | menu "HS7751RVoIP options" | ||
4 | |||
5 | config HS7751RVOIP_CODEC | ||
6 | bool "Support VoIP Codec section" | ||
7 | help | ||
8 | Selecting this option will support CODEC section. | ||
9 | |||
10 | endmenu | ||
11 | |||
12 | endif | ||
diff --git a/arch/sh/boards/renesas/hs7751rvoip/Makefile b/arch/sh/boards/renesas/hs7751rvoip/Makefile index 3ef8cbaa0b37..bede2d54fd6c 100644 --- a/arch/sh/boards/renesas/hs7751rvoip/Makefile +++ b/arch/sh/boards/renesas/hs7751rvoip/Makefile | |||
@@ -2,7 +2,7 @@ | |||
2 | # Makefile for the HS7751RVoIP specific parts of the kernel | 2 | # Makefile for the HS7751RVoIP specific parts of the kernel |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y := mach.o setup.o io.o irq.o led.o | 5 | obj-y := setup.o io.o irq.o led.o |
6 | 6 | ||
7 | obj-$(CONFIG_PCI) += pci.o | 7 | obj-$(CONFIG_PCI) += pci.o |
8 | 8 | ||
diff --git a/arch/sh/boards/renesas/hs7751rvoip/mach.c b/arch/sh/boards/renesas/hs7751rvoip/mach.c deleted file mode 100644 index caf967f77c61..000000000000 --- a/arch/sh/boards/renesas/hs7751rvoip/mach.c +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/sh/kernel/mach_hs7751rvoip.c | ||
3 | * | ||
4 | * Minor tweak of mach_se.c file to reference hs7751rvoip-specific items. | ||
5 | * | ||
6 | * May be copied or modified under the terms of the GNU General Public | ||
7 | * License. See linux/COPYING for more information. | ||
8 | * | ||
9 | * Machine vector for the Renesas Technology sales HS7751RVoIP | ||
10 | */ | ||
11 | |||
12 | #include <linux/init.h> | ||
13 | |||
14 | #include <asm/machvec.h> | ||
15 | #include <asm/rtc.h> | ||
16 | #include <asm/irq.h> | ||
17 | #include <asm/hs7751rvoip/io.h> | ||
18 | |||
19 | extern void init_hs7751rvoip_IRQ(void); | ||
20 | extern void *hs7751rvoip_ioremap(unsigned long, unsigned long); | ||
21 | |||
22 | /* | ||
23 | * The Machine Vector | ||
24 | */ | ||
25 | |||
26 | struct sh_machine_vector mv_hs7751rvoip __initmv = { | ||
27 | .mv_nr_irqs = 72, | ||
28 | |||
29 | .mv_inb = hs7751rvoip_inb, | ||
30 | .mv_inw = hs7751rvoip_inw, | ||
31 | .mv_inl = hs7751rvoip_inl, | ||
32 | .mv_outb = hs7751rvoip_outb, | ||
33 | .mv_outw = hs7751rvoip_outw, | ||
34 | .mv_outl = hs7751rvoip_outl, | ||
35 | |||
36 | .mv_inb_p = hs7751rvoip_inb_p, | ||
37 | .mv_inw_p = hs7751rvoip_inw, | ||
38 | .mv_inl_p = hs7751rvoip_inl, | ||
39 | .mv_outb_p = hs7751rvoip_outb_p, | ||
40 | .mv_outw_p = hs7751rvoip_outw, | ||
41 | .mv_outl_p = hs7751rvoip_outl, | ||
42 | |||
43 | .mv_insb = hs7751rvoip_insb, | ||
44 | .mv_insw = hs7751rvoip_insw, | ||
45 | .mv_insl = hs7751rvoip_insl, | ||
46 | .mv_outsb = hs7751rvoip_outsb, | ||
47 | .mv_outsw = hs7751rvoip_outsw, | ||
48 | .mv_outsl = hs7751rvoip_outsl, | ||
49 | |||
50 | .mv_ioremap = hs7751rvoip_ioremap, | ||
51 | .mv_isa_port2addr = hs7751rvoip_isa_port2addr, | ||
52 | .mv_init_irq = init_hs7751rvoip_IRQ, | ||
53 | }; | ||
54 | ALIAS_MV(hs7751rvoip) | ||
diff --git a/arch/sh/boards/renesas/hs7751rvoip/setup.c b/arch/sh/boards/renesas/hs7751rvoip/setup.c index 7ce577822dc0..813fc4d5862a 100644 --- a/arch/sh/boards/renesas/hs7751rvoip/setup.c +++ b/arch/sh/boards/renesas/hs7751rvoip/setup.c | |||
@@ -17,14 +17,55 @@ | |||
17 | #include <linux/hdreg.h> | 17 | #include <linux/hdreg.h> |
18 | #include <linux/ide.h> | 18 | #include <linux/ide.h> |
19 | #include <linux/pm.h> | 19 | #include <linux/pm.h> |
20 | #include <asm/io.h> | ||
21 | #include <asm/hs7751rvoip/hs7751rvoip.h> | 20 | #include <asm/hs7751rvoip/hs7751rvoip.h> |
22 | 21 | #include <asm/hs7751rvoip/io.h> | |
23 | /* defined in mm/ioremap.c */ | 22 | #include <asm/io.h> |
24 | extern void * p3_ioremap(unsigned long phys_addr, unsigned long size, unsigned long flags); | 23 | #include <asm/machvec.h> |
24 | #include <asm/rtc.h> | ||
25 | #include <asm/irq.h> | ||
25 | 26 | ||
26 | unsigned int debug_counter; | 27 | unsigned int debug_counter; |
27 | 28 | ||
29 | static void __init hs7751rvoip_init_irq(void) | ||
30 | { | ||
31 | #if defined(CONFIG_HS7751RVOIP_CODEC) | ||
32 | make_ipr_irq(DMTE0_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY); | ||
33 | make_ipr_irq(DMTE1_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY); | ||
34 | #endif | ||
35 | |||
36 | init_hs7751rvoip_IRQ(); | ||
37 | } | ||
38 | |||
39 | struct sh_machine_vector mv_hs7751rvoip __initmv = { | ||
40 | .mv_nr_irqs = 72, | ||
41 | |||
42 | .mv_inb = hs7751rvoip_inb, | ||
43 | .mv_inw = hs7751rvoip_inw, | ||
44 | .mv_inl = hs7751rvoip_inl, | ||
45 | .mv_outb = hs7751rvoip_outb, | ||
46 | .mv_outw = hs7751rvoip_outw, | ||
47 | .mv_outl = hs7751rvoip_outl, | ||
48 | |||
49 | .mv_inb_p = hs7751rvoip_inb_p, | ||
50 | .mv_inw_p = hs7751rvoip_inw, | ||
51 | .mv_inl_p = hs7751rvoip_inl, | ||
52 | .mv_outb_p = hs7751rvoip_outb_p, | ||
53 | .mv_outw_p = hs7751rvoip_outw, | ||
54 | .mv_outl_p = hs7751rvoip_outl, | ||
55 | |||
56 | .mv_insb = hs7751rvoip_insb, | ||
57 | .mv_insw = hs7751rvoip_insw, | ||
58 | .mv_insl = hs7751rvoip_insl, | ||
59 | .mv_outsb = hs7751rvoip_outsb, | ||
60 | .mv_outsw = hs7751rvoip_outsw, | ||
61 | .mv_outsl = hs7751rvoip_outsl, | ||
62 | |||
63 | .mv_ioremap = hs7751rvoip_ioremap, | ||
64 | .mv_isa_port2addr = hs7751rvoip_isa_port2addr, | ||
65 | .mv_init_irq = hs7751rvoip_init_irq, | ||
66 | }; | ||
67 | ALIAS_MV(hs7751rvoip) | ||
68 | |||
28 | const char *get_system_type(void) | 69 | const char *get_system_type(void) |
29 | { | 70 | { |
30 | return "HS7751RVoIP"; | 71 | return "HS7751RVoIP"; |
@@ -51,16 +92,15 @@ void *area6_io8_base; | |||
51 | void *area5_io16_base; | 92 | void *area5_io16_base; |
52 | void *area6_io16_base; | 93 | void *area6_io16_base; |
53 | 94 | ||
54 | int __init cf_init(void) | 95 | static int __init hs7751rvoip_cf_init(void) |
55 | { | 96 | { |
56 | pgprot_t prot; | 97 | pgprot_t prot; |
57 | unsigned long paddrbase, psize; | 98 | unsigned long paddrbase; |
58 | 99 | ||
59 | /* open I/O area window */ | 100 | /* open I/O area window */ |
60 | paddrbase = virt_to_phys((void *)(PA_AREA5_IO+0x00000800)); | 101 | paddrbase = virt_to_phys((void *)(PA_AREA5_IO+0x00000800)); |
61 | psize = PAGE_SIZE; | ||
62 | prot = PAGE_KERNEL_PCC(1, _PAGE_PCC_COM16); | 102 | prot = PAGE_KERNEL_PCC(1, _PAGE_PCC_COM16); |
63 | area5_io16_base = p3_ioremap(paddrbase, psize, prot.pgprot); | 103 | area5_io16_base = p3_ioremap(paddrbase, PAGE_SIZE, prot.pgprot); |
64 | if (!area5_io16_base) { | 104 | if (!area5_io16_base) { |
65 | printk("allocate_cf_area : can't open CF I/O window!\n"); | 105 | printk("allocate_cf_area : can't open CF I/O window!\n"); |
66 | return -ENOMEM; | 106 | return -ENOMEM; |
@@ -69,19 +109,18 @@ int __init cf_init(void) | |||
69 | /* XXX : do we need attribute and common-memory area also? */ | 109 | /* XXX : do we need attribute and common-memory area also? */ |
70 | 110 | ||
71 | paddrbase = virt_to_phys((void *)PA_AREA6_IO); | 111 | paddrbase = virt_to_phys((void *)PA_AREA6_IO); |
72 | psize = PAGE_SIZE; | ||
73 | #if defined(CONFIG_HS7751RVOIP_CODEC) | 112 | #if defined(CONFIG_HS7751RVOIP_CODEC) |
74 | prot = PAGE_KERNEL_PCC(0, _PAGE_PCC_COM8); | 113 | prot = PAGE_KERNEL_PCC(0, _PAGE_PCC_COM8); |
75 | #else | 114 | #else |
76 | prot = PAGE_KERNEL_PCC(0, _PAGE_PCC_IO8); | 115 | prot = PAGE_KERNEL_PCC(0, _PAGE_PCC_IO8); |
77 | #endif | 116 | #endif |
78 | area6_io8_base = p3_ioremap(paddrbase, psize, prot.pgprot); | 117 | area6_io8_base = p3_ioremap(paddrbase, PAGE_SIZE, prot.pgprot); |
79 | if (!area6_io8_base) { | 118 | if (!area6_io8_base) { |
80 | printk("allocate_cf_area : can't open CODEC I/O 8bit window!\n"); | 119 | printk("allocate_cf_area : can't open CODEC I/O 8bit window!\n"); |
81 | return -ENOMEM; | 120 | return -ENOMEM; |
82 | } | 121 | } |
83 | prot = PAGE_KERNEL_PCC(0, _PAGE_PCC_IO16); | 122 | prot = PAGE_KERNEL_PCC(0, _PAGE_PCC_IO16); |
84 | area6_io16_base = p3_ioremap(paddrbase, psize, prot.pgprot); | 123 | area6_io16_base = p3_ioremap(paddrbase, PAGE_SIZE, prot.pgprot); |
85 | if (!area6_io16_base) { | 124 | if (!area6_io16_base) { |
86 | printk("allocate_cf_area : can't open CODEC I/O 16bit window!\n"); | 125 | printk("allocate_cf_area : can't open CODEC I/O 16bit window!\n"); |
87 | return -ENOMEM; | 126 | return -ENOMEM; |
@@ -90,4 +129,4 @@ int __init cf_init(void) | |||
90 | return 0; | 129 | return 0; |
91 | } | 130 | } |
92 | 131 | ||
93 | __initcall (cf_init); | 132 | __initcall(hs7751rvoip_cf_init); |