Hi,<div>Two SATA device nodes in bluestone.dts uses the same structure as SATA node in the canyonlands.dts. All boards having SATA DWC currently use this structure. So, changing it will need to change all corresponding device tree. The current sata_dwc_460ex.c agrees with this structure.</div>
<div><br></div><div>I want to give more information for SATA controller on Maui:</div><div> - There are 2 SATA controllers on Maui, each has its own register set. But they use the same DMA registers for processing DMA transfer.</div>
<div> - For DMA transfer, each SATA controller will use its own DMA channel in the DMA registers.</div><div> - DMA controller driver must be supported and enabled in order to issue SATA DMA transfer.</div><div><br></div><div>
I agree that declaring the same DMA register information in 2 device nodes can cause confliction but I think the driver can handle it. In case this approach is not accepted, I will add only 1 SATA port to the bluestone.dts and another port will be considered later.</div>
<div><br></div><div>For the APM confidential information from my email, it is added automatically by the APM system. I have submitted a ticket for asking IT not adding it into my email and it is in-progress. I will continue to submit patches after the ticket is processed.</div>
<div><br></div><div>Regards,</div><div>Thang Nguyen -<br><br><div class="gmail_quote">On Tue, Apr 10, 2012 at 6:22 PM, Sergei Shtylyov <span dir="ltr"><<a href="mailto:sshtylyov@mvista.com">sshtylyov@mvista.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello.<div class="im"><br>
<br>
On 10-04-2012 7:46, Thang Nguyen wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Sergei,<br>
Thanks for your review.<br>
</blockquote>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Maui, there are 2 separate SATA controllers but they share the same<br>
AHBDMA controller. Each SATA controller is assigned a fixed DMA channel on<br>
the AHBDMA (channel 0 is assigned to SATA controller 0 and channel 1 is<br>
assigned to SATA controller 1).<br>
For the 460EX, there is only 1 SATA controller and it uses channel 0 for<br>
transferring data.<br>
</blockquote>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
In my opinion, in the case of Maui, we can use the same DMA information in<br>
2 device nodes as they use the same DMA controller. And in another CPU, if<br>
they use different DMA controller, the corresponding information will also<br>
be different.<br>
</blockquote>
<br></div>
   No, either the DMA controller should be a separate device node, or both ports and DMA controller should be packed into the single device node. The way you're doing it is incorrect because it creates memory resource conflict between devices when they are instantiated as platfrom devices.<div>
<div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Regards,<br>
Thang Nguyen -<br>
-----Original Message-----<br>
From: Sergei Shtylyov [mailto:<a href="mailto:sshtylyov@mvista.com" target="_blank">sshtylyov@mvista.com</a>]<br>
Sent: Monday, April 09, 2012 5:13 PM<br>
To: Thang Q. Nguyen<br>
Cc: Benjamin Herrenschmidt; Paul Mackerras; Jeff Garzik; Grant Likely; Rob<br>
Herring; <a href="mailto:linuxppc-dev@lists.ozlabs.org" target="_blank">linuxppc-dev@lists.ozlabs.org</a>; <a href="mailto:linux-kernel@vger.kernel.org" target="_blank">linux-kernel@vger.kernel.org</a>;<br>
<a href="mailto:linux-ide@vger.kernel.org" target="_blank">linux-ide@vger.kernel.org</a>; <a href="mailto:devicetree-discuss@lists.ozlabs.org" target="_blank">devicetree-discuss@lists.<u></u>ozlabs.org</a><br>
Subject: Re: [PATCH 1/1] Add support 2 SATA ports for Maui and change<br>
filename from sata_dwc_460ex.c to sata_dwc_4xx.c<br>
</blockquote>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello.<br>
</blockquote>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 03-04-2012 14:12, Thang Q. Nguyen wrote:<br>
</blockquote>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Signed-off-by: Thang Q. Nguyen<<a href="mailto:tqnguyen@apm.com" target="_blank">tqnguyen@apm.com</a>><br>
</blockquote>
[...]<br>
</blockquote>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
diff --git a/arch/powerpc/boot/dts/<u></u>bluestone.dts<br>
</blockquote>
b/arch/powerpc/boot/dts/<u></u>bluestone.dts<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
index cfa23bf..803fda6 100644<br>
--- a/arch/powerpc/boot/dts/<u></u>bluestone.dts<br>
+++ b/arch/powerpc/boot/dts/<u></u>bluestone.dts<br>
@@ -155,6 +155,27 @@<br>
                                        /*RXDE*/  0x5 0x4>;<br>
                };<br>
