2 * linux/arch/sh/kernel/setup_sh2000.c
4 * Copyright (C) 2001 SUGIOKA Tochinobu
10 #include <linux/config.h>
11 #include <linux/init.h>
12 #include <linux/irq.h>
15 #include <asm/machvec.h>
16 #include <asm/mach/sh2000.h>
18 #define CF_CIS_BASE 0xb4200000
20 #define PORT_PECR 0xa4000108
21 #define PORT_PHCR 0xa400010E
22 #define PORT_ICR1 0xa4000010
23 #define PORT_IRR0 0xa4000004
25 #define IDE_OFFSET 0xb6200000
26 #define NIC_OFFSET 0xb6000000
27 #define EXTBUS_OFFSET 0xba000000
30 const char *get_system_type(void)
35 static unsigned long sh2000_isa_port2addr(unsigned long offset
)
37 if((offset
& ~7) == 0x1f0 || offset
== 0x3f6)
38 return IDE_OFFSET
+ offset
;
39 else if((offset
& ~0x1f) == 0x300)
40 return NIC_OFFSET
+ offset
;
41 return EXTBUS_OFFSET
+ offset
;
47 struct sh_machine_vector mv_sh2000 __initmv
= {
49 .mv_isa_port2addr
= sh2000_isa_port2addr
,
54 * Initialize the board
56 int __init
platform_setup(void)
58 /* XXX: RTC setting comes here */
60 /* These should be done by BIOS/IPL ... */
61 /* Enable nCE2A, nCE2B output */
62 ctrl_outw(ctrl_inw(PORT_PECR
) & ~0xf00, PORT_PECR
);
63 /* Enable the Compact Flash card, and set the level interrupt */
64 ctrl_outw(0x0042, CF_CIS_BASE
+0x0200);
65 /* Enable interrupt */
66 ctrl_outw(ctrl_inw(PORT_PHCR
) & ~0x03f3, PORT_PHCR
);
67 ctrl_outw(1, PORT_ICR1
);
68 ctrl_outw(ctrl_inw(PORT_IRR0
) & ~0xff3f, PORT_IRR0
);
69 printk(KERN_INFO
"SH-2000 Setup...done\n");