This patch enables the on-chip DWC SATA controller of the AppliedMicro processor 460EX.
Signed-off-by: Rupjyoti Sarmah <rsarmah@appliedmicro.com>
Signed-off-by: Mark Miesfeld <mmiesfeld@appliedmicro.com>
Signed-off-by: Prodyut Hazarika <phazarika@appliedmicro.com>
---
arch/powerpc/boot/dts/canyonlands.dts | 8 +
drivers/ata/Kconfig | 9 +
drivers/ata/Makefile | 1 +
drivers/ata/sata_dwc.c | 1965 +++++++++++++++++++++++++++++++++
4 files changed, 1983 insertions(+), 0 deletions(-)
create mode 100644 drivers/ata/sata_dwc.c
diff --git a/arch/powerpc/boot/dts/canyonlands.dts b/arch/powerpc/boot/dts/canyonlands.dts
index cd56bb5..d3b2c99 100644
--- a/arch/powerpc/boot/dts/canyonlands.dts
+++ b/arch/powerpc/boot/dts/canyonlands.dts
@@ -163,6 +163,14 @@
interrupts = <0x1e 4>;
};
+ SATA0: sata@bffd1000 {
+ compatible = "amcc,sata-460ex";
+ reg = <4 0xbffd1000 0x800 4 0xbffd0800 0x400>;
+ interrupt-parent = <&UIC3>;
+ interrupts = <0x0 0x4 /* SATA */
+ 0x5 0x4>; /* AHBDMA */
+ };
+
POB0: opb {
compatible = "ibm,opb-460ex", "ibm,opb";
#address-cells = <1>;
diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index 56c6374..bba7b8a 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -82,6 +82,15 @@ config SATA_FSL
If unsure, say N.
+config SATA_DWC
+ tristate "DesignWare Cores SATA support"
+ depends on 460EX
+ help
+ This option enables support for the on-chip SATA controller of the
+ AppliedMicro processor 460EX.
+
+ If unsure, say N.
+
config ATA_SFF
bool "ATA SFF support"
default y
diff --git a/drivers/ata/Makefile b/drivers/ata/Makefile
index fc936d4..0de7a33 100644
--- a/drivers/ata/Makefile
+++ b/drivers/ata/Makefile
@@ -19,6 +19,7 @@ obj-$(CONFIG_SATA_INIC162X) += sata_inic162x.o
obj-$(CONFIG_PDC_ADMA) += ...On 04/06/2010 07:41 AM, Rupjyoti Sarmah wrote: General comment: remove "inline" and let the compiler select those 1) interrupt is not GFP_KERNEL 2) you must failure kmalloc failure this should be defined in terms of scr_read/write functions defined either call ->sff_check_status or ata_sff_check_status(), pick one. in either you need spin_lock_irqsave(), or you don't need the lock at all. qc_prep is for setting up DMA internally, not on the hardware. SActive What is the problem with NCQ? It is better to submit a non-NCQ driver ditto... don't flag ATA_FLAG_NCQ if you note in the above comment that NCQ is broken --
And why the heck would you want to allocate it at interrupt time ? ? ? BTW. Stefan mentioned earlier that they had some fixes for that driver in the Denx tree. Are those fixes now included in that variant ? Cheers, Ben. --
Yes, from a first scan the fix I was referring to seems to be included. Cheers, Stefan --
Hi Jeff, Thanks. I would go through your suggestions and resubmit a newer version. Regards, Rup -----Original Message----- From: Jeff Garzik [mailto:jgpobox@gmail.com] On Behalf Of Jeff Garzik Sent: Tuesday, April 06, 2010 8:46 PM To: Rupjyoti Sarmah Cc: linux-ide@vger.kernel.org; linux-kernel@vger.kernel.org; sr@denx.de; linuxppc-dev@ozlabs.org Subject: Re: [PATCH] 460EX on-chip SATA driver<kernel 2.6.33> < resubmission : 02> On 04/06/2010 07:41 AM, Rupjyoti Sarmah wrote: General comment: remove "inline" and let the compiler select those 1) interrupt is not GFP_KERNEL 2) you must failure kmalloc failure this should be defined in terms of scr_read/write functions defined either call ->sff_check_status or ata_sff_check_status(), pick one. in either you need spin_lock_irqsave(), or you don't need the lock at all. qc_prep is for setting up DMA internally, not on the hardware. SAct
