this should get the VIA VT8454c in shape with Kconfig
[coreboot.git] / src / mainboard / via / epia-m700 / Config.lb
1 ##
2 ## This file is part of the coreboot project.
3 ##
4 ## Copyright (C) 2009 One Laptop per Child, Association, Inc.
5 ##
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.
10 ##
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.
15 ##
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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
19 ##
20
21 ## CONFIG_XIP_ROM_SIZE must be a power of 2.
22 default CONFIG_XIP_ROM_SIZE = 64 * 1024
23 include /config/nofailovercalculation.lb
24
25 arch i386 end
26 driver mainboard.o
27 driver wakeup.o
28 if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end
29 if CONFIG_GENERATE_MP_TABLE object mptable.o end
30 if CONFIG_GENERATE_ACPI_TABLES
31   object fadt.o
32   object dsdt.o
33   # object ssdt.o
34   object acpi_tables.o
35 end
36 # These lines maybe noused.
37 makerule ./failover.E
38   depends "$(CONFIG_MAINBOARD)/../../../arch/i386/lib/failover.c ./romcc"
39   action "./romcc -E -O --label-prefix=failover -I$(TOP)/src -I. $(CPPFLAGS) $(CONFIG_MAINBOARD)/../../../arch/i386/lib/failover.c -o $@"
40 end
41 makerule ./failover.inc
42   depends "$(CONFIG_MAINBOARD)/../../../arch/i386/lib/failover.c ./romcc"
43   action "./romcc    -O --label-prefix=failover -I$(TOP)/src -I. $(CPPFLAGS) $(CONFIG_MAINBOARD)/../../../arch/i386/lib/failover.c -o $@"
44 end
45 if CONFIG_USE_DCACHE_RAM
46   if CONFIG_USE_INIT
47     makerule ./cache_as_ram_auto.o
48       depends "$(CONFIG_MAINBOARD)/cache_as_ram_auto.c option_table.h"
49       action "$(CC) $(DISTRO_CFLAGS) -I$(TOP)/src -I. $(CPPFLAGS) $(CONFIG_MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -c -o $@"
50     end
51   else
52     makerule ./cache_as_ram_auto.inc
53       depends "$(CONFIG_MAINBOARD)/cache_as_ram_auto.c option_table.h"
54       action "$(CC) $(DISTRO_CFLAGS) -I$(TOP)/src -I. $(CPPFLAGS) $(CONFIG_MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -c -S -o $@"
55       action "perl -e 's/.rodata/.rom.data/g' -pi $@"
56       action "perl -e 's/.text/.section .rom.text/g' -pi $@"
57     end
58   end
59 end
60 mainboardinit cpu/x86/16bit/entry16.inc
61 ldscript /cpu/x86/16bit/entry16.lds
62
63 mainboardinit northbridge/via/vx800/romstrap.inc
64 ldscript /northbridge/via/vx800/romstrap.lds
65
66 mainboardinit cpu/x86/32bit/entry32.inc
67 ldscript /cpu/x86/32bit/entry32.lds
68 if CONFIG_USE_FALLBACK_IMAGE
69   mainboardinit cpu/x86/16bit/reset16.inc
70   ldscript /cpu/x86/16bit/reset16.lds
71 else
72   mainboardinit cpu/x86/32bit/reset32.inc
73   ldscript /cpu/x86/32bit/reset32.lds
74 end
75
76 # mainboardinit arch/i386/lib/cpu_reset.inc
77 # Here cpu_reset.inc have label _cpu_reset, which is needed in failover.c,
78 # but cpu_reset.inc also has code to jump to __main() which is not included
79 # in cache_as_ram_auto_auto.c.
80
81 mainboardinit arch/i386/lib/id.inc
82 ldscript /arch/i386/lib/id.lds
83
84 if CONFIG_USE_DCACHE_RAM
85   mainboardinit cpu/via/car/cache_as_ram.inc
86 end
87
88 if CONFIG_USE_FALLBACK_IMAGE
89   ldscript /arch/i386/lib/failover.lds
90   # failover.inc need definition in cpu_reset.inc, but we do not include
91   # cpu_reset.inc,so ...
92   # mainboardinit ./failover.inc
93 end
94 # mainboardinit cpu/x86/fpu_enable.inc
95
96 if CONFIG_USE_DCACHE_RAM
97   if CONFIG_USE_INIT
98     initobject cache_as_ram_auto.o
99   else
100     mainboardinit ./cache_as_ram_auto.inc
101   end
102 end
103
104 # mainboardinit cpu/x86/mmx_disable.inc
105 dir /pc80
106
107 config chip.h
108
109 chip northbridge/via/vx800      # Northbridge
110   device pci_domain 0 on
111     device pci 0.0 on end       # Host Bridge
112     device pci 0.1 on end       # Error Reporting
113     device pci 0.2 on end       # Host Bus Control
114     device pci 0.3 on end       # PCI to PCI Bridge
115     device pci 0.4 on end       # Power Management
116     device pci 0.5 on end       # APIC and Central Traffic Control
117     device pci 0.6 on end       # Scratch Registers
118     device pci 0.7 on end       # North-South Module Interface Control
119     device pci 1.0 on end       # PCI Bridge
120     device pci f.0 on end       # IDE/SATA
121     # device pci f.1 on end     # IDE
122     device pci 10.0 on end      # USB 1.1
123     device pci 10.1 on end      # USB 1.1
124     device pci 10.2 on end      # USB 1.1
125     device pci 10.4 on end      # USB 2.0
126     device pci 11.0 on          # Bus Control and Power Management (SB, LPC)
127       chip superio/winbond/w83697hf
128         # TODO: Check all devices, this may need some more work.
129         device pnp 2e.0 off                   # Floppy (N/A?)
130           io 0x60 = 0x3f0
131           irq 0x70 = 6
132           drq 0x74 = 2
133         end
134         device pnp 2e.1 off                   # Parallel Port (N/A?)
135           io 0x60 = 0x378
136           irq 0x70 = 7
137           drq 0x74 = 4
138         end
139         device pnp 2e.2 on                    # COM1
140           io 0x60 = 0x3f8
141           irq 0x70 = 4
142         end
143         device pnp 2e.3 on                    # COM2
144           io 0x60 = 0x2f8
145           irq 0x70 = 3
146         end
147         device pnp 2e.6 off end               # Consumer IR
148         device pnp 2e.7 off end               # Game port, GPIO 1
149         device pnp 2e.8 off end               # MIDI port, GPIO 5
150         device pnp 2e.9 off end               # GPIO 2-4
151         device pnp 2e.a off end               # ACPI
152         device pnp 2e.b on                    # HWM
153           io 0x60 = 0x290
154         end
155       end
156     end
157     device pci 11.7 on end      # North-South Module Interface Control
158     device pci 14.0 on end      # HD Audio (Azalia)
159   end
160   device apic_cluster 0 on      # APIC cluster
161     chip cpu/via/model_c7       # VIA C7
162       device apic 0 on end      # APIC
163     end
164   end
165 end