<meter id="pryje"><nav id="pryje"><delect id="pryje"></delect></nav></meter>
          <label id="pryje"></label>

          新聞中心

          EEPW首頁 > 嵌入式系統(tǒng) > 設(shè)計(jì)應(yīng)用 > linux下USB驅(qū)動(dòng)移植

          linux下USB驅(qū)動(dòng)移植

          作者: 時(shí)間:2011-05-12 來源:網(wǎng)絡(luò) 收藏

          一、代碼修改
          在這里把include前面的#給刪了,希望有幫助
          /*add by lfc*/
          #include asm/arch/regs-clock.h>
          #include asm/arch/usb-control.h>
          #include /device.h>
          #include /delay.h>
          /*end add*/

          /**********************add by lfc*************************************/
          static struct s3c2410_hcd_info usb_sbc2410_info = {
          .port[0] = {
          .flags = S3C_HCDFLG_USED
          }
          };

          int usb_sbc2410_init(void)
          {
          unsigned long upllvalue = (0x7812)|(0x024)|(0x03);
          printk( Control, (c) 2006 sbc2410 );
          s3c_device_usb.dev.platform_data = usb_sbc2410_info;
          while(upllvalue!=__raw_readl(S3C2410_UPLLCON))
          {
          __raw_writel(upllvalue,S3C2410_UPLLCON);
          mdelay(1);
          }
          return 0;
          }
          /***************************end add**********************/

          static void __init smdk2410_map_io(void)
          {
          s3c24xx_init_io(smdk2410_iodesc, ARRAY_SIZE(smdk2410_iodesc));
          s3c24xx_init_clocks(0);
          s3c24xx_init_uarts(smdk2410_uartcfgs, ARRAY_SIZE(smdk2410_uartcfgs));
          s3c24xx_set_board(smdk2410_board);
          /*************************add by lfc****************************/
          usb_sbc2410_init();
          /*************************end add*******************************/
          }


          其實(shí)到了這里,要修改的代碼已經(jīng)修改完了,比添加Nand flash的支持修改的地方還要少^_^,不過我一直以為還沒修改好,最后發(fā)現(xiàn)原來是沒配置好~_~

          本文引用地址:http://www.ex-cimer.com/article/150748.htm

          二、內(nèi)核配置
          下面說一下郁悶了我好一陣子的內(nèi)核配置(支持)問題,這個(gè)就比Nand flash的配置要復(fù)雜多了。
          1、讓內(nèi)核支持熱插拔
          │ General setup --->
          │ │[*] Support for hot-pluggable devices

          2、設(shè)置,可能有些不選也行,不過沒時(shí)間去試,至于為什么要選這些選項(xiàng)的話可以看一下這個(gè)貼(Linux下的硬件——USB設(shè)備):

          │ │ Device Drivers --->
          │ │ Generic Driver Options --->
          │*> Hotplug firmware loading support
          │ │ Block devices --->
          │ │ *> Low Performance USB Block driver
          │ │ SCSI device support --->
          │ │ *> SCSI generic support
          │ │ [*] Probe all LUNs on each SCSI device
          │ │ USB support --->
          │ │*> Support for Host-side USB
          │ │[*] USB device filesystem
          │ │*> OHCI HCD support
          │ │*> USB Mass Storage support
          │ │[*] USB Monitor

          linux操作系統(tǒng)文章專題:linux操作系統(tǒng)詳解(linux不再難懂)

          上一頁 1 2 下一頁

          關(guān)鍵詞: 移植 驅(qū)動(dòng) USB linux

          評(píng)論


          相關(guān)推薦

          技術(shù)專區(qū)

          關(guān)閉
          看屁屁www成人影院,亚洲人妻成人图片,亚洲精品成人午夜在线,日韩在线 欧美成人 (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })();