[PATCH] briq_panel: read() and write() get __user pointers, damnit
[linux-2.6/verdex.git] / arch / sh / boards / sh2000 / setup.c
blob2fe6a11765e9c4eb8a3d188c5b75935de69a27d7
1 /*
2 * linux/arch/sh/kernel/setup_sh2000.c
4 * Copyright (C) 2001 SUGIOKA Tochinobu
6 * SH-2000 Support.
8 */
10 #include <linux/init.h>
11 #include <linux/irq.h>
13 #include <asm/io.h>
14 #include <asm/machvec.h>
15 #include <asm/mach/sh2000.h>
17 #define CF_CIS_BASE 0xb4200000
19 #define PORT_PECR 0xa4000108
20 #define PORT_PHCR 0xa400010E
21 #define PORT_ICR1 0xa4000010
22 #define PORT_IRR0 0xa4000004
24 #define IDE_OFFSET 0xb6200000
25 #define NIC_OFFSET 0xb6000000
26 #define EXTBUS_OFFSET 0xba000000
29 const char *get_system_type(void)
31 return "sh2000";
34 static unsigned long sh2000_isa_port2addr(unsigned long offset)
36 if((offset & ~7) == 0x1f0 || offset == 0x3f6)
37 return IDE_OFFSET + offset;
38 else if((offset & ~0x1f) == 0x300)
39 return NIC_OFFSET + offset;
40 return EXTBUS_OFFSET + offset;
44 * The Machine Vector
46 struct sh_machine_vector mv_sh2000 __initmv = {
47 .mv_nr_irqs = 80,
48 .mv_isa_port2addr = sh2000_isa_port2addr,
50 ALIAS_MV(sh2000)
53 * Initialize the board
55 int __init platform_setup(void)
57 /* XXX: RTC setting comes here */
59 /* These should be done by BIOS/IPL ... */
60 /* Enable nCE2A, nCE2B output */
61 ctrl_outw(ctrl_inw(PORT_PECR) & ~0xf00, PORT_PECR);
62 /* Enable the Compact Flash card, and set the level interrupt */
63 ctrl_outw(0x0042, CF_CIS_BASE+0x0200);
64 /* Enable interrupt */
65 ctrl_outw(ctrl_inw(PORT_PHCR) & ~0x03f3, PORT_PHCR);
66 ctrl_outw(1, PORT_ICR1);
67 ctrl_outw(ctrl_inw(PORT_IRR0) & ~0xff3f, PORT_IRR0);
68 printk(KERN_INFO "SH-2000 Setup...done\n");
69 return 0;