]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] ide: Allow IDE interface to specify its not capable of 32-bit operations
authorKumar Gala <galak@kernel.crashing.org>
Fri, 24 Mar 2006 11:18:21 +0000 (03:18 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 24 Mar 2006 15:33:28 +0000 (07:33 -0800)
In some embedded systems the IDE hardware interface may only support 16-bit
or smaller accesses.  Allow the interface to specify if this is the case
and don't allow the drive or user to override the setting.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/ide/ide-disk.c
drivers/ide/ide-probe.c
include/linux/ide.h

index e238b7da824bc99e2ed36ad7f1f91569edcd02b0..ccf528d733bfb59db29d98eac63244d5dbbea5e1 100644 (file)
@@ -978,8 +978,6 @@ static void idedisk_setup (ide_drive_t *drive)
                ide_dma_verbose(drive);
        printk("\n");
 
-       drive->no_io_32bit = id->dword_io ? 1 : 0;
-
        /* write cache enabled? */
        if ((id->csfo & 1) || (id->cfs_enable_1 & (1 << 5)))
                drive->wcache = 1;
index 427d1c204174ec39434b15a6fb5bebcbbe40ec06..1b7b4c531bc290de2c40efb213a792b811b46172 100644 (file)
@@ -858,6 +858,15 @@ static void probe_hwif(ide_hwif_t *hwif)
                        }
                }
        }
+
+       for (unit = 0; unit < MAX_DRIVES; ++unit) {
+               ide_drive_t *drive = &hwif->drives[unit];
+
+               if (hwif->no_io_32bit)
+                       drive->no_io_32bit = 1;
+               else
+                       drive->no_io_32bit = drive->id->dword_io ? 1 : 0;
+       }
 }
 
 static int hwif_init(ide_hwif_t *hwif);
index a7fc4cc79b235f5ffefae57b99c2668d1ed3397a..8d2db412ba9ca2f46f9161642b70705d68f7fe03 100644 (file)
@@ -792,6 +792,7 @@ typedef struct hwif_s {
        unsigned        no_dsc     : 1; /* 0 default, 1 dsc_overlap disabled */
        unsigned        auto_poll  : 1; /* supports nop auto-poll */
        unsigned        sg_mapped  : 1; /* sg_table and sg_nents are ready */
+       unsigned        no_io_32bit : 1; /* 1 = can not do 32-bit IO ops */
 
        struct device   gendev;
        struct completion gendev_rel_comp; /* To deal with device release() */