]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
usb: musb: tusb6010: Add tusb_revision to struct musb to store the revision.
authorMatwey V. Kornilov <matwey@sai.msu.ru>
Fri, 16 May 2014 14:19:54 +0000 (18:19 +0400)
committerFelipe Balbi <balbi@ti.com>
Fri, 16 May 2014 17:14:55 +0000 (12:14 -0500)
Add field to store tusb6010 revision value. Read the revision at
the startup and store to the variable.

Signed-off-by: Matwey V. Kornilov <matwey@sai.msu.ru>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/musb/musb_core.h
drivers/usb/musb/tusb6010.c

index 47e88747e3a7a424bd6881a7e403607f3deb5dfa..d155a156f240be828f339b32f57a86bf3a1f2204 100644 (file)
@@ -339,6 +339,7 @@ struct musb {
        dma_addr_t              async;
        dma_addr_t              sync;
        void __iomem            *sync_va;
+       u8                      tusb_revision;
 #endif
 
        /* passed down from chip/board specific irq handlers */
index f38a8dbd60756e01c1a9800b6ddceefea77778db..8a746421a3253fcfc03dcde7e7e3e8c4f589968e 100644 (file)
@@ -1012,6 +1012,7 @@ static int tusb_musb_start(struct musb *musb)
                goto err;
        }
 
+       musb->tusb_revision = tusb_get_revision(musb);
        ret = tusb_print_revision(musb);
        if (ret < 2) {
                printk(KERN_ERR "tusb: Unsupported TUSB6010 revision %i\n",