aboutsummaryrefslogtreecommitdiffstats
path: root/packages/uboot/files/u-boot-20061030-gta01v4.patch
blob: 8910dcf831291107c7041527feb286e35271cbf0 (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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
Index: git/Makefile
===================================================================
--- git.orig/Makefile	2007-01-04 12:22:08.000000000 +0100
+++ git/Makefile	2007-01-04 12:22:12.000000000 +0100
@@ -1916,8 +1916,10 @@
 qt2410_config	:	unconfig
 	@./mkconfig $(@:_config=) arm arm920t qt2410 NULL s3c24x0
 
-gta01_config	:	unconfig
-	@./mkconfig $(@:_config=) arm arm920t gta01 NULL s3c24x0
+gta01_config \
+gta01v3_config \
+gta01v4_config :	unconfig
+	@board/gta01/split_by_variant.sh $@
 
 scb9328_config	:	unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm920t scb9328 NULL imx
Index: git/board/gta01/gta01.c
===================================================================
--- git.orig/board/gta01/gta01.c	2007-01-04 12:22:08.000000000 +0100
+++ git/board/gta01/gta01.c	2007-01-04 12:22:12.000000000 +0100
@@ -90,6 +90,7 @@
 	delay (8000);
 
 	/* set up the I/O ports */
+#if defined(CONFIG_ARCH_GTA01_v3)
 	gpio->GPACON = 0x007FFFFF;
 
 	gpio->GPBCON = 0x00005056;
@@ -112,6 +113,34 @@
 
 	gpio->GPHCON = 0x0008FAAA;
 	gpio->GPHUP = 0x000007FF;
+#elif defined(CONFIG_ARCH_GTA01_v4)
+	gpio->GPACON = 0x007FFFFF; //0x005E47FF;
+
+	gpio->GPBDAT |= 0x4;		/* Set GBP2 to high (Flash power-up) */
+	gpio->GPBCON = 0x00005056; //0x00045016;
+	gpio->GPBUP = 0x000007FF;
+
+	gpio->GPCCON = 0xAAAA12A9;
+	gpio->GPCUP = 0x0000FFFF;
+
+	gpio->GPDCON = 0xAAAAAAAA;
+	gpio->GPDUP = 0x0000FFFF;
+
+	gpio->GPECON = 0xA02AAAAA;
+	gpio->GPEUP = 0x0000FFFF;
+
+	gpio->GPFCON = 0x0000aa09;
+	gpio->GPFUP = 0x000000FF;
+
+	gpio->GPGCON = 0xFF40F0C1;
+	gpio->GPGUP = 0x0000FFFF;
+
+	gpio->GPHCON = 0x0000FAAA;
+	gpio->GPHUP = 0x000007FF;
+
+#else
+#error Please define GTA01 version
+#endif
 
 	/* arch number of SMDK2410-Board */
 	gd->bd->bi_arch_number = MACH_TYPE_GTA01;
@@ -143,5 +172,9 @@
 
 u_int32_t get_board_rev(void)
 {
+#if defined(CONFIG_ARCH_GTA01_v3)
 	return 0x00000130;
+#elif defined(CONFIG_ARCH_GTA01_v4)
+	return 0x00000140;
+#endif
 }
Index: git/board/gta01/split_by_variant.sh
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ git/board/gta01/split_by_variant.sh	2007-01-04 12:22:12.000000000 +0100
@@ -0,0 +1,36 @@
+#!/bin/sh
+# ---------------------------------------------------------
+#  Set the core module defines according to Core Module
+# ---------------------------------------------------------
+# ---------------------------------------------------------
+# Set up the GTA01 type define
+# ---------------------------------------------------------
+
+mkdir -p ${obj}include
+if [ "$1" == "" ]
+then
+	echo "$0:: No parameters - using GTA01v3 config"
+	echo "#define CONFIG_ARCH_GTA01_v3" > ${obj}include/config.h
+else
+	case "$1" in
+	gta01v4_config)
+	echo "#define CONFIG_ARCH_GTA01_v4" > ${obj}include/config.h
+	;;
+
+	gta01v3_config)
+	echo "#define CONFIG_ARCH_GTA01_v3" > ${obj}include/config.h
+	;;
+
+
+	*)
+	echo "$0:: Unrecognised config - using gta01v3_config"
+	echo "#define CONFIG_ARCH_GTA01_v3" > ${obj}include/config.h
+	;;
+
+	esac
+
+fi
+# ---------------------------------------------------------
+# Complete the configuration
+# ---------------------------------------------------------
+$MKCONFIG -a gta01 arm arm920t gta01 NULL s3c24x0
Index: git/include/configs/gta01.h
===================================================================
--- git.orig/include/configs/gta01.h	2007-01-04 12:22:08.000000000 +0100
+++ git/include/configs/gta01.h	2007-01-04 12:22:12.000000000 +0100
@@ -124,7 +124,11 @@
  * Miscellaneous configurable options
  */
 #define	CFG_LONGHELP				/* undef to save memory		*/
-#define	CFG_PROMPT		"GTA01 # "	/* Monitor Command Prompt	*/
+#if defined(CONFIG_ARCH_GTA01_v3)
+#define	CFG_PROMPT		"GTA01v3 # "	/* Monitor Command Prompt	*/
+#elif defined(CONFIG_ARCH_GTA01_v4)
+#define	CFG_PROMPT		"GTA01v4 # "	/* Monitor Command Prompt	*/
+#endif
 #define	CFG_CBSIZE		256		/* Console I/O Buffer Size	*/
 #define	CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */
 #define	CFG_MAXARGS		16		/* max number of command args	*/