* [PATCH] mtd: spi-nor: spansion: Add support for S28HS256T
@ 2024-08-30 3:08 tkuw584924
2024-08-30 6:59 ` Michael Walle
0 siblings, 1 reply; 5+ messages in thread
From: tkuw584924 @ 2024-08-30 3:08 UTC (permalink / raw)
To: linux-mtd
Cc: tudor.ambarus, pratyush, mwalle, miquel.raynal, richard, vigneshr,
tkuw584924, Bacem.Daassi, Takahiro Kuwano
From: Takahiro Kuwano <Takahiro.Kuwano@infineon.com>
Infineon S28HS256T is 256Mb Octal SPI device which has same
functionalities with 512Mb and 1Gb parts.
Signed-off-by: Takahiro Kuwano <Takahiro.Kuwano@infineon.com>
---
Datasheet can be found:
https://www.infineon.com/dgdl/Infineon-S28HS256T_S28HL256T_256Mb_SEMPER_Flash_Octal_interface_1_8V_3-DataSheet-v02_00-EN.pdf?fileId=8ac78c8c8fc2dd9c018fc66787aa0657
Tested on Xilinx Zynq-7000 board and Infineon internal SPI controller.
zynq> cat /sys/bus/spi/devices/spi0.0/spi-nor/partname
s28hs256t
zynq> cat /sys/bus/spi/devices/spi0.0/spi-nor/jedec_id
345b19
zynq> cat /sys/bus/spi/devices/spi0.0/spi-nor/manufacturer
spansion
zynq> cat /sys/bus/spi/devices/spi0.0/spi-nor/sfdp
zynq> xxd -p /sys/bus/spi/devices/spi0.0/spi-nor/sfdp
53464450080105fe00000114000100ff84000102500100ff050001055801
00ff8700011c6c0100ff0a000104dc0100ff81000116ec0100ffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
fffffffffffffffffffffffffffffffff7218affffffff0f000000000000
0000eeffffffffff0000ffff00000c2100ff00ff12dc23faff8b82e7ffe1
ec2319497ab07ab0f766805c000000fff910f8a10000087c0000bc020000
0000ffff8e8e41129fff21ffffdc00ee800b7171656500b0ff96a80b0000
0c551ca20000800000000000c0ccffeb88fbffeb00650090060500a10065
009600650095716503d0716503d0a46bfb0290a579a20040288e0000ff00
0000ff0071650690716506900000000000000000716506d1716506d17165
0691716506910000ff000000ff00716505d5716505d50000a01500000601
000000000080710500004306fc65ff0804008000fc65ff4002008000fd65
ff0402008000fe0002fff1ff0100f8ff0100f8fffb01fe0102fff8fffb01
f8ff0100f1ff0100fe0204fff1ff0000f8ff0200f8fff701f8ff0200f1ff
0000ff0400fff8ffff01
zynq> sha256sum /sys/bus/spi/devices/spi0.0/spi-nor/sfdp
4e3ebd30c193c4dc3cd25bf751caf2c7d97306413fc9b58404dc07a9a3e99989 /sys/bus/spi/devices/spi0.0/spi-nor/sfdp
zynq> cat /sys/kernel/debug/spi-nor/spi0.0/capabilities
Supported read modes by the flash
1S-1S-1S
opcode 0x13
mode cycles 0
dummy cycles 0
1S-1S-8S
opcode 0x7c
mode cycles 0
dummy cycles 8
8D-8D-8D
opcode 0xee
mode cycles 0
dummy cycles 24
Supported page program modes by the flash
1S-1S-1S
opcode 0x12
8D-8D-8D
opcode 0x12
zynq> cat /sys/kernel/debug/spi-nor/spi0.0/params
name s28hs256t
id 34 5b 19 0f 03 90
size 32.0 MiB
write size 16
page size 256
address nbytes 4
flags 4B_OPCODES | HAS_4BAIT | HAS_16BIT_SR | IO_MODE_EN_VOLATILE | SOFT_RESET | ECC
opcodes
read 0xee
dummy cycles 24
erase 0xd8
program 0x12
8D extension repeat
protocols
read 8D-8D-8D
write 8D-8D-8D
register 8D-8D-8D
erase commands
21 (4.00 KiB) [2]
dc (256 KiB) [3]
c7 (32.0 MiB)
sector map
region (in hex) | erase mask | overlaid
------------------+------------+----------
00000000-0001ffff | [ 2 ] | no
00020000-0003ffff | [ 3] | yes
00040000-01ffffff | [ 3] | no
zynq> test_spi.sh
random: crng init done
2+0 records in
2+0 records out
2097152 bytes (2.0MB) copied, 3.491336 seconds, 586.6KB/s
Erased 2097152 bytes from address 0x00000000 in flash
Copied 2097152 bytes from address 0x00000000 in flash to spi_read
0000000 ffff ffff ffff ffff ffff ffff ffff ffff
*
0200000
4bda3a28f4ffe603c0ec1258c0034d65a1a0d35ab7bd523a834608adabf03cc5 spi_read
Copied 2097152 bytes from spi_test to address 0x00000000 in flash
Copied 2097152 bytes from address 0x00000000 in flash to spi_read
b84316fcef69ba344f83fd5ffa34a4a18e05a7beb288ae5eab867166d810f504 spi_read
b84316fcef69ba344f83fd5ffa34a4a18e05a7beb288ae5eab867166d810f504 spi_test
Erased 2097152 bytes from address 0x00000000 in flash
Copied 2097152 bytes from address 0x00000000 in flash to spi_read
4bda3a28f4ffe603c0ec1258c0034d65a1a0d35ab7bd523a834608adabf03cc5 spi_read
b84316fcef69ba344f83fd5ffa34a4a18e05a7beb288ae5eab867166d810f504 spi_test
zynq> mtd_debug info /dev/mtd0
mtd.type = MTD_NORFLASH
mtd.flags = MTD_CAP_NANDFLASH
mtd.size = 33554432 (32M)
mtd.erasesize = 262144 (256K)
mtd.writesize = 16
mtd.oobsize = 0
regions = 3
region[0].offset = 0x00000000
region[0].erasesize = 4096 (4K)
region[0].numblocks = 32
region[0].regionindex = 0
region[1].offset = 0x00020000
region[1].erasesize = 131072 (128K)
region[1].numblocks = 1
region[1].regionindex = 1
region[2].offset = 0x00040000
region[2].erasesize = 262144 (256K)
region[2].numblocks = 127
region[2].regionindex = 2
---
drivers/mtd/spi-nor/spansion.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/mtd/spi-nor/spansion.c b/drivers/mtd/spi-nor/spansion.c
index 6cc237c24e07..1390fe6f811d 100644
--- a/drivers/mtd/spi-nor/spansion.c
+++ b/drivers/mtd/spi-nor/spansion.c
@@ -966,6 +966,11 @@ static const struct flash_info spansion_nor_parts[] = {
.name = "s28hl01gt",
.mfr_flags = USE_CLPEF,
.fixups = &s28hx_t_fixups,
+ }, {
+ .id = SNOR_ID(0x34, 0x5b, 0x19),
+ .name = "s28hs256t",
+ .mfr_flags = USE_CLPEF,
+ .fixups = &s28hx_t_fixups,
}, {
.id = SNOR_ID(0x34, 0x5b, 0x1a),
.name = "s28hs512t",
--
2.34.1
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] mtd: spi-nor: spansion: Add support for S28HS256T
2024-08-30 3:08 [PATCH] mtd: spi-nor: spansion: Add support for S28HS256T tkuw584924
@ 2024-08-30 6:59 ` Michael Walle
2024-09-06 11:47 ` Jon Hunter
0 siblings, 1 reply; 5+ messages in thread
From: Michael Walle @ 2024-08-30 6:59 UTC (permalink / raw)
To: tkuw584924, linux-mtd
Cc: tudor.ambarus, pratyush, miquel.raynal, richard, vigneshr,
Bacem.Daassi, Takahiro Kuwano
[-- Attachment #1.1: Type: text/plain, Size: 1329 bytes --]
Hi,
> From: Takahiro Kuwano <Takahiro.Kuwano@infineon.com>
>
> Infineon S28HS256T is 256Mb Octal SPI device which has same
> functionalities with 512Mb and 1Gb parts.
>
> Signed-off-by: Takahiro Kuwano <Takahiro.Kuwano@infineon.com>
> ---
> Datasheet can be found:
> https://www.infineon.com/dgdl/Infineon-S28HS256T_S28HL256T_256Mb_SEMPER_Flash_Octal_interface_1_8V_3-DataSheet-v02_00-EN.pdf?fileId=8ac78c8c8fc2dd9c018fc66787aa0657
As Link: tag above your SoB please.
..
> ---
> drivers/mtd/spi-nor/spansion.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/mtd/spi-nor/spansion.c b/drivers/mtd/spi-nor/spansion.c
> index 6cc237c24e07..1390fe6f811d 100644
> --- a/drivers/mtd/spi-nor/spansion.c
> +++ b/drivers/mtd/spi-nor/spansion.c
> @@ -966,6 +966,11 @@ static const struct flash_info spansion_nor_parts[] = {
> .name = "s28hl01gt",
> .mfr_flags = USE_CLPEF,
> .fixups = &s28hx_t_fixups,
> + }, {
> + .id = SNOR_ID(0x34, 0x5b, 0x19),
> + .name = "s28hs256t",
Skip the name, we don't use names for new flashes anymore.
With that fixed you can add
Reviewed-by: Michael Walle <mwalle@kernel.org>
-michael
> + .mfr_flags = USE_CLPEF,
> + .fixups = &s28hx_t_fixups,
> }, {
> .id = SNOR_ID(0x34, 0x5b, 0x1a),
> .name = "s28hs512t",
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 297 bytes --]
[-- Attachment #2: Type: text/plain, Size: 144 bytes --]
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mtd: spi-nor: spansion: Add support for S28HS256T
2024-08-30 6:59 ` Michael Walle
@ 2024-09-06 11:47 ` Jon Hunter
2024-09-06 13:04 ` Michael Walle
0 siblings, 1 reply; 5+ messages in thread
From: Jon Hunter @ 2024-09-06 11:47 UTC (permalink / raw)
To: Michael Walle, tkuw584924, linux-mtd
Cc: tudor.ambarus, pratyush, miquel.raynal, richard, vigneshr,
Bacem.Daassi, Takahiro Kuwano, linux-tegra@vger.kernel.org
Hi Michael,
On 30/08/2024 07:59, Michael Walle wrote:
> Hi,
>
>> From: Takahiro Kuwano <Takahiro.Kuwano@infineon.com>
>>
>> Infineon S28HS256T is 256Mb Octal SPI device which has same
>> functionalities with 512Mb and 1Gb parts.
>>
>> Signed-off-by: Takahiro Kuwano <Takahiro.Kuwano@infineon.com>
>> ---
>> Datasheet can be found:
>> https://www.infineon.com/dgdl/Infineon-S28HS256T_S28HL256T_256Mb_SEMPER_Flash_Octal_interface_1_8V_3-DataSheet-v02_00-EN.pdf?fileId=8ac78c8c8fc2dd9c018fc66787aa0657
>
> As Link: tag above your SoB please.
>
> ..
>
>
>> ---
>> drivers/mtd/spi-nor/spansion.c | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> diff --git a/drivers/mtd/spi-nor/spansion.c b/drivers/mtd/spi-nor/spansion.c
>> index 6cc237c24e07..1390fe6f811d 100644
>> --- a/drivers/mtd/spi-nor/spansion.c
>> +++ b/drivers/mtd/spi-nor/spansion.c
>> @@ -966,6 +966,11 @@ static const struct flash_info spansion_nor_parts[] = {
>> .name = "s28hl01gt",
>> .mfr_flags = USE_CLPEF,
>> .fixups = &s28hx_t_fixups,
>> + }, {
>> + .id = SNOR_ID(0x34, 0x5b, 0x19),
>> + .name = "s28hs256t",
>
> Skip the name, we don't use names for new flashes anymore.
I have been observing the following boot crash on Tegra30 ...
[ 2.515317] 8<--- cut here ---
[ 2.518384] Unable to handle kernel NULL pointer dereference at virtual address 00000000 when read
[ 2.527357] [00000000] *pgd=00000000
[ 2.530942] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
[ 2.536252] Modules linked in:
[ 2.539309] CPU: 2 UID: 0 PID: 38 Comm: kworker/u20:0 Not tainted 6.11.0-rc6-next-20240905-gad40aff1edff #1
[ 2.549045] Hardware name: NVIDIA Tegra SoC (Flattened Device Tree)
[ 2.555307] Workqueue: events_unbound deferred_probe_work_func
[ 2.561148] PC is at strcmp+0x4/0x34
[ 2.564727] LR is at spi_nor_scan+0x13c/0xf64
[ 2.569085] pc : [<c0d05178>] lr : [<c0734240>] psr: 80000113
[ 2.575345] sp : f08b5ae0 ip : 60000113 fp : 00000558
[ 2.580563] r10: c0ea35b0 r9 : f08b5b64 r8 : c0ea35d0
[ 2.585782] r7 : 0000002e r6 : c1972900 r5 : 00000026 r4 : c2341e04
[ 2.592302] r3 : 00000077 r2 : 00000073 r1 : 00000000 r0 : c2341e05
[ 2.598823] Flags: Nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
[ 2.605953] Control: 10c5387d Table: 8000404a DAC: 00000051
[ 2.611692] Register r0 information: slab kmalloc-1k start c2341c00 pointer offset 517 size 1024
[ 2.620486] Register r1 information: NULL pointer
[ 2.625189] Register r2 information: non-paged memory
[ 2.630238] Register r3 information: non-paged memory
[ 2.635286] Register r4 information: slab kmalloc-1k start c2341c00 pointer offset 516 size 1024
[ 2.644077] Register r5 information: non-paged memory
[ 2.649125] Register r6 information: slab task_struct start c1972900 pointer offset 0 size 2624
[ 2.657830] Register r7 information: non-paged memory
[ 2.662879] Register r8 information: non-slab/vmalloc memory
[ 2.668536] Register r9 information: 2-page vmalloc region starting at 0xf08b4000 allocated at kernel_clone+0xb4/0x3d8
[ 2.679243] Register r10 information: non-slab/vmalloc memory
[ 2.684985] Register r11 information: non-paged memory
[ 2.690121] Register r12 information: non-paged memory
[ 2.695255] Process kworker/u20:0 (pid: 38, stack limit = 0x(ptrval))
[ 2.701692] Stack: (0xf08b5ae0 to 0xf08b6000)
[ 2.706048] 5ae0: a0000113 c08fac4c c0ea1030 00000004 c1a11840 00000000 ffffffff c02b9f94
[ 2.714220] 5b00: c15dce68 ef7e420c 20000113 c08fac4c 00000000 c1a12000 c2341dac c2341c00
[ 2.722392] 5b20: c15dce68 ef7e420c 60000113 edb7cb1f c1a11840 c1a11840 c2341c00 c2341e04
[ 2.730564] 5b40: 00000000 00000000 c1972900 c1505994 c2341c01 c07350fc ffffffff c02b9f94
[ 2.738735] 5b60: c2341c00 00ffffff c1513794 00000000 c1adc700 c19f1b80 c2341dac c2341c00
[ 2.746907] 5b80: 00000113 c06b04dc c19f1b00 c19f1b40 0000000c 00000040 c2341c00 c06b05c4
[ 2.755079] 5ba0: c2341c00 00000000 c1a11000 edb7cb1f c1adc700 c2341c00 00000000 c1513794
[ 2.763250] 5bc0: 00000000 c1adc700 00000000 c073aa74 c2341c00 00000000 c15137a4 c06ac3f8
[ 2.771422] 5be0: c2341c00 c15137a4 c2341c00 0000001c c1adc700 c06ac63c c1adc700 00000000
[ 2.779594] 5c00: c1505994 c15da864 c15137a4 c2341c00 0000001c c1adc700 00000000 c1505994
[ 2.787765] 5c20: c2341c01 c06ac7c8 00000001 c15137a4 f08b5c84 c2341c00 c1adc700 c06ac8fc
[ 2.795937] 5c40: 00000000 f08b5c84 c06ac868 c1972900 c1adc700 c06aa7d8 00000000 c1adc770
[ 2.804108] 5c60: c1bd98b8 edb7cb1f c2341c00 c1972900 c2341c44 c1adc700 00000001 c06ac284
[ 2.812280] 5c80: ef7e4224 c2341c00 00000001 edb7cb1f c2341c00 c1a11000 c2341c00 c1adc700
[ 2.820452] 5ca0: 00000000 c06ab3ec c2341c00 c1a11000 ef7e4218 c1972900 00000000 c06a87f8
[ 2.828623] 5cc0: 00000000 c2341c00 c1a11000 00000000 c2341c00 edb7cb1f c2341def c2341ddf
[ 2.836795] 5ce0: c2341c00 c1a11000 00000000 c2341df0 000001df c073f590 c1972900 c1994010
[ 2.844967] 5d00: c2341c00 c1a11220 c2341c00 c2341c00 c2341de0 c2341de0 00000001 ef7e4270
[ 2.853139] 5d20: 000001e2 c073f658 c1a11000 ef7e420c c2341c00 c073ff64 00000000 c01917e8
[ 2.861310] 5d40: 00000070 c10d6ce0 c10d6cec 00000000 c1972900 c10d6ed4 01312d00 00000001
[ 2.869484] 5d60: 00000070 00000000 c19e73d4 c018a6a8 00000070 c1af4e40 00000000 c19f2280
[ 2.877654] 5d80: 00000000 c0744514 c1a11380 00000070 c0745688 c19e7300 c19e7318 edb7cb1f
[ 2.885826] 5da0: 00002000 c1a11000 c1a11380 00020000 c1994010 c1994000 c1972900 00000070
[ 2.893998] 5dc0: 00000000 c0744ee0 c1af4e40 c1a11380 00000000 01b7cb1f c1af4d80 edb7cb1f
[ 2.902171] 5de0: c1994010 00000000 c1514938 00000000 c189e800 c1505c74 c18d180d c06ae9c8
[ 2.910344] 5e00: c1994010 00000000 c1514938 c06ac3f8 c1994010 c1514938 c1994010 0000001c
[ 2.918515] 5e20: c189e800 c06ac63c c189e800 c1505c74 c18d180d c15da864 c1514938 c1994010
[ 2.926687] 5e40: 0000001c c189e800 c1505c74 c18d180d 00000000 c06ac7c8 00000001 c1514938
[ 2.934859] 5e60: f08b5eb4 c1994010 c189e800 c06ac8fc 00000000 f08b5eb4 c06ac868 c1972900
[ 2.943031] 5e80: c189e800 c06aa7d8 c1505c74 c189e870 c1bd9a38 edb7cb1f c1994010 c1972900
[ 2.951201] 5ea0: c1994054 c189e800 00000001 c06ac284 00000000 c1994010 00000001 edb7cb1f
[ 2.959374] 5ec0: c1994010 c1505c3c c1994010 c189e800 00000000 c06ab3ec c1994010 c1505c3c
[ 2.967545] 5ee0: c1505c3c c1505c54 00000000 c06ab8ec c18e7400 c18d1800 c190a400 c1505c70
[ 2.975717] 5f00: 00000000 c013c900 00000402 c1972900 00000000 c01b9440 c0e0105c 00000000
[ 2.983889] 5f20: c157efac c18e7450 61c88647 c18e742c c157e2ee c190a420 c190a420 c190a400
[ 2.992061] 5f40: c18e7400 c190a420 c190a420 c190a45c c1403d40 c157e2ee c190a400 c013d2e4
[ 3.000233] 5f60: c1056338 00000000 f08b5f7c c18e8280 c1972900 c013d1ac c18e7400 c18e8380
[ 3.008405] 5f80: f0815e5c 00000000 00000000 c0146038 c18e8280 c0145f24 00000000 00000000
[ 3.016577] 5fa0: 00000000 00000000 00000000 c01001ac 00000000 00000000 00000000 00000000
[ 3.024748] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 3.032921] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[ 3.041090] Call trace:
[ 3.041101] strcmp from spi_nor_scan+0x13c/0xf64
[ 3.048336] spi_nor_scan from spi_nor_probe+0x94/0x2c4
[ 3.053564] spi_nor_probe from spi_probe+0x88/0xac
[ 3.058452] spi_probe from really_probe+0xc8/0x284
[ 3.063337] really_probe from __driver_probe_device+0x88/0x194
[ 3.069256] __driver_probe_device from driver_probe_device+0x30/0xd0
[ 3.075696] driver_probe_device from __device_attach_driver+0x94/0xc4
[ 3.082224] __device_attach_driver from bus_for_each_drv+0x58/0xc0
[ 3.088491] bus_for_each_drv from __device_attach+0xf0/0x194
[ 3.094234] __device_attach from bus_probe_device+0x88/0x8c
[ 3.099894] bus_probe_device from device_add+0x57c/0x754
[ 3.105303] device_add from __spi_add_device+0x15c/0x200
[ 3.110713] __spi_add_device from spi_add_device+0x24/0x38
[ 3.116286] spi_add_device from spi_register_controller+0x798/0xaa8
[ 3.122642] spi_register_controller from tegra_slink_probe+0x2e8/0x428
[ 3.129261] tegra_slink_probe from platform_probe+0x5c/0xb8
[ 3.134928] platform_probe from really_probe+0xc8/0x284
[ 3.140241] really_probe from __driver_probe_device+0x88/0x194
[ 3.146159] __driver_probe_device from driver_probe_device+0x30/0xd0
[ 3.152599] driver_probe_device from __device_attach_driver+0x94/0xc4
[ 3.159125] __device_attach_driver from bus_for_each_drv+0x58/0xc0
[ 3.165390] bus_for_each_drv from __device_attach+0xf0/0x194
[ 3.171133] __device_attach from bus_probe_device+0x88/0x8c
[ 3.176791] bus_probe_device from deferred_probe_work_func+0x7c/0xa8
[ 3.183230] deferred_probe_work_func from process_scheduled_works+0xe8/0x498
[ 3.190371] process_scheduled_works from worker_thread+0x138/0x2bc
[ 3.196637] worker_thread from kthread+0x114/0x130
[ 3.201519] kthread from ret_from_fork+0x14/0x28
[ 3.206223] Exception stack(0xf08b5fb0 to 0xf08b5ff8)
[ 3.211270] 5fa0: 00000000 00000000 00000000 00000000
[ 3.219441] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 3.227612] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[ 3.234224] Code: e5e32001 1afffffb e12fff1e e4d03001 (e4d12001)
[ 3.240384] ---[ end trace 0000000000000000 ]---
Bisect is pointing to this commit and adding the 'name' field does fix
it. So it would appear the SPI NOR code still wants the name field.
Jon
--
nvpublic
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mtd: spi-nor: spansion: Add support for S28HS256T
2024-09-06 11:47 ` Jon Hunter
@ 2024-09-06 13:04 ` Michael Walle
2024-09-06 17:23 ` Jon Hunter
0 siblings, 1 reply; 5+ messages in thread
From: Michael Walle @ 2024-09-06 13:04 UTC (permalink / raw)
To: Jon Hunter, tkuw584924, linux-mtd
Cc: tudor.ambarus, pratyush, miquel.raynal, richard, vigneshr,
Bacem.Daassi, Takahiro Kuwano, linux-tegra@vger.kernel.org
[-- Attachment #1.1: Type: text/plain, Size: 868 bytes --]
Hi Jon,
> Bisect is pointing to this commit and adding the 'name' field does fix
> it. So it would appear the SPI NOR code still wants the name field.
Thanks for the report, could you try the following patch.
-michael
diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
index d8e551fd2e2a..101ee5b0ddeb 100644
--- a/drivers/mtd/spi-nor/core.c
+++ b/drivers/mtd/spi-nor/core.c
@@ -3281,7 +3281,8 @@ static const struct flash_info *spi_nor_match_name(struct spi_nor *nor,
for (i = 0; i < ARRAY_SIZE(manufacturers); i++) {
for (j = 0; j < manufacturers[i]->nparts; j++) {
- if (!strcmp(name, manufacturers[i]->parts[j].name)) {
+ if (manufacturers[i]->parts[j].name &&
+ !strcmp(name, manufacturers[i]->parts[j].name)) {
nor->manufacturer = manufacturers[i];
return &manufacturers[i]->parts[j];
}
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 297 bytes --]
[-- Attachment #2: Type: text/plain, Size: 144 bytes --]
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] mtd: spi-nor: spansion: Add support for S28HS256T
2024-09-06 13:04 ` Michael Walle
@ 2024-09-06 17:23 ` Jon Hunter
0 siblings, 0 replies; 5+ messages in thread
From: Jon Hunter @ 2024-09-06 17:23 UTC (permalink / raw)
To: Michael Walle, tkuw584924, linux-mtd
Cc: tudor.ambarus, pratyush, miquel.raynal, richard, vigneshr,
Bacem.Daassi, Takahiro Kuwano, linux-tegra@vger.kernel.org
Hi Michael,
On 06/09/2024 14:04, Michael Walle wrote:
> Hi Jon,
>
>> Bisect is pointing to this commit and adding the 'name' field does fix
>> it. So it would appear the SPI NOR code still wants the name field.
>
> Thanks for the report, could you try the following patch.
>
> -michael
>
> diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
> index d8e551fd2e2a..101ee5b0ddeb 100644
> --- a/drivers/mtd/spi-nor/core.c
> +++ b/drivers/mtd/spi-nor/core.c
> @@ -3281,7 +3281,8 @@ static const struct flash_info *spi_nor_match_name(struct spi_nor *nor,
>
> for (i = 0; i < ARRAY_SIZE(manufacturers); i++) {
> for (j = 0; j < manufacturers[i]->nparts; j++) {
> - if (!strcmp(name, manufacturers[i]->parts[j].name)) {
> + if (manufacturers[i]->parts[j].name &&
> + !strcmp(name, manufacturers[i]->parts[j].name)) {
> nor->manufacturer = manufacturers[i];
> return &manufacturers[i]->parts[j];
> }
Works for me! If you plan to send a patch feel free to add my ...
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Thanks
Jon
--
nvpublic
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-09-06 17:23 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-30 3:08 [PATCH] mtd: spi-nor: spansion: Add support for S28HS256T tkuw584924
2024-08-30 6:59 ` Michael Walle
2024-09-06 11:47 ` Jon Hunter
2024-09-06 13:04 ` Michael Walle
2024-09-06 17:23 ` Jon Hunter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).