<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/base/regmap/regmap-mmio.c, branch linux-4.16.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.16.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.16.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2016-05-13T09:36:10Z</updated>
<entry>
<title>Merge remote-tracking branches 'regmap/fix/be', 'regmap/fix/doc' and 'regmap/fix/spmi' into regmap-linus</title>
<updated>2016-05-13T09:36:10Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2016-05-13T09:36:10Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2a2cd5219023ea2e485c3e37486c24177a6da55a'/>
<id>urn:sha1:2a2cd5219023ea2e485c3e37486c24177a6da55a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>regmap: mmio: Explicitly say little endian is the defualt in the bus config</title>
<updated>2016-03-31T20:41:12Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2016-03-31T17:18:09Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2ed94f6fde066fb37bc3553b786edb805561699e'/>
<id>urn:sha1:2ed94f6fde066fb37bc3553b786edb805561699e</id>
<content type='text'>
Otherwise the DT parsing will default to big endian if nothing is
specified.

Reported-by: Krzysztof Kozlowski &lt;k.kozlowski@samsung.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: mmio: Parse endianness definitions from DT</title>
<updated>2016-03-30T15:46:15Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2016-03-29T19:30:44Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0dbdb76c0ca8e7caf27c9a210f64c4359e2974a4'/>
<id>urn:sha1:0dbdb76c0ca8e7caf27c9a210f64c4359e2974a4</id>
<content type='text'>
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 &lt;alexander.stein@systec-electronic.com&gt;
Tested-by: Alexander Stein &lt;alexander.stein@systec-electronic.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: mmio: Fix value endianness selection</title>
<updated>2016-03-23T13:41:06Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2016-03-23T12:13:12Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=9f9f8b863ad130ec0c25f378bdbad64ba71291de'/>
<id>urn:sha1:9f9f8b863ad130ec0c25f378bdbad64ba71291de</id>
<content type='text'>
Currently when selecting value endianness we check the register
endiannes, not the value endianness.

Reported-by: Alexander Stein &lt;alexander.stein@systec-electronic.com&gt;
Tested-by: Alexander Stein &lt;alexander.stein@systec-electronic.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: mmio: Convert to regmap_bus and fix accessor usage</title>
<updated>2016-01-27T20:04:50Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2016-01-27T04:50:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=922a9f936e40001f9b921379aab90047d5990923'/>
<id>urn:sha1:922a9f936e40001f9b921379aab90047d5990923</id>
<content type='text'>
Currently regmap-mmio uses the __raw accessors to read and write from
memory.  This is not safe as these interact poorly with spinlocks and
are not guaranteed to generate emulated instructions on at least ARM
where regmap is commonly used.  The APIs that are provided all provide
some byte swapping so this is difficult to do with the current
regmap-mmio implementation which attempts to use the regmap core byte
swapping.

We can fix this by modernising the MMIO implementation to use
reg_read() and reg_write() operations which were added after the API was
implemented and pass simple unsigned integers through to the bus, making
use of the formatting provided by the I/O accessors using a similar
pattern to that used by the core.  This will be less efficient for block
I/O operations since we now enable and disable any required clocks per
register but it is not clear that any users of regmap-mmio actually use
block I/O and there is room to optimise later.

This removes support for big endian I/O on 64 bit registers since no I/O
accessors are provided, no current users were found and support can be
added easily once they are available.

In addition make the default endianness little endian.  This was the
behaviour prior to 29bb45f25ff305 (regmap-mmio: Use native endianness
for read/write) and is the behaviour desired by most existing users, the
users have been audited and those that need native endianness converted
to request it explicitly.  Previously native was documented as the
default but due to the byte swapping in the accessors this was not
correctly implemented.

Fixes: 29bb45f25ff305 (regmap-mmio: Use native endianness for read/write)
Reported-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Tested-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: mmio: Add regmap_mmio_get_min_stride</title>
<updated>2015-12-08T17:05:50Z</updated>
<author>
<name>Xiubo Li</name>
<email>lixiubo@cmss.chinamobile.com</email>
</author>
<published>2015-12-03T05:27:21Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=75fb0aaea18dbcde60a740c5d62af705366d6357'/>
<id>urn:sha1:75fb0aaea18dbcde60a740c5d62af705366d6357</id>
<content type='text'>
Splite the minimal stride parsing into one signal function.

