Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2859305pxb; Tue, 21 Sep 2021 09:10:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwAjh6jAYbXYbfBW8F6xfWNzIafiQb12hpxA9l0JdV6heCd+72l1vLHc+IZu7pYBYYrwrvw X-Received: by 2002:a17:906:5685:: with SMTP id am5mr36439626ejc.64.1632240611450; Tue, 21 Sep 2021 09:10:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632240611; cv=none; d=google.com; s=arc-20160816; b=fbsgOtlTbdLJxJsr9LRBr5s4us0E7La4lrqAR9rr5xxpW6f3Td3XPHO5XtN1U9ghHd pkZKlPMBYLybjAW6bjetw//TSOTdJlt9tAa3Oyjt7o3nWP8EU65Y9hiqGiLZN6Hlrpdy RpjHdvhsMc8TrrtSlGSm+KUdURbYO5akmp5aPY0jAD47YeELlfzGIb5U3a+5pf7+YdQ5 GNnwlGTFFhzwK1nJuy5jagI5vfXDxU/KURhn2NVBl7w1LrBTypWe6Jb1LD6iaXxmDRTu llgv25TkqLY6nfFi94G1G+7IJFlAB0QdUQbzXdDWL/JDCRycw28gTJVwt01hFvC7E4JZ nusw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=/a1W7IPmzzGl3sZu6vkWa+mjYDw4tT7DUSxlF9GjKaI=; b=yIrtmHSnPbgn56Q0wi5duF5v2QHbZKZMTvurpEdLl4vzgqz1fBklcy7RPvSmk23BzC NQFzr8nmgOQiY1I8c26I7M2r4j6CYA04c2AJVpRNx5YtToSPjjPjdoePMZqpYJQUNkDE C3ePJhw44/ouvaXDHZFWk39TnXkK5WTrl7qNtjVTSnjPAnas00SSuLldE6s2vadaeorZ hAiYMysKMHNAae3ZSqdUjhl7H86wQxr6XxuX9n8eFmdat3lC+N/iTMhSZy8txiGRXc3j nlUtDtbW4zc2Q9866GN9SbCcDmiwqKOjtagle+VbakoUlqKwHbpJ+z3y4+ku5tVTM19X q5fA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=xfVApT0n; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m23si20036263edp.258.2021.09.21.09.09.45; Tue, 21 Sep 2021 09:10:11 -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=@ti.com header.s=ti-com-17Q1 header.b=xfVApT0n; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233990AbhIUQIz (ORCPT + 99 others); Tue, 21 Sep 2021 12:08:55 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:38748 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233808AbhIUQIy (ORCPT ); Tue, 21 Sep 2021 12:08:54 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 18LG7Hrg024487; Tue, 21 Sep 2021 11:07:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1632240437; bh=/a1W7IPmzzGl3sZu6vkWa+mjYDw4tT7DUSxlF9GjKaI=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=xfVApT0n7vMiP1BLASvvZ9ZPw3/EIG/3DbpADD1bpD75UCLVSwOZA50jWOh9FaDzQ FraFSj7yEJq5y3rQVXiGjwPjjmjcSC2XfyOtWLaReHr5ntMLc+LvnkbvlMRCK/PDN5 RjeVm22VIUJ0pBvREpcEczgAvVzrFalR501J46+Q= Received: from DLEE111.ent.ti.com (dlee111.ent.ti.com [157.170.170.22]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 18LG7HRH114212 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 21 Sep 2021 11:07:17 -0500 Received: from DLEE104.ent.ti.com (157.170.170.34) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Tue, 21 Sep 2021 11:07:17 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14 via Frontend Transport; Tue, 21 Sep 2021 11:07:17 -0500 Received: from [10.250.37.219] (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 18LG7G0G047699; Tue, 21 Sep 2021 11:07:16 -0500 Subject: Re: beaglebone black boot failure Linux v5.15.rc1 To: Tony Lindgren , Matti Vaittinen CC: Grygorii Strashko , "Vaittinen, Matti" , "linux-omap@vger.kernel.org" , Paul Barker , Peter Ujfalusi , =?UTF-8?Q?Beno=c3=aet_Cousson?= , "linux-kernel@vger.kernel.org" References: <120a0ca4-28c7-5a7b-f1ab-2015c8817bda@fi.rohmeurope.com> <0679a5bb-88d1-077d-6107-d5f88ef60dbf@fi.rohmeurope.com> <8f3963ca-ff09-b876-ae9e-433add242de2@ti.com> <331ab81e-cd42-7e9b-617a-fde4c773c07a@ti.com> <615b6fec-6c62-4a97-6d0c-d2e5a5d1ccb2@fi.rohmeurope.com> <36785ccf-57b4-eaf1-cfc0-b024857f7694@gmail.com> From: Suman Anna Message-ID: Date: Tue, 21 Sep 2021 11:07:10 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Matti, Tony, On 9/21/21 2:47 AM, Tony Lindgren wrote: > * Matti Vaittinen [210920 08:23]: >> Finally, adding the udelay(100); (as Tony suggested) at the end of the >> omap_reset_deassert() did make the oops go away even when pruss_tm was >> enabled. I don't know what would be a proper fix though. I have been able to boot v5.15-rc1 just fine on my BBB without any additional changes [1]. May I ask what is your BBB board version? My board is rev.A5C. I vaguely remember from all those years ago when I first enabled PRUSS on AM335x that some earlier BBB versions had some issues around PRUSS. regards Suman [1] https://marc.info/?l=linux-omap&m=163223991005545&w=2 > > The following patch works for me on bbb with the following test script: > > #!/bin/sh > > module="4a326000.target-module" > driver="/sys/bus/platform/drivers/ti-sysc" > > while true; do > echo ${module} > ${driver}/bind > echo ${module} > ${driver}/unbind > done > > It also allows leaving out the udelay for dra7 iva reset. Care to try > this and see if it helps? > > Regards, > > Tony > > 8< ----------------- > diff --git a/drivers/soc/ti/omap_prm.c b/drivers/soc/ti/omap_prm.c > --- a/drivers/soc/ti/omap_prm.c > +++ b/drivers/soc/ti/omap_prm.c > @@ -825,26 +825,29 @@ static int omap_reset_deassert(struct reset_controller_dev *rcdev, > writel_relaxed(v, reset->prm->base + reset->prm->data->rstctrl); > spin_unlock_irqrestore(&reset->lock, flags); > > - if (!has_rstst) > - goto exit; > - > - /* wait for the status to be set */ > - ret = readl_relaxed_poll_timeout_atomic(reset->prm->base + > + if (has_rstst) { > + /* wait for the status to be set */ > + ret = readl_relaxed_poll_timeout_atomic(reset->prm->base + > reset->prm->data->rstst, > v, v & BIT(st_bit), 1, > OMAP_RESET_MAX_WAIT); > - if (ret) > - pr_err("%s: timedout waiting for %s:%lu\n", __func__, > - reset->prm->data->name, id); > - > -exit: > - if (reset->clkdm) { > - /* At least dra7 iva needs a delay before clkdm idle */ > - if (has_rstst) > - udelay(1); > - pdata->clkdm_allow_idle(reset->clkdm); > + if (ret) > + pr_err("%s: timedout waiting for %s:%lu\n", __func__, > + reset->prm->data->name, id); > + } else { > + /* wait for the reset bit to cleaar */ > + ret = readl_relaxed_poll_timeout_atomic(reset->prm->base + > + reset->prm->data->rstctrl, > + v, !(v & BIT(id)), 1, > + OMAP_RESET_MAX_WAIT); > + if (ret) > + pr_err("%s: timedout waiting for %s:%lu\n", __func__, > + reset->prm->data->name, id); > } > > + if (reset->clkdm) > + pdata->clkdm_allow_idle(reset->clkdm); > + > return ret; > } > >