aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/u-boot/u-boot-git/beagleboard/0037-OMAP3-beagle-pass-expansionboard-name-in-bootargs.patch
blob: 584a57281ed161ec90e178840b523485ad3d9d2b (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
From 02dba49bdab65e1a96fd4593f5847b38252b66e0 Mon Sep 17 00:00:00 2001
From: Koen Kooi <koen@dominion.thruhere.net>
Date: Mon, 3 May 2010 10:17:41 +0200
Subject: [PATCH 37/50] OMAP3: beagle: pass expansionboard name in bootargs

This makes it possible to do in-kernel fixups for expansionboards like reclaiming GPIOs
---
 board/ti/beagle/beagle.c       |    7 +++++++
 include/configs/omap3_beagle.h |    3 +++
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
index 9300984..556e995 100644
--- a/board/ti/beagle/beagle.c
+++ b/board/ti/beagle/beagle.c
@@ -172,33 +172,40 @@ int misc_init_r(void)
 			printf("Recognized Tincantools Zippy expansion board (rev %d %s)\n",
 				expansion_config.revision, expansion_config.fab_revision);
 			MUX_TINCANTOOLS_ZIPPY();
+			setenv("buddy", "zippy");
 			break;
 		case TINCANTOOLS_ZIPPY2:
 			printf("Recognized Tincantools Zippy2 expansion board (rev %d %s)\n",
 				expansion_config.revision, expansion_config.fab_revision);
 			MUX_TINCANTOOLS_ZIPPY();
+			setenv("buddy", "zippy2");
 			break;
 		case TINCANTOOLS_TRAINER:
 			printf("Recognized Tincantools Trainer expansion board (rev %d %s)\n",
 				expansion_config.revision, expansion_config.fab_revision);
 			MUX_TINCANTOOLS_ZIPPY();
 			MUX_TINCANTOOLS_TRAINER();
+			setenv("buddy", "trainer");
 			break;
 		case TINCANTOOLS_SHOWDOG:
 			printf("Recognized Tincantools Showdow expansion board (rev %d %s)\n",
 				expansion_config.revision, expansion_config.fab_revision);
 			/* Place holder for DSS2 definition for showdog lcd */
 			setenv("defaultdisplay", "showdoglcd");
+			setenv("buddy", "showdog");
 			break;
 		case KBADC_BEAGLEFPGA:
 			printf("Recognized KBADC Beagle FPGA board\n");
 			MUX_KBADC_BEAGLEFPGA();
+			setenv("buddy", "beaglefpga");
 			break;
 		case BEAGLE_NO_EEPROM:
 			printf("No EEPROM on expansion board\n");
+			setenv("buddy", "none");
 			break;
 		default:
 			printf("Unrecognized expansion board: %x\n", expansion_config.device_vendor);
+			setenv("buddy", "unknown");
 	}
 
 	if (expansion_config.content == 1)
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
index 47bc971..8ad52aa 100644
--- a/include/configs/omap3_beagle.h
+++ b/include/configs/omap3_beagle.h
@@ -190,6 +190,7 @@
 	"usbtty=cdc_acm\0" \
 	"console=ttyS2,115200n8\0" \
 	"mpurate=500\0" \
+	"buddy=none\0" \
 	"vram=12M\0" \
 	"dvimode=640x480MR-16@60\0" \
 	"defaultdisplay=dvi\0" \
@@ -199,6 +200,7 @@
 	"nandrootfstype=jffs2\0" \
 	"mmcargs=setenv bootargs console=${console} " \
 		"mpurate=${mpurate} " \
+		"buddy=${buddy} "\
 		"vram=${vram} " \
 		"omapfb.mode=dvi:${dvimode} " \
 		"omapdss.def_disp=${defaultdisplay} " \
@@ -206,6 +208,7 @@
 		"rootfstype=${mmcrootfstype}\0" \
 	"nandargs=setenv bootargs console=${console} " \
 		"mpurate=${mpurate} " \
+		"buddy=${buddy} "\
 		"vram=${vram} " \
 		"omapfb.mode=dvi:${dvimode} " \
 		"omapdss.def_disp=${defaultdisplay} " \
-- 
1.6.6.1