1 \ *****************************************************************************
2 \ * Copyright (c) 2004, 2008 IBM Corporation
3 \ * All rights reserved.
4 \ * This program and the accompanying materials
5 \ * are made available under the terms of the BSD License
6 \ * which accompanies this distribution, and is available at
7 \ * http://www.opensource.org/licenses/bsd-license.php
10 \ * IBM Corporation - initial implementation
11 \ ****************************************************************************/
13 my-space pci-class-name type
15 my-space pci-device-generic-setup
17 my-space pci-class-name device-type
19 \ add legacy I/O Ports / Memory regions to assigned-addresses
20 \ see PCI Bus Binding Revision 2.1 Section 7.
21 s" reg" get-my-property
23 \ "reg" does not exist, create new
26 \ "reg" does exist, copy it
29 \ I/O Range 0x3B0-0x3BB
30 my-space a1000000 or encode-int+ \ non-relocatable, aliased I/O space
33 \ I/O Range 0x3C0-0x3DF
34 my-space a1000000 or encode-int+ \ non-relocatable, aliased I/O space
37 \ the U4 does not support memory accesses to this region... so we dont put it into "reg"
38 \ maybe with some clever hacking of the address map registers it will be possible to access
40 \ Memory Range 0xA0000-0xBFFFF
41 \ my-space a2000000 or encode-int+ \ non-relocatable, <1MB Memory space
42 \ a0000 encode-64+ \ addr
43 \ 20000 encode-64+ \ size
45 s" reg" property \ store "reg" property
47 \ check wether we have already found a vga-device (vga-device-node? != 0) and if
48 \ this device has Expansion ROM
49 vga-device-node? 0= 30 config-l@ 0<> AND IF
50 \ remember this vga device's phandle
51 get-node to vga-device-node?