Linux 下 cs8900a 的移植说明

cs8900a 建立编译菜单

1. 拷贝到文件

把 cs8900a 的压缩包拷贝到 arm 用户下的 dev_home/localapps/ [arm@localhost localapps]$ tar ­xzvf cs8900a.tar.gz [arm@localhost localapps]$cd cs8900a

[arm@localhost cs8900a]$cp cs8900a.c $KERNEL/linux­2.6.14.1/drivers/net/ [arm@localhost cs8900a]$cp cs8900.h $KERNEL/linux­2.6.14.1/drivers/net/

 

  1. 修改 Kconfig 文件

[arm@localhost cs8900a]$vi $KERNEL/linux­2.6.14.1/drivers/net/Kconfig

#加入如下内容

config CS8900a

tristate "CS8900a support"

depends on NET_ETHERNET && ARM && ARCH_SMDK2410

­­­help­­­

Support for CS8900A chipset based Ethernet cards. If you have a network (Ether net) card of this type, say Y and read the Ethernet­HOWTO, available from as well as.

To compile this driver as a module, choose M here and read. The module will be called cs8900.o.

 

  1. 修改 Makefile 文件

[arm@localhost cs8900a]$vi $KERNEL/linux­2.6.14.1/drivers/net/Makefile

#加入如下内容

obj­$(CONFIG_CS8900a)        += cs8900a.o

 

修改 S3C2410 相关信息

1. 加入 CS8900A 在内存中的起始位置

 

[arm@localhost cs8900a]$cp reg­cs8900.h $KERNEL/linux­2.6.14.1/include/asm­arm/arch­s3c2410/ cs8900.h 的内容如下:

#ifndef _INCLUDE_CS8900A_H_

#define _INCLUDE_CS8900A_H_

 

#include <linux/config.h>

 

#define pSMDK2410_ETH_IO                 0x19000000 /* S3C2410_CS3 0x18000000 */

#define vSMDK2410_ETH_IO                 0xE0000000

#define SMDK2410_ETH_IRQ                 IRQ_EINT9

 

#endif

 

2. 加入 cs8900A 的物理地址到虚拟地址的映射

[arm@localhost cs8900a]$vi $KERNEL/linux­2.6.14.1/arch/arm/mach­s3c2410/mach­smdk2410.c

/* 加入如下内容 */

static struct map_desc smdk2410_iodesc[]     initdata = {

{vSMDK2410_ETH_IO, 0x19000000, SZ_1M, MT_DEVICE} /* Add this line */

};

posted @ 2019-06-29 09:03  樊伟胜  阅读(153)  评论(0编辑  收藏  举报