<br>
+               /* SATA DWC devices */<br>
+               SATA0: sata@bffd1000 {<br>
+                       compatible = "amcc,sata-apm821xx";<br>
+                       reg =<4 0xbffd1000 0x800   /* SATA0 */<br>
+                              4 0xbffd0800 0x400>; /* AHBDMA */<br>
+                       dma-channel=<0>;<br>
+                       interrupt-parent =<&UIC0>;<br>
+                       interrupts =<26 4    /* SATA0 */<br>
+                                     25 4>;  /* AHBDMA */<br>
+               };<br>
+<br>
+               SATA1: sata@bffd1800 {<br>
+                       compatible = "amcc,sata-apm821xx";<br>
+                       reg =<4 0xbffd1800 0x800   /* SATA1 */<br>
+                              4 0xbffd0800 0x400>; /* AHBDMA */<br>
+                       dma-channel=<1>;<br>
+                       interrupt-parent =<&UIC0>;<br>
+                       interrupts =<27 4    /* SATA1 */<br>
+                                     25 4>;  /* AHBDMA */<br>
+               };<br>
+<br>
</blockquote></blockquote>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
     So, this is dual SATA controller, not dual port SATA controller?<br>
BTW, it's wrong to have the same AHBDMA resource in two device nodes I<br>
think.<br>
</blockquote>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
MBR, Sergei<br>
</blockquote>
<br></div></div>
   Can you get rid of the following? It looks stupid when you post to the maliing list.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
CONFIDENTIALITY NOTICE: This e-mail message, including any attachments,<br>
is for the sole use of the intended recipient(s) and contains information<br>
that is confidential and proprietary to AppliedMicro Corporation or its subsidiaries.<br>
It is to be used solely for the purpose of furthering the parties' business relationship.<br>
All unauthorized review, use, disclosure or distribution is prohibited.<br>
If you are not the intended recipient, please contact the sender by reply e-mail<br>
and destroy all copies of the original message.<br>
</blockquote>
<br>
WBR, Sergei<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>
  
  
  
  
  <font face="arial, helvetica, sans-serif"><span style="border-collapse:collapse;font-size:medium"><br><table border="0" cellspacing="0" cellpadding="0" width="448" style="background:white;border-collapse:collapse">
 <tbody><tr style="height:60.95pt">
  <td width="162" valign="top" style="width:121.5pt;padding:0in 0in 0in 0in;height:60.95pt">
  <p style="margin-bottom:0in;margin-bottom:.0001pt;line-height:normal"><span><img src="https://sites.google.com/a/apm.com/logosig/_/rsrc/1278012978742/home/apm_sig_left_063010.jpg"></span></p>
  </td>
  <td width="286" style="width:214.45pt;padding:0in 0in 0in 0in;height:60.95pt">
  <p style="margin-bottom:0in;margin-bottom:.0001pt;line-height:12.2pt"><b><span style="font-size:9.0pt;color:#7f7f7f">Thang Q. Nguyen   <span> </span></span></b><b><span style="font-size:9.0pt;color:#8cc63f">|</span></b><b><span style="font-size:9.0pt;color:#7f7f7f"> Staff SW Eng.</span></b></p>

  <p style="margin-bottom:0in;margin-bottom:.0001pt;line-height:12.2pt"><span style="font-size:9.0pt;color:#7f7f7f">C: +849.7684.7607
  </span><span style="font-size:9.0pt;color:#8cc63f">|</span><span style="font-size:9.0pt;color:#7f7f7f"> O:
  +848.3770.0640</span></p>
  <p style="margin-bottom:0in;margin-bottom:.0001pt;line-height:12.2pt"><span style="font-size:9.0pt;color:#7f7f7f">F: +848.3770.0641  </span><span style="font-size:9.0pt;color:#8cc63f">|</span><span style="font-size:9.0pt;color:#7f7f7f"> <a href="mailto:tqnguyen@apm.com" target="_blank">tqnguyen@apm.com</a></span><span style="font-size:10.0pt;color:#7f7f7f"></span></p>

  </td>
 </tr></tbody></table><table border="0" cellspacing="0" cellpadding="0" width="477" style="background:white;border-collapse:collapse"><tbody></tbody></table></span></font><br>
</div>

<pre>CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, 
is for the sole use of the intended recipient(s) and contains information 
that is confidential and proprietary to AppliedMicro Corporation or its subsidiaries. 
It is to be used solely for the purpose of furthering the parties' business relationship. 
All unauthorized review, use, disclosure or distribution is prohibited. 
If you are not the intended recipient, please contact the sender by reply e-mail 
and destroy all copies of the original message.