aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards/hp6xx/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/boards/hp6xx/setup.c')
-rw-r--r--arch/sh/boards/hp6xx/setup.c62
1 files changed, 54 insertions, 8 deletions
diff --git a/arch/sh/boards/hp6xx/setup.c b/arch/sh/boards/hp6xx/setup.c
index 71f315663cc9..60ab17ad6054 100644
--- a/arch/sh/boards/hp6xx/setup.c
+++ b/arch/sh/boards/hp6xx/setup.c
@@ -8,22 +8,22 @@
8 * 8 *
9 * Setup code for an HP680 (internal peripherials only) 9 * Setup code for an HP680 (internal peripherials only)
10 */ 10 */
11 11#include <linux/types.h>
12#include <linux/init.h> 12#include <linux/init.h>
13#include <asm/io.h>
14#include <asm/hd64461.h> 13#include <asm/hd64461.h>
14#include <asm/io.h>
15#include <asm/irq.h>
15#include <asm/hp6xx/hp6xx.h> 16#include <asm/hp6xx/hp6xx.h>
16#include <asm/cpu/dac.h> 17#include <asm/cpu/dac.h>
17 18
18const char *get_system_type(void) 19#define SCPCR 0xa4000116
19{ 20#define SCPDR 0xa4000136
20 return "HP6xx";
21}
22 21
23int __init platform_setup(void) 22static void __init hp6xx_setup(char **cmdline_p)
24{ 23{
25 u8 v8; 24 u8 v8;
26 u16 v; 25 u16 v;
26
27 v = inw(HD64461_STBCR); 27 v = inw(HD64461_STBCR);
28 v |= HD64461_STBCR_SURTST | HD64461_STBCR_SIRST | 28 v |= HD64461_STBCR_SURTST | HD64461_STBCR_SIRST |
29 HD64461_STBCR_STM1ST | HD64461_STBCR_STM0ST | 29 HD64461_STBCR_STM1ST | HD64461_STBCR_STM0ST |
@@ -50,5 +50,51 @@ int __init platform_setup(void)
50 v8 &= ~DACR_DAE; 50 v8 &= ~DACR_DAE;
51 ctrl_outb(v8,DACR); 51 ctrl_outb(v8,DACR);
52 52
53 return 0; 53 v8 = ctrl_inb(SCPDR);
54 v8 |= SCPDR_TS_SCAN_X | SCPDR_TS_SCAN_Y;
55 v8 &= ~SCPDR_TS_SCAN_ENABLE;
56 ctrl_outb(v8, SCPDR);
57
58 v = ctrl_inw(SCPCR);
59 v &= ~SCPCR_TS_MASK;
60 v |= SCPCR_TS_ENABLE;
61 ctrl_outw(v, SCPCR);
54} 62}
63
64/*
65 * XXX: This is stupid, we should have a generic machine vector for the cchips
66 * and just wrap the platform setup code in to this, as it's the only thing
67 * that ends up being different.
68 */
69struct sh_machine_vector mv_hp6xx __initmv = {
70 .mv_name = "hp6xx",
71 .mv_setup = hp6xx_setup,
72 .mv_nr_irqs = HD64461_IRQBASE + HD64461_IRQ_NUM,
73
74 .mv_inb = hd64461_inb,
75 .mv_inw = hd64461_inw,
76 .mv_inl = hd64461_inl,
77 .mv_outb = hd64461_outb,
78 .mv_outw = hd64461_outw,
79 .mv_outl = hd64461_outl,
80
81 .mv_inb_p = hd64461_inb_p,
82 .mv_inw_p = hd64461_inw,
83 .mv_inl_p = hd64461_inl,
84 .mv_outb_p = hd64461_outb_p,
85 .mv_outw_p = hd64461_outw,
86 .mv_outl_p = hd64461_outl,
87
88 .mv_insb = hd64461_insb,
89 .mv_insw = hd64461_insw,
90 .mv_insl = hd64461_insl,
91 .mv_outsb = hd64461_outsb,
92 .mv_outsw = hd64461_outsw,
93 .mv_outsl = hd64461_outsl,
94
95 .mv_readw = hd64461_readw,
96 .mv_writew = hd64461_writew,
97
98 .mv_irq_demux = hd64461_irq_demux,
99};
100ALIAS_MV(hp6xx)