linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Tobias Lorenz <tobias.lorenz@gmx.net>
Cc: linux-ide@vger.kernel.org
Subject: Re: [PATCH 2.6.9-libata1-dev1 2/2] sata_promise: pdc20619 support
Date: Sat, 05 Feb 2005 22:52:29 -0500	[thread overview]
Message-ID: <4205947D.4000303@pobox.com> (raw)
In-Reply-To: <1099148731.15964.13.camel@server.lorenz.priv>

[-- Attachment #1: Type: text/plain, Size: 71 bytes --]

applied to libata-dev queue, in two parts (see two attached patches).


[-- Attachment #2: patch1 --]
[-- Type: text/plain, Size: 2083 bytes --]

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2005/02/05 22:27:51-05:00 tobias.lorenz@gmx.net 
#   [libata sata_promise] pdc20619 (PATA) support
# 
# drivers/scsi/sata_promise.c
#   2005/02/05 22:27:44-05:00 tobias.lorenz@gmx.net +25 -1
#   [libata sata_promise] pdc20619 (PATA) support
# 
diff -Nru a/drivers/scsi/sata_promise.c b/drivers/scsi/sata_promise.c
--- a/drivers/scsi/sata_promise.c	2005-02-05 22:52:06 -05:00
+++ b/drivers/scsi/sata_promise.c	2005-02-05 22:52:06 -05:00
@@ -59,6 +59,7 @@
 
 	board_2037x		= 0,	/* FastTrak S150 TX2plus */
 	board_20319		= 1,	/* FastTrak S150 TX4 */
+	board_20619		= 2,	/* FastTrak TX4000 */
 
 	PDC_HAS_PATA		= (1 << 1), /* PDC20375 has PATA */
 
@@ -145,6 +146,17 @@
 		.udma_mask	= 0x7f, /* udma0-6 ; FIXME */
 		.port_ops	= &pdc_ata_ops,
 	},
+
+	/* board_20619 */
+	{
+		.sht		= &pdc_ata_sht,
+		.host_flags	= ATA_FLAG_NO_LEGACY | ATA_FLAG_SRST |
+				  ATA_FLAG_MMIO | ATA_FLAG_SLAVE_POSS,
+		.pio_mask	= 0x1f, /* pio0-4 */
+		.mwdma_mask	= 0x07, /* mwdma0-2 */
+		.udma_mask	= 0x7f, /* udma0-6 ; FIXME */
+		.port_ops	= &pdc_ata_ops,
+	},
 };
 
 static struct pci_device_id pdc_ata_pci_tbl[] = {
@@ -168,6 +180,9 @@
 	{ PCI_VENDOR_ID_PROMISE, 0x3d18, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
 	  board_20319 },
 
+	{ PCI_VENDOR_ID_PROMISE, 0x6629, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+	  board_20619 },
+
 	{ }	/* terminate list */
 };
 
@@ -629,6 +644,15 @@
 	case board_2037x:
        		probe_ent->n_ports = 2;
 		break;
+	case board_20619:
+		probe_ent->n_ports = 4;
+
+		pdc_ata_setup_port(&probe_ent->port[2], base + 0x300);
+		pdc_ata_setup_port(&probe_ent->port[3], base + 0x380);
+
+		probe_ent->port[2].scr_addr = base + 0x600;
+		probe_ent->port[3].scr_addr = base + 0x700;
+                break;
 	default:
 		BUG();
 		break;
@@ -668,7 +692,7 @@
 
 
 MODULE_AUTHOR("Jeff Garzik");
-MODULE_DESCRIPTION("Promise SATA TX2/TX4 low-level driver");
+MODULE_DESCRIPTION("Promise ATA TX2/TX4/TX4000 low-level driver");
 MODULE_LICENSE("GPL");
 MODULE_DEVICE_TABLE(pci, pdc_ata_pci_tbl);
 MODULE_VERSION(DRV_VERSION);

