linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Marvell 6121 SATA support?
@ 2008-03-11 14:17 Mourad De Clerck
  2008-03-11 14:31 ` Jeff Garzik
  0 siblings, 1 reply; 7+ messages in thread
From: Mourad De Clerck @ 2008-03-11 14:17 UTC (permalink / raw)
  To: linux-ide

Hello,

I was wondering what the status was of Marvell 6121 SATA support. I've
seen earlier messages saying it was pretty much working with the AHCI
driver, and that it would be merged in mainline soon, but that was in
2.6.22 times.

I've not seen support for it in 2.6.25-rc5's ahci, so I guess I
shouldn't expect it in 2.6.25?

Thanks,

-- Mourad DC

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Marvell 6121 SATA support?
  2008-03-11 14:17 Marvell 6121 SATA support? Mourad De Clerck
@ 2008-03-11 14:31 ` Jeff Garzik
  2008-03-11 22:10   ` Jose Alberto Reguero
  0 siblings, 1 reply; 7+ messages in thread
From: Jeff Garzik @ 2008-03-11 14:31 UTC (permalink / raw)
  To: Mourad De Clerck; +Cc: linux-ide

Mourad De Clerck wrote:
> Hello,
> 
> I was wondering what the status was of Marvell 6121 SATA support. I've
> seen earlier messages saying it was pretty much working with the AHCI
> driver, and that it would be merged in mainline soon, but that was in
> 2.6.22 times.
> 
> I've not seen support for it in 2.6.25-rc5's ahci, so I guess I
> shouldn't expect it in 2.6.25?

I would just add the PCI ID to ahci.c, it should most likely work...

	Jeff




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Marvell 6121 SATA support?
  2008-03-11 14:31 ` Jeff Garzik
@ 2008-03-11 22:10   ` Jose Alberto Reguero
  2008-03-13 22:22     ` Jose Alberto Reguero
  0 siblings, 1 reply; 7+ messages in thread
From: Jose Alberto Reguero @ 2008-03-11 22:10 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Mourad De Clerck, linux-ide

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

El Martes, 11 de Marzo de 2008, Jeff Garzik escribió:
> Mourad De Clerck wrote:
> > Hello,
> >
> > I was wondering what the status was of Marvell 6121 SATA support. I've
> > seen earlier messages saying it was pretty much working with the AHCI
> > driver, and that it would be merged in mainline soon, but that was in
> > 2.6.22 times.
> >
> > I've not seen support for it in 2.6.25-rc5's ahci, so I guess I
> > shouldn't expect it in 2.6.25?
>
> I would just add the PCI ID to ahci.c, it should most likely work...
>
> 	Jeff
>
>
>

 I use this patch for kernels 2.6.25-rc

Jose Alberto

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

diff -ur linux-2.6.25-rc3/drivers/ata/ahci.c linux-2.6.25-rc3.new/drivers/ata/ahci.c
--- linux-2.6.25-rc3/drivers/ata/ahci.c	2008-02-24 22:25:54.000000000 +0100
+++ linux-2.6.25-rc3.new/drivers/ata/ahci.c	2008-02-25 00:59:43.000000000 +0100
@@ -570,7 +570,7 @@
 	{ PCI_VDEVICE(SI, 0x0186), board_ahci }, /* SiS 968 */
 
 	/* Marvell */
-	{ PCI_VDEVICE(MARVELL, 0x6145), board_ahci_mv },	/* 6145 */
+	{ PCI_VDEVICE(MARVELL, 0x6121), board_ahci_mv },	/* 6121 */
 
 	/* Generic, PCI class code for AHCI */
 	{ PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
@@ -682,10 +682,10 @@
 	if (hpriv->flags & AHCI_HFLAG_MV_PATA) {
 		dev_printk(KERN_ERR, &pdev->dev,
 			   "MV_AHCI HACK: port_map %x -> %x\n",
-			   hpriv->port_map,
-			   hpriv->port_map & 0xf);
+			   port_map,
+			   port_map & 0x3);
 
-		port_map &= 0xf;
+		port_map &= 0x3;
 	}
 
 	/* cross check port_map and cap.n_ports */
