Merge https://gitlab.denx.de/u-boot/custodians/u-boot-spi
[platform/kernel/u-boot.git] / drivers / net / ldpaa_eth / ldpaa_eth.h
index af41b27..e90513e 100644 (file)
@@ -1,7 +1,7 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
 /*
- * Copyright (C) 2014 Freescale Semiconductor
- *
- * SPDX-License-Identifier:    GPL-2.0+
+ * Copyright 2014-2016 Freescale Semiconductor, Inc.
+ * Copyright 2017 NXP
  */
 
 #ifndef __LDPAA_ETH_H
@@ -24,7 +24,7 @@ enum ldpaa_eth_type {
 };
 
 /* Arbitrary values for now, but we'll need to tune */
-#define LDPAA_ETH_NUM_BUFS             (2 * 7)
+#define LDPAA_ETH_NUM_BUFS             (7 * 7)
 #define LDPAA_ETH_REFILL_THRESH                (LDPAA_ETH_NUM_BUFS/2)
 #define LDPAA_ETH_RX_BUFFER_SIZE       2048
 
@@ -116,8 +116,14 @@ struct ldpaa_fas {
                                         LDPAA_ETH_FAS_TIDE)
 
 struct ldpaa_eth_priv {
+#ifdef CONFIG_DM_ETH
+       struct phy_device *phy;
+       int phy_mode;
+       bool started;
+#else
        struct eth_device *net_dev;
-       int dpmac_id;
+#endif
+       uint32_t dpmac_id;
        uint16_t dpmac_handle;
 
        uint16_t tx_data_offset;
@@ -127,7 +133,6 @@ struct ldpaa_eth_priv {
        uint16_t tx_flow_id;
 
        enum ldpaa_eth_type type;       /* 1G or 10G ethernet */
-       struct phy_device *phydev;
 };
 
 struct dprc_endpoint dpmac_endpoint;