From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753089AbdL1BZS (ORCPT ); Wed, 27 Dec 2017 20:25:18 -0500 Received: from mail-qt0-f196.google.com ([209.85.216.196]:37859 "EHLO mail-qt0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753066AbdL1BZR (ORCPT ); Wed, 27 Dec 2017 20:25:17 -0500 X-Google-Smtp-Source: ACJfBosIkBp3zGswAhyvlUNGcUJ18u3GmZj4aOS21XhgyE15kblyRu80frhpD0N9pxJ23ZQoqo1mlQ== Subject: Re: [PATCH 4/4] phy: usb: phy-brcm-usb-init: DRD mode can cause crash on startup To: Al Cooper , Kishon Vijay Abraham I Cc: Al Cooper , linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com References: <1514402931-14408-1-git-send-email-alcooperx@gmail.com> <1514402931-14408-5-git-send-email-alcooperx@gmail.com> From: Florian Fainelli Message-ID: Date: Wed, 27 Dec 2017 17:25:14 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <1514402931-14408-5-git-send-email-alcooperx@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/27/2017 11:28 AM, Al Cooper wrote: > From: Al Cooper > > This is caused by a bug in the BDC core. When the BDC core comes > out of reset and it's not selected, it gets a backup clock. When > the BDC core is selected, it get's the main clock. If HOST mode > is then selected the BDC core has the main clock shut off but > the backup clock is not restored. > > The failure scenario and cause are as follows: > - DRD mode is active > - Device mode is selected first in bootloader > - When host mode is now selected, the clock to the BDC is cut off. > - BDC registers are inaccessible and therefore the BDC driver > crashes upon Linux boot. > > The fix is to have the phy driver always force a BDC reset on > startup. > > Fixes: 49859e55e364 ("phy: usb: phy-brcm-usb: Add Broadcom STB USB phy driver") > Signed-off-by: Al Cooper Acked-by: Florian Fainelli -- Florian