Changeset e3dc39e in rtems-libbsd


Ignore:
Timestamp:
Jun 27, 2017, 10:51:07 AM (2 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
eeb3fd5d9b07ac9a2e280cff60a1b762bd273a8d, 1e989998de954bef51e6c19cc3d64d39f32100aa
Children:
ef1655c
Parents:
9789434
git-author:
Sebastian Huber <sebastian.huber@…> (06/27/17 10:51:07)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/23/17 07:24:07)
Message:

dpaa: Add <soc/fsl/dpaa.h>

Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • linux/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c

    r9789434 re3dc39e  
    5757#include <linux/dma-mapping.h>
    5858#include <linux/sort.h>
     59#else /* __rtems__ */
     60#include <soc/fsl/dpaa.h>
    5961#endif /* __rtems__ */
    6062#include <soc/fsl/bman.h>
     
    16071609        return 0;
    16081610}
     1611#ifdef __rtems__
     1612void
     1613dpaa_recycle_mcluster(struct dpaa_priv *dpaa_priv,
     1614    dpaa_buffer_recycle_context *rc, struct mbuf *m)
     1615{
     1616        size_t i;
     1617        dma_addr_t addr;
     1618
     1619        i = rc->count;
     1620        m->m_data = m->m_ext.ext_buf;
     1621        *(struct mbuf **)(mtod(m, char *) + DPAA_MBUF_POINTER_OFFSET) = m;
     1622        addr = mtod(m, dma_addr_t);
     1623        rc->bmb[i].data = 0;
     1624        bm_buffer_set64(&rc->bmb[i], addr);
     1625
     1626        if (i < ARRAY_SIZE(rc->bmb) - 1) {
     1627                rc->count = i + 1;
     1628        } else {
     1629                struct dpaa_bp *dpaa_bp;
     1630                int *countptr;
     1631
     1632                rc->count = 0;
     1633                dpaa_bp = dpaa_priv->dpaa_bps[0];
     1634                countptr = this_cpu_ptr(dpaa_bp->percpu_count);
     1635                *countptr += dpaa_bman_release(dpaa_bp, rc->bmb,
     1636                    ARRAY_SIZE(rc->bmb));
     1637        }
     1638}
     1639#endif /* __rtems__ */
    16091640
    16101641static int dpaa_bp_seed(struct dpaa_bp *dpaa_bp)
  • rtemsbsd/sys/powerpc/drivers/net/ethernet/freescale/dpaa/if_fmanmac.c

    r9789434 re3dc39e  
    4545#include <linux/phy.h>
    4646
     47#include <soc/fsl/dpaa.h>
     48
    4749#include "../../../../../../../../linux/drivers/net/ethernet/freescale/dpaa/dpaa_eth.h"
    4850
     
    580582        uma_zfree(sc->sgt_zone, sgt);
    581583}
     584
     585struct dpaa_priv *
     586dpaa_get_priv_of_ifp(struct ifnet *ifp)
     587{
     588        struct fman_mac_softc *sc;
     589
     590        sc = ifp->if_softc;
     591        return (netdev_priv(&sc->mac_dev.net_dev));
     592}
Note: See TracChangeset for help on using the changeset viewer.