<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/memory/atmel-ebi.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-08-27T21:10:31Z</updated>
<entry>
<title>memory: atmel-ebi: Use struct_size() in devm_kzalloc()</title>
<updated>2018-08-27T21:10:31Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2018-08-24T01:07:06Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f62df676d7f16580fa5085a8f51a1cbe27f7dd10'/>
<id>urn:sha1:f62df676d7f16580fa5085a8f51a1cbe27f7dd10</id>
<content type='text'>
One of the more common cases of allocation size calculations is finding
the size of a structure that has a zero-sized array at the end, along
with memory for some number of elements for that array. For example:

struct foo {
	int stuff;
        void *entry[];
};

instance = devm_kzalloc(dev, sizeof(struct foo) + sizeof(void *) * count, GFP_KERNEL);

Instead of leaving these open-coded and prone to type mistakes, we can
now use the new struct_size() helper:

instance = devm_kzalloc(dev, struct_size(instance, entry, count), GFP_KERNEL);

This issue was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc</title>
<updated>2017-09-11T03:40:00Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2017-09-11T03:40:00Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ae46654bcff303b33facbbd04a3ad9c21d303f9b'/>
<id>urn:sha1:ae46654bcff303b33facbbd04a3ad9c21d303f9b</id>
<content type='text'>
Pull ARM SoC driver updates from Olof Johansson:
 "This branch contains platform-related driver updates for ARM and ARM64.

  Among them:

   - Reset driver updates:
     + New API for dealing with arrays of resets
     + Make unimplemented {de,}assert return success on shared resets
     + MSDKv1 driver
     + Removal of obsolete Gemini reset driver
     + Misc updates for sunxi and Uniphier

   - SoC drivers:
     + Platform SoC driver registration on Tegra
     + Shuffle of Qualcomm drivers into a submenu
     + Allwinner A64 support for SRAM
     + Renesas R-Car R3 support
     + Power domains for Rockchip RK3366

   - Misc updates and smaller fixes for TEE and memory driver
     subsystems"

* tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (54 commits)
  firmware: arm_scpi: fix endianness of dev_id in struct dev_pstate_set
  soc/tegra: fuse: Add missing semi-colon
  soc/tegra: Restrict SoC device registration to Tegra
  drivers: soc: sunxi: add support for A64 and its SRAM C
  drivers: soc: sunxi: add support for remapping func value to reg value
  drivers: soc: sunxi: fix error processing on base address when claiming
  dt-bindings: add binding for Allwinner A64 SRAM controller and SRAM C
  bus: sunxi-rsb: Enable by default for ARM64
  soc/tegra: Register SoC device
  firmware: tegra: set drvdata earlier
  memory: Convert to using %pOF instead of full_name
  soc: Convert to using %pOF instead of full_name
  bus: Convert to using %pOF instead of full_name
  firmware: Convert to using %pOF instead of full_name
  soc: mediatek: add SCPSYS power domain driver for MediaTek MT7622 SoC
  soc: mediatek: add header files required for MT7622 SCPSYS dt-binding
  soc: mediatek: reduce code duplication of scpsys_probe across all SoCs
  dt-bindings: soc: update the binding document for SCPSYS on MediaTek MT7622 SoC
  reset: uniphier: add analog amplifiers reset control
  reset: uniphier: add video input subsystem reset control
  ...
</content>
</entry>
<entry>
<title>mfd: syscon: atmel-smc: Add helper to retrieve register layout</title>
<updated>2017-09-05T07:46:01Z</updated>
<author>
<name>Ludovic Desroches</name>
<email>ludovic.desroches@microchip.com</email>
</author>
<published>2017-07-18T13:22:19Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b0f3ab20e76499db12b0bbadb5737d9870f10418'/>
<id>urn:sha1:b0f3ab20e76499db12b0bbadb5737d9870f10418</id>
<content type='text'>
For HSMC controller, the register layout depends on the device i.e. the
offset of setup, pulse, cycle, mode and timings registers is not the
same. An helper is added to provide the correct register layout.

