<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pm24.git/drivers/mtd/chips, branch rust-6.8</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>https://git.kobert.dev/pm24.git/atom?h=rust-6.8</id>
<link rel='self' href='https://git.kobert.dev/pm24.git/atom?h=rust-6.8'/>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/'/>
<updated>2023-10-27T17:45:11Z</updated>
<entry>
<title>mtd: cfi_cmdset_0001: Byte swap OTP info</title>
<updated>2023-10-27T17:45:11Z</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2023-10-20T20:30:29Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=565fe150624ee77dc63a735cc1b3bff5101f38a3'/>
<id>urn:sha1:565fe150624ee77dc63a735cc1b3bff5101f38a3</id>
<content type='text'>
Currently the offset into the device when looking for OTP
bits can go outside of the address of the MTD NOR devices,
and if that memory isn't readable, bad things happen
on the IXP4xx (added prints that illustrate the problem before
the crash):

cfi_intelext_otp_walk walk OTP on chip 0 start at reg_prot_offset 0x00000100
ixp4xx_copy_from copy from 0x00000100 to 0xc880dd78
cfi_intelext_otp_walk walk OTP on chip 0 start at reg_prot_offset 0x12000000
ixp4xx_copy_from copy from 0x12000000 to 0xc880dd78
8&lt;--- cut here ---
Unable to handle kernel paging request at virtual address db000000
[db000000] *pgd=00000000
(...)

This happens in this case because the IXP4xx is big endian and
the 32- and 16-bit fields in the struct cfi_intelext_otpinfo are not
properly byteswapped. Compare to how the code in read_pri_intelext()
byteswaps the fields in struct cfi_pri_intelext.

Adding a small byte swapping loop for the OTP in read_pri_intelext()
and the crash goes away.

The problem went unnoticed for many years until I enabled
CONFIG_MTD_OTP on the IXP4xx as well, triggering the bug.

Cc: stable@vger.kernel.org
Reviewed-by: Nicolas Pitre &lt;nico@fluxnic.net&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20231020-mtd-otp-byteswap-v4-1-0d132c06aa9d@linaro.org
</content>
</entry>
<entry>
<title>mtd: map_ram: prevent use of point and unpoint when NO_XIP is set</title>
<updated>2023-09-22T14:33:34Z</updated>
<author>
<name>Shivamurthy Shastri</name>
<email>shivamurthy.shastri@linutronix.de</email>
</author>
<published>2023-09-19T11:33:20Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=3cff177fc2793a362d784c912f536e69a755925e'/>
<id>urn:sha1:3cff177fc2793a362d784c912f536e69a755925e</id>
<content type='text'>
When the DT property no-unaligned-direct-access is set, map-&gt;phys is set
to NO_XIP. With this property set, the flash should not be exposed
directly to MTD users, since it cannot be mapped.

map_ram() exposes the flash direct access unconditionally which leads to
access errors (when the bus width does not match the RAM width).

Therefore do not set point and unpoint when NO_XIP is set.

Signed-off-by: Shivamurthy Shastri &lt;shivamurthy.shastri@linutronix.de&gt;
Reviewed-by: Benedikt Spranger &lt;b.spranger@linutronix.de&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20230919113320.16953-1-shivamurthy.shastri@linutronix.de
</content>
</entry>
<entry>
<title>mfd: Explicitly include correct DT includes</title>
<updated>2023-08-18T20:48:03Z</updated>
<author>
<name>Rob Herring</name>
<email>robh@kernel.org</email>
</author>
<published>2023-07-14T17:47:27Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=dc0c386e09a701e3c7c2dd58799cee992fa4e4b6'/>
<id>urn:sha1:dc0c386e09a701e3c7c2dd58799cee992fa4e4b6</id>
<content type='text'>
The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it as merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.

Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Link: https://lore.kernel.org/r/20230714174731.4059811-1-robh@kernel.org
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
</entry>
<entry>
<title>mtd: chips: Use SPDX license headers</title>
<updated>2023-06-09T15:27:11Z</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2023-06-03T18:52:00Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=87194abaa5ced8c1cee5499d9da058eadfa63f44'/>
<id>urn:sha1:87194abaa5ced8c1cee5499d9da058eadfa63f44</id>
<content type='text'>
Some of the files in mtd/chips do not have a SPDX license
header, presumably because the text string "GPL'd" didn't
parse with Thomas rulesets for magic license tagging.

Fix this, the code is initially from RedHat which clearly
targeted the Linux kernel and intended it to be GPLv2.

In any case the original author appears to be David
Woodhouse who can then confirm this.

