Commit 425423cd authored by Ille, Ondrej, Ing.'s avatar Ille, Ondrej, Ing.

driver: Split STATUS and COMMAND.

parent 33a8fb2b
......@@ -211,29 +211,29 @@ void ctu_can_fd_set_mode_reg(struct ctucanfd_priv *priv,
void ctu_can_fd_rel_rx_buf(struct ctucanfd_priv *priv)
{
union ctu_can_fd_status_command reg;
union ctu_can_fd_command reg;
reg.u32 = 0;
reg.s.rrb = 1;
priv->write_reg(priv, CTU_CAN_FD_STATUS, reg.u32);
priv->write_reg(priv, CTU_CAN_FD_COMMAND, reg.u32);
}
void ctu_can_fd_clr_overrun_flag(struct ctucanfd_priv *priv)
{
union ctu_can_fd_status_command reg;
union ctu_can_fd_command reg;
reg.u32 = 0;
reg.s.cdo = 1;
priv->write_reg(priv, CTU_CAN_FD_STATUS, reg.u32);
priv->write_reg(priv, CTU_CAN_FD_COMMAND, reg.u32);
}
void ctu_can_fd_abort_tx(struct ctucanfd_priv *priv)
{
union ctu_can_fd_status_command reg;
union ctu_can_fd_command reg;
reg.u32 = 0;
reg.s.abt = 1;
priv->write_reg(priv, CTU_CAN_FD_STATUS, reg.u32);
priv->write_reg(priv, CTU_CAN_FD_COMMAND, reg.u32);
}
// TODO: rather than set(value, mask) interface, provide
......
......@@ -291,11 +291,11 @@ void ctu_can_fd_abort_tx(struct ctucanfd_priv *priv);
* Returns:
* Mode/status structure with multiple mode flags.
*/
static inline union ctu_can_fd_status_command
static inline union ctu_can_fd_status
ctu_can_get_status(struct ctucanfd_priv *priv)
{
/* MODE and STATUS are within the same word */
union ctu_can_fd_status_command res;
union ctu_can_fd_status res;
res.u32 = priv->read_reg(priv, CTU_CAN_FD_STATUS);
return res;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment