Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755280AbcCWOU6 (ORCPT ); Wed, 23 Mar 2016 10:20:58 -0400 Received: from webbox1416.server-home.net ([77.236.96.61]:38007 "EHLO webbox1416.server-home.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751610AbcCWOU5 (ORCPT ); Wed, 23 Mar 2016 10:20:57 -0400 From: Alexander Stein To: Mark Brown Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] regmap: mmio: Fix value endianness selection Date: Wed, 23 Mar 2016 15:20:46 +0100 Message-ID: <2609570.vvhKhym0nL@ws-stein> User-Agent: KMail/4.14.10 (Linux/4.1.15-gentoo-r1; KDE/4.14.16; x86_64; ; ) In-Reply-To: <1458739079-11712-1-git-send-email-broonie@kernel.org> References: <1458739079-11712-1-git-send-email-broonie@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 919 Lines: 20 On Wednesday 23 March 2016 13:17:59, Mark Brown wrote: > Currently when selecting value endianness we check the register > endiannes, not the value endianness. > > Reported-by: Alexander Stein > Signed-off-by: Mark Brown Mh, while this _does_ fix the problem regarding accessing SCFG peripheral using syscon, it _does not_ fix the access for spi-fsl-dspi, this is still using little-endian. The difference in those drivers is that syscon manually sets config.val_format_endian before calling regmap_init_mmio. spi-fsl-dspi does not. I guess this driver relies on this configuration being done in regmap_get_val_endian. But this is never reached because after setting map->reg_read this code is skipped due to "goto skip_format_initialization;" IMHO a call to regmap_get_val_endian should be added to regmap_mmio_gen_context. Best regards, Alexander