Linux下FL2440 2.6.28 SD卡驱动BUG解决

2019-04-21 07:07:44来源:华彩软件站 阅读 ()

新老客户大回馈,云服务器低至5折

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).n");


  host->pio_active =XFER_NONE;


  return;


  }


  dbg(host, dbg_pio,"pio_write(): new source: [%i]@[%p]n",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卡可稳定运行。



原文链接:http://www.huacolor.com/article/22941.html
如有疑问请与原作者联系

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:苹果iOS操作系统缺陷并非特意而为

下一篇:谷歌操作系统Chrome OS获得重大升级