]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ide: add IDE_HFLAG_MMIO host flag (take 2)
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Mon, 28 Apr 2008 21:44:37 +0000 (23:44 +0200)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Mon, 28 Apr 2008 21:44:37 +0000 (23:44 +0200)
* Add IDE_HFLAG_MMIO host flag and set it for hosts which use
  default_hwif_mmiops().

v2:
* Fix kernel panic in pmac host driver (',' should be '|').

  Thanks to Kamalesh for reporting it + testing the fix
  and to Andrew for hinting me about the source of the issue.

Cc: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/arm/icside.c
drivers/ide/arm/palm_bk3710.c
drivers/ide/arm/rapide.c
drivers/ide/legacy/ide_platform.c
drivers/ide/mips/swarm.c
drivers/ide/pci/sgiioc4.c
drivers/ide/pci/siimage.c
drivers/ide/ppc/pmac.c
include/linux/ide.h

index 65038ca35e10e87f50cc3edcda171475205fbf87..061456914ca352469ca644df2e83e311ac92d9fb 100644 (file)
@@ -483,7 +483,7 @@ static const struct ide_port_info icside_v6_port_info __initdata = {
        .init_dma               = icside_dma_off_init,
        .port_ops               = &icside_v6_no_dma_port_ops,
        .dma_ops                = &icside_v6_dma_ops,
-       .host_flags             = IDE_HFLAG_SERIALIZE,
+       .host_flags             = IDE_HFLAG_SERIALIZE | IDE_HFLAG_MMIO,
        .mwdma_mask             = ATA_MWDMA2,
        .swdma_mask             = ATA_SWDMA2,
 };
index aaf32541622d8a08ac0a5551209c6c26922c5e3d..96378ebfb31fc70e4e4e81b0ef65fa08d454dae2 100644 (file)
@@ -342,6 +342,7 @@ static const struct ide_port_ops palm_bk3710_ports_ops = {
 static const struct ide_port_info __devinitdata palm_bk3710_port_info = {
        .init_dma               = palm_bk3710_init_dma,
        .port_ops               = &palm_bk3710_ports_ops,
+       .host_flags             = IDE_HFLAG_MMIO,
        .pio_mask               = ATA_PIO4,
        .udma_mask              = ATA_UDMA4,    /* (input clk 99MHz) */
        .mwdma_mask             = ATA_MWDMA2,
index babc1a5e128d6fadc623294942efe621e08522a1..1747b23587758f93c1fc44f69b264f8198ad6def 100644 (file)
@@ -53,6 +53,7 @@ rapide_probe(struct expansion_card *ec, const struct ecard_id *id)
 
                ide_init_port_hw(hwif, &hw);
 
+               hwif->host_flags = IDE_HFLAG_MMIO;
                default_hwif_mmiops(hwif);
 
                idx[0] = hwif->index;
index 8279dc7ca4c0086fc8ca4b5551012cd6d316306c..d3bc3f24e05d07e52f079121117a672b11de0146 100644 (file)
@@ -101,8 +101,10 @@ static int __devinit plat_ide_probe(struct platform_device *pdev)
 
        ide_init_port_hw(hwif, &hw);
 
-       if (mmio)
+       if (mmio) {
+               hwif->host_flags = IDE_HFLAG_MMIO;
                default_hwif_mmiops(hwif);
+       }
 
        idx[0] = hwif->index;
 
index 68947626e4aaa40bde14c333c9ca7dcaef21713e..712d17bdd4705f8ff2d07bf20371c702de79a564 100644 (file)
@@ -109,6 +109,7 @@ static int __devinit swarm_ide_probe(struct device *dev)
        base = ioremap(offset, size);
 
        /* Setup MMIO ops.  */
+       hwif->host_flags = IDE_HFLAG_MMIO;
        default_hwif_mmiops(hwif);
 
        hwif->chipset = ide_generic;
index 63e28f4e6d3b3304221b1e991dcc9b7e622cb577..16a0bce17d6905b03959ea8817b227be2d70e94b 100644 (file)
@@ -573,6 +573,7 @@ static const struct ide_port_info sgiioc4_port_info __devinitdata = {
        .init_dma               = ide_dma_sgiioc4,
        .port_ops               = &sgiioc4_port_ops,
        .dma_ops                = &sgiioc4_dma_ops,
+       .host_flags             = IDE_HFLAG_MMIO,
        .mwdma_mask             = ATA_MWDMA2_ONLY,
 };
 
index c2040a017f475e3abea81f27644ebc0b0dc49044..076a476c3e3d979b11cbfe0f739ec800c645dc74 100644 (file)
@@ -630,6 +630,7 @@ static void __devinit init_mmio_iops_siimage(ide_hwif_t *hwif)
         *      Fill in the basic HWIF bits
         */
 
+       hwif->host_flags |= IDE_HFLAG_MMIO;
        default_hwif_mmiops(hwif);
        hwif->hwif_data                 = addr;
 
index 3cac6b2790dd7cfc77110c541ccc699ae4c6430a..48aa019127bc9c35522741bb022381f8ec35ca03 100644 (file)
@@ -941,6 +941,7 @@ static const struct ide_port_info pmac_port_info = {
        .port_ops               = &pmac_ide_port_ops,
        .host_flags             = IDE_HFLAG_SET_PIO_MODE_KEEP_DMA |
                                  IDE_HFLAG_POST_SET_MODE |
+                                 IDE_HFLAG_MMIO |
                                  IDE_HFLAG_UNMASK_IRQS,
        .pio_mask               = ATA_PIO4,
        .mwdma_mask             = ATA_MWDMA2,
index b89b95dcb70824ca5c743b224ab91b4336dcf401..8e79875f987295aee0d4750c5773e3751641e9e5 100644 (file)
@@ -1069,6 +1069,8 @@ enum {
        IDE_HFLAG_NO_DMA                = (1 << 14),
        /* check if host is PCI IDE device before allowing DMA */
        IDE_HFLAG_NO_AUTODMA            = (1 << 15),
+       /* host uses MMIO */
+       IDE_HFLAG_MMIO                  = (1 << 16),
        /* host is CS5510/CS5520 */
        IDE_HFLAG_CS5520                = IDE_HFLAG_VDMA,
        /* no LBA48 */