Message ID | 1393621768-12568-5-git-send-email-wsa@the-dreams.de (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
Hi Wolfram, Thank you for the patch. On Friday 28 February 2014 22:09:28 Wolfram Sang wrote: > From: Wolfram Sang <wsa@sang-engineering.com> > > SCIF2 and MTU2 are not yet prepared for DT usage, so use the common > workaround via clkdev for now. What about adding a DT node for the serial port instead ? :-) > Signed-off-by: Wolfram Sang <wsa@sang-engineering.com> > --- > arch/arm/mach-shmobile/board-genmai-reference.c | 15 +++++++++++++-- > 1 file changed, 13 insertions(+), 2 deletions(-) > > diff --git a/arch/arm/mach-shmobile/board-genmai-reference.c > b/arch/arm/mach-shmobile/board-genmai-reference.c index 7630c10..91dcdd0 > 100644 > --- a/arch/arm/mach-shmobile/board-genmai-reference.c > +++ b/arch/arm/mach-shmobile/board-genmai-reference.c > @@ -18,18 +18,29 @@ > * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 > USA */ > > -#include <linux/clk-provider.h> > #include <linux/kernel.h> > #include <linux/of_platform.h> > +#include <mach/clock.h> > #include <mach/common.h> > #include <mach/r7s72100.h> > #include <asm/mach-types.h> > #include <asm/mach/arch.h> > > +#ifdef CONFIG_COMMON_CLK > +/* > + * 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[] = { > + { "mtu2", NULL, "sh_mtu2.0" }, > + { "scif2", NULL, "sh-sci.2" }, > +}; > +#endif > + > static void __init genmai_add_standard_devices(void) > { > #ifdef CONFIG_COMMON_CLK > - of_clk_init(NULL); > + shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), true); > #else > r7s72100_clock_init(); > #endif
On Sun, Mar 02, 2014 at 11:21:40PM +0100, Laurent Pinchart wrote: > Hi Wolfram, > > Thank you for the patch. > > On Friday 28 February 2014 22:09:28 Wolfram Sang wrote: > > From: Wolfram Sang <wsa@sang-engineering.com> > > > > SCIF2 and MTU2 are not yet prepared for DT usage, so use the common > > workaround via clkdev for now. > > What about adding a DT node for the serial port instead ? :-) Yes, done in V2 already. Yet, I'd like to keep SCIF in here because it is the least intrusive way to get the system to boot. When the SCIF nodes are added later incrementally, I remove the sh-sci.2 workaround, but the whole mechanism is still needed for MTU2 anyhow. Thanks, Wolfram
On Monday 03 March 2014 10:22:00 Wolfram Sang wrote: > On Sun, Mar 02, 2014 at 11:21:40PM +0100, Laurent Pinchart wrote: > > Hi Wolfram, > > > > Thank you for the patch. > > > > On Friday 28 February 2014 22:09:28 Wolfram Sang wrote: > > > From: Wolfram Sang <wsa@sang-engineering.com> > > > > > > SCIF2 and MTU2 are not yet prepared for DT usage, so use the common > > > workaround via clkdev for now. > > > > What about adding a DT node for the serial port instead ? :-) > > Yes, done in V2 already. Yet, I'd like to keep SCIF in here because it > is the least intrusive way to get the system to boot. When the SCIF > nodes are added later incrementally, I remove the sh-sci.2 workaround, > but the whole mechanism is still needed for MTU2 anyhow. True. I'm working on MTU2 DT support, but that will take a bit more time.
diff --git a/arch/arm/mach-shmobile/board-genmai-reference.c b/arch/arm/mach-shmobile/board-genmai-reference.c index 7630c10..91dcdd0 100644 --- a/arch/arm/mach-shmobile/board-genmai-reference.c +++ b/arch/arm/mach-shmobile/board-genmai-reference.c @@ -18,18 +18,29 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include <linux/clk-provider.h> #include <linux/kernel.h> #include <linux/of_platform.h> +#include <mach/clock.h> #include <mach/common.h> #include <mach/r7s72100.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> +#ifdef CONFIG_COMMON_CLK +/* + * 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[] = { + { "mtu2", NULL, "sh_mtu2.0" }, + { "scif2", NULL, "sh-sci.2" }, +}; +#endif + static void __init genmai_add_standard_devices(void) { #ifdef CONFIG_COMMON_CLK - of_clk_init(NULL); + shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), true); #else r7s72100_clock_init(); #endif