ieee1394: raw1394: arm functions slept in atomic context
[sfrench/cifs-2.6.git] / arch / sh / boards / sh2000 / setup.c
1 /*
2  * linux/arch/sh/kernel/setup_sh2000.c
3  *
4  * Copyright (C) 2001  SUGIOKA Tochinobu
5  *
6  * SH-2000 Support.
7  *
8  */
9
10 #include <linux/init.h>
11 #include <linux/irq.h>
12
13 #include <asm/io.h>
14 #include <asm/machvec.h>
15 #include <asm/mach/sh2000.h>
16
17 #define CF_CIS_BASE     0xb4200000
18
19 #define PORT_PECR       0xa4000108
20 #define PORT_PHCR       0xa400010E
21 #define PORT_ICR1       0xa4000010
22 #define PORT_IRR0       0xa4000004
23
24 #define IDE_OFFSET      0xb6200000
25 #define NIC_OFFSET      0xb6000000
26 #define EXTBUS_OFFSET   0xba000000
27
28
29 const char *get_system_type(void)
30 {
31         return "sh2000";
32 }
33
34 static unsigned long sh2000_isa_port2addr(unsigned long offset)
35 {
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;
41 }
42
43 /*
44  * The Machine Vector
45  */
46 struct sh_machine_vector mv_sh2000 __initmv = {
47         .mv_nr_irqs             = 80,
48         .mv_isa_port2addr       = sh2000_isa_port2addr,
49 };
50 ALIAS_MV(sh2000)
51
52 /*
53  * Initialize the board
54  */
55 int __init platform_setup(void)
56 {
57         /* XXX: RTC setting comes here */
58
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;
70 }