Fixes: fe9d7cb22ef3 ("mfd: syscon: atmel-smc: Add new helpers to ease
SMC regs manipulation")
Suggested-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
Signed-off-by: Ludovic Desroches &lt;ludovic.desroches@microchip.com&gt;
Acked-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
Acked-by: Nicolas Ferre &lt;nicolas.ferre@microchip.com&gt;
Acked-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
</entry>
<entry>
<title>memory: Convert to using %pOF instead of full_name</title>
<updated>2017-08-16T19:37:00Z</updated>
<author>
<name>Rob Herring</name>
<email>robh@kernel.org</email>
</author>
<published>2017-07-18T21:43:14Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=db749d17cb917c0506f62eb3006950e25acb737f'/>
<id>urn:sha1:db749d17cb917c0506f62eb3006950e25acb737f</id>
<content type='text'>
Now that we have a custom printf format specifier, convert users of
full_name to use %pOF instead. This is preparation to remove storing
of the full path string for each node.

Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Acked-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
Acked-by: Roger Quadros &lt;rogerq@ti.com&gt;
Cc: Nicolas Ferre &lt;nicolas.ferre@microchip.com&gt;
Cc: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
Cc: Tony Lindgren &lt;tony@atomide.com&gt;
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-omap@vger.kernel.org
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
</content>
</entry>
<entry>
<title>memory: atmel-ebi: Fix smc cycle xlate converter</title>
<updated>2017-07-26T20:37:54Z</updated>
<author>
<name>Alexander Dahl</name>
<email>ada@thorsis.com</email>
</author>
<published>2017-07-25T12:00:24Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3fb3b3c4b68e33bb4acf42361b6a0db96115de35'/>
<id>urn:sha1:3fb3b3c4b68e33bb4acf42361b6a0db96115de35</id>
<content type='text'>
The converter function for translating ns timings in register values was
initialized with a wrong function pointer. This resulted in wrong
register values also for the setup and pulse registers when configuring
the EBI interface trough dts.

Includes a small fix in a comment of the smc driver, which was probably
just a copy'n'paste mistake.

Signed-off-by: Alexander Dahl &lt;ada@thorsis.com&gt;
Acked-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
Acked-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>memory: atmel-ebi: Allow t_DF timings of zero ns</title>
<updated>2017-07-26T20:37:46Z</updated>
<author>
<name>Alexander Dahl</name>
<email>ada@thorsis.com</email>
</author>
<published>2017-07-25T12:00:23Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1f6b53901f5bffbbb0464c732e83bb2a3a784ff7'/>
<id>urn:sha1:1f6b53901f5bffbbb0464c732e83bb2a3a784ff7</id>
<content type='text'>
As reported in [1] and in [2] it's not possible to set the device tree
property 'atmel,smc-tdf-ns' to zero, although the SoC allows a setting
of 0ns for the t_DF time.

Allow this setting by doing the same thing as in the atmel nand
controller driver by setting ncycles to ATMEL_SMC_MODE_TDF_MIN if zero
is set in the dts.

[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2017-March/490966.html
[2] http://lists.infradead.org/pipermail/linux-arm-kernel/2017-July/520652.html

Suggested-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
Signed-off-by: Alexander Dahl &lt;ada@thorsis.com&gt;
Acked-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>memory: atmel-ebi: Fix smc timing return value evaluation</title>
<updated>2017-07-26T20:37:30Z</updated>
<author>
<name>Alexander Dahl</name>
<email>ada@thorsis.com</email>
</author>
<published>2017-07-25T12:00:22Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=bc9b934b2fbbd51008a1b52c0cd1b457e6440736'/>
<id>urn:sha1:bc9b934b2fbbd51008a1b52c0cd1b457e6440736</id>
<content type='text'>
Setting optional EBI/SMC properties through device tree always fails due
to wrong evaluation of the return value of
atmel_ebi_xslate_smc_timings().

If you put some of those properties in your dts file, but not
'atmel,smc-tdf-ns' the local variable 'required' in
atmel_ebi_xslate_smc_timings() stays on 'false' after the first 'if'
block. This leads to setting 'ret' to -EINVAL in the first run of the
following 'for' loop which is then the return value of this function.

However if you set 'atmel,smc-tdf-ns' in the dts file and everything in
atmel_ebi_xslate_smc_timings() works well, it returns the content of
'required' which is 'true' then.

So the function atmel_ebi_xslate_smc_timings() always returns non-zero
which lets its call in atmel_ebi_xslate_smc_config() always fail and
thus returning -EINVAL, so the EBI configuration for this node fails.

Judging from the following code evaluating the local 'required' variable
in atmel_ebi_xslate_smc_config() and the call of caps-&gt;xlate_config in
atmel_ebi_dev_setup() it's probably right to only let the call fail if a
negative error code is returned.

Signed-off-by: Alexander Dahl &lt;ada@thorsis.com&gt;
Acked-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>memory: atmel-ebi: mark PM ops as __maybe_unused</title>
<updated>2017-05-15T09:37:58Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2017-04-19T17:48:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=41b80bb1db5c4c547cf187d1bc0c6c6feb7c14af'/>
<id>urn:sha1:41b80bb1db5c4c547cf187d1bc0c6c6feb7c14af</id>
<content type='text'>
We get a harmless warning without CONFIG_PM:

drivers/memory/atmel-ebi.c:584:12: error: 'atmel_ebi_resume' defined but not used [-Werror=unused-function]

Marking the function as __maybe_unused does the right thing here
and drops it silently when unused.

Fixes: a483fb10e5ea ("memory: atmel-ebi: Add PM ops")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>memory: atmel-ebi: Add PM ops</title>
<updated>2017-04-27T08:25:06Z</updated>
<author>
<name>Boris Brezillon</name>
<email>boris.brezillon@free-electrons.com</email>
</author>
<published>2017-03-16T08:30:34Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4407319d8fff93308c2afe40e7c2a7dc564ec122'/>
<id>urn:sha1:4407319d8fff93308c2afe40e7c2a7dc564ec122</id>
<content type='text'>
Add a -&gt;resume() hook to make sure the EBI dev configs are correctly
restored when resuming the platform.

Signed-off-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
Acked-by: Nicolas Ferre &lt;nicolas.ferre@microchip.com&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
</entry>
<entry>
<title>memory: atmel-ebi: Add missing -&gt;numcs assignment</title>
<updated>2017-04-27T08:25:06Z</updated>
<author>
<name>Boris Brezillon</name>
<email>boris.brezillon@free-electrons.com</email>
</author>
<published>2017-03-16T08:30:33Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=aaa572b945876619ebd114d5a456d1250f267b9a'/>
<id>urn:sha1:aaa572b945876619ebd114d5a456d1250f267b9a</id>
<content type='text'>
ebid-&gt;numcs is never assigned, set it to numcs after allocating the
EBI dev object.

Signed-off-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
Acked-by: Nicolas Ferre &lt;nicolas.ferre@microchip.com&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
</entry>
</feed>
