[PATCH] briq_panel: read() and write() get __user pointers, damnit
[linux-2.6/verdex.git] / arch / sh / boards / harp / setup.c
blob886e450ab63eef99b7cfdbaadae88115dd0bc124
1 /*
2 * arch/sh/stboard/setup.c
4 * Copyright (C) 2001 Stuart Menefy (stuart.menefy@st.com)
6 * May be copied or modified under the terms of the GNU General Public
7 * License. See linux/COPYING for more information.
9 * STMicroelectronics ST40STB1 HARP and compatible support.
12 #include <linux/kernel.h>
13 #include <linux/init.h>
14 #include <asm/io.h>
15 #include <asm/harp/harp.h>
17 const char *get_system_type(void)
19 return "STB1 Harp";
23 * Initialize the board
25 int __init platform_setup(void)
27 #ifdef CONFIG_SH_STB1_HARP
28 unsigned long ic8_version, ic36_version;
30 ic8_version = ctrl_inl(EPLD_REVID2);
31 ic36_version = ctrl_inl(EPLD_REVID1);
33 printk("STMicroelectronics STB1 HARP initialisaton\n");
34 printk("EPLD versions: IC8: %d.%02d, IC36: %d.%02d\n",
35 (ic8_version >> 4) & 0xf, ic8_version & 0xf,
36 (ic36_version >> 4) & 0xf, ic36_version & 0xf);
37 #elif defined(CONFIG_SH_STB1_OVERDRIVE)
38 unsigned long version;
40 version = ctrl_inl(EPLD_REVID);
42 printk("STMicroelectronics STB1 Overdrive initialisaton\n");
43 printk("EPLD version: %d.%02d\n",
44 (version >> 4) & 0xf, version & 0xf);
45 #else
46 #error Undefined machine
47 #endif
49 /* Currently all STB1 chips have problems with the sleep instruction,
50 * so disable it here.
52 disable_hlt();
54 return 0;
58 * pcibios_map_platform_irq
60 * This is board specific and returns the IRQ for a given PCI device.
61 * It is used by the PCI code (arch/sh/kernel/st40_pci*)
65 #define HARP_PCI_IRQ 1
66 #define HARP_BRIDGE_IRQ 2
67 #define OVERDRIVE_SLOT0_IRQ 0
70 int __init pcibios_map_platform_irq(struct pci_dev *dev, u8 slot, u8 pin)
72 switch (slot) {
73 #ifdef CONFIG_SH_STB1_HARP
74 case 2: /*This is the PCI slot on the */
75 return HARP_PCI_IRQ;
76 case 1: /* this is the bridge */
77 return HARP_BRIDGE_IRQ;
78 #elif defined(CONFIG_SH_STB1_OVERDRIVE)
79 case 1:
80 case 2:
81 case 3:
82 return slot - 1;
83 #else
84 #error Unknown board
85 #endif
86 default:
87 return -1;