Welcome 微信登录

首页 / 操作系统 / Linux / Linux下FL2440 2.6.28 SD卡驱动BUG解决

FL2440的2.6.28的内核,SD卡驱动默认是有问题的,在linux-2.6.28.7driversmmchost目录的s3cmci.c文件的do_pio_write函数中做如下修改:static void do_pio_write(struct s3cmci_host *host)
{
 void __iomem *to_ptr;
 int res;
 u32 fifo;
 u32 *ptr; 
 to_ptr = host->base + host->sdidata;
 //while ((fifo = fifo_free(host)))
 while ((fifo = fifo_free(host))>3) //lqm changed from feiling FAE.11-01-19
 {
  if (!host->pio_bytes)  
  {
   res = get_data_buffer(host, &host->pio_bytes,&host->pio_ptr);
   if (res)
   {   
    dbg(host, dbg_pio,"pio_write(): complete (no more data). ");      host->pio_active =XFER_NONE;
    return;  
   }
   dbg(host, dbg_pio,"pio_write(): new source: [%i]@[%p] ",host->pio_bytes, host->pio_ptr);
  }
  /* If we have reached the end of the block, we have to  
   * write exactly the remaining number of bytes.  If we 
   * in the middle of the block, we have to write full 
   * words, so round down to an even multiple of 4. */
  if (fifo >=host->pio_bytes)
   fifo = host->pio_bytes; 
  else
   fifo -= fifo & 3;
  host->pio_bytes -= fifo;
  host->pio_count += fifo; 
  fifo = (fifo + 3) >> 2;
  ptr = host->pio_ptr; 
  while (fifo--)
   writel(*ptr++, to_ptr); 
  host->pio_ptr = ptr;
 }
 enable_imask(host, S3C2410_SDIIMSK_TXFIFOHALF);
}经测试,1G,2G的SD卡可稳定运行。Linux平台基于S3C2440的MPlayer的移植Ubuntu Server 的网卡流量和速率监控软件相关资讯      Linux教程 
  • Linux教程:如何在命令行中查看目  (07/28/2014 12:22:23)
  • Linux 修改root密码  (11/03/2012 07:53:38)
  • su - root 与su root的区别  (06/06/2012 00:39:40)
  • Linux进程间通信:消息队列  (01/28/2013 09:43:00)
  • U盘安装Linux开机无法启动解决方法  (10/07/2012 08:55:52)
  • Windows 7/Linux 同步时间  (05/15/2012 06:17:55)
本文评论 查看全部评论 (0)
表情: 姓名: 字数