diff mbox

[1/2,v3] ARM: shmobile: r8a7790: add QSPI support

Message ID 1382326020-10558-2-git-send-email-cm-hiep@jinso.co.jp (mailing list archive)
State Superseded
Headers show

Commit Message

Cao Minh Hiep Oct. 21, 2013, 3:26 a.m. UTC
From: Hiep Cao Minh <cm-hiep@jinso.co.jp>

Adds support for QSPI on the r8a7790.

Signed-off-by: Hiep Cao Minh <cm-hiep@jinso.co.jp>
---
 arch/arm/mach-shmobile/clock-r8a7790.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Kuninori Morimoto Oct. 21, 2013, 4:46 a.m. UTC | #1
Hi Simon

> From: Hiep Cao Minh <cm-hiep@jinso.co.jp>
> 
> Adds support for QSPI on the r8a7790.
> 
> Signed-off-by: Hiep Cao Minh <cm-hiep@jinso.co.jp>
> ---
(snip)
>  enum {
> -	MSTP931, MSTP930, MSTP929, MSTP928,
> +	MSTP931, MSTP930, MSTP929, MSTP928, MSTP917,

This is not a big deal,
but the original MSTP numbering seems already broken.
I can fix these if you want.



Best regards
---
Kuninori Morimoto
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sergei Shtylyov Oct. 21, 2013, 1:13 p.m. UTC | #2
Hello.

On 10/21/2013 07:26 AM, Cao Minh Hiep wrote:

> From: Hiep Cao Minh <cm-hiep@jinso.co.jp>

> Adds support for QSPI on the r8a7790.

> Signed-off-by: Hiep Cao Minh <cm-hiep@jinso.co.jp>
> ---
>   arch/arm/mach-shmobile/clock-r8a7790.c |    4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)

