usb: chipidea: add chipidea revision information

Define ci_get_revision API to know the controller revision
information according to chipidea 1.1a, 2.0a and 2.5a spec.
Besides, add one entry at struct ci_hdrc to indicate revision
information, it can be used for adding different code for
revisions, eg kinds of errata.

Reviewed-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Peter Chen
2015-02-11 12:44:55 +08:00
committed by Greg Kroah-Hartman
parent 655d32e9b2
commit cb271f3ce9
3 changed files with 45 additions and 2 deletions

View File

@@ -15,6 +15,16 @@
#include <linux/usb/ehci_def.h>
/*
* ID
* For 1.x revision, bit24 - bit31 are reserved
* For 2.x revision, bit25 - bit28 are 0x2
*/
#define TAG (0x1F << 16)
#define REVISION (0xF << 21)
#define VERSION (0xF << 25)
#define CIVERSION (0x7 << 29)
/* HCCPARAMS */
#define HCCPARAMS_LEN BIT(17)