From: Takashi Iwai Subject: Re: [PATCH] ALSA: hda - disable dynamic clock gating on Broxton before reset Date: Fri, 29 Jan 2016 13:59:20 +0100 Message-ID: References: <1454071149-15712-1-git-send-email-libin.yang@linux.intel.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 0709526047B for ; Fri, 29 Jan 2016 13:59:22 +0100 (CET) In-Reply-To: <1454071149-15712-1-git-send-email-libin.yang@linux.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: libin.yang@linux.intel.com Cc: libin.yang@intel.com, mengdong.lin@intel.com, alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org On Fri, 29 Jan 2016 13:39:09 +0100, libin.yang@linux.intel.com wrote: > > From: Libin Yang > > On Broxton, to make sure the reset controller works properly, > MISCBDCGE bit (bit 6) in CGCTL (0x48) of PCI configuration space > need be cleared before reset and set back to 1 after reset. > Otherwise, it may prevent the CORB/RIRB logic from being reset. > > Signed-off-by: Libin Yang Applied, thanks. Takashi > --- > sound/pci/hda/hda_intel.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c > index aeaa9a5..12c5442 100644 > --- a/sound/pci/hda/hda_intel.c > +++ b/sound/pci/hda/hda_intel.c > @@ -90,6 +90,8 @@ enum { > #define NVIDIA_HDA_ENABLE_COHBIT 0x01 > > /* Defines for Intel SCH HDA snoop control */ > +#define INTEL_HDA_CGCTL 0x48 > +#define INTEL_HDA_CGCTL_MISCBDCGE (0x1 << 6) > #define INTEL_SCH_HDA_DEVC 0x78 > #define INTEL_SCH_HDA_DEVC_NOSNOOP (0x1<<11) > > @@ -536,10 +538,21 @@ static void hda_intel_init_chip(struct azx *chip, bool full_reset) > { > struct hdac_bus *bus = azx_bus(chip); > struct pci_dev *pci = chip->pci; > + u32 val; > > if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) > snd_hdac_set_codec_wakeup(bus, true); > + if (IS_BROXTON(pci)) { > + pci_read_config_dword(pci, INTEL_HDA_CGCTL, &val); > + val = val & (~(INTEL_HDA_CGCTL_MISCBDCGE)); > + pci_write_config_dword(pci, INTEL_HDA_CGCTL, val); > + } > azx_init_chip(chip, full_reset); > + if (IS_BROXTON(pci)) { > + pci_read_config_dword(pci, INTEL_HDA_CGCTL, &val); > + val = val | INTEL_HDA_CGCTL_MISCBDCGE; > + pci_write_config_dword(pci, INTEL_HDA_CGCTL, val); > + } > if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) > snd_hdac_set_codec_wakeup(bus, false); > > -- > 1.9.1 >