Cc: David Woodhouse &lt;dwmw2@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20230603185200.3571174-1-linus.walleij@linaro.org
</content>
</entry>
<entry>
<title>mtd: cfi_cmdset_0002: Rename chip_ready variables</title>
<updated>2022-04-28T08:17:22Z</updated>
<author>
<name>Tokunori Ikegami</name>
<email>ikegami.t@gmail.com</email>
</author>
<published>2022-03-23T17:04:58Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=43823c5c56f247cfc028bf90299f675dd29abf88'/>
<id>urn:sha1:43823c5c56f247cfc028bf90299f675dd29abf88</id>
<content type='text'>
Signed-off-by: Tokunori Ikegami &lt;ikegami.t@gmail.com&gt;
Acked-by: Vignesh Raghavendra &lt;vigneshr@ti.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20220323170458.5608-5-ikegami.t@gmail.com
</content>
</entry>
<entry>
<title>mtd: cfi_cmdset_0002: Add S29GL064N ID definition</title>
<updated>2022-04-28T08:17:22Z</updated>
<author>
<name>Tokunori Ikegami</name>
<email>ikegami.t@gmail.com</email>
</author>
<published>2022-03-23T17:04:57Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=cccea9414dae8058ce9c48b7c7ccff040501f419'/>
<id>urn:sha1:cccea9414dae8058ce9c48b7c7ccff040501f419</id>
<content type='text'>
It is for the model number 01, 02, V1 and V2.

Signed-off-by: Tokunori Ikegami &lt;ikegami.t@gmail.com&gt;
Acked-by: Vignesh Raghavendra &lt;vigneshr@ti.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20220323170458.5608-4-ikegami.t@gmail.com
</content>
</entry>
<entry>
<title>mtd: cfi_cmdset_0002: Use chip_ready() for write on S29GL064N</title>
<updated>2022-04-28T08:17:10Z</updated>
<author>
<name>Tokunori Ikegami</name>
<email>ikegami.t@gmail.com</email>
</author>
<published>2022-03-23T17:04:56Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=0a8e98305f63deaf0a799d5cf5532cc83af035d1'/>
<id>urn:sha1:0a8e98305f63deaf0a799d5cf5532cc83af035d1</id>
<content type='text'>
Since commit dfeae1073583("mtd: cfi_cmdset_0002: Change write buffer to
check correct value") buffered writes fail on S29GL064N. This is
because, on S29GL064N, reads return 0xFF at the end of DQ polling for
write completion, where as, chip_good() check expects actual data
written to the last location to be returned post DQ polling completion.
Fix is to revert to using chip_good() for S29GL064N which only checks
for DQ lines to settle down to determine write completion.

Link: https://lore.kernel.org/r/b687c259-6413-26c9-d4c9-b3afa69ea124@pengutronix.de/
Fixes: dfeae1073583("mtd: cfi_cmdset_0002: Change write buffer to check correct value")
Cc: stable@vger.kernel.org
Signed-off-by: Tokunori Ikegami &lt;ikegami.t@gmail.com&gt;
Acked-by: Vignesh Raghavendra &lt;vigneshr@ti.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20220323170458.5608-3-ikegami.t@gmail.com
</content>
</entry>
<entry>
<title>mtd: cfi_cmdset_0002: Move and rename chip_check/chip_ready/chip_good_for_write</title>
<updated>2022-04-28T08:17:01Z</updated>
<author>
<name>Tokunori Ikegami</name>
<email>ikegami.t@gmail.com</email>
</author>
<published>2022-03-23T17:04:55Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=083084df578a8bdb18334f69e7b32d690aaa3247'/>
<id>urn:sha1:083084df578a8bdb18334f69e7b32d690aaa3247</id>
<content type='text'>
This is a preparation patch for the S29GL064N buffer writes fix. There
is no functional change.

Link: https://lore.kernel.org/r/b687c259-6413-26c9-d4c9-b3afa69ea124@pengutronix.de/
Fixes: dfeae1073583("mtd: cfi_cmdset_0002: Change write buffer to check correct value")
Signed-off-by: Tokunori Ikegami &lt;ikegami.t@gmail.com&gt;
Cc: stable@vger.kernel.org
Acked-by: Vignesh Raghavendra &lt;vigneshr@ti.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20220323170458.5608-2-ikegami.t@gmail.com
</content>
</entry>
<entry>
<title>mtd: gen_probe: Use bitmap_zalloc() when applicable</title>
<updated>2021-12-09T16:52:29Z</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2021-11-21T15:59:12Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=dd8a2e884a462c09a562f04927cb227e3cdaa498'/>
<id>urn:sha1:dd8a2e884a462c09a562f04927cb227e3cdaa498</id>
<content type='text'>
'chip_map' is a bitmap. So use 'bitmap_zalloc()' to simplify code,
improve the semantic and avoid some open-coded arithmetic in allocator
arguments.

Also change the corresponding 'kfree()' into 'bitmap_free()' to keep
consistency.

Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/a6fe58dffe553a3e79303777d3ba9c60d7613c5b.1637510255.git.christophe.jaillet@wanadoo.fr
</content>
</entry>
<entry>
<title>mtd: fixup CFI on ixp4xx</title>
<updated>2021-10-15T10:27:10Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2021-09-27T14:10:37Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=603362b4a58393061dcfed1c7f0d0fd4aba61126'/>
<id>urn:sha1:603362b4a58393061dcfed1c7f0d0fd4aba61126</id>
<content type='text'>
drivers/mtd/maps/ixp4xx.c requires MTD_CFI_BE_BYTE_SWAP to be set
in order to compile.

drivers/mtd/maps/ixp4xx.c:57:4: error: #error CONFIG_MTD_CFI_BE_BYTE_SWAP required

This patch avoids the #error output by enforcing the policy in
Kconfig. Not sure if this is the right approach, but it helps doing
randconfig builds.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20210927141045.1597593-1-arnd@kernel.org
</content>
</entry>
</feed>
