diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-04-17 18:46:26 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-04-17 18:46:26 -0400 |
commit | 23579a2a170265aacf78069f4817a41c1d6e9323 (patch) | |
tree | a20db3f337b64b13e482a2cb2f41e03b13d52e66 /drivers/ide/legacy/ht6560b.c | |
parent | 7616c0ad2087c7d244b8985390c63059a6223c45 (diff) |
ide: remove IDE_*_REG macros
* Add IDE_{ALTSTATUS,IREASON,BCOUNTL,BCOUNTH}_OFFSET defines.
* Remove IDE_*_REG macros - this results in more readable
and slightly smaller code.
There should be no functional changes caused by this patch.
Cc: Borislav Petkov <petkovbb@gmail.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/legacy/ht6560b.c')
-rw-r--r-- | drivers/ide/legacy/ht6560b.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/ide/legacy/ht6560b.c b/drivers/ide/legacy/ht6560b.c index 78ca68e60f97..314e6c6aeb6c 100644 --- a/drivers/ide/legacy/ht6560b.c +++ b/drivers/ide/legacy/ht6560b.c | |||
@@ -82,7 +82,7 @@ | |||
82 | * out how they setup those cycle time interfacing values, as they at Holtek | 82 | * out how they setup those cycle time interfacing values, as they at Holtek |
83 | * call them. IDESETUP.COM that is supplied with the drivers figures out | 83 | * call them. IDESETUP.COM that is supplied with the drivers figures out |
84 | * optimal values and fetches those values to drivers. I found out that | 84 | * optimal values and fetches those values to drivers. I found out that |
85 | * they use IDE_SELECT_REG to fetch timings to the ide board right after | 85 | * they use Select register to fetch timings to the ide board right after |
86 | * interface switching. After that it was quite easy to add code to | 86 | * interface switching. After that it was quite easy to add code to |
87 | * ht6560b.c. | 87 | * ht6560b.c. |
88 | * | 88 | * |
@@ -127,6 +127,7 @@ | |||
127 | */ | 127 | */ |
128 | static void ht6560b_selectproc (ide_drive_t *drive) | 128 | static void ht6560b_selectproc (ide_drive_t *drive) |
129 | { | 129 | { |
130 | ide_hwif_t *hwif = drive->hwif; | ||
130 | unsigned long flags; | 131 | unsigned long flags; |
131 | static u8 current_select = 0; | 132 | static u8 current_select = 0; |
132 | static u8 current_timing = 0; | 133 | static u8 current_timing = 0; |
@@ -155,8 +156,8 @@ static void ht6560b_selectproc (ide_drive_t *drive) | |||
155 | /* | 156 | /* |
156 | * Set timing for this drive: | 157 | * Set timing for this drive: |
157 | */ | 158 | */ |
158 | outb(timing, IDE_SELECT_REG); | 159 | outb(timing, hwif->io_ports[IDE_SELECT_OFFSET]); |
159 | (void)inb(IDE_STATUS_REG); | 160 | (void)inb(hwif->io_ports[IDE_STATUS_OFFSET]); |
160 | #ifdef DEBUG | 161 | #ifdef DEBUG |
161 | printk("ht6560b: %s: select=%#x timing=%#x\n", | 162 | printk("ht6560b: %s: select=%#x timing=%#x\n", |
162 | drive->name, select, timing); | 163 | drive->name, select, timing); |
@@ -193,9 +194,9 @@ static int __init try_to_init_ht6560b(void) | |||
193 | * Ht6560b autodetected | 194 | * Ht6560b autodetected |
194 | */ | 195 | */ |
195 | outb(HT_CONFIG_DEFAULT, HT_CONFIG_PORT); | 196 | outb(HT_CONFIG_DEFAULT, HT_CONFIG_PORT); |
196 | outb(HT_TIMING_DEFAULT, 0x1f6); /* IDE_SELECT_REG */ | 197 | outb(HT_TIMING_DEFAULT, 0x1f6); /* Select register */ |
197 | (void) inb(0x1f7); /* IDE_STATUS_REG */ | 198 | (void)inb(0x1f7); /* Status register */ |
198 | 199 | ||
199 | printk("ht6560b " HT6560B_VERSION | 200 | printk("ht6560b " HT6560B_VERSION |
200 | ": chipset detected and initialized" | 201 | ": chipset detected and initialized" |
201 | #ifdef DEBUG | 202 | #ifdef DEBUG |