Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2247974ybt; Fri, 3 Jul 2020 04:42:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7kY0uIZL2zI0L8wxwnaX4UirR6vIOwGi83BqltsqvxIsfRtgo9Nr1G0HJEu4nZUsw3zv9 X-Received: by 2002:a17:906:6441:: with SMTP id l1mr30692376ejn.169.1593776527417; Fri, 03 Jul 2020 04:42:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593776527; cv=none; d=google.com; s=arc-20160816; b=hJfu5Vj4aNpD9k/9yjC4sVR49TZtIYdR6S6iL6Mri8LP9tOflXoHz4v1ZcUA/u/owA 4NMr3lZqmaxFJ7zdBzwLUMKjM2t5HYwMVEDPPQ0liDCyLVQ68hOiwdNwqum2GLmyqryH sIYD8zVp3g8aJA7wZBmKU7alos2u/0gg7v7J7yE54ayOzLMo1XTvez9NY7IgG7KcLklm u2Pbf5IgRPB1n1phx9gTQT0ukDwkb2e3/ANpfj2r/5vqL1W6uj0sY+84zlkDj2eR0J+K 0uGeTZgOqVTPtL+1I4TYM6iPJaYNLDvpB+v8BzesQNAn4gvjCCFXP1KoParcRA3/qljw jqew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=pGISnOur8oLWYv7+8TQITcaX7jATXPB+L5kiXZAigBU=; b=Mwk3XqGVh3MOjX/cjQzwOdXC25Dd9A+wu6bE4JNXZCrF8C88w83Yx+hVzWa1qNNsuc wsTpZpoGCbX3rtE4GPZL7lRZaCSperDxvqn8jYNB81hXUWvla7k29yNecWrEZIuVymMT 1CmnAsL/SeqD0hbFtzxhaIK0enrhKbmzzuYGUFrAgYMytjcL4V2AqxFeT2CSUzjdy1me Qk4yBybnsS8JMoANAzUPsmJ00ehlXELrS2HeVnCXNj9e2rM72CiWIUqDSYCsrD+b1Jl5 zW0t3djakCtsK8+zIROu2ZqRNuBm0ocwdj8qkp8Wfql6W2gN3/3NYYkdlOOmag2/e/cU 2Rmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=WVAhV7ne; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jt18si7396909ejb.445.2020.07.03.04.41.44; Fri, 03 Jul 2020 04:42:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=WVAhV7ne; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726022AbgGCLj3 (ORCPT + 99 others); Fri, 3 Jul 2020 07:39:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726039AbgGCLj3 (ORCPT ); Fri, 3 Jul 2020 07:39:29 -0400 Received: from mail-ej1-x643.google.com (mail-ej1-x643.google.com [IPv6:2a00:1450:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC81EC08C5C1 for ; Fri, 3 Jul 2020 04:39:28 -0700 (PDT) Received: by mail-ej1-x643.google.com with SMTP id o18so29427459eje.7 for ; Fri, 03 Jul 2020 04:39:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=pGISnOur8oLWYv7+8TQITcaX7jATXPB+L5kiXZAigBU=; b=WVAhV7ne7BUhACGeZniNHuofHwv1e3uzACAq19G6TvyM8UzQQ3aPIFlOvX8hBANhqW kfujOOTPzKDBiNQevPORCLkAIvXlp2J91jU57dz8k9o80ATdgl4x2yjW9Fb2AodKgHaV HH8Ta+IX+dWCZqnBa1JW1YqffWlmOn/haYYTk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=pGISnOur8oLWYv7+8TQITcaX7jATXPB+L5kiXZAigBU=; b=qCpXhfbRQbhaqE09QjASNy6op67T9KkPLxE+MzKb0n5/iGCxhIv2K5rl2Q1Talh4uE I85JPBg4rZZFAqvp9I5suSKfUo4rRsmvLTFWxsXZDCr/7cfvE+hdQO1FOz747ic6AedE RAGDUwi3FuhSP9w4v1UirZOAC4McHVyAjmGlgWQN94E52V+GsQRnW/wOJ+On/J07kiKb fL0iLBWXNli7IWGZxFNHfZyzRvE3ZLgPiWQ16Epn8uHX4gmnXHEhy0Fw+qCABqFcQCkB Mo4RlaxSpiWIPlRPxxBhh5XkDmKqU53SvXXY7fnreHYFulpGQNHCQrOwFWygrSgyZtLN lbPQ== X-Gm-Message-State: AOAM532JYOxSe2RSryJnZE6XRc4267xe5vJ2qk0XUkRU9w1eGqbEfx7d K79rRu9D8G1YV5137osKT3MeqjI6FVy/YbSizYNg2A== X-Received: by 2002:a17:906:2b12:: with SMTP id a18mr31303665ejg.186.1593776367452; Fri, 03 Jul 2020 04:39:27 -0700 (PDT) MIME-Version: 1.0 References: <20200702090504.36670-1-jagan@amarulasolutions.com> In-Reply-To: From: Jagan Teki Date: Fri, 3 Jul 2020 17:09:15 +0530 Message-ID: Subject: Re: [PATCH] usb: host: ohci-platform: Disable ohci for rk3288 To: Robin Murphy Cc: Alan Stern , Greg Kroah-Hartman , Heiko Stuebner , Rob Herring , =?UTF-8?Q?Myl=C3=A8ne_Josserand?= , linux-usb@vger.kernel.org, linux-kernel , "open list:ARM/Rockchip SoC..." , Suniel Mahesh , William Wu , Michael Trimarchi , linux-amarula , Kever Yang Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 2, 2020 at 8:08 PM Robin Murphy wrote: > > On 2020-07-02 10:05, Jagan Teki wrote: > > rk3288 has usb host0 ohci controller but doesn't actually work > > on real hardware but it works with new revision chip rk3288w. > > > > So, disable ohci for rk3288. > > > > For rk3288w chips the compatible update code is handled by bootloader. > > > > Cc: William Wu > > Signed-off-by: Jagan Teki > > --- > > Note: > > - U-Boot patch for compatible update > > https://patchwork.ozlabs.org/project/uboot/patch/20200702084820.35942-1-jagan@amarulasolutions.com/ > > > > drivers/usb/host/ohci-platform.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/usb/host/ohci-platform.c b/drivers/usb/host/ohci-platform.c > > index 7addfc2cbadc..24655ed6a7e0 100644 > > --- a/drivers/usb/host/ohci-platform.c > > +++ b/drivers/usb/host/ohci-platform.c > > @@ -96,7 +96,7 @@ static int ohci_platform_probe(struct platform_device *dev) > > struct ohci_hcd *ohci; > > int err, irq, clk = 0; > > > > - if (usb_disabled()) > > + if (usb_disabled() || of_machine_is_compatible("rockchip,rk3288")) > > This seems unnecessary to me - if we've even started probing a driver > for a broken piece of hardware to the point that we need magic checks to > bail out again, then something is already fundamentally wrong. > > Old boards only sold with the original SoC variant have no reason to > enable the OHCI (since it never worked originally), thus will never > execute this check. > > New boards designed around the W variant to make use of the OHCI can > freely enable it either way. > > The only relative-edge-case where it might matter is older board designs > still in production which have shipped with both SoC variants. Enabling > OHCI can't be *necessary* given that it's still broken on a lot of > deployed boards, so at best it must be an opportunistic nice-to-have. > Since we're already having to rely on the bootloader to patch up the > devicetree for other low-level differences in this case, it should be > part of that responsibility for it to only enable the OHCI on the > appropriate SoC variant too. Statically enabling it in the DTS for a > board where it may well not work is just bad. You mean enable OHCI by identifying revision W with dts status "okay"? doesn't it complex for the bootloader to update all effecting changes? Jagan.