📄 dm9000.c
字号:
/* * DM9000 Ethernet * writen by chete cheng, mail:nandcon@hotmail.com * * This program is loaded into SRAM in bootstrap mode, where it waits * for commands on UART1 to read and write memory, jump to code etc. * A design goal for this program is to be entirely independent of the * target board. Anything with a CL-PS7111 or EP7211 should be able to run * this code in bootstrap mode. All the board specifics can be handled on * the host. * * 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. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */#include <common.h>#include <command.h>#include <net.h>#ifdef CONFIG_DRIVER_DM9000#if (CONFIG_COMMANDS & CFG_CMD_NET)#define DM9000_VID_L 0x28#define DM9000_VID_H 0x29#define DM9000_PID_L 0x2A#define DM9000_PID_H 0x2B#define DM9000_ID 0x90000A46#define DM9000_INT_MII 0x00#define DM9000_PPTR *(volatile u16 *)(DM9000_BASE)#define DM9000_PDATA *(volatile u16 *)(DM9000_BASE + 4)static unsigned char ior(int reg);/* edit by davicom */static void eth_mem_test (void){ u8 i; u16 j , k ; iow(0x00, 3); udelay(50); /* delay 100us */ iow(0x00, 2); iow(0xff , 0x00); /* 闽超┮Τい耞
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -