Skip to contentSkip to conversation

ARM: shmobile: bockw: remove old style audio clock

PATCH In review Kuninori Morimoto 1 participant 1 message Mar 25, 2014

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 4/6 ARM: shmobile: bockw: remove old style audio clock

From: 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
index b4122f8..1aca107 100644
@@ -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.7.9.5