--- zzzz-none-000/linux-2.4.17/arch/mips/lib/ide-std.c 2001-09-09 17:43:01.000000000 +0000 +++ sangam-fb-401/linux-2.4.17/arch/mips/lib/ide-std.c 2005-05-13 14:40:06.000000000 +0000 @@ -48,12 +48,16 @@ ide_ioreg_t reg = data_port; int i; + DBG_IDE( "std_ide_init_hwif_ports: 0x%04X 0x%04X %d", data_port, ctrl_port, irq ); + for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) { - hw->io_ports[i] = reg; + /* hw->io_ports[i] = reg; */ + hw->io_ports[i] = ( reg & 0xffffff70 ) | (( reg & 0x7 ) << 1 ); /* FIXME */ reg += 1; } if (ctrl_port) { - hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port; +/* hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port; */ + hw->io_ports[IDE_CONTROL_OFFSET] = ( ctrl_port & 0xfffffff0 ) | (( ctrl_port & 0x7 ) << 1 ); /* FIXME */ } else { hw->io_ports[IDE_CONTROL_OFFSET] = hw->io_ports[IDE_DATA_OFFSET] + 0x206; } @@ -67,6 +71,7 @@ unsigned long flags, const char *device, void *dev_id) { + DBG_IDE( "std_ide_request_irq: %d", irq ); return request_irq(irq, handler, flags, device, dev_id); } @@ -77,17 +82,20 @@ static int std_ide_check_region(ide_ioreg_t from, unsigned int extent) { - return check_region(from, extent); + DBG_IDE( "std_ide_check_region: 0x%X (%d)", from, extent ); + return 0; /* check_region(from, extent); */ } static void std_ide_request_region(ide_ioreg_t from, unsigned int extent, const char *name) { + DBG_IDE( "std_ide_request_region: 0x%X %d %s", from, extent, name ? : "???" ); request_region(from, extent, name); } static void std_ide_release_region(ide_ioreg_t from, unsigned int extent) { + DBG_IDE( "std_ide_request_region: 0x%X %d", from, extent ); release_region(from, extent); }