Signed-off-by: Xiubo Li &lt;lixiubo@cmss.chinamobile.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: mmio: remove the useless code</title>
<updated>2015-12-08T17:05:50Z</updated>
<author>
<name>Xiubo Li</name>
<email>lixiubo@cmss.chinamobile.com</email>
</author>
<published>2015-12-03T05:27:20Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=9d98fa712920a393591f446fa76cb277309dd37b'/>
<id>urn:sha1:9d98fa712920a393591f446fa76cb277309dd37b</id>
<content type='text'>
Signed-off-by: Xiubo Li &lt;lixiubo@cmss.chinamobile.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap-mmio: Use native endianness for read/write</title>
<updated>2015-11-16T09:43:54Z</updated>
<author>
<name>Simon Arlott</name>
<email>simon@fire.lp0.eu</email>
</author>
<published>2015-10-29T19:58:47Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=29bb45f25ff3051354ed330c0d0f10418a2b8c7c'/>
<id>urn:sha1:29bb45f25ff3051354ed330c0d0f10418a2b8c7c</id>
<content type='text'>
The regmap API has an endianness setting for formatting reads and writes.
This can be set by the usual DT "little-endian" and "big-endian" properties.
To work properly the associated regmap_bus needs to read/write in native
endian.

The "syscon" DT device binding creates an mmio-based regmap_bus which
performs all reads/writes as little-endian. These values are then converted
again by regmap, which means that all of the MIPS BCM boards (which are
big-endian) have been declared as "little-endian" to get regmap to convert
them back to big-endian.

Modify regmap-mmio to use the native-endian functions __raw_read*() and
__raw_write*() instead of the little-endian functions read*() and
write*().

Modify the big-endian MIPS BCM boards to use what will now be the correct
endianness instead of pretending that the devices are little-endian.

Signed-off-by: Simon Arlott &lt;simon@fire.lp0.eu&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: Move documentation to regmap.h</title>
<updated>2015-08-11T16:21:44Z</updated>
<author>
<name>Nicolas Boichat</name>
<email>drinkcat@chromium.org</email>
</author>
<published>2015-08-11T10:04:21Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1ed8111443ae8caa455e7107031da36d1a6d351a'/>
<id>urn:sha1:1ed8111443ae8caa455e7107031da36d1a6d351a</id>
<content type='text'>
Init functions defined in regmap*.c files are now prefixed with
__, take lockdep key and class parameters, and should not be
called directly: move the documentation to regmap.h, where the
macros are defined.

Signed-off-by: Nicolas Boichat &lt;drinkcat@chromium.org&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: Use different lockdep class for each regmap init call</title>
<updated>2015-08-07T13:50:59Z</updated>
<author>
<name>Nicolas Boichat</name>
<email>drinkcat@chromium.org</email>
</author>
<published>2015-07-08T06:30:18Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3cfe7a74d42b7e3644f8b2b26aa20146d4f90f0f'/>
<id>urn:sha1:3cfe7a74d42b7e3644f8b2b26aa20146d4f90f0f</id>
<content type='text'>
Lockdep validator complains about recursive locking and deadlock
when two different regmap instances are called in a nested order.
That happens anytime a regmap read/write call needs to access
another regmap.

This is because, for performance reason, lockdep groups all locks
initialized by the same mutex_init() in the same lock class.
Therefore all regmap mutexes are in the same lock class, leading
to lockdep "nested locking" warnings if a regmap accesses another
regmap.

In general, it is impossible to establish in advance the hierarchy
of regmaps, so we make sure that each regmap init call initializes
its own static lock_class_key. This is done by wrapping all
regmap_init calls into macros.

This also allows us to give meaningful names to the lock_class_key.
For example, in rt5677 case, we have in /proc/lockdep_chains:
irq_context: 0
[ffffffc0018d2198] &amp;dev-&gt;mutex
[ffffffc0018d2198] &amp;dev-&gt;mutex
[ffffffc001bd7f60] rt5677:5104:(&amp;rt5677_regmap)-&gt;_lock
[ffffffc001bd7f58] rt5677:5096:(&amp;rt5677_regmap_physical)-&gt;_lock
[ffffffc001b95448] &amp;(&amp;base-&gt;lock)-&gt;rlock

The above would have resulted in a lockdep recursive warning
previously. This is not the case anymore as the lockdep validator
now clearly identifies the 2 regmaps as separate.

Signed-off-by: Nicolas Boichat &lt;drinkcat@chromium.org&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
</feed>
