33 Commits

Author SHA1 Message Date
Sebastian Huber
c6261f9787 Update due to API changes 2019-04-11 09:38:18 +02:00
Sebastian Huber
bcdce02d9b Update to FreeBSD head 2018-06-01
Git mirror commit fb63610a69b0eb7f69a201ba05c4c1a7a2739cf9.

Update #3472.
2018-09-21 10:29:41 +02:00
Sebastian Huber
327f4e1029 sdk_dpaa: What to do with tail queue drop?
The issue is this:

static int dpaa_eth_macless_probe(struct platform_device *_of_dev)
{
[...]
    INIT_LIST_HEAD(&priv->dpa_fq_list);

    err = dpa_fq_probe_macless(dev, &priv->dpa_fq_list, RX);
    if (!err)
        err = dpa_fq_probe_macless(dev, &priv->dpa_fq_list,
                       TX);
    if (err < 0)
        goto fq_probe_failed;
[...]
    /* Add the FQs to the interface, and make them active */
    /* For MAC-less devices we only get here for RX frame queues
     * initialization, which are the TX queues of the other
     * partition.
     * It is safe to rely on one partition to set the FQ taildrop
     * threshold for the TX queues of the other partition
     * because the ERN notifications will be received by the
     * partition doing qman_enqueue.
     */
    err = dpa_fqs_init(dev,  &priv->dpa_fq_list, true);
    if (err < 0)
        goto fq_alloc_failed;
[...]

The priv->dpa_fq_list contains a list of FQ_TYPE_RX_PCD  and FQ_TYPE_TX
items.  I don't understand what the "For MAC-less devices we only get
here for RX frame queues initialization" means in this context.  The
td_enable == true in dpa_fqs_init().  So, we have:

int dpa_fq_init(struct dpa_fq *dpa_fq, bool td_enable)
{
[...]
        if (dpa_fq->fq_type == FQ_TYPE_TX ||
                dpa_fq->fq_type == FQ_TYPE_TX_CONFIRM ||
                dpa_fq->fq_type == FQ_TYPE_TX_CONF_MQ) {
[...]
            initfq.we_mask |= QM_INITFQ_WE_OAC;
[...]
        }

        if (td_enable) {
            initfq.we_mask |= QM_INITFQ_WE_TDTHRESH;
            qm_fqd_taildrop_set(&initfq.fqd.td,
                    DPA_FQ_TD, 1);
            initfq.fqd.fq_ctrl = QM_FQCTRL_TDE;
        }

The td_enable == true && dpa_fq->fq_type == FQ_TYPE_TX causes later:

int qman_init_fq(struct qman_fq *fq, u32 flags, struct qm_mcc_initfq *opts)
{
[...]
    if (opts && (opts->we_mask & QM_INITFQ_WE_OAC)) {
        /* And can't be set at the same time as TDTHRESH */
        if (opts->we_mask & QM_INITFQ_WE_TDTHRESH)
            return -EINVAL;
    }

This aborts the  initialization of the MAC-less driver.  I don't
understand why this path doesn't happen on the SDK Linux system.

Update #3277.
2018-01-23 14:55:35 +01:00
Sebastian Huber
d62a3df1c7 sdk_dpaa: Port to RTEMS
Update #3277.
2018-01-23 14:55:31 +01:00
Sebastian Huber
f5ed3aa620 sdk_dpaa: Import from QorIQ SDK Linux
http://git.freescale.com/git/cgit.cgi/ppc/sdk/linux.git

Commit 1ae843c08261402b2c35d83422e4fa1e313611f4 (fsl-sdk-v2.0-1703).

Update #3277.
2018-01-23 14:55:27 +01:00
Sebastian Huber
0f6ff4a923 dpaa: QMan portal only initialization
Update #3277.
2018-01-23 14:55:24 +01:00
Sebastian Huber
a7d252c645 dpaa: Add and use bman_new_pool_for_bpid()
Update #3277.
2018-01-23 14:55:21 +01:00
Sebastian Huber
95fe5b1f46 dpaa: Use device tree throughout in BMan init
Update #3277.
2018-01-23 14:55:18 +01:00
Sebastian Huber
1342fad09c dpaa: Add and use SDK_DPAA_COMPAT_STATIC
Update #3277.
2018-01-23 14:55:15 +01:00
Sebastian Huber
34b7ccccde dpaa: Support FQ_TYPE_RX_PCD
Update #3277.
2018-01-23 14:55:12 +01:00
Sebastian Huber
bdf9931603 dpaa: Disable unused bman_pool members
Update #3277.
2018-01-23 14:55:09 +01:00
Sebastian Huber
e4923c85c9 linux/of_address.h: of_address_to_resource()
Translate address in of_address_to_resource().

Update #3277.
2018-01-23 14:54:59 +01:00
Sebastian Huber
45149ec24e Fix general PowerPC build 2017-10-26 15:02:24 +02:00
Sebastian Huber
b1fd51c25e dpaa: Reduce receive buffer seed
Seed the receive buffers of each affine software portal only with 8
mclusters (16KiB) and not 128 (256KiB).  We have processor count affine
software portals, see dpaa_bp_seed().
2017-10-23 09:24:08 +02:00
Sebastian Huber
33356a839f dpaa: Improve QMan portal initialization
Be less dependent on the device tree content.
2017-10-23 09:24:08 +02:00
Sebastian Huber
24866e6f23 dpaa: Reduce PFDR space from 32MiB to 16MiB 2017-10-23 09:24:07 +02:00
Sebastian Huber
de5791b345 dpaa: Add "libbsd,dedicated-portal" to QMan portals
By default, the network interfaces use a pool channel, see
dpaa_get_channel() in dpaa_eth_priv_probe().  To enable a dedicated QMan
software portal, use libbsd,dedicated-portal = "enabled";.  This option
is useful for special purpose 10Gbit/s Ethernet processing.

/ {
        soc: soc@ffe000000 {
                fman0: fman@400000 {
                        enet7: ethernet@f2000 {
                                libbsd,dedicated-portal = "enabled";
                        };
                };
        };
};
2017-10-23 09:24:07 +02:00
Sebastian Huber
e818128789 dpaa: Add "libbsd,dequeue" to QMan portals
The dequeue support for processor affine QMan portals may be explicitly
disabled. The dequeue support is responsible for receiving frames and
completion of frame transmission, e.g. buffer recycling. Without at
least one enabled dequeue support, there will be no networking.

/ {
        qman-portals@ff6000000 {
                qman-portal@0 {
                        libbsd,dequeue = "disabled";
                };
        };
};
2017-10-23 09:24:07 +02:00
Sebastian Huber
3cfc31cb0c dpaa: Set portal interrupt affinity 2017-10-23 09:24:07 +02:00
Sebastian Huber
ef1655c144 Update to Linux 4.12
Linux baseline 6f7da290413ba713f0cdd9ff1a2a9bb129ef4f6c (v4.12).
2017-10-23 09:24:07 +02:00
Sebastian Huber
e3dc39ee0c dpaa: Add <soc/fsl/dpaa.h> 2017-10-23 09:24:07 +02:00
Sebastian Huber
66e83e0e64 soc/qbman: Simplify bman_release()
Get the affine portal only once for the complete transaction.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2017-10-23 09:24:06 +02:00
Sebastian Huber
1908686c31 soc/qman: Do not enable stashing without PAMU
Do not enable stashing in the QMan software portal configuration
(QCSPi_CFG[RE, SE]) in case the PAMU support is not configured.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2017-10-23 09:24:06 +02:00
Sebastian Huber
7f1f4282dc qman_api.c: Prevent false clearing of IRQ status
Adding (p->irq_sources & ~QM_PIRQ_CSCI) to the clear mask means for
example we clear the QM_PIRQ_EQCI unconditionally.  This is a problem in
case this interrupt happens after the read of the interrupt status and
before the interrupt status clear.
2017-10-23 09:24:06 +02:00
Sebastian Huber
69a5677c0f dpaa: Disable QMAN_VOLATILE_FLAG_WAIT_INT 2017-10-23 09:24:06 +02:00
Sebastian Huber
96da40c0c4 dpaa: Avoid QMan work queue 2017-10-23 09:24:05 +02:00
Sebastian Huber
ed254d58e1 dpaa: Use receive checksum offload 2017-10-23 09:24:05 +02:00
Sebastian Huber
3471177263 dpaa: Enable preemption in qm_mr_process_task() 2017-10-23 09:24:05 +02:00
Sebastian Huber
b3a6ad0d6a dpaa: Disable unused CGR code 2017-10-23 09:24:05 +02:00
Sebastian Huber
cf40770bdc Linux update to 4.12-rc1+
Linux baseline b23afd384801711ab6dbccd259cc14cb09a1dcaf.
2017-10-23 09:24:05 +02:00
Sebastian Huber
721b1c1763 qbman: Fix platform_get_irq() error checks 2017-10-23 09:24:05 +02:00
Sebastian Huber
cd089b9e05 Linux update to 4.11-rc5
Linux baseline a71c9a1c779f2499fb2afc0553e543f18aff6edf (4.11-rc5).
2017-10-23 09:23:59 +02:00
Sebastian Huber
28ee86a9b0 Import DPAA driver snapshot
Imported from Freescale Linux repository

git://git.freescale.com/ppc/upstream/linux.git

commit 2774c204cd8bfc56a200ff4dcdfc9cdf5b6fc161.

Linux compatibility layer is partly from FreeBSD.
2017-10-23 08:46:43 +02:00