summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Nelson <robertcnelson@gmail.com>2011-04-26 02:09:44 -0300
committerRicardo Salveti de Araujo <ricardo.salveti@linaro.org>2011-05-24 04:22:19 -0300
commit644e870df08d063705718daef2dfc4cc233c881d (patch)
treeaa91cb97cac3c539cc8390ba9db52904b2e2c8de
parentc635e295e4d49d5d6d224da5b85987aa21603a7c (diff)
omap3: beagle: detect new xM revision C
Beagle xM rev C has nEN_USB_PWR inverted again, so we need proper check for revision C. BugLink: http://bugs.launchpad.net/bugs/770679 Signed-off-by: Robert Nelson <robertcnelson@gmail.com> Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com>
-rw-r--r--arch/arm/mach-omap2/board-omap3beagle.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index ef1b129f440..b64b705b8dd 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -64,6 +64,7 @@
* C4 = GPIO173, GPIO172, GPIO171: 1 0 1
* XMA = GPIO173, GPIO172, GPIO171: 0 0 0
* XMB = GPIO173, GPIO172, GPIO171: 0 0 1
+ * XMC = GPIO173, GPIO172, GPIO171: 0 1 0
*/
enum {
OMAP3BEAGLE_BOARD_UNKN = 0,
@@ -71,6 +72,7 @@ enum {
OMAP3BEAGLE_BOARD_C1_3,
OMAP3BEAGLE_BOARD_C4,
OMAP3BEAGLE_BOARD_XM,
+ OMAP3BEAGLE_BOARD_XMC,
};
static u8 omap3_beagle_version;
@@ -129,6 +131,10 @@ static void __init omap3_beagle_init_rev(void)
printk(KERN_INFO "OMAP3 Beagle Rev: xM B\n");
omap3_beagle_version = OMAP3BEAGLE_BOARD_XM;
break;
+ case 2:
+ printk(KERN_INFO "OMAP3 Beagle Rev: xM C\n");
+ omap3_beagle_version = OMAP3BEAGLE_BOARD_XMC;
+ break;
default:
printk(KERN_INFO "OMAP3 Beagle Rev: unknown %hd\n", beagle_rev);
omap3_beagle_version = OMAP3BEAGLE_BOARD_UNKN;
@@ -250,7 +256,8 @@ static void __init beagle_display_init(void)
int r;
/* DVI reset GPIO is different between beagle revisions */
- if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM)
+ if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) ||
+ (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XMC))
beagle_dvi_device.reset_gpio = 129;
else
beagle_dvi_device.reset_gpio = 170;
@@ -290,7 +297,8 @@ static int beagle_twl_gpio_setup(struct device *dev,
{
int r;
- if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
+ if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) ||
+ (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XMC)) {
mmc[0].gpio_wp = -EINVAL;
} else if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C1_3) ||
(omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C4)) {
@@ -310,7 +318,8 @@ static int beagle_twl_gpio_setup(struct device *dev,
/* REVISIT: need ehci-omap hooks for external VBUS
* power switch and overcurrent detect
*/
- if (omap3_beagle_get_rev() != OMAP3BEAGLE_BOARD_XM) {
+ if ((omap3_beagle_get_rev() != OMAP3BEAGLE_BOARD_XM) &&
+ (omap3_beagle_get_rev() != OMAP3BEAGLE_BOARD_XMC)) {
r = gpio_request(gpio + 1, "EHCI_nOC");
if (!r) {
r = gpio_direction_input(gpio + 1);
@@ -340,7 +349,8 @@ static int beagle_twl_gpio_setup(struct device *dev,
* P7/P8 revisions(prototype): Camera EN
* A2+ revisions (production): LDO (supplies DVI, serial, led blocks)
*/
- if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
+ if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) ||
+ (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XMC)) {
r = gpio_request(gpio + 1, "nDVI_PWR_EN");
if (!r) {
r = gpio_direction_output(gpio + 1, 0);