There was a bug about dealing with last ext2 sector of file
because we failed to return the number of sectors pulled
Signed-off-by: Andy Green <andy@openmoko.com>
This heavily adapts the Samsung U-Boot hs_mmc code and combines it with the
SD / SDHC startup code written for glamo-mci stuff that is known to work OK
with common SD and SDHC.
tla01 is changed to use the implementation.
Signed-off-by: Andy Green <andy@openmoko.com>
We want utils stuffs in steppingstone part, it's too expensive to have
CRC32 in there. Bust it out into its own file that appears only in
everything_else section in second bootloader stage.
Signed-off-by: Andy Green <andy@openmoko.com>
This patch adds a small script that knows how to partition, format and
prepare with a bootloader image an SD Card for usage with SD Card boot
on 6410.
You use it like this:
./6410-partition-sd.sh sde sdhc ./image/qi-s3c6410-andy_495294c60f2f1432
This will prepare your card with three partitions and put the bootloader
images at the end as required by 6410 iROM.
If you put anything on the fourth parameter, it skips the fdisk and the
formatting stages and just updates the bootloader.
Signed-off-by: Andy Green <andy@openmoko.com>
This patch makes qi source structure cpu-centric, and allows multiple CPUs
to be handled with the board definitions inside the CPU dirs.
You have to make a particular CPU version of Qi now, which you can do by
a shell command like this:
make clean ; make CPU=s3c2442 && make CPU=s3c6410
which gets you
$ ls -l image/
total 744
-rwxrwxr-x 1 agreen agreen 25372 2008-10-17 18:25 qi-s3c2442-andy_77c1fcdddc3e2cbf
-rw-rw-r-- 1 agreen agreen 237100 2008-10-17 18:25 qi-s3c2442-andy_77c1fcdddc3e2cbf.dis
-rw-rw-r-- 1 agreen agreen 25388 2008-10-17 18:25 qi-s3c2442-andy_77c1fcdddc3e2cbf.udfu
-rwxrwxr-x 1 agreen agreen 22736 2008-10-17 18:25 qi-s3c6410-andy_77c1fcdddc3e2cbf
-rw-rw-r-- 1 agreen agreen 216294 2008-10-17 18:25 qi-s3c6410-andy_77c1fcdddc3e2cbf.dis
-rw-rw-r-- 1 agreen agreen 22752 2008-10-17 18:25 qi-s3c6410-andy_77c1fcdddc3e2cbf.udfu
The 6410 support in there is enough to send a character "U" on the 6410 SMDK
Because the product naming is not defined, currently the device targeted for 6410
is called "TLA01"
Signed-off-by: Andy Green <andy@openmoko.com>
Before leaving for Linux, gratuitously clear down the totrst / timeout counter
to help stop us dying partway through boot on effective power-off.
In the case we have no battery or battery < ~3V, we still somehow need to do
more in kernel because it can switch itself off more than 8 seconds
after this point.
Signed-off-by: Andy Green <andy@openmoko.com>
Part of the effort to save power during booting so we can do it inside the
500mW budget from un-enumerated USB connection.
Signed-off-by: Andy Green <andy@openmoko.com>
On the last read, master must NAK, on intermediate reads it must ACK.
If you get this wrong, communication with device is screwed even in Linux.
Signed-off-by: Andy Green <andy@openmoko.com>
We need to set a few more things up in pcf50633 to get suspend and resume
to work -- without them suspend actually goes OFF. Take the opportunity
to optimize this init significantly.
Signed-off-by: Andy Green <andy@openmoko.com>
With large SDHC cards, the ext2/3 filesystem put on large partitions
by mkfs.ext2/3 is not how it used to be, it has a dynamic multiplier for
its block addressing. Without these changes, based on a patch by Ryan
Chen
http://lists.denx.de/pipermail/u-boot/2008-July/037786.html
we cannot parse large ext3 filesystem.
Signed-off-by: Andy Green <andy@openmoko.com>
Now cards larger than 4GB are normal, we can't use the byte addressing
internally any more for SDHC type card. This changes us to use block
(512 byte) addressing internally always.
Signed-off-by: Andy Green <andy@openmoko.com>
This patch performs the equivalent init actions to the SDHC slow
unitl first bulk patch in kernel, it allows us to work with large
SDHC cards which exceed Glamo timeout capability at 16MHz for first
access.
Signed-off-by: Andy Green <andy@openmoko.com>
This patch increases the timeout for card initializaton so it works with
8GB Sandisk uSDHC, and adds the size computation for SDHC as well.
Signed-off-by: Andy Green <andy@openmoko.com>
This is the script for gta03 load by openocd. We use the single qi
image for all purposes now so U-Boot lowlevel_foo style crap is dead.
We have to run the first part of init before copying qi image to
TEXT_BASE (0x33000000) because DRAM is not functional until then.
Fixed branchthrough at 0x8 is used as a place to hang the breakpoint.
Signed-off-by: Andy Green <andy@openmoko.com>
This adds capability to use single qi image for JTAG load action as well
as execution from NAND. It requires JTAG script to load the image at
0x0 and 0x33000000 addresses, then set data at 0x04 address to 0xffffffff.
This eliminates the lowlevel_foo stuff from U-Boot world.
Signed-off-by: Andy Green <andy@openmoko.com>