9
0
Fork 0
Commit Graph

6578 Commits

Author SHA1 Message Date
Robert Jarzmik ff79f7a41c arm/mach-pxa: add mioa701 board
Add Mitac MioA701 board initial support.
The support provides basic boot and :
 - a console over USB (serial gadget).
 - the SD card support
 - the MTD docg3 support
 - the LCD support

Add a check in the default environment for a barebox.env
file on the first partition (FAT). If the file exists,
source it instead of the normal boot procedure.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-29 08:28:20 +01:00
Robert Jarzmik f67fc4fb7a drivers/serial: trivial regression fix
Fix commit "serial pxa: fix unregister", which forgot a
semicolon, breaking serial_pxa compilation.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-29 08:28:20 +01:00
Sascha Hauer cb1bd905dc ARM: get runtime offset of board_init_lowlevel_return by using separate section
We used to get the runtime offset of the board_init_lowlevel_return
by doing a &board_init_lowlevel_return. This does not work in thumb-2
mode, so use a separate linker section for this function instead.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-28 09:55:04 +01:00
Sascha Hauer 2c2d00a281 ARM: move exception vectors away from start of binary
Traditionally U-Boot and barebox have the exception vectors at
the start of the binary. There is no real reason in doing so,
because in the majority of cases this data will not be at 0x0
where it could be used as vectors directly anyway.
This patch puts the vectors into a separate linker section and
defines an head function which is placed at the start of the
image instead. Putting this in a separate function also has
the advantage that it can be placed at the start of images
which require an additional header like several Freescale i.MX
images. As the head function contains the barebox arm magic
those images can now also be detected as barebox images.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-28 09:55:02 +01:00
Sascha Hauer 4bab39e7b6 remove unused variable from struct driver_d
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-27 20:28:10 +01:00
Sascha Hauer 33d1cc4bf2 commands: remove struct command pointer from commands
This is unused in all commands and thus can be removed.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-27 20:28:07 +01:00
Sascha Hauer bb2a1ea60c ARM boot[zu]: return COMMAND_ERROR_USAGE instead of calling barebox_cmd_usage
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-27 20:08:09 +01:00
Sascha Hauer d59925b8fb command: do not allow abbreviated commands anymore
abbreviated commands are derived from U-Boot and are only
partly useful. Noone expects from a shell to support this,
also we have tab completion. They also have some funny
side effects. For example we have a 'time' command. If this
command is not compiled in, the time command is interpreted
as an abbreviated version of the 'timeout' command. So remove
support for abbreviated commands and safe the binary space.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-27 20:08:09 +01:00
Eric Bénard 5c50423b70 mx53-loco: update defconfig
Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-27 19:58:23 +01:00
Eric Bénard 96ecdf0a46 mx53-loco: add board revision support
- this is taken from freescale-mx35-3-stack/3stack.c and allows
this board to run Freescale's kernel which relies on the system
revision to configure the correct PMIC.

- On rev0 boards (with DA9053), the log is :
detected i.MX53 rev 2.1
MCIMX53-START board 1.0

On newer boards (rev A or B with MC34708), the log is :
mc34708-i2c@mc34708-i2c0: MC34708 ID: 0x0014
detected i.MX53 rev 2.1
MCIMX53-START-R board 1.0 rev B

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-27 19:58:22 +01:00
Eric Bénard 77649c1857 mx53-loco: add i2c support
and register mc34708 which is present on MCIMX53-START-R board

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-27 19:58:22 +01:00
Eric Bénard 1270b11d95 i.MX53: enable pull up on I2C0 pins
this allows I2C to work on boards which don't have external pull up
(like LOCO board)

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-27 19:58:22 +01:00
Eric Bénard e27e6a24b8 i.MX53: add silicon revision functions
Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-27 19:58:22 +01:00
Eric Bénard 9559018646 mfd: add mc34708 driver
this driver is a copie of the mc13892 one

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-27 19:58:22 +01:00
Eric Bénard 64be852b89 add i2c clock support
Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-27 19:58:22 +01:00
Lars Poeschel f062e28dc9 Add unaligned.h to sandbox arch
To be able to use the sandbox with fat filesystem support unaligned.h is needed.
It tries to be general in selecting little endian or big endian on a gcc macro.