> diff --git a/arch/arm/mach-shmobile/clock-r8a7790.c b/arch/arm/mach-shmobile/clock-r8a7790.c
> index a64f965..ba6f258 100644
> --- a/arch/arm/mach-shmobile/clock-r8a7790.c
> +++ b/arch/arm/mach-shmobile/clock-r8a7790.c
> @@ -182,7 +182,7 @@ static struct clk div6_clks[DIV6_NR] = {
>
>   /* MSTP */
>   enum {
> -	MSTP931, MSTP930, MSTP929, MSTP928,
> +	MSTP931, MSTP930, MSTP929, MSTP928, MSTP917,

    Sorry for not mentioning it before but MSTP917 should be on a line of its own.

>   	MSTP813,
>   	MSTP726, MSTP725, MSTP724, MSTP723, MSTP722, MSTP721, MSTP720,
>   	MSTP717, MSTP716,

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Cao Minh Hiep Oct. 22, 2013, 12:52 a.m. UTC | #3
Hi Sergei

Thanks for your comment,

>>   /* MSTP */
>>   enum {
>> -    MSTP931, MSTP930, MSTP929, MSTP928,
>> +    MSTP931, MSTP930, MSTP929, MSTP928, MSTP917,
>
>    Sorry for not mentioning it before but MSTP917 should be on a line 
> of its own.
>
I am not clear your comment yet. Could you please tell me why the 
MSTP917 should be
on a line of its own instead of MSTP9xx.

Best Regards,

Hiep.

--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Kuninori Morimoto Oct. 22, 2013, 1:26 a.m. UTC | #4
Hi Simon, Hiep-san

> >>   /* MSTP */
> >>   enum {
> >> -    MSTP931, MSTP930, MSTP929, MSTP928,
> >> +    MSTP931, MSTP930, MSTP929, MSTP928, MSTP917,
> >
> >    Sorry for not mentioning it before but MSTP917 should be on a line 
> > of its own.
> >
> I am not clear your comment yet. Could you please tell me why the 
> MSTP917 should be
> on a line of its own instead of MSTP9xx.

It is SH-ARM traditional rule.
MSTP line should keep like this

 MSTP93x, MSTP93y, MSTP93z...
 MSTP92x, MSTP92y, MSTP92z...
 MSTP91x, MSTP91y, MSTP91z...

But, as I already commented, current MSTP9xx line is already broken here.
# The SoC which has broken MSTP line is not only r8a7790 today,
# and cleaning these line makes it difficult to backport.

Anyway, sending v4 patch for it is up to Simon.

Best regards
---
Kuninori Morimoto
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Cao Minh Hiep Oct. 22, 2013, 1:55 a.m. UTC | #5
Hi Morimoto-san

>>>>    /* MSTP */
>>>>    enum {
>>>> -    MSTP931, MSTP930, MSTP929, MSTP928,
>>>> +    MSTP931, MSTP930, MSTP929, MSTP928, MSTP917,
>>>     Sorry for not mentioning it before but MSTP917 should be on a line
>>> of its own.
>>>
>> I am not clear your comment yet. Could you please tell me why the
>> MSTP917 should be
>> on a line of its own instead of MSTP9xx.
> It is SH-ARM traditional rule.
> MSTP line should keep like this
>
>   MSTP93x, MSTP93y, MSTP93z...
>   MSTP92x, MSTP92y, MSTP92z...
>   MSTP91x, MSTP91y, MSTP91z...
>
> But, as I already commented, current MSTP9xx line is already broken here.
> # The SoC which has broken MSTP line is not only r8a7790 today,
> # and cleaning these line makes it difficult to backport.
>
> Anyway, sending v4 patch for it is up to Simon.
Thanks, I'll update the patch v4 with Sergei's and your comments to Simon.

Best Regards,
---
Hiep Cao Minh.


--
To unsubscribe from this list: send the line "unsubscribe linux-sh" 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/arch/arm/mach-shmobile/clock-r8a7790.c b/arch/arm/mach-shmobile/clock-r8a7790.c
index a64f965..ba6f258 100644
--- a/arch/arm/mach-shmobile/clock-r8a7790.c
+++ b/arch/arm/mach-shmobile/clock-r8a7790.c
@@ -182,7 +182,7 @@  static struct clk div6_clks[DIV6_NR] = {
 
 /* MSTP */
 enum {
-	MSTP931, MSTP930, MSTP929, MSTP928,
+	MSTP931, MSTP930, MSTP929, MSTP928, MSTP917,
 	MSTP813,
 	MSTP726, MSTP725, MSTP724, MSTP723, MSTP722, MSTP721, MSTP720,
 	MSTP717, MSTP716,
@@ -198,6 +198,7 @@  static struct clk mstp_clks[MSTP_NR] = {
 	[MSTP930] = SH_CLK_MSTP32(&hp_clk, SMSTPCR9, 30, 0), /* I2C1 */
 	[MSTP929] = SH_CLK_MSTP32(&hp_clk, SMSTPCR9, 29, 0), /* I2C2 */
 	[MSTP928] = SH_CLK_MSTP32(&hp_clk, SMSTPCR9, 28, 0), /* I2C3 */
+	[MSTP917] = SH_CLK_MSTP32(&qspi_clk, SMSTPCR9, 17, 0), /* QSPI */
 	[MSTP813] = SH_CLK_MSTP32(&p_clk, SMSTPCR8, 13, 0), /* Ether */
 	[MSTP726] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 26, 0), /* LVDS0 */
 	[MSTP725] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 25, 0), /* LVDS1 */
@@ -296,6 +297,7 @@  static struct clk_lookup lookups[] = {
 	CLKDEV_DEV_ID("ee220000.mmcif", &mstp_clks[MSTP305]),
 	CLKDEV_DEV_ID("sh_mmcif.1", &mstp_clks[MSTP305]),
 	CLKDEV_DEV_ID("sh_cmt.0", &mstp_clks[MSTP124]),
+	CLKDEV_DEV_ID("qspi.0", &mstp_clks[MSTP917]),
 };
 
 #define R8A7790_CLOCK_ROOT(e, m, p0, p1, p30, p31)		\