/*
* Micrel KS8695 (Centaur) Ethernet.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* Copyright 2008 Simtec Electronics
* Daniel Silverstone <dsilvers@simtec.co.uk>
* Vincent Sanders <vince@simtec.co.uk>
*/
#include <linux/module.h>
#include <linux/ioport.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/init.h>
#include <linux/skbuff.h>
#include <linux/spinlock.h>
#include <linux/crc32.h>
#include <linux/mii.h>
#include <linux/ethtool.h>
#include <linux/delay.h>
#include <linux/platform_device.h>
#include <linux/irq.h>
#include <linux/io.h>
#include <asm/irq.h>
#include <mach/regs-switch.h>
#include <mach/regs-misc.h>
#include "ks8695net.h"
#define MODULENAME "ks8695_ether"
#define MODULEVERSION "1.01"
/*
* Transmit and device reset timeout, default 5 seconds.
*/
static int watchdog = 5000;
/* Hardware structures */
/**
* struct rx_ring_desc - Receive descriptor ring element
* @status: The status of the descriptor element (E.g. who owns it)
* @length: The number of bytes in the block pointed to by data_ptr
* @data_ptr: The physical address of the data block to receive into
* @next_desc: The physical address of the next descriptor element.
*/
struct rx_ring_desc {
__le32 status;
__le32 length;
__le32 data_ptr;
__le32 next_desc;
};
/**
* struct tx_ring_desc - Transmit descriptor ring element
* @owner: Who owns the descriptor
* @status: The number of bytes in the block pointed to by data_ptr
* @data_ptr: The physical address o