diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-26 16:44:19 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-26 16:44:19 -0400 |
| commit | a52b0d25a722e84da999005b75f972aa4824253c (patch) | |
| tree | 4a3a48305f744e6bde2e3fd663a4473dd712049c /drivers/ide/legacy/ide-4drives.c | |
| parent | 539a5fe22620a1665cce504167953a71a43232ad (diff) | |
| parent | f37afdaca711838b50ecd89b9c15fc745270d77c (diff) | |
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: (46 commits)
ide: constify struct ide_dma_ops
ide: add struct ide_dma_ops (take 3)
ide: add IDE_HFLAG_SERIALIZE_DMA host flag
sl82c105: check bridge revision in sl82c105_init_one()
au1xxx-ide: use ->init_dma method
palm_bk3710: use ->init_dma method
sgiioc4: use ->init_dma method
icside: use ->init_dma method
ide-pmac: use ->init_dma method
ide: do complete DMA setup in ->init_dma method (take 2)
au1xxx-ide: fix MWDMA support
ide: cleanup ide_setup_dma()
ide: factor out setting PCI bus-mastering from ide_hwif_setup_dma()
ide: export ide_allocate_dma_engine()
ide: move ide_setup_dma() call out from ->init_dma method
alim15x3: skip DMA initialization completely on revs < 0x20
pdc202xx_old: remove init_dma_pdc202xx()
ide: don't display "BIOS" settings in ide_setup_dma()
ide: remove ->cds field from ide_hwif_t (take 2)
ide: remove ide_dma_iobase()
...
Diffstat (limited to 'drivers/ide/legacy/ide-4drives.c')
| -rw-r--r-- | drivers/ide/legacy/ide-4drives.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/drivers/ide/legacy/ide-4drives.c b/drivers/ide/legacy/ide-4drives.c index c352f12348af..17f94d0cb539 100644 --- a/drivers/ide/legacy/ide-4drives.c +++ b/drivers/ide/legacy/ide-4drives.c | |||
| @@ -4,6 +4,8 @@ | |||
| 4 | #include <linux/module.h> | 4 | #include <linux/module.h> |
| 5 | #include <linux/ide.h> | 5 | #include <linux/ide.h> |
| 6 | 6 | ||
| 7 | #define DRV_NAME "ide-4drives" | ||
| 8 | |||
| 7 | int probe_4drives; | 9 | int probe_4drives; |
| 8 | 10 | ||
| 9 | module_param_named(probe, probe_4drives, bool, 0); | 11 | module_param_named(probe, probe_4drives, bool, 0); |
| @@ -12,15 +14,29 @@ MODULE_PARM_DESC(probe, "probe for generic IDE chipset with 4 drives/port"); | |||
| 12 | static int __init ide_4drives_init(void) | 14 | static int __init ide_4drives_init(void) |
| 13 | { | 15 | { |
| 14 | ide_hwif_t *hwif, *mate; | 16 | ide_hwif_t *hwif, *mate; |
| 17 | unsigned long base = 0x1f0, ctl = 0x3f6; | ||
| 15 | u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; | 18 | u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; |
| 16 | hw_regs_t hw; | 19 | hw_regs_t hw; |
| 17 | 20 | ||
| 18 | if (probe_4drives == 0) | 21 | if (probe_4drives == 0) |
| 19 | return -ENODEV; | 22 | return -ENODEV; |
| 20 | 23 | ||
| 24 | if (!request_region(base, 8, DRV_NAME)) { | ||
| 25 | printk(KERN_ERR "%s: I/O resource 0x%lX-0x%lX not free.\n", | ||
| 26 | DRV_NAME, base, base + 7); | ||
| 27 | return -EBUSY; | ||
| 28 | } | ||
| 29 | |||
| 30 | if (!request_region(ctl, 1, DRV_NAME)) { | ||
| 31 | printk(KERN_ERR "%s: I/O resource 0x%lX not free.\n", | ||
| 32 | DRV_NAME, ctl); | ||
| 33 | release_region(base, 8); | ||
| 34 | return -EBUSY; | ||
| 35 | } | ||
| 36 | |||
| 21 | memset(&hw, 0, sizeof(hw)); | 37 | memset(&hw, 0, sizeof(hw)); |
| 22 | 38 | ||
| 23 | ide_std_init_ports(&hw, 0x1f0, 0x3f6); | 39 | ide_std_init_ports(&hw, base, ctl); |
| 24 | hw.irq = 14; | 40 | hw.irq = 14; |
| 25 | hw.chipset = ide_4drives; | 41 | hw.chipset = ide_4drives; |
| 26 | 42 | ||
