From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 54AA930C34A; Wed, 6 May 2026 19:13:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778094804; cv=none; b=YwUeHP5soQhU98cA+cxtRZn/00DfS+5KmH1aVKQm4wIe1tQCny0SEXmfZRfbQ0GOrQhjM+xDzLavqOBXmVlBFp4mtGgqX0vuuzs9zwC3VB9nWVm/MUK4umb5dWHMKUK8tt02+lChWUqN8Uwilxzr4IQrWkHReGcnQGjRNCHKKeE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778094804; c=relaxed/simple; bh=MwzrSQ4fiAmN5nCFQCemXjP5zzuycMBMfVig9YY1FLY=; h=MIME-Version:Date:From:To:Cc:Message-Id:In-Reply-To:References: Subject:Content-Type; b=NKVa0RJpYeYuKUrfhFl2fbGrF8NAniwbpSb+648nwyGlWKlcnivHVI6+7ggyLKvCKm9ujfyjJuLRfan6MBb489erLG0MbVSd6xzUsfNjCHpr52nSSQbfM7kXHJ8qjxBKkv2dPh6i2CsBdr0bPtcmh0gKsStFVX7EDFFI+3qqAFI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FZ02v9Yx; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FZ02v9Yx" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9E329C2BCB0; Wed, 6 May 2026 19:13:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1778094804; bh=MwzrSQ4fiAmN5nCFQCemXjP5zzuycMBMfVig9YY1FLY=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From; b=FZ02v9YxnFq6tkTW2U2IYKgfy1R5OeW2RxUXfrE5CORSM44w3lmwYWSRbc9zTmtbC 9w+9FABbQMs73fZuz9PGA1PF4kB6Z0EnlVZUIUGOd+wYQORgSrNRN4wKPCsj3ZCTSY Vletv8j66HKNScuONplbkmag4upfxN0+t5fXn2B1Ku78puhMiZrEiXT/DQ+EGGVfC5 LoTV13pjwzQhUj4BMip0tH2tIXS8MQr/licueoPuX9lSHSiA6KQv5JCwr8b1oVQ7yi DdmUPsX7vuSaK7W9+XlwZ3BpaaTjScr8jwy5rkxUBL0JQ9QcI873tghURnekyhl4WT JmKDL+EzGpkVg== Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfauth.phl.internal (Postfix) with ESMTP id B2865F4006B; Wed, 6 May 2026 15:13:22 -0400 (EDT) Received: from phl-imap-12 ([10.202.2.86]) by phl-compute-04.internal (MEProxy); Wed, 06 May 2026 15:13:22 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgddutdehgedtucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepofggfffhvfevkfgjfhfutgfgsehtjeertdertddtnecuhfhrohhmpedftehrnhgu uceuvghrghhmrghnnhdfuceorghrnhgusehkvghrnhgvlhdrohhrgheqnecuggftrfgrth htvghrnhepjeejffetteefteekieejudeguedvgfeffeeitdduieekgeegfeekhfduhfel hfevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hrnhguodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdduvdekhedujedtvdeg qddvkeejtddtvdeigedqrghrnhgupeepkhgvrhhnvghlrdhorhhgsegrrhhnuggsrdguvg dpnhgspghrtghpthhtohepledpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheprggu uhhrvghghhgvlhhlohessggrhihlihgsrhgvrdgtohhmpdhrtghpthhtohepohhlthgvrg hnvhesghhmrghilhdrtghomhdprhgtphhtthhopehgvghrgheskhgvrhhnvghlrdhorhhg pdhrtghpthhtohepghgvrhhgsehlihhnuhigqdhmieekkhdrohhrghdprhgtphhtthhope hlihhnuhigqdhmieekkheslhhishhtshdrlhhinhhugidqmheikehkrdhorhhgpdhrtghp thhtohepughmrggvnhhgihhnvgesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtth hopehlihhnuhigqdgtrghnsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohep lhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoh eplhhinhhugidqshhpihesvhhgvghrrdhkvghrnhgvlhdrohhrgh X-ME-Proxy: Feedback-ID: i36794607:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 8FABC1060065; Wed, 6 May 2026 15:13:22 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ThreadId: Am-_gogYW4uZ Date: Wed, 06 May 2026 21:12:42 +0200 From: "Arnd Bergmann" To: "Greg Ungerer" , linux-m68k@lists.linux-m68k.org Cc: linux-kernel@vger.kernel.org, "Greg Ungerer" , dmaengine@vger.kernel.org, linux-can@vger.kernel.org, linux-spi@vger.kernel.org, "Vladimir Oltean" , "Angelo Dureghello" Message-Id: <40aefc39-bd98-460d-8aa7-5dd79f562e0d@app.fastmail.com> In-Reply-To: <20260506142644.3234270-8-gerg@kernel.org> References: <20260506142644.3234270-2-gerg@kernel.org> <20260506142644.3234270-8-gerg@kernel.org> Subject: Re: [RFC 4/4] m68k: coldfire: fix non-standard readX()/writeX() functions Content-Type: text/plain Content-Transfer-Encoding: 7bit On Wed, May 6, 2026, at 16:26, Greg Ungerer wrote: > drivers/dma/mcf-edma-main.c > Supports big-endian access by setting the big-endian flag of > the drivers struct fsl_edma_engine. But locally should be using > ioread32be() and iowrite32be() instead of ioread32() and iowrite32(). I'm still a bit confused about how this works at the moment, since the drivers/dma/fsl-edma-common.h file already contains checks for the edma->big_endian flag, which is set in mcf_edma_probe(). The version after your patch makes sense to me, but it looks like the existing code cannot work. > drivers/spi/spi-fsl-dspi.c > Setting the regmap format_endian flags to use native endian will > force driver to use appropriate big or little endian access on > whatever platform it is built for. > > These drivers have only been compile tested. I would suggest marking these as explicit BIG_ENDIAN rather than NATIVE_ENDIAN. The effect should be the same since coldfire CPUs cannot run little-endian code, but the way that hardware usually works is that the endianess is fixed at the bus level to one way or the other. NATIVE_ENDIAN to me implies that the registers have configurable endianess that is switched along with the CPU mode. Arnd