Author: mcayland Date: Mon Jan 13 09:57:51 2014 New Revision: 1247 URL: http://tracker.coreboot.org/trac/openbios/changeset/1247
Log: ide: change ob_ide_init() to take usual control base addresses
The +2 offset comes from the PCI IDE controllers, where control status must be accessed at BAR1+2 and BAR3+2.
Signed-off-by: Hervé Poussineau hpoussin@reactos.org Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk
Modified: trunk/openbios-devel/arch/amd64/openbios.c trunk/openbios-devel/arch/x86/openbios.c trunk/openbios-devel/drivers/ide.c trunk/openbios-devel/drivers/pci.c
Modified: trunk/openbios-devel/arch/amd64/openbios.c ============================================================================== --- trunk/openbios-devel/arch/amd64/openbios.c Fri Dec 20 11:45:54 2013 (r1246) +++ trunk/openbios-devel/arch/amd64/openbios.c Mon Jan 13 09:57:51 2014 (r1247) @@ -44,7 +44,7 @@ modules_init(); #ifdef CONFIG_DRIVER_IDE setup_timers(); - ob_ide_init("/pci/pci-ata", 0x1f0, 0x3f4, 0x170, 0x374); + ob_ide_init("/pci/pci-ata", 0x1f0, 0x3f6, 0x170, 0x376); #endif device_end(); bind_func("platform-boot", boot );
Modified: trunk/openbios-devel/arch/x86/openbios.c ============================================================================== --- trunk/openbios-devel/arch/x86/openbios.c Fri Dec 20 11:45:54 2013 (r1246) +++ trunk/openbios-devel/arch/x86/openbios.c Mon Jan 13 09:57:51 2014 (r1247) @@ -57,7 +57,7 @@ #endif #ifdef CONFIG_DRIVER_IDE setup_timers(); - ob_ide_init("/pci/isa", 0x1f0, 0x3f4, 0x170, 0x374); + ob_ide_init("/pci/isa", 0x1f0, 0x3f6, 0x170, 0x376); #endif #ifdef CONFIG_DRIVER_FLOPPY ob_floppy_init("/isa", "floppy0", 0x3f0, 0);
Modified: trunk/openbios-devel/drivers/ide.c ============================================================================== --- trunk/openbios-devel/drivers/ide.c Fri Dec 20 11:45:54 2013 (r1246) +++ trunk/openbios-devel/drivers/ide.c Mon Jan 13 09:57:51 2014 (r1247) @@ -1372,9 +1372,9 @@ u32 props[6];
io_ports[0] = io_port0; - ctl_ports[0] = ctl_port0 + 2; + ctl_ports[0] = ctl_port0; io_ports[1] = io_port1; - ctl_ports[1] = ctl_port1 + 2; + ctl_ports[1] = ctl_port1;
for (i = 0; i < IDE_NUM_CHANNELS; i++, current_channel++) {
Modified: trunk/openbios-devel/drivers/pci.c ============================================================================== --- trunk/openbios-devel/drivers/pci.c Fri Dec 20 11:45:54 2013 (r1246) +++ trunk/openbios-devel/drivers/pci.c Mon Jan 13 09:57:51 2014 (r1247) @@ -584,9 +584,9 @@ { ob_ide_init(config->path, config->assigned[0] & ~0x0000000F, - config->assigned[1] & ~0x0000000F, + (config->assigned[1] & ~0x0000000F) + 2, config->assigned[2] & ~0x0000000F, - config->assigned[3] & ~0x0000000F); + (config->assigned[3] & ~0x0000000F) + 2); return 0; }