[-- Attachment #3: patch2 --]
[-- Type: text/plain, Size: 2849 bytes --]

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2005/02/05 22:51:28-05:00 jgarzik@pobox.com 
#   [libata sata_promise] merge Tobias Lorenz' pdc20619 patch, part 2
#   
#   Apply the second part of Tobias Lorenz's patch, the portion that
#   depended on functionality not in the base libata, but in libata-dev.
#   
#   Also, trim trailing whitespace, and remove setting of .scr_addr
#   for PDC20619, since that is senseless.
# 
# drivers/scsi/sata_promise.c
#   2005/02/05 22:51:21-05:00 jgarzik@pobox.com +14 -12
#   [libata sata_promise] merge Tobias Lorenz' pdc20619 patch, part 2
#   
#   Apply the second part of Tobias Lorenz's patch, the portion that
#   depended on functionality not in the base libata, but in libata-dev.
#   
#   Also, trim trailing whitespace, and remove setting of .scr_addr
#   for PDC20619, since that is senseless.
# 
diff -Nru a/drivers/scsi/sata_promise.c b/drivers/scsi/sata_promise.c
--- a/drivers/scsi/sata_promise.c	2005-02-05 22:51:53 -05:00
+++ b/drivers/scsi/sata_promise.c	2005-02-05 22:51:53 -05:00
@@ -281,7 +281,7 @@
 	void *mmio = (void *) ap->ioaddr.cmd_addr + PDC_CTLSTAT + 0x03;
 
 	tmp = readb(mmio);
-	
+
 	if (tmp & 0x01)
 	{
 		ap->cbl = ATA_CBL_PATA40;
@@ -290,13 +290,13 @@
 	else
 		ap->cbl = ATA_CBL_PATA80;
 }
-		
+
 static void pdc_pata_phy_reset(struct ata_port *ap)
 {
 	pdc_pata_cbl_detect(ap);
 
 	ata_port_probe(ap);
-	
+
 	ata_bus_reset(ap);
 }
 
@@ -661,9 +661,6 @@
 	probe_ent->port[0].scr_addr = base + 0x400;
 	probe_ent->port[1].scr_addr = base + 0x500;
 
-	probe_ent->port_flags[0] = ATA_FLAG_SATA;
-	probe_ent->port_flags[1] = ATA_FLAG_SATA;
-	
 	/* notice 4-port boards */
 	switch (board_idx) {
 	case board_20319:
@@ -674,35 +671,40 @@
 
 		probe_ent->port[2].scr_addr = base + 0x600;
 		probe_ent->port[3].scr_addr = base + 0x700;
-	
+
+		probe_ent->port_flags[0] = ATA_FLAG_SATA;
+		probe_ent->port_flags[1] = ATA_FLAG_SATA;
 		probe_ent->port_flags[2] = ATA_FLAG_SATA;
 		probe_ent->port_flags[3] = ATA_FLAG_SATA;
 		break;
+
 	case board_2037x:
+		probe_ent->port_flags[0] = ATA_FLAG_SATA;
+		probe_ent->port_flags[1] = ATA_FLAG_SATA;
+
 		/* Some boards have also PATA port */
 		tmp = readb(mmio_base + PDC_FLASH_CTL+1);
 		if (!(tmp & 0x80))
 		{
 			probe_ent->n_ports = 3;
-			
+
 			pdc_ata_setup_port(&probe_ent->port[2], base + 0x300);
 
 			probe_ent->port_flags[2] = ATA_FLAG_SLAVE_POSS;
-			
+
 			printk(KERN_INFO DRV_NAME " PATA port found\n");
 		}
 		else
        			probe_ent->n_ports = 2;
 		break;
+
 	case board_20619:
 		probe_ent->n_ports = 4;
 
 		pdc_ata_setup_port(&probe_ent->port[2], base + 0x300);
 		pdc_ata_setup_port(&probe_ent->port[3], base + 0x380);
+		break;
 
-		probe_ent->port[2].scr_addr = base + 0x600;
-		probe_ent->port[3].scr_addr = base + 0x700;
-                break;
 	default:
 		BUG();
 		break;

      reply	other threads:[~2005-02-06  3:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-22 23:55 [PATCH 2.6.9-libata1-dev1] sata_promise: pdc20619 support Tobias Lorenz
2004-10-30 12:44 ` Jeff Garzik
2004-10-30 15:03   ` [PATCH 2.6.9-libata1-dev 1/2] " Tobias Lorenz
2004-10-30 15:39     ` Jeff Garzik
2004-10-30 15:05   ` [PATCH 2.6.9-libata1-dev1 2/2] " Tobias Lorenz
2005-02-06  3:52     ` Jeff Garzik [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4205947D.4000303@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=tobias.lorenz@gmx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).