diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-26 22:54:32 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-26 22:54:32 -0800 |
commit | 1c7c2cdec3a6b2873439096983794a550d7ff65b (patch) | |
tree | 10ea67846407e9882d50e95a9db675140dd423eb /drivers/ide/legacy/q40ide.c | |
parent | 0444fa78751260b38f0db3418e001bf86593f05f (diff) | |
parent | 7267c3377443322588cddaf457cf106839a60463 (diff) | |
download | op-kernel-dev-1c7c2cdec3a6b2873439096983794a550d7ff65b.zip op-kernel-dev-1c7c2cdec3a6b2873439096983794a550d7ff65b.tar.gz |
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: (63 commits)
ide: remove REQ_TYPE_ATA_CMD
ide: switch ide_cmd_ioctl() to use REQ_TYPE_ATA_TASKFILE requests
ide: switch set_xfer_rate() to use REQ_TYPE_ATA_TASKFILE requests
ide: fix final status check in drive_cmd_intr()
ide: check BUSY and ERROR status bits before reading data in drive_cmd_intr()
ide: don't enable local IRQs for PIO-in in driver_cmd_intr() (take 2)
ide: convert "empty" REQ_TYPE_ATA_CMD requests to use REQ_TYPE_ATA_TASKFILE
ide: initialize rq->cmd_type in ide_init_drive_cmd() callers
ide: use wait_drive_not_busy() in drive_cmd_intr() (take 2)
ide: kill DATA_READY define
ide: task_end_request() fix
ide: use rq->nr_sectors in task_end_request()
ide: remove needless ->cursg clearing from task_end_request()
ide: set IDE_TFLAG_IN_* flags before queuing/executing command
ide-tape: fix handling of non-special requests in ->end_request method
ide: fix final status check in task_in_intr()
ide: clear HOB bit for REQ_TYPE_ATA_CMD requests in ide_end_drive_cmd()
ide: fix ->io_32bit race in ide_taskfile_ioctl()
cmd64x: remove /proc/ide/cmd64x
ide: remove broken disk byte-swapping support
...
Diffstat (limited to 'drivers/ide/legacy/q40ide.c')
-rw-r--r-- | drivers/ide/legacy/q40ide.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/drivers/ide/legacy/q40ide.c b/drivers/ide/legacy/q40ide.c index 6ea46a6..f532973 100644 --- a/drivers/ide/legacy/q40ide.c +++ b/drivers/ide/legacy/q40ide.c @@ -111,15 +111,17 @@ static const char *q40_ide_names[Q40IDE_NUM_HWIFS]={ * Probe for Q40 IDE interfaces */ -void __init q40ide_init(void) +static int __init q40ide_init(void) { int i; ide_hwif_t *hwif; - int index; const char *name; + u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; if (!MACH_IS_Q40) - return ; + return -ENODEV; + + printk(KERN_INFO "ide: Q40 IDE controller\n"); for (i = 0; i < Q40IDE_NUM_HWIFS; i++) { hw_regs_t hw; @@ -141,10 +143,20 @@ void __init q40ide_init(void) 0, NULL, // m68kide_iops, q40ide_default_irq(pcide_bases[i])); - index = ide_register_hw(&hw, NULL, 1, &hwif); - // **FIXME** - if (index != -1) + + hwif = ide_find_port(hw.io_ports[IDE_DATA_OFFSET]); + if (hwif) { + ide_init_port_data(hwif, hwif->index); + ide_init_port_hw(hwif, &hw); hwif->mmio = 1; + + idx[i] = hwif->index; + } } + + ide_device_add(idx); + + return 0; } +module_init(q40ide_init); |