Instead of keeping track of the mac_control register value and
only writing to it when it changed just always write it. This is
more safe anyway since the mac_control register content is altered
in the soft_reset functions.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Since the cpsw has two slaves which handle one network interface
each the slave number is interesting during debugging. use the
slave device for dev_dbg.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This makes it possible to directly call dev_dbg and friends
on the slave. Also the ethernet aliases in the devicetree
now match the devices.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The OMAP SPI core allows swapping MISO/MOSI and some boards are
wired up that way, so add a property to swap the lines.
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
We already have an update handler for the MLO on SPI, add
a update handler for the regular barebox aswell.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The MLO image for SPI differs in the normal MLO in that the
SPI version is big endian. As both types of images are floating
around detect whether or not the image is swapped automatically.
This also adds a check whether we have a valid MLO image.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
mk-am35xx-spi-image can only build AM35xx images. Rename
the tool to mk-am3xxx-spi-image and add support for the AM33xx.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
To make am33xx_uart0_soft_reset more flexible rename it to
am33xx_uart_soft_reset and pass the UART base to it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The static inline wrapper for am33xx_bbu_spi_nor_mlo_register_handler
lacked the 'static inline'. add it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
In barebox network packets always go out at the current ethernet
device and are expected to be received from the current interface.
This has some side effects. When for example an NFS is mounted when
one interface is active and the interface is changed afterwards the
NFS packets leave the new interface, but the NFS server won't be
reachable there.
Instead of changing the whole network traffic to the current ethernet
interface we now initialize a network connection with the current
network interface, but then the connection will continue to use that
interface even when the current interface is changed.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
When doing an ifup set the current interface to the one just
brought up so that it is actually used.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* this places the command into the "Network commands"
section of Kconfig
* while at it, improve Kconfig documention
Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* this compile option actually turns on a command, so name it
accordingly
* also move the Kconfig definition into commands/Kconfig, thus
placing getopt into the "Network commands" section
* while at it, improve Kconfig documention
Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* this compile option actually turns on a command, so name it
accordingly
* also move the Kconfig definition into commands/Kconfig, thus
placing getopt into the "Network commands" section
* while at it, improve Kconfig documention
Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
... because NET_RESOLV can be used alone to turn on the functionality
of resolv().
Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* this compile option actually turns on a command, so name it
accordingly
* also move the Kconfig definition into commands/Kconfig, thus
placing getopt into the "Shell scripting commands" section
* while at it, improve Kconfig documention
Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* this places the command into the "Information commands"
section of Kconfig
* while at it, improve Kconfig documention
Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* this places the command into the "Information commands"
section of Kconfig
* while at it, improve Kconfig documention
Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* this places the command into the "Boot commands"
section of Kconfig
* while at it, improve Kconfig documention
Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* this places the command into the "Boot commands"
section of Kconfig
* while at it, improve Kconfig documention
Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* this places the command into the "Information commands"
section of Kconfig
* while at it, imprive Kconfig documention
Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* this places the command into the "Information commands"
section of Kconfig
* while at it, imprive Kconfig documention
Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This config just turned on the compilation of digest.c (used by 'SHA1',
'sha256sum' etc), so name it accordingly.
Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* CMD_MEMORY was defined both in common/Kconfig and commands/Kconfig
* that symbol turned not a command on, but just the compilation of
commands/mem.c, so rename it accordingly
Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This patch does probably too much, but it's hard (and very
cumbersome/time consuming) to break it out. What is does is this:
* each command has one short description, e.g. "list MUX configuration"
* made sure the short descriptions start lowercase
* each command has one usage. That string contains just the
options, e.g. "[-npn]". It's not part of the long help text.
* that is, it doesn't say "[OPTIONS]" anymore, every usable option
is listed by character in this (short) option string (the long
description is in the long help text, as before)
* help texts have been reworked, to make them
- sometimes smaller
- sometimes describe the options better
- more often present themselves in a nicer format
* all long help texts are now created with BUSYBOX_CMD_HELP_
macros, no more 'static const __maybe_unused char cmd_foobar_help[]'
* made sure the long help texts starts uppercase
* because cmdtp->name and cmdtp->opts together provide the new usage,
all "Usage: foobar" texts have been removed from the long help texts
* BUSYBOX_CMD_HELP_TEXT() provides the trailing newline by itself, this
is nicer in the source code
* BUSYBOX_CMD_HELP_OPT() provides the trailing newline by itself
* made sure no line gets longer than 77 characters
* delibertely renamed cmdtp->usage, so that we can get compile-time
errors (e.g. in out-of-tree modules that use register_command()
* the 'help' command can now always emit the usage, even without
compiled long help texts
* 'help -v' gives a list of commands with their short description, this
is similar like the old "help" command before my patchset
* 'help -a' gives out help of all commands
Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
hostname_init() must be called after the devicetree root node has been
initialized, otherwise the check on board compatible always returns
false.
Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The old output of "help" was just producing a long list, that usually
scrolled of the screen (even on a X11 terminal). This list is more
compact, and also sorted by groups.
The old output format (plus grouping) is now available with 'help -v'.
Example:
Information commands:
?, devinfo, help, iomem, meminfo, version
Boot commands:
boot, bootm, go, loadb, loads, loadx, loady, saves, uimage
...
Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
With CONFIG_PARTITION_NEED_MTD enabled we use mtd rather than devfs
directly to create partitions on mtd devices. Since:
| commit b32cd8df87
| Author: Sascha Hauer <s.hauer@pengutronix.de>
| Date: Wed Apr 9 15:49:32 2014 +0200
|
| mtd: nand: bb: use mtd api directly
|
| The devfs layer just adds an addition indirection between mtd
| and the bb devices with no purpose. Drop it.
|
| Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The bad block aware device creation doesn't work if this option
is disabled. With this we remove CONFIG_PARTITION_NEED_MTD and always
use mtd partitions on mtd devices.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
When iterating over directories in order to find boot scripts do
this alphabetically to get a predictable order. This can be done
with glob() rather than readdir().
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
When there are multiple bootsources barebox should try booting them
until one succeeds. This is broken because we bail out of the iteration
loop with a goto. Remove the goto to fix this.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This creates a imx_defconfig which in future can catch all
non thumb i.MX boards not covered by imx_v7_defconfig. Right
now the Karo TX25 and Phytec phyCARD i.MX27 can so multi image
support. They are enabled in the new config and the previous
board specific config is removed.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>