Signed-off-by: Lars Poeschel <lars@kiwigrid.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-27 19:55:55 +01:00
Asen Chavdarov Dimov 35ccfb9a3d Typo fix in pm9261 init file
Fixing this typo lets the barebox for pm9261 to be build.

Signed-off-by: Asen Chavdarov Dimov <dimov@ronetix.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-27 19:55:00 +01:00
Sascha Hauer 7a61f5db46 cp: fix memory leak
dst is an allocated string, we have to free it also when
copy_file fails.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-27 19:53:52 +01:00
Sascha Hauer aed0e6ba03 getopt: save and restore context
execute_command is the single point where commands are executed and thus a new
getopt context is needed. currently we call getopt_reset here to reset the
context. This breaks though when a command tries to run a command itself by
calling execute_command or run_command.  In this case we have to store the
context and restore it afterwards. The same is necessary in builtin_getopt.
Currently noone does this so this one shouldn't fix a bug, but merely allows
us to do such things later.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-27 19:53:47 +01:00
Sascha Hauer 2034ee47b1 getopt: turn commented out printf into debug()
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-27 19:53:42 +01:00
Sascha Hauer b482dfd612 driver: remove unused type_data field from struct driver_d
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-25 15:16:30 +01:00
Sascha Hauer 78da28d088 net fec_mpc5200: drop type_data usage
Also, clean some whitespace damage.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-25 15:16:30 +01:00
Sascha Hauer 89fe5482e7 net fec_imx: drop type_data usage
Store the private data pointer in dev->priv as it's intended.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-25 15:16:30 +01:00
Sascha Hauer e609cbe1e5 net drivers: remove unused type_data
Many net drivers set dev->type_data without ever using it, so
just remove it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-25 15:16:26 +01:00
Sascha Hauer 67d938b2ea net: use container_of instead of dev->type_data
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-25 15:16:22 +01:00
Sascha Hauer 2c54046510 serial s3c: add a driver private struct
Do not use dev->priv as a register base, but use a driver private
struct instead. Also, remove usage of dev->type_data

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-25 15:16:18 +01:00
Sascha Hauer 6dfb9fec5f serial stm: fix unregister
- Add missing console_unregister call
- use dev->priv instead of dev->type_data

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-25 15:16:14 +01:00
Sascha Hauer 0f7b86f1cb serial imx: fix unregister
- Add missing console_unregister call
- use dev->priv instead of dev->type_data

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-25 15:16:14 +01:00
Sascha Hauer b059ed8184 serial pxa: fix unregister
- Add missing console_unregister call
- use dev->priv instead of dev->type_data

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-25 15:16:14 +01:00
Sascha Hauer 837a0c2e04 serial drivers: remove unused type_data
Several serial drivers set the type_data field without ever using it,
so just remove it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-25 15:16:14 +01:00
Sascha Hauer a9236dd6b5 console: use container_of instead of type_data
This reduces the usage of type_data.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-25 15:16:14 +01:00
Sascha Hauer 3a92711511 fs: get fs device using container_of
This reduces the usage of dev->type_data.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-25 14:03:56 +01:00
Sascha Hauer 76c7f90a54 fs: get fs driver using container_of
This reduces the usage of dev->type_data.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-25 14:03:56 +01:00
Sascha Hauer 660a2864cb Merge branch 'work/tftp' into next 2012-02-25 14:03:34 +01:00
Robert Jarzmik 5d9e5134a0 arm/mach-pxa: add CCCR bits definitions
Add CCCR bits definition for PXA SoC, so that the bootloader
can setup a stable core clock frequency, which is not the
initial reset clock, as required by Intel's PXA27x Processor
family developer's guide, chapter 3.5.5, table 3.7 (clock
frequencies).

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-22 08:27:26 +01:00
Robert Jarzmik 513def13ce arm/mach-pxa: add standard LCD panel GPIO settings
Add standard GPIO routings for LCD panels, taken from linux
kernel.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-22 08:27:26 +01:00
Sascha Hauer 74c70b3980 copy_file: limit progress bar to sensible limits
When copying in verbose mode from a tftp server we might
not know the size of the file being transfered. In this
case print one progress item per 16k instead of one for
each single byte.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-19 18:51:03 +01:00
Sascha Hauer 16babe2c7f add string for -ETIMEDOUT
-ETIMEDOUT is a common error value, so print the string rather
than just the number.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-19 18:51:03 +01:00
Sascha Hauer 31078e0839 net: let net_udp_get_payload return void *
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-19 18:51:03 +01:00
Sascha Hauer 3ac63c6388 make uimages work on tftpfs
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-19 18:51:03 +01:00
Sascha Hauer abd21d1f67 Add suport for tftp as a filesystem
This adds tftp filesystem support. It currently duplicates
significant amounts of the tftp (command) support. This is ok
since we can eventually drop the original tftp command later.

