9
0
Fork 0
Commit Graph

6953 Commits

Author SHA1 Message Date
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
Sascha Hauer 1a5503118a blackfin: Add missing fls include
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-28 13:49:17 +02:00
Sascha Hauer a13829742b x86: Add missing ffs and fls include
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-28 13:49:17 +02:00
Sascha Hauer abbbe22b48 nios2: Add missing ffs and fls include
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-28 13:49:16 +02:00
Sascha Hauer 21895e19f8 mips: Add missing ffs and fls include
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-28 13:49:16 +02:00
Sascha Hauer 271bdffbcd openrisc: link to libgcc
To get symbols like __ashrdi3.

Franck started generating these symbols from gcc assembly, which seems
to be the cleaner approach. The simpler approach for now to get additional
symbols is to link in libgcc, which is the same as the kernel does.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Franck Jullien <franck.jullien@gmail.com>
2012-06-28 13:49:16 +02:00
Sascha Hauer e2e494bc02 blackfin: add __ashrdi3
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-28 13:49:16 +02:00
Sascha Hauer 51885a7d73 Change byte order detection mechanism to kernel style
The Linux Kernel defines only one of __LITTLE_ENDIAN and
__BIG_ENDIAN. Endianess can then be tested with #ifdef __xx_ENDIAN. Userspace
always defined both __LITTLE_ENDIAN and __BIG_ENDIAN and byteorder can then
be tested with #if __BYTE_ORDER == __xx_ENDIAN.

As we tend to use a lot of Kernel code in barebox we switch to use the kernel
way of determing the byte order.

As this always causes a lot of confusion add a check to include/common.h to
make sure only one of __LITTLE_ENDIAN and __BIG_ENDIAN is defined.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-28 13:49:16 +02:00
Sascha Hauer a6e358b2f5 drivers/base: bail out if request_iomem_region fails
When request_iomem_region fails we have to bail out instead of
dereferencing res->start.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-27 18:31:34 +02:00
Sascha Hauer fd4c51aa28 Merge branch 'pu/sandbox-fixes' 2012-06-25 19:19:52 +02:00
Sascha Hauer 2ca512e592 print out resource_size_t correctly
resource_size_t can be 32bit or 64bit depending on the architecture.
Add a define for it to be able to printf a resource_size_t correctly

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-25 14:45:43 +02:00
Sascha Hauer 8ee6700a4c x86 linux16 command: Add missing include
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-25 14:38:30 +02:00
Sascha Hauer 53e9fae78c sandbox: fix 64bit build
On x86_64 we need CONFIG_PHYS_ADDR_T_64BIT to make the resource sizes
64bit. The kernel has this as a Kconfig variable, but on barebox sandbox
will build with whatever compiler we find, so we can't put it into Kconfig.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-25 14:06:40 +02:00
Sascha Hauer ecf38bff9b fs tftp: Fix short file transfers
With files smaller than the tftp block size the whole transfer is done
in tftp_do_open already. In this case we are in STATE_DONE, but there
is no error. Set priv->err to 0 and check for it to be able to transfer
small files.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-24 13:29:52 +02:00
Sascha Hauer b62cf8f36d openrisc: fix build due to redefined phys_size_t
We already have a phys_size_t since:

commit 2f05b69256
Author: Renaud Barbier <renaud.barbier@ge.com>
Date:   Fri May 11 11:58:13 2012 +0100

    linux/types.h: define phys_size_t

    Add this definition in preparation for the introduction of the
    mpc85xx support.

    Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
    Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

Fix build due to redefinition of this type.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-21 11:57:26 +02:00
Sascha Hauer 39e450ca1c blackfin: Fix build due to missing __raw_* io accessors
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-21 11:56:53 +02:00
Sascha Hauer d020b8b593 ARM qil-a9260: Fix PARTITION_FIXED compilation
is now DEVFS_PARTITION_FIXED

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-07 23:31:55 +02:00
Krzysztof Halasa 76c7d6b3c7 Fix SHA224 to produce 28 bytes of hash (instead of 32).
This fixes a panic in sha224sum.

Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-07 19:39:09 +02:00
Krzysztof Halasa edfe50ce40 Fix a panic in crypto hash calculations due to uninitialized variable.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-07 19:39:09 +02:00
Krzysztof Halasa 76049e05fa Fix sha224sum panic by registering SHA224 hash name.
barebox:/ sha224sum
BUG: failure at commands/digest.c:40/do_digest()!

Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-07 19:39:09 +02:00
Johannes Stezenbach 6815e0d054 fs: limit flash erase and protect to the partiton boundary
Passing a too large size or offset to erase could
affect flash outside the partition boundary.
Addresses for SPI flash wrap around, thus giving a
count + offset going past the end of the flash would
wrap around and erase flash at offset 0.

Add the same check for protect.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-07 19:31:33 +02:00
Johannes Stezenbach 79f9683b8e devfs: don't erase past the end of the partition
"erase /dev/myflash0.mypart 0xf0000+0xf0000" could erase past
the end of the partition.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-07 19:31:33 +02:00
Johannes Stezenbach 9c865c1669 m25p80: progressbar tweak
Show progressbar even when erasing just a single sector,
otherwise it looks as if erase didn't do anything.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-07 19:31:33 +02:00
Johannes Stezenbach 2c25d3ec4b m25p80: allow erase to be interrupted
Check for Ctrl-C before erasing each sector.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-07 19:31:33 +02:00
Johannes Stezenbach 011702664f m25p80: prevent endless loop in erase
"erase /dev/myflash0 0+1" erased the whole flash,
similar for other value of count if you guessed the
erae block size wrong.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-07 19:31:33 +02:00
Sascha Hauer 497d1c49f4 Merge branch 'next' 2012-06-06 14:11:57 +02:00
Sascha Hauer 94418c2d0d Release v2012.06.0
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-06 14:10:34 +02:00
Dirk Hörner 4024d9ca11 scripts/genenv: always pass template to mktemp
Passing a template to mktemp is mandatory on OS X.

