diff options
author | Tom Rini <trini@konsulko.com> | 2023-06-15 11:02:22 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-06-15 11:02:22 -0400 |
commit | 5ac10c00ed727842c00d8659611151334f84c0ea (patch) | |
tree | bd6c31a0a00be76a17a120f7a2ec72bec76daa00 /drivers/net/fsl-mc/mc_sys.c | |
parent | cb4fe56eca1109780e97c68329e6b71ef33bf0e6 (diff) | |
parent | b824212dc29b5b0354e84c7dadec21d75bacb349 (diff) |
Merge tag 'fsl-qoriq-2023-6-15' of https://source.denx.de/u-boot/custodians/u-boot-fsl-qoriq into next
DM_MDIO/CMD for ls1046afrwy
sync APIs for fsl-mc
ldpaa_eth update
lx2160ardb recv support.
net: dsa fix of fallback lookup
Diffstat (limited to 'drivers/net/fsl-mc/mc_sys.c')
-rw-r--r-- | drivers/net/fsl-mc/mc_sys.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/net/fsl-mc/mc_sys.c b/drivers/net/fsl-mc/mc_sys.c index b5ae2ea3eb..4d32516b00 100644 --- a/drivers/net/fsl-mc/mc_sys.c +++ b/drivers/net/fsl-mc/mc_sys.c @@ -13,8 +13,13 @@ #include <asm/io.h> #include <linux/delay.h> -#define MC_CMD_HDR_READ_CMDID(_hdr) \ - ((uint16_t)mc_dec((_hdr), MC_CMD_HDR_CMDID_O, MC_CMD_HDR_CMDID_S)) +static u16 mc_cmd_hdr_read_cmdid(struct mc_command *cmd) +{ + struct mc_cmd_header *hdr = (struct mc_cmd_header *)&cmd->header; + u16 cmd_id = le16_to_cpu(hdr->cmd_id); + + return cmd_id; +} /** * mc_send_command - Send MC command and wait for response @@ -52,8 +57,8 @@ int mc_send_command(struct fsl_mc_io *mc_io, if (status != MC_CMD_STATUS_OK) { printf("Error: MC command failed (portal: %p, obj handle: %#x, command: %#x, status: %#x)\n", mc_io->mmio_regs, - (unsigned int)MC_CMD_HDR_READ_TOKEN(cmd->header), - (unsigned int)MC_CMD_HDR_READ_CMDID(cmd->header), + (unsigned int)mc_cmd_hdr_read_token(cmd), + (unsigned int)mc_cmd_hdr_read_cmdid(cmd), (unsigned int)status); return -EIO; |