diff mbox series

[U-Boot,04/11] sound: Allow audio codecs to be used by other SoCs

Message ID 20181227202446.229042-5-sjg@chromium.org
State Accepted
Commit afcd64579486e1745a3cb964bfe36267d90b4c3e
Delegated to: Simon Glass
Headers show
Series sound: Add sound support for Nyan | expand

Commit Message

Simon Glass Dec. 27, 2018, 8:24 p.m. UTC
At present there is still some samsung-specific code in the audio codecs.
Remove it so that these can be used by other SoCs.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 drivers/sound/Kconfig         | 8 ++++----
 drivers/sound/max98088.c      | 7 -------
 drivers/sound/max98090.c      | 7 -------
 drivers/sound/max98095.c      | 7 -------
 drivers/sound/maxim_codec.c   | 3 ---
 drivers/sound/samsung_sound.c | 4 ++++
 6 files changed, 8 insertions(+), 28 deletions(-)

Comments

Simon Glass Jan. 21, 2019, 11:42 p.m. UTC | #1
At present there is still some samsung-specific code in the audio codecs.
Remove it so that these can be used by other SoCs.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 drivers/sound/Kconfig         | 8 ++++----
 drivers/sound/max98088.c      | 7 -------
 drivers/sound/max98090.c      | 7 -------
 drivers/sound/max98095.c      | 7 -------
 drivers/sound/maxim_codec.c   | 3 ---
 drivers/sound/samsung_sound.c | 4 ++++
 6 files changed, 8 insertions(+), 28 deletions(-)

Applied to u-boot-dm, thanks!
diff mbox series

Patch

diff --git a/drivers/sound/Kconfig b/drivers/sound/Kconfig
index 6a04a59dada..506a60a7c7b 100644
--- a/drivers/sound/Kconfig
+++ b/drivers/sound/Kconfig
@@ -23,7 +23,7 @@  config I2S
 
 config I2S_SAMSUNG
 	bool "Enable I2C support for Samsung SoCs"
-	depends on SOUND
+	depends on I2S
 	help
 	  Samsung Exynos SoCs support an I2S interface for sending audio
 	  data to an audio codec. This option enables support for this,
@@ -33,7 +33,7 @@  config I2S_SAMSUNG
 
 config SOUND_MAX98088
 	bool "Support Maxim max98088 audio codec"
-	depends on I2S_SAMSUNG
+	depends on I2S
 	help
 	  Enable the max98088 audio codec. This is connected via I2S for
 	  audio data and I2C for codec control. At present it only works
@@ -41,7 +41,7 @@  config SOUND_MAX98088
 
 config SOUND_MAX98090
 	bool "Support Maxim max98090 audio codec"
-	depends on I2S_SAMSUNG
+	depends on I2S
 	help
 	  Enable the max98090 audio codec. This is connected via I2S for
 	  audio data and I2C for codec control. At present it only works
@@ -49,7 +49,7 @@  config SOUND_MAX98090
 
 config SOUND_MAX98095
 	bool "Support Maxim max98095 audio codec"
-	depends on I2S_SAMSUNG
+	depends on I2S
 	help
 	  Enable the max98095 audio codec. This is connected via I2S for
 	  audio data and I2C for codec control. At present it only works
diff --git a/drivers/sound/max98088.c b/drivers/sound/max98088.c
index 5ddc11ac5c7..46d068cca64 100644
--- a/drivers/sound/max98088.c
+++ b/drivers/sound/max98088.c
@@ -16,10 +16,6 @@ 
 #include <i2s.h>
 #include <sound.h>
 #include <asm/gpio.h>
-#include <asm/io.h>
-#include <asm/arch/clk.h>
-#include <asm/arch/cpu.h>
-#include <asm/arch/power.h>
 #include "maxim_codec.h"
 #include "max98088.h"
 
@@ -288,9 +284,6 @@  static int max98088_device_init(struct maxim_priv *priv)
 	unsigned char id;
 	int error = 0;
 
-	/* Enable codec clock */
-	set_xclkout();
-
 	/* reset the codec, the DSP core, and disable all interrupts */
 	error = max98088_reset(priv);
 	if (error != 0) {
diff --git a/drivers/sound/max98090.c b/drivers/sound/max98090.c
index 346ff5ffbec..5505c351666 100644
--- a/drivers/sound/max98090.c
+++ b/drivers/sound/max98090.c
@@ -13,10 +13,6 @@ 
 #include <i2s.h>
 #include <sound.h>
 #include <asm/gpio.h>
-#include <asm/io.h>
-#include <asm/arch/clk.h>
-#include <asm/arch/cpu.h>
-#include <asm/arch/power.h>
 #include "maxim_codec.h"
 #include "max98090.h"
 
@@ -240,9 +236,6 @@  int max98090_device_init(struct maxim_priv *priv)
 	unsigned char id;
 	int error = 0;
 
-	/* Enable codec clock */
-	set_xclkout();
-
 	/* reset the codec, the DSP core, and disable all interrupts */
 	error = max98090_reset(priv);
 	if (error != 0) {
diff --git a/drivers/sound/max98095.c b/drivers/sound/max98095.c
index 99c0e996b4f..9e08e96670e 100644
--- a/drivers/sound/max98095.c
+++ b/drivers/sound/max98095.c
@@ -15,10 +15,6 @@ 
 #include <i2c.h>
 #include <sound.h>
 #include <asm/gpio.h>
-#include <asm/io.h>
-#include <asm/arch/clk.h>
-#include <asm/arch/cpu.h>
-#include <asm/arch/power.h>
 #include "i2s.h"
 #include "max98095.h"
 
@@ -306,9 +302,6 @@  static int max98095_device_init(struct maxim_priv *priv)
 	unsigned char id;
 	int ret;
 
-	/* Enable codec clock */
-	set_xclkout();
-
 	/* reset the codec, the DSP core, and disable all interrupts */
 	ret = max98095_reset(priv);
 	if (ret != 0) {
diff --git a/drivers/sound/maxim_codec.c b/drivers/sound/maxim_codec.c
index dcaf081988b..5480dce1080 100644
--- a/drivers/sound/maxim_codec.c
+++ b/drivers/sound/maxim_codec.c
@@ -12,9 +12,6 @@ 
 #include <sound.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
-#include <asm/arch/clk.h>
-#include <asm/arch/cpu.h>
-#include <asm/arch/power.h>
 #include "maxim_codec.h"
 
 /*
diff --git a/drivers/sound/samsung_sound.c b/drivers/sound/samsung_sound.c
index 84064ebd0fe..b6952675bde 100644
--- a/drivers/sound/samsung_sound.c
+++ b/drivers/sound/samsung_sound.c
@@ -10,6 +10,7 @@ 
 #include <i2s.h>
 #include <sound.h>
 #include <asm/gpio.h>
+#include <asm/arch/power.h>
 
 static int samsung_sound_setup(struct udevice *dev)
 {
@@ -79,6 +80,9 @@  static int samsung_sound_probe(struct udevice *dev)
 	debug("Probed sound '%s' with codec '%s' and i2s '%s'\n", dev->name,
 	      uc_priv->codec->name, uc_priv->i2s->name);
 
+	/* Enable codec clock */
+	set_xclkout();
+
 	return 0;
 }