From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.4 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 34A89C432C3 for ; Thu, 14 Nov 2019 10:24:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0B6B220409 for ; Thu, 14 Nov 2019 10:24:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="j34WU2ZJ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726977AbfKNKYK (ORCPT ); Thu, 14 Nov 2019 05:24:10 -0500 Received: from lelv0143.ext.ti.com ([198.47.23.248]:52238 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726473AbfKNKYJ (ORCPT ); Thu, 14 Nov 2019 05:24:09 -0500 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id xAEANurN005852; Thu, 14 Nov 2019 04:23:56 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1573727037; bh=2tStGcP9xDBxKwRIpbRobeYLj2PF1b/AtmDfTiE4sb4=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=j34WU2ZJOLmGiYCtNPaksHWKLeugq0tr5yZ3gnraSp+XSPTecplIWF65NvKXIt30H BjSyVQa6nv5dngrwfh/rqaj3Tilu9/xPg36v56pN0+CFKottI8Q8nVepdWA7qVND+F 4SyK1LyZYhdJ9PFZy0P+tLcMtynDlSiKIB8FcF7A= Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xAEANuci111617 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 14 Nov 2019 04:23:56 -0600 Received: from DFLE103.ent.ti.com (10.64.6.24) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Thu, 14 Nov 2019 04:23:55 -0600 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Thu, 14 Nov 2019 04:23:55 -0600 Received: from [192.168.2.6] (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id xAEANpg5030936; Thu, 14 Nov 2019 04:23:52 -0600 Subject: Re: [PATCH] bus: ti-sysc: Add module enable quirk for audio AESS To: Tony Lindgren , CC: "Andrew F . Davis" , Dave Gerlach , Faiz Abbas , Greg Kroah-Hartman , Keerthy , Nishanth Menon , Roger Quadros , Suman Anna , Tero Kristo , , References: <20191113173702.57107-1-tony@atomide.com> From: Peter Ujfalusi Message-ID: <4188f17f-67ce-42f8-c9c0-b7d6c74173a1@ti.com> Date: Thu, 14 Nov 2019 12:25:08 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191113173702.57107-1-tony@atomide.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13/11/2019 19.37, Tony Lindgren wrote: > We must set the autogating bit on enable for AESS (Audio Engine SubSystem) > when probed with ti-sysc interconnect target module driver. Otherwise it > won't idle properly. > > Cc: Peter Ujfalusi > Signed-off-by: Tony Lindgren > --- > drivers/bus/ti-sysc.c | 14 +++++++++++++- > include/linux/platform_data/ti-sysc.h | 1 + > 2 files changed, 14 insertions(+), 1 deletion(-) Tested-by: Peter Ujfalusi > diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c > --- a/drivers/bus/ti-sysc.c > +++ b/drivers/bus/ti-sysc.c > @@ -1248,6 +1248,8 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = { > SYSC_QUIRK_SWSUP_SIDLE), > > /* Quirks that need to be set based on detected module */ > + SYSC_QUIRK("aess", 0, 0, 0x10, -1, 0x40000000, 0xffffffff, > + SYSC_MODULE_QUIRK_AESS), > SYSC_QUIRK("hdq1w", 0, 0, 0x14, 0x18, 0x00000006, 0xffffffff, > SYSC_MODULE_QUIRK_HDQ1W), > SYSC_QUIRK("hdq1w", 0, 0, 0x14, 0x18, 0x0000000a, 0xffffffff, > @@ -1276,7 +1278,6 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = { > #ifdef DEBUG > SYSC_QUIRK("adc", 0, 0, 0x10, -1, 0x47300001, 0xffffffff, 0), > SYSC_QUIRK("atl", 0, 0, -1, -1, 0x0a070100, 0xffffffff, 0), > - SYSC_QUIRK("aess", 0, 0, 0x10, -1, 0x40000000, 0xffffffff, 0), > SYSC_QUIRK("cm", 0, 0, -1, -1, 0x40000301, 0xffffffff, 0), > SYSC_QUIRK("control", 0, 0, 0x10, -1, 0x40000900, 0xffffffff, 0), > SYSC_QUIRK("cpgmac", 0, 0x1200, 0x1208, 0x1204, 0x4edb1902, > @@ -1408,6 +1409,14 @@ static void sysc_clk_enable_quirk_hdq1w(struct sysc *ddata) > sysc_write(ddata, offset, val); > } > > +/* AESS (Audio Engine SubSystem) needs autogating set after enable */ > +static void sysc_module_enable_quirk_aess(struct sysc *ddata) > +{ > + int offset = 0x7c; /* AESS_AUTO_GATING_ENABLE */ > + > + sysc_write(ddata, offset, 1); > +} > + > /* I2C needs extra enable bit toggling for reset */ > static void sysc_clk_quirk_i2c(struct sysc *ddata, bool enable) > { > @@ -1490,6 +1499,9 @@ static void sysc_init_module_quirks(struct sysc *ddata) > return; > } > > + if (ddata->cfg.quirks & SYSC_MODULE_QUIRK_AESS) > + ddata->module_enable_quirk = sysc_module_enable_quirk_aess; > + > if (ddata->cfg.quirks & SYSC_MODULE_QUIRK_SGX) > ddata->module_enable_quirk = sysc_module_enable_quirk_sgx; > > diff --git a/include/linux/platform_data/ti-sysc.h b/include/linux/platform_data/ti-sysc.h > --- a/include/linux/platform_data/ti-sysc.h > +++ b/include/linux/platform_data/ti-sysc.h > @@ -49,6 +49,7 @@ struct sysc_regbits { > s8 emufree_shift; > }; > > +#define SYSC_MODULE_QUIRK_AESS BIT(19) > #define SYSC_MODULE_QUIRK_SGX BIT(18) > #define SYSC_MODULE_QUIRK_HDQ1W BIT(17) > #define SYSC_MODULE_QUIRK_I2C BIT(16) > - Péter Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki