diff --git a/arch/amd64/openbios.c b/arch/amd64/openbios.c
index d03c37c..3ae3c35 100644
--- a/arch/amd64/openbios.c
+++ b/arch/amd64/openbios.c
@@ -17,7 +17,6 @@
#include "relocate.h"
void boot(void);
-void ob_ide_init(void);
static char intdict[256 * 1024];
@@ -42,7 +41,7 @@ arch_init( void )
modules_init();
#ifdef CONFIG_DRIVER_IDE
setup_timers();
- ob_ide_init();
+ ob_ide_init("/pci/pci-ata", 0x1f0, 0x3f4, 0x170, 0x374);
#endif
device_end();
bind_func("platform-boot", boot );
diff --git a/arch/ppc/briq/init.c b/arch/ppc/briq/init.c
index 90ccac2..0fbaaa1 100644
--- a/arch/ppc/briq/init.c
+++ b/arch/ppc/briq/init.c
@@ -27,7 +27,6 @@
#include "openbios-version.h"
extern void unexpected_excep( int vector );
-extern void ob_ide_init( void );
extern void setup_timers( void );
#if 0
@@ -91,15 +90,11 @@ arch_of_init( void )
devtree_init();
node_methods_init();
- nvram_init("/pci/mac-io/nvram");
modules_init();
+ setup_timers();
#ifdef CONFIG_DRIVER_PCI
ob_pci_init();
#endif
-#ifdef CONFIG_DRIVER_IDE
- setup_timers();
- ob_ide_init();
-#endif
#if USE_RTAS
if( !(ph=find_dev("/rtas")) )
diff --git a/arch/ppc/briq/tree.fs b/arch/ppc/briq/tree.fs
index eeef903..ae50326 100644
--- a/arch/ppc/briq/tree.fs
+++ b/arch/ppc/briq/tree.fs
@@ -81,6 +81,65 @@ finish-device
h# FF500000 encode-int h# 100000 encode-int encode+ " reg" property
0 encode-int 0 encode-int encode+ " bus-range" property
+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/pci-ata/ata-1/disk@0" ?devalias not if
+ " /pci/pci-ata/ata-1/disk@1" ?devalias not if
+ " /pci/pci-ata/ata-2/disk@0" ?devalias not if
+ " /pci/pci-ata/ata-2/disk@1" ?devalias not if
+ 2drop ." No disk found." cr
+ then
+ then
+ then
+ then
+
+ " cdrom"
+ " /pci/pci-ata/ata-1/cdrom@0" ?devalias not if
+ " /pci/pci-ata/ata-1/cdrom@1" ?devalias not if
+ " /pci/pci-ata/ata-2/cdrom@0" ?devalias not if
+ " /pci/pci-ata/ata-2/cdrom@1" ?devalias not if
+ 2drop ." No cdrom found" cr
+ then
+ then
+ then
+ then
+; SYSTEM-initializer
+
new-device
" ide" device-name
" ide" device-type
diff --git a/arch/ppc/pearpc/init.c b/arch/ppc/pearpc/init.c
index d0e1eed..06c83e5 100644
--- a/arch/ppc/pearpc/init.c
+++ b/arch/ppc/pearpc/init.c
@@ -28,7 +28,6 @@
#include "openbios-version.h"
extern void unexpected_excep( int vector );
-extern void ob_ide_init( void );
extern void ob_pci_init( void );
extern void ob_adb_init( void );
extern void setup_timers( void );
@@ -95,17 +94,10 @@ arch_of_init( void )
devtree_init();
nvram_init("/pci/mac-io/nvram");
modules_init();
+ setup_timers();
#ifdef CONFIG_DRIVER_PCI
ob_pci_init();
#endif
-#ifdef CONFIG_DRIVER_IDE
- setup_timers();
- ob_ide_init();
-#endif
-#ifdef CONFIG_DRIVER_ADB
- ob_adb_init();
-#endif
-
node_methods_init();
init_video();
diff --git a/arch/ppc/pearpc/tree.fs b/arch/ppc/pearpc/tree.fs
index e45ee44..d19b485 100644
--- a/arch/ppc/pearpc/tree.fs
+++ b/arch/ppc/pearpc/tree.fs
@@ -81,6 +81,65 @@ finish-device
h# FEC00000 encode-int h# 100000 encode-int encode+ " reg" property
0 encode-int 0 encode-int encode+ " bus-range" property
+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/pci-ata/ata-1/disk@0" ?devalias not if
+ " /pci/pci-ata/ata-1/disk@1" ?devalias not if
+ " /pci/pci-ata/ata-2/disk@0" ?devalias not if
+ " /pci/pci-ata/ata-2/disk@1" ?devalias not if
+ 2drop ." No disk found." cr
+ then
+ then
+ then
+ then
+
+ " cdrom"
+ " /pci/pci-ata/ata-1/cdrom@0" ?devalias not if
+ " /pci/pci-ata/ata-1/cdrom@1" ?devalias not if
+ " /pci/pci-ata/ata-2/cdrom@0" ?devalias not if
+ " /pci/pci-ata/ata-2/cdrom@1" ?devalias not if
+ 2drop ." No cdrom found" cr
+ then
+ then
+ then
+ then
+; SYSTEM-initializer
+
new-device
" ide" device-name
" ide" device-type
diff --git a/arch/ppc/qemu/init.c b/arch/ppc/qemu/init.c
index 6d737e3..6593b84 100644
--- a/arch/ppc/qemu/init.c
+++ b/arch/ppc/qemu/init.c
@@ -29,7 +29,6 @@
#include "openbios-version.h"
extern void unexpected_excep( int vector );
-extern void ob_ide_init( void );
extern void ob_pci_init( void );
extern void setup_timers( void );
@@ -108,10 +107,6 @@ arch_of_init( void )
#ifdef CONFIG_DRIVER_PCI
ob_pci_init();
#endif
-#ifdef CONFIG_DRIVER_IDE
- ob_ide_init();
-#endif
-
node_methods_init();
#ifdef USE_RTAS
diff --git a/arch/ppc/qemu/tree.fs b/arch/ppc/qemu/tree.fs
index 04bd1c5..f9e071b 100644
--- a/arch/ppc/qemu/tree.fs
+++ b/arch/ppc/qemu/tree.fs
@@ -81,6 +81,65 @@ finish-device
h# FEC00000 encode-int h# 100000 encode-int encode+ " reg" property
0 encode-int 0 encode-int encode+ " bus-range" property
+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/pci-ata/ata-1/disk@0" ?devalias not if
+ " /pci/pci-ata/ata-1/disk@1" ?devalias not if
+ " /pci/pci-ata/ata-2/disk@0" ?devalias not if
+ " /pci/pci-ata/ata-2/disk@1" ?devalias not if
+ 2drop ." No disk found." cr
+ then
+ then
+ then
+ then
+
+ " cdrom"
+ " /pci/pci-ata/ata-1/cdrom@0" ?devalias not if
+ " /pci/pci-ata/ata-1/cdrom@1" ?devalias not if
+ " /pci/pci-ata/ata-2/cdrom@0" ?devalias not if
+ " /pci/pci-ata/ata-2/cdrom@1" ?devalias not if
+ 2drop ." No cdrom found" cr
+ then
+ then
+ then
+ then
+; SYSTEM-initializer
+
new-device
" ide" device-name
" ide" device-type
diff --git a/arch/sparc64/openbios.c b/arch/sparc64/openbios.c
index c74dde5..7d7a0fe 100644
--- a/arch/sparc64/openbios.c
+++ b/arch/sparc64/openbios.c
@@ -865,7 +865,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();
diff --git a/arch/sparc64/tree.fs b/arch/sparc64/tree.fs
index 5a47678..b02aeb9 100644
--- a/arch/sparc64/tree.fs
+++ b/arch/sparc64/tree.fs
@@ -32,3 +32,65 @@ finish-device
" /openprom" find-device
" OBP 3.10.24 1999/01/01 01:01" encode-string " version" property
+
+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
diff --git a/arch/x86/init.fs b/arch/x86/init.fs
index 12c75da..05713cb 100644
--- a/arch/x86/init.fs
+++ b/arch/x86/init.fs
@@ -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
diff --git a/arch/x86/openbios.c b/arch/x86/openbios.c
index b95e9b0..46812fc 100644
--- a/arch/x86/openbios.c
+++ b/arch/x86/openbios.c
@@ -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();
diff --git a/config/examples/cross-ppc_config.xml b/config/examples/cross-ppc_config.xml
index a243d9f..16a561f 100644
--- a/config/examples/cross-ppc_config.xml
+++ b/config/examples/cross-ppc_config.xml
@@ -66,7 +66,10 @@
-
+
+
+
+
diff --git a/config/xml/config-c.xsl b/config/xml/config-c.xsl
index b49b456..62ed854 100644
--- a/config/xml/config-c.xsl
+++ b/config/xml/config-c.xsl
@@ -34,6 +34,11 @@
+
+
+
+ #define
+ ""
diff --git a/config/xml/config-forth.xsl b/config/xml/config-forth.xsl
index 4decba1..cace0de 100644
--- a/config/xml/config-forth.xsl
+++ b/config/xml/config-forth.xsl
@@ -26,6 +26,9 @@
+
+
+
ERROR: configuration option '' has unsupported type ''.
diff --git a/drivers/build.xml b/drivers/build.xml
index 4496b89..cb7c1e8 100644
--- a/drivers/build.xml
+++ b/drivers/build.xml
@@ -19,7 +19,6 @@
-
diff --git a/drivers/ide.c b/drivers/ide.c
index c993fe8..2de7174 100644
--- a/drivers/ide.c
+++ b/drivers/ide.c
@@ -13,11 +13,6 @@
*
*/
-/*
- * TODO:
- * - Really probe for interfaces, don't just rely on legacy
- */
-
#include "openbios/config.h"
#include "openbios/bindings.h"
#include "openbios/kernel.h"
@@ -43,13 +38,30 @@ DECLARE_UNNAMED_NODE( ob_ide_ctrl, INSTALL_OPEN, sizeof(int));
#endif
#define IDE_MAX_CHANNELS 4
+#ifndef CONFIG_IDE_FIRST_UNIT
+#define FIRST_UNIT 0
+#else
+#define FIRST_UNIT CONFIG_IDE_FIRST_UNIT
+#endif
+
+#ifndef CONFIG_IDE_DEV_TYPE
+#define DEV_TYPE "ide"
+#else
+#define DEV_TYPE CONFIG_IDE_DEV_TYPE
+#endif
+
+#ifndef CONFIG_IDE_DEV_NAME
+#define DEV_NAME "ide%d"
+#else
+#define DEV_NAME CONFIG_IDE_DEV_NAME
+#endif
+
+static int current_channel = FIRST_UNIT;
+
static struct ide_channel ob_ide_channels[IDE_MAX_CHANNELS];
-/*
- * FIXME: probe, we just hardwire legacy ports for now
- */
-static const int io_ports[IDE_MAX_CHANNELS] = { 0x1f0, 0x170, 0x1e8, 0x168 };
-static const int ctl_ports[IDE_MAX_CHANNELS] = { 0x3f6, 0x376, 0x3ee, 0x36e };
+static int io_ports[IDE_MAX_CHANNELS];
+static int ctl_ports[IDE_MAX_CHANNELS];
/*
* don't be pedantic
@@ -634,6 +646,9 @@ ob_ide_atapi_drive_ready(struct ide_drive *drive)
struct atapi_command *cmd = &drive->channel->atapi_cmd;
struct atapi_capacity cap;
+#ifdef CONFIG_DEBUG_IDE
+ printk("ob_ide_atapi_drive_ready\n");
+#endif
/*
* Test Unit Ready is like a ping
*/
@@ -835,7 +850,8 @@ ob_ide_read_sectors(struct ide_drive *drive, unsigned long long block,
return 1;
#ifdef CONFIG_DEBUG_IDE
- printk("ob_ide_read_sectors: block=%Ld sectors=%u\n", (unsigned long) block, sectors);
+ printk("ob_ide_read_sectors: block=%lu sectors=%u\n",
+ (unsigned long) block, sectors);
#endif
if (drive->type == ide_type_ata)
@@ -1133,6 +1149,9 @@ static void
ob_ide_max_transfer(int *idx)
{
struct ide_drive *drive=&ob_ide_channels[idx[1]].drives[idx[0]];
+#ifdef CONFIG_DEBUG_IDE
+ printk("max_transfer %x\n", drive->max_sectors * drive->bs);
+#endif
PUSH(drive->max_sectors * drive->bs);
}
@@ -1171,6 +1190,9 @@ static void
ob_ide_block_size(int *idx)
{
struct ide_drive *drive=&ob_ide_channels[idx[1]].drives[idx[0]];
+#ifdef CONFIG_DEBUG_IDE
+ printk("ob_ide_block_size: block size %x\n", drive->bs);
+#endif
PUSH(drive->bs);
}
@@ -1184,6 +1206,10 @@ ob_ide_initialize(int *idx)
fword("device-type");
// Set dummy reg properties
+
+ set_int_property(ph, "#address-cells", 1);
+ set_int_property(ph, "#size-cells", 0);
+
props[0] = __cpu_to_be32(0); props[1] = __cpu_to_be32(0); props[2] = __cpu_to_be32(0);
set_property(ph, "reg", (char *)&props, 3*sizeof(int));
@@ -1205,7 +1231,7 @@ ob_ide_open(int *idx)
fword("ihandle>phandle");
ph=(phandle_t)POP();
idename=get_property(ph, "name", &len);
- idx[1]=idename[3]-0x30;
+ idx[1]=(idename[strlen(idename) - 1] - '0' - FIRST_UNIT) % 2;
#ifdef CONFIG_DEBUG_IDE
printk("opening channel %d unit %d\n", idx[1], idx[0]);
@@ -1249,20 +1275,21 @@ ob_ide_ctrl_initialize(int *idx)
phandle_t ph=get_cur_dev();
char *idename;
- set_int_property(ph, "#address-cells", 1);
- set_int_property(ph, "#size-cells", 0);
-
/* set device type */
- push_str("ide");
+ push_str(DEV_TYPE);
fword("device-type");
idename=get_property(ph, "name", &len);
- devnum=idename[3]-0x30;
+ devnum=idename[strlen(idename) - 1] - '0' - FIRST_UNIT;
/* Create interrupt properties. */
props[0]=14; props[1]=0;
set_property(ph, "interrupts", (char *)&props, 2*sizeof(int));
+ set_property(ph, "compatible", "pci1095,646\0pci1095,646\0pciclass,01018f", 40);
+ set_int_property(ph, "#address-cells", 1);
+ set_int_property(ph, "#size-cells", 0);
+
props[0] = __cpu_to_be32(io_ports[devnum]);
props[1] = __cpu_to_be32(1); props[2] = __cpu_to_be32(8);
props[3] = __cpu_to_be32(ctl_ports[devnum]);
@@ -1281,16 +1308,21 @@ NODE_METHODS(ob_ide_ctrl) = {
{ "decode-unit", ob_ide_ctrl_decodeunit },
};
-int ob_ide_init(void)
+int ob_ide_init(const char *path, uint32_t io_port0, uint32_t ctl_port0,
+ uint32_t io_port1, uint32_t ctl_port1)
{
int i, j;
-
- const char *nodetemp_chan = "/pci/isa/ide%d";
- const char *nodetemp = "/pci/isa/ide%d/%s";
+ const char * nodetemp_chan = "%s/"DEV_NAME;
+ const char * nodetemp = "%s/"DEV_NAME"/%s";
char nodebuff[32];
phandle_t dnode;
- for (i = 0; i < IDE_NUM_CHANNELS; i++) {
+ io_ports[0] = io_port0;
+ ctl_ports[0] = ctl_port0 + 2;
+ io_ports[1] = io_port1;
+ ctl_ports[1] = ctl_port1 + 2;
+
+ for (i = 0; i < IDE_NUM_CHANNELS; i++, current_channel++) {
struct ide_channel *chan = &ob_ide_channels[i];
chan->mmio = 0;
@@ -1330,10 +1362,13 @@ int ob_ide_init(void)
ob_ide_identify_drives(chan);
- snprintf(nodebuff, sizeof(nodebuff), nodetemp_chan, i);
+ snprintf(nodebuff, sizeof(nodebuff), nodetemp_chan, path,
+ current_channel);
REGISTER_NAMED_NODE(ob_ide_ctrl, nodebuff);
+ printk(DEV_NAME": [io ports 0x%x-0x%x,0x%x]\n",
+ current_channel, chan->io_regs[0],
+ chan->io_regs[0] + 7, chan->io_regs[8]);
- printk("ide%d: [io ports 0x%x-0x%x,0x%x]\n", i, chan->io_regs[0], chan->io_regs[0] + 7, chan->io_regs[8]);
for (j = 0; j < 2; j++) {
struct ide_drive *drive = &chan->drives[j];
const char *media = "UNKNOWN";
@@ -1357,8 +1392,8 @@ int ob_ide_init(void)
break;
}
printk("%s]: %s\n", media, drive->model);
- snprintf(nodebuff, sizeof(nodebuff), nodetemp, i,
- media);
+ snprintf(nodebuff, sizeof(nodebuff), nodetemp, path,
+ current_channel, media);
REGISTER_NAMED_NODE(ob_ide, nodebuff);
dnode=find_dev(nodebuff);
set_int_property(dnode, "reg", j);
diff --git a/drivers/pci.c b/drivers/pci.c
index 5e96c8b..f56cb4b 100644
--- a/drivers/pci.c
+++ b/drivers/pci.c
@@ -147,13 +147,11 @@ static const pci_subclass_t undef_subclass[] = {
static int ide_config_cb2 (const pci_config_t *config)
{
-#if 0
- ide_init(config->path,
- config->regions[0] & ~0x0000000F,
- config->regions[1] & ~0x0000000F,
- config->regions[2] & ~0x0000000F,
- config->regions[3] & ~0x0000000F);
-#endif
+ ob_ide_init(config->path,
+ config->regions[0] & ~0x0000000F,
+ config->regions[1] & ~0x0000000F,
+ config->regions[2] & ~0x0000000F,
+ config->regions[3] & ~0x0000000F);
return 0;
}
@@ -1092,6 +1090,7 @@ static const pci_class_t pci_classes[] = {
phandle_t pic_handle;
static int macio_config_cb (const pci_config_t *config)
{
+#ifdef CONFIG_PPC
char buf[64];
phandle_t ph;
cell props[2];
@@ -1108,21 +1107,10 @@ static int macio_config_cb (const pci_config_t *config)
set_property(ph, "reg", &props, sizeof(props));
pic_handle = ph;
-#if 0
cuda_init(config->path, config->regions[0]);
macio_nvram_init(config->path, config->regions[0]);
- ide_init(config->path,
- config->regions[0] + 0x1f000,
- config->regions[0] + 0x1f000 + 0x1000,
- config->regions[0] + 0x1f000 + 0x2000,
- config->regions[0] + 0x1f000 + 0x3000);
#endif
-#if 0
- OF_finalize_pci_macio(device->common.OF_private,
- device->regions[0] & ~0x0000000F, device->sizes[0],
- private_data);
-#endif
- return 0;
+ return 0;
}
static const pci_dev_t misc_pci[] = {
diff --git a/include/openbios/drivers.h b/include/openbios/drivers.h
index 51d49fc..1ab1620 100644
--- a/include/openbios/drivers.h
+++ b/include/openbios/drivers.h
@@ -26,7 +26,8 @@ void init_video(unsigned long fb, int width, int height, int depth, int rb);
#endif
#endif
#ifdef CONFIG_DRIVER_IDE
-int ob_ide_init(void);
+int ob_ide_init(const char *path, uint32_t io_port0, uint32_t ctl_port0,
+ uint32_t io_port1, uint32_t ctl_port1);
#endif
#ifdef CONFIG_DRIVER_ESP
int ob_esp_init(unsigned int slot, uint64_t base, unsigned long espoffset,