]> git.dujemihanovic.xyz Git - u-boot.git/commit
arm: mvebu: turris_omnia: Update MCU status and features reading
authorMarek Behún <kabel@kernel.org>
Thu, 4 Apr 2024 07:50:53 +0000 (09:50 +0200)
committerStefan Roese <sr@denx.de>
Thu, 4 Apr 2024 08:45:27 +0000 (10:45 +0200)
commited8d3bd11a97345a1045ec8c60ee2d1e12040795
tree5caf52640cd74b1145ab977c5f9a037c064090fd
parent8983f0a5165698db95a1561311d65daa8b972f96
arm: mvebu: turris_omnia: Update MCU status and features reading

Refactor MCU status word and MCU firmware features reading to make it
simpler to use.

Try reading 32 bits of features, if that fails, read 16 bits. Older MCU
firmware supports only 16-bit wide features, and if more bytes are read,
either 0xff is sent or I2C transaction fails. Handle both cases.

Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
board/CZ.NIC/turris_omnia/turris_omnia.c