A quick overview of u-boot implementation on the treo 680...
The treo 680 has a Diskonchip G4 nand flash chip. This device has a 2k region
that maps to the system bus at the reset vector in a NOR-like fashion so that it
can be used as the boot device. The phone is shipped with this 2k region
configured as write-protected (can't be modified) and programmed with an initial
program loader (IPL). At power-up, this IPL loads the contents of two flash
blocks to SDRAM and jumps to it. The capacity of the two blocks is not large
enough to hold all of u-boot, so a u-boot SPL is used. To conserve flash space,
these two blocks and the necessary number of subsequent blocks are programmed
with a concatenated spl + u-boot image. That way, the IPL will also load a
portion of u-boot proper, and when the spl runs, it relocates the portion of
u-boot that the IPL has already loaded, and then resumes loading the remaining
part of u-boot before jumping to it.
The default_environment is used (CONFIG_ENV_IS_NOWHERE) because I didn't think
that having a writable environment was worth the cost of a flash block, although
adding it would be straightforward. I abuse the CONFIG_EXTRA_ENV_SETTINGS
option to specify the usbtty for the console (CONFIG_SYS_CONSOLE_IS_IN_ENV).
Support for the LCD is included, but currently it is only useful for displaying
the u-boot splash screen. But if u-boot is built without the usbtty console, it
does display the auto-boot progress nicely.
Signed-off-by: Mike Dunn
---
CREDITS |4 +
MAINTAINERS |3 +
board/palmtreo680/Makefile| 47 +++
board/palmtreo680/flash_u-boot.c | 170 ++
board/palmtreo680/palmtreo680.c | 184 +++
board/palmtreo680/palmtreo680_spl.lds | 69
boards.cfg|1 +
doc/README.palmtreo680| 570 +
include/configs/palmtreo680.h | 307 ++
9 files changed, 1355 insertions(+), 0 deletions(-)
create mode 100644 board/palmtreo680/Makefile
create mode 100644 board/palmtreo680/flash_u-boot.c
create mode 100644 board/palmtreo680/palmtreo680.c
create mode 100644 board/palmtreo680/palmtreo680_spl.lds
create mode 100644 doc/README.palmtreo680
create mode 100644 include/configs/palmtreo680.h
diff --git a/CREDITS b/CREDITS
index 7c1458f..3b657e9 100644
--- a/CREDITS
+++ b/CREDITS
@@ -124,6 +124,10 @@ N: James F. Dougherty
E: j...@gigabitnetworks.com
D: Port to the MOUSSE board
+N: Mike Dunn
+E: miked...@newsguy.com
+D: Palmtreo680 board, docg4 nand flash driver
+
N: Dave Ellis
E: d...@sixnetio.com
D: EEPROM Speedup, SXNI855T port
diff --git a/MAINTAINERS b/MAINTAINERS
index 1614b91..db62af1 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -650,6 +650,9 @@ Wolfgang Denk
imx27lite i.MX27
qongi.MX31
+Mike Dunn
+ palmtreo680 pxa270
+
Kristoffer Ericson
jornada SA1110
diff --git a/board/palmtreo680/Makefile b/board/palmtreo680/Makefile
new file mode 100644
index 000..e729e6a
--- /dev/null
+++ b/board/palmtreo680/Makefile
@@ -0,0 +1,47 @@
+#
+# Palm Treo680 Support
+#
+# Copyright (C) 2013 Mike Dunn
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).o
+
+COBJS := palmtreo680.o
+
+SRCS := $(COBJS:.o=.c)
+OBJS := $(addprefix $(obj),$(COBJS))
+
+$(LIB):$(obj).depend $(OBJS)
+ $(call cmd_link_o_target, $(OBJS))
+
+clean:
+ rm -f $(OBJS)
+
+distclean: clean
+ rm -f $(LIB) core *.bak $(obj).depend
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/palmtreo680/flash_u-boot.c b/board/palmtreo680/flash_u-boot.c
new file mode 100644
index 000..ee4213e
--- /dev/null
+++ b/board/palmtreo680/flash_u-boot.c
@@ -0,0 +1,170 @@
+/*
+ * This file is not part of u-boot. It is a userspace Linux utility that, when
+ * run on the Treo 680, will program u-boot to flash. The docg4 driver *must*
+ * be loaded with the reliable_mode and ignore_badblocks parameters enabl