diff mbox

[2/2] pata_amd: add support for CS5535 controllers

Message ID 1246630963-5831-2-git-send-email-otavio@ossystems.com.br
State Not Applicable
Delegated to: David Miller
Headers show

Commit Message

Otavio Salvador July 3, 2009, 2:22 p.m. UTC
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 drivers/ata/pata_amd.c |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

Comments

Alan Cox July 3, 2009, 2:31 p.m. UTC | #1
On Fri,  3 Jul 2009 11:22:43 -0300
Otavio Salvador <otavio@ossystems.com.br> wrote:

We already have a CS5535 driver: drivers/ata/pata_cs5535.c

That drives the hardware via the MSR interface which means it doesn't
rely so much on what firmware and firmware related magic happens to be on
a given system.

Alan

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Otavio Salvador July 3, 2009, 2:33 p.m. UTC | #2
On Fri, Jul 3, 2009 at 11:31 AM, Alan Cox<alan@lxorguk.ukuu.org.uk> wrote:
> On Fri,  3 Jul 2009 11:22:43 -0300
> Otavio Salvador <otavio@ossystems.com.br> wrote:
>
> We already have a CS5535 driver: drivers/ata/pata_cs5535.c
>
> That drives the hardware via the MSR interface which means it doesn't
> rely so much on what firmware and firmware related magic happens to be on
> a given system.

Right but why not also support it at pata_amd as it is done for cs5536?

If the native ones are the suitable ones then wouldn't be better to
drop cs5536 from pata_amd and leave just the native ones as
alternative?
Alan Cox July 3, 2009, 2:48 p.m. UTC | #3
On Fri, 3 Jul 2009 11:33:59 -0300
Otavio Salvador <otavio@ossystems.com.br> wrote:

> On Fri, Jul 3, 2009 at 11:31 AM, Alan Cox<alan@lxorguk.ukuu.org.uk> wrote:
> > On Fri,  3 Jul 2009 11:22:43 -0300
> > Otavio Salvador <otavio@ossystems.com.br> wrote:
> >
> > We already have a CS5535 driver: drivers/ata/pata_cs5535.c
> >
> > That drives the hardware via the MSR interface which means it doesn't
> > rely so much on what firmware and firmware related magic happens to be on
> > a given system.
> 
> Right but why not also support it at pata_amd as it is done for cs5536?

Are they full compatible in the AMD case - I know they are not in the NS
case.

> If the native ones are the suitable ones then wouldn't be better to
> drop cs5536 from pata_amd and leave just the native ones as
> alternative?

For cs5536 I would have preferred to do that but there are existing users
and setups that use pata_amd for this purpose.

Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Otavio Salvador July 3, 2009, 3:06 p.m. UTC | #4
Hello Alan,

On Fri, Jul 3, 2009 at 11:48 AM, Alan Cox<alan@lxorguk.ukuu.org.uk> wrote:
> Are they full compatible in the AMD case - I know they are not in the NS
> case.

From what I could see in  the code they are. I've tested in few
machines here without any problem.
Alan Cox July 3, 2009, 3:21 p.m. UTC | #5
On Fri, 3 Jul 2009 12:06:05 -0300
Otavio Salvador <otavio@ossystems.com.br> wrote:

> Hello Alan,
> 
> On Fri, Jul 3, 2009 at 11:48 AM, Alan Cox<alan@lxorguk.ukuu.org.uk> wrote:
> > Are they full compatible in the AMD case - I know they are not in the NS
> > case.
> 
> >From what I could see in  the code they are. I've tested in few
> machines here without any problem.

I'd prefer to see documentation to that effect. Adding one of the Geode
guys to the Cc: list to clarify the situation.

Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/ata/pata_amd.c b/drivers/ata/pata_amd.c
index 33a74f1..5d0a0a7 100644
--- a/drivers/ata/pata_amd.c
+++ b/drivers/ata/pata_amd.c
@@ -454,7 +454,7 @@  static void amd_clear_fifo(struct pci_dev *pdev)
 
 static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 {
-	static const struct ata_port_info info[10] = {
+	static const struct ata_port_info info[] = {
 		{	/* 0: AMD 7401 - no swdma */
 			.flags = ATA_FLAG_SLAVE_POSS,
 			.pio_mask = ATA_PIO4,
@@ -518,7 +518,14 @@  static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 			.udma_mask = ATA_UDMA6,
 			.port_ops = &nv133_port_ops
 		},
-		{	/* 9: AMD CS5536 (Geode companion) */
+		{	/* 9: AMD CS5535 (Geode companion) */
+			.flags = ATA_FLAG_SLAVE_POSS,
+			.pio_mask = ATA_PIO4,
+			.mwdma_mask = ATA_MWDMA2,
+			.udma_mask = ATA_UDMA4,
+			.port_ops = &amd100_port_ops
+		},
+		{	/* 10: AMD CS5536 (Geode companion) */
 			.flags = ATA_FLAG_SLAVE_POSS,
 			.pio_mask = ATA_PIO4,
 			.mwdma_mask = ATA_MWDMA2,
@@ -615,7 +622,8 @@  static const struct pci_device_id amd[] = {
 	{ PCI_VDEVICE(NVIDIA,	PCI_DEVICE_ID_NVIDIA_NFORCE_MCP67_IDE),	8 },
 	{ PCI_VDEVICE(NVIDIA,	PCI_DEVICE_ID_NVIDIA_NFORCE_MCP73_IDE),	8 },
 	{ PCI_VDEVICE(NVIDIA,	PCI_DEVICE_ID_NVIDIA_NFORCE_MCP77_IDE),	8 },
-	{ PCI_VDEVICE(AMD,	PCI_DEVICE_ID_AMD_CS5536_IDE),		9 },
+	{ PCI_VDEVICE(AMD,	PCI_DEVICE_ID_AMD_CS5535_IDE),		9 },
+	{ PCI_VDEVICE(AMD,	PCI_DEVICE_ID_AMD_CS5536_IDE),		10 },
 
 	{ },
 };