You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
ide: add struct ide_io_ports (take 3)
* Add struct ide_io_ports and use it instead of `unsigned long io_ports[]` in ide_hwif_t. * Rename io_ports[] in hw_regs_t to io_ports_array[]. * Use un-named union for 'unsigned long io_ports_array[]' and 'struct ide_io_ports io_ports' in hw_regs_t. * Remove IDE_*_OFFSET defines. v2: * scc_pata.c build fix from Stephen Rothwell. v3: * Fix ctl_adrr typo in Sparc-specific part of ns87415.c. (Noticed by Andrew Morton) Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This commit is contained in:
@@ -560,7 +560,7 @@ static ide_startstop_t cdrom_start_packet_command(ide_drive_t *drive,
|
||||
/* packet command */
|
||||
spin_lock_irqsave(&ide_lock, flags);
|
||||
hwif->OUTBSYNC(drive, WIN_PACKETCMD,
|
||||
hwif->io_ports[IDE_COMMAND_OFFSET]);
|
||||
hwif->io_ports.command_addr);
|
||||
ndelay(400);
|
||||
spin_unlock_irqrestore(&ide_lock, flags);
|
||||
|
||||
@@ -952,9 +952,9 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
|
||||
}
|
||||
|
||||
/* ok we fall to pio :/ */
|
||||
ireason = hwif->INB(hwif->io_ports[IDE_IREASON_OFFSET]) & 0x3;
|
||||
lowcyl = hwif->INB(hwif->io_ports[IDE_BCOUNTL_OFFSET]);
|
||||
highcyl = hwif->INB(hwif->io_ports[IDE_BCOUNTH_OFFSET]);
|
||||
ireason = hwif->INB(hwif->io_ports.nsect_addr) & 0x3;
|
||||
lowcyl = hwif->INB(hwif->io_ports.lbam_addr);
|
||||
highcyl = hwif->INB(hwif->io_ports.lbah_addr);
|
||||
|
||||
len = lowcyl + (256 * highcyl);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user