微波EDA网,见证研发工程师的成长!
首页 > 硬件设计 > 嵌入式设计 > linux-2.6.35.3内核移植(s3c2440)

linux-2.6.35.3内核移植(s3c2440)

时间:11-20 来源:互联网 点击:

Device Drivers --->

<*> Sound card support --->

<*> Advanced Linux Sound Architecture --->

<*> OSS Mixer API

<*> OSS PCM (digital audio) API

[*] OSS PCM (digital audio) API - Include plugin system

[*] Support old ALSA API

[*] Verbose procfs contents

[*] Verbose printk

[*] Generic sound devices --->

<*> ALSA for SoC audio support --->

<*> SoC Audio for the Samsung S3C24XX chips

<*> SoC I2S Audio support UDA134X wired to a S3C24XX

12、移植DM9000驱动

a、修改drivers/net/dm9000.c文件:
头文件增加:

#include

#include

#include

在dm9000_probe函数开始增加:

unsigned char ne_def_eth_mac_addr[]={0x00,0x12,0x34,0x56,0x80,0x49};

static void *bwscon;

static void *gpfcon;

static void *extint0;

static void *intmsk;

#define BWSCON (0x48000000)

#define GPFCON (0x56000050)

#define EXTINT0 (0x56000088)

#define INTMSK (0x4A000008)

bwscon=ioremap_nocache(BWSCON,0x0000004);

gpfcon=ioremap_nocache(GPFCON,0x0000004);

extint0=ioremap_nocache(EXTINT0,0x0000004);

intmsk=ioremap_nocache(INTMSK,0x0000004);

writel(readl(bwscon)|0xc0000,bwscon);

writel( (readl(gpfcon) & ~(0x3 < 14)) | (0x2 < 14), gpfcon);

writel( readl(gpfcon) | (0x1 < 7), gpfcon); // Disable pull-up

writel( (readl(extint0) & ~(0xf < 28)) | (0x4 < 28), extint0); //rising edge

writel( (readl(intmsk)) & ~0x80, intmsk);

在这个函数的最后需要修改:

if (!is_valid_ether_addr(ndev->dev_addr)) {

/* try reading from mac */

mac_src = "chip";

for (i = 0; i < 6; i++)

//ndev->dev_addr[i] = ior(db, i+DM9000_PAR);

ndev->dev_addr[i] = ne_def_eth_mac_addr[i];

}

b、修改arch/arm/mach-s3c2440/mach-smdk2440.c,添加设备

static struct platform_device *smdk2440_devices[] __initdata = {

&s3c_device_ohci,

&s3c_device_lcd,

&s3c_device_wdt,

&s3c_device_i2c0,

&s3c_device_iis,

&s3c_device_rtc,

&s3c24xx_uda134x,

&s3c_device_dm9000,

};

c、修改arch/arm/plat-s3c24xx/devs.c
添加头文件

#include

添加以下代码

static struct resource s3c_dm9000_resource[] = {

[0] = {

.start = S3C24XX_PA_DM9000,

.end = S3C24XX_PA_DM9000+ 0x3,

.flags = IORESOURCE_MEM

},

[1]={

.start = S3C24XX_PA_DM9000 + 0x4, //CMD pin is A2

.end = S3C24XX_PA_DM9000 + 0x4 + 0x7c,

.flags = IORESOURCE_MEM

},

[2] = {

.start = IRQ_EINT7,

.end = IRQ_EINT7,

.flags = IORESOURCE_IRQ

},

};

static struct dm9000_plat_data s3c_device_dm9000_platdata = {

.flags= DM9000_PLATF_16BITONLY,

};

struct platform_device s3c_device_dm9000 = {

.name= "dm9000",

.id= 0,

.num_resources= ARRAY_SIZE(s3c_dm9000_resource),

.resource= s3c_dm9000_resource,

.dev= {

.platform_data = &s3c_device_dm9000_platdata,

}

};

EXPORT_SYMBOL(s3c_device_dm9000);

d、修改arch/arm/plat-sumsung/include/plat/devs.h 45行附近,添加

extern struct platform_device s3c_device_dm9000;

e、修改arch/arm/mach-s3c2410/include/mach/map.h文件

/* DM9000 */

#define S3C24XX_PA_DM9000 0x20000300

#define S3C24XX_VA_DM9000 0xE0000000

13、启动画面显示小企鹅的方法

配置内核,下面是必选项

Device Drivers--->

Graphics support --->

<*> Support for frame buffer devices

<*> S3C2410 LCD framebuffer support ,multi support!

Console display driver support --->

<*> Framebuffer Console support

Logo configuration --->

[*] Bootup logo

[*] Standard 224-color Linux logo

14、3.5寸LCD显示的移植

2.6.34内核中已经支持

15、修改uart2为普通串口以及测试程序

修改arch/arm/mach-s3c2440/mach-smdk2440.c中的uart2的配置,修改后如下:

static struct s3c2410_uartcfg smdk2440_uartcfgs[] __initdata = {

[0] = {

.hwport = 0,

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top