日期:2014-05-16  浏览次数:21648 次

DM9000 LINUX标准驱动S3C2440平台



/*
 *   dm9000.c: Version 1.2 03/18/2003   QQ:1215483516   TEL:18589097498
 *
 *         A Davicom DM9000 ISA NIC fast Ethernet driver for Linux.
 * Copyright (C) 1997 Fly-core   Frank  dai
 *
 * 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.
 *
 *   (C)Copyright 1997-1998 DAVICOM Semiconductor,Inc. All Rights Reserved.
 *
 * V0.11 06/20/2001REG_0A bit3=1, default enable BP with DA match
 * 06/22/2001 Support DM9801 progrmming
 * E3: R25 = ((R24 + NF) & 0x00ff) | 0xf000
 * E4: R25 = ((R24 + NF) & 0x00ff) | 0xc200
 *     R17 = (R17 & 0xfff0) | NF + 3
 * E5: R25 = ((R24 + NF - 3) & 0x00ff) | 0xc200
 *     R17 = (R17 & 0xfff0) | NF
 *
 * v1.00               modify by simon 2001.9.5
 *                         change for kernel 2.4.x
 *
 * v1.1   11/09/2001       fix force mode bug
 *
 * v1.2   03/18/2003       Weilun Huang <weilun_huang@davicom.com.tw>:
 * Fixed phy reset.
 * Added tx/rx 32 bit mode.
 * Cleaned up for kernel merge.
 *
 *        03/03/2004    Sascha Hauer <saschahauer@web.de>
 *                      Port to 2.6 kernel
 *
 *  24-Sep-2004   Ben Dooks <ben@simtec.co.uk>
 * Cleanup of code to remove ifdefs
 * Allowed platform device data to influence access width
 * Reformatting areas of code


 */


#if defined(MODVERSIONS)
#include <linux/modversions.h>
#endif


#include <linux/module.h>
#include <linux/ioport.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/init.h>