// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (C) 2015 Mans Rullgard <mans@mansr.com>
*
* Mostly rewritten, based on driver from Sigma Designs. Original
* copyright notice below.
*
* Driver for tangox SMP864x/SMP865x/SMP867x/SMP868x builtin Ethernet Mac.
*
* Copyright (C) 2005 Maxime Bizon <mbizon@freebox.fr>
*/
#include <linux/module.h>
#include <linux/etherdevice.h>
#include <linux/delay.h>
#include <linux/ethtool.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/of_device.h>
#include <linux/of_mdio.h>
#include <linux/of_net.h>
#include <linux/dma-mapping.h>
#include <linux/phy.h>
#include <linux/cache.h>
#include <linux/jiffies.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <asm/barrier.h>
#include "nb8800.h"
static void nb8800_tx_done(struct net_device *dev);
static int nb8800_dma_stop(struct net_device *dev);
static inline