From patchwork Tue Sep 15 14:44:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364400 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=rpFp6pm+; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrQyN2WZPz9sTt for ; Wed, 16 Sep 2020 00:45:45 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DFD69822ED; Tue, 15 Sep 2020 16:45:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="rpFp6pm+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D19BA822ED; Tue, 15 Sep 2020 16:45:40 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com [IPv6:2607:f8b0:4864:20::743]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 5A635821ED for ; Tue, 15 Sep 2020 16:45:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qk1-x743.google.com with SMTP id d20so4459811qka.5 for ; Tue, 15 Sep 2020 07:45:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6I/m/o0U01hGOGE0sn3Tb4dpT6J7bYp+UpluZJavwRo=; b=rpFp6pm+vxr+FBf5SOvjZKkwigxaX6TIFtKQXtEaZmMrnkpvovdtGCSg0MPeFokxIZ 8emBQsgj5ZT7ByRe5j9Lr4muxij5PU/Ypi7eSBSOdI+LhyRUkIA9YmHBkZ/UzjzxKZUG 3IFCx+tS9s54xHOYFI8UgbqG3p/KQbiyfDuKonl54bl2eS7eU9GGUlTTNkOqDatsRsdy e7HozK/zDlvVvgE2R8oluFs8jEfGkTHhaSHtWoVZBBOmfwtmFrbEj3knkEyiTLe1aY2G ze1dZWlRpQrEZxFYl1GprowOtmbIIB2Z3V5Li4J4NJPIWO5fT97NCYgW7dqMqzk0R7F6 Qsuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6I/m/o0U01hGOGE0sn3Tb4dpT6J7bYp+UpluZJavwRo=; b=s2+ypa2xFwNXYvjO30mq4VcTUYn5FEI9JoCe+nMWZHXp6Mx+lVaf2lD5Pp/QUmmovo M51W4y+5aEpJihEPCishX8O7BahkZjLEKVetBzK/3okOI7M6++f0zcUSvFv9PheDaBcY nwalayWNOE60rRVza80p+mkaR+POXwPtf+wkoOKedG/aQWjCFf6InU8TMnrLqtoRrGHz q46FhmC5ubUWlIcMUaEYAfV53OyXiOiD2Ar6oRMNxUwzZ6JYl5qyhfohRFgUhlaL+TVU dFd+u2LQqla+RNeFgTMBZ6wEEe0Ptq5D5DjRdQF1UiVlokfHa1UZj8/CcWBT9ymtBIaV mawQ== X-Gm-Message-State: AOAM532Z927cdRlKmfu/NJYOPkICJR2/8CG31qed8OalwuY8V5zhiyRw 9i+tXgObexw7nRMLI2fNC+pQ31GWCEGpu9S3 X-Google-Smtp-Source: ABdhPJzoV7w5bjK1PIj35RlvRx59mQVImyVxomFA+C1kq1rG+Lc42GwjWYTpJL0IPoom1ffjFNWM6g== X-Received: by 2002:ae9:e00b:: with SMTP id m11mr17820363qkk.141.1600181136737; Tue, 15 Sep 2020 07:45:36 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.45.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:45:36 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Simon Glass Subject: [PATCH v2 01/46] dm: syscon: Fix calling dev_dbg with an uninitialized device Date: Tue, 15 Sep 2020 10:44:37 -0400 Message-Id: <20200915144522.509493-2-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean We can't use dev_dbg here because we haven't bound to the device yet. Use log_debug instead. Signed-off-by: Sean Anderson Reviewed-by: Patrick Delaunay --- Changes in v2: - New drivers/core/syscon-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/core/syscon-uclass.c b/drivers/core/syscon-uclass.c index b5cd763b6b..453933f59e 100644 --- a/drivers/core/syscon-uclass.c +++ b/drivers/core/syscon-uclass.c @@ -66,7 +66,7 @@ static int syscon_probe_by_ofnode(ofnode node, struct udevice **devp) /* found node with "syscon" compatible, not bounded to SYSCON UCLASS */ if (!ofnode_device_is_compatible(node, "syscon")) { - dev_dbg(dev, "invalid compatible for syscon device\n"); + log_debug("invalid compatible for syscon device\n"); return -EINVAL; } From patchwork Tue Sep 15 14:44:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364401 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=jPaFTgKA; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrQyY03KWz9sTt for ; Wed, 16 Sep 2020 00:45:56 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 82B4582329; Tue, 15 Sep 2020 16:45:45 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="jPaFTgKA"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0925A82329; Tue, 15 Sep 2020 16:45:43 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 562D8821F0 for ; Tue, 15 Sep 2020 16:45:39 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qk1-x742.google.com with SMTP id q5so4484941qkc.2 for ; Tue, 15 Sep 2020 07:45:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WCTa46ERKos8eNRheEXZw+5eLgIwp5h68JiWeW1qBFg=; b=jPaFTgKA09P0NAi1Au0827F+XQKM2TsVvu9yVkPrIR/btnDiCRpV14F4sEvtKfetR3 qNbKhZNn5qU46sAcUtlRDdyFeVLbDXQbnTGGG2MINiMlsgB0KWWnT1sL6WUuEDzpwaRW ln/gFtitMWY5qHIPbcmialAtPKrhdNpkwdIi3h2tRqrgw1UWDI6w0E/sjo92q6fDMSPr a0lx0UocSNoydn4tZcrEw2/fPZhg0uesE/USBx6xqHF4klmyZYvLCyHJjjy4DxyAULUQ 3ewb5aZH11fGYrOSAFASUFpW8j7UokI3DQno247pzHL1YRe3ndu7BtikG4iqUe5kygaV EfqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WCTa46ERKos8eNRheEXZw+5eLgIwp5h68JiWeW1qBFg=; b=Wz4ZM94OdBI1ikXISzGcfJsMPAUyzWaEdtwWI06FSS1+Y7ZjqBakc9VHob0c03Cx3Q BiD9sRVi+sUCDXGken/9T3EM+KBHWc0791XYiWFdUnhrqcAYAqbk98MfzCvb8M/2YLSW RZZu1KKO55H3LsgYSv8atP/V+b97tD1A0EXDVHbnVbVl/wylNC2begGUnOGkuNVWGJc+ lqNe9i2ZPqTavZj99/fENGoR/rNFNTWbHwwl82T8+VYOz9Fxhksziu7zMvYP/kX+RJtA 4F0R500W/ZqdwqdnimOZ2CcqkqVaPd9IfZ1uTz0GRoDjat7X+EppPhrnAn44/97ZmM1d CBmw== X-Gm-Message-State: AOAM531c9aFC6p7bqAkpHo2QqDHqaMpJRS18EJq9skQy+qpQboryMHh+ FNw73ecqPfN2LirIGS2i3hY3s/i/m9bYvSmN X-Google-Smtp-Source: ABdhPJw9cHKsLamZnI1zCXqpF6CHIsFnaKcSytRAicxYTB8r+es6QWn7vmYunijINcij9yKXdvZBHQ== X-Received: by 2002:a05:620a:1ef:: with SMTP id x15mr17382526qkn.182.1600181137942; Tue, 15 Sep 2020 07:45:37 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.45.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:45:37 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Andreas Dannenberg , "Andrew F. Davis" , Lokesh Vutla , Nishanth Menon , Simon Glass , Tom Rini Subject: [PATCH v2 02/46] firmware: ti_sci: Fix not calling dev_err with a device Date: Tue, 15 Sep 2020 10:44:38 -0400 Message-Id: <20200915144522.509493-3-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean This converts calls to dev_err to get the device from ti_sci_info where appropriate. Signed-off-by: Sean Anderson Reviewed-by: Nishanth Menon --- Changes in v2: - New drivers/firmware/ti_sci.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c index e311f55ef8..a2beb0079d 100644 --- a/drivers/firmware/ti_sci.c +++ b/drivers/firmware/ti_sci.c @@ -619,7 +619,7 @@ static int ti_sci_get_device_state(const struct ti_sci_handle *handle, ret = ti_sci_do_xfer(info, xfer); if (ret) { - dev_err(dev, "Mbox send fail %d\n", ret); + dev_err(info->dev, "Mbox send fail %d\n", ret); return ret; } @@ -1591,7 +1591,7 @@ static int ti_sci_cmd_core_reboot(const struct ti_sci_handle *handle) ret = ti_sci_do_xfer(info, xfer); if (ret) { - dev_err(dev, "Mbox send fail %d\n", ret); + dev_err(info->dev, "Mbox send fail %d\n", ret); return ret; } @@ -1639,7 +1639,7 @@ static int ti_sci_get_resource_range(const struct ti_sci_handle *handle, (u32 *)&req, sizeof(req), sizeof(*resp)); if (IS_ERR(xfer)) { ret = PTR_ERR(xfer); - dev_err(dev, "Message alloc failed(%d)\n", ret); + dev_err(info->dev, "Message alloc failed(%d)\n", ret); return ret; } @@ -1649,7 +1649,7 @@ static int ti_sci_get_resource_range(const struct ti_sci_handle *handle, ret = ti_sci_do_xfer(info, xfer); if (ret) { - dev_err(dev, "Mbox send fail %d\n", ret); + dev_err(info->dev, "Mbox send fail %d\n", ret); goto fail; } @@ -1745,7 +1745,7 @@ static int ti_sci_cmd_query_msmc(const struct ti_sci_handle *handle, ret = ti_sci_do_xfer(info, xfer); if (ret) { - dev_err(dev, "Mbox send fail %d\n", ret); + dev_err(info->dev, "Mbox send fail %d\n", ret); return ret; } @@ -2229,6 +2229,14 @@ static int ti_sci_cmd_proc_shutdown_no_wait(const struct ti_sci_handle *handle, u8 proc_id) { int ret; + struct ti_sci_info *info; + + if (IS_ERR(handle)) + return PTR_ERR(handle); + if (!handle) + return -EINVAL; + + info = handle_to_ti_sci_info(handle); /* * Send the core boot status wait message waiting for either WFE or @@ -2554,7 +2562,8 @@ static int ti_sci_cmd_rm_udmap_rx_flow_cfg( (u32 *)&req, sizeof(req), sizeof(*resp)); if (IS_ERR(xfer)) { ret = PTR_ERR(xfer); - dev_err(dev, "RX_FL_CFG: Message alloc failed(%d)\n", ret); + dev_err(info->dev, "RX_FL_CFG: Message alloc failed(%d)\n", + ret); return ret; } @@ -2583,7 +2592,7 @@ static int ti_sci_cmd_rm_udmap_rx_flow_cfg( ret = ti_sci_do_xfer(info, xfer); if (ret) { - dev_err(dev, "RX_FL_CFG: Mbox send fail %d\n", ret); + dev_err(info->dev, "RX_FL_CFG: Mbox send fail %d\n", ret); goto fail; } From patchwork Tue Sep 15 14:44:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364402 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=eBonn0E0; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrQym5v5jz9sTt for ; Wed, 16 Sep 2020 00:46:08 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CD1CA8233B; Tue, 15 Sep 2020 16:45:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="eBonn0E0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2342982304; Tue, 15 Sep 2020 16:45:43 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qv1-xf44.google.com (mail-qv1-xf44.google.com [IPv6:2607:f8b0:4864:20::f44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 5932E82304 for ; Tue, 15 Sep 2020 16:45:40 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qv1-xf44.google.com with SMTP id h1so1813574qvo.9 for ; Tue, 15 Sep 2020 07:45:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xqYOuh2+xQApc54xgVny5YRXMSuTuNmcOMfKfIUIQak=; b=eBonn0E0HJadxogPzy+ECL+cwraPmTy/4FHCBoFLytE94u7s7faQW5DqkdfOvIjlyi O3a4rPzNGVt1JrhjpAAYH73gGBYhcH2+/YMb5gpzL0zIQbfPqk0VyWcwAQOLwwslyL2h tY6y3dWbvJ9VwRa4yoj9nYIA3VV7af4GbqlvSQO7bF5fYCFHNEF+I6VTKklbU06Piq3C +fvN9totZk8mtIEQwDVi9w841KPeYl+c881kwN58wmYNwjBeuvo5H/G9loPd8/krQzx5 1Ro0+7hrckcsDsax+MTvRrjbHLt/TfoenV+TZLq88WognfBS7qF8xl/Q053Tj0Qt9b6a gC4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xqYOuh2+xQApc54xgVny5YRXMSuTuNmcOMfKfIUIQak=; b=c39BL4b3HykFTU/RYabf48MbIQ97DRgvIs+lvDuqJ/634CUYE8iIiVP2+rTfYQs7L0 SPzjAcqrzMU0HPJvQXYcY5ECk1xs9Dn4C/850joV/1WCVpwbJXK62e1ABUU6PlNXx6Pq scPLOcunTgLclEr7pXoNWyBUaES/KAMH41T7iKEdqcdPfzpQUNUfcB8gXmvFDSQEYrlH 5kakYGQdXww+19KnIro9Qyewe/JekPAdSvUTRHOZ1iGxUQHti5ub40C1VUFheoiM9otY H0Kv2KICObhQgzgsW0HHNEZmCHeLA9XnpUYtxOY4wrSsWT+/Q1DwuZZJFK9A0Q2vL/Ku ZKkg== X-Gm-Message-State: AOAM53105QeSbnYnAevxXVfM62y1c3TULBrHHFswkUrINoEzQYsSVLs2 3qCxig8BXVV+Q9lTqStoe+n2jp/llmu94vQY X-Google-Smtp-Source: ABdhPJwaSCe3JTlXX9eYGigoCiEa3xTCAqDS66GCUcn1z3oJEhfXmOG1gkbvC0Ipyg1wXJeGGTbO1g== X-Received: by 2002:ad4:53a8:: with SMTP id j8mr18420712qvv.26.1600181139170; Tue, 15 Sep 2020 07:45:39 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.45.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:45:38 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Heiko Schocher , Peng Fan , Priyanka Jain , Simon Glass , Tom Rini Subject: [PATCH v2 03/46] i2c: mxc: Fix dev_err being called on a nonexistant variable Date: Tue, 15 Sep 2020 10:44:39 -0400 Message-Id: <20200915144522.509493-4-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean The udevice we are working with is called `bus` and not `dev`. Signed-off-by: Sean Anderson Reviewed-by: Simon Glass Reviewed-by: Heiko Schocher --- Changes in v2: - New drivers/i2c/mxc_i2c.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c index e3d980a9df..7609594bd0 100644 --- a/drivers/i2c/mxc_i2c.c +++ b/drivers/i2c/mxc_i2c.c @@ -941,7 +941,8 @@ static int mxc_i2c_probe(struct udevice *bus) */ ret = fdt_stringlist_search(fdt, node, "pinctrl-names", "gpio"); if (ret < 0) { - debug("i2c bus %d at 0x%2lx, no gpio pinctrl state.\n", bus->seq, i2c_bus->base); + debug("i2c bus %d at 0x%2lx, no gpio pinctrl state.\n", + bus->seq, i2c_bus->base); } else { ret = gpio_request_by_name_nodev(offset_to_ofnode(node), "scl-gpios", 0, &i2c_bus->scl_gpio, @@ -952,7 +953,9 @@ static int mxc_i2c_probe(struct udevice *bus) if (!dm_gpio_is_valid(&i2c_bus->sda_gpio) || !dm_gpio_is_valid(&i2c_bus->scl_gpio) || ret || ret2) { - dev_err(dev, "i2c bus %d at %lu, fail to request scl/sda gpio\n", bus->seq, i2c_bus->base); + dev_err(bus, + "i2c bus %d at %lu, fail to request scl/sda gpio\n", + bus->seq, i2c_bus->base); return -EINVAL; } } From patchwork Tue Sep 15 14:44:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364404 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=Be0yhD9z; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrQz20QQzz9sTt for ; Wed, 16 Sep 2020 00:46:21 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C413682353; Tue, 15 Sep 2020 16:45:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Be0yhD9z"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 29F7282322; Tue, 15 Sep 2020 16:45:44 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qt1-x843.google.com (mail-qt1-x843.google.com [IPv6:2607:f8b0:4864:20::843]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6C65281BEB for ; Tue, 15 Sep 2020 16:45:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qt1-x843.google.com with SMTP id g3so3313629qtq.10 for ; Tue, 15 Sep 2020 07:45:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=veKPC52cBfq1jjWXETcLLC0wFN47dRAW3nqXUr3lSHM=; b=Be0yhD9zdg+U1fv8dL39X3oRqt684aq7fE//e1H1SyaGRwuiRMSFM3CBNkbR9JKhr2 PayKZ7WxO+wQGcG36tZEqp2jDddSLlM/Jsr0J/IBfY6yxIs/J1u/LWMPds4GV+5Ummw8 +9059aiKM6w32om7LXi7yhqkCo4zX0FpA2PSEqIzCvQRVMPWBGgprvBFLpPAN3uKxwYw wymtSJBMq+7CQMMoqKh3li4iG7ktqzS9ld+boVdh7eCZu0miTgNuhZp7RBnrvH38/ofV mTrud1N78ZZEhsAtS1iuwVgOwGN3/Kl4Dly5Lnds7Cf+SGLZRjXDD27jPFOmiGpZXZPt LhpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=veKPC52cBfq1jjWXETcLLC0wFN47dRAW3nqXUr3lSHM=; b=QtS146onQ0yxPGvIDTSg6RrqMHFCQOp4xs0qEM0N0/Edy5mfoVw3NWBZt1S/i/e/+S 0LyMovNCfqkXTLEaB/+kF/smSMpV7lZNoZ0wV2L1ePlFUuFfgwGbyLsBssw+YDrlapJZ ENTNVFGMAlFbmUj2ySN8qUXNStOSUzopOj1TxCMV2N5WR+ZwSpPin5HEJQWfaldvoAjK P8MfmN+RcNQu3QT1kntvDcOth6DI5+QpE1xviSgVey4zIWeFT6AZ5yLBqLNZJvbUf+qO CzlttKLNtOWzF14brDR41tMWHvKf6tOnM0X9iFRJCzLch0vgAeKMFq5zu8FT7n3PELDW 7YYA== X-Gm-Message-State: AOAM532TsfHhhfHJ9/qeHKQ26AriNDVBrO/9gQ8uiruY6BnZfPHaP4Sm ZwsFS6TYDMN315kDNNunC/6nrU+l8lfI5OPu X-Google-Smtp-Source: ABdhPJxtlH0BgeGPF9N8/+jPvmkCd85RmiOojdHtcf0QuHV5zBuHheHeu/9OrQnI89IZHHiI982H1w== X-Received: by 2002:ac8:7b2c:: with SMTP id l12mr17988686qtu.98.1600181140091; Tue, 15 Sep 2020 07:45:40 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.45.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:45:39 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Chris Packham , Igal Liberman , Ofer Heifetz , Stefan Roese Subject: [PATCH v2 04/46] mtd: nand: pxa3xx: Fix not calling dev_xxx with a device Date: Tue, 15 Sep 2020 10:44:40 -0400 Message-Id: <20200915144522.509493-5-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Use the device from any mtd already available, or from the active mtd via pxa3xx_nand_info if one is not. Signed-off-by: Sean Anderson --- Changes in v2: - New drivers/mtd/nand/raw/pxa3xx_nand.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/mtd/nand/raw/pxa3xx_nand.c b/drivers/mtd/nand/raw/pxa3xx_nand.c index a30e82166b..5fb3081c83 100644 --- a/drivers/mtd/nand/raw/pxa3xx_nand.c +++ b/drivers/mtd/nand/raw/pxa3xx_nand.c @@ -512,7 +512,7 @@ static int pxa3xx_nand_init_timings(struct pxa3xx_nand_host *host) } if (i == ntypes) { - dev_err(&info->pdev->dev, "Error: timings not found\n"); + dev_err(mtd->dev, "Error: timings not found\n"); return -EINVAL; } @@ -603,7 +603,7 @@ static void drain_fifo(struct pxa3xx_nand_info *info, void *data, int len) ts = get_timer(0); while (!(nand_readl(info, NDSR) & NDSR_RDDREQ)) { if (get_timer(ts) > TIMEOUT_DRAIN_FIFO) { - dev_err(&info->pdev->dev, + dev_err(info->controller.active->mtd.dev, "Timeout on RDDREQ while draining the FIFO\n"); return; } @@ -656,8 +656,8 @@ static void handle_data_pio(struct pxa3xx_nand_info *info) DIV_ROUND_UP(info->step_spare_size, 4)); break; default: - dev_err(&info->pdev->dev, "%s: invalid state %d\n", __func__, - info->state); + dev_err(info->controller.active->mtd.dev, + "%s: invalid state %d\n", __func__, info->state); BUG(); } @@ -1027,7 +1027,7 @@ static int prepare_set_command(struct pxa3xx_nand_info *info, int command, default: exec_cmd = 0; - dev_err(&info->pdev->dev, "non-supported command %x\n", + dev_err(mtd->dev, "non-supported command %x\n", command); break; } @@ -1087,7 +1087,7 @@ static void nand_cmdfunc(struct mtd_info *mtd, unsigned command, break; if (get_timer(ts) > CHIP_DELAY_TIMEOUT) { - dev_err(&info->pdev->dev, "Wait timeout!!!\n"); + dev_err(mtd->dev, "Wait timeout!!!\n"); return; } } @@ -1180,7 +1180,7 @@ static void nand_cmdfunc_extended(struct mtd_info *mtd, break; if (get_timer(ts) > CHIP_DELAY_TIMEOUT) { - dev_err(&info->pdev->dev, "Wait timeout!!!\n"); + dev_err(mtd->dev, "Wait timeout!!!\n"); return; } } @@ -1426,7 +1426,7 @@ static int pxa3xx_nand_waitfunc(struct mtd_info *mtd, struct nand_chip *this) break; if (get_timer(ts) > CHIP_DELAY_TIMEOUT) { - dev_err(&info->pdev->dev, "Ready timeout!!!\n"); + dev_err(mtd->dev, "Ready timeout!!!\n"); return NAND_STATUS_FAIL; } } @@ -1633,7 +1633,7 @@ static int pxa_ecc_init(struct pxa3xx_nand_info *info, ecc->strength = 16; } else { - dev_err(&info->pdev->dev, + dev_err(info->controller.active->mtd.dev, "ECC strength %d at page size %d is not supported\n", strength, page_size); return -ENODEV; @@ -1659,8 +1659,7 @@ static int pxa3xx_nand_scan(struct mtd_info *mtd) return ret; ret = pxa3xx_nand_sensing(host); if (ret) { - dev_info(&info->pdev->dev, - "There is no chip on cs %d!\n", + dev_info(mtd->dev, "There is no chip on cs %d!\n", info->cs); return ret; } @@ -1676,7 +1675,7 @@ static int pxa3xx_nand_scan(struct mtd_info *mtd) if (!pdata->keep_config) { ret = pxa3xx_nand_init_timings(host); if (ret) { - dev_err(&info->pdev->dev, + dev_err(mtd->dev, "Failed to set timings: %d\n", ret); return ret; } @@ -1720,7 +1719,7 @@ static int pxa3xx_nand_scan(struct mtd_info *mtd) if (info->variant == PXA3XX_NAND_VARIANT_ARMADA370) { chip->cmdfunc = nand_cmdfunc_extended; } else { - dev_err(&info->pdev->dev, + dev_err(mtd->dev, "unsupported page size on this variant\n"); return -ENODEV; } @@ -1873,6 +1872,7 @@ static int pxa3xx_nand_probe_dt(struct pxa3xx_nand_info *info) static int pxa3xx_nand_probe(struct pxa3xx_nand_info *info) { + struct mtd_info *mtd = &info->controller.active->mtd; struct pxa3xx_nand_platform_data *pdata; int ret, cs, probe_success; @@ -1884,7 +1884,7 @@ static int pxa3xx_nand_probe(struct pxa3xx_nand_info *info) ret = alloc_nand_resource(info); if (ret) { - dev_err(&pdev->dev, "alloc nand resource failed\n"); + dev_err(mtd->dev, "alloc nand resource failed\n"); return ret; } @@ -1901,7 +1901,7 @@ static int pxa3xx_nand_probe(struct pxa3xx_nand_info *info) info->cs = cs; ret = pxa3xx_nand_scan(mtd); if (ret) { - dev_info(&pdev->dev, "failed to scan nand at cs %d\n", + dev_info(mtd->dev, "failed to scan nand at cs %d\n", cs); continue; } From patchwork Tue Sep 15 14:44:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364405 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=iXt2Dm7H; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrQzH1SkVz9sVK for ; Wed, 16 Sep 2020 00:46:34 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AEFD382337; Tue, 15 Sep 2020 16:45:52 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="iXt2Dm7H"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E6C2182339; Tue, 15 Sep 2020 16:45:45 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 14F3082320 for ; Tue, 15 Sep 2020 16:45:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qk1-x741.google.com with SMTP id w12so4454520qki.6 for ; Tue, 15 Sep 2020 07:45:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JvfIAS1AnwfQTmmF3yvRqEendB5vv7WGtmQLxnuYSxA=; b=iXt2Dm7HM55Fc8CRC767Fb1UwXqlLzUyvCbprmKKcsHnd7OaTMd5hFrnloGbDh1+DQ REWk3UQWKt2T5LwIc7S4F/8wTS/+td3JzK7eIrk7vt+UVLBH9vWXBmYSiRAwrOMYTiMy SwaqVPGmOuADgoaNKaNw0Pg8zz5i421yzAh3JJOs2lgAkpsNC3Y91/xxkg0kp56cwAJv GX7rua2plOQwonmoiLgYjaWo3CZYmkH1ujFc/GvIzukHEz1mlG1BB2I2ZVTJMu5BQxHj NqwF7FfWJDci/ita+wh+xM5IhOhoQmT/Zmjl+3Dq6RcSKjs6AzCm/48WKSChbYRWJxn3 N0lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JvfIAS1AnwfQTmmF3yvRqEendB5vv7WGtmQLxnuYSxA=; b=o6gGmhEfQjZfid+4bYLrftLZqT0DWTpXOk4qIvrVL+SvPOrHWkpAfMuYHlGgW/pK8/ vjaapamId62fUX03tCRLWFpOpjQUIcoFkFKp1fVJVNl6J0sYbVoqX9GTJ6PftKYplVwJ 54fo3XMUd096ErZutJFcPeEC3TjBGMQdYF/AqzQYEraeXjLMrro1TBFwRs1E4vNv2rE7 2ovDxLs9cXkD8tmCvKOxz8T7VRIbVsuhTE4+1gHj37yUWK2V/SYEmsT9skfTRub8ONKH EOh/8bsorL2cCc+ECTTL2glAje2l8XgM4DPvj8TGqaIWUFlwBZvhsRw2M2Z0GG8oX216 xQBA== X-Gm-Message-State: AOAM530IWyW7IS5cusch94KL9Waqye34WAfFI4OgMCEx1sKS/MWXNUAy QROPiBGM7fjsTRd23uu8WTkoA+FyXu1PZGrD X-Google-Smtp-Source: ABdhPJwzcqGdvz2X9g0+8QKXCh2sOAr7sw85VNt5/BRQcPKrGEGC8jngFPGA2Qpq4uCmTUm1ZVja6Q== X-Received: by 2002:a05:620a:a52:: with SMTP id j18mr16808491qka.445.1600181141739; Tue, 15 Sep 2020 07:45:41 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.45.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:45:40 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Boris Brezillon , Miquel Raynal Subject: [PATCH v2 05/46] mtd: nand: sunxi: Fix not calling dev_err with a device Date: Tue, 15 Sep 2020 10:44:41 -0400 Message-Id: <20200915144522.509493-6-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Usually the device is gotten from sunxi_nfc. This is a struct device and not a struct udevice, but the whole driver seems to be written wihout DM anyway... In a few instances, this patch modifies functions to take an nfc to log with. In once instance we use mtd_info's device since there is no nfc. Signed-off-by: Sean Anderson --- Changes in v2: - New drivers/mtd/nand/raw/sunxi_nand.c | 45 ++++++++++++++++--------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/drivers/mtd/nand/raw/sunxi_nand.c b/drivers/mtd/nand/raw/sunxi_nand.c index 004b6f17a5..12fc065b32 100644 --- a/drivers/mtd/nand/raw/sunxi_nand.c +++ b/drivers/mtd/nand/raw/sunxi_nand.c @@ -1226,7 +1226,8 @@ static int _sunxi_nand_lookup_timing(const s32 *lut, int lut_size, u32 duration, #define sunxi_nand_lookup_timing(l, p, c) \ _sunxi_nand_lookup_timing(l, ARRAY_SIZE(l), p, c) -static int sunxi_nand_chip_set_timings(struct sunxi_nand_chip *chip, +static int sunxi_nand_chip_set_timings(struct sunxi_nfc *nfc, + struct sunxi_nand_chip *chip, const struct nand_sdr_timings *timings) { u32 min_clk_period = 0; @@ -1349,7 +1350,8 @@ static int sunxi_nand_chip_set_timings(struct sunxi_nand_chip *chip, return 0; } -static int sunxi_nand_chip_init_timings(struct sunxi_nand_chip *chip) +static int sunxi_nand_chip_init_timings(struct sunxi_nfc *nfc, + struct sunxi_nand_chip *chip) { struct mtd_info *mtd = nand_to_mtd(&chip->nand); const struct nand_sdr_timings *timings; @@ -1384,7 +1386,7 @@ static int sunxi_nand_chip_init_timings(struct sunxi_nand_chip *chip) if (IS_ERR(timings)) return PTR_ERR(timings); - return sunxi_nand_chip_set_timings(chip, timings); + return sunxi_nand_chip_set_timings(nfc, chip, timings); } static int sunxi_nand_hw_common_ecc_ctrl_init(struct mtd_info *mtd, @@ -1423,7 +1425,7 @@ static int sunxi_nand_hw_common_ecc_ctrl_init(struct mtd_info *mtd, } if (i >= ARRAY_SIZE(strengths)) { - dev_err(nfc->dev, "unsupported strength\n"); + dev_err(mtd->dev, "unsupported strength\n"); ret = -ENOTSUPP; goto err; } @@ -1619,7 +1621,7 @@ static int sunxi_nand_chip_init(int node, struct sunxi_nfc *nfc, int devnum) nsels /= sizeof(u32); if (!nsels || nsels > 8) { - dev_err(dev, "invalid reg property size\n"); + dev_err(nfc->dev, "invalid reg property size\n"); return -EINVAL; } @@ -1627,7 +1629,7 @@ static int sunxi_nand_chip_init(int node, struct sunxi_nfc *nfc, int devnum) (nsels * sizeof(struct sunxi_nand_chip_sel)), GFP_KERNEL); if (!chip) { - dev_err(dev, "could not allocate chip\n"); + dev_err(nfc->dev, "could not allocate chip\n"); return -ENOMEM; } @@ -1641,14 +1643,14 @@ static int sunxi_nand_chip_init(int node, struct sunxi_nfc *nfc, int devnum) ret = fdtdec_get_int_array(gd->fdt_blob, node, "reg", cs, nsels); if (ret) { - dev_err(dev, "could not retrieve reg property: %d\n", ret); + dev_err(nfc->dev, "could not retrieve reg property: %d\n", ret); return ret; } ret = fdtdec_get_int_array(gd->fdt_blob, node, "allwinner,rb", rb, nsels); if (ret) { - dev_err(dev, "could not retrieve reg property: %d\n", ret); + dev_err(nfc->dev, "could not retrieve reg property: %d\n", ret); return ret; } @@ -1656,14 +1658,13 @@ static int sunxi_nand_chip_init(int node, struct sunxi_nfc *nfc, int devnum) int tmp = cs[i]; if (tmp > NFC_MAX_CS) { - dev_err(dev, - "invalid reg value: %u (max CS = 7)\n", - tmp); + dev_err(nfc->dev, + "invalid reg value: %u (max CS = 7)\n", tmp); return -EINVAL; } if (test_and_set_bit(tmp, &nfc->assigned_cs)) { - dev_err(dev, "CS %d already assigned\n", tmp); + dev_err(nfc->dev, "CS %d already assigned\n", tmp); return -EINVAL; } @@ -1688,15 +1689,15 @@ static int sunxi_nand_chip_init(int node, struct sunxi_nfc *nfc, int devnum) timings = onfi_async_timing_mode_to_sdr_timings(0); if (IS_ERR(timings)) { ret = PTR_ERR(timings); - dev_err(dev, + dev_err(nfc->dev, "could not retrieve timings for ONFI mode 0: %d\n", ret); return ret; } - ret = sunxi_nand_chip_set_timings(chip, timings); + ret = sunxi_nand_chip_set_timings(nfc, chip, timings); if (ret) { - dev_err(dev, "could not configure chip timings: %d\n", ret); + dev_err(nfc->dev, "could not configure chip timings: %d\n", ret); return ret; } @@ -1729,27 +1730,27 @@ static int sunxi_nand_chip_init(int node, struct sunxi_nfc *nfc, int devnum) nand->options |= NAND_SUBPAGE_READ; - ret = sunxi_nand_chip_init_timings(chip); + ret = sunxi_nand_chip_init_timings(nfc, chip); if (ret) { - dev_err(dev, "could not configure chip timings: %d\n", ret); + dev_err(nfc->dev, "could not configure chip timings: %d\n", ret); return ret; } ret = sunxi_nand_ecc_init(mtd, &nand->ecc); if (ret) { - dev_err(dev, "ECC init failed: %d\n", ret); + dev_err(nfc->dev, "ECC init failed: %d\n", ret); return ret; } ret = nand_scan_tail(mtd); if (ret) { - dev_err(dev, "nand_scan_tail failed: %d\n", ret); + dev_err(nfc->dev, "nand_scan_tail failed: %d\n", ret); return ret; } ret = nand_register(devnum, mtd); if (ret) { - dev_err(dev, "failed to register mtd device: %d\n", ret); + dev_err(nfc->dev, "failed to register mtd device: %d\n", ret); return ret; } @@ -1769,7 +1770,7 @@ static int sunxi_nand_chips_init(int node, struct sunxi_nfc *nfc) i++; if (i > 8) { - dev_err(dev, "too many NAND chips: %d (max = 8)\n", i); + dev_err(nfc->dev, "too many NAND chips: %d (max = 8)\n", i); return -EINVAL; } @@ -1841,7 +1842,7 @@ void sunxi_nand_init(void) ret = sunxi_nand_chips_init(node, nfc); if (ret) { - dev_err(dev, "failed to init nand chips\n"); + dev_err(nfc->dev, "failed to init nand chips\n"); goto err; } From patchwork Tue Sep 15 14:44:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364408 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=Bx97+CUk; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrQzc0p5wz9sVZ for ; Wed, 16 Sep 2020 00:46:51 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 071038234C; Tue, 15 Sep 2020 16:45:54 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Bx97+CUk"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5ED6F8233E; Tue, 15 Sep 2020 16:45:46 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com [IPv6:2607:f8b0:4864:20::743]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E024882304 for ; Tue, 15 Sep 2020 16:45:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qk1-x743.google.com with SMTP id g72so4445740qke.8 for ; Tue, 15 Sep 2020 07:45:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LcI8dQR7+cGwiss+NDcLlohryxPRsEXjZorZ2ce6jAM=; b=Bx97+CUklDKrgPgrwJafsl6191JNFQaK2+6JX6WFR3C8UILGJgfMu/i81ntk9AlQVB Lepw4Z9dfIatOAvc+PSd0kbhUBi4ntYjGK5JRcnSTCbYdfczd76OLUNQtGSFb2Jj/KX4 wyde7B9u0eLNBhlpTiLdBvwZas0szzBC2bG3SaJFJl/n4K0IgUC54zlWyQdg4FlBftfu uDpckY8gxYLWixodg+dYEbnTy43VLbecGP+a/FUtqNwT7bdCtrTvPSDEk0jnJmiCQD8I Zv3xx/7hc7TynsTv69olKVTgHp+VN7kh6ZhGunQEsTO+WYQC4fHaQvEgJmJWFBgHLz0m 0fSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LcI8dQR7+cGwiss+NDcLlohryxPRsEXjZorZ2ce6jAM=; b=SztxLtqqoJ7jw2FcYV3AD5IAI1s2HNxZbMyK2OA5aEwzRaOfNxYPJjBs2VKVYceTbX LtINe97i1cw0LFSC4MdQPkWHoOWrP0xwKaHCDS+mfdQXnpv0gMVTKQDHO//eRYeAEJsQ OwK9NxRjh96d+kdqY9xMKjMwU12Abu6UCAP2nelMGHq4TYBSQIaGyhwT1aKBPoKkAHwr 1Na6aLQSl/fia5mpThDVMuElXQR9suov2eZkV93+wc/CS1yZVRkMgyBJN3MudJKeRJDN CFUkA/NC3HHHgBuz1lCTUYtF5EwbE3Af4H4caBzhGcB7lfoG94sPR3EYLKtZzxrDhGZU owng== X-Gm-Message-State: AOAM533lgYKjsnUaKTxAkYVWND7kjGZdj8hHAwIBM2JZcyQNeKNBgLQf Y6zpOYCqXZ5eSPy5WrpdtGDZ4p7XVLCx1mZP X-Google-Smtp-Source: ABdhPJwz/a1MKgcPr15IL3RRDsjrwZofdrSsUYwR9nMw7RDdU26giUHuJj+SapmIuoQwaZVXKFk3Ng== X-Received: by 2002:a37:a992:: with SMTP id s140mr17237663qke.485.1600181142747; Tue, 15 Sep 2020 07:45:42 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.45.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:45:42 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Horatiu Vultur , Jagan Teki , Simon Goldschmidt , Stefan Roese , Vignesh Raghavendra Subject: [PATCH v2 06/46] mtd: spi: Include dm.h in spi-nor-core.c Date: Tue, 15 Sep 2020 10:44:42 -0400 Message-Id: <20200915144522.509493-7-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean This header is needed so struct udevice can be used in dev_xxx(). Signed-off-by: Sean Anderson --- Changes in v2: - New drivers/mtd/spi/spi-nor-core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c index 0113e70037..e16b0e1462 100644 --- a/drivers/mtd/spi/spi-nor-core.c +++ b/drivers/mtd/spi/spi-nor-core.c @@ -11,6 +11,7 @@ #include #include +#include #include #include #include From patchwork Tue Sep 15 14:44:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364409 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=PnRwZj0I; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrQzx2Dmyz9sTt for ; Wed, 16 Sep 2020 00:47:09 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 04D0D82362; Tue, 15 Sep 2020 16:45:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="PnRwZj0I"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 987F18234E; Tue, 15 Sep 2020 16:45:47 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com [IPv6:2607:f8b0:4864:20::743]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 215AD81BEB for ; Tue, 15 Sep 2020 16:45:45 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qk1-x743.google.com with SMTP id g72so4445814qke.8 for ; Tue, 15 Sep 2020 07:45:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ql+1GrPkBek4ucDgxwwfgBq+mfM5Fq57dkyQxnb14Vw=; b=PnRwZj0IQTeKI/9gLZdiYgk05L9V6k/EZbkd+fIuxWZ27gE7uLzd5+45OsUlBWhXQk NWZPLCtJIiFYCfRxgL3epHeH9QCXpWKHRsgWbsMBiTh1Zf3d0pitTVkRNfy4gXx47C2I ArALySiCYXHRwr0r6Q9i6T7ZivWIBaedYWaK8kmXjD0ajwfEXYv3w9UZsvJ4UsV352Z7 vEBvtA5iZuLfn2icTnQDpp0HQN716i6fWuoKjXz/Q8Mz7Y5ywFRxS3fiMsgzgbG8PAUA Npf0or+sUBDKuXwvsDyE7YTPoekb0ycYC/ldXI6wL171JBbCNL1SEGpLVdKYBBnjTUxP 30Sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ql+1GrPkBek4ucDgxwwfgBq+mfM5Fq57dkyQxnb14Vw=; b=ojSznc1Sw+QJ2q1xwkLCVU/+mQ2AfYVhX2Ie+a6vtDLGFeB35d3LiVujVfN6hWrhwM igqLtKIQD/BhPdqlngc1tYMQp5KmhVXQ+KFmTP7AfzlQ58cwcJKPyi26LLz68aWVllXw Iz2ffvyCJTH9DTy1auG1RmLCnldr2DAOZGsCMZwDJ9+ea7EDcfFb30joCCgu/CB3zoz1 if9lCarFFFixlarZl2iuMInbYHM3DGGkKBueoetglwDNV6lTcjsP4Jh7mycs6J+aAhoM GXymtldeAD5maXl7dkjl6oOd35qtAvByk1FeCr1IW+z1Htf936yhGRz2EDyAeZ1QIFQp ZzkQ== X-Gm-Message-State: AOAM530L6wqHo7PGFx2qq7YPTDr9U6p9uCCBD6byhWHzn7NVHePkkKJs OGDwaqf3bl1XCgD5Z7GJRcGG1cGxiSG72+H4 X-Google-Smtp-Source: ABdhPJxCA/tUY7IgpDHb8MEVfG9K0Lk83VEF8jZmFBnXnKLBxJbywL6Gmpymx8Tb/j1hzzA1vjOg5Q== X-Received: by 2002:a37:a87:: with SMTP id 129mr16319183qkk.13.1600181143826; Tue, 15 Sep 2020 07:45:43 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.45.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:45:43 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Jagan Teki , Vignesh Raghavendra Subject: [PATCH v2 07/46] mtd: spi: Fix logging in spi-nor-tiny Date: Tue, 15 Sep 2020 10:44:43 -0400 Message-Id: <20200915144522.509493-8-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean This fixes dev_xxx() not always being called with a device. In spi_nor_reg_read, a the slave device may not always be available, so we use bus and cs instead. Signed-off-by: Sean Anderson --- Changes in v2: - New drivers/mtd/spi/spi-nor-tiny.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/drivers/mtd/spi/spi-nor-tiny.c b/drivers/mtd/spi/spi-nor-tiny.c index fa26ea33c8..07c8c7b82b 100644 --- a/drivers/mtd/spi/spi-nor-tiny.c +++ b/drivers/mtd/spi/spi-nor-tiny.c @@ -55,9 +55,19 @@ static int spi_nor_read_reg(struct spi_nor *nor, u8 code, u8 *val, int len) int ret; ret = spi_nor_read_write_reg(nor, &op, val); - if (ret < 0) - dev_dbg(&flash->spimem->spi->dev, "error %d reading %x\n", ret, + if (ret < 0) { + /* + * spi_slave does not have a struct udevice member without DM, + * so use the bus and cs instead. + */ +#if CONFIG_IS_ENABLED(DM_SPI) + dev_dbg(nor->spi->dev, "error %d reading %x\n", ret, code); +#else + log_debug("spi%u.%u: error %d reading %x\n", + nor->spi->bus, nor->spi->cs, ret, code); +#endif + } return ret; } @@ -512,7 +522,8 @@ static int spansion_read_cr_quad_enable(struct spi_nor *nor) /* Check current Quad Enable bit value. */ ret = read_cr(nor); if (ret < 0) { - dev_dbg(dev, "error while reading configuration register\n"); + dev_dbg(nor->dev, + "error while reading configuration register\n"); return -EINVAL; } @@ -524,7 +535,7 @@ static int spansion_read_cr_quad_enable(struct spi_nor *nor) /* Keep the current value of the Status Register. */ ret = read_sr(nor); if (ret < 0) { - dev_dbg(dev, "error while reading status register\n"); + dev_dbg(nor->dev, "error while reading status register\n"); return -EINVAL; } sr_cr[0] = ret; @@ -785,7 +796,7 @@ int spi_nor_scan(struct spi_nor *nor) } if (nor->addr_width > SPI_NOR_MAX_ADDR_WIDTH) { - dev_dbg(dev, "address width is too large: %u\n", + dev_dbg(nor->dev, "address width is too large: %u\n", nor->addr_width); return -EINVAL; } From patchwork Tue Sep 15 14:44:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364411 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=W/NxStP/; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrR0K62mrz9sVK for ; Wed, 16 Sep 2020 00:47:29 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0FF5382365; Tue, 15 Sep 2020 16:45:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="W/NxStP/"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D4CCB82322; Tue, 15 Sep 2020 16:45:48 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qv1-xf42.google.com (mail-qv1-xf42.google.com [IPv6:2607:f8b0:4864:20::f42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 36AAF82339 for ; Tue, 15 Sep 2020 16:45:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qv1-xf42.google.com with SMTP id di5so1791333qvb.13 for ; Tue, 15 Sep 2020 07:45:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1NtfYhrsM2NZC4ctS+AKqQSe/a0gMD5cVDBBcG1fTVg=; b=W/NxStP/aTXl+T7/sTJ2Guxz5syEFSnTdTJmRR7/QpTalslPKx9egWyivOmy5xQcoX zU/uRYQohO2rdZ6nBA+XYDxDdYB+WKgpQkRbgJcja/z+PRHVsdbEmNyD2PxEJ6Laloo9 36VAyrM+I4Tn3PIw2u8uYPuKvaRyjKuVUyXLtqN1m+s6gLAuYI6WzAoJT/6XCMgLWO64 vgk5FR5DurkG3KLanMdYfbKdznLvl4PnFEzEENACmb+tYlls4zB4o4Ct4Vih/03mrwO+ 792t07W2wzKSCdh78qtQYAdN3UyJ+IeyJhCEQgbimyEW1Z/qYOXgJUA3zr5eiELvXEqt wPmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1NtfYhrsM2NZC4ctS+AKqQSe/a0gMD5cVDBBcG1fTVg=; b=IhXvJE2ZhMANGji7+AGwRwXfJToabueQ1q8vIQ4fkiViyH9BJ9jhdFolp4+olmFTal 5NLKy+kOE7XZ7EkdL5BXfYfVZJTeKBRglYCM5P53x9daw92Q1B/2BJ9iP+Nw+nlXO+Sr vPc/dhILz789e7ww/rSoQx9RrlEFGGYRBqYyybKYK+oEMwXyohsbz331LjqXeU25Utmj C2g0S388LQkezQat1RJqhM0sJskPj1kg1VlectiUmBFc13/CiQXy4FuIqUCA6qYxLkYH bO1y1AnQ/zmZL0RmG07ZuGhCdaCenuvgH/DI5u9qt6JeP6PCG8o6XIJxu8Ey4mz3Aql9 dIUw== X-Gm-Message-State: AOAM533fnK1g3AWg4NMLi7a5khm9pvNqStfFR/xRK+c+5xjTb47d3zav y1TFc9QXy+p7hwdHghyhgza3KOzVJczM4Vm4 X-Google-Smtp-Source: ABdhPJzHUDlkKnfCLc9FhsPCiqO7URsfN/OOLEjuKV6GJp4eF94K/bfpERlc8XoDw17ts6Z6yhtJ9A== X-Received: by 2002:ad4:47cc:: with SMTP id p12mr18794100qvw.26.1600181144995; Tue, 15 Sep 2020 07:45:44 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.45.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:45:44 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Boris Brezillon , Jagan Teki , Miquel Raynal , Simon Glass Subject: [PATCH v2 08/46] mtd: spi-nand: Fix not calling dev_err with a device Date: Tue, 15 Sep 2020 10:44:44 -0400 Message-Id: <20200915144522.509493-9-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Get it from spinand->slave->dev. Another option would be to use spinand_to_mtd(spinand)->dev, but this is what the existing code uses. Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- Changes in v2: - New drivers/mtd/nand/spi/core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c index 93371fdde0..8c7e07d463 100644 --- a/drivers/mtd/nand/spi/core.c +++ b/drivers/mtd/nand/spi/core.c @@ -984,13 +984,13 @@ static int spinand_detect(struct spinand_device *spinand) ret = spinand_manufacturer_detect(spinand); if (ret) { - dev_err(dev, "unknown raw ID %*phN\n", SPINAND_MAX_ID_LEN, - spinand->id.data); + dev_err(spinand->slave->dev, "unknown raw ID %*phN\n", + SPINAND_MAX_ID_LEN, spinand->id.data); return ret; } if (nand->memorg.ntargets > 1 && !spinand->select_target) { - dev_err(dev, + dev_err(spinand->slave->dev, "SPI NANDs with more than one die must implement ->select_target()\n"); return -EINVAL; } @@ -1076,7 +1076,7 @@ static int spinand_init(struct spinand_device *spinand) ret = spinand_manufacturer_init(spinand); if (ret) { - dev_err(dev, + dev_err(spinand->slave->dev, "Failed to initialize the SPI NAND chip (err = %d)\n", ret); goto err_free_bufs; From patchwork Tue Sep 15 14:44:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364412 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=Qc2hwaYM; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrR0f6kCRz9sVM for ; Wed, 16 Sep 2020 00:47:46 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 352BE82339; Tue, 15 Sep 2020 16:45:57 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Qc2hwaYM"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5BA0282332; Tue, 15 Sep 2020 16:45:50 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qk1-x735.google.com (mail-qk1-x735.google.com [IPv6:2607:f8b0:4864:20::735]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 5B0FF8234C for ; Tue, 15 Sep 2020 16:45:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qk1-x735.google.com with SMTP id q63so4474279qkf.3 for ; Tue, 15 Sep 2020 07:45:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SbmWjz0JJAOoSfRt7+sRe3yEOZJuI47g5NMpjBLHkWU=; b=Qc2hwaYMx6SDNWhHW+6HePHMxTgHgNwL9RVcldQK5VTBfCAnIt2wvb8JVhSYFepA/C 5xJ8wm/iT0/gAWmgp+AhBbRYiN05ebgFr3NQmYWmommB1zvnFK5899qGwLnDp+yRneu3 Dl7nKZGjKkR686IantZ0YX9JqeiE+0FTgdHnalN/eyzr3BMkuf7Bwk49fHqhi1mepBLm bMrozXVunvJ15krR2ni0DoFORBlnZtmwT7oTF5A9zRNJ5C4aYBGOGuEiL6+3D6GXl62j efOckblnVPzREyXaNuygGAj/v0HFMl9wIMZjUUwzKTAWR9mRW5qMTt6Kylx3nCaOgRQC wv1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SbmWjz0JJAOoSfRt7+sRe3yEOZJuI47g5NMpjBLHkWU=; b=tKFNCNSKOEmHOINRTWzDM9s0dzU6JdxINeyR/w8Fs7rtAs3d2DazpTctQCt/aq0FFy on3sL68iIOVeAlHFWGPjOsvAobuOayBx5N52KkCDInXM5MolvcxpV/GMi8wuezoXGhoi TrpA6MyU6ysFeyJZV5S0PybmfQewSZ3I48BaSkdrHHf6jcJCquIys8BMhfdVzEKIS9fV uJzFIwol+nZAH7FlNDM977hdKaGkWZLAEtlu6eLixmSCAh38CbeMfkZj63wUEeGe7Q7x Ox5Wl8GQ2b8WclLVcmJgaUWWfAN7hxqaSar2D1Z42RHBZXxvPBjVTftkyCZUU2kADkIb SgIQ== X-Gm-Message-State: AOAM533PdyTaV/XYuy8GzcvgB7FfuNYlZri2Ov6lUwNNHzyWNMz+uKW+ 70FrJa2Bu/5i+mO8yhw3z39thUQc5UNNeihD X-Google-Smtp-Source: ABdhPJxGtuvTLLJ/K+lmCZOtwhh0S9jv6KvqPEo1kgPgWnVuoUPApzCUZvbtY6zEeGp/aFUnbn81oA== X-Received: by 2002:a05:620a:1348:: with SMTP id c8mr17133644qkl.443.1600181146189; Tue, 15 Sep 2020 07:45:46 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.45.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:45:45 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Jaehoon Chung , Simon Glass , Tom Rini Subject: [PATCH v2 09/46] mmc: Add mmc_dev() Date: Tue, 15 Sep 2020 10:44:45 -0400 Message-Id: <20200915144522.509493-10-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean This macro is necessary for arasan_zynqmp_dll_reset to compile. Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- Changes in v2: - New include/mmc.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/mmc.h b/include/mmc.h index 82562193cc..75bcaaf6b3 100644 --- a/include/mmc.h +++ b/include/mmc.h @@ -888,6 +888,8 @@ void mmc_set_preinit(struct mmc *mmc, int preinit); #define mmc_host_is_spi(mmc) 0 #endif +#define mmc_dev(x) ((x)->dev) + void board_mmc_power_init(void); int board_mmc_init(struct bd_info *bis); int cpu_mmc_init(struct bd_info *bis); From patchwork Tue Sep 15 14:44:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364413 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=Mpl5IIMR; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrR164Xc3z9sTt for ; Wed, 16 Sep 2020 00:48:10 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8522C8237C; Tue, 15 Sep 2020 16:45:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Mpl5IIMR"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A106582320; Tue, 15 Sep 2020 16:45:51 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qk1-x744.google.com (mail-qk1-x744.google.com [IPv6:2607:f8b0:4864:20::744]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1AF5882320 for ; Tue, 15 Sep 2020 16:45:49 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qk1-x744.google.com with SMTP id o16so4429014qkj.10 for ; Tue, 15 Sep 2020 07:45:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=evEl19iPeYe4gj25UBLtHKOxOmhB8SYVEIDwHB5+SKY=; b=Mpl5IIMRVQGTQ/lIarvjQq9lWhsZvIMkPTVNPrTdeTuC3AxM/A7pDyM83V31SYIfCE BJ+F35qpd3S7F1djCTrgAiYI2YicOqK/S0oyLIQeXxZGqj+p7qkhdrgMfzAT4xWtOmmG ywKr09aMcLYF1XZtaI7y7ynNlnJDPlcr7N2WKPX8TmdI8Mr9XejbBMUsY/nBa9ppTCwo i0119Nue+4S9UaUKxne9B2T6e/4d9+F9h01HfyLONzEa9jgYbgF/Z4CLgX+h5peexQQ5 UXZ1isWJNJSXPA0dfYgPs9mOqDE6W1oCl4KNWQrDvCHi5XbEEPerEk8y6jYIkSdxcYhI WLRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=evEl19iPeYe4gj25UBLtHKOxOmhB8SYVEIDwHB5+SKY=; b=Q3JaG+dxooc/is/74dDHTjvmjrtv3+pFFESrVNHFK5Ni4RKulBBTJoHwp2VDaofN7e jf4hhFwbHteuuoiN62ZCrl11CQScLHCRiE6JpJ69HQj/6Ua5CyDydVCmil5cgMXd68Os Ex9xs3kdNMoC8AfQObTS6gAVa10hflVvaUNAOIevWQwS2mTp4tHTqLHY0J/Ewqs3j8rh VVNvkn8r3jGhK+30WInSDg9rZnze1IsXeDZz/eX1pscwWjHFM8RHp+OiFjMG/jtQdMjt UjcUrCUDsCY9fZxhNci9yp6bphyTLrxcpjWRmA57AKxlD1ikrTFSDIXmWtnp0ZJu4xym t63A== X-Gm-Message-State: AOAM530O9udMpfkOBm0rlqyNBEstcze4x0fH+b8Iw8SLhqB0pv8vV8rr 1oRqbodMTS37ady2FsWqs2O7EGqfX8kU4UDc X-Google-Smtp-Source: ABdhPJz0vHUTCCVqnb6y9InVshEFJXfMs5vyI4qx579qXP1Doo984x62Y/VNzJzdgMyHBrgd0LvFgg== X-Received: by 2002:ae9:e00b:: with SMTP id m11mr17821259qkk.141.1600181147609; Tue, 15 Sep 2020 07:45:47 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.45.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:45:46 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Alexander Graf , Matthias Brugger , Peng Fan Subject: [PATCH v2 10/46] mmc: bcm2835-host: Fix not calling dev_dbg with a device Date: Tue, 15 Sep 2020 10:44:46 -0400 Message-Id: <20200915144522.509493-11-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean dev needs to be qualified as a member of host. Signed-off-by: Sean Anderson --- Changes in v2: - New drivers/mmc/bcm2835_sdhost.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/mmc/bcm2835_sdhost.c b/drivers/mmc/bcm2835_sdhost.c index b793028ab5..ea8b385d7e 100644 --- a/drivers/mmc/bcm2835_sdhost.c +++ b/drivers/mmc/bcm2835_sdhost.c @@ -185,22 +185,22 @@ struct bcm2835_host { static void bcm2835_dumpregs(struct bcm2835_host *host) { - dev_dbg(dev, "=========== REGISTER DUMP ===========\n"); - dev_dbg(dev, "SDCMD 0x%08x\n", readl(host->ioaddr + SDCMD)); - dev_dbg(dev, "SDARG 0x%08x\n", readl(host->ioaddr + SDARG)); - dev_dbg(dev, "SDTOUT 0x%08x\n", readl(host->ioaddr + SDTOUT)); - dev_dbg(dev, "SDCDIV 0x%08x\n", readl(host->ioaddr + SDCDIV)); - dev_dbg(dev, "SDRSP0 0x%08x\n", readl(host->ioaddr + SDRSP0)); - dev_dbg(dev, "SDRSP1 0x%08x\n", readl(host->ioaddr + SDRSP1)); - dev_dbg(dev, "SDRSP2 0x%08x\n", readl(host->ioaddr + SDRSP2)); - dev_dbg(dev, "SDRSP3 0x%08x\n", readl(host->ioaddr + SDRSP3)); - dev_dbg(dev, "SDHSTS 0x%08x\n", readl(host->ioaddr + SDHSTS)); - dev_dbg(dev, "SDVDD 0x%08x\n", readl(host->ioaddr + SDVDD)); - dev_dbg(dev, "SDEDM 0x%08x\n", readl(host->ioaddr + SDEDM)); - dev_dbg(dev, "SDHCFG 0x%08x\n", readl(host->ioaddr + SDHCFG)); - dev_dbg(dev, "SDHBCT 0x%08x\n", readl(host->ioaddr + SDHBCT)); - dev_dbg(dev, "SDHBLC 0x%08x\n", readl(host->ioaddr + SDHBLC)); - dev_dbg(dev, "===========================================\n"); + dev_dbg(host->dev, "=========== REGISTER DUMP ===========\n"); + dev_dbg(host->dev, "SDCMD 0x%08x\n", readl(host->ioaddr + SDCMD)); + dev_dbg(host->dev, "SDARG 0x%08x\n", readl(host->ioaddr + SDARG)); + dev_dbg(host->dev, "SDTOUT 0x%08x\n", readl(host->ioaddr + SDTOUT)); + dev_dbg(host->dev, "SDCDIV 0x%08x\n", readl(host->ioaddr + SDCDIV)); + dev_dbg(host->dev, "SDRSP0 0x%08x\n", readl(host->ioaddr + SDRSP0)); + dev_dbg(host->dev, "SDRSP1 0x%08x\n", readl(host->ioaddr + SDRSP1)); + dev_dbg(host->dev, "SDRSP2 0x%08x\n", readl(host->ioaddr + SDRSP2)); + dev_dbg(host->dev, "SDRSP3 0x%08x\n", readl(host->ioaddr + SDRSP3)); + dev_dbg(host->dev, "SDHSTS 0x%08x\n", readl(host->ioaddr + SDHSTS)); + dev_dbg(host->dev, "SDVDD 0x%08x\n", readl(host->ioaddr + SDVDD)); + dev_dbg(host->dev, "SDEDM 0x%08x\n", readl(host->ioaddr + SDEDM)); + dev_dbg(host->dev, "SDHCFG 0x%08x\n", readl(host->ioaddr + SDHCFG)); + dev_dbg(host->dev, "SDHBCT 0x%08x\n", readl(host->ioaddr + SDHBCT)); + dev_dbg(host->dev, "SDHBLC 0x%08x\n", readl(host->ioaddr + SDHBLC)); + dev_dbg(host->dev, "===========================================\n"); } static void bcm2835_reset_internal(struct bcm2835_host *host) @@ -738,7 +738,7 @@ static void bcm2835_add_host(struct bcm2835_host *host) cfg->f_min = host->max_clk / SDCDIV_MAX_CDIV; cfg->b_max = 65535; - dev_dbg(dev, "f_max %d, f_min %d\n", + dev_dbg(host->dev, "f_max %d, f_min %d\n", cfg->f_max, cfg->f_min); /* host controller capabilities */ From patchwork Tue Sep 15 14:44:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364414 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=E8y38Bn6; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrR1G3chsz9sVK for ; Wed, 16 Sep 2020 00:48:18 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8F57B82378; Tue, 15 Sep 2020 16:46:05 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="E8y38Bn6"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5F1CA8235C; Tue, 15 Sep 2020 16:45:53 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qt1-x842.google.com (mail-qt1-x842.google.com [IPv6:2607:f8b0:4864:20::842]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 61C2E82322 for ; Tue, 15 Sep 2020 16:45:50 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qt1-x842.google.com with SMTP id e7so3297761qtj.11 for ; Tue, 15 Sep 2020 07:45:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PFdqbmk7XuFkjvzI/fDgTrDrzg6jpkR7P+XVonBfgyk=; b=E8y38Bn67Bif9IJ5aKsrxp9TdR+hZewXu25Ml1zQEZSn3xZa06vNlaggZHCx3D1Az6 o4Otaim9hZw7VE7/JD3nMeugFOdX9rQ4DCPaj4uraTtRtbAGjMsG9W/rLWaRy0oAJ8+R QPabvEn05o8ciVUV/o0m9Gbv1ne2DxoY+Vci3IHZAHkFS7Sy4H4X1hVlpSgDAXkdQlFc 22EvHs9OKJ84UKswrw1LyYLjiohqkcOMHORvuWSSsYpbCuI9YMZcoJy2LUeAIcLgwi0U a73i6BwRAdtcpvaOtKfuHh1uuMwt0fjotLmc9LGQ9Z9/bDJJGrTsN751dz94+k+Ag/ay h+1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PFdqbmk7XuFkjvzI/fDgTrDrzg6jpkR7P+XVonBfgyk=; b=ClXALbioEh3Eg8OufQ0BKFMdqbDlKvzpBQqMGxqW8hMuzZ4Sc9kGCEiUDCgfIk8KSw ris1oKe1lxVrMaUBSXmFUGnCrkXxqcgNWm6hCNUOtMn3DUfvwC2+2Q5Qj5PdbyJr9Aif RXVCQEtiqEvEPa+IZBwB8/JsZ8ClAAZZvDkCBq2N7NjbQLLLwoJDkxJpj6U/fZadv9cY 0XFohT/pV+ju1TnbZe/xqcvHo4npNAWcgdYAt4P7pVc9QBYfZAWduIbCPS8jZI9xcMn6 DxKOLqcpcEtjgRnPKoNwKH/5lkGYyrK40+W7Ewt7euWaN0bGc4ZjpzCLfwGVfyNNE4xS AFHw== X-Gm-Message-State: AOAM533dsdOEsRD6DvwpXpYiujYZqVJtjAiGFpZI9p1rL5OE9nU/EHd+ bMyLpyMpGuDBs7OF2U31lwHVF6zHPipUTdRX X-Google-Smtp-Source: ABdhPJxbZSQjsP+0p9zrHdbS3ivBFYv0C8okNLQDNR4wcMJcPLbnNSq5ooXZgnU8s10yHDwJMEYm0Q== X-Received: by 2002:aed:3584:: with SMTP id c4mr17470873qte.84.1600181148777; Tue, 15 Sep 2020 07:45:48 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.45.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:45:48 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Fabien Parent , GSS_MTK_Uboot_upstream , Peng Fan , Ryder Lee , Simon Glass , Tom Rini , Weijie Gao Subject: [PATCH v2 11/46] mmc: mtk-sd: Fix not calling dev_err with a device Date: Tue, 15 Sep 2020 10:44:47 -0400 Message-Id: <20200915144522.509493-12-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean This adds a udevice parameter to get_best_delay and msdc_set_mclk so they can call dev_err properly. Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- Changes in v2: - New drivers/mmc/mtk-sd.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/drivers/mmc/mtk-sd.c b/drivers/mmc/mtk-sd.c index bd1fb09d1c..30fe7a0aa2 100644 --- a/drivers/mmc/mtk-sd.c +++ b/drivers/mmc/mtk-sd.c @@ -774,7 +774,8 @@ static void msdc_set_buswidth(struct msdc_host *host, u32 width) writel(val, &host->base->sdc_cfg); } -static void msdc_set_mclk(struct msdc_host *host, enum bus_mode timing, u32 hz) +static void msdc_set_mclk(struct udevice *dev, + struct msdc_host *host, enum bus_mode timing, u32 hz) { u32 mode; u32 div; @@ -897,7 +898,7 @@ static int msdc_ops_set_ios(struct udevice *dev) clock = mmc->cfg->f_min; if (host->mclk != clock || host->timing != mmc->selected_mode) - msdc_set_mclk(host, mmc->selected_mode, clock); + msdc_set_mclk(dev, host, mmc->selected_mode, clock); return 0; } @@ -957,7 +958,8 @@ static int get_delay_len(u32 delay, u32 start_bit) return PAD_DELAY_MAX - start_bit; } -static struct msdc_delay_phase get_best_delay(struct msdc_host *host, u32 delay) +static struct msdc_delay_phase get_best_delay(struct udevice *dev, + struct msdc_host *host, u32 delay) { int start = 0, len = 0; int start_final = 0, len_final = 0; @@ -1067,7 +1069,7 @@ static int hs400_tune_response(struct udevice *dev, u32 opcode) } } - final_cmd_delay = get_best_delay(host, cmd_delay); + final_cmd_delay = get_best_delay(dev, host, cmd_delay); clrsetbits_le32(tune_reg, PAD_CMD_TUNE_RX_DLY3, final_cmd_delay.final_phase << PAD_CMD_TUNE_RX_DLY3_S); @@ -1117,7 +1119,7 @@ static int msdc_tune_response(struct udevice *dev, u32 opcode) } } - final_rise_delay = get_best_delay(host, rise_delay); + final_rise_delay = get_best_delay(dev, host, rise_delay); /* if rising edge has enough margin, do not scan falling edge */ if (final_rise_delay.maxlen >= 12 || (final_rise_delay.start == 0 && final_rise_delay.maxlen >= 4)) @@ -1139,7 +1141,7 @@ static int msdc_tune_response(struct udevice *dev, u32 opcode) } } - final_fall_delay = get_best_delay(host, fall_delay); + final_fall_delay = get_best_delay(dev, host, fall_delay); skip_fall: final_maxlen = max(final_rise_delay.maxlen, final_fall_delay.maxlen); @@ -1171,7 +1173,7 @@ skip_fall: dev_err(dev, "Final internal delay: 0x%x\n", internal_delay); - internal_delay_phase = get_best_delay(host, internal_delay); + internal_delay_phase = get_best_delay(dev, host, internal_delay); clrsetbits_le32(tune_reg, MSDC_PAD_TUNE_CMDRRDLY_M, internal_delay_phase.final_phase << MSDC_PAD_TUNE_CMDRRDLY_S); @@ -1214,7 +1216,7 @@ static int msdc_tune_data(struct udevice *dev, u32 opcode) } } - final_rise_delay = get_best_delay(host, rise_delay); + final_rise_delay = get_best_delay(dev, host, rise_delay); if (final_rise_delay.maxlen >= 12 || (final_rise_delay.start == 0 && final_rise_delay.maxlen >= 4)) goto skip_fall; @@ -1237,7 +1239,7 @@ static int msdc_tune_data(struct udevice *dev, u32 opcode) } } - final_fall_delay = get_best_delay(host, fall_delay); + final_fall_delay = get_best_delay(dev, host, fall_delay); skip_fall: final_maxlen = max(final_rise_delay.maxlen, final_fall_delay.maxlen); @@ -1293,7 +1295,7 @@ static int msdc_tune_together(struct udevice *dev, u32 opcode) rise_delay |= (1 << i); } - final_rise_delay = get_best_delay(host, rise_delay); + final_rise_delay = get_best_delay(dev, host, rise_delay); if (final_rise_delay.maxlen >= 12 || (final_rise_delay.start == 0 && final_rise_delay.maxlen >= 4)) goto skip_fall; @@ -1309,7 +1311,7 @@ static int msdc_tune_together(struct udevice *dev, u32 opcode) fall_delay |= (1 << i); } - final_fall_delay = get_best_delay(host, fall_delay); + final_fall_delay = get_best_delay(dev, host, fall_delay); skip_fall: final_maxlen = max(final_rise_delay.maxlen, final_fall_delay.maxlen); From patchwork Tue Sep 15 14:44:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364415 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=lMM1ImvV; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrR1Z2mlFz9sTN for ; Wed, 16 Sep 2020 00:48:34 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B9E8782387; Tue, 15 Sep 2020 16:46:06 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="lMM1ImvV"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F1A8D8235E; Tue, 15 Sep 2020 16:45:53 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qt1-x841.google.com (mail-qt1-x841.google.com [IPv6:2607:f8b0:4864:20::841]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 472EB8234C for ; Tue, 15 Sep 2020 16:45:51 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qt1-x841.google.com with SMTP id y11so3313297qtn.9 for ; Tue, 15 Sep 2020 07:45:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zCzlKbY/0fGoKKxD3S2DDjO64iF7s8HjAb2MHDutQgo=; b=lMM1ImvV71FAaPejsyb5+S0jlcavPOLmWjCkbfK+jtwQJAJzm/9W7JDSu6pLcJBQp9 zBW7YRCk3TxF+A18mR6IpGE01/NLmdQVVlsHPtDBV6CuOprz3uMX7bnAUPPV91E/GGHI 9UGS7LVpUP91PPYpvKWONXjsnZPRW2PACnKfbMebncYb/FLcIKXtfWuVZblGHNDXf6iC ypYrIvQPxyfRqfB4KHPRnIL+kr8/A+ob1O3koYUMqLEk5sk/2aopTb2g4WYRBMXb84mF ZESp6tEIWuwYwKt0+5BOfYroS+kFW9kCyg8BXfGJo9RzXPdV9uPI74i+VVT83p++Ctuy d+/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zCzlKbY/0fGoKKxD3S2DDjO64iF7s8HjAb2MHDutQgo=; b=n4txYO9O95biHlqGG5cj1N0ZC8zq1E6SmoJ2v1W514yl2oxkljRFUwgPD389SJ5gg0 UBOQDKQwE6xdD8/Cn6CB5FI8DCBYYngPzz6JwONaD9af3Eo4uS4w6ouK0UbaJXIjWUka PFNq0F+7RPzK+XclQP3CygPPabi2XNRWk39Dr6gcQxM5CIHrDTqkEUuonZzYCPIYWvUR dDnKbThai/fPYAR22FqfIhUp19XlkYjDw0xtWfpewhjxvPRMkV+YsfHAG2POUqZh3zEP WB5v9RWtWytkU5TIl1kxweM50bZlkY0RCmW2w79tnUGIeT+sikJBPog+RHEU8tm+HwcI GH+w== X-Gm-Message-State: AOAM532IcDIYUoJYmzsmwHRrzG3rdQRimieuYZnVqO3OxeS+zXuKednO N7qBIawl59FC0idEGrP0UpHjfcpImVt/TNaa X-Google-Smtp-Source: ABdhPJxFYMn7NBdmg1ItAfC7Eyc+LK9gucUneUm+eS0pR2wtc3wXTCS1C3o2PZczE17i29dWFLd1DQ== X-Received: by 2002:ac8:5d4d:: with SMTP id g13mr18564627qtx.348.1600181149745; Tue, 15 Sep 2020 07:45:49 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.45.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:45:49 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Lokesh Vutla , Simon Glass , Tom Rini Subject: [PATCH v2 12/46] mailbox: k3: Fix not calling dev_err with a device Date: Tue, 15 Sep 2020 10:44:48 -0400 Message-Id: <20200915144522.509493-13-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean dev needs to be gotten from mbox_chan Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- Changes in v2: - New drivers/mailbox/k3-sec-proxy.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/mailbox/k3-sec-proxy.c b/drivers/mailbox/k3-sec-proxy.c index 3f9afaed32..27ccc6eab0 100644 --- a/drivers/mailbox/k3-sec-proxy.c +++ b/drivers/mailbox/k3-sec-proxy.c @@ -212,14 +212,16 @@ static int k3_sec_proxy_send(struct mbox_chan *chan, const void *data) ret = k3_sec_proxy_verify_thread(spt, THREAD_IS_TX); if (ret) { - dev_err(dev, "%s: Thread%d verification failed. ret = %d\n", + dev_err(chan->dev, + "%s: Thread%d verification failed. ret = %d\n", __func__, spt->id, ret); return ret; } /* Check the message size. */ if (msg->len > spm->desc->max_msg_size) { - printf("%s: Thread %ld message length %zu > max msg size %d\n", + dev_err(chan->dev, + "%s: Thread %ld message length %zu > max msg size %d\n", __func__, chan->id, msg->len, spm->desc->max_msg_size); return -EINVAL; } From patchwork Tue Sep 15 14:44:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364417 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=edskY3Ym; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrR204Ld5z9sTN for ; Wed, 16 Sep 2020 00:48:56 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 46BE782398; Tue, 15 Sep 2020 16:46:09 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="edskY3Ym"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D780382374; Tue, 15 Sep 2020 16:45:56 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qt1-x843.google.com (mail-qt1-x843.google.com [IPv6:2607:f8b0:4864:20::843]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B755D82339 for ; Tue, 15 Sep 2020 16:45:52 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qt1-x843.google.com with SMTP id k25so3347473qtu.4 for ; Tue, 15 Sep 2020 07:45:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1u3+/5VChWQ0mleT6luvgkh1KFiwkbw7TnY9GKeJERY=; b=edskY3Ymz0eCXRpV0rByu+jvp/JfSRIOwD3vZak8pNG6ktKOkjRYstfdPI3Fqzk/2m Np5RJ0MJzM8UtyRvew9HIF16Glfle2tIMslSijdbfK/eXF98/4ivIZYpQPF3ilK5Z1WS 2jspZ0b3bVS0MCCUKlj+IRCEXRYaCgFw1sprd4Dw5Q1fsXyULAgnCXqKWcez1PA/vjbj IKnB40hFFSL918i6aqhpaGRnpqWojn5ruAaIaG8SeYdZcIweoPmL0izqJUdq4ZrnI1S7 oUTtYqFpwYMxUcuYfvEgQP7gERK0FLUm3OwK2dgkq4xEBL1iZUU8j8TRfOsXc3rx9R6w sxbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1u3+/5VChWQ0mleT6luvgkh1KFiwkbw7TnY9GKeJERY=; b=TWpzpE61zVkWXMw/p1roBOg6BnfgLgmTKy/RwIClAyik+XN2wL84xL8NvX2Al3uQ16 sw5Q3IH8SbZqZAvFkGM5yiNTC5t1cXbhmSEQOVVVN9qfrWDwKWSUwAv5WHAljV1sxcaZ JBEJAbgBBlLp7CyTxk7vyDCTxIA1mP5vT1T87nrQv+nip170rogbsNnFlvtG6P4khGRv fIxHqUpbmgsq0VxdDC+opbLOug18On+Icm8mx0POuB004Tjms37AtZUTy1IiBeOrcybT XvCcidJeNvV5PfhJWSbZfbX/UCjW23ZUMjZpboyG3u8u5paBNC0VLAzsqsZDuqfiSjXw n1KQ== X-Gm-Message-State: AOAM531mBhMVocapYTU6RqwLC/LXmX3bMb2VwHtZBZWh1GZV/kkFznC0 HDnnhEfWrgvGvsW7u32zLFY1INmwZIDkSyZ8 X-Google-Smtp-Source: ABdhPJzoJPCQfUNCEOK6/VLL4oS3SY0D/IJkE2aMV2XYf7qJMHgtM3M+vGtj1vhow7EfvIQF8Qf+Dg== X-Received: by 2002:ac8:b83:: with SMTP id h3mr18507892qti.113.1600181150844; Tue, 15 Sep 2020 07:45:50 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.45.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:45:50 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , =?utf-8?q?Andreas_Bie=C3=9Fmann?= , Josh Wu , Scott Wood , Simon Glass Subject: [PATCH v2 13/46] nand: atmel: Fix not calling dev_xxx with a device Date: Tue, 15 Sep 2020 10:44:49 -0400 Message-Id: <20200915144522.509493-14-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Use mtd_info to get a device to log with. Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- Changes in v2: - New drivers/mtd/nand/raw/atmel_nand.c | 69 +++++++++++++++++-------------- 1 file changed, 39 insertions(+), 30 deletions(-) diff --git a/drivers/mtd/nand/raw/atmel_nand.c b/drivers/mtd/nand/raw/atmel_nand.c index 5e95901e27..abc432c862 100644 --- a/drivers/mtd/nand/raw/atmel_nand.c +++ b/drivers/mtd/nand/raw/atmel_nand.c @@ -424,7 +424,8 @@ static int pmecc_err_location(struct mtd_info *mtd) } if (!timeout) { - dev_err(host->dev, "atmel_nand : Timeout to calculate PMECC error location\n"); + dev_err(mtd->dev, + "Timeout to calculate PMECC error location\n"); return -1; } @@ -464,7 +465,8 @@ static void pmecc_correct_data(struct mtd_info *mtd, uint8_t *buf, uint8_t *ecc, *(buf + byte_pos) ^= (1 << bit_pos); pos = sector_num * host->pmecc_sector_size + byte_pos; - dev_dbg(host->dev, "Bit flip in data area, byte_pos: %d, bit_pos: %d, 0x%02x -> 0x%02x\n", + dev_dbg(mtd->dev, + "Bit flip in data area, byte_pos: %d, bit_pos: %d, 0x%02x -> 0x%02x\n", pos, bit_pos, err_byte, *(buf + byte_pos)); } else { /* Bit flip in OOB area */ @@ -474,7 +476,8 @@ static void pmecc_correct_data(struct mtd_info *mtd, uint8_t *buf, uint8_t *ecc, ecc[tmp] ^= (1 << bit_pos); pos = tmp + nand_chip->ecc.layout->eccpos[0]; - dev_dbg(host->dev, "Bit flip in OOB, oob_byte_pos: %d, bit_pos: %d, 0x%02x -> 0x%02x\n", + dev_dbg(mtd->dev, + "Bit flip in OOB, oob_byte_pos: %d, bit_pos: %d, 0x%02x -> 0x%02x\n", pos, bit_pos, err_byte, ecc[tmp]); } @@ -516,7 +519,7 @@ normal_check: err_nbr = pmecc_err_location(mtd); if (err_nbr == -1) { - dev_err(host->dev, "PMECC: Too many errors\n"); + dev_err(mtd->dev, "PMECC: Too many errors\n"); mtd->ecc_stats.failed++; return -EBADMSG; } else { @@ -560,7 +563,7 @@ static int atmel_nand_pmecc_read_page(struct mtd_info *mtd, } if (!timeout) { - dev_err(host->dev, "atmel_nand : Timeout to read PMECC page\n"); + dev_err(mtd->dev, "Timeout to read PMECC page\n"); return -1; } @@ -600,7 +603,8 @@ static int atmel_nand_pmecc_write_page(struct mtd_info *mtd, } if (!timeout) { - dev_err(host->dev, "atmel_nand : Timeout to read PMECC status, fail to write PMECC in oob\n"); + dev_err(mtd->dev, + "Timeout to read PMECC status, fail to write PMECC in oob\n"); goto out; } @@ -713,7 +717,8 @@ static int pmecc_choose_ecc(struct atmel_nand_host *host, if (*cap == 0 && *sector_size == 0) { /* Non-ONFI compliant */ - dev_info(host->dev, "NAND chip is not ONFI compliant, assume ecc_bits is 2 in 512 bytes\n"); + dev_info(chip->mtd.dev, + "NAND chip is not ONFI compliant, assume ecc_bits is 2 in 512 bytes\n"); *cap = 2; *sector_size = 512; } @@ -835,17 +840,20 @@ static int atmel_pmecc_nand_init_params(struct nand_chip *nand, * from ONFI. */ if (pmecc_choose_ecc(host, nand, &cap, §or_size)) { - dev_err(host->dev, "Required ECC %d bits in %d bytes not supported!\n", + dev_err(mtd->dev, + "Required ECC %d bits in %d bytes not supported!\n", cap, sector_size); return -EINVAL; } if (cap > host->pmecc_corr_cap) - dev_info(host->dev, "WARNING: Using different ecc correct bits(%d bit) from Nand ONFI ECC reqirement (%d bit).\n", - host->pmecc_corr_cap, cap); + dev_info(mtd->dev, + "WARNING: Using different ecc correct bits(%d bit) from Nand ONFI ECC reqirement (%d bit).\n", + host->pmecc_corr_cap, cap); if (sector_size < host->pmecc_sector_size) - dev_info(host->dev, "WARNING: Using different ecc correct sector size (%d bytes) from Nand ONFI ECC reqirement (%d bytes).\n", - host->pmecc_sector_size, sector_size); + dev_info(mtd->dev, + "WARNING: Using different ecc correct sector size (%d bytes) from Nand ONFI ECC reqirement (%d bytes).\n", + host->pmecc_sector_size, sector_size); #else /* CONFIG_SYS_NAND_ONFI_DETECTION */ host->pmecc_corr_cap = CONFIG_PMECC_CAP; host->pmecc_sector_size = CONFIG_PMECC_SECTOR_SIZE; @@ -877,7 +885,7 @@ static int atmel_pmecc_nand_init_params(struct nand_chip *nand, #if defined(NO_GALOIS_TABLE_IN_ROM) pmecc_galois_table = create_lookup_table(host->pmecc_sector_size); if (!pmecc_galois_table) { - dev_err(host->dev, "out of memory\n"); + dev_err(mtd->dev, "out of memory\n"); return -ENOMEM; } @@ -909,13 +917,14 @@ static int atmel_pmecc_nand_init_params(struct nand_chip *nand, host->pmecc_sector_number; if (nand->ecc.bytes > MTD_MAX_ECCPOS_ENTRIES_LARGE) { - dev_err(host->dev, "too large eccpos entries. max support ecc.bytes is %d\n", - MTD_MAX_ECCPOS_ENTRIES_LARGE); + dev_err(mtd->dev, + "too large eccpos entries. max support ecc.bytes is %d\n", + MTD_MAX_ECCPOS_ENTRIES_LARGE); return -EINVAL; } if (nand->ecc.bytes > mtd->oobsize - PMECC_OOB_RESERVED_BYTES) { - dev_err(host->dev, "No room for ECC bytes\n"); + dev_err(mtd->dev, "No room for ECC bytes\n"); return -EINVAL; } pmecc_config_ecc_layout(&atmel_pmecc_oobinfo, @@ -926,7 +935,8 @@ static int atmel_pmecc_nand_init_params(struct nand_chip *nand, case 512: case 1024: /* TODO */ - dev_err(host->dev, "Unsupported page size for PMECC, use Software ECC\n"); + dev_err(mtd->dev, + "Unsupported page size for PMECC, use Software ECC\n"); default: /* page size not handled by HW ECC */ /* switching back to soft ECC */ @@ -940,7 +950,8 @@ static int atmel_pmecc_nand_init_params(struct nand_chip *nand, /* Allocate data for PMECC computation */ if (pmecc_data_alloc(host)) { - dev_err(host->dev, "Cannot allocate memory for PMECC computation!\n"); + dev_err(mtd->dev, + "Cannot allocate memory for PMECC computation!\n"); return -ENOMEM; } @@ -951,7 +962,7 @@ static int atmel_pmecc_nand_init_params(struct nand_chip *nand, /* Check the PMECC ip version */ host->pmecc_version = pmecc_readl(host->pmerrloc, version); - dev_dbg(host->dev, "PMECC IP version is: %x\n", host->pmecc_version); + dev_dbg(mtd->dev, "PMECC IP version is: %x\n", host->pmecc_version); atmel_pmecc_core_init(mtd); @@ -1114,8 +1125,8 @@ static int atmel_nand_correct(struct mtd_info *mtd, u_char *dat, /* it doesn't seems to be a freshly * erased block. * We can't correct so many errors */ - dev_warn(host->dev, "atmel_nand : multiple errors detected." - " Unable to correct.\n"); + dev_warn(mtd->dev, + "multiple errors detected. Unable to correct.\n"); return -EBADMSG; } @@ -1124,15 +1135,14 @@ static int atmel_nand_correct(struct mtd_info *mtd, u_char *dat, /* there's nothing much to do here. * the bit error is on the ECC itself. */ - dev_warn(host->dev, "atmel_nand : one bit error on ECC code." - " Nothing to correct\n"); + dev_warn(mtd->dev, + "one bit error on ECC code. Nothing to correct\n"); return 0; } - dev_warn(host->dev, "atmel_nand : one bit error on data." - " (word offset in the page :" - " 0x%x bit offset : 0x%x)\n", - ecc_word, ecc_bit); + dev_warn(mtd->dev, + "one bit error on data. (word offset in the page : 0x%x bit offset : 0x%x)\n", + ecc_word, ecc_bit); /* correct the error */ if (nand_chip->options & NAND_BUSWIDTH_16) { /* 16 bits words */ @@ -1141,7 +1151,7 @@ static int atmel_nand_correct(struct mtd_info *mtd, u_char *dat, /* 8 bits words */ dat[ecc_word] ^= (1 << ecc_bit); } - dev_warn(host->dev, "atmel_nand : error corrected\n"); + dev_warn(mtd->dev, "error corrected\n"); return 1; } @@ -1511,7 +1521,6 @@ void board_nand_init(void) int i; for (i = 0; i < CONFIG_SYS_MAX_NAND_DEVICE; i++) if (atmel_nand_chip_init(i, base_addr[i])) - dev_err(host->dev, "atmel_nand: Fail to initialize #%d chip", - i); + log_err("atmel_nand: Fail to initialize #%d chip", i); } #endif /* CONFIG_SPL_BUILD */ From patchwork Tue Sep 15 14:44:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364416 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=On9eHHRc; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrR1m5z4Hz9sTN for ; Wed, 16 Sep 2020 00:48:44 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 038E78238F; Tue, 15 Sep 2020 16:46:08 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="On9eHHRc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C3A9282367; Tue, 15 Sep 2020 16:45:55 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3C6788235A for ; Tue, 15 Sep 2020 16:45:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qk1-x741.google.com with SMTP id 16so4461992qkf.4 for ; Tue, 15 Sep 2020 07:45:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iGIhMqOk2JnlBM3X4RUlSWbTt9jnvAs1d5RnHMsrijY=; b=On9eHHRcM2GcXQdo4VI2r9eGCdgvYxjkSGYZo0pfr9BC+zDfu8r1v++jsH5qGgidxw Bui9+3XFtL5XU/xcMrPMLtEQWvVZVoAQbWkvlogjIGH0PwugqMacR9dqvHtwmyhZNOl4 AOyV2qTj7Pl/ThICVXOMqEuNjRPj7pw6gxF2GR/4OwQPxJpcVT5Zixv5T10KUSkl5Eg9 LCBf0IpPuYLRv9UgszCP497U7HTrjlXGD7Dn9m1Ux42d6UN3uSLVqvd4uiOlZAetVq2F jajXjN0bfuRV0jV+Sw8B4nNX3IVnl0Nb38VkM7B0PurP/sG67EJmysVlx+HSljxjwzcV G/Kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iGIhMqOk2JnlBM3X4RUlSWbTt9jnvAs1d5RnHMsrijY=; b=fHU3aCzhaJeqA8JjFWcF/J19UB7k7S5lRig5WNFdtZcYB3kv14L5pzp8TG4+C7NNuy GmQAuFPhrbemRKg621sOETEKzgF6Huq3RgIMVsPh6RcUMHK4aZSR4P8+4YPNOrVTEUBo h2V5I52zajKrCJBxhpOpbrw7Xq5FIdHcqrg20bKx4vIluGK0Lf6gnAcwYJdfHfwgxAcK 4zvdLPwf9nrgnZ6T4h7GIXlWDlM+cn5QO6eOlejI0EKUtegLag2F4Tvf4Ar28wAP4OlA LFYP3NWiDgTZogKzC83b/jMAATe/dU6k3j+UJeIx5Y/mcrAUw9AnXPJm0jWEb9UeE4RI Na4A== X-Gm-Message-State: AOAM530Mf610+lbYjC1cyI2Tz/Z3k2aJcDwG/ZkkBNzuPExeARoIfXfb AO25yozWKnwHi7phc3eFbvKR1fiCTU9VxcKG X-Google-Smtp-Source: ABdhPJxMq426PB5vVrOtBbvdzYBJ6HBkcVUjnwuQ9juSYs5KK6BwfVaXaEQCr/bw8+4eAly2V98ePg== X-Received: by 2002:a37:a87:: with SMTP id 129mr16319783qkk.13.1600181151889; Tue, 15 Sep 2020 07:45:51 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.45.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:45:51 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Philippe Reynes , William Zhang Subject: [PATCH v2 14/46] nand: brcmnand: Fix not calling dev_err() with a device Date: Tue, 15 Sep 2020 10:44:50 -0400 Message-Id: <20200915144522.509493-15-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean There are too many levels of indirection when calling dev_err. This is an artifact of the conversion of brcmnand_host.pdev from a struct platform_device (which has a member `dev` pointing to a struct device) to struct udevice. Signed-off-by: Sean Anderson --- Changes in v2: - New drivers/mtd/nand/raw/brcmnand/brcmnand.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand.c b/drivers/mtd/nand/raw/brcmnand/brcmnand.c index 48c0ca69de..7349a9bc99 100644 --- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c +++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c @@ -956,7 +956,7 @@ static struct nand_ecclayout *brcmnand_create_layout(int ecc_level, */ req = DIV_ROUND_UP(ecc_level * 14, 8); if (req >= sas) { - dev_err(&host->pdev->dev, + dev_err(host->pdev, "error: ECC too large for OOB (ECC bytes %d, spare sector %d)\n", req, sas); return NULL; @@ -1012,8 +1012,8 @@ static struct nand_ecclayout *brcmstb_choose_ecc_layout( layout = brcmnand_create_layout(ecc_level, host); if (!layout) { - dev_err(&host->pdev->dev, - "no proper ecc_layout for this NAND cfg\n"); + dev_err(host->pdev, + "no proper ecc_layout for this NAND cfg\n"); return NULL; } @@ -1056,17 +1056,9 @@ static void brcmnand_wp(struct mtd_info *mtd, int wp) NAND_CTRL_RDY | NAND_STATUS_READY | (wp ? 0 : NAND_STATUS_WP), 0); -#ifndef __UBOOT__ if (ret) - dev_err_ratelimited(&host->pdev->dev, - "nand #WP expected %s\n", - wp ? "on" : "off"); -#else - if (ret) - dev_err(&host->pdev->dev, - "nand #WP expected %s\n", - wp ? "on" : "off"); -#endif /* __UBOOT__ */ + dev_err(host->pdev, "nand #WP expected %s\n", + wp ? "on" : "off"); } } @@ -2257,7 +2249,7 @@ static int brcmnand_init_cs(struct brcmnand_host *host, ofnode dn) ret = ofnode_read_s32(dn, "reg", &host->cs); #endif if (ret) { - dev_err(&pdev->dev, "can't get chip-select\n"); + dev_err(pdev, "can't get chip-select\n"); return -ENXIO; } From patchwork Tue Sep 15 14:44:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364418 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=LPizSWH6; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrR2B5c1Mz9sTN for ; Wed, 16 Sep 2020 00:49:06 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 344DA823A2; Tue, 15 Sep 2020 16:46:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="LPizSWH6"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 33FA58236D; Tue, 15 Sep 2020 16:45:57 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 837778235F for ; Tue, 15 Sep 2020 16:45:54 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qk1-x741.google.com with SMTP id q5so4485877qkc.2 for ; Tue, 15 Sep 2020 07:45:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dhHiYWpJT8+BjVNlxbisFEAYf661U3NOjEZQWH25Lyc=; b=LPizSWH6Lgt6dbbEpQwkRocW9VcTYCBMvXtZUOKzc8e4HzXleKYL9WioC6UYXgBoG5 3R1Zq3cDdPd0mMYR625zEH2a1ddfeiu6WC3VhmbZCROQExp9NeBKr2Pq/5sqtpqPCIXn nvJKxTJGcAFgPMwKfIYYKvRjuYbupwdui6rZvpuI57sysJGdKuRKwpRmQ2ajUNJFyUsB huwC3bd+PxRFywuF96vSGDXbe6jiDsk0dMxNmCx6utgtmZIpeL5OI43LSHqzFtBJJEv3 NZuXFaAy1/i3A8vijkhnpjlbRZiTic84SVB3Kp9IeEqTk2j1/31Hmf0PQfJDGGl0U5gV ArBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dhHiYWpJT8+BjVNlxbisFEAYf661U3NOjEZQWH25Lyc=; b=c5bcgMvnEsAgp9P7PM0XZBZ5ng3MMPeQOUWyK9ZauoKeM4SzBi6Gh32Cbdz6pSQHF9 +6Qyz2qk6LsQjWhgQe5lck+RjOpW0nhFA/T5cqUbWpKkN38oAUi+BPpxAN72zEtFfA+c q5+JUGAWGbmGMnMqvTn3R+3tTiFaUI2ygT6bwGxNwvQ/aP0TNUEA4dLToG3A4W/a/IGk je83Md3gqaa5eeD8drgPn/fcNhX+E9qgGauaQKx/1YU6FFheRJ1qhljywdjaY5ydLjDn LQNz2foJ0U1OdCfbyguuW+ZGr2zV3z1SE0LM7TaUdHz/SnbZW7ifnzM+uTAQmLkRTJx1 Difw== X-Gm-Message-State: AOAM530e8NQQlKCSUCeEhO6j0QWGe5ZP5AH4qpe2kdRkWugRkIhlGGfe vaahJUNhdQNgln80Mwtr/5v1HpmenMyVSzR2 X-Google-Smtp-Source: ABdhPJzGIPfMGJxxvvvytqgeMa0prqdfh8u8IMfOlWj9gEj7EUn6kECqN1WNSY/kUqGCp6zDc2FNbQ== X-Received: by 2002:a05:620a:1348:: with SMTP id c8mr17134190qkl.443.1600181153247; Tue, 15 Sep 2020 07:45:53 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.45.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:45:52 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Lukasz Majewski , Philippe Reynes , Stefan Agner Subject: [PATCH v2 15/46] nand: vybrid: Re-introduce vf610_nfc.dev Date: Tue, 15 Sep 2020 10:44:51 -0400 Message-Id: <20200915144522.509493-16-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean This member was presumably dropped when this driver was converted from Linux. However, it is still used in log statements during initialization. This patch adds the member back. In addition, allocation of struct vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows it to be allocated by DM (if it is being used) and for dev to be initialized. Signed-off-by: Sean Anderson --- Changes in v2: - New drivers/mtd/nand/raw/vf610_nfc.c | 38 ++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/drivers/mtd/nand/raw/vf610_nfc.c b/drivers/mtd/nand/raw/vf610_nfc.c index 52c8a94778..4e6fdc607f 100644 --- a/drivers/mtd/nand/raw/vf610_nfc.c +++ b/drivers/mtd/nand/raw/vf610_nfc.c @@ -152,6 +152,8 @@ enum vf610_nfc_alt_buf { struct vf610_nfc { struct nand_chip chip; + /* NULL without CONFIG_NAND_VF610_NFC_DT */ + struct udevice *dev; void __iomem *regs; uint buf_offset; int write_sz; @@ -631,11 +633,10 @@ struct vf610_nfc_config { int flash_bbt; }; -static int vf610_nfc_nand_init(int devnum, void __iomem *addr) +static int vf610_nfc_nand_init(struct vf610_nfc *nfc, int devnum) { - struct mtd_info *mtd; - struct nand_chip *chip; - struct vf610_nfc *nfc; + struct nand_chip *chip = &nfc->chip; + struct mtd_info *mtd = nand_to_mtd(chip); int err = 0; struct vf610_nfc_config cfg = { .hardware_ecc = 1, @@ -647,16 +648,6 @@ static int vf610_nfc_nand_init(int devnum, void __iomem *addr) .flash_bbt = 1, }; - nfc = calloc(1, sizeof(*nfc)); - if (!nfc) { - printf(KERN_ERR "%s: Memory exhausted!\n", __func__); - return -ENOMEM; - } - - chip = &nfc->chip; - nfc->regs = addr; - - mtd = nand_to_mtd(chip); nand_set_controller_data(chip, nfc); if (cfg.width == 16) @@ -777,20 +768,23 @@ static const struct udevice_id vf610_nfc_dt_ids[] = { static int vf610_nfc_dt_probe(struct udevice *dev) { struct resource res; + struct vf610_nfc *nfc = dev_get_priv(dev); int ret; ret = dev_read_resource(dev, 0, &res); if (ret) return ret; - return vf610_nfc_nand_init(0, devm_ioremap(dev, res.start, - resource_size(&res))); + nfc->regs = devm_ioremap(dev, res.start, resource_size(&res)); + nfc->dev = dev; + return vf610_nfc_nand_init(nfc, 0); } U_BOOT_DRIVER(vf610_nfc_dt) = { .name = "vf610-nfc-dt", .id = UCLASS_MTD, .of_match = vf610_nfc_dt_ids, + .priv_auto_alloc_size = sizeof(struct vf610_nfc), .probe = vf610_nfc_dt_probe, }; @@ -809,7 +803,17 @@ void board_nand_init(void) #else void board_nand_init(void) { - int err = vf610_nfc_nand_init(0, (void __iomem *)CONFIG_SYS_NAND_BASE); + int err; + struct vf610_nfc *nfc; + + nfc = calloc(1, sizeof(*nfc)); + if (!nfc) { + printf("%s: Out of memory\n", __func__); + return; + } + + nfc->regs = (void __iomem *)CONFIG_SYS_NAND_BASE; + err = vf610_nfc_nand_init(nfc, 0); if (err) printf("VF610 NAND init failed (err %d)\n", err); } From patchwork Tue Sep 15 14:44:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364420 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=FtlatBCJ; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrR2P5wQXz9sTN for ; Wed, 16 Sep 2020 00:49:17 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5D77C82392; Tue, 15 Sep 2020 16:46:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="FtlatBCJ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DBB2D8237C; Tue, 15 Sep 2020 16:45:57 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qt1-x841.google.com (mail-qt1-x841.google.com [IPv6:2607:f8b0:4864:20::841]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6E59C82366 for ; Tue, 15 Sep 2020 16:45:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qt1-x841.google.com with SMTP id h6so3335804qtd.6 for ; Tue, 15 Sep 2020 07:45:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mN1ba+MuDH8qgnWCWZe5GdNNLBQCdSAHwqYcMIxtnLU=; b=FtlatBCJxesMuDwxV6dYKv4dkiK92ttWul70ygtIp9u6vuCE+0lu4THnGPTo0oTTrt jX25sHZBnhakSiBei02uSKQAEjzOmVvaZ7nrKDAZZP1NDL1MBZfsW30FQcN5EXtuDZKC ehHPAZMVxgA9CoGX750e1u0Xv5eA85se8qTSwf3BJvLPGHm8WaeHf5szbg2UgRfvBaRX SYAk+OIE6+Z7ynWSkkkn305bBF04d/J1gUd9cywXsTZMB1fP/LpDHNB9sBHm5x8i387l rgR7sbePonxntRagEmTv8vvhrL3Zabf67a1b6I5C6c0bx8UoVI+WEUyvZayhOzk2DfSC ztWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mN1ba+MuDH8qgnWCWZe5GdNNLBQCdSAHwqYcMIxtnLU=; b=UYdB6AloUPrS6/tF3w+3DeGMd0SpwdwMVzT26Gmx0K//q54BNbBxDStV2XWHK+ZMaR l2FUIY/gPHm+jqhiiMBgsPSdnH+9DlwdgUDc1FgAheLJVhOveT72eqP5R46YbfAIcjJu 7WNQYnucjXQ+LpllTsf3XUNV0FJXXlsp2ZzqhTmgHkBHGHJJRjBWN9AIilHZaJwnnrc/ gLj7Qw9Q3ioaI5edgiuQU1eAr4elVDGyS0/Bv63hBLViUBrzaerlb20ajwJSGHJJvfGP uXrKd6yncO/Y6hgGQEh4q5bkOrOhaSzIp6QIzttggXQf65G2nRn2/NjKRuyp4bXVMpTu GXxQ== X-Gm-Message-State: AOAM530XYehbGrlcO3GeDU9T3nAlrI3L5NV7wbwx6w2Vl2oq5L0CHsnA LUJk7q8XsJMObIG6PI1iMZ1R4nkBOKRNwpWI X-Google-Smtp-Source: ABdhPJyndaMFIz9pkCsJ2fJwU0FyCmRa0mxpsJQGPIl8GTgjQai58+XiL03fJrt5yyzCK2+DMkJUkg== X-Received: by 2002:ac8:7082:: with SMTP id y2mr5954341qto.332.1600181154166; Tue, 15 Sep 2020 07:45:54 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.45.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:45:53 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Daniel Schwierzeck , Joe Hershberger , =?utf-8?q?=C3=81lvaro_Fern=C3=A1n?= =?utf-8?q?dez_Rojas?= Subject: [PATCH v2 16/46] net: bcm6368: Fix not calling dev_info with a device Date: Tue, 15 Sep 2020 10:44:52 -0400 Message-Id: <20200915144522.509493-17-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Remove the pdev indirection. Signed-off-by: Sean Anderson --- Changes in v2: - New drivers/net/bcm6368-eth.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/bcm6368-eth.c b/drivers/net/bcm6368-eth.c index 648fafd3e0..38a2a30fe6 100644 --- a/drivers/net/bcm6368-eth.c +++ b/drivers/net/bcm6368-eth.c @@ -249,8 +249,7 @@ static int bcm6368_eth_adjust_link(struct udevice *dev) /* link changed */ if (!up) { - dev_info(&priv->pdev->dev, "link DOWN on %s\n", - port->name); + dev_info(dev, "link DOWN on %s\n", port->name); writeb_be(ETH_PORTOV_ENABLE_MASK, priv->base + ETH_PORTOV_REG(i)); writeb_be(ETH_PTCTRL_RXDIS_MASK | From patchwork Tue Sep 15 14:44:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364421 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=ojgQKKLm; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrR2c69YHz9sTt for ; Wed, 16 Sep 2020 00:49:28 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 00D3A8239B; Tue, 15 Sep 2020 16:46:13 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="ojgQKKLm"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F028282383; Tue, 15 Sep 2020 16:45:58 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com [IPv6:2607:f8b0:4864:20::743]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 707788236F for ; Tue, 15 Sep 2020 16:45:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qk1-x743.google.com with SMTP id 16so4462211qkf.4 for ; Tue, 15 Sep 2020 07:45:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Fe1OSubMDxJkvjkZ6jflJbbELMggfATxnq9NnCqd/LU=; b=ojgQKKLm6odr7DtruLRyEcysVKLu2p2SU/fRT330CCuBEtyKhFgcwEFUiBaKuv2mOV E+5yPMjVXPjv2LwRXSoLkyPJ28vgkGfTkM38ahXqKx8vCXmH8jR3/f7Rp+bmaFZ6y9dL Fog4MUd2ntCG4t62kPFcirDEgyqn6axDJfwudUBTYha7Yj6NUFhk8Xj1+rg3/8M/BBK0 P3NlzEZLTxn2qZl6CT3YxmtJ/HxPGqqbgbG3XcHt5ssy9McIt6Qmnctkbk4f0UNNjKrm 9v5PKjb/Xlmo/0l9hA87AlMklweKRBIr6gUDX9oV4Gtz4xrAstWDD1mFY+5iA6SU737n CPlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Fe1OSubMDxJkvjkZ6jflJbbELMggfATxnq9NnCqd/LU=; b=oug+3iffFjJlRZtXrv03Kz8IRMjEnm+NWuibpEmFqQUjT+ZTM+kzqbTwhE0Cqa704T wF4GDK/NXNaPNoinVIP4CNQa1YOD7SO4/ktnV4MqvXVPPgceCQApRPzZjrlkkeTVWZsC p8PyNpm1iVsk0VMlsguPd1HIzgzr9NH4LiRrWcQHu7Y43fSBYbv1vSn8ao4HeEVOWEfG 87At2h7hVp++qUZTMPy84HZLFPBV08hAuowwkUvAxNK8+rD1l4upc0MiZTZtdIKL84Xo ImCZH/sejE7i6bnsNPhY1u7jgkv09M6EzJ5wbViePl9cUWYRY1MUk6ANLOCm2nfH2Ibp DnBQ== X-Gm-Message-State: AOAM5327esNJRD4zWfsiRSXavVljA3WIeFrvMYkBpDAZNdQKmneK9w4l heg8HEsOPenALwz1aZ5RRi5tlS+FnEZoK08h X-Google-Smtp-Source: ABdhPJzBt2IMZr7RkCWRIWUXJQNSAyJIhaQwHEuQN7PHrHy0IXU0n4MM0FT+7nq0NcUNg1nCovQ9kA== X-Received: by 2002:a37:a80e:: with SMTP id r14mr18854979qke.85.1600181155078; Tue, 15 Sep 2020 07:45:55 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.45.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:45:54 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Alex Marginean , Joe Hershberger Subject: [PATCH v2 17/46] net: mdio: Fix not calling dev_dbg with a device Date: Tue, 15 Sep 2020 10:44:53 -0400 Message-Id: <20200915144522.509493-18-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean The name of the device we are working on is `ethdev` and not just `dev`. Signed-off-by: Sean Anderson --- (no changes since v1) net/mdio-uclass.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/mdio-uclass.c b/net/mdio-uclass.c index 66ee2e1976..b5e8e46512 100644 --- a/net/mdio-uclass.c +++ b/net/mdio-uclass.c @@ -145,7 +145,7 @@ static struct phy_device *dm_eth_connect_phy_handle(struct udevice *ethdev, break; if (!ofnode_valid(phandle.node)) { - dev_dbg(dev, "can't find PHY node\n"); + dev_dbg(ethdev, "can't find PHY node\n"); return NULL; } @@ -161,7 +161,7 @@ static struct phy_device *dm_eth_connect_phy_handle(struct udevice *ethdev, if (uclass_get_device_by_ofnode(UCLASS_MDIO, ofnode_get_parent(phandle.node), &mdiodev)) { - dev_dbg(dev, "can't find MDIO bus for node %s\n", + dev_dbg(ethdev, "can't find MDIO bus for node %s\n", ofnode_get_name(ofnode_get_parent(phandle.node))); return NULL; } From patchwork Tue Sep 15 14:44:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364423 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=BkEfwT7c; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrR2s0T2pz9sTN for ; Wed, 16 Sep 2020 00:49:40 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1DCE4823AF; Tue, 15 Sep 2020 16:46:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="BkEfwT7c"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6DCDE8236D; Tue, 15 Sep 2020 16:46:00 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qv1-xf42.google.com (mail-qv1-xf42.google.com [IPv6:2607:f8b0:4864:20::f42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 658CC82377 for ; Tue, 15 Sep 2020 16:45:57 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qv1-xf42.google.com with SMTP id q10so1845387qvs.1 for ; Tue, 15 Sep 2020 07:45:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vNyPHUdj9u59Z4MJpkT1/8udcPGdPpZoFtryEdLLG8U=; b=BkEfwT7cix+9Q7MChHNRdeg32+POwKV4C4yf/MTobJKghXMwNko7VAuwIYKnzXEkgC CfccWTHh14vR6NVs1oOXBfQlAHFUDBFD7dcGdRBer/MoTltTzppzuiLO4TgW9wireBps PKdXePNu5c/u/ABI2oDvjQFDA9/l7vBL8QlWPk1rpFIhmK5tLr+MfR5nDZceHbhavB2l dn5NiGmJN0UORvwk7/WHNHNIAjgyYDrN7bKAxFJ/ZeygwYCgtyRe2VEjLDC5CVJgl+IL N9tsAHE7qZJulIjP9D62zCvcis6zu8MNkgRN5Twwkw9rXv1ZIj3Vdi9W/w2WSLTuM6+U A1OA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vNyPHUdj9u59Z4MJpkT1/8udcPGdPpZoFtryEdLLG8U=; b=HX/AC96PChDh/fksKfz/ahFyAx17uwbl4YPRIVccVBQzQT46l26gBS4Sg+6i/HAKr/ vqH3Qkj3BeeLnLaCds54tSD52xKsf/yeWVkxh9+DU42nxMYjQnplA2ryXWgMTT+rlKvM dFzB1Ah/0mQuCfkUX+3uqoC0a1TabyxZc7mA5625CV8J2S+tO7Ifn9PnH0mncqtziw/g 8AC0xr/n5m0SbOBjNKY/TUourYa5m7hBRtXSHVggWmtGIh4xFRoDY1YlUREN7OUFz4OU AcJIWB6FxA4Jlay0AKl2/Pg2mvrIjQO6INS2HnQe36MVsSrIL56Ftfoezbg6NCtBJ6Ez ayfg== X-Gm-Message-State: AOAM531o/Nwn/UUY092ItLiMWiuHKeKxmKl5LioDvm0PwKLuplUmh94U Q0AWXePZHTh9bDOk98B8FCzRkaqcyLefKlfS X-Google-Smtp-Source: ABdhPJxgoWGB/8y0l40oh759mrOT6ujJfBBPnh4tARqbGogfIo4WFA261xbrLjwaqHtE73aflAEn4w== X-Received: by 2002:a0c:a945:: with SMTP id z5mr2018312qva.55.1600181156217; Tue, 15 Sep 2020 07:45:56 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.45.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:45:55 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Joe Hershberger , Simon Glass , Stefan Roese Subject: [PATCH v2 18/46] net: mvneta: Fix not always calling dev_err with a device Date: Tue, 15 Sep 2020 10:44:54 -0400 Message-Id: <20200915144522.509493-19-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean No need for indirection here. Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- Changes in v2: - New drivers/net/mvneta.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/mvneta.c b/drivers/net/mvneta.c index 4c7d06ca40..2c93fe42f7 100644 --- a/drivers/net/mvneta.c +++ b/drivers/net/mvneta.c @@ -1402,7 +1402,7 @@ static int mvneta_init(struct udevice *dev) err = mvneta_init2(pp); if (err < 0) { - dev_err(&pdev->dev, "can't init eth hal\n"); + dev_err(dev, "can't init eth hal\n"); return err; } @@ -1410,7 +1410,7 @@ static int mvneta_init(struct udevice *dev) err = mvneta_port_power_up(pp, pp->phy_interface); if (err < 0) { - dev_err(&pdev->dev, "can't power up port\n"); + dev_err(dev, "can't power up port\n"); return err; } From patchwork Tue Sep 15 14:44:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364424 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=Ha2Fboca; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrR350RTpz9sVD for ; Wed, 16 Sep 2020 00:49:52 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 64089823B5; Tue, 15 Sep 2020 16:46:15 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Ha2Fboca"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C081982376; Tue, 15 Sep 2020 16:46:01 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qt1-x841.google.com (mail-qt1-x841.google.com [IPv6:2607:f8b0:4864:20::841]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A801E8237E for ; Tue, 15 Sep 2020 16:45:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qt1-x841.google.com with SMTP id e7so3298163qtj.11 for ; Tue, 15 Sep 2020 07:45:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wAUhA546FGtY3CkighBnPUXN6HYxMuekzca/KbZO0Mk=; b=Ha2FbocaxTWNcGUbBHeXJgBFKJxL0YvJtTI0IBaaLdUXXAg+jqs/3ttt/1dRO/0wbJ 4gBxrLxfVZks3DANhWEpcSTkdXviZyYdZP6lBXokd0jSKQpx3v6rZXuYJ0vllRKppyUM FXPdV48cWXnIQP50jv+VRe3QE0VkDWYGp2fCf+2faFSF9/tkbVY/toyEYl9NtVdatoxY yyW7ahv4Gzh19eQPX9AwDpAgfrfnPC+Thlyj3IcKE2uyEKpAbUSr/PgfK4toqwslL592 jxpqp1dadCwd+vTchA7lkreKR12GxgW5tgg1mNxLJ1lAb+nC4w45mrTDK7lYm6EHobtA OiWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wAUhA546FGtY3CkighBnPUXN6HYxMuekzca/KbZO0Mk=; b=kYIyx0TPiG6TvCLUgwOf0dP72oNTYJ4Bpg2jUIirm/+MoCa0PQfrVw/tzSElHflzwR MRv3FRNIsiNIf6dLvnQ7hacAq/zwN0mRFcdhEeP6zEpeT0MBmY+M/2t49e5FheKo8AoK ucWBhTWcmnr3IdQ1V4ddWfWZTNunepjxxj2xOwPNG5JGtoA3RzuR51Xic9JWxBuhuWLC EU5IrPecAtY5BVVfTDLs2T3YhkQtPAHcCx59j65+lSLx5TkNwaVX0KBl+SrmCJhrq51b H/Sx7WMyJJ4bJBG2jzKkC71F8Q4c2FaC4tfly0wHgZCP8r8zAbFD5x446H3IAyMmL/Gz ZAvQ== X-Gm-Message-State: AOAM53189H76H+1/KVi4cK+9Pr21d47PZ+GZWq2pjUTmtDg/nvtvHGbN YV5zIZGJqinIYlS6gz+ojd8PWadYNNBjtYLA X-Google-Smtp-Source: ABdhPJyVUEprSR/Mg4Hg7EHq8rrJ+PzbGssT56BAm45EOfsD0gE2uKz47HGaMf/HPQu5uVoNMEHmUA== X-Received: by 2002:ac8:7b2c:: with SMTP id l12mr17989965qtu.98.1600181157350; Tue, 15 Sep 2020 07:45:57 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.45.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:45:56 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Joe Hershberger , Simon Glass , Stefan Roese Subject: [PATCH v2 19/46] net: mvneta: Convert netdev_xxx to dev_xxx Date: Tue, 15 Sep 2020 10:44:55 -0400 Message-Id: <20200915144522.509493-20-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean netdev_xxx evaluates to printf in U-Boot, so there is no extra info printed. mvneta is one of two drivers which use these functions in U-Boot. Convert these functions to dev_xxx where possible (and to log_xxx where not). Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- Changes in v2: - New drivers/net/mvneta.c | 52 ++++++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 24 deletions(-) diff --git a/drivers/net/mvneta.c b/drivers/net/mvneta.c index 2c93fe42f7..83f99e5d8a 100644 --- a/drivers/net/mvneta.c +++ b/drivers/net/mvneta.c @@ -625,9 +625,9 @@ static void mvneta_port_down(struct mvneta_port *pp) count = 0; do { if (count++ >= MVNETA_RX_DISABLE_TIMEOUT_MSEC) { - netdev_warn(pp->dev, - "TIMEOUT for RX stopped ! rx_queue_cmd: 0x08%x\n", - val); + dev_warn(pp->phydev->dev, + "TIMEOUT for RX stopped ! rx_queue_cmd: 0x08%x\n", + val); break; } mdelay(1); @@ -648,9 +648,9 @@ static void mvneta_port_down(struct mvneta_port *pp) count = 0; do { if (count++ >= MVNETA_TX_DISABLE_TIMEOUT_MSEC) { - netdev_warn(pp->dev, - "TIMEOUT for TX stopped status=0x%08x\n", - val); + dev_warn(pp->phydev->dev, + "TIMEOUT for TX stopped status=0x%08x\n", + val); break; } mdelay(1); @@ -664,9 +664,9 @@ static void mvneta_port_down(struct mvneta_port *pp) count = 0; do { if (count++ >= MVNETA_TX_FIFO_EMPTY_TIMEOUT) { - netdev_warn(pp->dev, - "TX FIFO empty timeout status=0x08%x\n", - val); + dev_warn(pp->phydev->dev, + "TX FIFO empty timeout status=0x08%x\n", + val); break; } mdelay(1); @@ -949,28 +949,32 @@ static void mvneta_rx_error(struct mvneta_port *pp, u32 status = rx_desc->status; if (!mvneta_rxq_desc_is_first_last(status)) { - netdev_err(pp->dev, - "bad rx status %08x (buffer oversize), size=%d\n", - status, rx_desc->data_size); + dev_err(pp->phydev->dev, + "bad rx status %08x (buffer oversize), size=%d\n", + status, rx_desc->data_size); return; } switch (status & MVNETA_RXD_ERR_CODE_MASK) { case MVNETA_RXD_ERR_CRC: - netdev_err(pp->dev, "bad rx status %08x (crc error), size=%d\n", - status, rx_desc->data_size); + dev_err(pp->phydev->dev, + "bad rx status %08x (crc error), size=%d\n", status, + rx_desc->data_size); break; case MVNETA_RXD_ERR_OVERRUN: - netdev_err(pp->dev, "bad rx status %08x (overrun error), size=%d\n", - status, rx_desc->data_size); + dev_err(pp->phydev->dev, + "bad rx status %08x (overrun error), size=%d\n", status, + rx_desc->data_size); break; case MVNETA_RXD_ERR_LEN: - netdev_err(pp->dev, "bad rx status %08x (max frame length error), size=%d\n", - status, rx_desc->data_size); + dev_err(pp->phydev->dev, + "bad rx status %08x (max frame length error), size=%d\n", + status, rx_desc->data_size); break; case MVNETA_RXD_ERR_RESOURCE: - netdev_err(pp->dev, "bad rx status %08x (resource error), size=%d\n", - status, rx_desc->data_size); + dev_err(pp->phydev->dev, + "bad rx status %08x (resource error), size=%d\n", + status, rx_desc->data_size); break; } } @@ -1127,8 +1131,8 @@ static int mvneta_setup_rxqs(struct mvneta_port *pp) for (queue = 0; queue < rxq_number; queue++) { int err = mvneta_rxq_init(pp, &pp->rxqs[queue]); if (err) { - netdev_err(pp->dev, "%s: can't create rxq=%d\n", - __func__, queue); + dev_err(pp->phydev->dev, "%s: can't create rxq=%d\n", + __func__, queue); mvneta_cleanup_rxqs(pp); return err; } @@ -1145,8 +1149,8 @@ static int mvneta_setup_txqs(struct mvneta_port *pp) for (queue = 0; queue < txq_number; queue++) { int err = mvneta_txq_init(pp, &pp->txqs[queue]); if (err) { - netdev_err(pp->dev, "%s: can't create txq=%d\n", - __func__, queue); + dev_err(pp->phydev->dev, "%s: can't create txq=%d\n", + __func__, queue); mvneta_cleanup_txqs(pp); return err; } From patchwork Tue Sep 15 14:44:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364425 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=kSc7iZ9D; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrR3J2bVSz9sTN for ; Wed, 16 Sep 2020 00:50:03 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CB912823BF; Tue, 15 Sep 2020 16:46:16 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="kSc7iZ9D"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A233D82384; Tue, 15 Sep 2020 16:46:02 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qk1-x744.google.com (mail-qk1-x744.google.com [IPv6:2607:f8b0:4864:20::744]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B567C82383 for ; Tue, 15 Sep 2020 16:45:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qk1-x744.google.com with SMTP id q5so4486218qkc.2 for ; Tue, 15 Sep 2020 07:45:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4XTQgEIaLDVSwfq8QjH+sxWuZe/7mCupL9sxzJXl9g8=; b=kSc7iZ9D5SFH1Dnys7XCEDbEAnLcFUM6y7a0hDgovy7WaS4CnUI90s60Lb2JTroio2 iUsQX5qRrE3lMAzzgD8YscC8p0ayl0MhhjEbg6fofvFXpeDwkHeOx9g5fG+TFJZHoxPT nI9kZ+OClLu+m0hO03BxBHgV1RkRyX2c0UFQGbSvh33BfrGhOUo4MaU7sHTjley1zgLN CzTF++HAqHd/Uhb3ReUG9MS4RWKXXuIGa42kXeNTZWIa4VjDSO38sCDacFZl9yXSuS7i eMFkOVfIkM6MnGkanE5/1xQZv/GnHxFK7ZONIHON21VxMTWGG7znPtWNnAn9ApQ5z4UX knjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4XTQgEIaLDVSwfq8QjH+sxWuZe/7mCupL9sxzJXl9g8=; b=rbEkAB2vlTib8YPCly2KLH2I6JCfXN69VchluRnASwRh3vAJocsL0CziaOC9y0xULW V6NaMwSoHTV9U6Q+IL3cQMYYvKLolQUlTqaznIBwnVQ0gr4oYHC5NDZUEcvRDr5VxyXF Jhn6JzyqxS/8aCoVVqk+A+E5PyJlV0bpFKZC7HgtAWAqxRcifMvU6dw8XsYPsCHMq1zx WIupGU7gzbxWfHTxxPx6xuv25FrGs21zRIhOfFANmE2rb4UD+1OSGY5OWkhmXn4xHo/f AMOjeRaXHOp5gSlD3V3zKomqViEHgLkvT76XZXPPV40A8Ln9WuT1rQV7nmx/9y87c/Hu idEg== X-Gm-Message-State: AOAM530k/Jq+/SkcHFanLT6U1gaIylt1bZpYoUEzgNdW+U8Qg8d6EqMF jveYJMaghtp+XU0Q+Vu4uWaBKd0+WCW8BnQI X-Google-Smtp-Source: ABdhPJy7Cg6V2cHstIwPxI2YCZai6kejxf0x3V9rrUJ1SIQUnfpass7bwL/pTUKfGYD9sH2eU+CNIQ== X-Received: by 2002:a05:620a:4fb:: with SMTP id b27mr18816878qkh.120.1600181158355; Tue, 15 Sep 2020 07:45:58 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.45.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:45:57 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Igal Liberman , Joe Hershberger , Simon Glass , Stefan Roese Subject: [PATCH v2 20/46] net: mvpp2: Fix not calling dev_xxx with a device Date: Tue, 15 Sep 2020 10:44:56 -0400 Message-Id: <20200915144522.509493-21-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Remove some prefixes, or get the device from the phy. Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- Changes in v2: - New drivers/net/mvpp2.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c index a5747a25ab..6f3ee235d1 100644 --- a/drivers/net/mvpp2.c +++ b/drivers/net/mvpp2.c @@ -2568,7 +2568,7 @@ static int mvpp2_bm_pool_create(struct udevice *dev, if (!IS_ALIGNED((unsigned long)bm_pool->virt_addr, MVPP2_BM_POOL_PTR_ALIGN)) { - dev_err(&pdev->dev, "BM pool %d is not %d bytes aligned\n", + dev_err(dev, "BM pool %d is not %d bytes aligned\n", bm_pool->id, MVPP2_BM_POOL_PTR_ALIGN); return -ENOMEM; } @@ -2659,7 +2659,7 @@ static int mvpp2_bm_pools_init(struct udevice *dev, return 0; err_unroll_pools: - dev_err(&pdev->dev, "failed to create BM pool %d, size %d\n", i, size); + dev_err(dev, "failed to create BM pool %d, size %d\n", i, size); for (i = i - 1; i >= 0; i--) mvpp2_bm_pool_destroy(dev, priv, &priv->bm_pools[i]); return err; @@ -2834,8 +2834,9 @@ mvpp2_bm_pool_use(struct mvpp2_port *port, int pool, enum mvpp2_bm_type type, /* Allocate buffers for this pool */ num = mvpp2_bm_bufs_add(port, new_pool, pkts_num); if (num != pkts_num) { - dev_err(dev, "pool %d: %d of %d allocated\n", - new_pool->id, num, pkts_num); + dev_err(port->phy_dev->dev, + "pool %d: %d of %d allocated\n", new_pool->id, + num, pkts_num); return NULL; } } @@ -4725,7 +4726,7 @@ static int phy_info_parse(struct udevice *dev, struct mvpp2_port *port) int parent; phyaddr = fdtdec_get_int(gd->fdt_blob, phy_node, "reg", 0); if (phyaddr < 0) { - dev_err(&pdev->dev, "could not find phy address\n"); + dev_err(dev, "could not find phy address\n"); return -1; } parent = fdt_parent_offset(gd->fdt_blob, phy_node); @@ -4742,13 +4743,13 @@ static int phy_info_parse(struct udevice *dev, struct mvpp2_port *port) if (phy_mode_str) phy_mode = phy_get_interface_by_name(phy_mode_str); if (phy_mode == -1) { - dev_err(&pdev->dev, "incorrect phy mode\n"); + dev_err(dev, "incorrect phy mode\n"); return -EINVAL; } id = fdtdec_get_int(gd->fdt_blob, port_node, "port-id", -1); if (id == -1) { - dev_err(&pdev->dev, "missing port-id value\n"); + dev_err(dev, "missing port-id value\n"); return -EINVAL; } @@ -4807,7 +4808,7 @@ static int mvpp2_port_probe(struct udevice *dev, err = mvpp2_port_init(dev, port); if (err < 0) { - dev_err(&pdev->dev, "failed to init port %d\n", port->id); + dev_err(dev, "failed to init port %d\n", port->id); return err; } mvpp2_port_power_up(port); @@ -4978,7 +4979,7 @@ static int mvpp2_init(struct udevice *dev, struct mvpp2 *priv) /* Checks for hardware constraints (U-Boot uses only one rxq) */ if ((rxq_number > priv->max_port_rxqs) || (txq_number > MVPP2_MAX_TXQ)) { - dev_err(&pdev->dev, "invalid queue size parameter\n"); + dev_err(dev, "invalid queue size parameter\n"); return -EINVAL; } @@ -5345,7 +5346,7 @@ static int mvpp2_probe(struct udevice *dev) port->gop_id = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev), "gop-port-id", -1); if (port->id == -1) { - dev_err(&pdev->dev, "missing gop-port-id value\n"); + dev_err(dev, "missing gop-port-id value\n"); return -EINVAL; } @@ -5364,7 +5365,7 @@ static int mvpp2_probe(struct udevice *dev) /* Initialize network controller */ err = mvpp2_init(dev, priv); if (err < 0) { - dev_err(&pdev->dev, "failed to initialize controller\n"); + dev_err(dev, "failed to initialize controller\n"); return err; } priv->num_ports = 0; From patchwork Tue Sep 15 14:44:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364426 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=BaETfpB+; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrR3X4w7Hz9sTt for ; Wed, 16 Sep 2020 00:50:16 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BCEE0823C5; Tue, 15 Sep 2020 16:46:17 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="BaETfpB+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D4CFA8237E; Tue, 15 Sep 2020 16:46:03 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id BEACE8235F for ; Tue, 15 Sep 2020 16:46:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qk1-x741.google.com with SMTP id n133so4418162qkn.11 for ; Tue, 15 Sep 2020 07:46:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7t80Zgdo3XMHz9Y2ZXqHLt7je+MJfMvntj+B7fPuIhY=; b=BaETfpB+SIUFqM0hS6OkSwdc0HUDLbLjUUqbiPKTt5j0NWErp/ODUgge+vPsCca/OZ DE+7Reuv8ijIi5nTj4JsrgfIbf0zuqa8ulNtX2a1m6ZE8zODPJ65TvK9uHjegCnXuKy2 RIROU8Nhw04eYFtDeUyV+sGXdKsICM/1vfgjQrcCuMS5ENGCU/RF7VxrL+aBmocfmaq+ hxE4X2KlZvzCDvG2qtjMqznPHtc4zTiuaCjPcrybR3bT3n6E7VDxLUf4OebiiyiZNwfm ShdtjPtkBEKOJSB2zX5xDmFtFWGZspwUe0AEtJ51XSUshzLCRzQZ0NiK8g69l5MVxHev 9NuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7t80Zgdo3XMHz9Y2ZXqHLt7je+MJfMvntj+B7fPuIhY=; b=f90GZ0KKL6WkX+BUpWN0OxAY6XmnNW3AyxjeJUAZ0YgWQ69RkjS+hDq8aPd+QYzpCP 3/BPLkZyqHpH+uJZsvAtWTaQU6/osnCch2XLw4BKuRfZFZm0DmnGWavvqP7tIjI4/RdD iXwKcWpFaUkWb1sk6F1JPZqXEV6K6NoBD8yUGSlrvFLy0ekKN1o1AMRCwNo+r7nouexB 9u2D9wFd5PKvz+QLsyfakg6QhuW5HXvUcpP5dA4eAS8srG1TiFcwy4854hFUbVVSSsxs vMeUuPzRn/1x9266sQxkhaaBd27k4S1wmQekI2xjV+Z0Zmo7QoA0y2rN5BMLOfIxUCu1 +cvg== X-Gm-Message-State: AOAM533//uplK+cXvoiaFXblGD9zTFp4qDP2EGo8yAE4T72UwdVZU0vR 9Of1T3e1+Tnymld1GOKMD2acl0ZTsVFoEbn7 X-Google-Smtp-Source: ABdhPJxqrHHSuESJuJbbqEBnbRXGK0H8LvN2CXRn/hfT2MaIWJ7lUk6neoQlVBmtDIdzotO+HkWT3Q== X-Received: by 2002:a37:a514:: with SMTP id o20mr17068198qke.374.1600181159405; Tue, 15 Sep 2020 07:45:59 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.45.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:45:58 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Igal Liberman , Joe Hershberger , Simon Glass , Stefan Roese Subject: [PATCH v2 21/46] net: mvpp2: Convert netdev_xxx to dev_xxx Date: Tue, 15 Sep 2020 10:44:57 -0400 Message-Id: <20200915144522.509493-22-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean netdev_xxx evaluates to printf in U-Boot, so there is no extra info printed. mvpp2 one of only two drivers which use these functions in U-Boot. Convert these functions to dev_xxx where possible (and to log_xxx where not). Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- Changes in v2: - New drivers/net/mvpp2.c | 64 +++++++++++++++++++++++---------------------- 1 file changed, 33 insertions(+), 31 deletions(-) diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c index 6f3ee235d1..8f790a8b44 100644 --- a/drivers/net/mvpp2.c +++ b/drivers/net/mvpp2.c @@ -2773,9 +2773,9 @@ static int mvpp2_bm_bufs_add(struct mvpp2_port *port, if (buf_num < 0 || (buf_num + bm_pool->buf_num > bm_pool->size)) { - netdev_err(port->dev, - "cannot allocate %d buffers for pool %d\n", - buf_num, bm_pool->id); + dev_err(port->phy_dev->dev, + "cannot allocate %d buffers for pool %d\n", buf_num, + bm_pool->id); return 0; } @@ -2803,7 +2803,7 @@ mvpp2_bm_pool_use(struct mvpp2_port *port, int pool, enum mvpp2_bm_type type, int num; if (new_pool->type != MVPP2_BM_FREE && new_pool->type != type) { - netdev_err(port->dev, "mixing pool types is forbidden\n"); + dev_err(port->phy_dev->dev, "mixing pool types is forbidden\n"); return NULL; } @@ -3345,8 +3345,7 @@ static int gop_port_init(struct mvpp2_port *port) int num_of_act_lanes; if (mac_num >= MVPP22_GOP_MAC_NUM) { - netdev_err(NULL, "%s: illegal port number %d", __func__, - mac_num); + log_err("illegal port number %d", mac_num); return -1; } @@ -3400,8 +3399,8 @@ static int gop_port_init(struct mvpp2_port *port) break; default: - netdev_err(NULL, "%s: Requested port mode (%d) not supported\n", - __func__, port->phy_interface); + log_err("Requested port mode (%d) not supported\n", + port->phy_interface); return -1; } @@ -3441,8 +3440,8 @@ static void gop_port_enable(struct mvpp2_port *port, int enable) break; default: - netdev_err(NULL, "%s: Wrong port mode (%d)\n", __func__, - port->phy_interface); + log_err("%s: Wrong port mode (%d)\n", __func__, + port->phy_interface); return; } } @@ -3812,9 +3811,9 @@ static void mvpp2_egress_disable(struct mvpp2_port *port) delay = 0; do { if (delay >= MVPP2_TX_DISABLE_TIMEOUT_MSEC) { - netdev_warn(port->dev, - "Tx stop timed out, status=0x%08x\n", - reg_data); + dev_warn(port->phy_dev->dev, + "Tx stop timed out, status=0x%08x\n", + reg_data); break; } mdelay(1); @@ -4262,9 +4261,9 @@ static void mvpp2_txq_clean(struct mvpp2_port *port, struct mvpp2_tx_queue *txq) delay = 0; do { if (delay >= MVPP2_TX_PENDING_TIMEOUT_MSEC) { - netdev_warn(port->dev, - "port %d: cleaning queue %d timed out\n", - port->id, txq->log_id); + dev_warn(port->phy_dev->dev, + "port %d: cleaning queue %d timed out\n", + port->id, txq->log_id); break; } mdelay(1); @@ -4431,16 +4430,19 @@ static void mvpp2_rx_error(struct mvpp2_port *port, switch (status & MVPP2_RXD_ERR_CODE_MASK) { case MVPP2_RXD_ERR_CRC: - netdev_err(port->dev, "bad rx status %08x (crc error), size=%zu\n", - status, sz); + dev_err(port->phy_dev->dev, + "bad rx status %08x (crc error), size=%zu\n", status, + sz); break; case MVPP2_RXD_ERR_OVERRUN: - netdev_err(port->dev, "bad rx status %08x (overrun error), size=%zu\n", - status, sz); + dev_err(port->phy_dev->dev, + "bad rx status %08x (overrun error), size=%zu\n", + status, sz); break; case MVPP2_RXD_ERR_RESOURCE: - netdev_err(port->dev, "bad rx status %08x (resource error), size=%zu\n", - status, sz); + dev_err(port->phy_dev->dev, + "bad rx status %08x (resource error), size=%zu\n", + status, sz); break; } } @@ -4508,8 +4510,8 @@ static void mvpp2_phy_connect(struct udevice *dev, struct mvpp2_port *port) */ if (phy_dev && phy_dev->drv->uid == 0xffffffff) {/* Generic phy */ - netdev_warn(port->dev, - "Marking phy as invalid, link will not be checked\n"); + dev_warn(port->phy_dev->dev, + "Marking phy as invalid, link will not be checked\n"); /* set phy_addr to invalid value */ port->phyaddr = PHY_MAX_ADDR; mvpp2_egress_enable(port); @@ -4520,7 +4522,7 @@ static void mvpp2_phy_connect(struct udevice *dev, struct mvpp2_port *port) port->phy_dev = phy_dev; if (!phy_dev) { - netdev_err(port->dev, "cannot connect to phy\n"); + dev_err(port->phy_dev->dev, "cannot connect to phy\n"); return; } phy_dev->supported &= PHY_GBIT_FEATURES; @@ -4551,31 +4553,31 @@ static int mvpp2_open(struct udevice *dev, struct mvpp2_port *port) err = mvpp2_prs_mac_da_accept(port->priv, port->id, mac_bcast, true); if (err) { - netdev_err(dev, "mvpp2_prs_mac_da_accept BC failed\n"); + dev_err(dev, "mvpp2_prs_mac_da_accept BC failed\n"); return err; } err = mvpp2_prs_mac_da_accept(port->priv, port->id, port->dev_addr, true); if (err) { - netdev_err(dev, "mvpp2_prs_mac_da_accept MC failed\n"); + dev_err(dev, "mvpp2_prs_mac_da_accept MC failed\n"); return err; } err = mvpp2_prs_def_flow(port); if (err) { - netdev_err(dev, "mvpp2_prs_def_flow failed\n"); + dev_err(dev, "mvpp2_prs_def_flow failed\n"); return err; } /* Allocate the Rx/Tx queues */ err = mvpp2_setup_rxqs(port); if (err) { - netdev_err(port->dev, "cannot allocate Rx queues\n"); + dev_err(port->phy_dev->dev, "cannot allocate Rx queues\n"); return err; } err = mvpp2_setup_txqs(port); if (err) { - netdev_err(port->dev, "cannot allocate Tx queues\n"); + dev_err(port->phy_dev->dev, "cannot allocate Tx queues\n"); return err; } @@ -5100,7 +5102,7 @@ static int mvpp2_recv(struct udevice *dev, int flags, uchar **packetp) err = mvpp2_rx_refill(port, bm_pool, bm, dma_addr); if (err) { - netdev_err(port->dev, "failed to refill BM pools\n"); + dev_err(port->phy_dev->dev, "failed to refill BM pools\n"); return 0; } From patchwork Tue Sep 15 14:44:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364428 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=vgEi2+Xf; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrR3n4qdhz9sTt for ; Wed, 16 Sep 2020 00:50:29 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 23AE2823D0; Tue, 15 Sep 2020 16:46:25 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="vgEi2+Xf"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3D7128237E; Tue, 15 Sep 2020 16:46:05 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qv1-xf43.google.com (mail-qv1-xf43.google.com [IPv6:2607:f8b0:4864:20::f43]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 7EC9A82376 for ; Tue, 15 Sep 2020 16:46:02 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qv1-xf43.google.com with SMTP id ef16so1820931qvb.8 for ; Tue, 15 Sep 2020 07:46:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Bdoz8zif/lAgWWRyINTpl7RdW2INlXY8zm+laeb6MDw=; b=vgEi2+Xf9IWYjw9Ft0NIuSIhjA4mrsqrP6TWcVx2gSKMwdkolu77JeTmoULfCTIYwq NJVL2wTwam55hnv0M2aeYO84uk0pMERcgh8UTdBfro6Uc4mHVGXq+pFOWCX+6oLZjcSn LRVnr9yZ7r6afgsnDFhg6J7MmI9gMZU4lgrekPDv3x/j2cndvmbNZoahY0En5hteVbB3 YWasDWzOY1jCJWG03ASUzatOxifrvMafsNZggmU2H4VvdDuJ8LoAPqtQ7LnzmM0VERGy EfsZ5oQ0cmdqTig1zwplzHXcUTmMaLCW9MOqHPeUj8jiUolVaXQrGtRjyzdarIxZG3Sr bxMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Bdoz8zif/lAgWWRyINTpl7RdW2INlXY8zm+laeb6MDw=; b=Hjsbt4TCcLCjLMOlNcYHitopPcCGdqLiClEY+4U2y3uIn02+/8q0mz3C17fuiyJNRp ViOJjAwIpBW9fDaFjaiWEos8tt7gzAN48VybhuxSygX6OU2yuuERMM1+nw0FTFiOnNfV mzBkvgTqvtcX64PDcXhDQ7XPAmQO49DLx18guf1EzY2mrW34nkSlVeIDLJZ1hLe1aZYA 6CXNs7jwoHjn+ch/IXzXkMYm/JZSp6PbLQzOYjnfXklZlGpXoqp7dWWjbhW8u4G1/wZi MCsV6ZPFT47YUSNkecCAvYJy/Z0jvrkQ+PKufq4TSACuEHfRbsxz9c1kQ3M+ul62sNkV verQ== X-Gm-Message-State: AOAM532smxmrsBHEPYn0MNrdZ3yJX0i4Mx4xNYMn8cvQsvWOQ2Z6t9YM BFhL7zeVmXcRYg2pZylEjyWmZ8KI29hLAB93 X-Google-Smtp-Source: ABdhPJx4/VMT/+Wt4ZbBlIIk1uw5K7uNDGASPa46rkjdVVYTBB/mwl8weAmSy0AxtPfcZhhNaZ/uHA== X-Received: by 2002:a05:6214:929:: with SMTP id dk9mr2059637qvb.60.1600181161016; Tue, 15 Sep 2020 07:46:01 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.45.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:45:59 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Joe Hershberger , Simon Glass , Tom Rini Subject: [PATCH v2 22/46] linux/compat.h: Remove netdev_xxx functions Date: Tue, 15 Sep 2020 10:44:58 -0400 Message-Id: <20200915144522.509493-23-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean No drivers in U-Boot use these functions. Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- Changes in v2: - New include/linux/compat.h | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/include/linux/compat.h b/include/linux/compat.h index 363b2b9425..d129780312 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h @@ -52,25 +52,6 @@ extern struct p_current *current; #define dev_warn(dev, fmt, args...) \ printf(fmt, ##args) -#define netdev_emerg(dev, fmt, args...) \ - printf(fmt, ##args) -#define netdev_alert(dev, fmt, args...) \ - printf(fmt, ##args) -#define netdev_crit(dev, fmt, args...) \ - printf(fmt, ##args) -#define netdev_err(dev, fmt, args...) \ - printf(fmt, ##args) -#define netdev_warn(dev, fmt, args...) \ - printf(fmt, ##args) -#define netdev_notice(dev, fmt, args...) \ - printf(fmt, ##args) -#define netdev_info(dev, fmt, args...) \ - printf(fmt, ##args) -#define netdev_dbg(dev, fmt, args...) \ - debug(fmt, ##args) -#define netdev_vdbg(dev, fmt, args...) \ - debug(fmt, ##args) - #define GFP_ATOMIC ((gfp_t) 0) #define GFP_KERNEL ((gfp_t) 0) #define GFP_NOFS ((gfp_t) 0) From patchwork Tue Sep 15 14:44:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364429 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=Jn35QKiC; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrR420Lhzz9sTt for ; Wed, 16 Sep 2020 00:50:41 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4FD27823D1; Tue, 15 Sep 2020 16:46:26 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Jn35QKiC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0E43982386; Tue, 15 Sep 2020 16:46:06 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qv1-xf42.google.com (mail-qv1-xf42.google.com [IPv6:2607:f8b0:4864:20::f42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 82D4382377 for ; Tue, 15 Sep 2020 16:46:03 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qv1-xf42.google.com with SMTP id p15so1825726qvk.5 for ; Tue, 15 Sep 2020 07:46:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uybhdRKw4Kff4WjOAkS1+2WUkNceA9FdHiBAbjgc+K8=; b=Jn35QKiCna+XGcqWDm1XcYj5gvEzeMDdcH2NbrdpJld7cyOHwVCi6OoSjGZ1XRtPAJ QiZdtktmozs11q3oLO1w4Yw1yGiE47AE3G3S7XWNKU7WyloYlag9wz67BcoBbslY33cF 7zutVToHI8+fLbVw+fe3tBZpywGmLjAz2ZFp9CyLHr2Mj0a0zCcELRfq7+JN/CPkq081 ++LmT23hFuhGb6mfNW4LKng6+KT1uBsxZ5et9Q1fSSuyZ/+zZz7cfTOUeAYKHFRdVTmd Px3DneUo+7CgE/cfibSjtglnUiwRvDcQHDDfe0nfAo0uq5Wg1G8pf36OU+JAZ8ejgJWW PFAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uybhdRKw4Kff4WjOAkS1+2WUkNceA9FdHiBAbjgc+K8=; b=mvdLomzVOgvS3gA9Q54B/wws0fxnCXuo3sqp+mTZHXyog+IHoTKmbujRugXt5dIS/O 1eO6kSleInXd7EAOm+ORAK7433WqSPfF++wbeshlx7/hKOWcB/C6ueoIxdp1nankpecG yjZcRX3cuZ9yc1G0zfD2DuU2rdwwIfyZ9BAUTPBmh+HD5qeg4gEZ/hRVsmUxVemIkoch 9H5fYrc3J0AAHhQ5HoXhW4aMSw9ITLV7j/CMIQvGlLHzjQ2tfdc0im3rhErwKSzZ0dQZ Vhd4QCpnZIaUWr7ytZvDc5dHrPEW/cnCMrctu9Ny60aSIwda5/ZdjoQthiSRDgmgZ+zt aEiQ== X-Gm-Message-State: AOAM5315U7QaW3YCyEkXiRoxW8PILq54fWa6Pc9mPASoSTG22wn+xtt6 wJSDOlU7HJAaWn8hLF1gbloQDIS6hN2vbFD3 X-Google-Smtp-Source: ABdhPJwYXkZ44peoAcstuX/qz0hxsaOMSXu8pcQvagVY5GcR3OrfWvYNsytVF0uNgfs56cTNUlS+aQ== X-Received: by 2002:a0c:eda3:: with SMTP id h3mr1978309qvr.61.1600181162250; Tue, 15 Sep 2020 07:46:02 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.46.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:46:01 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Jagan Teki , Joe Hershberger , Simon Glass Subject: [PATCH v2 23/46] net: sunxi: Fix not calling dev_xxx with a device Date: Tue, 15 Sep 2020 10:44:59 -0400 Message-Id: <20200915144522.509493-24-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean There's no dev to log with, so pass the device along with the priv data. Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- Changes in v2: - New drivers/net/sunxi_emac.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/sunxi_emac.c b/drivers/net/sunxi_emac.c index df18ecc064..8e66ce2461 100644 --- a/drivers/net/sunxi_emac.c +++ b/drivers/net/sunxi_emac.c @@ -505,7 +505,8 @@ static int _sunxi_emac_eth_send(struct emac_eth_dev *priv, void *packet, return 0; } -static int sunxi_emac_board_setup(struct emac_eth_dev *priv) +static int sunxi_emac_board_setup(struct udevice *dev, + struct emac_eth_dev *priv) { struct sunxi_sramc_regs *sram = (struct sunxi_sramc_regs *)SUNXI_SRAMC_BASE; @@ -576,7 +577,7 @@ static int sunxi_emac_eth_probe(struct udevice *dev) return ret; } - ret = sunxi_emac_board_setup(priv); + ret = sunxi_emac_board_setup(dev, priv); if (ret) return ret; From patchwork Tue Sep 15 14:45:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364430 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=GTKoCOn9; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrR4F4pTbz9sVT for ; Wed, 16 Sep 2020 00:50:53 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6B2A5823DC; Tue, 15 Sep 2020 16:46:27 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="GTKoCOn9"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F2F0D8238A; Tue, 15 Sep 2020 16:46:06 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com [IPv6:2607:f8b0:4864:20::743]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 658B38235F for ; Tue, 15 Sep 2020 16:46:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qk1-x743.google.com with SMTP id q63so4475371qkf.3 for ; Tue, 15 Sep 2020 07:46:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ybxioNLdW+kuKIFddHkO/gf/lrDgCuWEIqaIW32VhiE=; b=GTKoCOn9qRS4jQF4p/dOdwItH/ybK53BUxVn45Xa/Bbp9R5Xu1hZFsz+TurpKQf/37 zcmDycJ9u44BxPZcAZbYsSs1SGED6hwJvceHj3uDzyc421jtMc65yYmhSimjEX5PAL7+ gP6KAKAIwk+3gAkwJrKXh84P+f+hUMEf2lN455wMGjThlN1e/EjGMACH12XEQWVPPg2B bJAshaqx+qjZ1ub/ews6+T5KIbZR1BMKZQASsERXPc/+yDB3dpJkygP7uWv1ZoQEReO7 xoRqc2swx3qkl4BdvokHqH0WS+cNs5/QJrDuk0yEnog7ZK29WwJMu2iTQAZhmpQ00FkH f3mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ybxioNLdW+kuKIFddHkO/gf/lrDgCuWEIqaIW32VhiE=; b=ON86XxhhhPIl35r+i2+M9HXpe/nc/kSbP9Fl1x3VxhKHil2s765BBpyDaV+bUJsGOw uG3QVPOj9OrToAYiUWpalmMIomoMU/U6/pJd7yjPo6ib4+9gu80QA/0mvddzlPdFQ7DE fAoLd+BiNJXo2nUqXsjYhooN+KCWP8xX35XVCAF6L5jZqtDe0DYM61WcSlFXIr0oHQsp +4E5yPM6LFiIYCO73scbloQb5kWtzVbO9LxvGT7Re9pXnF6NsEnuYu4BtfS2jM9wrYBD NSyG5FCrMG3Plr9+pMvnX0TCrHjE3SiTH0IActPS3cr94Vy6MfolPtYkSlpmanE1Ho3g I6Ug== X-Gm-Message-State: AOAM532W7eyEE08FPOmxw8wXBN/Nt7oIq78aZvIt7YY4E5Qr+7ujfEVc 98MS204n44UrX6Lvj7bgpMcCSUt1PmoZpmFo X-Google-Smtp-Source: ABdhPJwBuJzjIa05cVrkbQjY6mt6BnXdwuYgmsj379OVeANxeJHUpqltCxce7Uozwbfic1Uw7zbhOg== X-Received: by 2002:a37:a347:: with SMTP id m68mr17957486qke.81.1600181163211; Tue, 15 Sep 2020 07:46:03 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.46.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:46:02 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Jagan Teki , Joe Hershberger , Simon Glass Subject: [PATCH v2 24/46] net: sun8i_emac: Fix not calling dev_xxx with a device Date: Tue, 15 Sep 2020 10:45:00 -0400 Message-Id: <20200915144522.509493-25-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Pass a udevice into a few functions so `dev` is defined. Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- Changes in v2: - New drivers/net/sun8i_emac.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net/sun8i_emac.c b/drivers/net/sun8i_emac.c index 546cc6ccb6..1dae81c7bf 100644 --- a/drivers/net/sun8i_emac.c +++ b/drivers/net/sun8i_emac.c @@ -663,7 +663,8 @@ static int sun8i_eth_write_hwaddr(struct udevice *dev) return _sun8i_write_hwaddr(priv, pdata->enetaddr); } -static int sun8i_emac_board_setup(struct emac_eth_dev *priv) +static int sun8i_emac_board_setup(struct udevice *dev, + struct emac_eth_dev *priv) { int ret; @@ -833,7 +834,7 @@ static int sun8i_emac_eth_probe(struct udevice *dev) priv->mac_reg = (void *)pdata->iobase; - ret = sun8i_emac_board_setup(priv); + ret = sun8i_emac_board_setup(dev, priv); if (ret) return ret; @@ -854,7 +855,7 @@ static const struct eth_ops sun8i_emac_eth_ops = { .stop = sun8i_emac_eth_stop, }; -static int sun8i_get_ephy_nodes(struct emac_eth_dev *priv) +static int sun8i_get_ephy_nodes(struct udevice *dev, struct emac_eth_dev *priv) { int emac_node, ephy_node, ret, ephy_handle; @@ -986,7 +987,7 @@ static int sun8i_emac_eth_ofdata_to_platdata(struct udevice *dev) } if (priv->variant == H3_EMAC) { - ret = sun8i_get_ephy_nodes(priv); + ret = sun8i_get_ephy_nodes(dev, priv); if (ret) return ret; } From patchwork Tue Sep 15 14:45:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364431 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=jylglfLD; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrR4W0MQNz9sVf for ; Wed, 16 Sep 2020 00:51:05 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A4132823CF; Tue, 15 Sep 2020 16:46:28 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="jylglfLD"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D57D48238D; Tue, 15 Sep 2020 16:46:07 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 5012D82376 for ; Tue, 15 Sep 2020 16:46:05 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qk1-x741.google.com with SMTP id q5so4486558qkc.2 for ; Tue, 15 Sep 2020 07:46:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UXShfhrxXkSaf+G6a8Q60BN/2Fhtyeob99y4ELQCOcc=; b=jylglfLDzLOEV6hax1jBv6AkiVKCmwYms8G4LBlz66or8Nv8p2ygfEaUJUX2NMpeBH /IW7i4Akv077c5tD+BtAEavV5mQIm7zyquXKsVlV/Mt8ltUbXMDV50xVzdh++gWBWGD3 wQNoS+4oL5kq9Te4RbdUD6BBMW/5pTU10ARGNKCcOKnSQAw7neBWqSs4mWRHTsy9X7Np q/q9kj0/u7UHy+CE0Mnyf3bwqfhHjZ5z6Y48DQD9fhgMV/HJH3ntPYI/6swAyakIoYpz ki6fB6l5XI6m2nslgvimOaQV5/8eXMBWZpo5DMVc4UWKaL1gKKqMwIrkLGNDFmU7dUND fIeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UXShfhrxXkSaf+G6a8Q60BN/2Fhtyeob99y4ELQCOcc=; b=uBfguQbvhTYq9Je6IH7nG3pNVbfhdt5yD7Mgh0T1r3Dbr3RhjKg1XQnOOqYX890u0L 6KceHASR6OtISYL48sbd6m+VAbnwfs3lEXwoJzNDippqsGA8yWWXQoh0BCPFv58KixRL c3Vtk6+Um+Cu0+UpwgW9oMXl/pWszZ6lysFV2eJL9tBjC+k+PLzyg6bu9TCpU7baV074 pg9V7CsyE0pRyU+2x2rqZyp5hHxU9BEFeg72YczIBRv+D1APvWsdXTNYWsUXYhoo7Jya JWeu6SGvKJahqSPG45sc/8wjPjrGNKD8ZSUghcdt83dpydDU7XAFPxnCPHAq58OniigC AKyA== X-Gm-Message-State: AOAM533QexXUq92zJtf7lgGUdpRNfXLsdZ957WEcvqcbskBPJ3srW+UW NziAFWhygfUpMnGHCSywgl6UV1lxTvyAxacN X-Google-Smtp-Source: ABdhPJxWDkes+GRzo3Hw7qRGeFb9UJ2yxC+TUjEyI4uuOSNYeafUjz/y3+B7BSGY+OzQfMU1ESWdgA== X-Received: by 2002:a37:543:: with SMTP id 64mr17492749qkf.170.1600181164146; Tue, 15 Sep 2020 07:46:04 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.46.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:46:03 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Faiz Abbas , Grygorii Strashko , Joe Hershberger , Tom Rini Subject: [PATCH v2 25/46] net: ti: cpsw: Fix not calling dev_dbg with a device Date: Tue, 15 Sep 2020 10:45:01 -0400 Message-Id: <20200915144522.509493-26-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Without DM_ETH, cpsw_priv.dev is an eth_device. Just use its name instead. Signed-off-by: Sean Anderson --- Changes in v2: - New drivers/net/ti/cpsw.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ti/cpsw.c b/drivers/net/ti/cpsw.c index d6fefe5306..1c11257839 100644 --- a/drivers/net/ti/cpsw.c +++ b/drivers/net/ti/cpsw.c @@ -856,8 +856,14 @@ static int cpsw_phy_init(struct cpsw_priv *priv, struct cpsw_slave *slave) ret = phy_set_supported(phydev, slave->data->max_speed); if (ret) return ret; +#if CONFIG_IS_ENABLED(DM_ETH) dev_dbg(priv->dev, "Port %u speed forced to %uMbit\n", slave->slave_num + 1, slave->data->max_speed); +#else + log_debug("%s: Port %u speed forced to %uMbit\n", + priv->dev->name, slave->slave_num + 1, + slave->data->max_speed); +#endif } phydev->advertising = phydev->supported; From patchwork Tue Sep 15 14:45:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364432 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=t3vYC+1G; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrR4g4C7Lz9sTt for ; Wed, 16 Sep 2020 00:51:15 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E9CAE823E3; Tue, 15 Sep 2020 16:46:29 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="t3vYC+1G"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F012282399; Tue, 15 Sep 2020 16:46:08 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 7091182377 for ; Tue, 15 Sep 2020 16:46:06 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qk1-x742.google.com with SMTP id t138so4500671qka.0 for ; Tue, 15 Sep 2020 07:46:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fDYJ9AA1o0XU1JOaF5Bz2k/5fKnfk+opJjEITcXiAQE=; b=t3vYC+1GHutgkmBIuZIoZh6gtxvU3gJc/6SJ3Vu6g8dGPSQolFcKvPEPOI5TYIs72T sB2g9We0MsVcd+1lL4EBEZ7/QZjzmV6pVbbP2zMXzLZQhkYU3AuLL/pL8U9f1ZOt5wBR oxP0NEn/Wn3COLhXh4LtGZ4e78dobL9ADPUORllSyLt8GNFdaJr2cuZvNVJXC6raaYGr S/t1cmvvsgijZU7agjSs3uD45BghJh24agLAKUxmocgrC/nK3EKF2xd9d0vT2aFBvk5K wacusj6MIxzAZo/0QtxnXsUlDd7wVHs5gGRtl1hdl/ESPEd1TTM/PZvoYa4mR5golho6 52vA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fDYJ9AA1o0XU1JOaF5Bz2k/5fKnfk+opJjEITcXiAQE=; b=Z/ew9DZTdccrNVojmKfYhqsyUmgeIp+cmYINy0HQg2ojyUvvYUj9lFkorZJdRr77T0 mGdBZCzgRcW2rOPIjTg8+n3ur22jB/1sdzdxOvJyAIy9tBD3MeyJcEJ31qy+FpRH3odx /L2k2U73HDEmZfWR96NfbUOcKylf/TZkTnmqNvf+s9mMLP8mZSdGYmCATixmU3nO1Qbe JXPguHYWQqP/80eyG6OU/cUooDoNcSK/y87VMh1PX3nlbkHJGFBR9QtYiTL4gDKTSUhz OHdRgYLdLMbLiHu1D7reWCK92ZtcGUO9EiBH0mZW4kR3Nwddso+K8KGupmghUexMrGQv QnCQ== X-Gm-Message-State: AOAM531wlvHLuX77+RcE76o7exJd7N+TC0RXYI5TmaGzTeI+psjdxOKI WR9UKMylELi6cM+iW6wHICGk0TazNnCzAML2 X-Google-Smtp-Source: ABdhPJylV5NSlPdfsCqyCGZ6nYoF+nBhfJblytsxUyieQJ0zpc7aLDuA3ldQBkeIE9TtKMgW3XgIZg== X-Received: by 2002:a05:620a:1ef:: with SMTP id x15mr17384714qkn.182.1600181165209; Tue, 15 Sep 2020 07:46:05 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.46.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:46:04 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Joe Hershberger , Marek Behun , Stefan Roese Subject: [PATCH v2 26/46] phy: marvell: Fix not calling dev_err with a device Date: Tue, 15 Sep 2020 10:45:02 -0400 Message-Id: <20200915144522.509493-27-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean No need for indirection here. Signed-off-by: Sean Anderson --- Changes in v2: - New drivers/phy/marvell/comphy_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/phy/marvell/comphy_core.c b/drivers/phy/marvell/comphy_core.c index 27bff27ff7..5e8ce740cd 100644 --- a/drivers/phy/marvell/comphy_core.c +++ b/drivers/phy/marvell/comphy_core.c @@ -98,14 +98,14 @@ static int comphy_probe(struct udevice *dev) chip_cfg->comphy_lanes_count = fdtdec_get_int(blob, node, "max-lanes", 0); if (chip_cfg->comphy_lanes_count <= 0) { - dev_err(&dev->dev, "comphy max lanes is wrong\n"); + dev_err(dev, "comphy max lanes is wrong\n"); return -EINVAL; } chip_cfg->comphy_mux_bitcount = fdtdec_get_int(blob, node, "mux-bitcount", 0); if (chip_cfg->comphy_mux_bitcount <= 0) { - dev_err(&dev->dev, "comphy mux bit count is wrong\n"); + dev_err(dev, "comphy mux bit count is wrong\n"); return -EINVAL; } @@ -124,7 +124,7 @@ static int comphy_probe(struct udevice *dev) * compatible node is found */ if (!chip_cfg->ptr_comphy_chip_init) { - dev_err(&dev->dev, "comphy: No compatible DT node found\n"); + dev_err(dev, "comphy: No compatible DT node found\n"); return -ENODEV; } From patchwork Tue Sep 15 14:45:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364433 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=Sk0NJZsK; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrR4t3sWLz9sVT for ; Wed, 16 Sep 2020 00:51:25 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E8E17823D4; Tue, 15 Sep 2020 16:46:30 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Sk0NJZsK"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 51A30823A4; Tue, 15 Sep 2020 16:46:10 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8B06A8237E for ; Tue, 15 Sep 2020 16:46:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qk1-x741.google.com with SMTP id q63so4475632qkf.3 for ; Tue, 15 Sep 2020 07:46:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Bsv4X8QHJCLrp3L6FLHQTJ3ZimCbK4DiHMjfosQuFo4=; b=Sk0NJZsKUCXgumjuIyyT8EK/U97elpguvSAGwtwMPJzKIuQkzirO7mKZlfwAKPNtCY xUhZA1i2t3ApE5Tjgqr9DmmrlTbH4J68Jl1Thiok0W2bMyfyKzVMiTbYbWF+X8E9AP5y imUMqaSzQ0pm6r2ELkhzv2WZSHEIA+FxxaGqoQYDOMrqqrbWreUt4U3C37oClBMSacNW iBRLW8G/AhNNCI16O8zRZaUGR1FiIMwHLUhmmf0do2KgIzqNLQGJyfYpVGFRJFZmLJfB M39kZqSTjbSv24STBLIf9bPkHmjPfwJNiXqJ8WelwR9qqYmCOvZPl/Pl7PSudDFKsgZO wJsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Bsv4X8QHJCLrp3L6FLHQTJ3ZimCbK4DiHMjfosQuFo4=; b=Udtnvkwt+f7ZVXlYxDK7P3l5w/+xWHdW8n4JFDNQVa9RNPtNq6Z40O207NfasFehib 3E+NPeRDldwUbvFXI49/GvHZ8duVtfF8H0UquZ70JeKzxaTvm1xKyhId2u0uhEd21mAg CavkS3tA9mA2EkObzPn1/BBy2mbdqOeDGePCZDI/ipNrHJoDK1j1bzKM1+VUQTkK8irH TyPUb4sHtBRCxMF6g+TtGMitfVxqBSVHaB4xRXux5Styuv8Uu3vQmkr6g5tg/PVoXdBo aR3pxOhqCXJT2tDGM8tpBXVugY2C0hCKFA4euQB8vV6OXEdaYYnKpqtFy99ONQf20hvD bAhQ== X-Gm-Message-State: AOAM530KzD4GkmLL18QMUOaBBN6Yp7qJJNiTDsVcEmlMiGiQitTHm4K0 T0vVGIbwTqNdr9j2LakttCZMHD7LrTiOS0o2 X-Google-Smtp-Source: ABdhPJz/l2hHMxNst+rVadPojRERVnwANDlOfyAdpeeP2EyV35nY5UbNBLFME1hqwwXL9lq7KrGKrg== X-Received: by 2002:a37:2783:: with SMTP id n125mr2302108qkn.153.1600181166180; Tue, 15 Sep 2020 07:46:06 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.46.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:46:05 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Frank Wang , Jagan Teki , Kever Yang Subject: [PATCH v2 27/46] phy: rockchip: Fix not calling dev_err with a device Date: Tue, 15 Sep 2020 10:45:03 -0400 Message-Id: <20200915144522.509493-28-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Get the device from phy, or pass the phy in. Signed-off-by: Sean Anderson Reviewed-by: Kever Yang --- Changes in v2: - New drivers/phy/rockchip/phy-rockchip-pcie.c | 14 +++++++------- drivers/phy/rockchip/phy-rockchip-typec.c | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/phy/rockchip/phy-rockchip-pcie.c b/drivers/phy/rockchip/phy-rockchip-pcie.c index 83928cffe0..617943fd82 100644 --- a/drivers/phy/rockchip/phy-rockchip-pcie.c +++ b/drivers/phy/rockchip/phy-rockchip-pcie.c @@ -98,7 +98,7 @@ static int rockchip_pcie_phy_power_on(struct phy *phy) ret = reset_deassert(&priv->phy_rst); if (ret) { - dev_err(dev, "failed to assert phy reset\n"); + dev_err(phy->dev, "failed to assert phy reset\n"); return ret; } @@ -119,7 +119,7 @@ static int rockchip_pcie_phy_power_on(struct phy *phy) 20 * 1000, 50); if (ret) { - dev_err(&priv->dev, "pll lock timeout!\n"); + dev_err(phy->dev, "pll lock timeout!\n"); goto err_pll_lock; } @@ -133,7 +133,7 @@ static int rockchip_pcie_phy_power_on(struct phy *phy) 20 * 1000, 50); if (ret) { - dev_err(&priv->dev, "pll output enable timeout!\n"); + dev_err(phy->dev, "pll output enable timeout!\n"); goto err_pll_lock; } @@ -149,7 +149,7 @@ static int rockchip_pcie_phy_power_on(struct phy *phy) 20 * 1000, 50); if (ret) { - dev_err(&priv->dev, "pll relock timeout!\n"); + dev_err(phy->dev, "pll relock timeout!\n"); goto err_pll_lock; } @@ -173,7 +173,7 @@ static int rockchip_pcie_phy_power_off(struct phy *phy) ret = reset_assert(&priv->phy_rst); if (ret) { - dev_err(dev, "failed to assert phy reset\n"); + dev_err(phy->dev, "failed to assert phy reset\n"); return ret; } @@ -187,13 +187,13 @@ static int rockchip_pcie_phy_init(struct phy *phy) ret = clk_enable(&priv->refclk); if (ret) { - dev_err(dev, "failed to enable refclk clock\n"); + dev_err(phy->dev, "failed to enable refclk clock\n"); return ret; } ret = reset_assert(&priv->phy_rst); if (ret) { - dev_err(dev, "failed to assert phy reset\n"); + dev_err(phy->dev, "failed to assert phy reset\n"); goto err_reset; } diff --git a/drivers/phy/rockchip/phy-rockchip-typec.c b/drivers/phy/rockchip/phy-rockchip-typec.c index c9c8e1c542..da00daa447 100644 --- a/drivers/phy/rockchip/phy-rockchip-typec.c +++ b/drivers/phy/rockchip/phy-rockchip-typec.c @@ -448,7 +448,7 @@ static void rockchip_tcphy_rx_usb3_cfg_lane(struct rockchip_tcphy *priv, writel(0xfb, priv->reg_base + XCVR_DIAG_BIDI_CTRL(lane)); } -static int rockchip_tcphy_init(struct rockchip_tcphy *priv) +static int rockchip_tcphy_init(struct phy *phy, struct rockchip_tcphy *priv) { const struct rockchip_usb3phy_port_cfg *cfg = priv->port_cfgs; u32 val; @@ -559,9 +559,9 @@ static int rockchip_usb3_phy_power_on(struct phy *phy) return 0; if (priv->mode == MODE_DISCONNECT) { - ret = rockchip_tcphy_init(priv); + ret = rockchip_tcphy_init(phy, priv); if (ret) { - dev_err(dev, "failed to init tcphy (ret=%d)\n", ret); + dev_err(phy->dev, "failed to init tcphy (ret=%d)\n", ret); return ret; } } From patchwork Tue Sep 15 14:45:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364434 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=UN0GsWoD; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrR550Qr3z9sVf for ; Wed, 16 Sep 2020 00:51:34 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 38D77823E2; Tue, 15 Sep 2020 16:46:32 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="UN0GsWoD"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4A71982388; Tue, 15 Sep 2020 16:46:11 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qk1-x744.google.com (mail-qk1-x744.google.com [IPv6:2607:f8b0:4864:20::744]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 77CB282396 for ; Tue, 15 Sep 2020 16:46:08 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qk1-x744.google.com with SMTP id d20so4461849qka.5 for ; Tue, 15 Sep 2020 07:46:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rs2Ae0JXlwbE6wYbDI/jXWj7Dgh+7T5L5ECamycrtAk=; b=UN0GsWoDUvOLx3msiL7zuqaE0o7h3n7mUf8S7n4I8wr2L4YASpjvkPWQbP13XKhQha vwkRAm5zOI0TAI8GiVaHyvg5TVduhHJqZzmlOeoadtYWOX766IfN362Sa4wceqLhSvby wl3iFN3k9xGNpf5EyyQ3JgPIH/O+ue5TW7GVwp7KZj0vhT+ZwaEj5+K5LUkHrS9jwAvb qSvoniN51wl6Zi+ORy6uoFIVejv/gfMmgTq39I1yyvQ6xxqMbRHMm4kYW5McK2+Q4gIV TQWxWiZFExyq2EgpLisKmvUNz16oarv3RCIKvseGjnLUAkH3DElU03oikcJaB3ONzNbZ mx9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rs2Ae0JXlwbE6wYbDI/jXWj7Dgh+7T5L5ECamycrtAk=; b=O28fa0HgWRDG1qfvilvZNyYCgX6PQDP3z6/COdNwPm+8Dp64iY/qQhESSZ+5xNcNyb lvum8hR7ijZJ0rMwaqBxgAxMsTYbc0/QipeLZTBV3qS49Qq62QACDZ+hbvFLFslKGwMh Yv3z99rKW4vDS4JV7yRFQkTT9OSSXBXh7EV+yDuqIIzZ2mjY+9ww2KvvepjF70LvU9+Z G8TMpb9iyaYHlcvG8SU8NcMd4hpA131wKLRLvSL6EODAVKUFRG03L8KRR0vvJanZ66KL 7KJ5XsFjut0RDHMM4nG1CjzQ0EQzpkQhF/16j4YUOoPtt9q6LPlmlyTI5XNaEjIx8r4x lu2Q== X-Gm-Message-State: AOAM5339XKAHSVlhNlFjoMiJmpuHAIsxGuraTRowkLtcHpMgNpXCP0rZ Z+odfF/U8pJxg0V3HI3ZuUSt5NzeScCW9UqC X-Google-Smtp-Source: ABdhPJxvEsntKmSFddZYBJqFcGXvpHYuAGBpS/aFRIuJ1w1IgmTmNevL7m5QfDJQSpa1qhKY+EdWmA== X-Received: by 2002:a05:620a:a09:: with SMTP id i9mr16329266qka.201.1600181167151; Tue, 15 Sep 2020 07:46:07 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.46.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:46:06 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Jagan Teki , Jun Nie Subject: [PATCH v2 28/46] phy: sun4i-usb: Fix not calling dev_err with a device Date: Tue, 15 Sep 2020 10:45:04 -0400 Message-Id: <20200915144522.509493-29-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean This uses phy's device Signed-off-by: Sean Anderson --- Changes in v2: - New drivers/phy/allwinner/phy-sun4i-usb.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c index f050645044..7b9d3eefc5 100644 --- a/drivers/phy/allwinner/phy-sun4i-usb.c +++ b/drivers/phy/allwinner/phy-sun4i-usb.c @@ -272,13 +272,15 @@ static int sun4i_usb_phy_init(struct phy *phy) ret = clk_enable(&usb_phy->clocks); if (ret) { - dev_err(dev, "failed to enable usb_%ldphy clock\n", phy->id); + dev_err(phy->dev, "failed to enable usb_%ldphy clock\n", + phy->id); return ret; } ret = reset_deassert(&usb_phy->resets); if (ret) { - dev_err(dev, "failed to deassert usb_%ldreset reset\n", phy->id); + dev_err(phy->dev, "failed to deassert usb_%ldreset reset\n", + phy->id); return ret; } @@ -338,13 +340,15 @@ static int sun4i_usb_phy_exit(struct phy *phy) ret = clk_disable(&usb_phy->clocks); if (ret) { - dev_err(dev, "failed to disable usb_%ldphy clock\n", phy->id); + dev_err(phy->dev, "failed to disable usb_%ldphy clock\n", + phy->id); return ret; } ret = reset_assert(&usb_phy->resets); if (ret) { - dev_err(dev, "failed to assert usb_%ldreset reset\n", phy->id); + dev_err(phy->dev, "failed to assert usb_%ldreset reset\n", + phy->id); return ret; } From patchwork Tue Sep 15 14:45:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364435 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=sArR+LCO; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrR5L4MYsz9sVM for ; Wed, 16 Sep 2020 00:51:50 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3196C823F1; Tue, 15 Sep 2020 16:46:33 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="sArR+LCO"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9BDB0823A4; Tue, 15 Sep 2020 16:46:12 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qk1-x744.google.com (mail-qk1-x744.google.com [IPv6:2607:f8b0:4864:20::744]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 715A18239B for ; Tue, 15 Sep 2020 16:46:09 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qk1-x744.google.com with SMTP id 16so4463086qkf.4 for ; Tue, 15 Sep 2020 07:46:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wBH1LxsFENte61F/hCedKXbSy8T0g7TPcHy7u4BfATA=; b=sArR+LCOluOburG9KaRGAFd7pQ20A1x413mNEM8VOe6zfk39H99+P+dpK2o6oa55Kn bN1IA4w3AmaZPncEXMCcX+Zqd7mg5chHCj67dDlORFVrk4ToOt1TuED8bcGFM/GYVIXF F1hs/xXuIhuGbWExJsfwdN7+1wFwu4XVb84U4Lsu6BKvSuYXzweqvHbhZpz3PuF8hF8Q 4wLWXSDdkLN1U2gyPgY3HhDj6IYgL2lrVgisJOoEU2Avffilx8rdBPpU8Is9It4K0iGL yizgTm1R8jcTqHfD67mASXNrl/3zqYhiSLt/7AEIULI9wl2Dsh5lCzAK7Y8z4+EVcfYL 5HTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wBH1LxsFENte61F/hCedKXbSy8T0g7TPcHy7u4BfATA=; b=JS/5HQvhxrGw41caTEw6cIiefvcZvwf//RJU444fFUWFO3YL0Idae+2pVtDTv/UCq5 my3sBOmY2O8Y/JrGyJJ3O7o0vJJ0kL6cigdTHKrHs/SKDJQoztpSDoJOkH7iReXddTNE S/ZBujlX0WKvw3NczyrIWWJKhbf6zOibZaq2jOFOjEX5h6mRYVKOdvTAyBeZfEfAtBhX zMspKo1RumpeK2vSLeJ1Ht8KTMy6vMXcqpWSgq8g55bm/Z68hhAErOaVb/4cRnYU26V/ 5UNj3wBpgWyvaOeL812vRUns+Yt7GxaCPHUdRWEAjvGu5G5mRZczOq8WYzoDmHfH6hUo pYUQ== X-Gm-Message-State: AOAM531qxcddWX2wkdcgYVX1VTHf0rFeknuO9Xern78v42R2TF6V8N4+ ulHZbN3vKqEJIj4rdlW1DLsqOsfkYuk1+4nU X-Google-Smtp-Source: ABdhPJwnwPP1Q9UVCsAXyLXTjaUGh4I2WoCY22aYPw6Nxpi5gwJQV34cPCAm8v1UpzI54JhUTRQHmg== X-Received: by 2002:a05:620a:981:: with SMTP id x1mr16729970qkx.404.1600181168283; Tue, 15 Sep 2020 07:46:08 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.46.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:46:07 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Lokesh Vutla , Sekhar Nori Subject: [PATCH v2 29/46] phy: ti: Fix not calling dev_err with a device Date: Tue, 15 Sep 2020 10:45:05 -0400 Message-Id: <20200915144522.509493-30-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean `phy` doesn't exist; we need to use `x` instead. Signed-off-by: Sean Anderson --- Changes in v2: - New drivers/phy/phy-ti-am654.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/phy/phy-ti-am654.c b/drivers/phy/phy-ti-am654.c index 6907c1afb3..cc73760c8b 100644 --- a/drivers/phy/phy-ti-am654.c +++ b/drivers/phy/phy-ti-am654.c @@ -318,13 +318,13 @@ static int serdes_am654_of_xlate(struct phy *x, struct serdes_am654 *phy = dev_get_priv(x->dev); if (args->args_count != 2) { - dev_err(phy->dev, "Invalid DT PHY argument count: %d\n", + dev_err(x->dev, "Invalid DT PHY argument count: %d\n", args->args_count); return -EINVAL; } if (args->args[0] != PHY_TYPE_PCIE) { - dev_err(phy->dev, "Unrecognized PHY type: %d\n", + dev_err(x->dev, "Unrecognized PHY type: %d\n", args->args[0]); return -EINVAL; } From patchwork Tue Sep 15 14:45:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364436 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=TFJK/RPY; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrR5X6zhFz9sVK for ; Wed, 16 Sep 2020 00:52:00 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5B495823F6; Tue, 15 Sep 2020 16:46:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="TFJK/RPY"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 24F2C823AC; Tue, 15 Sep 2020 16:46:14 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qt1-x843.google.com (mail-qt1-x843.google.com [IPv6:2607:f8b0:4864:20::843]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 96EE382394 for ; Tue, 15 Sep 2020 16:46:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qt1-x843.google.com with SMTP id y11so3314314qtn.9 for ; Tue, 15 Sep 2020 07:46:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jmGZv03eVj3y+UaR089wbAFrC/EYvkaU8sSNIY1jpj4=; b=TFJK/RPY+3MmsvKEUhLwrk77YwPYZEJRUQ1eEU7nOSpHbB7F4i6qFJ8Fo7UPO9hbH4 pRJNmViBIeQicl3o8hS2BWjz3g0j8OScjGCfUxOyQHruS9TwgodyHbfnUOBz/sCnKbF/ fTXK6bFGXFs0kyB/NUeGXoxQ2/1FzBle8NCXxFenBYBRukS96Il1/FnsDaQqeJw01J8M ykLvxofwvzBoLx/RuHHRnh1QIm2LGTCtoLAHEVSZE2sH5qSoLZlKdHH0CEu36nyDx1PZ uuz98SbQrm21SFskDDH+NTYSjRfLvZovXGr5j+xg7o1rto9Y6TuX8dvBTJXW3V6qPFvq j8zA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jmGZv03eVj3y+UaR089wbAFrC/EYvkaU8sSNIY1jpj4=; b=Sm7P9OB8DKpMKzqo2NVtfQQbWabnDFqk5b5CkeqtYe6tE2F1OAgRzUZWwpQopeaEA5 JoAAq5b51lKVetRBXlZtJOuuPoPguOY/OPvRqQqIyPDPY/4ceE1NcUctbjHACbQIwla+ Ma2m77DhUIPeeOBV7KHqMMqGIEc3UHkooEzoDd3+g02OXznWhI/YxcFrYBkyTQfiDqq6 yuOyB9Iotb7YRquI/0ksf6ctyhvoLJ5rvEJIxr4G9V3OXmJ3Sp1urkldZl0ZWH9O45k9 Eu4YiWqjlRabSJ/qp0wO5/SppODcLyRHJPKgBwuYbR5xTBtIx+Oa+GcF5Hdt95D9nl39 dJfQ== X-Gm-Message-State: AOAM533+EYb7MI0FPv6W6/WgF3ekrSQn7gfUFM7JdcYfWac87JPMxJGh 7SP7IqQdgjy+sU1hEy3CCz6QWAvEiGnUtB7I X-Google-Smtp-Source: ABdhPJyKi/9YuzyJfB5InACUtQ6qErFFgfU9Cz0SxSmW8gVn1G1o3pP9d70oiD5XFsa/67SoFOlb/A== X-Received: by 2002:ac8:1b3d:: with SMTP id y58mr17919025qtj.10.1600181170418; Tue, 15 Sep 2020 07:46:10 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.46.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:46:09 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Patrice Chotard , Patrick Delaunay , uboot-stm32@st-md-mailman.stormreply.com Subject: [PATCH v2 30/46] phy: usbphyc: Fix not calling dev_err with a device Date: Tue, 15 Sep 2020 10:45:06 -0400 Message-Id: <20200915144522.509493-31-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Use the phy's device. Signed-off-by: Sean Anderson Reviewed-by: Patrice Chotard Reviewed-by: Patrick Delaunay --- Changes in v2: - New drivers/phy/phy-stm32-usbphyc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/phy/phy-stm32-usbphyc.c b/drivers/phy/phy-stm32-usbphyc.c index c6d3048602..9d4296d649 100644 --- a/drivers/phy/phy-stm32-usbphyc.c +++ b/drivers/phy/phy-stm32-usbphyc.c @@ -311,7 +311,7 @@ static int stm32_usbphyc_of_xlate(struct phy *phy, if ((phy->id == 0 && args->args_count != 1) || (phy->id == 1 && args->args_count != 2)) { - dev_err(dev, "invalid number of cells for phy port%ld\n", + dev_err(phy->dev, "invalid number of cells for phy port%ld\n", phy->id); return -EINVAL; } From patchwork Tue Sep 15 14:45:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364437 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=kCZTiMrR; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrR5l5q6Tz9sTN for ; Wed, 16 Sep 2020 00:52:11 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 51153823FB; Tue, 15 Sep 2020 16:46:35 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="kCZTiMrR"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B5B81823B7; Tue, 15 Sep 2020 16:46:15 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com [IPv6:2607:f8b0:4864:20::743]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 179F1823A4 for ; Tue, 15 Sep 2020 16:46:13 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qk1-x743.google.com with SMTP id w186so4495119qkd.1 for ; Tue, 15 Sep 2020 07:46:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9CS3+ndOFxwSawupOluAUW6PUkYsjXNGrC/ywMk4ZDg=; b=kCZTiMrRIJcWr+jLAwcDdCZjrlptUjuuseqWgDDxJszNJCNGLM6acZryc5BtsF0Osx OJGAyO/xV7EIRwBHT2ZSSxHI0DmQDkGIYoW78Sx+mM+jgNJWxHcOAzHr9hBzYbUe2PgA uwhk64VTkszKogRCnIfRroZIXyLGb+r1qOiWbE8Et63NzOVA8ODqWUpk/xuAYL3xAVE8 GYuIgIazQw9l2yT2mT/M3RmNeHVDsx4q7O0ohdnl9FiL/87t2pdEsxaPeqYK3/5DQ8El IKhc5X//DYHKcxJ6fBcHwjIe3KQrPCuatv9CuidDg9C8+zhis6ScB+Ret5PsKFWmDIHv /eRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9CS3+ndOFxwSawupOluAUW6PUkYsjXNGrC/ywMk4ZDg=; b=Muh+AH814Bd8U/X3RPInTKqaOLXz+NSRIfLoDgSV0AOCQZYJjvM6v3jCgmVJUCLyNR uVIFnebQwNk2i0VMRfpvUf8N0m4r+ujsIyDrihn1+48PgyVKGY3/QR9xgCaT54cARpRP lY518XVMVgdwTTePmFIK6agu2VfLsocfZBnRTlrs8KoAfS3tzhdqlTUSN1WEEf14UWCD RrbAnAfMUGWIkPpdb0QJ2+myFut5Noc8abjuOIhThLb1ODqHzxE+R98flmgSHaqBGClx tiKap3qaK2ZgbRCGl3gNGrNuBSaHhM21EaszY5dgbGydRMWrha1fYAhMH8s4lKwYPRjo 733Q== X-Gm-Message-State: AOAM530mfAMAP17O0CdOteAIAV9SC94PeXrwLU+oAen5Fw6Gr2gJZHLE 6p0PfQF7BjfetYuvmtfKLLNJSWiMb+UWjPl+ X-Google-Smtp-Source: ABdhPJwR9fJvpSsA+SqW8A8bbUQm5RNgJzI/pC2t98uzFEGVWTjuxDKbRta7Sb625wfOhoEjcHfzdA== X-Received: by 2002:a05:620a:795:: with SMTP id 21mr16803787qka.131.1600181171906; Tue, 15 Sep 2020 07:46:11 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.46.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:46:10 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Fabien Dessenne , Lokesh Vutla Subject: [PATCH v2 31/46] remoteproc: Remove unused function rproc_elf_sanity_check Date: Tue, 15 Sep 2020 10:45:07 -0400 Message-Id: <20200915144522.509493-32-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean This function is never used anywhere, and it also tries to log with a nonexistant device. Signed-off-by: Sean Anderson --- (no changes since v1) drivers/remoteproc/rproc-elf-loader.c | 16 ---------------- include/remoteproc.h | 13 ------------- 2 files changed, 29 deletions(-) diff --git a/drivers/remoteproc/rproc-elf-loader.c b/drivers/remoteproc/rproc-elf-loader.c index c464ecebb7..b185a6cafb 100644 --- a/drivers/remoteproc/rproc-elf-loader.c +++ b/drivers/remoteproc/rproc-elf-loader.c @@ -158,22 +158,6 @@ int rproc_elf64_sanity_check(ulong addr, ulong size) return 0; } -/* Basic function to verify ELF image format */ -int rproc_elf_sanity_check(ulong addr, ulong size) -{ - Elf32_Ehdr *ehdr = (Elf32_Ehdr *)addr; - - if (!addr) { - dev_err(dev, "Invalid firmware address\n"); - return -EFAULT; - } - - if (ehdr->e_ident[EI_CLASS] == ELFCLASS64) - return rproc_elf64_sanity_check(addr, size); - else - return rproc_elf32_sanity_check(addr, size); -} - int rproc_elf32_load_image(struct udevice *dev, unsigned long addr, ulong size) { Elf32_Ehdr *ehdr; /* Elf header structure pointer */ diff --git a/include/remoteproc.h b/include/remoteproc.h index a903acb9b2..74d01723f6 100644 --- a/include/remoteproc.h +++ b/include/remoteproc.h @@ -226,19 +226,6 @@ int rproc_elf32_sanity_check(ulong addr, ulong size); */ int rproc_elf64_sanity_check(ulong addr, ulong size); -/** - * rproc_elf_sanity_check() - Verify if an image is a valid ELF one - * - * Check if a valid ELF image exists at the given memory location. Auto - * detects ELF32/ELF64 and verifies basic ELF64/ELF32 format requirements - * like magic number and sections size. - * - * @addr: address of the image to verify - * @size: size of the image - * @return 0 if the image looks good, else appropriate error value. - */ -int rproc_elf_sanity_check(ulong addr, ulong size); - /** * rproc_elf32_load_image() - load an ELF32 image * @dev: device loading the ELF32 image From patchwork Tue Sep 15 14:45:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364438 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=JHegwULT; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrR5z0xVKz9sVT for ; Wed, 16 Sep 2020 00:52:21 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5743E82406; Tue, 15 Sep 2020 16:46:36 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="JHegwULT"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DA1B3823C0; Tue, 15 Sep 2020 16:46:16 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qv1-xf41.google.com (mail-qv1-xf41.google.com [IPv6:2607:f8b0:4864:20::f41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 32B4082394 for ; Tue, 15 Sep 2020 16:46:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qv1-xf41.google.com with SMTP id q10so1845884qvs.1 for ; Tue, 15 Sep 2020 07:46:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BgKtYyY5808sRc6W2y7XlF/oTLlWcZcEaQdR6cD5WlU=; b=JHegwULTPcqgXZjg+U8h+ggvWidcjnaC7kO4bgEOeuXwm0g5KmVsLjqbKCXnXf1C5F o4TCy3QPchKx93uG+FWL+/aRCEGJV4WYEatctlNBMrcrmRM/RfCEBFVbsoyKKXGah2pj OATZFh6AhWazcrr+4OusadDejlh5WFRi2RUyk+37cb0/e+4LSvTIxRpWMu2oLEe3CWXk plhE4RQA3sL0IWwSBelifaMX+Om/SyqAyudRqb0mSEeKrWlTgZkGyJ5+o87Sqj6MCUe1 /i1hAlWvK0Av1SOkxmDQ9XjQk7STMsATCSvDAQEI4JV9DCTKU0YA0Mf0zqplCyIgf129 GuWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BgKtYyY5808sRc6W2y7XlF/oTLlWcZcEaQdR6cD5WlU=; b=B55TepWCBRWMfvsFkJCMjT+4vQZhMOQKf/TrYz3hhYqkx2gn6bU8jGQa+PFRgcVlA9 I36VYei9ccDKgw+OKdn6Xvr6pTe0X8U68WCs3Q+R3pTqtHkhjFGnxhJHFVn/Lm/j2z6B q34dAHE+qFqIyuMegWU3cq6VnlzG1Rafx+dhltR9vLFGp4TR7DEaNIblJ4ilJ86FbE0R sA41oAyuTIXjDg1dik84p/v39LSnZu4tSAfX38hp77EI1+X+73byRruu11kNWG+fubR6 k/ug1Itj9KKHWd5G22GIopAalc9xQUA+HJlK9XEH3V6sEhRqdCyVo8yBEHp0vTzwYjw+ Q+uw== X-Gm-Message-State: AOAM5331mQApC7V1i9bEBGtML9J1roBcTng8pwBaCHoZ0260S3Z7e1nu 8irEPCqV3+DrQFaOJZTp4Tc28UTm4eUUVzPh X-Google-Smtp-Source: ABdhPJwhLq/+/Eyn5g15L1yp48psr4+4IvtsXbLOdukhbfOwshgVK0bwUh4UyT09zA8WI4Tk9uV7AQ== X-Received: by 2002:ad4:45b3:: with SMTP id y19mr2119932qvu.59.1600181172971; Tue, 15 Sep 2020 07:46:12 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.46.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:46:12 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Lokesh Vutla , Suman Anna Subject: [PATCH v2 32/46] remoteproc: k3-r5: Fix not calling dev_xxx with a device Date: Tue, 15 Sep 2020 10:45:08 -0400 Message-Id: <20200915144522.509493-33-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Usually we can get a device from the current core, but some dev_dbg calls have been converted to debug, since we are called on a cluster. Signed-off-by: Sean Anderson --- Changes in v2: - New drivers/remoteproc/ti_k3_r5f_rproc.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/drivers/remoteproc/ti_k3_r5f_rproc.c b/drivers/remoteproc/ti_k3_r5f_rproc.c index 1a7f1f8a00..94454e7b65 100644 --- a/drivers/remoteproc/ti_k3_r5f_rproc.c +++ b/drivers/remoteproc/ti_k3_r5f_rproc.c @@ -150,7 +150,7 @@ static int k3_r5f_lockstep_release(struct k3_r5f_cluster *cluster) { int ret, c; - dev_dbg(dev, "%s\n", __func__); + debug("%s\n", __func__); for (c = NR_CORES - 1; c >= 0; c--) { ret = ti_sci_proc_power_domain_on(&cluster->cores[c]->tsp); @@ -186,7 +186,7 @@ static int k3_r5f_split_release(struct k3_r5f_core *core) { int ret; - dev_dbg(dev, "%s\n", __func__); + dev_dbg(core->dev, "%s\n", __func__); ret = ti_sci_proc_power_domain_on(&core->tsp); if (ret) { @@ -231,25 +231,29 @@ static int k3_r5f_core_sanity_check(struct k3_r5f_core *core) struct k3_r5f_cluster *cluster = core->cluster; if (core->in_use) { - dev_err(dev, "Invalid op: Trying to load/start on already running core %d\n", + dev_err(core->dev, + "Invalid op: Trying to load/start on already running core %d\n", core->tsp.proc_id); return -EINVAL; } if (cluster->mode == CLUSTER_MODE_LOCKSTEP && !cluster->cores[1]) { - printf("Secondary core is not probed in this cluster\n"); + dev_err(core->dev, + "Secondary core is not probed in this cluster\n"); return -EAGAIN; } if (cluster->mode == CLUSTER_MODE_LOCKSTEP && !is_primary_core(core)) { - dev_err(dev, "Invalid op: Trying to start secondary core %d in lockstep mode\n", + dev_err(core->dev, + "Invalid op: Trying to start secondary core %d in lockstep mode\n", core->tsp.proc_id); return -EINVAL; } if (cluster->mode == CLUSTER_MODE_SPLIT && !is_primary_core(core)) { if (!core->cluster->cores[0]->in_use) { - dev_err(dev, "Invalid seq: Enable primary core before loading secondary core\n"); + dev_err(core->dev, + "Invalid seq: Enable primary core before loading secondary core\n"); return -EINVAL; } } @@ -401,7 +405,7 @@ static int k3_r5f_split_reset(struct k3_r5f_core *core) { int ret; - dev_dbg(dev, "%s\n", __func__); + dev_dbg(core->dev, "%s\n", __func__); if (reset_assert(&core->reset)) ret = -EINVAL; @@ -416,7 +420,7 @@ static int k3_r5f_lockstep_reset(struct k3_r5f_cluster *cluster) { int ret = 0, c; - dev_dbg(dev, "%s\n", __func__); + debug("%s\n", __func__); for (c = 0; c < NR_CORES; c++) if (reset_assert(&cluster->cores[c]->reset)) @@ -548,7 +552,7 @@ static int k3_r5f_rproc_configure(struct k3_r5f_core *core) u64 boot_vec = 0; int ret; - dev_dbg(dev, "%s\n", __func__); + dev_dbg(core->dev, "%s\n", __func__); ret = ti_sci_proc_request(&core->tsp); if (ret < 0) @@ -641,7 +645,7 @@ static int k3_r5f_of_to_priv(struct k3_r5f_core *core) { int ret; - dev_dbg(dev, "%s\n", __func__); + dev_dbg(core->dev, "%s\n", __func__); core->atcm_enable = dev_read_u32_default(core->dev, "atcm-enable", 0); core->btcm_enable = dev_read_u32_default(core->dev, "btcm-enable", 1); From patchwork Tue Sep 15 14:45:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364441 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=NRBeh8an; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrR6b1k7Mz9sTN for ; Wed, 16 Sep 2020 00:52:54 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B6742823FE; Tue, 15 Sep 2020 16:46:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="NRBeh8an"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C8E44823A8; Tue, 15 Sep 2020 16:46:20 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qv1-xf43.google.com (mail-qv1-xf43.google.com [IPv6:2607:f8b0:4864:20::f43]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4398C823A8 for ; Tue, 15 Sep 2020 16:46:18 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qv1-xf43.google.com with SMTP id db4so1830542qvb.4 for ; Tue, 15 Sep 2020 07:46:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mzSuUfx1e9fSRPJs69UknSQkDj5pDjlYC8Hja5VWDtM=; b=NRBeh8angBg7dvPWUIEo1Uap5IoBo1fxOliNh9v3xmFTGYht6vZ1j8xBKIU4mbImkI fNIsoOZTmfYuPtZE/rJiXiGFrWHs+fXgsCrMXmT8rMg8aiVTRD2xnnPn7MgQxsTIG3hi jEPRVBhMy0PqmdwphG63zRs9oFtuWgrvflUECwZeCxIGuHI3Gg8bScBbRwmOXmNYevKf b7shBk/pHwRnhg356B6/2MUpbJ+rG9ExP+uF3/blssL28JvfUWgUoC4ZQpIoMrRmcgzV sLOOR5plJIGtdmmgA3vwW5h/EvumQ0iCog01Jtafy+Fs3f/kU0dPteJU3JJw+X3Ci4gC D8AA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mzSuUfx1e9fSRPJs69UknSQkDj5pDjlYC8Hja5VWDtM=; b=qm2km7ABNjkJweYfcWI31vQyEBbN4tSLN68bErgvJOAgySlKMq1N4IjlJ3o0TCRk/m PigHZPFrwkcnE3ScpnhHCk4DIwzSuYuFSYlpO3o8f3prfGtz/HRaWVKwJUkfnWQNmpX8 nLIVWoEjVZT+rKbJONSzq/MPPT7sE8sFnbU+yc4TiOYNiJOzeCl6qmbNi+DtJtINshBw BH724WxSTUvBckqo0gqoVDfgG30dBFSDyEgZF7j7wOqwFfds6IpLIOR8B0j9olh16j3w va0791F6fnYVtBFp/8q1a6kXRI2VhkAizWwKn32O+x6JC+3Qqt2J91Qj9+C9kU1Su3tC pHYw== X-Gm-Message-State: AOAM533TpKB1ep+SDNRdPU3bawCitKMgfhQvcWy62KP4GFhSFZmHPBGx wswWus8BLZKKd5zuKTzU+e6rRyFV1kgVvKdk X-Google-Smtp-Source: ABdhPJzcu0xAdG0csn/6KX0PVb0NiyzrP/xVA40CSiwakAerZFLRU7vQtyjXbtxAfAxQ8bJSTySOwg== X-Received: by 2002:a0c:8e0e:: with SMTP id v14mr13842646qvb.27.1600181174047; Tue, 15 Sep 2020 07:46:14 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.46.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:46:13 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Andreas Dannenberg , Lokesh Vutla , Tom Rini Subject: [PATCH v2 33/46] remoteproc: k3: Fix not calling dev_xxx with a device Date: Tue, 15 Sep 2020 10:45:09 -0400 Message-Id: <20200915144522.509493-34-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Pass a device to functions which log with one. Signed-off-by: Sean Anderson --- Changes in v2: - New drivers/remoteproc/k3_system_controller.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/remoteproc/k3_system_controller.c b/drivers/remoteproc/k3_system_controller.c index 54209fccb3..702d98d1a8 100644 --- a/drivers/remoteproc/k3_system_controller.c +++ b/drivers/remoteproc/k3_system_controller.c @@ -100,7 +100,7 @@ void k3_sysctrler_load_msg_setup(struct k3_sysctrler_load_msg *fw, fw->buffer_size = size; } -static int k3_sysctrler_load_response(u32 *buf) +static int k3_sysctrler_load_response(struct udevice *dev, u32 *buf) { struct k3_sysctrler_load_msg *fw; @@ -129,7 +129,8 @@ static int k3_sysctrler_load_response(u32 *buf) return 0; } -static int k3_sysctrler_boot_notification_response(u32 *buf) +static int k3_sysctrler_boot_notification_response(struct udevice *dev, + u32 *buf) { struct k3_sysctrler_boot_notification_msg *boot; @@ -193,7 +194,7 @@ static int k3_sysctrler_load(struct udevice *dev, ulong addr, ulong size) } /* Process the response */ - ret = k3_sysctrler_load_response(msg.buf); + ret = k3_sysctrler_load_response(dev, msg.buf); if (ret) return ret; @@ -230,7 +231,7 @@ static int k3_sysctrler_start(struct udevice *dev) } /* Process the response */ - ret = k3_sysctrler_boot_notification_response(msg.buf); + ret = k3_sysctrler_boot_notification_response(dev, msg.buf); if (ret) return ret; From patchwork Tue Sep 15 14:45:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364439 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=sUIYUBUl; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrR691r5dz9sTN for ; Wed, 16 Sep 2020 00:52:32 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 151498240E; Tue, 15 Sep 2020 16:46:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="sUIYUBUl"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 95E30823CE; Tue, 15 Sep 2020 16:46:18 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com [IPv6:2607:f8b0:4864:20::743]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3033D8239D for ; Tue, 15 Sep 2020 16:46:16 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qk1-x743.google.com with SMTP id o5so4394835qke.12 for ; Tue, 15 Sep 2020 07:46:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JdpB+4PZoz0MI001eH1XfNxyxiQrHVh50XSHOVaqdrw=; b=sUIYUBUl8T0Oa313NsK0hkRdJDTnxhZsLJMN9MBDIOdiCkAswbSLr7KMWjIwknxLuk /RHr6N7ADXUJ/zFv+mCTdbdM9tjUfRt+6HQKh2nLZuqbfj61DQIrNe2/C0o3NYe+K3qj Hxa455GkKjT/mCfPxTkstiRNbyw+dDuZEgZU7AAOO7PXXY1XTj6LCRebaTov3VDIBpFg SuCzsD+KMVF5dFCDKqNopatk3v5CCI44qyzDIblrHiaIJ7R7KTlnLs7NwyIFyCjieWKx 5U9mfk01zmK/nCX3tWwyIa4RalK+2Bmtsqhw6jVvJpF15r+tTNW822zLtz0yimraFcoN mXUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JdpB+4PZoz0MI001eH1XfNxyxiQrHVh50XSHOVaqdrw=; b=GfB9SehmGINMv+8gPv2CPYh1/efKDHSFA40G+kFyU6SvgluC18TXFYoVqJyxBrBTfn 6rv1W/lWBFko4EPJpBisOMfDhQgt1xtolxPcWaOwIv8xBLPr8kT1doZDu6Di3grKS4vr xJBoBFdIjMFnWzlAZQgQWmRmHQ7BG1LLwBQaXCbzEzc8+WR36RV8dpKESOjOL0F2HKPm izV5yYextBxl8vU4+UJfvr8+i6s1rID9ejldP+UkD8qP2iGYm4eiUokC/L/iIn2K6pMi A9ErvkiO1swDx2OmhCdUcVajVVMcWZ5XIq9oIHIIrumfrrWrX2XXlrlS8qFM4D+g9Yka iMnA== X-Gm-Message-State: AOAM531SOQZszHdOinsZxyUwFQVLeGvCzCWthn7eXSfC+v6ozr5cqGl3 g7pBHhQwfZqldTNsdJHroGdAzw+37YcWgHJ5 X-Google-Smtp-Source: ABdhPJypxiQXR4RlDr871FQxwDFFx9GA47g7QNzUZ3amMkXfwdsR4dVzRwfycreLx3G5378gudbIlg== X-Received: by 2002:a37:506:: with SMTP id 6mr18620763qkf.390.1600181175025; Tue, 15 Sep 2020 07:46:15 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.46.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:46:14 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Ramon Fried , Simon Glass Subject: [PATCH v2 34/46] soc: qualcomm: Fix not calling dev_err with a device Date: Tue, 15 Sep 2020 10:45:10 -0400 Message-Id: <20200915144522.509493-35-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Remove the indirection. Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- Changes in v2: - New drivers/smem/msm_smem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/smem/msm_smem.c b/drivers/smem/msm_smem.c index 2557269bc5..597d425d11 100644 --- a/drivers/smem/msm_smem.c +++ b/drivers/smem/msm_smem.c @@ -879,7 +879,7 @@ static int qcom_smem_probe(struct udevice *dev) header = smem->regions[0].virt_base; if (le32_to_cpu(header->initialized) != 1 || le32_to_cpu(header->reserved)) { - dev_err(&pdev->dev, "SMEM is not initialized by SBL\n"); + dev_err(dev, "SMEM is not initialized by SBL\n"); return -EINVAL; } From patchwork Tue Sep 15 14:45:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364440 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=a11nzr+D; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrR6N2gBqz9sTN for ; Wed, 16 Sep 2020 00:52:43 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CC1D782416; Tue, 15 Sep 2020 16:46:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="a11nzr+D"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 82F03823C6; Tue, 15 Sep 2020 16:46:19 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qk1-x744.google.com (mail-qk1-x744.google.com [IPv6:2607:f8b0:4864:20::744]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1DD5A823C0 for ; Tue, 15 Sep 2020 16:46:17 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qk1-x744.google.com with SMTP id w186so4495376qkd.1 for ; Tue, 15 Sep 2020 07:46:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FfeGrTuxbz2FNGXx9GlHQS5+CL5sXsF2MLiUhieIXF8=; b=a11nzr+Du5s5hvtAsnMW0godYxV0++TqKoSsoiGJi3LFXBLGm27tSy/373GyJeIefS feqHdPPqmsa3D8pB+a1YJZQshPDnQ8xW8M+6Aaj6BJHiz0mhZlnVhgMBfetX+LmlW7li AQHiOkpwEfHKjh/sLEebTrSQtrzJE7wAIUIURWu+K2BhkJBcSSv51uZSO9s9wOI4a+4U cxOBoGN4tehtgxDH4FQv9jVSeRYuc27PHbdHoEBj5RqATQBvpCcrVfhH8G387WSNJc6v heUrDiyhB4ASC6G3YIkLfoiP5HSHIIfGQ2/8A7+PLPuhWn0SJh9qFxd2Co7YKIrncwQe lP/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FfeGrTuxbz2FNGXx9GlHQS5+CL5sXsF2MLiUhieIXF8=; b=g5eDu3VBGeIq1iFLgAOXYByT6MZsES557HBeFcQi4tTYNNAfFO33tgu585Ut0Wmlbm LuIkjnIa+eT4LDN0OphlFDWradPPCvQEmgBPO372xtIMDlLBV+5EZctylcsO2VSQpPef nB5pxpIUexHncbWns664Y8xiB0xsLFhOnPgpAMB+JVGs6gqCPurMRw84nta+ghj3DkL9 PxrHvNbHL7pzWRoECbIfIe4GHDqMhgme1E2ezQCH23xIvZkXP1m1s0bTy+VZq5X3v5mS 9gOrnqevZACYnoJmHm0vodBfcm9cDRinMccXjlRSgY7Lfxr271vvYXsavHAxmI4lCJWF clDQ== X-Gm-Message-State: AOAM533bHdd3WpLIMDDbTkdG9BaAvOQFiMNoCp2+TLyJuhxSRIyF2c5A 6saCzwNiMgTrO4atRSN/gw6XHQfcXimRW5pD X-Google-Smtp-Source: ABdhPJyvtBI6p4Qc/my+dpAe95u29ocUyjNif7H/PxENMQixNZpEIBvTyro+lYUM2FSqH9DvoNGqDA== X-Received: by 2002:a37:a514:: with SMTP id o20mr17069542qke.374.1600181175971; Tue, 15 Sep 2020 07:46:15 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.46.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:46:15 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Andre Przywara , Jagan Teki , Stefan Mavrodiev Subject: [PATCH v2 35/46] spi: sunxi: Fix not calling dev_err with a device Date: Tue, 15 Sep 2020 10:45:11 -0400 Message-Id: <20200915144522.509493-36-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Use `bus` and not `dev`. Signed-off-by: Sean Anderson --- Changes in v2: - New drivers/spi/spi-sunxi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/spi/spi-sunxi.c b/drivers/spi/spi-sunxi.c index cd2e17bfd1..0844a5a0a6 100644 --- a/drivers/spi/spi-sunxi.c +++ b/drivers/spi/spi-sunxi.c @@ -489,19 +489,19 @@ static int sun4i_spi_probe(struct udevice *bus) ret = clk_get_by_name(bus, "ahb", &priv->clk_ahb); if (ret) { - dev_err(dev, "failed to get ahb clock\n"); + dev_err(bus, "failed to get ahb clock\n"); return ret; } ret = clk_get_by_name(bus, "mod", &priv->clk_mod); if (ret) { - dev_err(dev, "failed to get mod clock\n"); + dev_err(bus, "failed to get mod clock\n"); return ret; } ret = reset_get_by_index(bus, 0, &priv->reset); if (ret && ret != -ENOENT) { - dev_err(dev, "failed to get reset\n"); + dev_err(bus, "failed to get reset\n"); return ret; } From patchwork Tue Sep 15 14:45:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364442 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=KT0/9xsN; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrR6p0cLmz9sTN for ; Wed, 16 Sep 2020 00:53:04 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E60C18241C; Tue, 15 Sep 2020 16:46:39 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="KT0/9xsN"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EE6F7823CE; Tue, 15 Sep 2020 16:46:20 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 7C52B823CD for ; Tue, 15 Sep 2020 16:46:18 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qk1-x742.google.com with SMTP id t138so4501427qka.0 for ; Tue, 15 Sep 2020 07:46:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7Tn521lDmA27/se0FK/JIyBavhDT2M94bT5tZLOQkQw=; b=KT0/9xsNBzYC5K8Fu5KuR6UZOQO805hZExv4sYS2rf8yuuue/SDAWkfNuhgd+BSQBU PMwBlz4D5JEEGtj0LrOSDrNKqp+UK3lLFR4HCkPTTivTADYxWjz2fgvCGnhQS91s8B1u 7Wz/v7U4KVIYGvoUrq2GaEyQMKSK9CGHffu/+rrTu9pfo0ZUws8vGAY6E/nxKIvb95lp lTeHooubNrwxOBlElFXiOVzOWY+A3KSN1HNwe4zTsRC+pbBsb1T0VH4oQJkQnGeS8u7O nL4sngUQYYZeDarSK6OocKX74TXjCcA1vAAGh4nFJWzeQncfVfyxRSn3FjY8Tvyl+d6M kGmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7Tn521lDmA27/se0FK/JIyBavhDT2M94bT5tZLOQkQw=; b=uVLekCS/7efJWMTH1jyWqzhq05lzTDOW020BuYaz2hTnOMwfIg3TBvnTfbj+Kbm5ZL nIJWl3hmiM/2aKfcSpStCF1Oi6VqcwlSEe9PbxaIMGCbKy38ieUZ64pRFQr0AieB2+n+ H2FzFnO1QmzYGd0yeKnFIU5qij4XfCUGUYq1/MTHZfwXV+vySYUXW8Df46udPxZzkulX R/HX0O4B4zBUFRIGTU5lRH0Joes0LolzW5U0BMAZu5+Gz4pOBU4undJ5Yo066Z36SphN Uk/5c2egotE+yJDJxqh/7hJWWGRSTfXCKBU9O9WN1PFb3pvHFyMKRoMrPCZs3f26MTMI BsXw== X-Gm-Message-State: AOAM533VHg/sRzbm9vrsUnXf5QY/i1dc9BoWYFbUa7JI+a4L7fSUQMF/ aDt02t2CuucTLmLBJRAC3eTZ0bOTHMe7w23S X-Google-Smtp-Source: ABdhPJwEhXrJ9VPrDQ6VgwSfSz70FiUSFrCNkb6BN4pXYxQ+r27HBrCNKKruG3423Vjh8w9/HprkuQ== X-Received: by 2002:a05:620a:11b1:: with SMTP id c17mr17716841qkk.94.1600181176963; Tue, 15 Sep 2020 07:46:16 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.46.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:46:16 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Jagan Teki , Michal Simek , Siva Durga Prasad Paladugu Subject: [PATCH v2 36/46] spi: zynqmp_gqspi: Fix not calling dev_err with a device Date: Tue, 15 Sep 2020 10:45:12 -0400 Message-Id: <20200915144522.509493-37-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Use `bus` instead of `dev`. Signed-off-by: Sean Anderson Reviewed-by: Michal Simek --- Changes in v2: - New drivers/spi/zynqmp_gqspi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/spi/zynqmp_gqspi.c b/drivers/spi/zynqmp_gqspi.c index a72986be90..e0e6687037 100644 --- a/drivers/spi/zynqmp_gqspi.c +++ b/drivers/spi/zynqmp_gqspi.c @@ -346,20 +346,20 @@ static int zynqmp_qspi_probe(struct udevice *bus) ret = clk_get_by_index(bus, 0, &clk); if (ret < 0) { - dev_err(dev, "failed to get clock\n"); + dev_err(bus, "failed to get clock\n"); return ret; } clock = clk_get_rate(&clk); if (IS_ERR_VALUE(clock)) { - dev_err(dev, "failed to get rate\n"); + dev_err(bus, "failed to get rate\n"); return clock; } debug("%s: CLK %ld\n", __func__, clock); ret = clk_enable(&clk); if (ret && ret != -ENOSYS) { - dev_err(dev, "failed to enable clock\n"); + dev_err(bus, "failed to enable clock\n"); return ret; } plat->frequency = clock; From patchwork Tue Sep 15 14:45:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364443 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=YZqQQFmW; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrR7016Chz9sTN for ; Wed, 16 Sep 2020 00:53:15 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BD74082423; Tue, 15 Sep 2020 16:46:40 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="YZqQQFmW"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0B4A3823CF; Tue, 15 Sep 2020 16:46:22 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qv1-xf44.google.com (mail-qv1-xf44.google.com [IPv6:2607:f8b0:4864:20::f44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 931FE8239D for ; Tue, 15 Sep 2020 16:46:19 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qv1-xf44.google.com with SMTP id cy2so1848142qvb.0 for ; Tue, 15 Sep 2020 07:46:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oPlkkeL2AzEBLjNPvo1JzMsCwXGcai8rCupqU5aOTuc=; b=YZqQQFmWU9e/FqNyWVC167maX2t0620di+XkhCENh5RqJbw3wmWb0feXfDNVx+LWK7 QEvB4IAkXSErPd7/7MjqlX3XduoaBbjqWzn5QizpEQHNAiFD+dHSoxAuRkcuDr9IiRjj zL862/xEJtC/Eh7DvcxhkRZUdOmr3Rbm3tSH8UTUL+XL01wDpj8m1mbACs9zbunm7oMH OYvC0rLY1X4Phu5V72eS6FjM9r7IFvtHXRTK79vPDd0f5O9sapO70VJ8AlmN57++ZYuw 9ZH8iGSVOJWg9jNGn9heu3Mpa02iD/GEcW9Y6eNEdiDqH5kMnzM+AQxIn5RUQ5GVWiq/ Z5Fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=oPlkkeL2AzEBLjNPvo1JzMsCwXGcai8rCupqU5aOTuc=; b=FagXGfmTh9RE/0wpRkxaVD6Hx/yOLMXPr1W06PsUFqDCBMquua+iRFDeyOKj4auBMf rKxUn8Xxbk5mTlPeJGY4UhsMjT7VkrrPfa2m0U33KzSs2SJlWernqloJYMR9Qu1b7iEV kWzpkj3SM9dcMUYLJY7KRIMDPxTs7rRw2G1tqMXyuK6X/wi1niwO4RmEFOzF6Vt9Zr/9 sYoXhqFmevn0Ce3SqhtDWvDmRtI9Uc0GEl7+osmE35d6v87JyhxqFOyqziR5bqVXinU0 LyyhMTbiu9VZNJo/7tg+WAQ6HT2IGkChoXiKlkYgHItbJdKDI2L581YIrqjo664bOjNv kChw== X-Gm-Message-State: AOAM5328I/c1KEGcOcn9PHKNNbKt8LX8PV1fnqEZkzC5jxk2SDr2Ptby w8QeI5XeYobNgINzt8LdG6kHzxoQKxZSamAi X-Google-Smtp-Source: ABdhPJx6SNOrIRc5WYC4Lb+qY2v93SqpTPs8vD8uZDRNSqP1oqYUEHwQn08AO9lD6maQpTRRdkJ4/A== X-Received: by 2002:a05:6214:a85:: with SMTP id ev5mr18908041qvb.1.1600181178157; Tue, 15 Sep 2020 07:46:18 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.46.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:46:17 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Andreas Dannenberg , Lokesh Vutla , Tom Rini Subject: [PATCH v2 37/46] sysreset: ti: Fix not calling dev_err with a device Date: Tue, 15 Sep 2020 10:45:13 -0400 Message-Id: <20200915144522.509493-38-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean The rst variable doesn't exist. Signed-off-by: Sean Anderson --- Changes in v2: - New drivers/sysreset/sysreset-ti-sci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/sysreset/sysreset-ti-sci.c b/drivers/sysreset/sysreset-ti-sci.c index 3877b9bc12..7707c72bb5 100644 --- a/drivers/sysreset/sysreset-ti-sci.c +++ b/drivers/sysreset/sysreset-ti-sci.c @@ -51,8 +51,7 @@ static int ti_sci_sysreset_request(struct udevice *dev, enum sysreset_t type) ret = cops->reboot_device(sci); if (ret) - dev_err(rst->dev, "%s: reboot_device failed (%d)\n", - __func__, ret); + dev_err(dev, "%s: reboot_device failed (%d)\n", __func__, ret); return ret; } From patchwork Tue Sep 15 14:45:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364444 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=teC9smwP; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrR7C14k8z9sTN for ; Wed, 16 Sep 2020 00:53:26 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9ECD782428; Tue, 15 Sep 2020 16:46:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="teC9smwP"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4D832823D0; Tue, 15 Sep 2020 16:46:23 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qv1-xf42.google.com (mail-qv1-xf42.google.com [IPv6:2607:f8b0:4864:20::f42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6FD13823C0 for ; Tue, 15 Sep 2020 16:46:20 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qv1-xf42.google.com with SMTP id db4so1830599qvb.4 for ; Tue, 15 Sep 2020 07:46:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uVip/wCukGSnb1mG8qLz6frbk43OcMO1jW8Rc6RqUN8=; b=teC9smwPCDZ2XQlZD111ITKRdoMUKcQi5KiHFclddwpdFRDrqCoBMp3i+Q/sZz1wY5 gA4Di0jpUgZ77fOGPi3F6CIOiQ+VMZpDFaJHMoJMagLmHZNQejxZT2fY/NTOKAzaOMdW etAExJMGJABmgG+g9n/uRPUP6154oiBjetp6kUOSptYrLSDJWVBWAW4H6+kLROC9mKNV grvOi8LZIEFPgHPxXzIAEJX3CyymtuW1vNrlj8BYvYNE46b32B0WJAhORG1EICNKGg2X gTi7VcYzpSl+mHwh6WM159Fov8lq4yUPD1LVUQqsaC31nlJWuu7+iyZh4RPFMGk51DzP tAIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uVip/wCukGSnb1mG8qLz6frbk43OcMO1jW8Rc6RqUN8=; b=O3zEmyY81/Lbn9zdUjSs7XYy1POxmtqgNUC4YRRw9uAr3lnv6bbg79jhQAHLT62E0L 2lZzviR/2ieAqSxubWhuOqCeOrBCPTzemPdEoPZi/ncwCmeTzUevaWve+UN3IoVibGIM MXolqSjxrjRFhojC6Kmzqj2T8knJfXnlv5LLo6pOjRjWjPH89TR8TDbem9NyelGy1H8/ zdU+d62xmeukzR18N9S7PLMcRLG+v8RTvcz97lShZSFSWDFxZZgVuMZ/c+m0uGmQ62LY LGrNhYO7b672f4nUe4UzYhtzWUEBAaZB4m5e0TtKM+7EP+HZ/57F7JUx6LEd88xcxc+l +bHw== X-Gm-Message-State: AOAM532YkqvwUZ615e5xNUylsgAvBn/T+Ne52Td+pN6hswNdemCFiPVf TDz8nFtsz6Kc9jCDEwTAWWrcc/oqzRQxKDSw X-Google-Smtp-Source: ABdhPJxFhnQPIwEUdr5X/nY7ljlX9XpGEuc3xV3KMHOhjtpR8HbWwHLyyqJ3zzfVeNZWhZcp77ioqA== X-Received: by 2002:a0c:e294:: with SMTP id r20mr2019145qvl.60.1600181179276; Tue, 15 Sep 2020 07:46:19 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.46.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:46:18 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Jean-Jacques Hiblot , Kever Yang , Marek Vasut , Vignesh Raghavendra Subject: [PATCH v2 38/46] usb: cdns3: Fix not calling dev_xxx with a device Date: Tue, 15 Sep 2020 10:45:14 -0400 Message-Id: <20200915144522.509493-39-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean ep0.c also need to include dm.h so dev_xxx can access udevice fields. Signed-off-by: Sean Anderson --- Changes in v2: - New drivers/usb/cdns3/ep0.c | 5 +++-- drivers/usb/cdns3/gadget.c | 3 +-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/cdns3/ep0.c b/drivers/usb/cdns3/ep0.c index a08c694559..acff79ae1c 100644 --- a/drivers/usb/cdns3/ep0.c +++ b/drivers/usb/cdns3/ep0.c @@ -11,8 +11,9 @@ */ #include -#include +#include #include +#include #include #include #include @@ -810,7 +811,7 @@ int cdns3_gadget_ep_set_wedge(struct usb_ep *ep) { struct cdns3_endpoint *priv_ep = ep_to_cdns3_ep(ep); - dev_dbg(priv_dev->dev, "Wedge for %s\n", ep->name); + dev_dbg(priv_ep->cdns3_dev->dev, "Wedge for %s\n", ep->name); cdns3_gadget_ep_set_halt(ep, 1); priv_ep->flags |= EP_WEDGE; diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c index 8f81d17ec8..83dbb5a103 100644 --- a/drivers/usb/cdns3/gadget.c +++ b/drivers/usb/cdns3/gadget.c @@ -2399,8 +2399,7 @@ static void cdns3_gadget_udc_set_speed(struct usb_gadget *gadget, case USB_SPEED_SUPER: break; default: - dev_err(cdns->dev, "invalid speed parameter %d\n", - speed); + dev_err(priv_dev->dev, "invalid speed parameter %d\n", speed); } priv_dev->gadget.speed = speed; From patchwork Tue Sep 15 14:45:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364445 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=bX/y/b/c; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrR7Q3ss0z9sTt for ; Wed, 16 Sep 2020 00:53:38 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 795F38242C; Tue, 15 Sep 2020 16:46:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="bX/y/b/c"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 50696823D0; Tue, 15 Sep 2020 16:46:24 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 7A17D823A8 for ; Tue, 15 Sep 2020 16:46:21 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qk1-x741.google.com with SMTP id d20so4462724qka.5 for ; Tue, 15 Sep 2020 07:46:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lDuY/KJmKlqIWM3HE3/fhKKOTrWZuMBhHTBZEtGHr2k=; b=bX/y/b/cl1CjDNJeJ5eQl5l9cV6E28ykxgPriB17GImq/Xp7eqrM1cX3Y0aOux/2h6 0yrCZEF6PjUb86w0S6V0G/8kbX0clEEn/ctLb3AFyoeHHBobiS82/8cB1HHDguDXkl4e FwlHr5Uxw6A9wdHPZbamdm0IGSkHGOHHEBENwUVkBU/7OtUawxzbkls/Bvn/vbJWQx8e c+C7XusB4j/NGbPPr8rpdof8IghY7r7Md/2PqPmkLvQUSysNY0VfvJgRNu0haYaWVbed o/j2l/VnFwC+SBNXmel1fjtm4ltwBPaqpt4D5CF+LoUHOvDNqRSLIDQAU7NeUmV+ogVW imIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lDuY/KJmKlqIWM3HE3/fhKKOTrWZuMBhHTBZEtGHr2k=; b=PJKDFYy9vfemeb0YjYiuWNbFgrd0RjGa6GSnuGzi3/8014Ko6olB5eNQ/dBHNEoDsd +6KS5wzDANr9tMKcUjtw6Rk7+pGDEfKB5qy4nZ3QqZ2t+k/pwkrQ44HBk/iVNa/PPATJ RniBqSZspqO5JFEZuqp6x3u2+6dNwYD5kOUurTuoJp5CzDo0wrb9CdsVxCdwX1yqk0uw d0xUja5V6NUteGZXYaLvb9iFdodvkehl8jeEtNw+71YBINiUQ752cHatwRuNRhaTE+73 rb27geBimeJ8MaXAbQAPManUdFjfrRDKqQ+7hT5iZ5p7/LdNaYmrnuSDVCuwC+rTMy67 gn5A== X-Gm-Message-State: AOAM530JL0SHx883B3IBtvHiGjMw7nTfFpA1QJByhuBPyi9NeBEWdnx2 y0gID7ShUxaN1IKjcbVEDwAt2X6drwik+trK X-Google-Smtp-Source: ABdhPJyF2f323ObfoOr6BGwK0McPQMbM+UrmcfzbbzD7wxi0qbvU1AAQl9ImYltLg5jAUUX6d3ZkkQ== X-Received: by 2002:a37:a992:: with SMTP id s140mr17240579qke.485.1600181180196; Tue, 15 Sep 2020 07:46:20 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.46.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:46:19 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Marek Vasut , Patrice Chotard , Patrick Delaunay Subject: [PATCH v2 39/46] usb: dwc2: Fix not calling dev_xxx with a device Date: Tue, 15 Sep 2020 10:45:15 -0400 Message-Id: <20200915144522.509493-40-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean This adds a dev argument to some functions so dev_xxx always has a device to log with. In one instance we must use use a different log function when we are compiled without DM_USB. Signed-off-by: Sean Anderson Reviewed-by: Patrice Chotard Reviewed-by: Patrick Delaunay --- Changes in v2: - New drivers/usb/host/dwc2.c | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dwc2.c index cefe9d83b1..f1d13b1c1d 100644 --- a/drivers/usb/host/dwc2.c +++ b/drivers/usb/host/dwc2.c @@ -114,7 +114,8 @@ static void init_fslspclksel(struct dwc2_core_regs *regs) * @param regs Programming view of DWC_otg controller. * @param num Tx FIFO to flush. */ -static void dwc_otg_flush_tx_fifo(struct dwc2_core_regs *regs, const int num) +static void dwc_otg_flush_tx_fifo(struct udevice *dev, + struct dwc2_core_regs *regs, const int num) { int ret; @@ -134,7 +135,8 @@ static void dwc_otg_flush_tx_fifo(struct dwc2_core_regs *regs, const int num) * * @param regs Programming view of DWC_otg controller. */ -static void dwc_otg_flush_rx_fifo(struct dwc2_core_regs *regs) +static void dwc_otg_flush_rx_fifo(struct udevice *dev, + struct dwc2_core_regs *regs) { int ret; @@ -152,7 +154,8 @@ static void dwc_otg_flush_rx_fifo(struct dwc2_core_regs *regs) * Do core a soft reset of the core. Be careful with this because it * resets all the internal state machines of the core. */ -static void dwc_otg_core_reset(struct dwc2_core_regs *regs) +static void dwc_otg_core_reset(struct udevice *dev, + struct dwc2_core_regs *regs) { int ret; @@ -284,8 +287,8 @@ static void dwc_otg_core_host_init(struct udevice *dev, clrbits_le32(®s->gotgctl, DWC2_GOTGCTL_HSTSETHNPEN); /* Make sure the FIFOs are flushed. */ - dwc_otg_flush_tx_fifo(regs, 0x10); /* All Tx FIFOs */ - dwc_otg_flush_rx_fifo(regs); + dwc_otg_flush_tx_fifo(dev, regs, 0x10); /* All Tx FIFOs */ + dwc_otg_flush_rx_fifo(dev, regs); /* Flush out any leftover queued requests. */ num_channels = readl(®s->ghwcfg2); @@ -306,7 +309,7 @@ static void dwc_otg_core_host_init(struct udevice *dev, ret = wait_for_bit_le32(®s->hc_regs[i].hcchar, DWC2_HCCHAR_CHEN, false, 1000, false); if (ret) - dev_info("%s: Timeout!\n", __func__); + dev_info(dev, "%s: Timeout!\n", __func__); } /* Turn on the vbus power. */ @@ -330,8 +333,9 @@ static void dwc_otg_core_host_init(struct udevice *dev, * * @param regs Programming view of the DWC_otg controller */ -static void dwc_otg_core_init(struct dwc2_priv *priv) +static void dwc_otg_core_init(struct udevice *dev) { + struct dwc2_priv *priv = dev_get_priv(dev); struct dwc2_core_regs *regs = priv->regs; uint32_t ahbcfg = 0; uint32_t usbcfg = 0; @@ -360,7 +364,7 @@ static void dwc_otg_core_init(struct dwc2_priv *priv) writel(usbcfg, ®s->gusbcfg); /* Reset the Controller */ - dwc_otg_core_reset(regs); + dwc_otg_core_reset(dev, regs); /* * This programming sequence needs to happen in FS mode before @@ -372,7 +376,7 @@ static void dwc_otg_core_init(struct dwc2_priv *priv) setbits_le32(®s->gusbcfg, DWC2_GUSBCFG_PHYSEL); /* Reset after a PHY select */ - dwc_otg_core_reset(regs); + dwc_otg_core_reset(dev, regs); /* * Program DCFG.DevSpd or HCFG.FSLSPclkSel to 48Mhz in FS. @@ -419,7 +423,7 @@ static void dwc_otg_core_init(struct dwc2_priv *priv) writel(usbcfg, ®s->gusbcfg); /* Reset after setting the PHY parameters */ - dwc_otg_core_reset(regs); + dwc_otg_core_reset(dev, regs); #endif usbcfg = readl(®s->gusbcfg); @@ -1128,7 +1132,12 @@ int _submit_int_msg(struct dwc2_priv *priv, struct usb_device *dev, timeout = get_timer(0) + USB_TIMEOUT_MS(pipe); for (;;) { if (get_timer(0) > timeout) { - dev_err(dev, "Timeout poll on interrupt endpoint\n"); +#if CONFIG_IS_ENABLED(DM_USB) + dev_err(dev->dev, + "Timeout poll on interrupt endpoint\n"); +#else + log_err("Timeout poll on interrupt endpoint\n"); +#endif return -ETIMEDOUT; } ret = _submit_bulk_msg(priv, dev, pipe, buffer, len); @@ -1194,7 +1203,7 @@ static int dwc2_init_common(struct udevice *dev, struct dwc2_priv *priv) priv->ext_vbus = 0; #endif - dwc_otg_core_init(priv); + dwc_otg_core_init(dev); dwc_otg_core_host_init(dev, regs); clrsetbits_le32(®s->hprt0, DWC2_HPRT0_PRTENA | @@ -1320,12 +1329,10 @@ static int dwc2_submit_int_msg(struct udevice *dev, struct usb_device *udev, static int dwc2_usb_ofdata_to_platdata(struct udevice *dev) { struct dwc2_priv *priv = dev_get_priv(dev); - fdt_addr_t addr; - addr = dev_read_addr(dev); - if (addr == FDT_ADDR_T_NONE) + priv->regs = dev_read_addr_ptr(dev); + if (!priv->regs) return -EINVAL; - priv->regs = (struct dwc2_core_regs *)addr; priv->oc_disable = dev_read_bool(dev, "disable-over-current"); priv->hnp_srp_disable = dev_read_bool(dev, "hnp-srp-disable"); From patchwork Tue Sep 15 14:45:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364446 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=INifoagJ; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrR7p4PXLz9sVK for ; Wed, 16 Sep 2020 00:53:58 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CD28182436; Tue, 15 Sep 2020 16:46:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="INifoagJ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4001B823D3; Tue, 15 Sep 2020 16:46:26 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3FC6B823D1 for ; Tue, 15 Sep 2020 16:46:23 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qk1-x741.google.com with SMTP id w12so4457249qki.6 for ; Tue, 15 Sep 2020 07:46:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tiHyIJh3IXQ2xfCb6OFT6ZWIBfe9ldzxVGxJltOhbsI=; b=INifoagJJd7t4YH2sGYbGcFpTTT967vYPBe+UWATXw+lYvtxrIQt6NsXE7OiOofxLD X2EoiEmweD6DQ8o+dxZDDGQDzv3YoJwjzvoQQrHKrCdSfOu3hhSu42qc8cRWKgbHaUgh B5LjtVVSLggayrTo2V3sv4NCYb3qnUVrI9YvavT6mshKakwfNCAn5uI4KzCkyd81saq1 dTKhagKWBKwAmt9DoFs1WnEKJXq6vj4YcF6IWIAKdWfY7eaXWmIGnsObzOICLJc861MI b02uMZYuf5gU9nk5JAlAxnLaXFQMCjMxOENEt4cQQL3UhhANrezOjt2D+U2O2ZCagcgr b2yQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tiHyIJh3IXQ2xfCb6OFT6ZWIBfe9ldzxVGxJltOhbsI=; b=hRE1FIx/mgI2Hk2aYU9uRD/Lh+RiwymwjaDjxxC/UD8Qp9XkEuBM+83HI7/Nk9/qsX NhR8Hm+hx3yWDrgDsGu/upP1P6696nMaPORmqsvB0Q3YkD9PKa1pM1J3+20m0SvvGSTW Sb45nkQs/lrdLDt5PCoJBxcOIlMBex7NLaSNLTkpefe1wRbI8eWWnwB7tYr0OKXbgcmf 81rbP5+iznTyKgolBwSySFaRyeGnBZYKbL758sb3shqvjOTqu6VTcoE2+b6PrBlPFvEW 9e0bviWIzn25pc61wFIZT30JgjjawoZOIUlOx0eeTBI7zu40jeCscFSKX3IlPamsCgBS 5+xg== X-Gm-Message-State: AOAM530IbHueUjcx+vmwFv01KjqmSakfXO+b0jd/t6wSOc1kgX++NRB0 mgtkdKR3X7yRqCIafuU8uTLqLHddFRkmQmJb X-Google-Smtp-Source: ABdhPJwV1LZjdq21ctDdQhNWTZHVg0AmiTEQMMFzq+AKvfav8cv/phtIpU37em2+FSAs0jDHtIJSUA== X-Received: by 2002:a37:2715:: with SMTP id n21mr18248092qkn.401.1600181181540; Tue, 15 Sep 2020 07:46:21 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.46.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:46:20 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Frank Wang , Jagan Teki , Jean-Jacques Hiblot , Kever Yang , Lukasz Majewski , Marek Vasut Subject: [PATCH v2 40/46] usb: dwc3: Fix not calling dev_xxx with a device Date: Tue, 15 Sep 2020 10:45:16 -0400 Message-Id: <20200915144522.509493-41-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean This logs with the device from struct dwc3. Some files also need to include dm.h so fields in udevice can be accessed. Signed-off-by: Sean Anderson --- Changes in v2: - New drivers/usb/dwc3/core.c | 15 ++++++++------- drivers/usb/dwc3/ep0.c | 1 + drivers/usb/dwc3/gadget.c | 23 ++++++++++++----------- 3 files changed, 21 insertions(+), 18 deletions(-) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 8682556589..2e003530a1 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -592,7 +592,7 @@ static int dwc3_core_init_mode(struct dwc3 *dwc) dwc3_set_mode(dwc, DWC3_GCTL_PRTCAP_DEVICE); ret = dwc3_gadget_init(dwc); if (ret) { - dev_err(dev, "failed to initialize gadget\n"); + dev_err(dwc->dev, "failed to initialize gadget\n"); return ret; } break; @@ -600,7 +600,7 @@ static int dwc3_core_init_mode(struct dwc3 *dwc) dwc3_set_mode(dwc, DWC3_GCTL_PRTCAP_HOST); ret = dwc3_host_init(dwc); if (ret) { - dev_err(dev, "failed to initialize host\n"); + dev_err(dwc->dev, "failed to initialize host\n"); return ret; } break; @@ -608,18 +608,19 @@ static int dwc3_core_init_mode(struct dwc3 *dwc) dwc3_set_mode(dwc, DWC3_GCTL_PRTCAP_OTG); ret = dwc3_host_init(dwc); if (ret) { - dev_err(dev, "failed to initialize host\n"); + dev_err(dwc->dev, "failed to initialize host\n"); return ret; } ret = dwc3_gadget_init(dwc); if (ret) { - dev_err(dev, "failed to initialize gadget\n"); + dev_err(dwc->dev, "failed to initialize gadget\n"); return ret; } break; default: - dev_err(dev, "Unsupported mode of operation %d\n", dwc->dr_mode); + dev_err(dwc->dev, + "Unsupported mode of operation %d\n", dwc->dr_mode); return -EINVAL; } @@ -768,7 +769,7 @@ int dwc3_uboot_init(struct dwc3_device *dwc3_dev) ret = dwc3_core_init(dwc); if (ret) { - dev_err(dev, "failed to initialize core\n"); + dev_err(dwc->dev, "failed to initialize core\n"); goto err0; } @@ -974,7 +975,7 @@ int dwc3_init(struct dwc3 *dwc) ret = dwc3_core_init(dwc); if (ret) { - dev_err(dev, "failed to initialize core\n"); + dev_err(dwc->dev, "failed to initialize core\n"); goto core_fail; } diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c index 385bed3e34..75ac993bc6 100644 --- a/drivers/usb/dwc3/ep0.c +++ b/drivers/usb/dwc3/ep0.c @@ -14,6 +14,7 @@ */ #include #include +#include #include #include #include diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 2aec874e1d..4e68fb0a82 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -633,7 +634,7 @@ static int dwc3_gadget_ep_enable(struct usb_ep *ep, strlcat(dep->name, "-int", sizeof(dep->name)); break; default: - dev_err(dwc->dev, "invalid endpoint transfer type\n"); + dev_err(dep->dwc->dev, "invalid endpoint transfer type\n"); } spin_lock_irqsave(&dwc->lock, flags); @@ -708,10 +709,9 @@ static void dwc3_prepare_one_trb(struct dwc3_ep *dep, { struct dwc3_trb *trb; - dev_vdbg(dwc->dev, "%s: req %p dma %08llx length %d%s%s\n", - dep->name, req, (unsigned long long) dma, - length, last ? " last" : "", - chain ? " chain" : ""); + dev_vdbg(dep->dwc->dev, "%s: req %p dma %08llx length %d%s%s\n", + dep->name, req, (unsigned long long)dma, + length, last ? " last" : "", chain ? " chain" : ""); trb = &dep->trb_pool[dep->free_slot & DWC3_TRB_MASK]; @@ -1074,21 +1074,22 @@ static int dwc3_gadget_ep_queue(struct usb_ep *ep, struct usb_request *request, spin_lock_irqsave(&dwc->lock, flags); if (!dep->endpoint.desc) { - dev_dbg(dwc->dev, "trying to queue request %p to disabled %s\n", - request, ep->name); + dev_dbg(dep->dwc->dev, + "trying to queue request %p to disabled %s\n", request, + ep->name); ret = -ESHUTDOWN; goto out; } if (req->dep != dep) { - WARN(true, "request %p belongs to '%s'\n", - request, req->dep->name); + WARN(true, "request %p belongs to '%s'\n", request, + req->dep->name); ret = -EINVAL; goto out; } - dev_vdbg(dwc->dev, "queing request %p to %s length %d\n", - request, ep->name, request->length); + dev_vdbg(dep->dwc->dev, "queing request %p to %s length %d\n", + request, ep->name, request->length); ret = __dwc3_gadget_ep_queue(dep, req); From patchwork Tue Sep 15 14:45:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364447 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=gZBEoMNc; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrR823HfFz9sTN for ; Wed, 16 Sep 2020 00:54:09 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B28CD8243A; Tue, 15 Sep 2020 16:46:57 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="gZBEoMNc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9CEA8823D9; Tue, 15 Sep 2020 16:46:26 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qk1-x744.google.com (mail-qk1-x744.google.com [IPv6:2607:f8b0:4864:20::744]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id CB0A2823C0 for ; Tue, 15 Sep 2020 16:46:23 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qk1-x744.google.com with SMTP id o5so4395343qke.12 for ; Tue, 15 Sep 2020 07:46:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NrdBCAVZVfH6knOiTb8Zk809MI0xHuWGHFYLdu9euqU=; b=gZBEoMNc2YG/fzzp3TB6VGUf12eXEth6zWRHsMX5rkdV6B2zJEHZtRk4OAfCdUoACy 6BjF96j0EQnwrf1eAIyvKBtyaFdtj8ksEGg+vWfGx4/+yTLc9RjizldhWEGAg/x+chvC 7EngjqeYTGjHs9SSVK6Mbms4AfbcCUxf4CjUTslByIBn/wSB7/U8sZDQ/w7m/8U0AJvS 9p88/55TEzQt/67vnqSH8Fy/XNWtfZ321kfBITFW0kIVOChqAQ5drzOV7gdLTgI/remR UIwX2i9hcu24MjXHbvxLOZv7k/W64yOveQa4KcNkUQAQMDpSFWZBiWYheV6rwk6QGdDz GzGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NrdBCAVZVfH6knOiTb8Zk809MI0xHuWGHFYLdu9euqU=; b=FHqqnPbTU8/CxEHbl07d1Ah6oZeW2pUdcy4Rmo6Rzp7xA9uTv5csJNuyWmWaUxh7Rq GgWYxpRSXtnO26kunHsje4PRcAuxbEBuIgRU/i5Fa5uplNKkcgBfvyIg+uDycmVy3tno 6EcSN3LYHT8YlpOzNV/cjj0Emo0IeVjLEmN3GR4gvgFrjViesejj4lXCsvUTxgPwtHmS xSP2x+mGmBg5Us9REKXe/CGBvcmxvMkIDRodw34JxVC1pqORl2zqQfDSyEEmC9eiGB7U rZGWapp6GFxtqz/PIw5LJn8C8Uhiy+ZMwgPBrYgZgr+Mt1/uRidFb0Un4oIIbAGTrPNU se1w== X-Gm-Message-State: AOAM530IdrAd3oPYE+EN3fTaZC/c+r29uRLke24Xrgyv0PZbUw2Y2HyQ cHO+TUtdLtEDBXtAKXkivuWWh7eNmGeyI8wv X-Google-Smtp-Source: ABdhPJxqC7QqxiFUBPDR8YAnQmxSZl1zeE+KVkUHhTmr+WUOAIiwb4jAuwF0rxgGqII+QWj5w/QTdw== X-Received: by 2002:a37:6441:: with SMTP id y62mr18798783qkb.144.1600181182604; Tue, 15 Sep 2020 07:46:22 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.46.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:46:22 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Lukasz Majewski , Marek Vasut , Michal Simek , Mugunthan V N , Stefan Agner Subject: [PATCH v2 41/46] usb: dwc3: ti: Fix not calling dev_err with a device Date: Tue, 15 Sep 2020 10:45:17 -0400 Message-Id: <20200915144522.509493-42-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean This driver does not use DM, so use log_xxx instead. Signed-off-by: Sean Anderson --- Changes in v2: - New drivers/usb/dwc3/ti_usb_phy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc3/ti_usb_phy.c b/drivers/usb/dwc3/ti_usb_phy.c index f8ab06482c..f476810763 100644 --- a/drivers/usb/dwc3/ti_usb_phy.c +++ b/drivers/usb/dwc3/ti_usb_phy.c @@ -129,7 +129,7 @@ static struct usb3_dpll_params *ti_usb3_get_dpll_params(struct ti_usb_phy *phy) return &dpll_map->params; } - dev_err(phy->dev, "No DPLL configuration for %lu Hz SYS CLK\n", rate); + log_err("No DPLL configuration for %lu Hz SYS CLK\n", rate); return NULL; } @@ -269,7 +269,7 @@ int ti_usb_phy_uboot_init(struct ti_usb_phy_device *dev) phy = devm_kzalloc(NULL, sizeof(*phy), GFP_KERNEL); if (!phy) { - dev_err(NULL, "unable to alloc mem for TI USB3 PHY\n"); + log_err("unable to alloc mem for TI USB3 PHY\n"); return -ENOMEM; } From patchwork Tue Sep 15 14:45:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364448 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=Ww1L++HH; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrR8F2GrRz9sTN for ; Wed, 16 Sep 2020 00:54:20 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 82CBB82441; Tue, 15 Sep 2020 16:46:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Ww1L++HH"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8021E823DE; Tue, 15 Sep 2020 16:46:27 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qk1-x744.google.com (mail-qk1-x744.google.com [IPv6:2607:f8b0:4864:20::744]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E3AF5823C6 for ; Tue, 15 Sep 2020 16:46:24 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qk1-x744.google.com with SMTP id o16so4431413qkj.10 for ; Tue, 15 Sep 2020 07:46:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=O9BhKGMxnuVCNmvE8lMYSMvHQ6xL5LDexgt3/PAFwVk=; b=Ww1L++HHsKvAvT36a8DQn6KXAr1RVK58+9N14sUSaReD9Eb3TcNycjaVjJYh7MxgHC xJ5Mh7G8d3QshnY2fqM61e2KTg1yAtEa0Pewobos1ZbV2fRK8epfYXDc0E4s6H9dCmoE nkem937wmHlSaBZfXGorzSRlLSeYNE79ixaudyClDrBj0qgAGUsIdFlQ2p/08EXibhCp IrG1RHSAihBGTlpKyEge+y79jcYQ0vHm6Z0qfwi9DfnBNw+ND8+OYedoP4ARjvCprHxV H2j6S4d1RmmoVJ1Wh4PF/w8DNvADQ/ebFQhfZW7GuKgQfMzGBjfk2V2QOR1mur+yLi6r bbFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=O9BhKGMxnuVCNmvE8lMYSMvHQ6xL5LDexgt3/PAFwVk=; b=oT17GVrmXrY18qqOdC3YxkAd3/rRPrmgfJpOorGgAse+ZofWc06hFTMVFFnmJo5PoV 0sPTQCUQyAJ7IF0PYDRzJCUI15ZcW6RGGTy5e0WA4WcRGmBlZeJ+jOVDSFeBPb/shVaM VYY2jKDeHAYu+MGfxe9dd6gdT/JIP6+1EAzPK7ErYIBwHhricZ1xhDiZyTZpLxUN2IU8 uiv35TtyedxgIU1Ow3KGGVMdWLu138DtOFD2/XDBbZXqvwk6OmgKe3u8y7xNOZUO6Cop +3zW/zmGVbthdlNIY9kzIzulgQf0m6ANKQ/+fr5UoPBY6RXPRSE6hNcPnsDyGY/h2CME lwnA== X-Gm-Message-State: AOAM531QVytwp47g3AZuwxAXUr+IrRwpHl6QS9EQ/tuixHAZG4rS7het qVnpiTMpiXugSOYSa1Op3DydAK01IHTgWgmo X-Google-Smtp-Source: ABdhPJzYQ+lC8BeEjaA3qhAjdSnxOgMpQxJTbwB/gWzDZpXdtN+gZb2nNYwJ2bRabmhEy1f1X8r9fg== X-Received: by 2002:ae9:e00b:: with SMTP id m11mr17824163qkk.141.1600181183550; Tue, 15 Sep 2020 07:46:23 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.46.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:46:23 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Frank Wang , Jean-Jacques Hiblot , Kever Yang , Lukasz Majewski , Marek Vasut Subject: [PATCH v2 42/46] usb: dwc3: Don't include asm-generic/io.h Date: Tue, 15 Sep 2020 10:45:18 -0400 Message-Id: <20200915144522.509493-43-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean This can conflict with asm/io.h on some archs, and it isn't needed to build dwc3-generic.c Signed-off-by: Sean Anderson --- Changes in v2: - New drivers/usb/dwc3/dwc3-generic.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c index 551f682024..97aa3a3a5c 100644 --- a/drivers/usb/dwc3/dwc3-generic.c +++ b/drivers/usb/dwc3/dwc3-generic.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include From patchwork Tue Sep 15 14:45:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364449 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=cGQwpbH8; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrR8S2M6tz9sVK for ; Wed, 16 Sep 2020 00:54:32 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 893D382449; Tue, 15 Sep 2020 16:46:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="cGQwpbH8"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8C16A823E0; Tue, 15 Sep 2020 16:46:28 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qt1-x843.google.com (mail-qt1-x843.google.com [IPv6:2607:f8b0:4864:20::843]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E8B97823CF for ; Tue, 15 Sep 2020 16:46:25 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qt1-x843.google.com with SMTP id v54so3327010qtj.7 for ; Tue, 15 Sep 2020 07:46:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4q5YU5teLU5LppkZUSopwFtzPSHYyEI6+IHN87Fopho=; b=cGQwpbH8xCobx24IO3COO2+fHQuQR910W/x956qYWT8GftQEHPsql79A2n/oysYSs2 epRTIX8oYoiR1gaYtq1DzecHhF28nCMBRVKJ2rXrn3IHbFWLHm+YEUR21PCS5VXHnipJ UXa4IC0klnPxxrdpyn8jzVr/jfsCQUkqO9kg+y/TXh46TSYEjEKR3rBb8jfw4KM+xmli JgAnbetRpsQy6AhCgQDBRGTNA6dMZKpboYDufUdR7iXjIwuY9Tl2op7AYrtGafvpDs9e MNvhOGyApXAMG7us5byFEnsQJPLGUYFpWUKDxLBqbr8WHfhZGO7mAEtWSTd/g6blwxK5 9inw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4q5YU5teLU5LppkZUSopwFtzPSHYyEI6+IHN87Fopho=; b=iiFSWIWxbStVnRPmuaL+rlebqLL+YkGXK+231CD0EQQQh6NFC/NJNUfDC+pL6uyuVc 5WeRsCXG1W9UvqYOTJnU3mvIS76KqSj4Z4pznPCV2iesqoC0aiQyslksaYG6AqVMcw8e BUqbGOjM762jkXxzgDsxchY5LUqdZgUlmiZEoGs5dDIOtPRdOqMXrQr0mtnzlYo20GEc QLDhvPsJlHMyJQA+imY86mPzuzh7JnZJ2lyszmzSLjxcMwEKTVuIqHEO7iqGP/zFA/S5 wdJ2PQlF0X4Od/Ik7a3kXDF7goYaO1jEt0hxA+88fMfS/CGnpc0XBuQkm3SQE7Ea9/QU l8Eg== X-Gm-Message-State: AOAM531mk/OQtYHhEkNaWq79mAkAQ2ljceeaJAxFdZtGNBciWuP4i7FR M7y5fuSKpxPz4r/YYt/MTxuqHONOQvpqxuCu X-Google-Smtp-Source: ABdhPJzuVrwe1iH2ncj5ZPooG65IvkgTNEi8oH9Ezfjtg0xvNn8mBU3Hbto1hlohdMYvbECST95+Ig== X-Received: by 2002:ac8:4e86:: with SMTP id 6mr17604988qtp.331.1600181184731; Tue, 15 Sep 2020 07:46:24 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.46.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:46:24 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Chen-Yu Tsai , Jagan Teki , Jun Nie , Marek Vasut Subject: [PATCH v2 43/46] usb: musb-new: sunxi: Fix not calling dev_err with a device Date: Tue, 15 Sep 2020 10:45:19 -0400 Message-Id: <20200915144522.509493-44-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean This driver does not use DM, so we need to use a struct device instead of a struct udevice. Not ideal, but it'll have to do for now. Signed-off-by: Sean Anderson --- Changes in v2: - New drivers/usb/musb-new/sunxi.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c index 53c336fc3f..cf128f148c 100644 --- a/drivers/usb/musb-new/sunxi.c +++ b/drivers/usb/musb-new/sunxi.c @@ -301,21 +301,21 @@ static int sunxi_musb_init(struct musb *musb) ret = clk_enable(&glue->clk); if (ret) { - dev_err(dev, "failed to enable clock\n"); + dev_err(musb->controller, "failed to enable clock\n"); return ret; } if (reset_valid(&glue->rst)) { ret = reset_deassert(&glue->rst); if (ret) { - dev_err(dev, "failed to deassert reset\n"); + dev_err(musb->controller, "failed to deassert reset\n"); goto err_clk; } } ret = generic_phy_init(&glue->phy); if (ret) { - dev_err(dev, "failed to init USB PHY\n"); + dev_err(musb->controller, "failed to init USB PHY\n"); goto err_rst; } @@ -352,7 +352,8 @@ static int sunxi_musb_exit(struct musb *musb) if (generic_phy_valid(&glue->phy)) { ret = generic_phy_exit(&glue->phy); if (ret) { - dev_err(dev, "failed to power off usb phy\n"); + dev_err(musb->controller, + "failed to power off usb phy\n"); return ret; } } From patchwork Tue Sep 15 14:45:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364450 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=oFBmsMJf; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrR8h1cfBz9sVK for ; Wed, 16 Sep 2020 00:54:43 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C0CDB82450; Tue, 15 Sep 2020 16:47:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="oFBmsMJf"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BAEDD823E6; Tue, 15 Sep 2020 16:46:29 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qt1-x841.google.com (mail-qt1-x841.google.com [IPv6:2607:f8b0:4864:20::841]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 21F56823D8 for ; Tue, 15 Sep 2020 16:46:27 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qt1-x841.google.com with SMTP id p65so3358980qtd.2 for ; Tue, 15 Sep 2020 07:46:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kOBDQo5M/PFAXhWvKsssRL5BL5InPOAzzOqelCMCt0g=; b=oFBmsMJfInu9uI/dy29Ph/9pihqblWJ7+MvbpnNrNYjZJrfuDWrJ0PoMN+59Rz8by/ gPGB1GeeZTgJPpiNopzxMrlNXQXzzmDvxVhRe5NYaDeX4+GqxVbPc18iU95IHLw5uBhb 8VXSO0luJkMyMNzC3Dja76vGHoduqeARx1p40ZExHWNrMCIBJrbaBITOEqbTU3Vyc3UX jwqCAYszUcyFrjx5Ro/6GxpKeafDX7NzZ4wNR7Y5Va6MFgYOxdrb2p7bK3vt6k27RzXY 8r6sxNdP61efCn/CR7ySFbxcaFlkOm2l31DXhqc0UR1t9X+t6z2Fj7CRG7rLGpYQf4L1 2n3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kOBDQo5M/PFAXhWvKsssRL5BL5InPOAzzOqelCMCt0g=; b=af/Kezdr0ZKW3NyGBjgdQp1KCSMkntXabrzWVm8nIFWiJ0oTXNm6uEaj0Jm1VTve7g cksW1yLcDBiJ2lYdFvfbHCBDwD7C1ebHYFSOAYGOIMtnmQLq//2e0/QLBcauP3wlPKGi eBay+sra4Ll+qso/AkmkIUpiasWSUNK2smJD8QCzus613cscdpfPId6mouWzIA7Vv8Di kjK98Xee6vjr56Fh/dZdFmVpoDEO75ksEI9Et3p2zii/q9Mqhn/RsgLSXokhTC/Wpetq muZyRAjMSjAvJVZIGKFAIaBPAVJm9wpqalQ9YApp5YJtx0dVUpVpPz8btj1EZ1aSUac1 i10g== X-Gm-Message-State: AOAM530WH5IUFGdKLiFrbXJ8anzI9bmxWJ/9dXan7m1yzaYf/oohJmlo j9b9JAvk2HrhZMv995RMK3V96oUPMVlc//wk X-Google-Smtp-Source: ABdhPJwF4EWyefPWUGE1Q4tYCEJ7XiYWKp66rdcPOxhF8GzdzvVeYZHcdHxKHYpCAXfEYGZ9cHWooA== X-Received: by 2002:ac8:4a84:: with SMTP id l4mr6164658qtq.367.1600181185744; Tue, 15 Sep 2020 07:46:25 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.46.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:46:25 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Anatolij Gustschin , Patrick Delaunay , Simon Glass , =?utf-8?q?Yannick_Fertr=C3=A9?= Subject: [PATCH v2 44/46] video: stm32: Fix not calling dev_xxx with a device Date: Tue, 15 Sep 2020 10:45:20 -0400 Message-Id: <20200915144522.509493-45-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean There is no member `dev` in dw_mipi_dsi, but there is one in mipi_dsi_host, so use that. Signed-off-by: Sean Anderson Reviewed-by: Patrick Delaunay --- Changes in v2: - New drivers/video/dw_mipi_dsi.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/drivers/video/dw_mipi_dsi.c b/drivers/video/dw_mipi_dsi.c index b7bfbb5e50..2743836fb4 100644 --- a/drivers/video/dw_mipi_dsi.c +++ b/drivers/video/dw_mipi_dsi.c @@ -314,7 +314,8 @@ static int dw_mipi_dsi_gen_pkt_hdr_write(struct dw_mipi_dsi *dsi, u32 hdr_val) val, !(val & GEN_CMD_FULL), CMD_PKT_STATUS_TIMEOUT_US); if (ret) { - dev_err(dsi->dev, "failed to get available command FIFO\n"); + dev_err(dsi->dsi_host.dev, + "failed to get available command FIFO\n"); return ret; } @@ -325,7 +326,7 @@ static int dw_mipi_dsi_gen_pkt_hdr_write(struct dw_mipi_dsi *dsi, u32 hdr_val) val, (val & mask) == mask, CMD_PKT_STATUS_TIMEOUT_US); if (ret) { - dev_err(dsi->dev, "failed to write command FIFO\n"); + dev_err(dsi->dsi_host.dev, "failed to write command FIFO\n"); return ret; } @@ -357,7 +358,7 @@ static int dw_mipi_dsi_write(struct dw_mipi_dsi *dsi, val, !(val & GEN_PLD_W_FULL), CMD_PKT_STATUS_TIMEOUT_US); if (ret) { - dev_err(dsi->dev, + dev_err(dsi->dsi_host.dev, "failed to get available write payload FIFO\n"); return ret; } @@ -380,7 +381,7 @@ static int dw_mipi_dsi_read(struct dw_mipi_dsi *dsi, val, !(val & GEN_RD_CMD_BUSY), CMD_PKT_STATUS_TIMEOUT_US); if (ret) { - dev_err(dsi->dev, "Timeout during read operation\n"); + dev_err(dsi->dsi_host.dev, "Timeout during read operation\n"); return ret; } @@ -390,7 +391,8 @@ static int dw_mipi_dsi_read(struct dw_mipi_dsi *dsi, val, !(val & GEN_PLD_R_EMPTY), CMD_PKT_STATUS_TIMEOUT_US); if (ret) { - dev_err(dsi->dev, "Read payload FIFO is empty\n"); + dev_err(dsi->dsi_host.dev, + "Read payload FIFO is empty\n"); return ret; } @@ -411,7 +413,7 @@ static ssize_t dw_mipi_dsi_host_transfer(struct mipi_dsi_host *host, ret = mipi_dsi_create_packet(&packet, msg); if (ret) { - dev_err(dsi->dev, "failed to create packet: %d\n", ret); + dev_err(host->dev, "failed to create packet: %d\n", ret); return ret; } @@ -702,13 +704,15 @@ static void dw_mipi_dsi_dphy_enable(struct dw_mipi_dsi *dsi) ret = readl_poll_timeout(dsi->base + DSI_PHY_STATUS, val, val & PHY_LOCK, PHY_STATUS_TIMEOUT_US); if (ret) - dev_warn(dsi->dev, "failed to wait phy lock state\n"); + dev_warn(dsi->dsi_host.dev, + "failed to wait phy lock state\n"); ret = readl_poll_timeout(dsi->base + DSI_PHY_STATUS, val, val & PHY_STOP_STATE_CLK_LANE, PHY_STATUS_TIMEOUT_US); if (ret) - dev_warn(dsi->dev, "failed to wait phy clk lane stop state\n"); + dev_warn(dsi->dsi_host.dev, + "failed to wait phy clk lane stop state\n"); } static void dw_mipi_dsi_clear_err(struct dw_mipi_dsi *dsi) @@ -729,7 +733,7 @@ static void dw_mipi_dsi_bridge_set(struct dw_mipi_dsi *dsi, ret = phy_ops->get_lane_mbps(dsi->device, timings, device->lanes, device->format, &dsi->lane_mbps); if (ret) - dev_warn(dsi->dev, "Phy get_lane_mbps() failed\n"); + dev_warn(dsi->dsi_host.dev, "Phy get_lane_mbps() failed\n"); dw_mipi_dsi_init_pll(dsi); dw_mipi_dsi_dpi_config(dsi, timings); @@ -748,7 +752,7 @@ static void dw_mipi_dsi_bridge_set(struct dw_mipi_dsi *dsi, ret = phy_ops->init(dsi->device); if (ret) - dev_warn(dsi->dev, "Phy init() failed\n"); + dev_warn(dsi->dsi_host.dev, "Phy init() failed\n"); dw_mipi_dsi_dphy_enable(dsi); From patchwork Tue Sep 15 14:45:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364451 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=PckWkVd2; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrR8t5CtVz9sTt for ; Wed, 16 Sep 2020 00:54:54 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D93CC82454; Tue, 15 Sep 2020 16:47:02 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="PckWkVd2"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C3642823E8; Tue, 15 Sep 2020 16:46:30 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qv1-xf30.google.com (mail-qv1-xf30.google.com [IPv6:2607:f8b0:4864:20::f30]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 2D697823DE for ; Tue, 15 Sep 2020 16:46:28 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qv1-xf30.google.com with SMTP id h1so1814992qvo.9 for ; Tue, 15 Sep 2020 07:46:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FCnLPWCh8Cm/wVUSpr/W/Maa+XJjyBmx6SCexl/F3cU=; b=PckWkVd2HWym/tFaNe/QD3w0LTJ4WsIDK4ulzhTuzkG4/HGvs2eDq1JDLsTjnXdtbK Jb6s5OoBlS7Zbx/6qJHCt+ZGsFFTgOiyBe4oUxhHYHlKwxfjjolpWRftoY/LHje7TMrx oSF0xkMGQIR8kNxYkVMgRZwrJJYfpFl3u9+iWoyyB/TW71ECdhcmsWF/yWgXZpMZ2LFj EKvCdNxulN6q9STeKtrxMnadrh606T5nK+/0I7m/mAvU9pOoEQEgmzi1nSQne2wDsLFf n5MXcmOe0F5y88tBf6sSdh4782mxawNe5zkq+HMAff0Lxx7sZpwXj7N+TdzDlBOrSYng 3/8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FCnLPWCh8Cm/wVUSpr/W/Maa+XJjyBmx6SCexl/F3cU=; b=mD4hDvjQUqjTE9BNXifdXglL6fjjjrnLYEM5lYVa04mffSXNeiDifhVZ9/oKI36ISC Nmyw8FpcOR1Z+GnveQxSa7O8b8ixgOyffCL3ib1ElThHELgPyhM1O1F2HOZTDQD66KLa inQG1H4ONJgOsD7Jq4WWbOkvq9Z4gn737sX4nhiq2VQpboPAhrOePhs2sdTiSjYhoPje YqLxJN4qMbjCm/BgiKNRfPf55S87E4Yc20/Lbbs7mBGd4xsX2pVy9JnXu+0MlDyAlOTo 4UlBNzDWMESrLaGZyXG6gyKxPDqGczWFszExAbjtEBjGl7il6TQu+P1jHTid9VurktPX zIKQ== X-Gm-Message-State: AOAM531B1ZaTc1iqrOMRRBymjYBKprKk5Nk29EEbJyJcocJr8z0lL91P pVcUehZiyrsM8+Jwj9u1fNivS0O5VFF3KBOW X-Google-Smtp-Source: ABdhPJzl9fye4tLv8WmH4niQyb39TQVunkY9OeBRtkEF0cISmsgv2KFHNe4mtY7RZm7zah3BhHYZKw== X-Received: by 2002:a05:6214:6e8:: with SMTP id bk8mr18851623qvb.18.1600181186728; Tue, 15 Sep 2020 07:46:26 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.46.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:46:26 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Heinrich Schuchardt , Marek Vasut , Simon Glass , Tom Rini Subject: [PATCH v2 45/46] dm: Use symbolic constants for log levels in dev_xxx Date: Tue, 15 Sep 2020 10:45:21 -0400 Message-Id: <20200915144522.509493-46-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean This substitutes literal log levels with their symbolic constants. Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- (no changes since v1) include/dm/device_compat.h | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/include/dm/device_compat.h b/include/dm/device_compat.h index 3d8cd09f4c..7c14aa464d 100644 --- a/include/dm/device_compat.h +++ b/include/dm/device_compat.h @@ -10,6 +10,7 @@ #ifndef _DM_DEVICE_COMPAT_H #define _DM_DEVICE_COMPAT_H +#include #include /* @@ -48,28 +49,28 @@ }) #define dev_emerg(dev, fmt, ...) \ - __dev_printk(0, dev, fmt, ##__VA_ARGS__) + __dev_printk(LOGL_EMERG, dev, fmt, ##__VA_ARGS__) #define dev_alert(dev, fmt, ...) \ - __dev_printk(1, dev, fmt, ##__VA_ARGS__) + __dev_printk(LOGL_ALERT, dev, fmt, ##__VA_ARGS__) #define dev_crit(dev, fmt, ...) \ - __dev_printk(2, dev, fmt, ##__VA_ARGS__) + __dev_printk(LOGL_CRIT, dev, fmt, ##__VA_ARGS__) #define dev_err(dev, fmt, ...) \ - __dev_printk(3, dev, fmt, ##__VA_ARGS__) + __dev_printk(LOGL_ERR, dev, fmt, ##__VA_ARGS__) #define dev_warn(dev, fmt, ...) \ - __dev_printk(4, dev, fmt, ##__VA_ARGS__) + __dev_printk(LOGL_WARNING, dev, fmt, ##__VA_ARGS__) #define dev_notice(dev, fmt, ...) \ - __dev_printk(5, dev, fmt, ##__VA_ARGS__) + __dev_printk(LOGL_NOTICE, dev, fmt, ##__VA_ARGS__) #define dev_info(dev, fmt, ...) \ - __dev_printk(6, dev, fmt, ##__VA_ARGS__) + __dev_printk(LOGL_INFO, dev, fmt, ##__VA_ARGS__) #ifdef DEBUG #define dev_dbg(dev, fmt, ...) \ - __dev_printk(7, dev, fmt, ##__VA_ARGS__) + __dev_printk(LOGL_DEBUG, dev, fmt, ##__VA_ARGS__) #else #define dev_dbg(dev, fmt, ...) \ ({ \ if (0) \ - __dev_printk(7, dev, fmt, ##__VA_ARGS__); \ + __dev_printk(LOGL_DEBUG, dev, fmt, ##__VA_ARGS__); \ }) #endif @@ -79,7 +80,7 @@ #define dev_vdbg(dev, fmt, ...) \ ({ \ if (0) \ - __dev_printk(7, dev, fmt, ##__VA_ARGS__); \ + __dev_printk(LOGL_DEBUG, dev, fmt, ##__VA_ARGS__); \ }) #endif From patchwork Tue Sep 15 14:45:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364452 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=OaXQsy3n; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrR9561nDz9sVK for ; Wed, 16 Sep 2020 00:55:05 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 31AB08245D; Tue, 15 Sep 2020 16:47:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="OaXQsy3n"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1E153823ED; Tue, 15 Sep 2020 16:46:32 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qv1-xf43.google.com (mail-qv1-xf43.google.com [IPv6:2607:f8b0:4864:20::f43]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 32CE4823E2 for ; Tue, 15 Sep 2020 16:46:29 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qv1-xf43.google.com with SMTP id j3so1822450qvi.7 for ; Tue, 15 Sep 2020 07:46:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uuWCXVZ8nhNpCZYVd6ZRFexonzPlcE5mZjlp+PTo3k8=; b=OaXQsy3nKA9aoHLN7/xI3EWCeTqXc6K14bHYyG9WGD4xIKFX+qYt9UVHqfAbcn+X6Y xnmqElJvK4E3dP1Q/T8SVnq2Q8AzZSStQk4CTXkABEWXhCD2TmdYQqeX4Q3a5D1aFrZp Pn/RUtVhWTogIPmAE60ZXINzyYnRJtI/xucpD7pNQmBexhgMrR8jDba9sDucYXbFgK22 SGMNOKPK0hswsIztD0xuXepLM3mXG1SlO7vXO5ItPVFfiMCHJUxx2BeRfz3cgpB8rWbt 3CaW67XXv9Z6J8EWAHXmujBRbTEDzPVsnswQoSjNjsNS2wf5J6IBxafim+gWe6fD56Er Tufw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uuWCXVZ8nhNpCZYVd6ZRFexonzPlcE5mZjlp+PTo3k8=; b=fzY7npaHxw4ldxCl6wbNVkic8qj/AAWH0MiTmiCRfjU+EDoEqtto+HApZealHnmJbM CZW1mtC/YZqO8KrwMJHwMyWKKlP2LBC61eEf2sL844HYWnImwzjQK7RAgR6PKkhyQOK8 wPfHleO+Thtck+hZvEDtVzjR6e1IpFMMREgg4aNaWa8Tm8yM0IyveHPN0CyPZz9ZrWsP HN1wqz2h4UoK7V7dzR5Xeetr4m8a0GfFEfGVBmzE0I6DMgX4Pfd9nzzkS0IyOtdERm37 lySaREz1xSWWdZCouaTIe0phjRslXL/kjzGq4pYWPYkWOumQS0i+Cv2ACArIJ6Ml1oTQ fS0Q== X-Gm-Message-State: AOAM530NLkOiLTblSG8ut9b91/ecFb8pxU7juygBSSXKCudWw+eizfLc khRGtH+lbuqNfvQ3ciEmMRUUJMZfIKLDdaez X-Google-Smtp-Source: ABdhPJwHhHXiOV8nthcpDM36OOjGkLfvKC2v0O4a0IupXPKGKZXkAkHGx1oG89+10iX3GbPh53HCEw== X-Received: by 2002:a0c:a990:: with SMTP id a16mr2026677qvb.59.1600181187855; Tue, 15 Sep 2020 07:46:27 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.46.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:46:27 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Heinrich Schuchardt , Marek Vasut , Simon Glass , Tom Rini Subject: [PATCH v2 46/46] dm: Print device name in dev_xxx like Linux Date: Tue, 15 Sep 2020 10:45:22 -0400 Message-Id: <20200915144522.509493-47-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean This adorns messages generated by dev_xxx with the device and driver names. It also redirects dev_xxx to log when it is available. The names of these functions very roughly take inspiration from Linux, but there is no deeper correlation. Both struct udevice and struct device are supported when logging, though logging with struct device is no better than using log_xxx. The latter is supported because of the large amount of existing code which logs with struct device. Signed-off-by: Sean Anderson --- Changes in v2: - Support logging with struct device as well as struct udevice. A lot of drivers, especially USB gadgets, log with devices and not udevices. There is no major reason why they can't use udevice, but big changes like that are outside the scope of this series. - Add some comments to __dev_printk and dev_printk_emit - Handle struct device as well as struct udevice - Match format strings for the NULL path to the regular path. This reduces the amount of duplicated strings. - Print the device name before the driver name include/dm/device_compat.h | 110 +++++++++++++++++++++++++++---------- 1 file changed, 82 insertions(+), 28 deletions(-) diff --git a/include/dm/device_compat.h b/include/dm/device_compat.h index 7c14aa464d..8f26053b45 100644 --- a/include/dm/device_compat.h +++ b/include/dm/device_compat.h @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0+ */ /* + * Copyright (C) 2020 Sean Anderson * Copyright (c) 2013 Google, Inc * * (C) Copyright 2012 @@ -11,6 +12,7 @@ #define _DM_DEVICE_COMPAT_H #include +#include #include /* @@ -34,18 +36,87 @@ #endif /* - * REVISIT: - * print device name like Linux + * Define a new identifier which can be tested on by C code. A similar + * definition is made for DEBUG in . */ -#define dev_printk(dev, fmt, ...) \ -({ \ - printk(fmt, ##__VA_ARGS__); \ +#ifdef VERBOSE_DEBUG +#define _VERBOSE_DEBUG 1 +#else +#define _VERBOSE_DEBUG 0 +#endif + +/** + * dev_printk_emit() - Emit a formatted log message + * @cat: Category of the message + * @level: Log level of the message + * @fmt: Format string + * @...: Arguments for @fmt + * + * This macro logs a message through the appropriate channel. It is a macro so + * the if statements can be optimized out (as @level should be a constant known + * at compile-time). + * + * If DEBUG or VERBOSE_DEBUG is defined, then some messages are always printed + * (through printf()). This is to match the historical behavior of the dev_xxx + * functions. + * + * If LOG is enabled, use log() to emit the message, otherwise print it based on + * the console loglevel. + */ +#define dev_printk_emit(cat, level, fmt, ...) \ +({ \ + if ((_DEBUG && level == LOGL_DEBUG) || \ + (_VERBOSE_DEBUG && level == LOGL_DEBUG_CONTENT)) \ + printf(fmt, ##__VA_ARGS__); \ + else if (CONFIG_IS_ENABLED(LOG)) \ + log(cat, level, fmt, ##__VA_ARGS__); \ + else if (level < CONFIG_VAL(LOGLEVEL)) \ + printf(fmt, ##__VA_ARGS__); \ }) -#define __dev_printk(level, dev, fmt, ...) \ -({ \ - if (level < CONFIG_VAL(LOGLEVEL)) \ - dev_printk(dev, fmt, ##__VA_ARGS__); \ +/** + * __dev_printk() - Log a message for a device + * @level: Log level of the message + * @dev: A &struct udevice or &struct device + * @fmt: Format string + * @...: Arguments for @fmt + * + * This macro formats and prints dev_xxx log messages. It is done as a macro + * because working with variadic argument is much easier this way, we can + * interrogate the type of device we are passed (and whether it *is* a &struct + * udevice or &struct device), and dev_printk_emit() can optimize out unused if + * branches. + * + * Because this is a macro, we must enforce type checks ourselves. Ideally, we + * would only accept udevices, but there is a significant amount of code (mostly + * USB) which calls dev_xxx with &struct device. When assigning ``__dev``, we + * must first cast ``dev`` to ``void *`` so we don't get warned when ``dev`` is + * a &struct device. Even though the latter branch is not taken, it will still + * get compiled and type-checked. + * + * The format strings in case of a ``NULL`` ``dev`` MUST be kept the same. + * Otherwise, @fmt will be duplicated in the data section (with slightly + * different prefixes). This is why ``(NULL udevice *)`` is printed as two + * string arguments, and not by string pasting. + */ +#define __dev_printk(level, dev, fmt, ...) \ +({ \ + if (__same_type(dev, struct device *)) { \ + dev_printk_emit(LOG_CATEGORY, level, fmt, ##__VA_ARGS__); \ + } else { \ + BUILD_BUG_ON(!__same_type(dev, struct udevice *)); \ + struct udevice *__dev = (void *)dev; \ + if (__dev) \ + dev_printk_emit(__dev->driver->id, level, \ + "%s %s: " fmt, \ + __dev->driver->name, __dev->name, \ + ##__VA_ARGS__); \ + else \ + dev_printk_emit(LOG_CATEGORY, level, \ + "%s %s: " fmt, \ + "(NULL", "udevice *)", \ + ##__VA_ARGS__); \ + } \ }) #define dev_emerg(dev, fmt, ...) \ @@ -62,26 +133,9 @@ __dev_printk(LOGL_NOTICE, dev, fmt, ##__VA_ARGS__) #define dev_info(dev, fmt, ...) \ __dev_printk(LOGL_INFO, dev, fmt, ##__VA_ARGS__) - -#ifdef DEBUG #define dev_dbg(dev, fmt, ...) \ __dev_printk(LOGL_DEBUG, dev, fmt, ##__VA_ARGS__) -#else -#define dev_dbg(dev, fmt, ...) \ -({ \ - if (0) \ - __dev_printk(LOGL_DEBUG, dev, fmt, ##__VA_ARGS__); \ -}) -#endif - -#ifdef VERBOSE_DEBUG -#define dev_vdbg dev_dbg -#else -#define dev_vdbg(dev, fmt, ...) \ -({ \ - if (0) \ - __dev_printk(LOGL_DEBUG, dev, fmt, ##__VA_ARGS__); \ -}) -#endif +#define dev_vdbg(dev, fmt, ...) \ + __dev_printk(LOGL_DEBUG_CONTENT, dev, fmt, ##__VA_ARGS__) #endif