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.
--- 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
1.8.3.1
Hi Eddie,
Quoted 3 lines
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.
Looks good, this is just the reverse of the encoding we set up in fsi_slave_calc_addr().
[I assume that the opb area is large enough for the 23-bit addressing...]
Cheers,
Jeremy
Joel Stanley
maintainerQuoted 11 lines · Jeremy Kerr
Hi Eddie,
Quoted 3 lines
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.
Looks good, this is just the reverse of the encoding we set up in
fsi_slave_calc_addr().Acked-by Jeremy Kerr <[email protected]>
Thanks Jeremy.
Quoted 2 lines
[I assume that the opb area is large enough for the 23-bit addressing...]
On the AST2600 the AHB to OPB bridge sets the OBP base address to 0xa0000000, so we have plenty of address space to use. Is that what you're referring to, or have I misunderstood?
Cheers,
Joel