]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ata/sata_svw.c
sdio: store vendor strings
[linux-2.6-omap-h63xx.git] / drivers / ata / sata_svw.c
index 17246734fe76951a415279148fd2e88f39627621..d9678e7bc3a9a3e36cfb71710d9c0e8db723a391 100644 (file)
@@ -53,7 +53,7 @@
 #endif /* CONFIG_PPC_OF */
 
 #define DRV_NAME       "sata_svw"
-#define DRV_VERSION    "2.1"
+#define DRV_VERSION    "2.3"
 
 enum {
        /* ap->flags bits */
@@ -103,20 +103,21 @@ static int k2_sata_check_atapi_dma(struct ata_queued_cmd *qc)
        return 0;
 }
 
-static u32 k2_sata_scr_read (struct ata_port *ap, unsigned int sc_reg)
+static int k2_sata_scr_read(struct ata_port *ap, unsigned int sc_reg, u32 *val)
 {
        if (sc_reg > SCR_CONTROL)
-               return 0xffffffffU;
-       return readl((void __iomem *) ap->ioaddr.scr_addr + (sc_reg * 4));
+               return -EINVAL;
+       *val = readl(ap->ioaddr.scr_addr + (sc_reg * 4));
+       return 0;
 }
 
 
-static void k2_sata_scr_write (struct ata_port *ap, unsigned int sc_reg,
-                              u32 val)
+static int k2_sata_scr_write(struct ata_port *ap, unsigned int sc_reg, u32 val)
 {
        if (sc_reg > SCR_CONTROL)
-               return;
-       writel(val, (void __iomem *) ap->ioaddr.scr_addr + (sc_reg * 4));
+               return -EINVAL;
+       writel(val, ap->ioaddr.scr_addr + (sc_reg * 4));
+       return 0;
 }
 
 
@@ -197,7 +198,8 @@ static void k2_bmdma_setup_mmio (struct ata_queued_cmd *qc)
        struct ata_port *ap = qc->ap;
        unsigned int rw = (qc->tf.flags & ATA_TFLAG_WRITE);
        u8 dmactl;
-       void __iomem *mmio = (void __iomem *) ap->ioaddr.bmdma_addr;
+       void __iomem *mmio = ap->ioaddr.bmdma_addr;
+
        /* load PRD table addr. */
        mb();   /* make sure PRD table writes are visible to controller */
        writel(ap->prd_dma, mmio + ATA_DMA_TABLE_OFS);
@@ -225,7 +227,7 @@ static void k2_bmdma_setup_mmio (struct ata_queued_cmd *qc)
 static void k2_bmdma_start_mmio (struct ata_queued_cmd *qc)
 {
        struct ata_port *ap = qc->ap;
-       void __iomem *mmio = (void __iomem *) ap->ioaddr.bmdma_addr;
+       void __iomem *mmio = ap->ioaddr.bmdma_addr;
        u8 dmactl;
 
        /* start host DMA transaction */
@@ -253,7 +255,7 @@ static void k2_bmdma_start_mmio (struct ata_queued_cmd *qc)
 
 static u8 k2_stat_check_status(struct ata_port *ap)
 {
-               return readl((void __iomem *) ap->ioaddr.status_addr);
+               return readl(ap->ioaddr.status_addr);
 }
 
 #ifdef CONFIG_PPC_OF
@@ -360,7 +362,7 @@ static const struct ata_port_info k2_port_info[] = {
                                  ATA_FLAG_MMIO | K2_FLAG_NO_ATAPI_DMA,
                .pio_mask       = 0x1f,
                .mwdma_mask     = 0x07,
-               .udma_mask      = 0x7f,
+               .udma_mask      = ATA_UDMA6,
                .port_ops       = &k2_sata_ops,
        },
        /* board_svw8 */
@@ -370,7 +372,7 @@ static const struct ata_port_info k2_port_info[] = {
                                  K2_FLAG_SATA_8_PORTS,
                .pio_mask       = 0x1f,
                .mwdma_mask     = 0x07,
-               .udma_mask      = 0x7f,
+               .udma_mask      = ATA_UDMA6,
                .port_ops       = &k2_sata_ops,
        },
 };