9
0
Fork 0
Commit Graph

7091 Commits

Author SHA1 Message Date
Sascha Hauer a3d643a7f1 ARM i.MX speed: sparse fixes
- Add missing #include <mach/clock.h>
- add global functions to mach/clock.h

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 22:34:54 +02:00
Sascha Hauer 27c5d37ecc define __user empty
There is no seperate user address space, so do not generate sparse
warnings for this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 22:34:54 +02:00
Sascha Hauer 6f5ea13f28 Do not use iomem space for dev_get_mem_region
It is mostly used for mmapping sdram which is no iomem.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 22:34:54 +02:00
Sascha Hauer 3058898828 qsort: declare strcmp_compar publically
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 22:34:54 +02:00
Sascha Hauer aee2920a88 tlsf: Use NULL instead of 0 for returning NULL pointers
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 22:34:54 +02:00
Sascha Hauer cbba269403 MMC i.MX esdhc: Fix sparse warnings
mostly by moving the registers into the correct address space.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 22:34:54 +02:00
Alexander Shiyan 20addb80f6 commands: uncompress: fix description
Command "uncompress" can handle not only with LZO-format, so we just
changed description for command.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 22:10:21 +02:00
Alexander Shiyan 226d222c94 Unused files removed
Files "modules.builtin" probably have been copied from kernel tree.
This files not used by barebox and can be removed safely.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 22:09:49 +02:00
Jan Luebbe 490867bbc3 mmuinfo: add a command do display the result of virtual to physical translation
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 22:06:21 +02:00
Sascha Hauer 13b70bb921 menu: implement KEY_HOME/KEY_END
To go to the first/last menu entry.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 20:23:26 +02:00
Sascha Hauer 4f02e70d6d menu: store repaint state in variable
Instead of calling print_menu_entry multiple times in each case, store
the repaint state in a variable and call it once at the end to save a
few bytes of binary space.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 20:23:26 +02:00
Sascha Hauer fa37257ce0 menu: use read_key
We have the read_key function which reads a key and parses escape sequences.
Use it in the menu instead of reimplementing this manually.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 20:23:26 +02:00
Sascha Hauer 4d5a9be0dc complete: fix parameter complete with multiple '.'
When a device parameter has dots in its name, we have to use strchr instead
of strrchr, because the devicename ends at the first dot, not at the last one.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 20:23:26 +02:00
Sascha Hauer f3a6511ae8 fs: Fix file create bug when parent is not a directory
When creating a file or a directory we have to check if the parent
is actually a directory. Otherwise trying it results in a crash.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 19:53:06 +02:00
Sascha Hauer c7419bb247 Add dirname command
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 16:53:59 +02:00
Sascha Hauer 814bc438ce Add basename command
The basename command allows to set an environment variable with
the basename of a path.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 16:53:59 +02:00
Sascha Hauer cfcfc66d54 partitions: Make 64bit capable
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 16:53:25 +02:00
Sascha Hauer aece3fb42c memory commands: Make 64bit capable
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 16:53:25 +02:00
Sascha Hauer be573120fe make cdev 64bit capable
Next step to 64bit support: Make cdev size a 64bit type.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 16:53:24 +02:00
Sascha Hauer 849ce2df7a make st_size in struct stat 64 bit
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 16:53:24 +02:00
Sascha Hauer 7b65cb7567 make memory display 64bit capable
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 16:53:24 +02:00
Sascha Hauer efa379f224 make parse_area_spec arguments loff_t
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 16:53:24 +02:00
Sascha Hauer 76281a16fb introduce strtoull_suffix function
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 16:53:24 +02:00
Sascha Hauer 3e503822c7 use loff_t for file offsets
This is a first step for 64bit file support: Make the file sizes/offsets
64bit.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 16:53:24 +02:00
Sascha Hauer e71c343668 mtd: fix arguments to bad block ioctls
In the Kernel the mtd ioctls expect a pointer to the offset, whereas
barebox interprets the pointer itself as an offset. Since we want
to add 64bit support for file sizes a pointer may not be sufficient,
so align with the kernel and convert it to a pointer to the offset.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 16:53:16 +02:00
Johannes Stezenbach 69e07e2afb eth: eth MAC addresses are six bytes
Reduce confusion by making clear six bytes are passed,
not a string.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 13:58:18 +02:00
Johannes Stezenbach 8f2fcf6554 miidev: consistent md and mw on phy regs
The dump generated by "md -w -s /dev/phy0"
suggests individual registers need to be
addressed by byte offset, not by register number.
E.g. to set the autonegotiation advertisement register
for 10Mbit only, use "mw -w -d /dev/phy0 8+2 0x0061".
The current mix of offset == register number, but
count == byte count is unintuitive.

