]> git.dujemihanovic.xyz Git - u-boot.git/commit
board: cssi: Refactor EEPROM read
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Wed, 5 Apr 2023 14:05:36 +0000 (16:05 +0200)
committerChristophe Leroy <christophe.leroy@csgroup.eu>
Fri, 28 Apr 2023 15:52:23 +0000 (17:52 +0200)
commit4b6a5388da774e68e0f6381faefc7a3b402c468a
treec1e8b26034284369918412287391fd66914c7aaf
parent3155b0af4eab045b145681a53ebec04bd836b17c
board: cssi: Refactor EEPROM read

On cmpc885 board, the ethernet addresses are stored in an
EEPROM that is accessed through SPI.

A 3 bytes command is sent to the chip then the content
gets read. At the time being a single block access is
performed, ignoring the first 3 bytes read.

Reword the SPI transfer to first send 3 bytes then
receive the content of the EEPROM so that there don't be
3 dummy bytes at the beginning of the buffer.

And move the function into common.c so that it can be
reused by the board that will be added in a future patch.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
board/cssi/cmpc885/cmpc885.c
board/cssi/common/common.c
board/cssi/common/common.h