summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-ti33x-psp-3.1/0037-beaglebone-compare-complete-partnumber-not-the-first.patch
blob: 45168757da57338118ac826036275fee2faf27b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
From c97ae962c459f33b27800309b30f5ed8ebeba2c2 Mon Sep 17 00:00:00 2001
From: Koen Kooi <koen@dominion.thruhere.net>
Date: Thu, 26 Jan 2012 10:57:23 +0100
Subject: [PATCH 37/37] beaglebone: compare complete partnumber, not the first 5 chars when detecting capes

Otherwise it will init multiple capes when only one is present:

[    0.456913] BeagleBone cape EEPROM: found eeprom at address 0x56
[    0.456932] BeagleBone cape: Beagleboardtoys BeagleBone DVI-D CAPE
[    0.456948] BeagleBone cape partnumber: BB-BONE-DVID-01
[    0.456961] BeagleBone cape: initializing DVI cape
[    0.492772] BeagleBone cape: initializing LCD cape
[    0.502925] [<c0406e89>] (am33xx_register_lcdc+0xd/0x24) from [<c001c505>] (beaglebone_cape_setup+0x109/0x1dc)
[    0.502965] [<c001c505>] (beaglebone_cape_setup+0x109/0x1dc) from [<c0168b3b>] (at24_probe+0x2b3/0x34c)
[    0.503683] [<c0406e89>] (am33xx_register_lcdc+0xd/0x24) from [<c001c505>] (beaglebone_cape_setup+0x109/0x1dc)
[    0.503715] [<c001c505>] (beaglebone_cape_setup+0x109/0x1dc) from [<c0168b3b>] (at24_probe+0x2b3/0x34c)
[    0.509362] Failed to register Beagleboardtoys 7" LCD cape device
[    0.509390] BeagleBone cape: initializing LCD cape touchscreen

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
 arch/arm/mach-omap2/board-am335xevm.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c
index 6a0ace9..5c48d59 100644
--- a/arch/arm/mach-omap2/board-am335xevm.c
+++ b/arch/arm/mach-omap2/board-am335xevm.c
@@ -1352,11 +1352,11 @@ static void beaglebone_cape_setup(struct memory_accessor *mem_acc, void *context
 	snprintf(tmp, sizeof(cape_config.partnumber) + 1, "%s", cape_config.partnumber);
 	pr_info("BeagleBone cape partnumber: %s\n", tmp);   
 
-	if (!strncmp("BB-BONE-DVID-01", cape_config.partnumber, 5)) {
+	if (!strncmp("BB-BONE-DVID-01", cape_config.partnumber, 15)) {
 			pr_info("BeagleBone cape: initializing DVI cape\n");
 			dvi_init(0,0);
 	}
-	if (!strncmp("BB-BONE-LCD7-01", cape_config.partnumber, 5)) {
+	if (!strncmp("BB-BONE-LCD7-01", cape_config.partnumber, 15)) {
 		pr_info("BeagleBone cape: initializing LCD cape\n");
 		bbtoys7lcd_init(0,0);
 		pr_info("BeagleBone cape: initializing LCD cape touchscreen\n");
-- 
1.7.2.5