Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 89aff406 authored by Magnus Damm's avatar Magnus Damm Committed by Simon Horman
Browse files

ARM: shmobile: Use shmobile_clk_workaround() on Koelsch



Convert the Koelsch DT reference code to use the newly introduced
function shmobile_clk_workaround().

Signed-off-by: default avatarMagnus Damm <damm@opensource.se>
Signed-off-by: default avatarSimon Horman <horms+renesas@verge.net.au>
parent e6597e0e
Loading
Loading
Loading
Loading
+28 −43
Original line number Diff line number Diff line
@@ -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,17 +81,11 @@ static void __init koelsch_add_du_device(void)
	platform_device_register_full(&info);
}

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.
 * 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[] = {
static const struct clk_name clk_names[] = {
	{ "cmt0", NULL, "sh_cmt.0" },
	{ "scifa0", NULL, "sh-sci.0" },
	{ "scifa1", NULL, "sh-sci.1" },
@@ -113,18 +106,10 @@ static void __init koelsch_add_standard_devices(void)
	{ "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);
		}
	}

static void __init koelsch_add_standard_devices(void)
{
	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);