fsi: aspeed: Enable 23-bit addressing
Subsystems (2)
Eddie James
maintainerPATCH 1/1 fsi: aspeed: Enable 23-bit addressing
In order to access more than the second hub link, 23-bit addressing is required. The core provides the highest two bits of address as the slave ID to the master.
OpenBMC-Staging-Count: 1
Signed-off-by Eddie James <[email protected]>
Acked-by Jeremy Kerr <[email protected]>
Signed-off-by Joel Stanley <[email protected]>
--- drivers/fsi/fsi-master-aspeed.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/fsi/fsi-master-aspeed.c +4 -2
@@ -241,9 +241,10 @@ static int aspeed_master_read(struct fsi_master *master, int link,struct fsi_master_aspeed *aspeed =to_fsi_master_aspeed (master);int ret; -if (id !=0 ) +if (id >0x3 )return -EINVAL ; + addr |= id <<21 ; addr += link *FSI_HUB_LINK_SIZE ;switch (size) {
@@ -273,9 +274,10 @@ static int aspeed_master_write(struct fsi_master *master, int link,struct fsi_master_aspeed *aspeed =to_fsi_master_aspeed (master);int ret; -if (id !=0 ) +if (id >0x3 )return -EINVAL ; + addr |= id <<21 ; addr += link *FSI_HUB_LINK_SIZE ;switch (size) {
Signature · 1 line
2.24.0