Skip to content

Commit 1292ebb

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (61 commits) ide: sanitize handling of IDE_HFLAG_NO_SET_MODE host flag sis5513: fail early for unsupported chipsets it821x: fix kzalloc() failure handling qd65xx: use IDE_HFLAG_SINGLE host flag qd65xx: always use ->selectproc method ide-cd: put proc-related functions together under single ifdef ide-cd: Replace __FUNCTION__ with __func__ IDE: Coding Style fixes to drivers/ide/ide-cd.c IDE: Coding Style fixes to drivers/ide/pci/cy82c693.c IDE: Coding Style fixes to drivers/ide/pci/it8213.c IDE: Coding Style fixes to drivers/ide/ide-floppy.c IDE: Coding Style fixes to drivers/ide/legacy/ali14xx.c IDE: Coding Style fixes to drivers/ide/legacy/hd.c IDE: Coding Style fixes to drivers/ide/pci/cmd640.c IDE: Coding Style fixes to drivers/ide/pci/opti621.c IDE: Coding Style fixes to drivers/ide/ide-pnp.c IDE: Coding Style fixes to drivers/ide/ide-proc.c IDE: Coding Style fixes to drivers/ide/legacy/ide-4drives.c IDE: Coding Style fixes to drivers/ide/legacy/umc8672.c IDE: Coding Style fixes to drivers/ide/pci/generic.c ...
2 parents b822875 + 784506c commit 1292ebb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+1194
-1438
lines changed

drivers/ide/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1031,7 +1031,7 @@ comment "Other IDE chipsets support"
10311031
comment "Note: most of these also require special kernel boot parameters"
10321032

10331033
config BLK_DEV_4DRIVES
1034-
bool "Generic 4 drives/port support"
1034+
tristate "Generic 4 drives/port support"
10351035
help
10361036
Certain older chipsets, including the Tekram 690CD, use a single set
10371037
of I/O ports at 0x1f0 to control up to four drives, instead of the

drivers/ide/arm/bast-ide.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
#include <asm/arch/bast-map.h>
2222
#include <asm/arch/bast-irq.h>
2323

