IDE fixes for PPC (Laurent Vivier)

git-svn-id: svn://coreboot.org/openbios/openbios-devel@292 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Blue Swirl
2008-12-20 14:48:40 +00:00
parent 5766c8fb3a
commit edafcf6e86
18 changed files with 388 additions and 72 deletions

View File

@@ -75,3 +75,65 @@ finish-device
" keyboard" input
; CONSOLE-IN-initializer
dev /pci
\ simple isa bus node
new-device
" isa" device-name
" isa" device-type
2 encode-int " #address-cells" property
1 encode-int " #size-cells" property
external
: open true ;
: close ;
finish-device
: ?devalias ( alias-str alias-len device-str device-len --
\ alias-str alias-len false | true )
active-package >r
" /aliases" find-device
\ 2dup ." Checking " type
2dup find-dev if \ check if device exists
drop
2over find-dev if \ do we already have an alias?
\ ." alias exists" cr
drop 2drop false
else
\ ." device exists" cr
encode-string
2swap property
true
then
else
\ ." device doesn't exist" cr
2drop false
then
r> active-package!
;
:noname
" hd"
" /pci/isa/ide0/disk@0" ?devalias not if
" /pci/isa/ide0/disk@1" ?devalias not if
" /pci/isa/ide1/disk@0" ?devalias not if
" /pci/isa/ide1/disk@1" ?devalias not if
2drop ." No disk found." cr
then
then
then
then
" cdrom"
" /pci/isa/ide0/cdrom@0" ?devalias not if
" /pci/isa/ide0/cdrom@1" ?devalias not if
" /pci/isa/ide1/cdrom@0" ?devalias not if
" /pci/isa/ide1/cdrom@1" ?devalias not if
2drop ." No cdrom found" cr
then
then
then
then
; SYSTEM-initializer

View File

@@ -45,7 +45,7 @@ arch_init( void )
#endif
#ifdef CONFIG_DRIVER_IDE
setup_timers();
ob_ide_init();
ob_ide_init("/pci/isa", 0x1f0, 0x3f4, 0x170, 0x374);
#endif
#ifdef CONFIG_DRIVER_FLOPPY
ob_floppy_init();