From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9F231E77184 for ; Thu, 19 Dec 2024 16:14:00 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0D28F802B4; Thu, 19 Dec 2024 17:13:59 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=writeme.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=writeme.com header.i=sinan@writeme.com header.b="JfV2SaZy"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9A2A580196; Thu, 19 Dec 2024 17:13:57 +0100 (CET) Received: from mout.gmx.com (mout.gmx.com [74.208.4.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 401878022B for ; Thu, 19 Dec 2024 17:13:55 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=writeme.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sinan@writeme.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=writeme.com; s=s1089575; t=1734624825; x=1735229625; i=sinan@writeme.com; bh=BRrs2EUFIcEYSHiJhRp4ffYRCbSZ/QzdCH0tjCLO2HI=; h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc: References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=JfV2SaZyb2GhW0UPKq88ZLArki8seo/BrQUEDsj6hSK9MWoCrPIMoAiO4lHc4IAU qNqrdRhB1L2xIt3is68Ft1xeB0AzyIUvcH1+7L7POLnBt8Y6TuRdtdtZnvxISAJuN LRLFn9O9ycwxQw+qNnTnIHx4WVQ6Qz8Q6Qa3srsyZ5xRhkZzyScxJ3uumpaDxhIpB cg28RNPqDwvMwGWLg3umGE8/yiJJ3qze/EwAg/de8wKJZ8qqdJ07FK9OD1o6sVNvf 3Qzdz+7FvaYO8GIxluCQuXwJuhXeCPfMClsusP/mpvRcBhixrjONNb8YzDA/f7Zdc qM7XGZObHdxOHm34yA== X-UI-Sender-Class: f2cb72be-343f-493d-8ec3-b1efb8d6185a Received: from [192.168.4.12] ([208.111.77.233]) by smtp.mail.com (mrgmxus003 [74.208.5.15]) with ESMTPSA (Nemesis) id 0MSLD3-1t0uLC10IN-00LkPb; Thu, 19 Dec 2024 17:13:45 +0100 Message-ID: <08d47536-b375-4524-bb2c-8ecfdeff8bbd@writeme.com> Date: Thu, 19 Dec 2024 11:13:41 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 4/4] gpio: mpc8xxx: Preserve pre-init state of outputs To: =?UTF-8?Q?J=2E_Neusch=C3=A4fer?= , Sinan Akman Cc: Mario Six , Tom Rini , u-boot@lists.denx.de References: <20241215-mpc83xx-misc-v1-0-8cd6daae4f93@posteo.net> <20241215-mpc83xx-misc-v1-4-8cd6daae4f93@posteo.net> <30176d01-b244-47ac-82c9-8ee2b1f44a6b@writeme.com> Content-Language: en-US From: Sinan Akman In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:HUOXSg8AzxGlLFIluHJHHQUjz00aPNg08wWESrQp6VbWtOBLh/V x3/l7eo5sqt+wMAI8yjqvh7V/JAI2xdkR2AeNqToBAjyOyjw7cmjjZovfbBk7RnSIFpZA8E r12l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ewVtAsHKHZ2XCJmKPMpr 4cznqraETjlebml01ZlK8j8riRRQa5ZGYTqfMNk/xF+9yN+z3tkNFGarnSd6qxhfDpTiBijjw ZUCnhuPLe0y6yFS86wPXACkrsAogk/BQr2NBGJgVp/ZaSqLoOTts5iHVJAQvQRGJid80DpNB2 Oh8hw0eD5gRqyCyIj/PrDqWqvxRBi15hk1BJgPnBV8JAVCZzVLb/emgVZe+N7WEEzwpVOhQJ0 = X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.8 at phobos.denx.de X-Virus-Status: Clean On 2024-12-19 08:06, J. Neusch=C3=A4fer wrote: > On Wed, Dec 18, 2024 at 02:20:21PM -0500, Sinan Akman wrote: >> Hi >> >> On 2024-12-15 10:18, J. Neusch=C3=A4fer via B4 Relay wrote: >>> From: "J. Neusch=C3=A4fer" >>> >>> The mpc8xxx_gpio driver contains a workaround for certain chips >>> where the previously written state of outputs cannot be read back >>> from the GPIO data (GPDAT) register (MPC8572/MPC8536). This workaround >>> consists of tracking the state of GPDAT in a "shadow register" (i.e. a >>> software variable). The shadow register is initialized to zero. >>> >>> This results in a problem w.r.t. outputs that are configured to a >>> high (1) state before U-Boot runs, but not touched by U-Boot itself: >>> Due to the zero-initialization, these GPIOs end up being set to zero, >>> the first time that any other output is set. >>> >>> To avoid such issues initialize the GPDAT shadow register to the value >>> previously held by any outputs, if possible. On MPC8572/MPC8536 this >>> should make no difference, >> >> =C2=A0Did you test this on a MPC83xx board ? > > Yes, on MPC8314E. I'll mention it in the commit message. yes please do, thanks. Reviewed-by: Sinan Akman > > I did not test it on MPC85xx, though. > > > -- jn