fix a kmap leak in virtio_console
[linux/fpc-iii.git] / arch / arm / mach-iop13xx / iq81340sc.c
blob1b80f10722b3fdb01f5e8aea44eac8b60113cb4e
1 /*
2 * iq81340sc board support
3 * Copyright (c) 2005-2006, Intel Corporation.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
16 * Place - Suite 330, Boston, MA 02111-1307 USA.
19 #include <linux/pci.h>
21 #include <mach/hardware.h>
22 #include <asm/irq.h>
23 #include <asm/mach/pci.h>
24 #include <asm/mach-types.h>
25 #include <asm/mach/arch.h>
26 #include <mach/pci.h>
27 #include <asm/mach/time.h>
28 #include <mach/time.h>
30 extern int init_atu;
32 static int __init
33 iq81340sc_atux_map_irq(const struct pci_dev *dev, u8 idsel, u8 pin)
35 WARN_ON(idsel < 1 || idsel > 2);
37 switch (idsel) {
38 case 1:
39 switch (pin) {
40 case 1: return ATUX_INTB;
41 case 2: return ATUX_INTC;
42 case 3: return ATUX_INTD;
43 case 4: return ATUX_INTA;
44 default: return -1;
46 case 2:
47 switch (pin) {
48 case 1: return ATUX_INTC;
49 case 2: return ATUX_INTC;
50 case 3: return ATUX_INTC;
51 case 4: return ATUX_INTC;
52 default: return -1;
54 default: return -1;
58 static struct hw_pci iq81340sc_pci __initdata = {
59 .nr_controllers = 0,
60 .setup = iop13xx_pci_setup,
61 .scan = iop13xx_scan_bus,
62 .map_irq = iq81340sc_atux_map_irq,
63 .preinit = iop13xx_pci_init
66 static int __init iq81340sc_pci_init(void)
68 iop13xx_atu_select(&iq81340sc_pci);
69 pci_common_init(&iq81340sc_pci);
70 iop13xx_map_pci_memory();
72 return 0;
75 static void __init iq81340sc_init(void)
77 iop13xx_platform_init();
78 iq81340sc_pci_init();
79 iop13xx_add_tpmi_devices();
82 static void __init iq81340sc_timer_init(void)
84 unsigned long bus_freq = iop13xx_core_freq() / iop13xx_xsi_bus_ratio();
85 printk(KERN_DEBUG "%s: bus frequency: %lu\n", __func__, bus_freq);
86 iop_init_time(bus_freq);
89 MACHINE_START(IQ81340SC, "Intel IQ81340SC")
90 /* Maintainer: Dan Williams <dan.j.williams@intel.com> */
91 .atag_offset = 0x100,
92 .init_early = iop13xx_init_early,
93 .map_io = iop13xx_map_io,
94 .init_irq = iop13xx_init_irq,
95 .init_time = iq81340sc_timer_init,
96 .init_machine = iq81340sc_init,
97 .restart = iop13xx_restart,
98 MACHINE_END