Re: [U-Boot] Issue in u-boot; TFTP error: trying to overwrite reserved memory...

2020-11-12 Thread Bernhard Kirchen
Hello Christopher, hello SImon, today I debugged this problem, as tftp was not working in my u-boot SPL (AM335x based custom board) for the reasons described in this thread. It turns out that lmb_init_and_reserve() could not set proper values as bd->bi_dram[0].size = . The reason IMHO is

[PATCH v1 3/7] SST26* locking: need to enable write

2021-01-28 Thread Bernhard Kirchen
prior to using the WBPR (write block protection register) command to write new block protection register values, the WREN command must be sent. otherwise the new values are not applied. Signed-off-by: Bernhard Kirchen --- drivers/mtd/spi/spi-nor-core.c | 8 1 file changed, 8

[PATCH v1 4/7] write WPEN bit for SST26* devices when locking

2021-01-28 Thread Bernhard Kirchen
ng the IOC bit in SST26* devices' config register if any block is protected by "sf protect lock" command, thus enabling hardware write protection. this behavior is similar to the "sf protect lock" implementation for Micron (and compatible) chips. Signed-off-by: Bernhard Kir

[PATCH v1 5/7] sf protect (un)lock for SST26*: test BPR values

2021-01-28 Thread Bernhard Kirchen
ed, as the respective registers are write-protected in that case. Signed-off-by: Bernhard Kirchen --- drivers/mtd/spi/spi-nor-core.c | 55 +- 1 file changed, 48 insertions(+), 7 deletions(-) diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-co

[PATCH v1 0/7] fix and improve Micron/SST26* SPI NOR protection handling

2021-01-28 Thread Bernhard Kirchen
expectations. Bernhard Kirchen (7): command sf: help text format sf protect: warn about failed (un)lock operation SST26* locking: need to enable write write WPEN bit for SST26* devices when locking sf protect (un)lock for SST26*: test BPR values fix sst26_process_bpr check provide &qu

[PATCH v1 1/7] command sf: help text format

2021-01-28 Thread Bernhard Kirchen
properly indent the help text and use single quotes consistently to mark variable parameters. Signed-off-by: Bernhard Kirchen --- cmd/sf.c | 48 ++-- 1 file changed, 22 insertions(+), 26 deletions(-) diff --git a/cmd/sf.c b/cmd/sf.c index c0d6a8f8a0

[PATCH v1 2/7] sf protect: warn about failed (un)lock operation

2021-01-28 Thread Bernhard Kirchen
it is not guaranteed that there is a human readable message when the lock or unlock operation failed. make sure there is a message emitted by the "sf protect" implementation if the subcommand failed. Signed-off-by: Bernhard Kirchen --- cmd/sf.c | 7 ++- 1 file changed, 6 insert

[PATCH v1 6/7] fix sst26_process_bpr check

2021-01-28 Thread Bernhard Kirchen
relevant bits are set. Signed-off-by: Bernhard Kirchen --- drivers/mtd/spi/spi-nor-core.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c index b3873aaf6e..0b48e068be 100644 --- a/drivers/mtd/spi/spi

[PATCH v1 7/7] provide "sf protect check" command

2021-01-28 Thread Bernhard Kirchen
works for Micron (and compatible) SPI NOR flash chips as well as the SST26* series of SPI NOR flash chips. the changes were tested on proprietary boards using a M25P16 and a SST26VF016B. Signed-off-by: Bernhard Kirchen --- cmd/sf.c | 23 +++-- drivers/mtd/spi

[PATCH v1 6/7] fix sst26_process_bpr check

2021-01-28 Thread Bernhard Kirchen
relevant bits are set. Signed-off-by: Bernhard Kirchen --- drivers/mtd/spi/spi-nor-core.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c index b3873aaf6e..0b48e068be 100644 --- a/drivers/mtd/spi/spi

[PATCH v1 7/7] provide "sf protect check" command

2021-01-28 Thread Bernhard Kirchen
works for Micron (and compatible) SPI NOR flash chips as well as the SST26* series of SPI NOR flash chips. the changes were tested on proprietary boards using a M25P16 and a SST26VF016B. Signed-off-by: Bernhard Kirchen --- cmd/sf.c | 23 +++-- drivers/mtd/spi

[PATCH v1 1/7] command sf: help text format

2021-01-28 Thread Bernhard Kirchen
properly indent the help text and use single quotes consistently to mark variable parameters. Signed-off-by: Bernhard Kirchen --- cmd/sf.c | 48 ++-- 1 file changed, 22 insertions(+), 26 deletions(-) diff --git a/cmd/sf.c b/cmd/sf.c index c0d6a8f8a0

[PATCH v1 3/7] SST26* locking: need to enable write

2021-01-28 Thread Bernhard Kirchen
prior to using the WBPR (write block protection register) command to write new block protection register values, the WREN command must be sent. otherwise the new values are not applied. Signed-off-by: Bernhard Kirchen --- drivers/mtd/spi/spi-nor-core.c | 8 1 file changed, 8

[PATCH v1 4/7] write WPEN bit for SST26* devices when locking

2021-01-28 Thread Bernhard Kirchen
ng the IOC bit in SST26* devices' config register if any block is protected by "sf protect lock" command, thus enabling hardware write protection. this behavior is similar to the "sf protect lock" implementation for Micron (and compatible) chips. Signed-off-by: Bernhard Kir

[PATCH v1 5/7] sf protect (un)lock for SST26*: test BPR values

2021-01-28 Thread Bernhard Kirchen
ed, as the respective registers are write-protected in that case. Signed-off-by: Bernhard Kirchen --- drivers/mtd/spi/spi-nor-core.c | 55 +- 1 file changed, 48 insertions(+), 7 deletions(-) diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-co

[PATCH v1] fix patman --limit-cc option

2021-01-29 Thread Bernhard Kirchen
patman's --limit-cc option parses its argument to an integer and uses that to trim the list of CC recipients to a particular maximum. but that only works if the cc variable is a list, which it is not. Signed-off-by: Bernhard Kirchen --- tools/patman/series.py | 2 +- 1 file chang