On ext2 the symlink can be stored in inode itself if it's not larger than
60 bytes. If the symlink path is exactly 60 bytes, then one more byte is
needed to store terminating NULL, therefore the path is placed in a
separate block.
The PMU initializes all GPIOs to inputs in NoPower, including GPIO2,
which drives GSM_ON and has an external pull-up. Furthermore, we may
have entered PMU.Standby with the modem up.
Unlike u-boot, qi didn't initialize the GPIOs. With this patch is
does.
Reported-by: Paul Ferster <fercerpav@gmail.com>
Signed-off-by: Werner Almesberger <werner@openmoko.org>
On the devices where we have only 2 physical buttons, one of those buttons
(i.e. POWER) is connected directly to PMU. The other button (AUX) is
connected directly to S3C pin and we can get its state immediately, it is
currently used to skip a boot possibility. To allow user to debug boot
problems we can use the POWER button, but we cannot poll for it too many
times as it slows down the boot considerably, therefore a dedicated
function is needed.
Finally all the restructuring pays off: we can cleanly separate the
uImage loader from all the rest, which will make it easy to add
loaders for other kernel image formats.
Signed-off-by: Werner Almesberger <werner@openmoko.org>
This makes things a little easier to read, particularly when we return
this pointer from a function, which we'll do in the next patch.
Signed-off-by: Werner Almesberger <werner@openmoko.org>
Is it really correct to set last_block_init to the next entry ?
It would seem that the current (i.e., bogus) values are then just
used without further ado. Untested.
Not-Yet-Signed-off-by: Werner Almesberger <werner@openmoko.org>
Putting a space between a function name and the parenthesis following
it ain't the One True K&R Way.
Signed-off-by: Werner Almesberger <werner@openmoko.org>
This puts the loop body in a new function called try_this_kernel.
As an added benefit, we can drop one level of indentation.
This change is hard to read as a patch. It gets better if one just
applies it and then looks at it with "git diff -w" or similar.
Signed-off-by: Werner Almesberger <werner@openmoko.org>
On Ubuntu 8.04.1 there can be spaces inside the initial bracketed
uptime number after a reboot. These spaces disappear once the uptime
is large enough. Therefore, use sed to filter out these spaces so
that the cut command that extracts SD card size will always work.
Signed-off-by: Christopher Hall <hsw@openmoko.com>
There's not enough time between Glamo init (now after pcf50633 init)
and the completion of machine init before we try to use the boot device
in the case of GTA02 and SD boot. So we add rootdelay=1 to the SD
card boot cases
Signed-off-by: Andy Green <andy@openmoko.com>
This patch effectively doubles maximum time allowed for retries performed by
mmc_init. Also, the delay was shortened to lower the average time needed to
init a card. Without it, i was unable to boot from Transcend TS8GUSDHC4
(appending rootdelay=1 was necessary as well).
Change to input / pulldown on most GPIO. With no battery and just
USB power, this gets us into suspend with 9.5mA at 5V consumption... but
Ben Dooks told that we don't put the mDDR into deep sleep yet in the
platform pm code, so this should come right down when we have that.
The suspend is otherwise real though, PWREN to the PMU goes down, and
when we wake the device Qi is able to see it is a resume wake and jumps
back into Linux, where we currently die due to issues on s3c6410 platform
code getting worked on.
Signed-off-by: Andy Green <andy@openmoko.com>
Make sure WLAN module power is off by default - this controls
a P-Channel MOSFET that gates all the power there
Signed-off-by: Andy Green <andy@openmoko.com>
First go at resume processing for 6410, can't test it until Ben Dooks
confirms operation of Linux side on SMDK
Signed-off-by: Andy Green <andy@openmoko.com>
This patch turns on the SYS and BAT monitoring filters, and checks if the battery
meets the BAT OK threshold. If it doesn't, which is the case if the battery is
not present, it disables the "indicator" (eg, LED, vibrator) stuff and holds the
CPU at 200MHz during the boot into Linux.
This allows the GTA02 A6 here to boot with no battery up to the point it is
going to bring up backlight, and this with 100mA limit on USB at PMU. Enabling
the threshold filters for battery and SYS seems to have been critical in
getting any stability with this.
Signed-off-by: Andy Green <andy@openmoko.com>
tty0 is the LCM... this patch changes the defaults so that the kernel
always treats tty0 as a console, but it also sets the loglevel so that
only KERN_ERR or worse will be printed there. With matching changes
to the kernel, most of the noise at KERN_ERR is reduced to KERN_INFO,
so it gets the behviour the LCM by default is not cluttered with
messages unless they are important during boot.
Signed-off-by: Andy Green <andy@openmoko.com>
Allow a board to "indicate" events if it likes on whatever it has
On GTA02 we light AUX during boot and run the vibrator briefly when we
skip a partition or device.
Signed-off-by: Andy Green <andy@openmoko.com>
Despite what the docs say, steppingstone is always resident at
0x40000000 on s3c2442, this patch changes our linker script to
stick all steppingstone code there. The mapping of steppingstone
at 0x0 is broken by OM[] bus change dynamically caused for example
by GTA02 AUX button actuation.
Signed-off-by: Andy Green <andy@openmoko.com>
Recent addition of append and noboot file checks broke NAND
Reported-by: Micael Henriksson <micael.h@gmail.com>
Signed-off-by: Andy Green <andy@openmoko.com>
This adds two features that can be set in the rootfs that Qi is checking.
- if it finds /boot/noboot-<device>, eg /boot/noboot-GTA02 then it will
skip the rootfs for booting and try the next one if any
- if it finds /boot/append-<device>, eg, /boot/append-GTA02 then it will
append the contents of this file to the kernel commandline.
Signed-off-by: Andy Green <andy@openmoko.com>