tftp is not really suitable to be handled as a filesystem. It lacks
support for stat, reading directories and other things. Handling
it as a filesystem has one big advantage though: tftp is no special
case for boot scripts and/or commands anymore which makes them simpler.

This implementation has some improvements to the original tftp command.
It supports blocksize negotiation which speeds up transfers if the tftp
server supports it. Also we can determine the filesize to transfer if
the remote end supports it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-19 18:48:38 +01:00
Sascha Hauer 2546c5a514 Merge branch 'pu/device-cleanup' into next 2012-02-17 10:27:31 +01:00
Sascha Hauer 491cc29b0a devices: unregister children when unregistering a device
We currently do not allow to unregister a device when it
has children. However, the return value is seldomly checked.
Also this breaks for hot pluggable devices like USB which we have
to unregister when they disappear. The best way to fix this is to
unregister our children and also the partitions on the unregistered
device.
We unregister the device first and then afterwards the children.
We do this because for example network devices have a miidev as
child which they unregister themselves. So we only have to
unregister the children which are not cleaned up by the drivers,
namely fs devices.
Also, unregister all partitions on a disappearing device.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-17 10:27:15 +01:00
Sascha Hauer 62d8b2f8c0 fs: allow to mount on subdirectories
Since get_mtab_entry_by_path() is a bit more flexible now
we no longer have to force the user to mount on the root
directory only. Instead, we can allow to mount on subdirectories
aswell. Nested mounts are still not possible though.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-17 10:27:15 +01:00
Sascha Hauer 9bf08d582a fs: put fs devices on its own bus
By putting the fs devices/drivers on a bus on its own we can hook
into the bus remove function to cleanup the fs device. This way
we can unmount a device by simply unregistering the device which
is useful for for example USB mass storage devices. These can now
unregister the assoiated filesystems by unregistering their child
devices.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-17 10:27:15 +01:00
Sascha Hauer 33b5ead7e6 fs: remove fs devices list
We store the fs devices in a list only because we want to
check if the fs driver needs a backingstore or not. The
driver will bail out anyway if it needs a backingstore and
doesn't find one. So we can remove this check and thus remove
the list of fs devices.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-17 10:27:15 +01:00
Sascha Hauer b0c22c2f34 fs: remove only once used variable
dev is used only once, so make the code a tiny bit simpler by
not using an extra variable but dereference it when needed directly.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-17 10:27:15 +01:00
Sascha Hauer 336ad5ce68 fs: simplify get_mtab_entry_by_path
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-17 10:27:15 +01:00
Sascha Hauer fcec314b09 fs: remove unused function fsdev_get_mountpoint
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-17 10:27:15 +01:00
Sascha Hauer ec1d29e61c fs: Store mtab path in allocated string
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-17 10:27:15 +01:00