Also, to be consistent with "md" on /dev/mem, round up
the count so "8+1" also works to access one register.
However, no attempt is made to do read-modify-write
single byte writes.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 13:58:18 +02:00
Johannes Stezenbach 99e72c8bbd miidev: add support for 1000Mbit
Signed-off-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 13:58:18 +02:00
Johannes Stezenbach 1b725b9c44 miidev: actually probe the PHY
Check if the PHY is really accessible (e.g. the
PHY address is correct) during probe.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 13:58:18 +02:00
Johannes Stezenbach 467d9d9cee miidev: fix auto negotiation
The auto negotiation result is the intersect
of the advertised abilities and the link partner abilities.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 13:58:14 +02:00
Juergen Beisert af76fae0fe ARM/MXS: add new way to reset the whole SoC
Currently the watchdog is occupied for system reset. This usage collides with
the dedicated usage of a watchdog. This patch change the behaviour of at least
i.MX23/i.MX28 where the chipset supports a simple and powerful alternative
to reset the whole SoC (including the PMIC).

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:53:48 +02:00
Wolfram Sang 0256d59a41 ARM mxs: add bcb command to create 'boot control block' for NAND boot
We write a proper FCB, but no DBBT since it is unresolved how to keep it
in sync with Linux-based BBTs. Also, we imply searchcount = 4 and stride
= 64 (which is the default) until we can verify via ocotp.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-06-30 12:53:36 +02:00
Wolfram Sang eb76c8e827 mtd nand: add mxs-nand driver
Based on the U-Boot version. Changed to kernel style register layout, added
MX23 support (WIP!), made MMU aware and adapted to barebox.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2012-06-30 12:53:36 +02:00
Wolfram Sang 4a39f83320 dma: add mxs-apbh-dma driver
Based on the U-Boot version. Changed to kernel style register layout, added
MX23 support, made MMU aware and adapted to barebox.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:53:36 +02:00
Sascha Hauer 364a2bb8ed ARM mxs: Add mxs_reset_block function
The i.MX23/28 have a reset block to reset several units.
Add a function to support this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:53:36 +02:00
Wolfram Sang b20296bae5 arm: mxs: add imx_set_hclk
needed for writing the One-Time-Prgorammable

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:53:23 +02:00
Wolfram Sang 8a6877364a arm: mxs: make get_hclk result useable for upcoming set_hclk
To avoid getting a different divider due to rounding errors when using
set_hclk later, use DIV_ROUND_UP for the returned value.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:53:23 +02:00
Wolfram Sang ead6ec8b4f arm: mxs: get MAC from OCOTP for MX28EVK
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:53:23 +02:00
Antony Pavlov 41b05dc0da rzx50: add poweroff support
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:47:25 +02:00
Antony Pavlov b78f4c986f add 'poweroff' command
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:47:25 +02:00
Sascha Hauer e0ef3e6c7f ARM i.MX28 usb: Add USBPHY support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:47:15 +02:00
Sascha Hauer 1e8c05e402 ARM i.MX23 usb: move to SoC specific functions
Makes space for a i.MX28 specific USBPHY implementation.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:47:15 +02:00
Sascha Hauer a0b0611477 remove dead rarpboot command
This code is unused, remove it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:47:04 +02:00
Sascha Hauer 2fa9e369eb ARM i.MX51 babbage: add mci1
The iomuxer is already initialized, only need to add the device.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:47:04 +02:00
Jan Luebbe a4fde70067 fs/devfs.c: disallow write and erase if a partition is read-only
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:47:04 +02:00
Jan Luebbe 4ef0846589 defaultenv/bin/init: skip autoboot if $autoboot_timeout is unset
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:47:04 +02:00
Sascha Hauer 5ecbd4a40f Makefile: echo size check error to stderr
To be able to see it when in my build tests stdout goes to /dev/null

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:47:04 +02:00
Alexander Shiyan 25cbed6842 Setup UART-pads via iomux interface
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:47:04 +02:00
Roberto Nibali ba673498c9 Deal properly with scripts/bareboxenv-target
The bareboxenv-target binary is automatically created but never
deleted nor is it excluded from git tracking. This patch remedies
the situation by adding scripts/bareboxenv-target to .gitignnore
and adjusting the list of to be deleted files of the 'clean' target
in the core Makefile.

Signed-off-by: Roberto Nibali <rnibali@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:47:04 +02:00
Roberto Nibali 5718688da9 Remove superfluous SYSCTL_RSTA
Signed-off-by: Roberto Nibali <rnibali@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:47:04 +02:00