# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1211364660 -3600
# Node ID 1e8c3287b395f53d91c5e1951325563b5942d2c0
# Parent 8792274adfd0cab0311f3df6183743de3faa3c51
Add support for SB700 storage controllers.
Signed-off-by: Travis Betak <travis.betak@xxxxxxx>
---
drivers/ide/pci/atiixp.c | 1 +
drivers/pci/quirks.c | 19 +++++++++++++++++++
drivers/scsi/ahci.c | 23 +++++++++++++++++++++++
include/linux/libata.h | 6 ++++++
include/linux/pci_ids.h | 4 ++++
5 files changed, 53 insertions(+)
diff -r 8792274adfd0 -r 1e8c3287b395 drivers/ide/pci/atiixp.c
--- a/drivers/ide/pci/atiixp.c Wed May 21 11:00:28 2008 +0100
+++ b/drivers/ide/pci/atiixp.c Wed May 21 11:11:00 2008 +0100
@@ -348,6 +348,7 @@ static struct pci_device_id atiixp_pci_t
{ PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP300_IDE, PCI_ANY_ID,
PCI_ANY_ID, 0, 0, 0},
{ PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP400_IDE, PCI_ANY_ID,
PCI_ANY_ID, 0, 0, 0},
{ PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_IDE, PCI_ANY_ID,
PCI_ANY_ID, 0, 0, 0},
+ { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP700_IDE, PCI_ANY_ID,
PCI_ANY_ID, 0, 0, 0},
{ 0, },
};
MODULE_DEVICE_TABLE(pci, atiixp_pci_tbl);
diff -r 8792274adfd0 -r 1e8c3287b395 drivers/pci/quirks.c
--- a/drivers/pci/quirks.c Wed May 21 11:00:28 2008 +0100
+++ b/drivers/pci/quirks.c Wed May 21 11:11:00 2008 +0100
@@ -873,6 +873,25 @@ static void __init quirk_disable_pxb(str
}
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454NX,
quirk_disable_pxb );
+static void __devinit quirk_sb600_sata(struct pci_dev *pdev)
+{
+ /* set sb600/sb700/sb800 sata to ahci mode */
+ u8 tmp;
+
+ pci_read_config_byte(pdev, PCI_CLASS_DEVICE, &tmp);
+ if (tmp == 0x01) {
+ pci_read_config_byte(pdev, 0x40, &tmp);
+ pci_write_config_byte(pdev, 0x40, tmp|1);
+ pci_write_config_byte(pdev, 0x9, 1);
+ pci_write_config_byte(pdev, 0xa, 6);
+ pci_write_config_byte(pdev, 0x40, tmp);
+
+ pdev->class = PCI_CLASS_STORAGE_SATA_AHCI;
+ dev_info(&pdev->dev, "set SATA to AHCI mode\n");
+ }
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP700_SATA,
quirk_sb600_sata);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_SATA,
quirk_sb600_sata);
/*
* Serverworks CSB5 IDE does not fully support native mode
diff -r 8792274adfd0 -r 1e8c3287b395 drivers/scsi/ahci.c
--- a/drivers/scsi/ahci.c Wed May 21 11:00:28 2008 +0100
+++ b/drivers/scsi/ahci.c Wed May 21 11:11:00 2008 +0100
@@ -78,6 +78,7 @@ enum {
board_ahci = 0,
board_ahci_vt8251 = 1,
+ board_ahci_sb700 = 2,
/* global controller registers */
HOST_CAP = 0x00, /* host capabilities */
@@ -282,6 +283,16 @@ static const struct ata_port_info ahci_p
.pio_mask = 0x1f, /* pio0-4 */
.udma_mask = 0x7f, /* udma0-6 ; FIXME */
.port_ops = &ahci_ops,
+ },
+ {
+ .sht = &ahci_sht,
+ .host_flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
+ ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA |
+ ATA_FLAG_ACPI_SATA | ATA_FLAG_AN |
+ ATA_FLAG_IPM,
+ .pio_mask = 0x1f, /* pio0-4 */
+ .udma_mask = 0x7f,
+ .port_ops = &ahci_ops,
},
};
@@ -363,6 +374,18 @@ static const struct pci_device_id ahci_p
board_ahci }, /* ATI SB600 non-raid */
{ PCI_VENDOR_ID_ATI, 0x4381, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
board_ahci }, /* ATI SB600 raid */
+ { PCI_VENDOR_ID_ATI, 0x4390, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+ board_ahci_sb700 },
+ { PCI_VENDOR_ID_ATI, 0x4391, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+ board_ahci_sb700 },
+ { PCI_VENDOR_ID_ATI, 0x4392, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+ board_ahci_sb700 },
+ { PCI_VENDOR_ID_ATI, 0x4393, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+ board_ahci_sb700 },
+ { PCI_VENDOR_ID_ATI, 0x4394, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+ board_ahci_sb700 },
+ { PCI_VENDOR_ID_ATI, 0x4395, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+ board_ahci_sb700 },
/* VIA */
{ PCI_VENDOR_ID_VIA, 0x3349, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
diff -r 8792274adfd0 -r 1e8c3287b395 include/linux/libata.h
--- a/include/linux/libata.h Wed May 21 11:00:28 2008 +0100
+++ b/include/linux/libata.h Wed May 21 11:11:00 2008 +0100
@@ -162,6 +162,12 @@ enum {
ATA_FLAG_SKIP_D2H_BSY = (1 << 12), /* can't wait for the first D2H
* Register FIS clearing BSY */
ATA_FLAG_DEBUGMSG = (1 << 13),
+ ATA_FLAG_IGN_SIMPLEX = (1 << 15), /* ignore SIMPLEX */
+ ATA_FLAG_NO_IORDY = (1 << 16), /* controller lacks iordy */
+ ATA_FLAG_ACPI_SATA = (1 << 17), /* need native SATA ACPI layout */
+ ATA_FLAG_AN = (1 << 18), /* controller supports AN */
+ ATA_FLAG_PMP = (1 << 19), /* controller supports PMP */
+ ATA_FLAG_IPM = (1 << 20), /* driver can handle IPM */
/* The following flag belongs to ap->pflags but is kept in
* ap->flags because it's referenced in many LLDs and will be
diff -r 8792274adfd0 -r 1e8c3287b395 include/linux/pci_ids.h
--- a/include/linux/pci_ids.h Wed May 21 11:00:28 2008 +0100
+++ b/include/linux/pci_ids.h Wed May 21 11:11:00 2008 +0100
@@ -15,6 +15,8 @@
#define PCI_CLASS_STORAGE_FLOPPY 0x0102
#define PCI_CLASS_STORAGE_IPI 0x0103
#define PCI_CLASS_STORAGE_RAID 0x0104
+#define PCI_CLASS_STORAGE_SATA 0x0106
+#define PCI_CLASS_STORAGE_SATA_AHCI 0x010601
#define PCI_CLASS_STORAGE_SAS 0x0107
#define PCI_CLASS_STORAGE_OTHER 0x0180
@@ -363,6 +365,8 @@
#define PCI_DEVICE_ID_ATI_IXP600_SATA 0x4380
#define PCI_DEVICE_ID_ATI_IXP600_SRAID 0x4381
#define PCI_DEVICE_ID_ATI_IXP600_IDE 0x438c
+#define PCI_DEVICE_ID_ATI_IXP700_SATA 0x4390
+#define PCI_DEVICE_ID_ATI_IXP700_IDE 0x439c
#define PCI_VENDOR_ID_VLSI 0x1004
#define PCI_DEVICE_ID_VLSI_82C592 0x0005
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|