]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - drivers/net/fsl-mc/dpbp.c
net: phy: Add SGMII support for TI phy
[karo-tx-uboot.git] / drivers / net / fsl-mc / dpbp.c
index 1517a70083811d689bcdffc35a8880f496974150..ba9536d405087014ca21eab03e806e4e1622e98f 100644 (file)
@@ -49,6 +49,47 @@ int dpbp_close(struct fsl_mc_io *mc_io,
        return mc_send_command(mc_io, &cmd);
 }
 
+int dpbp_create(struct fsl_mc_io *mc_io,
+               uint32_t cmd_flags,
+               const struct dpbp_cfg *cfg,
+               uint16_t *token)
+{
+       struct mc_command cmd = { 0 };
+       int err;
+
+       (void)(cfg); /* unused */
+
+       /* prepare command */
+       cmd.header = mc_encode_cmd_header(DPBP_CMDID_CREATE,
+                                         cmd_flags,
+                                         0);
+
+       /* send command to mc*/
+       err = mc_send_command(mc_io, &cmd);
+       if (err)
+               return err;
+
+       /* retrieve response parameters */
+       *token = MC_CMD_HDR_READ_TOKEN(cmd.header);
+
+       return 0;
+}
+
+int dpbp_destroy(struct fsl_mc_io *mc_io,
+                uint32_t cmd_flags,
+                uint16_t token)
+{
+       struct mc_command cmd = { 0 };
+
+       /* prepare command */
+       cmd.header = mc_encode_cmd_header(DPBP_CMDID_DESTROY,
+                                         cmd_flags,
+                                         token);
+
+       /* send command to mc*/
+       return mc_send_command(mc_io, &cmd);
+}
+
 int dpbp_enable(struct fsl_mc_io *mc_io,
                uint32_t cmd_flags,
                uint16_t token)