You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openwrt/target/linux/layerscape/patches-5.4/701-net-0166-staging-fsl-dp...

181 lines
5.3 KiB
Diff

From 642686661c3324b4ae6c14f1cdbd2ea613525f09 Mon Sep 17 00:00:00 2001
From: Razvan Stefanescu <razvan.stefanescu@nxp.com>
Date: Fri, 13 Apr 2018 09:57:12 +0300
Subject: [PATCH] staging: fsl-dpaa2/mac: make compatible with upstream MC bus
Update the mc.h include path.
Rename struct mc_command to struct fsl_mc_command.
Signed-off-by: Razvan Stefanescu <razvan.stefanescu@nxp.com>
---
drivers/staging/fsl-dpaa2/mac/dpmac.c | 34 +++++++++++++++++-----------------
drivers/staging/fsl-dpaa2/mac/mac.c | 2 +-
2 files changed, 18 insertions(+), 18 deletions(-)
--- a/drivers/staging/fsl-dpaa2/mac/dpmac.c
+++ b/drivers/staging/fsl-dpaa2/mac/dpmac.c
@@ -29,7 +29,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include "../../fsl-mc/include/mc.h"
+#include <linux/fsl/mc.h>
#include "dpmac.h"
#include "dpmac-cmd.h"
@@ -56,7 +56,7 @@ int dpmac_open(struct fsl_mc_io *mc_io,
u16 *token)
{
struct dpmac_cmd_open *cmd_params;
- struct mc_command cmd = { 0 };
+ struct fsl_mc_command cmd = { 0 };
int err;
/* prepare command */
@@ -92,7 +92,7 @@ int dpmac_close(struct fsl_mc_io *mc_io,
u32 cmd_flags,
u16 token)
{
- struct mc_command cmd = { 0 };
+ struct fsl_mc_command cmd = { 0 };
/* prepare command */
cmd.header = mc_encode_cmd_header(DPMAC_CMDID_CLOSE, cmd_flags,
@@ -128,7 +128,7 @@ int dpmac_create(struct fsl_mc_io *mc_io
u32 *obj_id)
{
struct dpmac_cmd_create *cmd_params;
- struct mc_command cmd = { 0 };
+ struct fsl_mc_command cmd = { 0 };
int err;
/* prepare command */
@@ -170,7 +170,7 @@ int dpmac_destroy(struct fsl_mc_io *mc_i
u32 object_id)
{
struct dpmac_cmd_destroy *cmd_params;
- struct mc_command cmd = { 0 };
+ struct fsl_mc_command cmd = { 0 };
/* prepare command */
cmd.header = mc_encode_cmd_header(DPMAC_CMDID_DESTROY,
@@ -205,7 +205,7 @@ int dpmac_set_irq_enable(struct fsl_mc_i
u8 en)
{
struct dpmac_cmd_set_irq_enable *cmd_params;
- struct mc_command cmd = { 0 };
+ struct fsl_mc_command cmd = { 0 };
/* prepare command */
cmd.header = mc_encode_cmd_header(DPMAC_CMDID_SET_IRQ_ENABLE,
@@ -237,7 +237,7 @@ int dpmac_get_irq_enable(struct fsl_mc_i
{
struct dpmac_cmd_get_irq_enable *cmd_params;
struct dpmac_rsp_get_irq_enable *rsp_params;
- struct mc_command cmd = { 0 };
+ struct fsl_mc_command cmd = { 0 };
int err;
/* prepare command */
@@ -282,7 +282,7 @@ int dpmac_set_irq_mask(struct fsl_mc_io
u32 mask)
{
struct dpmac_cmd_set_irq_mask *cmd_params;
- struct mc_command cmd = { 0 };
+ struct fsl_mc_command cmd = { 0 };
/* prepare command */
cmd.header = mc_encode_cmd_header(DPMAC_CMDID_SET_IRQ_MASK,
@@ -317,7 +317,7 @@ int dpmac_get_irq_mask(struct fsl_mc_io
{
struct dpmac_cmd_get_irq_mask *cmd_params;
struct dpmac_rsp_get_irq_mask *rsp_params;
- struct mc_command cmd = { 0 };
+ struct fsl_mc_command cmd = { 0 };
int err;
/* prepare command */
@@ -360,7 +360,7 @@ int dpmac_get_irq_status(struct fsl_mc_i
{
struct dpmac_cmd_get_irq_status *cmd_params;
struct dpmac_rsp_get_irq_status *rsp_params;
- struct mc_command cmd = { 0 };
+ struct fsl_mc_command cmd = { 0 };
int err;
/* prepare command */
@@ -403,7 +403,7 @@ int dpmac_clear_irq_status(struct fsl_mc
u32 status)
{
struct dpmac_cmd_clear_irq_status *cmd_params;
- struct mc_command cmd = { 0 };
+ struct fsl_mc_command cmd = { 0 };
/* prepare command */
cmd.header = mc_encode_cmd_header(DPMAC_CMDID_CLEAR_IRQ_STATUS,
@@ -433,7 +433,7 @@ int dpmac_get_attributes(struct fsl_mc_i
struct dpmac_attr *attr)
{
struct dpmac_rsp_get_attributes *rsp_params;
- struct mc_command cmd = { 0 };
+ struct fsl_mc_command cmd = { 0 };
int err;
/* prepare command */
@@ -471,7 +471,7 @@ int dpmac_get_link_cfg(struct fsl_mc_io
struct dpmac_link_cfg *cfg)
{
struct dpmac_rsp_get_link_cfg *rsp_params;
- struct mc_command cmd = { 0 };
+ struct fsl_mc_command cmd = { 0 };
int err = 0;
/* prepare command */
@@ -506,7 +506,7 @@ int dpmac_set_link_state(struct fsl_mc_i
struct dpmac_link_state *link_state)
{
struct dpmac_cmd_set_link_state *cmd_params;
- struct mc_command cmd = { 0 };
+ struct fsl_mc_command cmd = { 0 };
/* prepare command */
cmd.header = mc_encode_cmd_header(DPMAC_CMDID_SET_LINK_STATE,
@@ -539,7 +539,7 @@ int dpmac_get_counter(struct fsl_mc_io *
{
struct dpmac_cmd_get_counter *dpmac_cmd;
struct dpmac_rsp_get_counter *dpmac_rsp;
- struct mc_command cmd = { 0 };
+ struct fsl_mc_command cmd = { 0 };
int err = 0;
/* prepare command */
@@ -567,7 +567,7 @@ int dpmac_set_port_mac_addr(struct fsl_m
const u8 addr[6])
{
struct dpmac_cmd_set_port_mac_addr *dpmac_cmd;
- struct mc_command cmd = { 0 };
+ struct fsl_mc_command cmd = { 0 };
/* prepare command */
cmd.header = mc_encode_cmd_header(DPMAC_CMDID_SET_PORT_MAC_ADDR,
@@ -600,7 +600,7 @@ int dpmac_get_api_version(struct fsl_mc_
u16 *minor_ver)
{
struct dpmac_rsp_get_api_version *rsp_params;
- struct mc_command cmd = { 0 };
+ struct fsl_mc_command cmd = { 0 };
int err;
cmd.header = mc_encode_cmd_header(DPMAC_CMDID_GET_API_VERSION,
--- a/drivers/staging/fsl-dpaa2/mac/mac.c
+++ b/drivers/staging/fsl-dpaa2/mac/mac.c
@@ -46,7 +46,7 @@
#include <linux/phy.h>
#include <linux/phy_fixed.h>
-#include "../../fsl-mc/include/mc.h"
+#include <linux/fsl/mc.h>
#include "dpmac.h"
#include "dpmac-cmd.h"