Source
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* sh_eth.h - Driver for Renesas SuperH ethernet controller.
*
* Copyright (C) 2008 - 2012 Renesas Solutions Corp.
* Copyright (c) 2008 - 2012 Nobuhiro Iwamatsu
* Copyright (c) 2007 Carlos Munoz <carlos@kenati.com>
*/
/* Malloc returns addresses in the P1 area (cacheable). However we need to
use area P2 (non-cacheable) */
/* The ethernet controller needs to use physical addresses */
/* defined(CONFIG_SH) */
/* base padding size is 16 */
/* Number of supported ports */
/* Buffers must be big enough to hold the largest ethernet frame. Also, rx
buffers must be a multiple of 32 bytes */
/* The number of tx descriptors must be large enough to point to 5 or more
frames. If each frame uses 2 descriptors, at least 10 descriptors are needed.
We use one descriptor per frame */
/* The size of the tx descriptor is determined by how much padding is used.
4, 20, or 52 bytes of padding can be used */
/* Tx descriptor. We always use 3 bytes of padding */
struct tx_desc_s {
volatile u32 td0;
u32 td1;
u32 td2; /* Buffer start */
u8 padding[TX_DESC_PADDING]; /* aligned cache line size */
};