2 * setup.c, Setup for the TANBAC TB0226.
4 * Copyright (C) 2002-2004 Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 #include <linux/config.h>
21 #include <linux/ioport.h>
24 #include <asm/pci_channel.h>
25 #include <asm/vr41xx/tb0226.h>
28 static struct resource vr41xx_pci_io_resource = {
29 .name = "PCI I/O space",
30 .start = VR41XX_PCI_IO_START,
31 .end = VR41XX_PCI_IO_END,
32 .flags = IORESOURCE_IO,
35 static struct resource vr41xx_pci_mem_resource = {
36 .name = "PCI memory space",
37 .start = VR41XX_PCI_MEM_START,
38 .end = VR41XX_PCI_MEM_END,
39 .flags = IORESOURCE_MEM,
42 extern struct pci_ops vr41xx_pci_ops;
44 struct pci_controller vr41xx_controller[] = {
45 .pci_ops = &vr41xx_pci_ops,
46 .io_resource = &vr41xx_pci_io_resource,
47 .mem_resource = &vr41xx_pci_mem_resource,
50 struct vr41xx_pci_address_space vr41xx_pci_mem1 = {
51 .internal_base = VR41XX_PCI_MEM1_BASE,
52 .address_mask = VR41XX_PCI_MEM1_MASK,
53 .pci_base = IO_MEM1_RESOURCE_START,
56 struct vr41xx_pci_address_space vr41xx_pci_mem2 = {
57 .internal_base = VR41XX_PCI_MEM2_BASE,
58 .address_mask = VR41XX_PCI_MEM2_MASK,
59 .pci_base = IO_MEM2_RESOURCE_START,
62 struct vr41xx_pci_address_space vr41xx_pci_io = {
63 .internal_base = VR41XX_PCI_IO_BASE,
64 .address_mask = VR41XX_PCI_IO_MASK,
65 .pci_base = IO_PORT_RESOURCE_START,
68 static struct vr41xx_pci_address_map pci_address_map = {
69 .mem1 = &vr41xx_pci_mem1,
70 .mem2 = &vr41xx_pci_mem2,
75 const char *get_system_type(void)
77 return "TANBAC TB0226";
80 static int tanbac_tb0226_setup(void)
82 set_io_port_base(IO_PORT_BASE);
83 ioport_resource.start = IO_PORT_RESOURCE_START;
84 ioport_resource.end = IO_PORT_RESOURCE_END;
86 #ifdef CONFIG_SERIAL_8250
87 vr41xx_select_siu_interface(SIU_RS232C, IRDA_NONE);
92 vr41xx_pciu_init(&pci_address_map);
98 early_initcall(tanbac_tb0226_setup);