mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jose Alberto Reguero <jareguero@telefonica.net>
To: linux-kernel@vger.kernel.org
Cc: Jose Alberto Reguero <jareguero@telefonica.net>
Subject: [PATCH] Add suport for Marvell 88SE6121 in pata_marvell
Date: Sat, 6 Jan 2007 13:24:47 +0100	[thread overview]
Message-ID: <200701061324.47993.jareguero@telefonica.net> (raw)

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

Marvell 88SE6121 is a ahci controller, but I can't make it work with the achi 
driver.
This part:

+       else if (pdev->device == 0x6121) {
+               mmio_base = pci_iomap(pdev, 5, 0);
+               if (mmio_base == NULL) {
+                       return -ENOMEM;
+               }
+               /* turn on legacy mode */
+               writel(0, mmio_base + 0x04);
+               (void) readl(mmio_base + 0x04); /* flush */
+       }

put the ahci in legacy mode and work with pata_marvell.
Perhaps someone else can make it work whith the ahci driver.

Jose Alberto

[-- Attachment #2: pata_marvell.diff --]
[-- Type: text/x-diff, Size: 1154 bytes --]

--- linux-2.6.20-rc3/drivers/ata/pata_marvell.c	2007-01-01 01:53:20.000000000 +0100
+++ linux-2.6.20-rc3.new/drivers/ata/pata_marvell.c	2007-01-06 12:33:03.000000000 +0100
@@ -49,7 +49,7 @@
 	devices = readl(barp + 0x0C);
 	pci_iounmap(pdev, barp);
 	
-	if ((pdev->device == 0x6145) && (ap->port_no == 0) &&
+	if (((pdev->device == 0x6145) || (pdev->device == 0x6121)) && (ap->port_no == 0) &&
 	    (!(devices & 0x10)))	/* PATA enable ? */
 		return -ENOENT;
 
@@ -181,9 +181,19 @@
 	};
 	struct ata_port_info *port_info[2] = { &info, &info_sata };
 	int n_port = 2;
+	void __iomem *mmio_base;
 
 	if (pdev->device == 0x6101)
 		n_port = 1;
+	else if (pdev->device == 0x6121) {
+		mmio_base = pci_iomap(pdev, 5, 0);
+		if (mmio_base == NULL) {
+			return -ENOMEM;
+		}
+		/* turn on legacy mode */
+		writel(0, mmio_base + 0x04);
+		(void) readl(mmio_base + 0x04);	/* flush */
+	}
 
 	return ata_pci_init_one(pdev, port_info, n_port);
 }
@@ -191,6 +201,7 @@
 static const struct pci_device_id marvell_pci_tbl[] = {
 	{ PCI_DEVICE(0x11AB, 0x6101), },
 	{ PCI_DEVICE(0x11AB, 0x6145), },
+	{ PCI_DEVICE(0x11AB, 0x6121), },
 	{ }	/* terminate list */
 };
 

             reply	other threads:[~2007-01-06 12:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-06 12:24 Jose Alberto Reguero [this message]
2007-01-06 15:36 ` Jose Alberto Reguero
2007-01-15 19:00 ` Jay Cliburn

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=200701061324.47993.jareguero@telefonica.net \
    --to=jareguero@telefonica.net \
    --cc=linux-kernel@vger.kernel.org \
    /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

Powered by JetHome