Thread (10 messages) 10 messages, 2 authors, 2011-03-25
DORMANTno replies

[PATCH 3/4] davinci: da850: add support for SATA interface

From: Nori, Sekhar <hidden>
Date: 2011-03-25 09:19:00
Also in: linux-ide

Hi Sergei,

On Thu, Mar 24, 2011 at 23:31:57, Sergei Shtylyov wrote:
Hello.

Nori, Sekhar wrote:
quoted
quoted
quoted
quoted
quoted
diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c
index 68fe4c2..276199d 100644
--- a/arch/arm/mach-davinci/da850.c
+++ b/arch/arm/mach-davinci/da850.c
@@ -373,6 +373,14 @@ static struct clk spi1_clk = {
   	.flags		= DA850_CLK_ASYNC3,
   };

+static struct clk sata_clk = {
+	.name		= "sata",
+	.parent		=&pll0_sysclk2,
+	.lpsc		= DA850_LPSC1_SATA,
+	.gpsc		= 1,
+	.flags		= PSC_FORCE,
+};
+
   static struct clk_lookup da850_clks[] = {
   	CLK(NULL,		"ref",		&ref_clk),
   	CLK(NULL,		"pll0",		&pll0_clk),
@@ -419,6 +427,7 @@ static struct clk_lookup da850_clks[] = {
   	CLK(NULL,		"usb20",	&usb20_clk),
   	CLK("spi_davinci.0",	NULL,		&spi0_clk),
   	CLK("spi_davinci.1",	NULL,		&spi1_clk),
+	CLK("ahci",		NULL,		&sata_clk),
   	CLK(NULL,		NULL,		NULL),
   };
quoted
quoted
quoted
quoted
     I'd put the above into a separate patch...
quoted
quoted
quoted
Why should addition of clock data not be in the same patch
as the one which adds platform resources etc? It is not a big
deal to change, but I would like to know why you request this.
quoted
quoted
    I didn't request anything, I just said what I'd have done. :-)
quoted
Okay. I guess I will keep it as is.
quoted
quoted
I think modifying the DA8xx-common and DA850-specific files should better be 
done separately. Although in this case we're adding DA850 only device, so 
perhaps the added code in devices-da8xx.c should be enclosed into #ifdef?
quoted
Good point. Will add the #ifdef.
    Or perhaps the device should just be placed in da850.c instead?
Um, no. da850.c is currently free from any peripheral specific
functionality and would like to keep it that way. MMC/SD1 is
DA850 specific as well, and has been kept in devices-da8xx.c.
I think consolidating all peripheral specific code in devices-da8xx.c
is a better idea.

Thanks,
Sekhar
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help