久久婷婷香蕉热狠狠综合,精品无码国产自产拍在线观看蜜,寡妇房东在做爰3,中文字幕日本人妻久久久免费,国产成人精品三上悠亚久久

當前位置:首頁 > 嵌入式培訓 > 嵌入式學習 > 講師博文 > 基于(yu)FS4412內核移植之USB驅動的(de)移植

基于FS4412內核移植(zhi)之(zhi)USB驅動(dong)的移植(zhi) 時間:2014-10-20      來(lai)源:未知

USB接(jie)口是現(xian)在(zai)計算機系統中通(tong)用的一種(zhong)接(jie)口,這里介紹USB控(kong)制器驅(qu)(qu)動的移植,以U盤驅(qu)(qu)動為(wei)例。 FS4412通(tong)過usb hub芯片將(jiang)一個(ge)usb口擴展為(wei)多個(ge)接(jie)口如圖:

所以(yi)為了(le)能(neng)夠使用usb口接入usb設備還需要移(yi)植usb hub驅動。

 設備樹添加(jia)內(nei)容:$ vim arch/arm/boot/dts/exynos4412-fs4412.dts

添加如下內容:
        usbphy: usbphy@125B0000 {
        #address-cells = < 1>;
        #size-cells = < 1>;
        compatible = "samsung,exynos4x12-usb2phy";
        reg = < 0x125B0000 0x100>;
        ranges;
        clocks = < &clock 2>, < &clock 305>;
        clock-names = "xusbxti", "otg";
        usbphy-sys {
        reg = < 0x10020704 0x8 0x1001021c 0x4>;
        };
        };
        ehci@12580000 {
        status = "okay";
        usbphy = < &usbphy>;
        };
        usb3503@08 {
        compatible = "smsc,usb3503";
        reg = < 0x08 0x4>;
        connect-gpios = < &gpm3 3 1>;
        intn-gpios = < &gpx2 3 1>;
        reset-gpios = < &gpm2 4 1>;
        initial-mode = < 1>;
      &nbsp; };

usbphy相關(guan)內(nei)容參考(kao):Documentation/devicetree/bindings/usb/samsung-usbphy.txt

usb hub芯片幾個(ge)關鍵管腳連接如下(xia):

所以:
        USB3503_RESET 對應 GPM2_4
        USB3503_CONNECT 對應 GPM3_3
      &nbsp; HUB_INT_N 對(dui)應(ying) GPX2_3

所以
        usb3503@08 {
        compatible = "smsc,usb3503";
        reg = < 0x08 0x4>;
        connect-gpios = < &gpm3 3 1>;
        intn-gpios = < &gpx2 3 1>;
        reset-gpios = < &gpm2 4 1>;
        initial-mode = < 1>;
      &nbsp; };

參考內容:Documentation/devicetree/bindings/usb/usb3503.txt

配置內核:
        make menuconfig
        Device Drivers --->
        [*] USB support --->
        <*> EHCI HCD (USB 2.0) support
        <*> EHCI support for Samsung S5P/EXYNOS SoC Series
        <*> USB Mass Storage support
        <*> USB3503 HSIC to USB20 Driver
        USB Physical Layer drivers --->
        <*> Samsung USB 2.0 PHY controller Driver
        SCSI device support --->
        <*> SCSI device support
        <*> SCSI disk support
        <*> SCSI generic support
        File systems --->
        DOS/FAT/NT Filesystems --->
        <*> MSDOS fs support
        <*> VFAT (Windows-95) fs support
        (437) Default codepage for FAT
        (iso8859-1) Default iocharset for FAT
        -*- Native language support --->
        <*> Codepage 437 (United States, Canada)
        <*> Simplified Chinese charset (CP936, GB2312)
        <*> ASCII (United States)
        <*> NLS ISO 8859-1 (Latin 1; Western European Languages)
    &nbsp;   <*> NLS UTF-8

重新編譯內核,插入U盤看到如下內容表示移植成功:
        [ 72.695000] usb 1-3.2: USB disconnect, device number 3
        [ 74.435000] usb 1-3.2: new high-speed USB device number 4 using exynos-ehci
        [ 74.555000] usb-storage 1-3.2:1.0: USB Mass Storage device detected
        [ 74.560000] scsi1 : usb-storage 1-3.2:1.0
        [ 75.645000] scsi 1:0:0:0: Direct-Access Kingston DataTraveler 160 PMAP PQ: 0 ANSI: 4
        [ 75.660000] sd 1:0:0:0: Attached scsi generic sg0 type 0
        [ 76.695000] sd 1:0:0:0: [sda] 15556608 512-byte logical blocks: (7.96 GB/7.41 GiB)
        [ 76.700000] sd 1:0:0:0: [sda] Write Protect is off
        [ 76.705000] sd 1:0:0:0: [sda] No Caching mode page found
        [ 76.710000] sd 1:0:0:0: [sda] Assuming drive cache: write through
        [ 76.725000] sd 1:0:0:0: [sda] No Caching mode page found
        [ 76.730000] sd 1:0:0:0: [sda] Assuming drive cache: write through
        [ 76.760000] sda: sda1 (sda是設備名 sda1是分區名)
        [ 76.770000] sd 1:0:0:0: [sda] No Caching mode page found
        [ 76.770000] sd 1:0:0:0: [sda] Assuming drive cache: write through
        [ 76.780000] sd 1:0:0:0: [sda] Attached SCSI removable disk

然后執行(xing)如下(xia)操作(zuo)

# mount -t vfat /dev/sda1 /mnt
       &nbsp;# ls

上一篇:linux下的rtc機制

下一篇:函數與指針專題

熱點文章推(tui)薦
華清學員(yuan)就(jiu)業榜單(dan)
高薪學員經驗分(fen)享
熱點新聞推薦
前(qian)臺專線:010-82525158 企業培訓洽談專線:010-82525379 院(yuan)校合作洽談(tan)專線:010-82525379 Copyright © 2004-2022 北京華清遠見科技集團有限公司 版權所有 ,,京公海網安備11010802025203號

回到頂部