From patchwork Tue Apr 20 08:42:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 1468250 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; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=sxDB8bhs; 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 4FPcdY6sfHz9t1r for ; Tue, 20 Apr 2021 18:42:57 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EB29B82B01; Tue, 20 Apr 2021 10:42:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.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=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="sxDB8bhs"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2E1F882AED; Tue, 20 Apr 2021 10:42:34 +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=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) (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 2FF6E81F30 for ; Tue, 20 Apr 2021 10:42:29 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=narmstrong@baylibre.com Received: by mail-wr1-x42b.google.com with SMTP id w4so32993736wrt.5 for ; Tue, 20 Apr 2021 01:42:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=d0tbSHZstsvQJkea7ktGC8CIaznscjoQyr8+6/1ALGU=; b=sxDB8bhsEL5frHCEVls+xOXXpSe5RPVp1cHNvJVNHla8DQkKY7GVUPlixPgM4yPZIq FO8MYUBaD2MMopLfK6U7y8DkHQ2sdz7YXy4EzBZgLjy/SBAbIO/fEDz9Tw58XalOWQ+a RTao+qOMi6QJSzSreS2t7+7n/14Eac9XCHeh0mOM02ZrlmTzR/WQw4/x56q3SBAFH7AP 8YRLrokxSpvOSiIvG2SiTN4H/dMPuzJPGkRxo1J1A9UgRn6VO3KVEXBjpcuMXnetlM9t 4/RVplahpHLhxTSRK6Hr2kdQGOy1c5EEqVMsDQe98d8j3llcomQgBrL7sic9GY3GQPkH exOg== 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:mime-version :content-transfer-encoding; bh=d0tbSHZstsvQJkea7ktGC8CIaznscjoQyr8+6/1ALGU=; b=gh4IQilqs9/O+pY4RnNDku9C+yMKN+SDHHm+JNZa7z89irq6BvU4FmsEp8QQqn3nFi 63d3kHSU2PIKNJj5Fe1nWlwPXUDqth8xpKaQL9VketlBykpeb1dUqEFDJO0S+++V0XIU hURlz35fkXhz9hF2in6VxYibgtmDrO5B1bwiqZw5wON0+jtPOR8TwR5LI340uJMS4Vvd t4/U9is2Q5ARXZ4JmPbdBMUk6HKw/ORIUvHyI+ZbWFguA+ZLeREEROwuxsZB17IIPbbi jMV9+ZrwwKJCwTcYs8cLzFOBaCvnkJI4KuqOcoPnEfyMen2UZrIRRUwerokA6va3x1eA bJjw== X-Gm-Message-State: AOAM530rFrECL0fes+QPTDiPZ9EtwGirj4wzcs7AQhn+RPMGpZLNH0QM wZMPbi3srI1r7VqKcopkyihyWg== X-Google-Smtp-Source: ABdhPJw4o1F7H0HlAp1YwHT9kfwt0GH3XaK3neME7hm9Vnis0T7h3xU9bF0K6/ycqLjKG7B6DdSAyA== X-Received: by 2002:a5d:484c:: with SMTP id n12mr18797553wrs.377.1618908148725; Tue, 20 Apr 2021 01:42:28 -0700 (PDT) Received: from bojack.baylibre.local (laubervilliers-658-1-213-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.gmail.com with ESMTPSA id a2sm27440510wrt.82.2021.04.20.01.42.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Apr 2021 01:42:28 -0700 (PDT) From: Neil Armstrong To: sjg@chromium.org Cc: jagan@amarulasolutions.com, u-boot@lists.denx.de, trini@konsulko.com, u-boot-amlogic@groups.io, Neil Armstrong Subject: [PATCH 0/2] reset: fix reset_get_by_index_nodev index handling Date: Tue, 20 Apr 2021 10:42:24 +0200 Message-Id: <20210420084226.2996654-1-narmstrong@baylibre.com> X-Mailer: git-send-email 2.25.1 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.4 at phobos.denx.de X-Virus-Status: Clean A regression weas detected on Amlogic G12A/G12B SoCs, where HDMI output was disable even when Linux was booting. Bisect reports 139e4a1cbe ("drivers: reset: Add a managed API to get reset controllers from the DT") as the offending commit. But the error is in ea9dc35aab ("reset: Get the RESET by index without device") where a spurius "> 0" was added to the index handling. But the dm_test_reset_base() test did not catch it. The first commit extends the test to catch the regression, and the second patch fixes the regression. Neil Armstrong (2): test: reset: Extend base reset test to catch error reset: fix reset_get_by_index_nodev index handling arch/sandbox/dts/test.dts | 4 ++-- drivers/reset/reset-uclass.c | 2 +- test/dm/reset.c | 39 +++++++++++++++++++++++++++++++----- 3 files changed, 37 insertions(+), 8 deletions(-)