Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp3149446pxx; Mon, 2 Nov 2020 00:59:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJycTSu0zvMWqEUlk1+fA6ziedkcPKBBNPYXehFK1RejaiNlgYCda0ZGfFLFJhECXfQa9FgE X-Received: by 2002:a17:906:1c8f:: with SMTP id g15mr14130314ejh.179.1604307563353; Mon, 02 Nov 2020 00:59:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604307563; cv=none; d=google.com; s=arc-20160816; b=iG0EXMx4/RRNCjgFy6TpmJHUpwhc8rVgaejdMpJGOkTlSWdsgvHJZzVBZiPIzS7cTL 8DCUfxFAIVO38RVu/sA2w/DZ6kIygpqzam/6Yw8Yx4UGVA5Dp1kgzisOIvu4dHTB4/Ib 6y4fDqq+XR7PjiCBUzNFtotgmmBrTAtewQ9FCuKOxi8UbE1Ae7/HGFxbL9/qP1XpnEDz tXcOUWQJ+UFc49F3ikCXRFG87F3ywURdhbTbHuR3r0FKo49tgctXMotWVnAWf04AZovZ Q+adIhX7lhzK/nQMrDFOfQJBaSAzZEbrOr6EET0+ayU3UKYObyWmVRIZ1h4kgbrLPyws 7LrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=R1wYyE+ffvxs4bCnVGwncv5nVBCP9InFyCF3KL3GlEA=; b=rSO2X6WphcugooX0uuvJh1L1dFVBlx1Yj7vtVvSGrZTWmsYjvsOfyooaI2GlnKZ8eL VO5+ruNL6FnaoKcklujDdwDRC60iyEg0TK7e3kGukeMFjHvG/F+peg7fNrj80yzyAlA+ MsqR6jZIMArrLuxedJFUpQ7dAZ5pEOjgG99StWyfLnlXwJUDUUZpgg1Vk1QWHn6U7AKA uzDJIW29E8dOE93lZiiepbkd0h8wtwAPnZ3BCcgW2aRok1YIPw5ztLZiTRq7JKHjiXed QZf8fEsrGBPrQLwDG2l6tqfeMEOkecQA5JHpAvH9DfIMDUzuVNa8hOG6uGDb5RpU7qEN 6D2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=A5by00u8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y16si9325182edq.162.2020.11.02.00.59.00; Mon, 02 Nov 2020 00:59:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=A5by00u8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728254AbgKBIzZ (ORCPT + 99 others); Mon, 2 Nov 2020 03:55:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727806AbgKBIzZ (ORCPT ); Mon, 2 Nov 2020 03:55:25 -0500 Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EAC7FC0617A6 for ; Mon, 2 Nov 2020 00:55:24 -0800 (PST) Received: by mail-pg1-x542.google.com with SMTP id k9so8515482pgt.9 for ; Mon, 02 Nov 2020 00:55:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=R1wYyE+ffvxs4bCnVGwncv5nVBCP9InFyCF3KL3GlEA=; b=A5by00u83SRdB6pDDoHALM1n+9KiiJRO9b0qD0R/BD+YQV/uWmWeULDRoUDlOL+Vz/ Tn08HR5JKMXiDgT3Eq7kExHNGa66VUp+A1lxhvt4KENJREsX+k/ZR7XOmGjEStd4baqA 6C6Ycx0tJ6Clyvt7Vn1gHoxAptGYDe5qjIV+zGQxhAy9XAkmSdgPWMcF0NAYPYL6CmB/ QMPb6r6tub67uScPs90AjMLUmqg9uSI3bugvT4McGPK8XZAa8GxUiGvvrkgq0I5Umo4Z dl+sa1bldXPzqCFNE2E62lvb0W41/EXl56nbMHHz4Yi2KZFVu3FmYXlckDae+9X+mM9M /oSQ== 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; bh=R1wYyE+ffvxs4bCnVGwncv5nVBCP9InFyCF3KL3GlEA=; b=U38pdsvih1mM/1f1kndXcp0V80SMQdgO20LqAARl986VFW0LZR7fA0PFNqz1i5ZQNF NltmiMS0pZuWxZNhX6maXAhDrJXBv4Lh5qe9fobCdREW/FcnhYinQUeaUIHa+rNokP8T ePEddoRfqEguv4FxR/hPKAkebc7PXm0WMHf4v+MWtPa5JOkrsi376Tw/jQ3rTx7THlTX +2Nbe8x+zgd7Os+mewknhoWYfHpsFkgHDlr5g0onsyGpmF4FxD5ZoyGUg2cBj8g9HCkd UWj8RqHNaVK54a1Haj0DTvUx8kEzw4eVSbOxs+u73iQaVNm1R6fta/039UZ54O3wf69D 8RpQ== X-Gm-Message-State: AOAM5302gRTq5OmCgOmYmQqvcHBqSydD8J0nM9glO/+JOUyoTOvr/MiX mlMtM8d29GbjF7d5r51QC6U= X-Received: by 2002:a17:90a:8007:: with SMTP id b7mr16598843pjn.84.1604307324619; Mon, 02 Nov 2020 00:55:24 -0800 (PST) Received: from localhost.localdomain ([8.210.202.142]) by smtp.gmail.com with ESMTPSA id mg6sm11625762pjb.40.2020.11.02.00.55.14 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Nov 2020 00:55:24 -0800 (PST) From: Yejune Deng To: robh@kernel.org, tomeu.vizoso@collabora.com, steven.price@arm.com, alyssa.rosenzweig@collabora.com, airlied@linux.ie, daniel@ffwll.ch, p.zabel@pengutronix.de Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, yejune.deng@gmail.com Subject: [PATCH] drm/panfrost: Add support for non-existent reset node Date: Mon, 2 Nov 2020 16:54:49 +0800 Message-Id: <1604307289-32110-1-git-send-email-yejune.deng@gmail.com> X-Mailer: git-send-email 1.9.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some dts hasn't no reset node, is should ok. Signed-off-by: Yejune Deng --- drivers/gpu/drm/panfrost/panfrost_device.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c b/drivers/gpu/drm/panfrost/panfrost_device.c index ea8d318..a982878 100644 --- a/drivers/gpu/drm/panfrost/panfrost_device.c +++ b/drivers/gpu/drm/panfrost/panfrost_device.c @@ -18,7 +18,12 @@ static int panfrost_reset_init(struct panfrost_device *pfdev) { - pfdev->rstc = devm_reset_control_array_get(pfdev->dev, false, true); + pfdev->rstc = devm_reset_control_array_get_optional_exclusive(pfdev->dev); + if (!pfdev->rstc) { + dev_info(pfdev->dev, "reset does not exist\n"); + return 0; + } + if (IS_ERR(pfdev->rstc)) { dev_err(pfdev->dev, "get reset failed %ld\n", PTR_ERR(pfdev->rstc)); return PTR_ERR(pfdev->rstc); @@ -29,7 +34,8 @@ static int panfrost_reset_init(struct panfrost_device *pfdev) static void panfrost_reset_fini(struct panfrost_device *pfdev) { - reset_control_assert(pfdev->rstc); + if (pfdev->rstc) + reset_control_assert(pfdev->rstc); } static int panfrost_clk_init(struct panfrost_device *pfdev) -- 1.9.1