Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 102103
b: refs/heads/master
c: e6d95bd
h: refs/heads/master
i:
  102101: ee2f618
  102099: 8437e00
  102095: 0f7f594
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Jul 16, 2008
1 parent 3b054ad commit 5530f67
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 24 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a698400a1556cf9f0376d1a41e536973dd5c4747
refs/heads/master: e6d95bd14928926d6658b5e4ace905e8b83ed27a
6 changes: 3 additions & 3 deletions trunk/drivers/ide/ide-probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1320,10 +1320,10 @@ static void ide_port_init_devices(ide_hwif_t *hwif)
drive->unmask = 1;
if (hwif->host_flags & IDE_HFLAG_NO_UNMASK_IRQS)
drive->no_unmask = 1;
}

if (port_ops && port_ops->port_init_devs)
port_ops->port_init_devs(hwif);
if (port_ops && port_ops->init_dev)
port_ops->init_dev(drive);
}
}

static void ide_init_port(ide_hwif_t *hwif, unsigned int port,
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/ide/legacy/ht6560b.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,16 +310,16 @@ static void ht6560b_set_pio_mode(ide_drive_t *drive, const u8 pio)
#endif
}

static void __init ht6560b_port_init_devs(ide_hwif_t *hwif)
static void __init ht6560b_init_dev(ide_drive_t *drive)
{
ide_hwif_t *hwif = drive->hwif;
/* Setting default configurations for drives. */
int t = (HT_CONFIG_DEFAULT << 8) | HT_TIMING_DEFAULT;

if (hwif->channel)
t |= (HT_SECONDARY_IF << 8);

hwif->drives[0].drive_data = t;
hwif->drives[1].drive_data = t;
drive->drive_data = t;
}

static int probe_ht6560b;
Expand All @@ -328,7 +328,7 @@ module_param_named(probe, probe_ht6560b, bool, 0);
MODULE_PARM_DESC(probe, "probe for HT6560B chipset");

static const struct ide_port_ops ht6560b_port_ops = {
.port_init_devs = ht6560b_port_init_devs,
.init_dev = ht6560b_init_dev,
.set_pio_mode = ht6560b_set_pio_mode,
.selectproc = ht6560b_selectproc,
};
Expand Down
10 changes: 4 additions & 6 deletions trunk/drivers/ide/legacy/ide-4drives.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,14 @@ static int probe_4drives;
module_param_named(probe, probe_4drives, bool, 0);
MODULE_PARM_DESC(probe, "probe for generic IDE chipset with 4 drives/port");

static void ide_4drives_port_init_devs(ide_hwif_t *hwif)
static void ide_4drives_init_dev(ide_drive_t *drive)
{
if (hwif->channel) {
hwif->drives[0].select.all ^= 0x20;
hwif->drives[1].select.all ^= 0x20;
}
if (drive->hwif->channel)
drive->select.all ^= 0x20;
}

static const struct ide_port_ops ide_4drives_port_ops = {
.port_init_devs = ide_4drives_port_init_devs,
.init_dev = ide_4drives_init_dev,
};

static const struct ide_port_info ide_4drives_port_info = {
Expand Down
16 changes: 8 additions & 8 deletions trunk/drivers/ide/legacy/qd65xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,17 +282,18 @@ static int __init qd_testreg(int port)
return (readreg != QD_TESTVAL);
}

static void __init qd6500_port_init_devs(ide_hwif_t *hwif)
static void __init qd6500_init_dev(ide_drive_t *drive)
{
ide_hwif_t *hwif = drive->hwif;
u8 base = (hwif->config_data & 0xff00) >> 8;
u8 config = QD_CONFIG(hwif);

hwif->drives[0].drive_data = QD6500_DEF_DATA;
hwif->drives[1].drive_data = QD6500_DEF_DATA;
drive->drive_data = QD6500_DEF_DATA;
}

static void __init qd6580_port_init_devs(ide_hwif_t *hwif)
static void __init qd6580_init_dev(ide_drive_t *drive)
{
ide_hwif_t *hwif = drive->hwif;
u16 t1, t2;
u8 base = (hwif->config_data & 0xff00) >> 8;
u8 config = QD_CONFIG(hwif);
Expand All @@ -303,18 +304,17 @@ static void __init qd6580_port_init_devs(ide_hwif_t *hwif)
} else
t2 = t1 = hwif->channel ? QD6580_DEF_DATA2 : QD6580_DEF_DATA;

hwif->drives[0].drive_data = t1;
hwif->drives[1].drive_data = t2;
drive->drive_data = drive->select.b.unit ? t2 : t1;
}

static const struct ide_port_ops qd6500_port_ops = {
.port_init_devs = qd6500_port_init_devs,
.init_dev = qd6500_init_dev,
.set_pio_mode = qd6500_set_pio_mode,
.selectproc = qd65xx_select,
};

static const struct ide_port_ops qd6580_port_ops = {
.port_init_devs = qd6580_port_init_devs,
.init_dev = qd6580_init_dev,
.set_pio_mode = qd6580_set_pio_mode,
.selectproc = qd65xx_select,
};
Expand Down
4 changes: 2 additions & 2 deletions trunk/include/linux/ide.h
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,8 @@ typedef struct ide_drive_s {
struct ide_port_info;

struct ide_port_ops {
/* host specific initialization of devices on a port */
void (*port_init_devs)(struct hwif_s *);
/* host specific initialization of a device */
void (*init_dev)(ide_drive_t *);
/* routine to program host for PIO mode */
void (*set_pio_mode)(ide_drive_t *, const u8);
/* routine to program host for DMA mode */
Expand Down

0 comments on commit 5530f67

Please sign in to comment.