S5PV210 Android DM9000驱动

// 作者:eleven( [email protected]

// 论坛ID:Sturtle

// 平台:友坚UT-S5PV210开发板+Android2.2 OS

// 注意事项:未经作者同意,商业网站不能转载,更不得在转载的时候擅自修改、删除文章的任何部分

//------------------------------------------------------------------------------------------------------------------------------

一、硬件情况:

        1、查看原理图:16bit模式;

        2、INT接到S5PV210的IRQ_LAV/EINT10,INT脚为低时为有效中断信号,中断线为EINT10;

        3、CS接到S5PV210的CSn1,CMD连接到V210的地址总线ADDR[2],故INDEX和DATA[15:0]的端口地址分别为0x88000000和0x88000004。

  二、软件修改:

        1、修改\kernel\arch\arm\mach-s5pv210\include\mach\map.h

    #define S5PV210_PA_DM9000  (0x88000000)  
    #define S5P_PA_DM9000      S5PV210_PA_DM9000 + 0x300  


       2、修改\kernel\arch\arm\plat-s5p\devs.c

   static struct resource s5p_dm9000_resources[] = {
                   [0] = {
                             .start = S5P_PA_DM9000,
                             .end   = S5P_PA_DM9000 + 3,
                             .flags = IORESOURCE_MEM,
                         },
                   [1] = {

                         #if defined(CONFIG_DM9000_16BIT)
                             .start = S5P_PA_DM9000 + 0x04,
                             .end   = S5P_PA_DM9000 + 7,
                             .flags = IORESOURCE_MEM,
                         #else
                             .start = S5P_PA_DM9000 + 1,
                             .end   = S5P_PA_DM9000 + 1,
                             .flags = IORESOURCE_MEM,
                         #endif
                          },
                   [2] = {
                             .start = IRQ_EINT10,
                             .end   = IRQ_EINT10,
                             .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
                          }
                     };


    3、修改\kernel\arch\arm\mach-s5pv210\mach-smdkv210.c  

static void __init smdkv210_dm9000_set(void){
      ...
      tmp = __raw_readl(S5P_SROM_BW);  tmp &=~(0xF<<4); 
      tmp |= (1<<7) | (1<<6) | (1<<5) | (1<<4); 
      __raw_writel(tmp, S5P_SROM_BW); 
      __raw_writel((0x0<<28)|(0x0<<24)|(0x5<<16)|(0x0<<12)|(0x0<<8)|(0x0<<4)|(0x0<<0), S5P_SROM_BC3);  
      ...
}

4、make menuconfig选上DM9000和16bit的模式,make zImage即可

 

转载自:http://blog.csdn.net/sturtle/article/details/6576951

你可能感兴趣的:(android,struct,cmd,include,平台,resources)