Send commitlog mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.openmoko.org/mailman/listinfo/commitlog
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]
You can reach the person managing the list at
[EMAIL PROTECTED]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of commitlog digest..."
Today's Topics:
1. r4277 - trunk/src/target/u-boot/patches ([EMAIL PROTECTED])
2. r4278 - trunk/src/target/u-boot/patches ([EMAIL PROTECTED])
3. r4279 - trunk/src/target/u-boot/patches ([EMAIL PROTECTED])
4. r4280 - developers/werner/bin ([EMAIL PROTECTED])
5. r4281 - developers/werner ([EMAIL PROTECTED])
6. r4282 - trunk/src/target/u-boot/patches ([EMAIL PROTECTED])
--- Begin Message ---
Author: werner
Date: 2008-03-31 19:44:47 +0200 (Mon, 31 Mar 2008)
New Revision: 4277
Added:
trunk/src/target/u-boot/patches/fix-cpu-input-pulldowns.patch
Modified:
trunk/src/target/u-boot/patches/series
Log:
fix-cpu-input-pulldowns.patch
Solve following static GPIO input errors with pulldowns
GPE11: SPIMISO0 1 *float* Debug brd no pullup! *bad*
GPG08: EINT[16] 1 <=== copy of GPG0 !?! *bad*
GPH08: UEXTCLK 1 *NC* *FLOAT* *bad* *bad* *bad*
GPJ00: input 1 *NC* *FLOAT* *bad* *bad* *bad*
GPF03: TP-4705+debug Yeah its *bad*, we can put a pulldown on it.
Signed-off-by: Andy Green <[EMAIL PROTECTED]>
---
board/neo1973/gta02/gta02.c | 19 ++++++++++++++-----
drivers/video/smedia3362.c | 6 +++---
2 files changed, 17 insertions(+), 8 deletions(-)
Added: trunk/src/target/u-boot/patches/fix-cpu-input-pulldowns.patch
===================================================================
--- trunk/src/target/u-boot/patches/fix-cpu-input-pulldowns.patch
2008-03-31 17:20:54 UTC (rev 4276)
+++ trunk/src/target/u-boot/patches/fix-cpu-input-pulldowns.patch
2008-03-31 17:44:47 UTC (rev 4277)
@@ -0,0 +1,71 @@
+Index: u-boot/board/neo1973/gta02/gta02.c
+===================================================================
+--- u-boot.orig/board/neo1973/gta02/gta02.c
++++ u-boot/board/neo1973/gta02/gta02.c
+@@ -170,26 +170,35 @@
+ gpio->GPBCON = 0x00155555;
+ gpio->GPBUP = 0x000007FF;
+
++ /* pulldown on "PIO_5" BT module to stop float when unpowered */
+ gpio->GPCCON = 0x55555155;
+- gpio->GPCUP = 0x0000FFFF;
++ gpio->GPCUP = 0x0000FFFF & ~(1 << 5);
+
+ gpio->GPDCON = 0x55555555;
+ gpio->GPDUP = 0x0000FFFF;
+
++ /* pulldown on GPE11 / SPIMISO0 - goes to debug board and will float */
+ gpio->GPECON = 0xAAAAAAAA;
+- gpio->GPEUP = 0x0000FFFF;
++ gpio->GPEUP = 0x0000FFFF & ~(1 << 11);
+
++ /* pulldown on GPF03: TP-4705+debug - debug conn will float */
+ gpio->GPFCON = 0x0000AAAA;
+- gpio->GPFUP = 0x000000FF;
++ gpio->GPFUP = 0x000000FF & ~(1 << 3);
+
+ gpio->GPGCON = 0x01AAFE79;
+ gpio->GPGUP = 0x0000FFFF;
+
++ /* pulldown on GPH08: UEXTCLK, just floats!
++ * pulldown GPH0 -- nCTS0 / RTS_MODEM -- floats when GSM off
++ * pulldown GPH3 -- RXD[0] / TX_MODEM -- floats when GSM off
++ */
+ gpio->GPHCON = 0x001AAAAA;
+- gpio->GPHUP = 0x000007FF;
++ gpio->GPHUP = 0x000007FF & ~(1 << 8) & ~(1 << 0) & ~(1 << 3);
+
++ /* pulldown on GPJ00: input, just floats! */
++ /* pulldown on GPJ07: WLAN module WLAN_GPIO0, no ext pull */
+ gpio->GPJCON = 0x1551544;
+- gpio->GPJUP = 0x1ffff;
++ gpio->GPJUP = 0x1ffff & ~(1 << 0) & ~(1 << 7);
+ gpio->GPJDAT |= (1 << 4) | (1 << 6);
+ /* Set GPJ4 to high (nGSM_EN) */
+ /* Set GPJ6 to high (nDL_GSM) */
+Index: u-boot/drivers/video/smedia3362.c
+===================================================================
+--- u-boot.orig/drivers/video/smedia3362.c
++++ u-boot/drivers/video/smedia3362.c
+@@ -95,7 +95,7 @@
+ 0x2020, 0x3650, 0x0002, 0x01FF, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x000D, 0x000B, 0x00EE, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+- 0x1839, 0x0000, 0x2000, 0x0101, 0x0100, 0x0000, 0x0000, 0x0000,
++ 0x1839, 0x0000, 0x2000, 0x0001 /*0101*/, 0x0100, 0x0000, 0x0000, 0x0000,
+ 0x05DB, 0x5231, 0x09C3, 0x8261, 0x0003, 0x0000, 0x0000, 0x0000,
+ 0x000F, 0x101E, 0xC0C3, 0x101E, 0x000F, 0x0001, 0x030F, 0x020F,
+ 0x080F, 0x0F0F
+@@ -118,10 +118,10 @@
+ 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0,
+ 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0,
+ 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0,
+- 0x0873, 0xAFAF, 0x0108, 0x0010, 0x0000, 0x0000, 0x0000, 0x0000,
++ 0x0c74, 0xAFAF, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x1002, 0x6006, 0x00FF, 0x0001, 0x0020, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+- 0x3210, 0x5432, 0xE100, 0x01D6
++ 0x3210, 0x5432, 0xE100, 0x00d6/*0x01D6 */
+ };
+
+ #define glamofb_cmdq_empty() (glamo_reg_read(GLAMO_REGOFS_LCD + \
Modified: trunk/src/target/u-boot/patches/series
===================================================================
--- trunk/src/target/u-boot/patches/series 2008-03-31 17:20:54 UTC (rev
4276)
+++ trunk/src/target/u-boot/patches/series 2008-03-31 17:44:47 UTC (rev
4277)
@@ -93,6 +93,9 @@
# fix and improve power management
dont-smoke.patch
+# use pull-downs to keep unused inputs from floating
+fix-cpu-input-pulldowns.patch
+
# Experimental.
gpb-shadow.patch
wait-for-power.patch
--- End Message ---
--- Begin Message ---
Author: werner
Date: 2008-04-01 01:28:30 +0200 (Tue, 01 Apr 2008)
New Revision: 4278
Added:
trunk/src/target/u-boot/patches/uboot-add-rev-detection.patch
Modified:
trunk/src/target/u-boot/patches/series
trunk/src/target/u-boot/patches/wait-for-power.patch
Log:
series, uboot-add-rev-detection.patch:
- board/neo1973/gta02/gta02.c: added support for hardware-assisted detection of
board revision
wait-for-power.patch: updated for above changes
Modified: trunk/src/target/u-boot/patches/series
===================================================================
--- trunk/src/target/u-boot/patches/series 2008-03-31 17:44:47 UTC (rev
4277)
+++ trunk/src/target/u-boot/patches/series 2008-03-31 23:28:30 UTC (rev
4278)
@@ -96,6 +96,9 @@
# use pull-downs to keep unused inputs from floating
fix-cpu-input-pulldowns.patch
+# make u-boot revision-agnostic (for GTA02v5 and above)
+uboot-add-rev-detection.patch
+
# Experimental.
gpb-shadow.patch
wait-for-power.patch
Added: trunk/src/target/u-boot/patches/uboot-add-rev-detection.patch
===================================================================
--- trunk/src/target/u-boot/patches/uboot-add-rev-detection.patch
2008-03-31 17:44:47 UTC (rev 4277)
+++ trunk/src/target/u-boot/patches/uboot-add-rev-detection.patch
2008-03-31 23:28:30 UTC (rev 4278)
@@ -0,0 +1,131 @@
+uboot-add-rev-detection.patch
+
+GTA02 A6+ has board rev detection capability, provide
+ int gta02_get_pcb_revision(void)
+which returns
+
+b9 b8 b2 b1 b0
+GPD4 GPD3 GPD0 GPC15 GPC13
+
+GTA02 A5 and before: 0x000
+GTA02 A6 : 0x101
+
+Also create pcb_rev in the environment, which contains, eg, 0x101 and
+can be passed into the operating system on the commandline. For linux
+this can then be seen from userspace by
+
+cat /proc/cmdline
+
+Signed-off-by: Andy Green <[EMAIL PROTECTED]>
+---
+
+ board/neo1973/gta02/gta02.c | 73 ++++++++++++++++++++++++++++++++++++++++++-
+ 1 files changed, 72 insertions(+), 1 deletions(-)
+
+Index: u-boot/board/neo1973/gta02/gta02.c
+===================================================================
+--- u-boot.orig/board/neo1973/gta02/gta02.c
++++ u-boot/board/neo1973/gta02/gta02.c
+@@ -68,6 +68,8 @@
+ extern unsigned char booted_from_nor;
+ extern int nobootdelay;
+
++int gta02_get_pcb_revision(void);
++
+ static inline void delay (unsigned long loops)
+ {
+ __asm__ volatile ("1:\n"
+@@ -170,12 +172,25 @@
+ gpio->GPBCON = 0x00155555;
+ gpio->GPBUP = 0x000007FF;
+
+- /* pulldown on "PIO_5" BT module to stop float when unpowered */
++ /*
++ * PCB rev index found on C13, C15, D0, D3 and D4. These are NC or
++ * pulled up by 10K. Therefore to ensure no current flows when they
++ * are not interrogated, we drive them high. When we interrogate them
++ * we make them pulled them down inputs briefly and set them high op
++ * again afterwards.
++ */
++
++ /* pulldown on "PIO_5" BT module to stop float when unpowered
++ * C13 and C15 are b0 and b1 of PCB rev index
++ */
+ gpio->GPCCON = 0x55555155;
+ gpio->GPCUP = 0x0000FFFF & ~(1 << 5);
++ gpio->GPCDAT |= (1 << 13) | (1 << 15); /* index detect -> hi */
+
++ /* D0, D3 and D4 are b2, b3 and b4 of PCB rev index */
+ gpio->GPDCON = 0x55555555;
+ gpio->GPDUP = 0x0000FFFF;
++ gpio->GPDDAT |= (1 << 0) | (1 << 3) | (1 << 4); /* index detect -> hi */
+
+ /* pulldown on GPE11 / SPIMISO0 - goes to debug board and will float */
+ gpio->GPECON = 0xAAAAAAAA;
+@@ -245,6 +260,12 @@
+ char buf[32];
+ int menu_vote = 0; /* <= 0: no, > 0: yes */
+ int seconds = 0;
++ int rev = gta02_get_pcb_revision();
++
++ printf("PCB rev: 0x%03X\n", rev);
++ /* expose in the env so we can add to kernel commandline */
++ sprintf(buf, "0x%03X", rev);
++ setenv("pcb_rev", buf);
+
+ /* Initialize the Power Management Unit with a safe register set */
+ pcf50633_init();
+@@ -521,3 +542,53 @@
+ else
+ gpio->GPBDAT &= ~(1 << led);
+ }
++
++/**
++ * returns PCB revision information in b9,b8 and b2,b1,b0
++ * Pre-GTA02 A6 returns 0x000
++ * GTA02 A6 returns 0x101
++ */
++
++int gta02_get_pcb_revision(void)
++{
++ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO();
++ int n;
++ u32 u;
++
++ /* make C13 and C15 pulled-down inputs */
++ gpio->GPCCON &= ~0xcc000000;
++ gpio->GPCUP &= ~((1 << 13) | (1 << 15));
++ /* D0, D3 and D4 pulled-down inputs */
++ gpio->GPDCON &= ~0x000003c3;
++ gpio->GPDUP &= ~((1 << 0) | (1 << 3) | (1 << 4));
++
++ /* delay after changing pulldowns */
++ u = gpio->GPCDAT;
++ u = gpio->GPDDAT;
++
++ /* read the version info */
++ u = gpio->GPCDAT;
++ n = (u >> (13 - 0)) & 0x001;
++ n |= (u >> (15 - 1)) & 0x002;
++ u = gpio->GPDDAT;
++ n |= (u << (0 + 2)) & 0x004;
++
++ n |= (u << (8 - 3)) & 0x100;
++ n |= (u << (9 - 4)) & 0x200;
++
++ /*
++ * when not being interrogated, all of the revision GPIO
++ * are set to output HIGH without pulldown so no current flows
++ * if they are NC or pulled up.
++ */
++ /* make C13 and C15 high ouputs with no pulldowns */
++ gpio->GPCCON |= 0x44000000;
++ gpio->GPCUP |= (1 << 13) | (1 << 15);
++ gpio->GPCDAT |= (1 << 13) | (1 << 15);
++ /* D0, D3 and D4 high ouputs with no pulldowns */
++ gpio->GPDCON |= 0x00000141;
++ gpio->GPDUP |= (1 << 0) | (1 << 3) | (1 << 4);
++ gpio->GPDDAT |= (1 << 0) | (1 << 3) | (1 << 4);
++
++ return n;
++}
Modified: trunk/src/target/u-boot/patches/wait-for-power.patch
===================================================================
--- trunk/src/target/u-boot/patches/wait-for-power.patch 2008-03-31
17:44:47 UTC (rev 4277)
+++ trunk/src/target/u-boot/patches/wait-for-power.patch 2008-03-31
23:28:30 UTC (rev 4278)
@@ -39,7 +39,7 @@
unsigned int neo1973_wakeup_cause;
extern unsigned char booted_from_nand;
extern unsigned char booted_from_nor;
-@@ -229,6 +234,42 @@
+@@ -254,6 +259,42 @@
return 0;
}
@@ -82,15 +82,15 @@
int board_late_init(void)
{
S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO();
-@@ -236,6 +277,7 @@
+@@ -261,6 +302,7 @@
char buf[32];
int menu_vote = 0; /* <= 0: no, > 0: yes */
int seconds = 0;
+ int enter_bootmenu;
+ int rev = gta02_get_pcb_revision();
- /* Initialize the Power Management Unit with a safe register set */
- pcf50633_init();
-@@ -244,12 +286,13 @@
+ printf("PCB rev: 0x%03X\n", rev);
+@@ -275,12 +317,13 @@
int1 = pcf50633_reg_read(PCF50633_REG_INT1);
int2 = pcf50633_reg_read(PCF50633_REG_INT2);
@@ -106,7 +106,7 @@
neo1973_vibrator(0);
#if defined(CONFIG_ARCH_GTA02_v1)
-@@ -311,9 +354,15 @@
+@@ -342,9 +385,15 @@
neo1973_poweroff();
continue_boot:
@@ -122,7 +122,7 @@
#if 0
{
-@@ -324,7 +373,7 @@
+@@ -355,7 +404,7 @@
}
#endif
--- End Message ---
--- Begin Message ---
Author: werner
Date: 2008-04-01 01:31:02 +0200 (Tue, 01 Apr 2008)
New Revision: 4279
Modified:
trunk/src/target/u-boot/patches/uboot-add-rev-detection.patch
Log:
GTA02v6 is 0x001, not 0x101 (R1549 is NC).
Modified: trunk/src/target/u-boot/patches/uboot-add-rev-detection.patch
===================================================================
--- trunk/src/target/u-boot/patches/uboot-add-rev-detection.patch
2008-03-31 23:28:30 UTC (rev 4278)
+++ trunk/src/target/u-boot/patches/uboot-add-rev-detection.patch
2008-03-31 23:31:02 UTC (rev 4279)
@@ -8,7 +8,7 @@
GPD4 GPD3 GPD0 GPC15 GPC13
GTA02 A5 and before: 0x000
-GTA02 A6 : 0x101
+GTA02 A6 : 0x001
Also create pcb_rev in the environment, which contains, eg, 0x101 and
can be passed into the operating system on the commandline. For linux
--- End Message ---
--- Begin Message ---
Author: werner
Date: 2008-04-01 03:15:45 +0200 (Tue, 01 Apr 2008)
New Revision: 4280
Modified:
developers/werner/bin/lab4
developers/werner/bin/moko-env
Log:
- lab4: my u-boot is now also in 2624/
- moko-env: fixed PATH
- moko-env: source additional more stuff from svn.internal.openmoko.org
Modified: developers/werner/bin/lab4
===================================================================
--- developers/werner/bin/lab4 2008-03-31 23:31:02 UTC (rev 4279)
+++ developers/werner/bin/lab4 2008-04-01 01:15:45 UTC (rev 4280)
@@ -1,6 +1,6 @@
#!/bin/sh
-DIR=/home/moko/fr/u-boot
+DIR=/home/moko/2624/u-boot
FONT=6x10
HOST=${SET_HOST:-lab}
Modified: developers/werner/bin/moko-env
===================================================================
--- developers/werner/bin/moko-env 2008-03-31 23:31:02 UTC (rev 4279)
+++ developers/werner/bin/moko-env 2008-04-01 01:15:45 UTC (rev 4280)
@@ -6,4 +6,5 @@
export UBOOT_DIR=/home/moko/2624/u-boot
PATH=$PATH:/usr/local/openmoko/arm/bin
PATH=$PATH:$UBOOT_DIR/tools
-PATH=$PATH:$SVN/developers/werner/moko-env
+PATH=$PATH:$SVN/developers/werner/bin
+. /home/moko/svn.internal.openmoko.org/developer/werner/bin/moko-env
--- End Message ---
--- Begin Message ---
Author: werner
Date: 2008-04-01 03:16:55 +0200 (Tue, 01 Apr 2008)
New Revision: 4281
Modified:
developers/werner/svnlogdir
Log:
If we can't parse the output, just warn, don't fail.
Modified: developers/werner/svnlogdir
===================================================================
--- developers/werner/svnlogdir 2008-04-01 01:15:45 UTC (rev 4280)
+++ developers/werner/svnlogdir 2008-04-01 01:16:55 UTC (rev 4281)
@@ -39,7 +39,7 @@
$f[$1] = $file;
}
}
- die if length $s;
+ warn if length $s;
close PIPE;
}
--- End Message ---
--- Begin Message ---
Author: werner
Date: 2008-04-01 03:53:34 +0200 (Tue, 01 Apr 2008)
New Revision: 4282
Added:
trunk/src/target/u-boot/patches/config-gta02v5-beyond.patch
Modified:
trunk/src/target/u-boot/patches/gpb-shadow.patch
trunk/src/target/u-boot/patches/series
trunk/src/target/u-boot/patches/wait-for-power.patch
Log:
This set of changes makes u-boot detect hardware revisions >= GTA02v5 at run
time instead of build time. The revision tag and the boot prompt are adjusted
accordingly.
Note that new code should use gta02_revision for feature tests, not
CONFIG_GTA02_REVISION !
For backward-compatibility, "make gta02v6_config" is still supported (and
yields exactly the same result as "make gta02v5_config".
config-gta02v5-beyond.patch:
- Makefile: gta02v6_config choice was missing
- board/neo1973/gta02/split_by_variant.sh: gta02v6_config is identical to
gta02v5_config
- board/neo1973/gta02/gta02.c (board_late_init): removed revision handing to
new function set_revision
- include/configs/neo1973_gta02.h, board/neo1973/gta02/gta02.c (CFG_PROMPT):
CFG_PROMPT now points to a variable set in set_revision
- board/neo1973/gta02/gta02.c (gta02_revision): new global variable to replace
CONFIG_GTA02_REVISION
- board/neo1973/gta02/gta02.c (get_board_rev): use gta02_revision instead of
CONFIG_GTA02_REVISION
- board/neo1973/gta02/gta02.c (gta02_get_pcb_revision): GTA02v6 code is 0x01,
not 0x101
- drivers/usb/usbdfu.c (dfu_trailer_matching): use the compile-time revision
CONFIG_USB_DFU_REVISION instead of the run-time revision get_board_rev()
- board/neo1973/gta01/split_by_variant.sh,
board/neo1973/gta02/split_by_variant.sh: add definitions in $CFGTMP also to
$CFGINC
gpb-shadow.patch, wait-for-power.patch: updated for context changes
Added: trunk/src/target/u-boot/patches/config-gta02v5-beyond.patch
===================================================================
--- trunk/src/target/u-boot/patches/config-gta02v5-beyond.patch 2008-04-01
01:16:55 UTC (rev 4281)
+++ trunk/src/target/u-boot/patches/config-gta02v5-beyond.patch 2008-04-01
01:53:34 UTC (rev 4282)
@@ -0,0 +1,197 @@
+This set of changes makes u-boot detect hardware revisions >= GTA02v5 at run
+time instead of build time. The revision tag and the boot prompt are adjusted
+accordingly.
+
+Note that new code should use gta02_revision for feature tests, not
+CONFIG_GTA02_REVISION !
+
+For backward-compatibility, "make gta02v6_config" is still supported (and
+yields exactly the same result as "make gta02v5_config".
+
+Index: u-boot/Makefile
+===================================================================
+--- u-boot.orig/Makefile
++++ u-boot/Makefile
+@@ -2437,7 +2437,8 @@
+ gta02v2_config \
+ gta02v3_config \
+ gta02v4_config \
+-gta02v5_config: unconfig
++gta02v5_config \
++gta02v6_config: unconfig
+ @sh board/neo1973/gta02/split_by_variant.sh $@
+
+ gta01_config \
+Index: u-boot/board/neo1973/gta02/gta02.c
+===================================================================
+--- u-boot.orig/board/neo1973/gta02/gta02.c
++++ u-boot/board/neo1973/gta02/gta02.c
+@@ -67,6 +67,13 @@
+ extern unsigned char booted_from_nand;
+ extern unsigned char booted_from_nor;
+ extern int nobootdelay;
++char __cfg_prompt[20] = "GTA02vXX # ";
++
++/*
++ * In >GTA02v5, use gta02_revision to test for features, not
++ * CONFIG_GTA02_REVISION or CONFIG_ARCH_GTA02_vX !
++ */
++int gta02_revision;
+
+ int gta02_get_pcb_revision(void);
+
+@@ -253,6 +260,37 @@
+ return 0;
+ }
+
++static void set_revision(void)
++{
++ int rev = gta02_get_pcb_revision();
++ char buf[32];
++
++ if (CONFIG_GTA02_REVISION < 5)
++ gta02_revision = CONFIG_GTA02_REVISION;
++ else {
++ switch (rev) {
++ case 0x000:
++ gta02_revision = 5;
++ break;
++ case 0x001:
++ gta02_revision = 6;
++ break;
++ default:
++ printf("Unrecognized hardware revision 0x%03x. "
++ "Defaulting to GTA02v6.\n", rev);
++ gta02_revision = 6;
++ }
++ }
++ sprintf(__cfg_prompt, "GTA02v%d # ", gta02_revision);
++
++#if 1 /* remove these after checking that Andy doesn't need them anymore */
++ printf("PCB rev: 0x%03X\n", rev);
++ /* expose in the env so we can add to kernel commandline */
++ sprintf(buf, "0x%03X", rev);
++ setenv("pcb_rev", buf);
++#endif
++}
++
+ int board_late_init(void)
+ {
+ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO();
+@@ -260,12 +298,8 @@
+ char buf[32];
+ int menu_vote = 0; /* <= 0: no, > 0: yes */
+ int seconds = 0;
+- int rev = gta02_get_pcb_revision();
+
+- printf("PCB rev: 0x%03X\n", rev);
+- /* expose in the env so we can add to kernel commandline */
+- sprintf(buf, "0x%03X", rev);
+- setenv("pcb_rev", buf);
++ set_revision();
+
+ /* Initialize the Power Management Unit with a safe register set */
+ pcf50633_init();
+@@ -378,7 +412,7 @@
+
+ u_int32_t get_board_rev(void)
+ {
+- return 0x300+0x10*CONFIG_GTA02_REVISION;
++ return 0x300+0x10*gta02_revision;
+ }
+
+ void neo1973_poweroff(void)
+@@ -546,7 +580,7 @@
+ /**
+ * returns PCB revision information in b9,b8 and b2,b1,b0
+ * Pre-GTA02 A6 returns 0x000
+- * GTA02 A6 returns 0x101
++ * GTA02 A6 returns 0x001
+ */
+
+ int gta02_get_pcb_revision(void)
+Index: u-boot/board/neo1973/gta02/split_by_variant.sh
+===================================================================
+--- u-boot.orig/board/neo1973/gta02/split_by_variant.sh
++++ u-boot/board/neo1973/gta02/split_by_variant.sh
+@@ -42,19 +42,12 @@
+ echo "CONFIG_USB_DFU_REVISION=0x0340" > $CFGTMP
+ ;;
+
+- gta02v5_config)
++ gta02v5_config|gta02v6_config)
+ echo "#define CONFIG_ARCH_GTA02_v5" > $CFGINC
+ echo "#define CONFIG_GTA02_REVISION 5" >> $CFGINC
+ echo "CONFIG_USB_DFU_REVISION=0x0350" > $CFGTMP
+ ;;
+
+- gta02v6_config)
+- echo "#define CONFIG_ARCH_GTA02_v6" > $CFGINC
+- echo "#define CONFIG_GTA02_REVISION 6" >> $CFGINC
+- echo "CONFIG_USB_DFU_REVISION=0x0360" > $CFGTMP
+- ;;
+-
+-
+ *)
+ echo "$0:: Unrecognised config - using GTA02v5 config"
+ echo "#define CONFIG_ARCH_GTA02_v5" > $CFGINC
+@@ -65,6 +58,7 @@
+ esac
+
+ fi
++sed 's/^/#define /;s/=/ /' <$CFGTMP >>$CFGINC
+ # ---------------------------------------------------------
+ # Complete the configuration
+ # ---------------------------------------------------------
+Index: u-boot/include/configs/neo1973_gta02.h
+===================================================================
+--- u-boot.orig/include/configs/neo1973_gta02.h
++++ u-boot/include/configs/neo1973_gta02.h
+@@ -127,8 +127,12 @@
+
+ #define STRINGIFY(s) DO_STRINGIFY(s) /* expand the argument */
+ #define DO_STRINGIFY(s) #s /* quote it */
+-#define CFG_PROMPT "GTA02v"
STRINGIFY(CONFIG_GTA02_REVISION) " # "
++#define CFG_PROMPT __cfg_prompt
+ /* Monitor Command Prompt */
++#ifndef __ASSEMBLY__
++extern char __cfg_prompt[20];
++#endif
++
+ #if defined(CONFIG_ARCH_GTA02_v1)
+ #define CONFIG_S3C2440 1 /* SAMSUNG S3C2440 SoC
*/
+ #else
+@@ -293,4 +297,8 @@
+
+ #define DFU_NUM_ALTERNATES 7
+
++#ifndef __ASSEMBLY__
++extern int gta02_revision; /* use this instead of CONFIG_GTA02_REVISION */
++#endif
++
+ #endif /* __CONFIG_H */
+Index: u-boot/drivers/usb/usbdfu.c
+===================================================================
+--- u-boot.orig/drivers/usb/usbdfu.c
++++ u-boot/drivers/usb/usbdfu.c
+@@ -101,7 +101,7 @@
+ trailer->product != CONFIG_USBD_PRODUCTID_GSERIAL))
+ return 0;
+ #ifdef CONFIG_REVISION_TAG
+- if (trailer->revision != get_board_rev())
++ if (trailer->revision != CONFIG_USB_DFU_REVISION)
+ return 0;
+ #endif
+
+Index: u-boot/board/neo1973/gta01/split_by_variant.sh
+===================================================================
+--- u-boot.orig/board/neo1973/gta01/split_by_variant.sh
++++ u-boot/board/neo1973/gta01/split_by_variant.sh
+@@ -58,6 +58,7 @@
+ esac
+
+ fi
++sed 's/^/#define /;s/=/ /' <$CFGTMP >>$CFGINC
+ # ---------------------------------------------------------
+ # Complete the configuration
+ # ---------------------------------------------------------
Modified: trunk/src/target/u-boot/patches/gpb-shadow.patch
===================================================================
--- trunk/src/target/u-boot/patches/gpb-shadow.patch 2008-04-01 01:16:55 UTC
(rev 4281)
+++ trunk/src/target/u-boot/patches/gpb-shadow.patch 2008-04-01 01:53:34 UTC
(rev 4282)
@@ -8,15 +8,16 @@
===================================================================
--- u-boot.orig/board/neo1973/gta02/gta02.c
+++ u-boot/board/neo1973/gta02/gta02.c
-@@ -67,6 +67,7 @@
- extern unsigned char booted_from_nand;
- extern unsigned char booted_from_nor;
- extern int nobootdelay;
+@@ -75,6 +75,8 @@
+ */
+ int gta02_revision;
+
+static uint16_t gpb_shadow = 0; /* to work around GTA02v5 LED bug */
++
+ int gta02_get_pcb_revision(void);
static inline void delay (unsigned long loops)
- {
-@@ -388,6 +389,7 @@
+@@ -452,6 +454,7 @@
#else
gpio->GPBDAT &= ~(1 << 3); /* GPB3 */
#endif
@@ -24,7 +25,7 @@
}
void neo1973_gsm(int on)
-@@ -507,8 +509,12 @@
+@@ -571,10 +574,14 @@
if (led > 2)
return;
@@ -41,3 +42,5 @@
+ gpio->GPBDAT = (gpio->GPBDAT | gpb_shadow) & ~(1 << led);
+ }
}
+
+ /**
Modified: trunk/src/target/u-boot/patches/series
===================================================================
--- trunk/src/target/u-boot/patches/series 2008-04-01 01:16:55 UTC (rev
4281)
+++ trunk/src/target/u-boot/patches/series 2008-04-01 01:53:34 UTC (rev
4282)
@@ -98,6 +98,7 @@
# make u-boot revision-agnostic (for GTA02v5 and above)
uboot-add-rev-detection.patch
+config-gta02v5-beyond.patch
# Experimental.
gpb-shadow.patch
Modified: trunk/src/target/u-boot/patches/wait-for-power.patch
===================================================================
--- trunk/src/target/u-boot/patches/wait-for-power.patch 2008-04-01
01:16:55 UTC (rev 4281)
+++ trunk/src/target/u-boot/patches/wait-for-power.patch 2008-04-01
01:53:34 UTC (rev 4282)
@@ -39,8 +39,8 @@
unsigned int neo1973_wakeup_cause;
extern unsigned char booted_from_nand;
extern unsigned char booted_from_nor;
-@@ -254,6 +259,42 @@
- return 0;
+@@ -293,6 +298,42 @@
+ #endif
}
+static void poll_charger(void)
@@ -82,15 +82,15 @@
int board_late_init(void)
{
S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO();
-@@ -261,6 +302,7 @@
+@@ -300,6 +341,7 @@
char buf[32];
int menu_vote = 0; /* <= 0: no, > 0: yes */
int seconds = 0;
+ int enter_bootmenu;
- int rev = gta02_get_pcb_revision();
- printf("PCB rev: 0x%03X\n", rev);
-@@ -275,12 +317,13 @@
+ set_revision();
+
+@@ -310,12 +352,13 @@
int1 = pcf50633_reg_read(PCF50633_REG_INT1);
int2 = pcf50633_reg_read(PCF50633_REG_INT2);
@@ -106,7 +106,7 @@
neo1973_vibrator(0);
#if defined(CONFIG_ARCH_GTA02_v1)
-@@ -342,9 +385,15 @@
+@@ -377,9 +420,15 @@
neo1973_poweroff();
continue_boot:
@@ -122,7 +122,7 @@
#if 0
{
-@@ -355,7 +404,7 @@
+@@ -390,7 +439,7 @@
}
#endif
--- End Message ---
_______________________________________________
commitlog mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/commitlog