[PATCH] mtd: spi-nor: spansion: Add support for S28HS256T

Jon Hunter jonathanh at nvidia.com
Fri Sep 6 04:47:45 PDT 2024


Hi Michael,

On 30/08/2024 07:59, Michael Walle wrote:
> Hi,
> 
>> From: Takahiro Kuwano <Takahiro.Kuwano at 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 at 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



More information about the linux-mtd mailing list