Skip to content

Commit

Permalink
ARM: arch-shmobile: only run FSI init on respective boards
Browse files Browse the repository at this point in the history
If several boards are enabled in the kernel configuration,
fsi_init_pm_clock() functions from board-ap4evb.c
will run on any of them. Prevent this by calling these functions from the
.init_machine() callback instead of using device_initcall().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Kuninori Morimoto authored and Paul Mundt committed Apr 6, 2011
1 parent 2ce51f8 commit 6084c81
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions arch/arm/mach-shmobile/board-ap4evb.c
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,7 @@ static void __init hdmi_init_pm_clock(void)
clk_put(hdmi_ick);
}

static int __init fsi_init_pm_clock(void)
static void __init fsi_init_pm_clock(void)
{
struct clk *fsia_ick;
int ret;
Expand All @@ -1005,18 +1005,15 @@ static int __init fsi_init_pm_clock(void)
if (IS_ERR(fsia_ick)) {
ret = PTR_ERR(fsia_ick);
pr_err("Cannot get FSI ICK: %d\n", ret);
return ret;
return;
}

ret = clk_set_parent(fsia_ick, &sh7372_fsiack_clk);
if (ret < 0)
pr_err("Cannot set FSI-A parent: %d\n", ret);

clk_put(fsia_ick);

return ret;
}
device_initcall(fsi_init_pm_clock);

/*
* FIXME !!
Expand Down Expand Up @@ -1345,6 +1342,7 @@ static void __init ap4evb_init(void)
platform_add_devices(ap4evb_devices, ARRAY_SIZE(ap4evb_devices));

hdmi_init_pm_clock();
fsi_init_pm_clock();
}

static void __init ap4evb_timer_init(void)
Expand Down

0 comments on commit 6084c81

Please sign in to comment.