24+
#define DRV_NAME "bast-ide"
25+
2426
static int __init bastide_register(unsigned int base, unsigned int aux, int irq)
2527
{
2628
ide_hwif_t *hwif;
@@ -41,7 +43,7 @@ static int __init bastide_register(unsigned int base, unsigned int aux, int irq)
4143
hw.io_ports[IDE_CONTROL_OFFSET] = aux + (6 * 0x20);
4244
hw.irq = irq;
4345

44-
hwif = ide_find_port(hw.io_ports[IDE_DATA_OFFSET]);
46+
hwif = ide_find_port();
4547
if (hwif == NULL)
4648
goto out;
4749

@@ -53,6 +55,7 @@ static int __init bastide_register(unsigned int base, unsigned int aux, int irq)
5355
ide_init_port_data(hwif, i);
5456

5557
ide_init_port_hw(hwif, &hw);
58+
hwif->mmio = 1;
5659
hwif->quirkproc = NULL;
5760

5861
idx[0] = i;
@@ -64,13 +67,20 @@ static int __init bastide_register(unsigned int base, unsigned int aux, int irq)
6467

6568
static int __init bastide_init(void)
6669
{
70+
unsigned long base = BAST_VA_IDEPRI + BAST_IDE_CS;
71+
6772
/* we can treat the VR1000 and the BAST the same */
6873

6974
if (!(machine_is_bast() || machine_is_vr1000()))
7075
return 0;
7176

7277
printk("BAST: IDE driver, (c) 2003-2004 Simtec Electronics\n");
7378

79+
if (!request_mem_region(base, 0x400000, DRV_NAME)) {
80+
printk(KERN_ERR "%s: resources busy\n", DRV_NAME);
81+
return -EBUSY;
82+
}
83+
7484
bastide_register(BAST_VA_IDEPRI, BAST_VA_IDEPRIAUX, IRQ_IDE0);
7585
bastide_register(BAST_VA_IDESEC, BAST_VA_IDESECAUX, IRQ_IDE1);
7686

drivers/ide/arm/icside.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ icside_setup(void __iomem *base, struct cardinfo *info, struct expansion_card *e
400400
unsigned long port = (unsigned long)base + info->dataoffset;
401401
ide_hwif_t *hwif;
402402

403-
hwif = ide_find_port(port);
403+
hwif = ide_find_port();
404404
if (hwif) {
405405
int i;
406406

drivers/ide/arm/ide_arm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ static int __init ide_arm_init(void)
3434
ide_std_init_ports(&hw, IDE_ARM_IO, IDE_ARM_IO + 0x206);
3535
hw.irq = IDE_ARM_IRQ;
3636

37-
hwif = ide_find_port(hw.io_ports[IDE_DATA_OFFSET]);
37+
hwif = ide_find_port();
3838
if (hwif) {
3939
ide_init_port_hw(hwif, &hw);
4040
idx[0] = hwif->index;

drivers/ide/arm/palm_bk3710.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,11 @@ static void palm_bk3710_setudmamode(void __iomem *base, unsigned int dev,
9696
u16 val16;
9797

9898
/* DMA Data Setup */
99-
t0 = (palm_bk3710_udmatimings[mode].cycletime + ide_palm_clk - 1)
100-
/ ide_palm_clk - 1;
101-
tenv = (20 + ide_palm_clk - 1) / ide_palm_clk - 1;
102-
trp = (palm_bk3710_udmatimings[mode].rptime + ide_palm_clk - 1)
103-
/ ide_palm_clk - 1;
99+
t0 = DIV_ROUND_UP(palm_bk3710_udmatimings[mode].cycletime,
100+
ide_palm_clk) - 1;
101+
tenv = DIV_ROUND_UP(20, ide_palm_clk) - 1;
102+
trp = DIV_ROUND_UP(palm_bk3710_udmatimings[mode].rptime,
103+
ide_palm_clk) - 1;
104104

105105
/* udmatim Register */
106106
val16 = readw(base + BK3710_UDMATIM) & (dev ? 0xFF0F : 0xFFF0);
@@ -141,8 +141,8 @@ static void palm_bk3710_setdmamode(void __iomem *base, unsigned int dev,
141141
cycletime = max_t(int, t->cycle, min_cycle);
142142

143143
/* DMA Data Setup */
144-
t0 = (cycletime + ide_palm_clk - 1) / ide_palm_clk;
145-
td = (t->active + ide_palm_clk - 1) / ide_palm_clk;
144+
t0 = DIV_ROUND_UP(cycletime, ide_palm_clk);
145+
td = DIV_ROUND_UP(t->active, ide_palm_clk);
146146
tkw = t0 - td - 1;
147147
td -= 1;
148148

@@ -168,9 +168,9 @@ static void palm_bk3710_setpiomode(void __iomem *base, ide_drive_t *mate,
168168
struct ide_timing *t;
169169

170170
/* PIO Data Setup */
171-
t0 = (cycletime + ide_palm_clk - 1) / ide_palm_clk;
172-
t2 = (ide_timing_find_mode(XFER_PIO_0 + mode)->active +
173-
ide_palm_clk - 1) / ide_palm_clk;
171+
t0 = DIV_ROUND_UP(cycletime, ide_palm_clk);
172+
t2 = DIV_ROUND_UP(ide_timing_find_mode(XFER_PIO_0 + mode)->active,
173+
ide_palm_clk);
174174

175175
t2i = t0 - t2 - 1;
176176
t2 -= 1;
@@ -192,8 +192,8 @@ static void palm_bk3710_setpiomode(void __iomem *base, ide_drive_t *mate,
192192

193193
/* TASKFILE Setup */
194194
t = ide_timing_find_mode(XFER_PIO_0 + mode);
195-
t0 = (t->cyc8b + ide_palm_clk - 1) / ide_palm_clk;
196-
t2 = (t->act8b + ide_palm_clk - 1) / ide_palm_clk;
195+
t0 = DIV_ROUND_UP(t->cyc8b, ide_palm_clk);
196+
t2 = DIV_ROUND_UP(t->act8b, ide_palm_clk);
197197

198198
t2i = t0 - t2 - 1;
199199
t2 -= 1;
@@ -378,7 +378,7 @@ static int __devinit palm_bk3710_probe(struct platform_device *pdev)
378378
hw.irq = irq->start;
379379
hw.chipset = ide_palm3710;
380380

381-
hwif = ide_find_port(hw.io_ports[IDE_DATA_OFFSET]);
381+
hwif = ide_find_port();
382382
if (hwif == NULL)
383383
goto out;
384384

drivers/ide/arm/rapide.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ rapide_probe(struct expansion_card *ec, const struct ecard_id *id)
4444
goto release;
4545
}
4646

47-
hwif = ide_find_port((unsigned long)base);
47+
hwif = ide_find_port();
4848
if (hwif) {
4949
memset(&hw, 0, sizeof(hw));
5050
rapide_setup_ports(&hw, base, base + 0x818, 1 << 6, ec->irq);

drivers/ide/cris/ide-cris.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@ static int __init init_e100_ide(void)
804804

805805
cris_setup_ports(&hw, cris_ide_base_address(h));
806806

807-
hwif = ide_find_port(hw.io_ports[IDE_DATA_OFFSET]);
807+
hwif = ide_find_port();
808808
if (hwif == NULL)
809809
continue;
810810
ide_init_port_data(hwif, hwif->index);

drivers/ide/h8300/ide-h8300.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,7 @@ static int __init h8300_ide_init(void)
9999

100100
hw_setup(&hw);
101101

102-
/* register if */
103-
hwif = ide_find_port(hw.io_ports[IDE_DATA_OFFSET]);
102+
hwif = ide_find_port();
104103
if (hwif == NULL) {
105104
printk(KERN_ERR "ide-h8300: IDE I/F register failed\n");
106105
return -ENOENT;

0 commit comments

Comments
 (0)