Signed-off-by: Dirk Hörner <dirker@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-05 21:40:15 +02:00
Dirk Hörner 49356933f5 scripts/compiler.h: fixup endianess defines on OS X
Signed-off-by: Dirk Hörner <dirker@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-05 21:40:15 +02:00
Dirk Hörner a906e5e196 hostcc tools: include "compiler.h", fix included headers
When barebox headers get included from HOSTCC tools they should not
include other architecture specific headers as barebox might get
cross-compiled. Instead, the tool itself should include "compiler.h".

Signed-off-by: Dirk Hörner <dirker@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-05 21:40:15 +02:00
Sam Ravnborg f324a85e8b kbuild: Use Elfnn_Half as replacement for Elfnn_Section
The Elfnn_Section is not available on all platforms,
noteworthy are cygwin.
Use the safe replacement _Half.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-05 21:40:15 +02:00
Antony Pavlov 902b498458 MIPS: XBurst: suitable solution for per-board debug_ll
In the commit 40492a0c13
(MIPS: add common header file for DEBUG_LL via NS16550)
introduced common DEBUG_LL via NS16550 for MIPS
(see file arch/mips/include/debug_ll_ns16550.h).

In the commit 1cbe2b2c00
(MIPS: XBurst: add Ritmix RZX-50 board support)
the file debug_ll_ns16550.h used in
the file arch/mips/mach-xburst/include/mach/debug_ll.h.

Usage looks like this:

------------------------------------------------
+#ifdef CONFIG_BOARD_RZX50
+#include <mach/debug_ll_jz4755.h>
+#endif
+
+#include <debug_ll_ns16550.h>
------------------------------------------------

So after adding another board (e.g. A320) we will have something like this:

------------------------------------------------
 #ifdef CONFIG_BOARD_RZX50
 #include <mach/debug_ll_jz4755.h>
 #endif

+#ifdef CONFIG_BOARD_A320
+#include <mach/debug_ll_jz4740.h>
+#endif

 #include <debug_ll_ns16550.h>
------------------------------------------------

This approach has disadvantage:
* the files mach/debug_ll_jz4740.h and mach/debug_ll_jz4755.h
(they go to arch/mips/arch-xburst) are __BOARD-SPECIFIC__
(not SOC- or mach-specific!); The file mach-xburst/include/mach/debug_ll.h
is outside board directory, but it contains some board related information.

This commit introduce a more suitable solution.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-05 08:36:59 +02:00
Antony Pavlov d25d94bea6 MIPS: make possible board-specific header files
This patch makes possible to put a board-specific
header file (e. g. foobar.h) to arch/mips/boards/*/include/board/.

Header file usage:
 #include <board/foobar.h>

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-05 08:36:59 +02:00
Sascha Hauer 08845e41fb usb ehci: Add resource sizes
add_usb_ehci_device registers resources with size 0. Fix this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-31 20:29:10 +02:00
Sascha Hauer e48c51bda8 fs tftp: depend on NET, not on NET_TFTP
The tftp filesystem support is by no means dependent on the old tftp
support, it depends on NET though.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-31 20:23:52 +02:00
Alexander Shiyan 71d559854e block: Fix printf warning
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-31 20:21:19 +02:00
Alexander Shiyan 434782f84a i.MX51 clock: Added USB clock to dump_clocks command.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-31 09:00:07 +02:00
Alexander Shiyan 1ce7966745 i.MX51 clock: Added lp_apm clock support for frequency calculations.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-31 09:00:07 +02:00
Antony Pavlov bcbeb212e9 video/s3c24xx.c: fix doxygen comment for s3cfb_activate_var()
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-30 12:19:51 +02:00
Sascha Hauer ff6bacd6f4 block: do not BUG() on failed block_get
It does not necessarily means a bug when block_get fails here,
this can also be a failure on the underlying device.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-30 06:03:01 +02:00
Sascha Hauer 949b03dfb1 block: propagate error code from block_get
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-30 06:01:02 +02:00
Antony Pavlov 41aba3e7ca toshiba_ac100: add defconfig
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-29 15:46:54 +02:00
Antony Pavlov f0d4c2981d toshiba_ac100: add USB host support
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-29 15:46:37 +02:00
Alexander Shiyan 4d2c24fa34 ARM i.MX: Possible bug fixed due misspelling when copy/paste
We must check pointer to function rather than result.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-29 11:09:31 +02:00
Antony Pavlov c837b8e19e usb: set MAXINTERFACES = 16
Tegra2 needs MAXINTERFACES > 8, so increase the macro's value.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-29 10:39:17 +02:00
Antony Pavlov f8e83c05d9 ARM: Tegra: add Toshiba AC100 support
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-29 10:39:17 +02:00
Antony Pavlov cdf00414e5 ARM: initial Tegra support
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-29 10:39:17 +02:00
Jean-Christophe PLAGNIOL-VILLARD 7f2427223a at91sam9260ek/9260ek/9g20ek: drop bootz and fat write support to fit in flash
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-29 10:16:35 +02:00
Jean-Christophe PLAGNIOL-VILLARD d72083674a at91: switch uart registration to inline
this allow to save between 100 to 300 bytes

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-29 10:16:35 +02:00