[PATCH 1/2] Add tusb_revision to struct musb to store the revision.

From: Matwey V. Kornilov
Date: Fri May 09 2014 - 07:52:00 EST


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@xxxxxxxxxx>
---
drivers/usb/musb/musb_core.h | 1 +
drivers/usb/musb/tusb6010.c | 1 +
2 files changed, 2 insertions(+)

diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h
index 7083e82..d7dea2f 100644
--- a/drivers/usb/musb/musb_core.h
+++ b/drivers/usb/musb/musb_core.h
@@ -337,6 +337,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 */
diff --git a/drivers/usb/musb/tusb6010.c b/drivers/usb/musb/tusb6010.c
index 4e9fb1d..81fa8fd 100644
--- a/drivers/usb/musb/tusb6010.c
+++ b/drivers/usb/musb/tusb6010.c
@@ -1011,6 +1011,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",
--
1.8.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/