Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1367841

Re: [PATCH 2/2] regmap: mmio: Parse endianness definitions from DT

Path csiph.com!news.mixmin.net!weretis.net!feeder4.news.weretis.net!newsfeed.CARNet.hr!news.spin.it!bofh.it!news.nic.it!robomod
From Krzysztof Kozlowski <k.kozlowski@samsung.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] regmap: mmio: Parse endianness definitions from DT
Date Thu, 31 Mar 2016 08:30:02 +0200
Message-ID <riEhc-JS-13@gated-at.bofh.it> (permalink)
References <ri7Oi-2sv-9@gated-at.bofh.it> <ri7Oi-2sv-11@gated-at.bofh.it> <riDXQ-Ch-3@gated-at.bofh.it>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc; bh=hhUa9bWj7Hllu9NKGRajSNdWNTfDtW95M/jbjwAnX1Q=; b=Wf70OylhaPe0pqesh8gExb0zqnojuObsYNLXteWYxwxsFvXGaQGWLM5uSc6g5aUScY BACtPAJcfhjWlDDIsFRKtLs5FGkbPLWtoqz0Puvrj6zP1E+Znf76BQy4gEHz5VZ0eE4B LzW4kT6Ri2AI5NO99RscFPLqZi+xrByVBgD2JzYzFoK9ZS+DZykEkQTdeksRipdWd52d MiJZiT/X8uUOhgKy2J8Psy7hGwS6X7u7RWWuWu8lw4Lmrm5775IXK2RxfS1XpIcT0bKG oE03yyshrJV5fbEbJcwbzv4WZhPMw9cEYhDRwvGGbOyL4S9elbG7DpmXxKjLWPEEovLc aFkg==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc; bh=hhUa9bWj7Hllu9NKGRajSNdWNTfDtW95M/jbjwAnX1Q=; b=Qw4HmldlSxxgDcb90RrVfnn9VWE4lXUEHT/Nf6+ntNpfOt9STMaJcQ9PNFDsM+uq1D i3batNyLi18A+bOLcB24i7chudJzvgqK9J+VhGid9pXx8ZoimxLe4M0bTrcc+wxkWq5X 7T7WN6fbcqRUs6TuXAgTLh7XwWFzkxXrFB3hJvA0/FnF1ouANGI1B6/oy05kA0R20uSZ P2DL9H/5copS83Grdy3t5MZhgp2KRvnZKU0uqW/c3kfu4o0vkCZk3IS95B2klgc8wXFZ 0KzjKi2FLMP63roAprTgTIihMGrqfiNtuUa2g1bvzETTmVuj+1Ppe7JXGFqmPpnzR3x9 otCQ==
X-Gm-Message-State AD7BkJI8QCwtPStcH1YZu4L2hdFk6MXEEYICV3ETE8kGVmMTuDakgE8GtLWIC6OARFwqwE6npwWjqojTgUT1vA==
MIME-Version 1.0
X-Received by 10.157.12.200 with SMTP id o8mr7612864otd.148.1459405424791; Wed, 30 Mar 2016 23:23:44 -0700 (PDT)
X-Google-Sender-Auth WygIXD_VMqS0rVSN3c0z_aWRdF8
Content-Type text/plain; charset=UTF-8
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 35
Organization linux.* mail to news gateway
X-Original-Cc Alexander Stein <alexander.stein@systec-electronic.com>, linux-kernel@vger.kernel.org
X-Original-Date Thu, 31 Mar 2016 15:23:44 +0900
X-Original-Message-ID <CAJKOXPenN0A3qVHjd3Na0NGnUpvra6Bn1GhjhETpOe_dZ6ks3w@mail.gmail.com>
X-Original-References <1459280515-1006-1-git-send-email-broonie@kernel.org> <1459280515-1006-2-git-send-email-broonie@kernel.org> <CAJKOXPd38HaK2E67rD-h4j3gPeteJnwX2NEMkUeRH0spCJwh9w@mail.gmail.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1367841

Show key headers only | View raw


On Thu, Mar 31, 2016 at 3:09 PM, Krzysztof Kozlowski
<k.kozlowski@samsung.com> wrote:
> On Wed, Mar 30, 2016 at 4:41 AM, Mark Brown <broonie@kernel.org> wrote:
>> 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 <alexander.stein@systec-electronic.com>
>> Signed-off-by: Mark Brown <broonie@kernel.org>
>
> This breaks my syscon reboot handler (Exynos4412, Trats2):
> ###############
> -sh-4.1# reboot
> Rebooting.
> [   37.056210] reboot: Restarting system
> [   38.058649] Unable to restart system
> [   39.060987] Reboot failed -- System halted
> ###############
>
> I added a printk before switch and:
> config->val_format_endian: REGMAP_ENDIAN_DEFAULT
> regmap_get_val_endian(): REGMAP_ENDIAN_BIG,
>

... and the big-endian is coming from the last return in
regmap_get_val_endian() (/* Use this if no other value was found */).
I don't have endian property in DTS for the syscon device so it always
ended with default which in the regmap_mmio_gen_context() was mapped
to little endian. Now default is big endian.

I guess the big/little endian property should be required in that case.

Best regards,
Krzysztof

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 2/2] regmap: mmio: Parse endianness definitions from DT Mark Brown <broonie@kernel.org> - 2016-03-29 21:50 +0200
  Re: [PATCH 2/2] regmap: mmio: Parse endianness definitions from DT Alexander Stein <alexander.stein@systec-electronic.com> - 2016-03-30 12:40 +0200
  Re: [PATCH 2/2] regmap: mmio: Parse endianness definitions from DT Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-03-31 08:10 +0200
    Re: [PATCH 2/2] regmap: mmio: Parse endianness definitions from DT Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-03-31 08:30 +0200
    Re: [PATCH 2/2] regmap: mmio: Parse endianness definitions from DT Mark Brown <broonie@kernel.org> - 2016-03-31 19:20 +0200

csiph-web