X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=drivers%2Fnet%2Fldpaa_eth%2Fldpaa_eth.h;h=1e26630043a097e0c6ad4f2d0434dc3fb85aed67;hb=836e67ee66b938289feeb6ef774e245a56add21b;hp=3107ab6cff930ec0f667c5cd5b5d1e358b8c24be;hpb=08442ec7633c69c882a4a6bd70831226d7a81556;p=u-boot diff --git a/drivers/net/ldpaa_eth/ldpaa_eth.h b/drivers/net/ldpaa_eth/ldpaa_eth.h index 3107ab6cff..1e26630043 100644 --- a/drivers/net/ldpaa_eth/ldpaa_eth.h +++ b/drivers/net/ldpaa_eth/ldpaa_eth.h @@ -1,5 +1,6 @@ /* - * Copyright (C) 2014 Freescale Semiconductor + * Copyright (C) 2014-2016 Freescale Semiconductor + * Copyright 2017 NXP * * SPDX-License-Identifier: GPL-2.0+ */ @@ -24,14 +25,14 @@ 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 -/* Hardware requires alignment for ingress/egress buffer addresses - * and ingress buffer lengths. +/* Hardware requires alignment for buffer address and length: 256-byte + * for ingress, 64-byte for egress. Using 256 for both. */ -#define LDPAA_ETH_BUF_ALIGN 64 +#define LDPAA_ETH_BUF_ALIGN 256 /* So far we're only accomodating a skb backpointer in the frame's * software annotation, but the hardware options are either 0 or 64. @@ -117,27 +118,27 @@ struct ldpaa_fas { struct ldpaa_eth_priv { struct eth_device *net_dev; - int dpni_id; - uint16_t dpni_handle; - struct dpni_attr dpni_attrs; - /* Insofar as the MC is concerned, we're using one layout on all 3 types - * of buffers (Rx, Tx, Tx-Conf). - */ - struct dpni_buffer_layout buf_layout; + uint32_t dpmac_id; + uint16_t dpmac_handle; + uint16_t tx_data_offset; uint32_t rx_dflt_fqid; uint16_t tx_qdid; - uint32_t tx_conf_fqid; uint16_t tx_flow_id; enum ldpaa_eth_type type; /* 1G or 10G ethernet */ struct phy_device *phydev; }; +struct dprc_endpoint dpmac_endpoint; +struct dprc_endpoint dpni_endpoint; + extern struct fsl_mc_io *dflt_mc_io; extern struct fsl_dpbp_obj *dflt_dpbp; extern struct fsl_dpio_obj *dflt_dpio; +extern struct fsl_dpni_obj *dflt_dpni; +extern uint16_t dflt_dprc_handle; static void ldpaa_dpbp_drain_cnt(int count); static void ldpaa_dpbp_drain(void); @@ -146,4 +147,6 @@ static void ldpaa_dpbp_free(void); static int ldpaa_dpni_setup(struct ldpaa_eth_priv *priv); static int ldpaa_dpbp_setup(void); static int ldpaa_dpni_bind(struct ldpaa_eth_priv *priv); +static int ldpaa_dpmac_setup(struct ldpaa_eth_priv *priv); +static int ldpaa_dpmac_bind(struct ldpaa_eth_priv *priv); #endif /* __LDPAA_H */