This patch unifies the use of config options in v2 to all start with CONFIG_
[coreboot.git] / src / mainboard / asus / a8v-e_se / Config.lb
1 ## 
2 ## This file is part of the coreboot project.
3 ## 
4 ## Copyright (C) 2007 AMD
5 ## (Written by Yinghai Lu <yinghailu@amd.com> for AMD)
6 ## Copyright (C) 2007 Rudolf Marek <r.marek@assembler.cz>
7 ## 
8 ## This program is free software; you can redistribute it and/or modify
9 ## it under the terms of the GNU General Public License as published by
10 ## the Free Software Foundation; either version 2 of the License, or
11 ## (at your option) any later version.
12 ## 
13 ## This program is distributed in the hope that it will be useful,
14 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 ## GNU General Public License for more details.
17 ## 
18 ## You should have received a copy of the GNU General Public License
19 ## along with this program; if not, write to the Free Software
20 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
21 ## 
22
23 ## CONFIG_XIP_ROM_SIZE must be a power of 2.
24 default CONFIG_XIP_ROM_SIZE = 64 * 1024
25 include /config/nofailovercalculation.lb
26 default CONFIG_ROM_PAYLOAD = 1
27
28 arch i386 end 
29
30 driver mainboard.o
31 if CONFIG_HAVE_ACPI_TABLES
32   object acpi_tables.o
33   makerule dsdt.c
34     depends "$(CONFIG_MAINBOARD)/dsdt.asl"
35     action  "iasl -p $(CURDIR)/dsdt -tc $(CONFIG_MAINBOARD)/dsdt.asl"
36     action  "mv dsdt.hex dsdt.c"
37   end
38   object ./dsdt.o
39 end
40 if CONFIG_HAVE_MP_TABLE object mptable.o end
41 if CONFIG_HAVE_PIRQ_TABLE object irq_tables.o end
42 # object reset.o
43
44   if CONFIG_USE_INIT
45     makerule ./cache_as_ram_auto.o
46       depends "$(CONFIG_MAINBOARD)/cache_as_ram_auto.c option_table.h"
47       action "$(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) -I$(TOP)/src -I. -c $(CONFIG_MAINBOARD)/cache_as_ram_auto.c -o $@"
48     end
49   else
50     makerule ./cache_as_ram_auto.inc
51       depends "$(CONFIG_MAINBOARD)/cache_as_ram_auto.c option_table.h"
52       action "$(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(DEBUG_CFLAGS) -I$(TOP)/src -I. -c -S $(CONFIG_MAINBOARD)/cache_as_ram_auto.c -o $@"
53       action "perl -e 's/\.rodata/.rom.data/g' -pi $@"
54       action "perl -e 's/\.text/.section .rom.text/g' -pi $@"
55     end
56   end
57
58 if CONFIG_USE_FALLBACK_IMAGE
59   mainboardinit cpu/x86/16bit/entry16.inc
60   ldscript /cpu/x86/16bit/entry16.lds
61   mainboardinit southbridge/via/k8t890/romstrap.inc
62   ldscript /southbridge/via/k8t890/romstrap.lds
63 end
64
65 mainboardinit cpu/x86/32bit/entry32.inc
66
67   if CONFIG_USE_INIT
68     ldscript /cpu/x86/32bit/entry32.lds
69   end
70   if CONFIG_USE_INIT
71     ldscript /cpu/amd/car/cache_as_ram.lds
72   end
73
74 if CONFIG_USE_FALLBACK_IMAGE
75   mainboardinit cpu/x86/16bit/reset16.inc
76   ldscript /cpu/x86/16bit/reset16.lds
77 else
78   mainboardinit cpu/x86/32bit/reset32.inc
79   ldscript /cpu/x86/32bit/reset32.lds
80 end
81
82   mainboardinit cpu/amd/car/cache_as_ram.inc
83
84 if CONFIG_USE_FALLBACK_IMAGE
85     ldscript /arch/i386/lib/failover.lds
86 end
87
88   if CONFIG_USE_INIT
89     initobject cache_as_ram_auto.o
90   else
91     mainboardinit ./cache_as_ram_auto.inc
92   end
93
94 config chip.h
95
96 chip northbridge/amd/amdk8/root_complex         # Root complex
97   device apic_cluster 0 on                      # APIC cluster
98     chip cpu/amd/socket_939                     # CPU
99       device apic 0 on end                      # APIC
100     end
101   end
102   device pci_domain 0 on                        # PCI domain
103     chip northbridge/amd/amdk8                  # mc0
104       device pci 18.0 on                        # Northbridge
105         # Devices on link 0, link 0 == LDT 0
106         chip southbridge/via/vt8237r            # Southbridge
107           register "ide0_enable" = "1"          # Enable IDE channel 0
108           register "ide1_enable" = "1"          # Enable IDE channel 1
109           register "ide0_80pin_cable" = "1"     # 80pin cable on IDE channel 0
110           register "ide1_80pin_cable" = "1"     # 80pin cable on IDE channel 1
111           register "fn_ctrl_lo" = "0"           # Enable SB functions
112           register "fn_ctrl_hi" = "0xad"        # Enable SB functions
113           device pci 0.0 on end                 # HT
114           device pci f.1 on end                 # IDE
115           device pci 11.0 on                    # LPC
116             chip drivers/generic/generic        # DIMM 0-0-0
117               device i2c 50 on end
118             end
119             chip drivers/generic/generic        # DIMM 0-0-1
120               device i2c 51 on end
121             end
122             chip drivers/generic/generic        # DIMM 0-1-0
123               device i2c 52 on end
124             end
125             chip drivers/generic/generic        # DIMM 0-1-1
126               device i2c 53 on end
127             end
128             chip superio/winbond/w83627ehg      # Super I/O
129               device pnp 2e.0 on                # Floppy
130                 io 0x60 = 0x3f0
131                 irq 0x70 = 6
132                 drq 0x74 = 2
133               end
134               device pnp 2e.1 on                # Parallel port
135                 io 0x60 = 0x378
136                 irq 0x70 = 7
137                 drq 0x74 = 3
138               end
139               device pnp 2e.2 on                # Com1
140                 io 0x60 = 0x3f8
141                 irq 0x70 = 4
142               end
143               device pnp 2e.3 off               # Com2 (N/A on this board)
144                 io 0x60 = 0x2f8
145                 irq 0x70 = 3
146               end
147               device pnp 2e.5 off               # PS/2 keyboard (off)
148               end
149               device pnp 2e.106 off             # Serial flash
150                 io 0x60 = 0x100
151               end
152               device pnp 2e.007 off             # GPIO 1
153               end
154               device pnp 2e.107 on              # Game port
155                 io 0x60 = 0x201
156               end
157               device pnp 2e.207 on              # MIDI
158                 io 0x62 = 0x330
159                 irq 0x70 = 0xa
160               end
161               device pnp 2e.307 off             # GPIO 6
162               end
163               device pnp 2e.8 off               # WDTO_PLED
164               end
165               device pnp 2e.009 on              # GPIO 2 on LDN 9 is in sio_setup
166               end
167               device pnp 2e.109 off             # GPIO 3
168               end
169               device pnp 2e.209 off             # GPIO 4
170               end
171               device pnp 2e.309 on              # GPIO5
172               end
173               device pnp 2e.a off               # ACPI
174               end
175               device pnp 2e.b on                # Hardware monitor
176                 io 0x60 = 0x290
177                 irq 0x70 = 0
178               end
179             end
180           end
181           device pci 12.0 off end               # VIA LAN (off, other chip used)
182         end
183         chip southbridge/via/k8t890             # "Southbridge" K8T890
184         end
185       end
186       device pci 18.1 on end
187       device pci 18.2 on end
188       device pci 18.3 on end
189     end
190   end
191 end