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>
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>
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>
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>
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>
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>
"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>
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>
"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>
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>
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>
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>
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>
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>
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>
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>
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>
with:
- led
- USB Device
- uart
- net
- mmc
- MMU
dfu support
detect it at boot time
if the user button is pressed 5s and the vbus is 1 start the dfu
otherwise the vbus is 1 start usb serial
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Currently, both SDHC clock source is PLL3. We can raise clock
for SDHC driver by change source from PLL3 to PLL2.
Below, is debug ouputs with old and new settings.
Detection (PLL3):
set clock: wanted: 400000 got: 375000
Operation (PLL3):
set clock: wanted: 25000000 got: 18000000
Operation SD4.0 (PLL3):
set clock: wanted: 52000000 got: 27000000
Detection (PLL2):
set clock: wanted: 400000 got: 399639
Operation (PLL2):
set clock: wanted: 25000000 got: 23750000
Operation SD4.0 (PLL2):
set clock: wanted: 52000000 got: 41562500
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
fixes
arch/arm/mach-samsung/Kconfig:95:warning: config symbol defined without type
Until we actually have board support.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>