From patchwork Thu Dec 27 20:24:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1019002 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="KhlmbZI3"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 43QhLZ3pmzz9s55 for ; Fri, 28 Dec 2018 07:31:02 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 3204BC21DCA; Thu, 27 Dec 2018 20:28:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 05634C21E49; Thu, 27 Dec 2018 20:25:31 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id BE1C6C21DA6; Thu, 27 Dec 2018 20:25:12 +0000 (UTC) Received: from mail-io1-f70.google.com (mail-io1-f70.google.com [209.85.166.70]) by lists.denx.de (Postfix) with ESMTPS id 25DEDC21BE5 for ; Thu, 27 Dec 2018 20:25:12 +0000 (UTC) Received: by mail-io1-f70.google.com with SMTP id t13so17964311ioi.3 for ; Thu, 27 Dec 2018 12:25:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=ZUtYmtLZJ+7kvvkFDuawTjVtXr1XW80WcJSYx7I1zBM=; b=KhlmbZI3mx62XmyBiKHIOpBzOd+JBYyD78toOrbwRpUXpj0kd+h/3MR2x9omN9KWw/ SRQjtiEj34EpYARijzFaAgUMvADKEa4ttSqNFrnUrmeM3VFuhYQq445Kq5IJ4rqQIpK1 wMFVaxEhtd7CmLacuv1dJHZntwIJ63GvgPOPA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=ZUtYmtLZJ+7kvvkFDuawTjVtXr1XW80WcJSYx7I1zBM=; b=WbczGC0FJs0OA5kZ1HM+w8OmE3z85XubkOlgLcQ7ulQjvh35tyFtIfImzHm6mHZW9t GLsgmXc0PuxGsjUo+p0G1AB45R0TnLuJm266C+n4OVLhe4aslGbK3I3M7lpqIbFYMb6P 4Wh8zCcVw3RJJftKmPjIeNXqvtm/2Llgw5WUFWYsSpkktmUsukGKfW9Uw99Og/VxSdt0 K2mPPr24oGNnXwa8J9Zx+IIkRq9+5dme/gX11QENsKxdmPwXs5TfkyiIardVGStfkdjW kMPeqhSIa6J003RJc0v4J+0ORW60y7Ua0Y0DvXG0COUMXw4cpqoGfSv/n6orSSTb3xQ6 2bnQ== X-Gm-Message-State: AJcUukc2N2WWpQJqRmIosaoKr3yDjsgXBw4tJDHc0UCzMnWsYjrOLJKD Pax27X22g79QznQxLE0M5iJ+Tij8Qc2Uv/Gk X-Google-Smtp-Source: AFSGD/WhC2bS4YrgPwmCnLpLwN4yuCGkHSjM+3mOvt6FvGC3kpt5CdZIKtldX52U4fXZxlWPKtmVzCpeCaeN+Uck X-Received: by 2002:a24:5ac2:: with SMTP id v185mr18740872ita.28.1545942311169; Thu, 27 Dec 2018 12:25:11 -0800 (PST) Date: Thu, 27 Dec 2018 13:24:39 -0700 In-Reply-To: <20181227202446.229042-1-sjg@chromium.org> Message-Id: <20181227202446.229042-5-sjg@chromium.org> Mime-Version: 1.0 References: <20181227202446.229042-1-sjg@chromium.org> X-Mailer: git-send-email 2.20.1.415.g653613c723-goog From: Simon Glass To: U-Boot Mailing List Subject: [U-Boot] [PATCH 04/11] sound: Allow audio codecs to be used by other SoCs X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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 Signed-off-by: Simon Glass --- 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(-) 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 #include #include -#include -#include -#include -#include #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 #include #include -#include -#include -#include -#include #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 #include #include -#include -#include -#include -#include #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 #include #include -#include -#include -#include #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 #include #include +#include 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; }