Sfoglia il codice sorgente

ARM: shmobile: bockw: remove old style audio clock

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

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto 11 anni fa
parent
commit
115897dab0
1 ha cambiato i file con 6 aggiunte e 4 eliminazioni
  1. 6 4
      arch/arm/mach-shmobile/board-bockw.c

+ 6 - 4
arch/arm/mach-shmobile/board-bockw.c

@@ -591,6 +591,7 @@ static void __init bockw_init(void)
 {
 {
 	void __iomem *base;
 	void __iomem *base;
 	struct clk *clk;
 	struct clk *clk;
+	struct platform_device *pdev;
 	int i;
 	int i;
 
 
 	r8a7778_clock_init();
 	r8a7778_clock_init();
@@ -673,9 +674,6 @@ static void __init bockw_init(void)
 	}
 	}
 
 
 	/* for Audio */
 	/* for Audio */
-	clk = clk_get(NULL, "audio_clk_b");
-	clk_set_rate(clk, 24576000);
-	clk_put(clk);
 	rsnd_codec_power(5, 1); /* enable ak4642 */
 	rsnd_codec_power(5, 1); /* enable ak4642 */
 
 
 	platform_device_register_simple(
 	platform_device_register_simple(
@@ -684,11 +682,15 @@ static void __init bockw_init(void)
 	platform_device_register_simple(
 	platform_device_register_simple(
 		"ak4554-adc-dac", 1, NULL, 0);
 		"ak4554-adc-dac", 1, NULL, 0);
 
 
-	platform_device_register_resndata(
+	pdev = platform_device_register_resndata(
 		&platform_bus, "rcar_sound", -1,
 		&platform_bus, "rcar_sound", -1,
 		rsnd_resources, ARRAY_SIZE(rsnd_resources),
 		rsnd_resources, ARRAY_SIZE(rsnd_resources),
 		&rsnd_info, sizeof(rsnd_info));
 		&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++) {
 	for (i = 0; i < ARRAY_SIZE(rsnd_card_info); i++) {
 		struct platform_device_info cardinfo = {
 		struct platform_device_info cardinfo = {
 			.parent         = &platform_bus,
 			.parent         = &platform_bus,