Renesas ARM Based SoC Boards Updates for v3.16
Hi Olof, Hi Kevin, Hi Arnd,
Please consider these Renesas ARM Based SoC Boards Updates for v3.16.
This pull request is based on3984ba10dddc5a10 ("ARM: shmobile: r8a7791: Rename VSP1_SY clocks to VSP1_S").
That commit is part of the pull request
"Renesas ARM Based SoC Clock Updates for v3.16", tagged as renesas-clock-for-v3.16, which I have previously sent.
I have not rebased this pull-request on top of renesas-clock-for-v3.16 in order to avoid churn in linux-next.
The reason for basing this pull-request on clock updates is that many of its patches depend on shmobile_clk_workaround() which is added as part of the clock updates.
The following changes since commit 58ea1d53ba93620ac50fef9d9720b2323971f243:
ARM: shmobile: r8a7791: Rename VSP1_SY clocks to VSP1_S (2014-04-14 11:30:11 +0900)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-boards-for-v3.16
for you to fetch changes up to a09b2f0ba170dc89a67d6c4c4f027b37a085dad9:
ARM: shmobile: lager legacy: Enable Quad SPI transfers for the SPI FLASH (2014-04-15 08:13:22 +0900)
----------------------------------------------------------------
Renesas ARM Based SoC Boards Updates for v3.16
r8a7791 (R-Car M2) based Koelsch board
* Enable Quad SPI transfers for the SPI FLASH
* Clock workarounds for Ether, I2C, MSIOF, Quad SPI and SDHI
* Use shmobile_clk_workaround()
r8a7790 (R-Car H2) based Lager board
* Enable Quad SPI transfers for the SPI FLASH
* Switch to use dai info for R-Car sound
* Clock workarounds for Ether, MSIOF, MMCIF, Quad SPI and SDHI
* Use shmobile_clk_workaround()
r8a7778 (R-Car M1) based Bock-W board
* Switch to use dai info for R-Car sound
----------------------------------------------------------------
Geert Uytterhoeven (3):
ARM: shmobile: koelsch-reference: Work around core clock issues
ARM: shmobile: koelsch legacy: Enable Quad SPI transfers for the SPI FLASH
ARM: shmobile: lager legacy: Enable Quad SPI transfers for the SPI FLASH
Kuninori Morimoto (3):
ARM: shmobile: bockw: remove old style audio clock
ARM: shmobile: bockw: switch to use dai info for R-Car sound
ARM: shmobile: lager: switch to use dai info for R-Car sound
Magnus Damm (4):
ARM: shmobile: Use shmobile_clk_workaround() on Lager
ARM: shmobile: Use shmobile_clk_workaround() on Koelsch
ARM: shmobile: Add Lager clock workarounds for SDHI and MMCIF
ARM: shmobile: Add Koelsch clock workarounds for SDHI
Simon Horman (4):
ARM: shmobile: koelsch: Annotate clk_names with __initconst
ARM: shmobile: lager: Annotate clk_names with __initconst
ARM: shmobile: koelsch-reference: Annotate clk_enables as __initconst
ARM: shmobile: lager-reference: Work around core clock issues
arch/arm/mach-shmobile/board-bockw.c | 63 +++++++++++------ arch/arm/mach-shmobile/board-koelsch-reference.c | 86 ++++++++++++------------ arch/arm/mach-shmobile/board-koelsch.c | 2 +- arch/arm/mach-shmobile/board-lager-reference.c | 79 +++++++++++----------- arch/arm/mach-shmobile/board-lager.c | 29 +++++--- 5 files changed, 142 insertions(+), 117 deletions(-)
PATCH 1/14 ARM: shmobile: Use shmobile_clk_workaround() on Lager
From: Magnus Damm <[email protected]>
Convert the Lager DT reference code to use the newly introduced function shmobile_clk_workaround().
--- arch/arm/mach-shmobile/board-lager-reference.c | 65 ++++++++++---------------- 1 file changed, 25 insertions(+), 40 deletions(-)
arch/arm/mach-shmobile/board-lager-reference.c +25 -40
@@ -18,12 +18,11 @@* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include <linux/clk.h> -#include <linux/clkdev.h> #include <linux/dma-mapping.h> #include <linux/init.h> #include <linux/of_platform.h> #include <linux/platform_data/rcar-du.h> +#include <mach/clock.h> #include <mach/common.h> #include <mach/irqs.h> #include <mach/rcar-gen2.h>
@@ -86,46 +85,32 @@ static void __init lager_add_du_device(void)platform_device_register_full (&info); } +/* +* This is a really crude hack to provide clkdev support to platform +* devices until they get moved to DT. +*/ +static const struct clk_name clk_names[] = { + {"cmt0" ,NULL ,"sh_cmt.0" }, + {"scifa0" ,NULL ,"sh-sci.0" }, + {"scifa1" ,NULL ,"sh-sci.1" }, + {"scifb0" ,NULL ,"sh-sci.2" }, + {"scifb1" ,NULL ,"sh-sci.3" }, + {"scifb2" ,NULL ,"sh-sci.4" }, + {"scifa2" ,NULL ,"sh-sci.5" }, + {"scif0" ,NULL ,"sh-sci.6" }, + {"scif1" ,NULL ,"sh-sci.7" }, + {"hscif0" ,NULL ,"sh-sci.8" }, + {"hscif1" ,NULL ,"sh-sci.9" }, + {"du0" ,"du.0" ,"rcar-du-r8a7790" }, + {"du1" ,"du.1" ,"rcar-du-r8a7790" }, + {"du2" ,"du.2" ,"rcar-du-r8a7790" }, + {"lvds0" ,"lvds.0" ,"rcar-du-r8a7790" }, + {"lvds1" ,"lvds.1" ,"rcar-du-r8a7790" }, +}; +static void __init lager_add_standard_devices (void ) { -/* -* This is a really crude hack to provide clkdev support to platform -* devices until they get moved to DT. -*/ -static const struct clk_name { -const char *clk; -const char *con_id; -const char *dev_id; - } clk_names[] = { - {"cmt0" ,NULL ,"sh_cmt.0" }, - {"scifa0" ,NULL ,"sh-sci.0" }, - {"scifa1" ,NULL ,"sh-sci.1" }, - {"scifb0" ,NULL ,"sh-sci.2" }, - {"scifb1" ,NULL ,"sh-sci.3" }, - {"scifb2" ,NULL ,"sh-sci.4" }, - {"scifa2" ,NULL ,"sh-sci.5" }, - {"scif0" ,NULL ,"sh-sci.6" }, - {"scif1" ,NULL ,"sh-sci.7" }, - {"hscif0" ,NULL ,"sh-sci.8" }, - {"hscif1" ,NULL ,"sh-sci.9" }, - {"du0" ,"du.0" ,"rcar-du-r8a7790" }, - {"du1" ,"du.1" ,"rcar-du-r8a7790" }, - {"du2" ,"du.2" ,"rcar-du-r8a7790" }, - {"lvds0" ,"lvds.0" ,"rcar-du-r8a7790" }, - {"lvds1" ,"lvds.1" ,"rcar-du-r8a7790" }, - }; -struct clk *clk; -unsigned int i; - -for (i =0 ; i <ARRAY_SIZE (clk_names); ++i) { - clk =clk_get (NULL , clk_names[i].clk); -if (!IS_ERR (clk)) { -clk_register_clkdev (clk, clk_names[i].con_id, - clk_names[i].dev_id); -clk_put (clk); - } - } - +shmobile_clk_workaround (clk_names,ARRAY_SIZE (clk_names), false);r8a7790_add_dt_devices ();of_platform_populate (NULL , of_default_bus_match_table,NULL ,NULL );
Signature · 1 line
1.8.4
PATCH 2/14 ARM: shmobile: Use shmobile_clk_workaround() on Koelsch
In reply to Simon HormanFrom: Magnus Damm <[email protected]>
Convert the Koelsch DT reference code to use the newly introduced function shmobile_clk_workaround().
--- arch/arm/mach-shmobile/board-koelsch-reference.c | 71 ++++++++++-------------- 1 file changed, 28 insertions(+), 43 deletions(-)
arch/arm/mach-shmobile/board-koelsch-reference.c +28 -43
@@ -19,12 +19,11 @@* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include <linux/clk.h> -#include <linux/clkdev.h> #include <linux/dma-mapping.h> #include <linux/kernel.h> #include <linux/of_platform.h> #include <linux/platform_data/rcar-du.h> +#include <mach/clock.h> #include <mach/common.h> #include <mach/irqs.h> #include <mach/rcar-gen2.h>
@@ -82,49 +81,35 @@ static void __init koelsch_add_du_device(void)platform_device_register_full (&info); } +/* +* This is a really crude hack to provide clkdev support to platform +* devices until they get moved to DT. +*/ +static const struct clk_name clk_names[] = { + {"cmt0" ,NULL ,"sh_cmt.0" }, + {"scifa0" ,NULL ,"sh-sci.0" }, + {"scifa1" ,NULL ,"sh-sci.1" }, + {"scifb0" ,NULL ,"sh-sci.2" }, + {"scifb1" ,NULL ,"sh-sci.3" }, + {"scifb2" ,NULL ,"sh-sci.4" }, + {"scifa2" ,NULL ,"sh-sci.5" }, + {"scif0" ,NULL ,"sh-sci.6" }, + {"scif1" ,NULL ,"sh-sci.7" }, + {"scif2" ,NULL ,"sh-sci.8" }, + {"scif3" ,NULL ,"sh-sci.9" }, + {"scif4" ,NULL ,"sh-sci.10" }, + {"scif5" ,NULL ,"sh-sci.11" }, + {"scifa3" ,NULL ,"sh-sci.12" }, + {"scifa4" ,NULL ,"sh-sci.13" }, + {"scifa5" ,NULL ,"sh-sci.14" }, + {"du0" ,"du.0" ,"rcar-du-r8a7791" }, + {"du1" ,"du.1" ,"rcar-du-r8a7791" }, + {"lvds0" ,"lvds.0" ,"rcar-du-r8a7791" }, +}; +static void __init koelsch_add_standard_devices (void ) { -/* -* This is a really crude hack to provide clkdev support to the CMT and -* DU devices until they get moved to DT. -*/ -static const struct clk_name { -const char *clk; -const char *con_id; -const char *dev_id; - } clk_names[] = { - {"cmt0" ,NULL ,"sh_cmt.0" }, - {"scifa0" ,NULL ,"sh-sci.0" }, - {"scifa1" ,NULL ,"sh-sci.1" }, - {"scifb0" ,NULL ,"sh-sci.2" }, - {"scifb1" ,NULL ,"sh-sci.3" }, - {"scifb2" ,NULL ,"sh-sci.4" }, - {"scifa2" ,NULL ,"sh-sci.5" }, - {"scif0" ,NULL ,"sh-sci.6" }, - {"scif1" ,NULL ,"sh-sci.7" }, - {"scif2" ,NULL ,"sh-sci.8" }, - {"scif3" ,NULL ,"sh-sci.9" }, - {"scif4" ,NULL ,"sh-sci.10" }, - {"scif5" ,NULL ,"sh-sci.11" }, - {"scifa3" ,NULL ,"sh-sci.12" }, - {"scifa4" ,NULL ,"sh-sci.13" }, - {"scifa5" ,NULL ,"sh-sci.14" }, - {"du0" ,"du.0" ,"rcar-du-r8a7791" }, - {"du1" ,"du.1" ,"rcar-du-r8a7791" }, - {"lvds0" ,"lvds.0" ,"rcar-du-r8a7791" }, - }; -struct clk *clk; -unsigned int i; - -for (i =0 ; i <ARRAY_SIZE (clk_names); ++i) { - clk =clk_get (NULL , clk_names[i].clk); -if (!IS_ERR (clk)) { -clk_register_clkdev (clk, clk_names[i].con_id, - clk_names[i].dev_id); -clk_put (clk); - } - } - +shmobile_clk_workaround (clk_names,ARRAY_SIZE (clk_names), false);r8a7791_add_dt_devices ();of_platform_populate (NULL , of_default_bus_match_table,NULL ,NULL );
Signature · 1 line
1.8.4
PATCH 3/14 ARM: shmobile: koelsch: Annotate clk_names with __initconst
In reply to Simon Horman--- arch/arm/mach-shmobile/board-koelsch-reference.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-shmobile/board-koelsch-reference.c +1 -1
@@ -85,7 +85,7 @@ static void __init koelsch_add_du_device(void)* This is a really crude hack to provide clkdev support to platform * devices until they get moved to DT. */ -static const struct clk_name clk_names[] = { +static const struct clk_name clk_names[]__initconst = { {"cmt0" ,NULL ,"sh_cmt.0" }, {"scifa0" ,NULL ,"sh-sci.0" }, {"scifa1" ,NULL ,"sh-sci.1" },
Signature · 1 line
1.8.4
PATCH 4/14 ARM: shmobile: lager: Annotate clk_names with __initconst
In reply to Simon Horman--- arch/arm/mach-shmobile/board-lager-reference.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-shmobile/board-lager-reference.c +1 -1
@@ -89,7 +89,7 @@ static void __init lager_add_du_device(void)* This is a really crude hack to provide clkdev support to platform * devices until they get moved to DT. */ -static const struct clk_name clk_names[] = { +static const struct clk_name clk_names[]__initconst = { {"cmt0" ,NULL ,"sh_cmt.0" }, {"scifa0" ,NULL ,"sh-sci.0" }, {"scifa1" ,NULL ,"sh-sci.1" },
Signature · 1 line
1.8.4
PATCH 5/14 ARM: shmobile: koelsch-reference: Work around core clock issues
In reply to Simon HormanFrom: Geert Uytterhoeven <[email protected]>
Due to issues with runtime PM clock management, clocks not explicitly managed by their drivers may not be enabled at all, or be inadvertently disabled by the clk_disable_unused() late initcall.
Until this is fixed, add a temporary workaround, calling shmobile_clk_workaround() with enable == true.
For now this enables the clocks for: ether, i2c2, msiof0, qspi_mod, and thermal. More clocks can be added if needed.
--- arch/arm/mach-shmobile/board-koelsch-reference.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
arch/arm/mach-shmobile/board-koelsch-reference.c +12 -0
@@ -107,9 +107,21 @@ static const struct clk_name clk_names[] __initconst = { { "lvds0", "lvds.0", "rcar-du-r8a7791" }, }; +/* +* This is a really crude hack to work around core platform clock issues +*/ +static const struct clk_name clk_enables[] = { + {"ether" ,NULL ,"ee700000.ethernet" }, + {"i2c2" ,NULL ,"e6530000.i2c" }, + {"msiof0" ,NULL ,"e6e20000.spi" }, + {"qspi_mod" ,NULL ,"e6b10000.spi" }, + {"thermal" ,NULL ,"e61f0000.thermal" }, +}; +static void __init koelsch_add_standard_devices (void ) {shmobile_clk_workaround (clk_names,ARRAY_SIZE (clk_names), false); +shmobile_clk_workaround (clk_enables,ARRAY_SIZE (clk_enables), true);r8a7791_add_dt_devices ();of_platform_populate (NULL , of_default_bus_match_table,NULL ,NULL );
Signature · 1 line
1.8.4
PATCH 5/14 ARM: shmobile: koelsch-reference: Work around core clock issues
Hello.
Quoted 6 lines · Simon Horman
From: Geert Uytterhoeven <[email protected]>
Due to issues with runtime PM clock management, clocks not explicitly managed by their drivers may not be enabled at all, or be inadvertently disabled by the
clk_disable_unused()late initcall.
Quoted 8 lines
Until this is fixed, add a temporary workaround, calling
shmobile_clk_workaround()with enable == true.For now this enables the clocks for: ether, i2c2, msiof0,
qspi_mod, and thermal. More clocks can be added if needed.Signed-off-by Geert Uytterhoeven <[email protected]>Signed-off-by Simon Horman <[email protected]>
It is strange but this workaround doesn't seem to help me booting Koelsch
reference kernel with NFS root: it still crashes due to imprecise external abort once the userland starts. Only the actual drivers/sh/ fixing series by Ben/Geert helps with booting further. I therefore would like to have it merged by Simon the sooner the better...
WBR, Sergei
PATCH 5/14 ARM: shmobile: koelsch-reference: Work around core clock issues
Quoted 16 lines · Sergei Shtylyov
Hello.
Quoted 11 lines · Simon Horman
From: Geert Uytterhoeven <[email protected]>
Due to issues with runtime PM clock management, clocks not explicitly managed by their drivers may not be enabled at all, or be inadvertently disabled by the
clk_disable_unused()late initcall.Until this is fixed, add a temporary workaround, calling
shmobile_clk_workaround()with enable == true.For now this enables the clocks for: ether, i2c2, msiof0,
qspi_mod, and thermal. More clocks can be added if needed.
Quoted 8 lines
Quoted 2 lines
Signed-off-by Geert Uytterhoeven <[email protected]>Signed-off-by Simon Horman <[email protected]>It is strange but this workaround doesn't seem to help me booting Koelsch
reference kernel with NFS root: it still crashes due to imprecise external abort once the userland starts. Only the actualdrivers/sh/fixing series by Ben/Geert helps with booting further. I therefore would like to have it merged by Simon the sooner the better...
For my reference, specifically which patches are you referring to?
PATCH 5/14 ARM: shmobile: koelsch-reference: Work around core clock issues
Hello.
Quoted 12 lines · Simon Horman
Quoted 11 lines
Quoted 11 lines
From: Geert Uytterhoeven <[email protected]>
Due to issues with runtime PM clock management, clocks not explicitly managed by their drivers may not be enabled at all, or be inadvertently disabled by the
clk_disable_unused()late initcall.Until this is fixed, add a temporary workaround, calling
shmobile_clk_workaround()with enable == true.For now this enables the clocks for: ether, i2c2, msiof0,
qspi_mod, and thermal. More clocks can be added if needed.
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
Signed-off-by Geert Uytterhoeven <[email protected]>Signed-off-by Simon Horman <[email protected]>It is strange but this workaround doesn't seem to help me booting Koelsch
reference kernel with NFS root: it still crashes due to imprecise external abort once the userland starts. Only the actualdrivers/sh/
Unfortunately, I currently don't have time to find out what is wrong with
the workaround...
Quoted 4 lines
Quoted 2 lines
fixing series by Ben/Geert helps with booting further. I therefore would like to have it merged by Simon the sooner the better...
For my reference, specifically which patches are you referring to?
Here the link to the cover letter of the 17 patch series:
http://marc.info/?l=linux-sh&m=139756526122104
WBR, Sergei
PATCH 5/14 ARM: shmobile: koelsch-reference: Work around core clock issues
i Sergei,
Quoted 7 lines · Sergei Shtylyov
Quoted 4 lines
Quoted 2 lines
fixing series by Ben/Geert helps with booting further. I therefore would like to have it merged by Simon the sooner the better...
For my reference, specifically which patches are you referring to?
Here the link to the cover letter of the 17 patch series:
http://marc.info/?l=linux-sh&m=139756526122104
I'm working on a solution using a different approach. Please stay tuned.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
PATCH 6/14 ARM: shmobile: koelsch-reference: Annotate clk_enables as __initconst
In reply to Simon Horman--- arch/arm/mach-shmobile/board-koelsch-reference.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-shmobile/board-koelsch-reference.c +1 -1
@@ -110,7 +110,7 @@ static const struct clk_name clk_names[] __initconst = {/* * This is a really crude hack to work around core platform clock issues */ -static const struct clk_name clk_enables[] = { +static const struct clk_name clk_enables[]__initconst = { {"ether" ,NULL ,"ee700000.ethernet" }, {"i2c2" ,NULL ,"e6530000.i2c" }, {"msiof0" ,NULL ,"e6e20000.spi" },
Signature · 1 line
1.8.4
PATCH 7/14 ARM: shmobile: lager-reference: Work around core clock issues
In reply to Simon HormanDue to issues with runtime PM clock management, clocks not explicitly managed by their drivers may not be enabled at all, or be inadvertently disabled by the clk_disable_unused() late initcall.
Until this is fixed, add a temporary workaround, calling shmobile_clk_workaround() with enable == true.
For now this enables the clocks for: ether, msiof1, qspi_mod, and thermal. More clocks can be added if needed.
Based on work for the koelsch board by Geert Uytterhoeven.
--- arch/arm/mach-shmobile/board-lager-reference.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
arch/arm/mach-shmobile/board-lager-reference.c +11 -0
@@ -108,9 +108,20 @@ static const struct clk_name clk_names[] __initconst = { { "lvds1", "lvds.1", "rcar-du-r8a7790" }, }; +/* +* This is a really crude hack to work around core platform clock issues +*/ +static const struct clk_name clk_enables[]__initconst = { + {"ether" ,NULL ,"ee700000.ethernet" }, + {"msiof1" ,NULL ,"e6e10000.spi" }, + {"qspi_mod" ,NULL ,"e6b10000.spi" }, + {"thermal" ,NULL ,"e61f0000.thermal" }, +}; +static void __init lager_add_standard_devices (void ) {shmobile_clk_workaround (clk_names,ARRAY_SIZE (clk_names), false); +shmobile_clk_workaround (clk_enables,ARRAY_SIZE (clk_enables), true);r8a7790_add_dt_devices ();of_platform_populate (NULL , of_default_bus_match_table,NULL ,NULL );
Signature · 1 line
1.8.4
PATCH 8/14 ARM: shmobile: Add Lager clock workarounds for SDHI and MMCIF
In reply to Simon HormanFrom: Magnus Damm <[email protected]>
Add MMCIF1, SDHI0 and SDHI2 to the clock workaround list for Lager multiplatform. Without these additional lines wakeup from Suspend-to-RAM never happens.
--- arch/arm/mach-shmobile/board-lager-reference.c | 3 +++ 1 file changed, 3 insertions(+)
arch/arm/mach-shmobile/board-lager-reference.c +3 -0
@@ -114,7 +114,10 @@ static const struct clk_name clk_names[] __initconst = {static const struct clk_name clk_enables[]__initconst = { {"ether" ,NULL ,"ee700000.ethernet" }, {"msiof1" ,NULL ,"e6e10000.spi" }, + {"mmcif1" ,NULL ,"ee220000.mmc" }, {"qspi_mod" ,NULL ,"e6b10000.spi" }, + {"sdhi0" ,NULL ,"ee100000.sd" }, + {"sdhi2" ,NULL ,"ee140000.sd" }, {"thermal" ,NULL ,"e61f0000.thermal" }, };
Signature · 1 line
1.8.4
PATCH 9/14 ARM: shmobile: Add Koelsch clock workarounds for SDHI
In reply to Simon HormanFrom: Magnus Damm <[email protected]>
Add SDHI0, SDHI1 and SDHI2 to the clock workaround list for Koelsch multiplatform. Without these additional lines wakeup from Suspend-to-RAM never happens.
--- arch/arm/mach-shmobile/board-koelsch-reference.c | 3 +++ 1 file changed, 3 insertions(+)
arch/arm/mach-shmobile/board-koelsch-reference.c +3 -0
@@ -115,6 +115,9 @@ static const struct clk_name clk_enables[] __initconst = { { "i2c2", NULL, "e6530000.i2c" }, { "msiof0", NULL, "e6e20000.spi" }, { "qspi_mod", NULL, "e6b10000.spi" }, + { "sdhi0", NULL, "ee100000.sd" }, + { "sdhi1", NULL, "ee140000.sd" }, + { "sdhi2", NULL, "ee160000.sd" }, { "thermal", NULL, "e61f0000.thermal" }, };
Signature · 1 line
1.8.4
PATCH 10/14 ARM: shmobile: bockw: remove old style audio clock
In reply to Simon HormanFrom: Kuninori Morimoto <[email protected]>
Current audio clock didn't have dependency to device/driver, but, it was not good design for DT support.
To avoid branch merge conflict issue,
it is using this load map, and this patch is 3) part.
1) add new style clock in platform
2) add new style clock method in driver
3) remove old tyle clock from platform
--- arch/arm/mach-shmobile/board-bockw.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
arch/arm/mach-shmobile/board-bockw.c +6 -4
@@ -591,6 +591,7 @@ static void __init bockw_init(void) {void __iomem *base;struct clk *clk; +struct platform_device *pdev;int i;r8a7778_clock_init ();
@@ -673,9 +674,6 @@ static void __init bockw_init(void) }/* for Audio */ - clk =clk_get (NULL ,"audio_clk_b" ); -clk_set_rate (clk,24576000 ); -clk_put (clk);rsnd_codec_power (5 ,1 );/* enable ak4642 */ platform_device_register_simple(
@@ -684,11 +682,15 @@ static void __init bockw_init(void)platform_device_register_simple ("ak4554-adc-dac" ,1 ,NULL ,0 ); -platform_device_register_resndata ( + pdev =platform_device_register_resndata ( &platform_bus,"rcar_sound" ,-1 , rsnd_resources,ARRAY_SIZE (rsnd_resources), &rsnd_info,sizeof (rsnd_info)); + clk =clk_get (&pdev->dev,"clk_b" ); +clk_set_rate (clk,24576000 ); +clk_put (clk); +for (i =0 ; i <ARRAY_SIZE (rsnd_card_info); i++) {struct platform_device_info cardinfo = { .parent = &platform_bus,
Signature · 1 line
1.8.4
PATCH 11/14 ARM: shmobile: bockw: switch to use dai info for R-Car sound
In reply to Simon HormanFrom: Kuninori Morimoto <[email protected]>
Now, R-Car sound driver supports dai info settings. switch to use it
--- arch/arm/mach-shmobile/board-bockw.c | 53 ++++++++++++++++++++++++------------ 1 file changed, 35 insertions(+), 18 deletions(-)
arch/arm/mach-shmobile/board-bockw.c +35 -18
@@ -345,24 +345,39 @@ static struct rsnd_ssi_platform_info rsnd_ssi[] = {RSND_SSI_UNUSED ,/* SSI 0 */ RSND_SSI_UNUSED ,/* SSI 1 */ RSND_SSI_UNUSED ,/* SSI 2 */ -RSND_SSI_SET (1 ,HPBDMA_SLAVE_HPBIF3_TX ,gic_iid (0x85 ),RSND_SSI_PLAY ), -RSND_SSI_SET (2 ,HPBDMA_SLAVE_HPBIF4_RX ,gic_iid (0x85 ),RSND_SSI_CLK_PIN_SHARE ), -RSND_SSI_SET (0 ,HPBDMA_SLAVE_HPBIF5_TX ,gic_iid (0x86 ),RSND_SSI_PLAY ), -RSND_SSI_SET (0 ,HPBDMA_SLAVE_HPBIF6_RX ,gic_iid (0x86 ),0 ), -RSND_SSI_SET (3 ,HPBDMA_SLAVE_HPBIF7_TX ,gic_iid (0x86 ),RSND_SSI_PLAY ), - RSND_SSI_SET(4, HPBDMA_SLAVE_HPBIF8_RX, gic_iid(0x86), RSND_SSI_CLK_PIN_SHARE), +RSND_SSI (HPBDMA_SLAVE_HPBIF3_TX ,gic_iid (0x85 ),0 ), +RSND_SSI (HPBDMA_SLAVE_HPBIF4_RX ,gic_iid (0x85 ),RSND_SSI_CLK_PIN_SHARE ), +RSND_SSI (HPBDMA_SLAVE_HPBIF5_TX ,gic_iid (0x86 ),0 ), +RSND_SSI (HPBDMA_SLAVE_HPBIF6_RX ,gic_iid (0x86 ),0 ), +RSND_SSI (HPBDMA_SLAVE_HPBIF7_TX ,gic_iid (0x86 ),0 ), + RSND_SSI(HPBDMA_SLAVE_HPBIF8_RX, gic_iid(0x86), RSND_SSI_CLK_PIN_SHARE), }; -static struct rsnd_scu_platform_info rsnd_scu[9 ] = { - { .flags =0 , },/* SRU 0 */ - { .flags =0 , },/* SRU 1 */ - { .flags =0 , },/* SRU 2 */ - { .flags =RSND_SCU_USE_HPBIF , }, - { .flags =RSND_SCU_USE_HPBIF , }, - { .flags =RSND_SCU_USE_HPBIF , }, - { .flags =RSND_SCU_USE_HPBIF , }, - { .flags =RSND_SCU_USE_HPBIF , }, - { .flags =RSND_SCU_USE_HPBIF , }, +static struct rsnd_src_platform_info rsnd_src[9 ] = { +RSND_SRC_UNUSED ,/* SRU 0 */ +RSND_SRC_UNUSED ,/* SRU 1 */ +RSND_SRC_UNUSED ,/* SRU 2 */ +RSND_SRC (0 ,0 ), +RSND_SRC (0 ,0 ), +RSND_SRC (0 ,0 ), +RSND_SRC (0 ,0 ), +RSND_SRC (0 ,0 ), +RSND_SRC (0 ,0 ), +}; + +static struct rsnd_dai_platform_info rsnd_dai[] = { + { + .playback = { .ssi = &rsnd_ssi[5 ], .src = &rsnd_src[5 ] }, + .capture = { .ssi = &rsnd_ssi[6 ], .src = &rsnd_src[6 ] }, + }, { + .playback = { .ssi = &rsnd_ssi[3 ], .src = &rsnd_src[3 ] }, + }, { + .capture = { .ssi = &rsnd_ssi[4 ], .src = &rsnd_src[4 ] }, + }, { + .playback = { .ssi = &rsnd_ssi[7 ], .src = &rsnd_src[7 ] }, + }, { + .capture = { .ssi = &rsnd_ssi[8 ], .src = &rsnd_src[8 ] }, + }, }; enum {
@@ -437,8 +452,10 @@ static struct rcar_snd_info rsnd_info = { .flags = RSND_GEN1, .ssi_info = rsnd_ssi, .ssi_info_nr = ARRAY_SIZE(rsnd_ssi), - .scu_info = rsnd_scu, - .scu_info_nr = ARRAY_SIZE(rsnd_scu), + .src_info = rsnd_src, + .src_info_nr = ARRAY_SIZE(rsnd_src), + .dai_info = rsnd_dai, + .dai_info_nr = ARRAY_SIZE(rsnd_dai), .start = rsnd_start, .stop = rsnd_stop, };
Signature · 1 line
1.8.4
PATCH 12/14 ARM: shmobile: lager: switch to use dai info for R-Car sound
In reply to Simon HormanFrom: Kuninori Morimoto <[email protected]>
Now, R-Car sound driver supports dai info settings. switch to use it
--- arch/arm/mach-shmobile/board-lager.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-)
arch/arm/mach-shmobile/board-lager.c +12 -5
@@ -567,20 +567,27 @@ static struct resource rsnd_resources[] __initdata = { };static struct rsnd_ssi_platform_info rsnd_ssi[] = { -RSND_SSI_SET (0 ,0 ,gic_spi (370 ),RSND_SSI_PLAY ), -RSND_SSI_SET (0 ,0 ,gic_spi (371 ),RSND_SSI_CLK_PIN_SHARE ), +RSND_SSI (0 ,gic_spi (370 ),0 ), +RSND_SSI (0 ,gic_spi (371 ),RSND_SSI_CLK_PIN_SHARE ), }; -static struct rsnd_scu_platform_info rsnd_scu[2 ] = { +static struct rsnd_src_platform_info rsnd_src[2 ] = {/* no member at this point */ }; +static struct rsnd_dai_platform_info rsnd_dai = { + .playback = { .ssi = &rsnd_ssi[0 ], }, + .capture = { .ssi = &rsnd_ssi[1 ], }, +}; +static struct rcar_snd_info rsnd_info = { .flags =RSND_GEN2 , .ssi_info = rsnd_ssi, .ssi_info_nr =ARRAY_SIZE (rsnd_ssi), - .scu_info = rsnd_scu, - .scu_info_nr =ARRAY_SIZE (rsnd_scu), + .src_info = rsnd_src, + .src_info_nr =ARRAY_SIZE (rsnd_src), + .dai_info = &rsnd_dai, + .dai_info_nr =1 , };static struct asoc_simple_card_info rsnd_card_info = {
Signature · 1 line
1.8.4
PATCH 13/14 ARM: shmobile: koelsch legacy: Enable Quad SPI transfers for the SPI FLASH
In reply to Simon HormanFrom: Geert Uytterhoeven <[email protected]>
--- arch/arm/mach-shmobile/board-koelsch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-shmobile/board-koelsch.c +1 -1
@@ -216,7 +216,7 @@ static const struct spi_board_info spi_info[] __initconst = { { .modalias = "m25p80", .platform_data = &spi_flash_data, - .mode = SPI_MODE_0, + .mode = SPI_MODE_0 | SPI_TX_QUAD | SPI_RX_QUAD, .max_speed_hz = 30000000, .bus_num = 0, .chip_select = 0,
Signature · 1 line
1.8.4
PATCH 14/14 ARM: shmobile: lager legacy: Enable Quad SPI transfers for the SPI FLASH
In reply to Simon HormanFrom: Geert Uytterhoeven <[email protected]>
--- arch/arm/mach-shmobile/board-lager.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
arch/arm/mach-shmobile/board-lager.c +6 -6
@@ -325,12 +325,12 @@ static const struct rspi_plat_data qspi_pdata __initconst = {static const struct spi_board_info spi_info[]__initconst = { { - .modalias ="m25p80" , - .platform_data = &spi_flash_data, - .mode =SPI_MODE_0 , - .max_speed_hz =30000000 , - .bus_num =0 , - .chip_select =0 , + .modalias ="m25p80" , + .platform_data = &spi_flash_data, + .mode =SPI_MODE_0 |SPI_TX_QUAD |SPI_RX_QUAD , + .max_speed_hz =30000000 , + .bus_num =0 , + .chip_select =0 , }, };
Signature · 1 line
1.8.4
Olof Johansson
AppliedQuoted 24 lines · Simon Horman
Hi Olof, Hi Kevin, Hi Arnd,
Please consider these Renesas ARM Based SoC Boards Updates for v3.16.
This pull request is based on
3984ba10dddc5a10("ARM: shmobile: r8a7791: RenameVSP1_SYclocks toVSP1_S").That commit is part of the pull request
"Renesas ARM Based SoC Clock Updates for v3.16", tagged as renesas-clock-for-v3.16, which I have previously sent.I have not rebased this pull-request on top of renesas-clock-for-v3.16 in order to avoid churn in linux-next.
The reason for basing this pull-request on clock updates is that many of its patches depend on
shmobile_clk_workaround()which is added as part of the clock updates.The following changes since commit
58ea1d53ba93620ac50fef9d9720b2323971f243:ARM: shmobile: r8a7791: Rename
VSP1_SYclocks toVSP1_S(2014-04-14 11:30:11 +0900)
Quoted 7 lines
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.gittags/renesas-boards-for-v3.16for you to fetch changes up to
a09b2f0ba170dc89a67d6c4c4f027b37a085dad9:ARM: shmobile: lager legacy: Enable Quad SPI transfers for the SPI FLASH (2014-04-15 08:13:22 +0900)
Merged, thanks.
-Olof