Skip to content

Commit

Permalink
fsi: aspeed: Enable 23-bit addressing
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Eddie James <[email protected]>
Acked-by: Jeremy Kerr <[email protected]>
Signed-off-by: Joel Stanley <[email protected]>
  • Loading branch information
Eddie James authored and shenki committed Sep 10, 2020
1 parent 8a19398 commit 6e0ef7d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/fsi/fsi-master-aspeed.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 6e0ef7d

Please sign in to comment.