Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 102096
b: refs/heads/master
c: 26839f0
h: refs/heads/master
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Jul 16, 2008
1 parent 0f7f594 commit 958f972
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 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: dccdf527379dc2fe8a4efc5c75601d1d4035a750
refs/heads/master: 26839f09ca2d0f4239e546cd912bc9f4694f3c5e
25 changes: 12 additions & 13 deletions trunk/drivers/ide/arm/icside.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ struct icside_state {
unsigned int enabled;
void __iomem *irq_port;
void __iomem *ioc_base;
unsigned int sel;
unsigned int type;
ide_hwif_t *hwif[2];
};
Expand Down Expand Up @@ -165,7 +166,8 @@ static const expansioncard_ops_t icside_ops_arcin_v6 = {
static void icside_maskproc(ide_drive_t *drive, int mask)
{
ide_hwif_t *hwif = HWIF(drive);
struct icside_state *state = hwif->hwif_data;
struct expansion_card *ec = ECARD_DEV(hwif->dev);
struct icside_state *state = ecard_get_drvdata(ec);
unsigned long flags;

local_irq_save(flags);
Expand Down Expand Up @@ -308,6 +310,7 @@ static int icside_dma_setup(ide_drive_t *drive)
{
ide_hwif_t *hwif = HWIF(drive);
struct expansion_card *ec = ECARD_DEV(hwif->dev);
struct icside_state *state = ecard_get_drvdata(ec);
struct request *rq = hwif->hwgroup->rq;
unsigned int dma_mode;

Expand All @@ -331,7 +334,7 @@ static int icside_dma_setup(ide_drive_t *drive)
/*
* Route the DMA signals to the correct interface.
*/
writeb(hwif->select_data, hwif->config_data);
writeb(state->sel | hwif->channel, state->ioc_base);

/*
* Select the correct timing for this drive.
Expand Down Expand Up @@ -359,7 +362,8 @@ static void icside_dma_exec_cmd(ide_drive_t *drive, u8 cmd)
static int icside_dma_test_irq(ide_drive_t *drive)
{
ide_hwif_t *hwif = HWIF(drive);
struct icside_state *state = hwif->hwif_data;
struct expansion_card *ec = ECARD_DEV(hwif->dev);
struct icside_state *state = ecard_get_drvdata(ec);

return readb(state->irq_port +
(hwif->channel ?
Expand Down Expand Up @@ -472,6 +476,8 @@ icside_register_v5(struct icside_state *state, struct expansion_card *ec)

state->hwif[0] = hwif;

ecard_set_drvdata(ec, state);

idx[0] = hwif->index;

ide_device_add(idx, NULL);
Expand Down Expand Up @@ -525,6 +531,7 @@ icside_register_v6(struct icside_state *state, struct expansion_card *ec)

state->irq_port = easi_base;
state->ioc_base = ioc_base;
state->sel = sel;

/*
* Be on the safe side - disable interrupts
Expand All @@ -545,13 +552,7 @@ icside_register_v6(struct icside_state *state, struct expansion_card *ec)
state->hwif[0] = hwif;
state->hwif[1] = mate;

hwif->hwif_data = state;
hwif->config_data = (unsigned long)ioc_base;
hwif->select_data = sel;

mate->hwif_data = state;
mate->config_data = (unsigned long)ioc_base;
mate->select_data = sel | 1;
ecard_set_drvdata(ec, state);

if (ec->dma != NO_DMA && !request_dma(ec->dma, hwif->name)) {
d.init_dma = icside_dma_init;
Expand Down Expand Up @@ -627,10 +628,8 @@ icside_probe(struct expansion_card *ec, const struct ecard_id *id)
break;
}

if (ret == 0) {
ecard_set_drvdata(ec, state);
if (ret == 0)
goto out;
}

kfree(state);
release:
Expand Down

0 comments on commit 958f972

Please sign in to comment.