We have to minimally support DOS partition scheme.
Partitions are counted from 1+ now, and 0 means no
partition table instead of -1.
Signed-off-by: Andy Green <andy@openmoko.com>
We leave a lot of funny clocks up in things like camera unit. This
pares it down to just what we use in Qi.
Signed-off-by: Andy Green <andy@openmoko.com>
Moves various .h into include from drivers
Gets glamo-mmc.h working so we can detect
card ID / Size if the card is plugged in.
Adds FAT / MMC kernel source entry for GTA02 that
is first before the NAND one. When it works it will
favour to boot off SD Card if a kernel is found there, but
right now we don't have a working filesystem parser and
partition handling hooked up.
Signed-off-by: Andy Green <andy@openmoko.com>
Move serial.c into drivers/serial-s3c24xx.c and qi-serial.h into include/serial-s3c24xx.h
making things a bit cleaner for being s3c24xx-specific. This needed a lot of meddling
additionally, ending up with a new puts() callback that belongs in the board structure
and removal of the debug uart member, since the puts() action was the only user.
Also change serial init API name and function to only fix to 115kbps and adapt to
PCLK.
Signed-off-by: Andy Green <andy@openmoko.com>
Introduce generic bitbang I2C system, and a s3c24xx-specific implementation of
it that knows which GPIO pins and how to control them.
The generic bitbang stuff exposes synchronous (ie, it will return when it is
done) and asynchronous read and write APIs, allowing the delay between bits to
be hidden in other slow, looping code if necessary.
Signed-off-by: Andy Green <andy@openmoko.com>
Create ./src/drivers and move s3c24xx mmc thing in there with more
specific name. Move fat.h into ./include
Signed-off-by: Andy Green <andy@openmoko.com>
Giant patch:
- renames everything from kboot to qi
- changes filenames accordingly in several places
- fixes the linker script so stuff that does not execute
from steppingstone context has real linked addresses
in the relocated region, it means all code and pointers
work now outside first 4KBytes
- adds src/gta02/gta02.c to contain board-specific init and
other functions
- adds sophisticated structs to define most features in the
board-specific files, including board type detection,
board revision detection, and multiple kernel source
definition (NAND, SD FAT, SD ext2, etc), including auto
sequencing of trying the kernel sources in order (filesystems
and partition support not done yet)
- GTA02 detects itself by NOR presence and reports A5 / A6
- commandlines for kernel also come from board-specific
kernel source definitions so correct kernel commandlines
are provided depending on boot device -- on GTA02 now
boots NAND kernel into NAND jffs2 filesystem
- CRC32 is checked on loaded kernel image to make sure we
know about corruption in bootloader
Signed-off-by: Andy Green <andy@openmoko.com>
Huge patch boils down massive kernel image parsing and boot action
to a modest sequence of code that actually boots the kernel.
Signed-off-by: Andy Green <andy@openmoko.com>
NAND stuff wasn't going to do anything until the controller in
the CPU was reset. NAND code was cleaned and other minor meddlings
Signed-off-by: Andy Green <andy@openmoko.com>
Start meddling with linkser script, more changes came later
that actually got it working by pushing all .rodata into first
4K so the linked addresses matched reality even when ran from
the SDRAM copy.
Signed-off-by: Andy Green <andy@openmoko.com>
Add various debugging code for serial, this got changed around a
lot in subsequent patches and printk() / vsprintf() was taken out
in the end.
Signed-off-by: Andy Green <andy@openmoko.com>