2 * setup.c, Setup for the TANBAC TB0229 (VR4131DIMM)
4 * Copyright (C) 2002-2004 Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
6 * Modified for TANBAC TB0229:
7 * Copyright (C) 2003 Megasolution Inc. <matsu@megasolution.jp>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #include <linux/config.h>
24 #include <linux/ioport.h>
27 #include <asm/pci_channel.h>
28 #include <asm/reboot.h>
29 #include <asm/vr41xx/tb0229.h>
32 static struct resource vr41xx_pci_io_resource = {
33 .name = "PCI I/O space",
34 .start = VR41XX_PCI_IO_START,
35 .end = VR41XX_PCI_IO_END,
36 .flags = IORESOURCE_IO,
39 static struct resource vr41xx_pci_mem_resource = {
40 .name = "PCI memory space",
41 .start = VR41XX_PCI_MEM_START,
42 .end = VR41XX_PCI_MEM_END,
43 .flags = IORESOURCE_MEM,
46 extern struct pci_ops vr41xx_pci_ops;
48 struct pci_controller vr41xx_controller = {
49 .pci_ops = &vr41xx_pci_ops,
50 .io_resource = &vr41xx_pci_io_resource,
51 .mem_resource = &vr41xx_pci_mem_resource,
54 struct vr41xx_pci_address_space vr41xx_pci_mem1 = {
55 .internal_base = VR41XX_PCI_MEM1_BASE,
56 .address_mask = VR41XX_PCI_MEM1_MASK,
57 .pci_base = IO_MEM1_RESOURCE_START,
60 struct vr41xx_pci_address_space vr41xx_pci_mem2 = {
61 .internal_base = VR41XX_PCI_MEM2_BASE,
62 .address_mask = VR41XX_PCI_MEM2_MASK,
63 .pci_base = IO_MEM2_RESOURCE_START,
66 struct vr41xx_pci_address_space vr41xx_pci_io = {
67 .internal_base = VR41XX_PCI_IO_BASE,
68 .address_mask = VR41XX_PCI_IO_MASK,
69 .pci_base = IO_PORT_RESOURCE_START
72 static struct vr41xx_pci_address_map pci_address_map = {
73 .mem1 = &vr41xx_pci_mem1,
74 .mem2 = &vr41xx_pci_mem2,
79 const char *get_system_type(void)
81 return "TANBAC TB0229";
84 static int tanbac_tb0229_setup(void)
86 set_io_port_base(IO_PORT_BASE);
87 ioport_resource.start = IO_PORT_RESOURCE_START;
88 ioport_resource.end = IO_PORT_RESOURCE_END;
90 vr41xx_siu_init(SIU_RS232C, 0);
94 vr41xx_pciu_init(&pci_address_map);
97 #ifdef CONFIG_TANBAC_TB0219
98 _machine_restart = tanbac_tb0229_restart;
104 early_initcall(tanbac_tb0229_setup);