<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/base/regmap/regmap-mmio.c, branch linux-5.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2018-05-17T07:11:41Z</updated>
<entry>
<title>regmap: Skip clk_put for attached clocks when freeing context</title>
<updated>2018-05-17T07:11:41Z</updated>
<author>
<name>James Kelly</name>
<email>jamespeterkelly@gmail.com</email>
</author>
<published>2018-05-15T00:59:58Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=eb4a219d19fde99616f120f5655a7121c918cd49'/>
<id>urn:sha1:eb4a219d19fde99616f120f5655a7121c918cd49</id>
<content type='text'>
Capability to attach an existing clk to a MMIO regmap was
introduced in 4.17rc1.

However, when using attached clk, regmap does not do the clk_get.
Therefore it should not do the clk_put when freeing the MMIO
regmap context.

There does not appear to be any users of attached clocks yet
so this would be a good time to make this change before anything
depends on the existing behaviour.

Signed-off-by: James Kelly &lt;jamespeterkelly@gmail.com&gt;
Acked-by: Maxime Ripard &lt;maxime.ripard@bootlin.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>regmap: mmio: Add function to attach a clock</title>
<updated>2018-02-26T11:05:44Z</updated>
<author>
<name>Maxime Ripard</name>
<email>maxime.ripard@free-electrons.com</email>
</author>
<published>2018-02-21T09:20:25Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=31895662f9ba81e8ea9ef05abf8edcb29d4b9c18'/>
<id>urn:sha1:31895662f9ba81e8ea9ef05abf8edcb29d4b9c18</id>
<content type='text'>
regmap_init_mmio_clk allows to specify a clock that needs to be enabled
while accessing the registers.

However, that clock is retrieved through its clock ID, which means it will
lookup that clock based on the current device that registers the regmap,
and, in the DT case, will only look in that device OF node.

This might be problematic if the clock to enable is stored in another node.
Let's add a function that allows to attach a clock that has already been
retrieved to a regmap in order to fix this.

Signed-off-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<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>
</feed>