@@ -1148,7 +1148,7 @@
 	u32 tmp;
 
 	if (hpriv->flags & AHCI_HFLAG_MV_PATA) {
-		port_mmio = __ahci_port_base(host, 4);
+		port_mmio = __ahci_port_base(host, 2);
 
 		writel(0, port_mmio + PORT_IRQ_MASK);
 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Marvell 6121 SATA support?
  2008-03-11 22:10   ` Jose Alberto Reguero
@ 2008-03-13 22:22     ` Jose Alberto Reguero
  2008-03-17 12:31       ` Jeff Garzik
  0 siblings, 1 reply; 7+ messages in thread
From: Jose Alberto Reguero @ 2008-03-13 22:22 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Mourad De Clerck, linux-ide

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

El Martes, 11 de Marzo de 2008, Jose Alberto Reguero escribió:
> El Martes, 11 de Marzo de 2008, Jeff Garzik escribió:
> > Mourad De Clerck wrote:
> > > Hello,
> > >
> > > I was wondering what the status was of Marvell 6121 SATA support. I've
> > > seen earlier messages saying it was pretty much working with the AHCI
> > > driver, and that it would be merged in mainline soon, but that was in
> > > 2.6.22 times.
> > >
> > > I've not seen support for it in 2.6.25-rc5's ahci, so I guess I
> > > shouldn't expect it in 2.6.25?
> >
> > I would just add the PCI ID to ahci.c, it should most likely work...
> >
> > 	Jeff
>
>  I use this patch for kernels 2.6.25-rc
>
> Jose Alberto

Attached is a patch against 2.6.25-rc5 kernel to add suport for Marvell 6121 
SATA.

Signed-off-by: Jose Alberto Reguero <jareguero@telefonica.net>

Jose Alberto

[-- Attachment #2: ahci_6121_2.patch --]
[-- Type: text/x-diff, Size: 1396 bytes --]

--- linux-2.6.25-rc5/drivers/ata/ahci.c	2008-03-10 06:22:27.000000000 +0100
+++ linux-2.6.25-rc5.new/drivers/ata/ahci.c	2008-03-13 22:06:22.000000000 +0100
@@ -575,6 +575,7 @@
 
 	/* Marvell */
 	{ PCI_VDEVICE(MARVELL, 0x6145), board_ahci_mv },	/* 6145 */
+	{ PCI_VDEVICE(MARVELL, 0x6121), board_ahci_mv },	/* 6121 */
 
 	/* Generic, PCI class code for AHCI */
 	{ PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
@@ -649,6 +650,7 @@
 	void __iomem *mmio = pcim_iomap_table(pdev)[AHCI_PCI_BAR];
 	u32 cap, port_map;
 	int i;
+	int mv;
 
 	/* make sure AHCI mode is enabled before accessing CAP */
 	ahci_enable_ahci(mmio);
@@ -684,12 +686,16 @@
 	 * presence register, as bit 4 (counting from 0)
 	 */
 	if (hpriv->flags & AHCI_HFLAG_MV_PATA) {
+		if (pdev->device == 0x6121)
+			mv = 0x3;
+		else
+			mv = 0xf;
 		dev_printk(KERN_ERR, &pdev->dev,
 			   "MV_AHCI HACK: port_map %x -> %x\n",
-			   hpriv->port_map,
-			   hpriv->port_map & 0xf);
+			   port_map,
+			   port_map & mv);
 
-		port_map &= 0xf;
+		port_map &= mv;
 	}
 
 	/* cross check port_map and cap.n_ports */
@@ -1150,9 +1156,14 @@
 	int i;
 	void __iomem *port_mmio;
 	u32 tmp;
+	int mv;
 
 	if (hpriv->flags & AHCI_HFLAG_MV_PATA) {
-		port_mmio = __ahci_port_base(host, 4);
+		if (pdev->device == 0x6121)
+			mv = 2;
+		else
+			mv = 4;
+		port_mmio = __ahci_port_base(host, mv);
 
 		writel(0, port_mmio + PORT_IRQ_MASK);
 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Marvell 6121 SATA support?
  2008-03-13 22:22     ` Jose Alberto Reguero
@ 2008-03-17 12:31       ` Jeff Garzik
  2008-03-17 14:13         ` Mourad De Clerck
  0 siblings, 1 reply; 7+ messages in thread
From: Jeff Garzik @ 2008-03-17 12:31 UTC (permalink / raw)
  To: Jose Alberto Reguero; +Cc: Mourad De Clerck, linux-ide

Jose Alberto Reguero wrote:
> El Martes, 11 de Marzo de 2008, Jose Alberto Reguero escribió:
>> El Martes, 11 de Marzo de 2008, Jeff Garzik escribió:
>>> Mourad De Clerck wrote:
>>>> Hello,
>>>>
>>>> I was wondering what the status was of Marvell 6121 SATA support. I've
>>>> seen earlier messages saying it was pretty much working with the AHCI
>>>> driver, and that it would be merged in mainline soon, but that was in
>>>> 2.6.22 times.
>>>>
>>>> I've not seen support for it in 2.6.25-rc5's ahci, so I guess I
>>>> shouldn't expect it in 2.6.25?
>>> I would just add the PCI ID to ahci.c, it should most likely work...
>>>
>>> 	Jeff
>>  I use this patch for kernels 2.6.25-rc
>>
>> Jose Alberto
> 
> Attached is a patch against 2.6.25-rc5 kernel to add suport for Marvell 6121 
> SATA.
> 
> Signed-off-by: Jose Alberto Reguero <jareguero@telefonica.net>

applied, thanks for cleaning that up



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Marvell 6121 SATA support?
  2008-03-17 12:31       ` Jeff Garzik
@ 2008-03-17 14:13         ` Mourad De Clerck
  0 siblings, 0 replies; 7+ messages in thread
From: Mourad De Clerck @ 2008-03-17 14:13 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Jose Alberto Reguero, linux-ide

On 17/03/08 13:31, Jeff Garzik wrote:
> Jose Alberto Reguero wrote:
>> Attached is a patch against 2.6.25-rc5 kernel to add suport for
>> Marvell 6121 SATA.
> 
> applied, thanks for cleaning that up
> 

Thank you both,

Mourad DC



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Marvell 6121 SATA support?
@ 2008-03-30  0:50 Pablo Pérez
  0 siblings, 0 replies; 7+ messages in thread
From: Pablo Pérez @ 2008-03-30  0:50 UTC (permalink / raw)
  To: linux-ide

Hello, I have an Asus M2V motherboard which has two SATA controllers,
one of them is SATA1 (from Via), the second is SATA2 (Marvell 6121).

I have already installed Debian testing into a disk connected to SATA1
but would prefer to use the SATA2 controller.

Right now Debian testing boots a 2.6.24-1-486 kernel.

Can you tell me how to apply that patch you mentioned before? Should I
upgrade to a newer kernel?

Thanks
---
Pablo Pérez Benítez
http://virtualdebian.blogspot.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-03-30  0:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-11 14:17 Marvell 6121 SATA support? Mourad De Clerck
2008-03-11 14:31 ` Jeff Garzik
2008-03-11 22:10   ` Jose Alberto Reguero
2008-03-13 22:22     ` Jose Alberto Reguero
2008-03-17 12:31       ` Jeff Garzik
2008-03-17 14:13         ` Mourad De Clerck
  -- strict thread matches above, loose matches on Subject: below --
2008-03-30  0:50 Pablo Pérez

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).