Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758001AbcC2TmM (ORCPT ); Tue, 29 Mar 2016 15:42:12 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:53056 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753994AbcC2TmJ (ORCPT ); Tue, 29 Mar 2016 15:42:09 -0400 From: Mark Brown To: Alexander Stein Cc: linux-kernel@vger.kernel.org, Mark Brown Date: Tue, 29 Mar 2016 12:41:55 -0700 Message-Id: <1459280515-1006-2-git-send-email-broonie@kernel.org> X-Mailer: git-send-email 2.8.0.rc3 In-Reply-To: <1459280515-1006-1-git-send-email-broonie@kernel.org> References: <1459280515-1006-1-git-send-email-broonie@kernel.org> X-SA-Exim-Connect-IP: 64.55.107.4 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: [PATCH 2/2] regmap: mmio: Parse endianness definitions from DT X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1317 Lines: 39 Since we changed to do formatting in the bus we now skip all the format parsing that the core does for its data marshalling code. This means that we skip the DT parsing it does which breaks some systems, we need to add an explict call in the MMIO code to do this. Reported-by: Alexander Stein Signed-off-by: Mark Brown --- Completely untested, I had been hoping you'd be able to write and test something yourself. drivers/base/regmap/regmap-mmio.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/base/regmap/regmap-mmio.c b/drivers/base/regmap/regmap-mmio.c index b27573c69af7..7132a662c80d 100644 --- a/drivers/base/regmap/regmap-mmio.c +++ b/drivers/base/regmap/regmap-mmio.c @@ -23,6 +23,8 @@ #include #include +#include "internal.h" + struct regmap_mmio_context { void __iomem *regs; unsigned val_bytes; @@ -245,7 +247,7 @@ static struct regmap_mmio_context *regmap_mmio_gen_context(struct device *dev, ctx->val_bytes = config->val_bits / 8; ctx->clk = ERR_PTR(-ENODEV); - switch (config->val_format_endian) { + switch (regmap_get_val_endian(dev, ®map_mmio, config)) { case REGMAP_ENDIAN_DEFAULT: case REGMAP_ENDIAN_LITTLE: #ifdef __LITTLE_ENDIAN -- 2.8.0.rc3