Re: [PATCH v2 2/7] ARM: uemd: add DEBUG_LL support

2014-05-30 Thread Holger Schurig
2014-05-22 21:48 GMT+02:00 Antony Pavlov antonynpav...@gmail.com:
 --- a/arch/arm/Kconfig
 +++ b/arch/arm/Kconfig
 @@ -203,6 +203,7 @@ config ARCH_UEMD
 select OFDEVICE
 select OFTREE
 select CLOCKSOURCE_UEMD
 +   select HAS_DEBUG_LL

Why not putting this into the _defconfig?

(On my device, it's neither in defconfig nor in Kconfig, I only had it
on in the initial bring it to live period. Afterwards I turned it
off)

___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: [PATCH v2 2/7] ARM: uemd: add DEBUG_LL support

2014-05-30 Thread Antony Pavlov
On Fri, 30 May 2014 08:09:21 +0200
Holger Schurig holgerschu...@gmail.com wrote:

 2014-05-22 21:48 GMT+02:00 Antony Pavlov antonynpav...@gmail.com:
  --- a/arch/arm/Kconfig
  +++ b/arch/arm/Kconfig
  @@ -203,6 +203,7 @@ config ARCH_UEMD
  select OFDEVICE
  select OFTREE
  select CLOCKSOURCE_UEMD
  +   select HAS_DEBUG_LL
 
 Why not putting this into the _defconfig?

I suppose you are mixing up HAS_DEBUG_LL with DEBUG_LL.

DEBUG_LL depends on HAS_DEBUG_LL. If HAS_DEBUG_LL=y then DEBUG_LL can be 
enabled or DEBUG_LL can be disabled.
So you have no chance to use DEBUG_LL without HAS_DEBUG_LL=y!

If you want to enable HAS_DEBUG_LL you have to explicitly select it in a 
Kconfig file.
You can't use just _defconfig for HAS_DEBUG_LL enabling.

 (On my device, it's neither in defconfig nor in Kconfig, I only had it
 on in the initial bring it to live period. Afterwards I turned it
 off)


-- 
-- 
Best regards,
  Antony Pavlov

___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


[PATCH 02/10] devinfo: reduce indentation

2014-05-30 Thread Holger Schurig
This patch reduces the indentation of devinfo, to reduce the amount of
overly long lines.

And while we're at it, also remove the fixed-size of the human-readable
area. As entries didn't align anyway (because of indentation), this was
just eating more space without giving much more readability.

Signed-off-by: Holger Schurig holgerschu...@gmail.com
---
 commands/devinfo.c |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/commands/devinfo.c b/commands/devinfo.c
index 448792d..3fb309b 100644
--- a/commands/devinfo.c
+++ b/commands/devinfo.c
@@ -25,15 +25,15 @@ static int do_devinfo_subtree(struct device_d *dev, int 
depth)
int i;
 
for (i = 0; i  depth; i++)
-   printf( );
+   printf(   );
 
-   printf(` %s, dev_name(dev));
+   printf(`-- %s, dev_name(dev));
if (!list_empty(dev-cdevs)) {
printf(\n);
list_for_each_entry(cdev, dev-cdevs, devices_list) {
for (i = 0; i  depth + 1; i++)
-   printf( );
-   printf(` 0x%08llx-0x%08llx (%10s): /dev/%s\n,
+   printf(   );
+   printf(`-- 0x%08llx-0x%08llx (%s): /dev/%s\n,
cdev-offset,
cdev-offset + cdev-size - 1,
size_human_readable(cdev-size),
-- 
1.7.10.4


___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


[PATCH 05/10] net: show enetaddr in lowercase

2014-05-30 Thread Holger Schurig
ifconfig and ip from normal Linux userspace shows ethernet addresses
normally in lowercase.  And the %pM format specifier in Linux does that,
too. Conform to this custom formatting.

Signed-off-by: Holger Schurig holgerschu...@gmail.com
---
 net/net.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/net.c b/net/net.c
index f54267a..07350ad 100644
--- a/net/net.c
+++ b/net/net.c
@@ -160,7 +160,7 @@ int string_to_ethaddr(const char *str, u8 enetaddr[6])
 
 void ethaddr_to_string(const u8 enetaddr[6], char *str)
 {
-   sprintf(str, %02X:%02X:%02X:%02X:%02X:%02X,
+   sprintf(str, %02x:%02x:%02x:%02x:%02x:%02x,
 enetaddr[0], enetaddr[1], enetaddr[2], enetaddr[3],
 enetaddr[4], enetaddr[5]);
 }
-- 
1.7.10.4


___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


[PATCH 04/10] parameters: only show possible enumerations if there are any

2014-05-30 Thread Holger Schurig
Enumeration values will only be shown if there are at least two of them.
With only one enumeration, it was just repeating what was previously printed
anyway.

Signed-off-by: Holger Schurig holgerschu...@gmail.com
---
 lib/parameter.c |3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/parameter.c b/lib/parameter.c
index baa2b15..b1f9aa3 100644
--- a/lib/parameter.c
+++ b/lib/parameter.c
@@ -362,6 +362,9 @@ static void param_enum_info(struct param_d *p)
struct param_enum *pe = to_param_enum(p);
int i;
 
+   if (pe-num_names = 1)
+   return;
+
printf( ();
 
for (i = 0; i  pe-num_names; i++) {
-- 
1.7.10.4


___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


[PATCH 00/10] miscelleanous beautification patches

2014-05-30 Thread Holger Schurig
The following patches mostly change the output of various commands.

Holger Schurig (10):
  drvlist: factor the driver list out of 'devinfo'
  devinfo: reduce indentation
  devinfo: make the output of devinfo DEVICE nicer
  parameters: only show possible enumerations if there are any
  net: show enetaddr in lowercase
  meminfo: purely cosmetical changes
  misc: upper-case some abbreviations
  bootm: beautify output
  beautify PHY driver names
  device drivers: harmonize underscore in driver names

 arch/arm/Kconfig|4 +-
 arch/arm/boards/at91rm9200ek/init.c |8 ++--
 arch/arm/boards/at91sam9261ek/init.c|4 +-
 arch/arm/boards/at91sam9m10g45ek/init.c |2 +-
 arch/arm/boards/nhk8815/setup.c |2 +-
 arch/arm/boards/phytec-phycore-imx27/pcm970.c   |2 +-
 arch/arm/boards/tny-a926x/init.c|4 +-
 arch/arm/boards/usb-a926x/init.c|4 +-
 arch/arm/cpu/cpu.c  |2 +-
 arch/arm/lib/armlinux.c |2 +-
 arch/arm/lib/bootm.c|4 +-
 arch/arm/mach-imx/iim.c |2 +-
 arch/arm/mach-imx/imx25.c   |2 +-
 arch/arm/mach-imx/imx27.c   |2 +-
 arch/arm/mach-imx/imx31.c   |2 +-
 arch/arm/mach-imx/imx35.c   |2 +-
 arch/arm/mach-imx/imx51.c   |2 +-
 arch/arm/mach-imx/imx53.c   |2 +-
 arch/arm/mach-imx/ocotp.c   |2 +-
 arch/mips/mach-ar231x/ar231x_reset.c|2 +-
 arch/nios2/boards/generic/generic.c |2 +-
 arch/x86/boards/x86_generic/intf_platform_ide.c |4 +-
 commands/Kconfig|   44 +++---
 commands/Makefile   |1 +
 commands/bootm.c|   15 ---
 commands/devinfo.c  |   55 +++
 commands/drvinfo.c  |   47 +++
 common/bootm.c  |8 ++--
 common/dlmalloc.c   |8 ++--
 common/filetype.c   |   20 -
 common/tlsf_malloc.c|2 +-
 drivers/ata/intf_platform_ide.c |2 +-
 drivers/clk/clk-ar933x.c|2 +-
 drivers/clocksource/arm_smp_twd.c   |2 +-
 drivers/clocksource/nomadik.c   |2 +-
 drivers/gpio/gpio-davinci.c |2 +-
 drivers/gpio/gpio-pl061.c   |2 +-
 drivers/input/gpio_keys.c   |2 +-
 drivers/input/twl6030_pwrbtn.c  |2 +-
 drivers/mci/atmel_mci.c |2 +-
 drivers/mci/dw_mmc.c|2 +-
 drivers/mci/mci-bcm2835.c   |2 +-
 drivers/mci/mci_spi.c   |2 +-
 drivers/mci/mxs.c   |2 +-
 drivers/mci/s3c.c   |2 +-
 drivers/mtd/devices/mtd_dataflash.c |2 +-
 drivers/mtd/nand/atmel_nand.c   |2 +-
 drivers/mtd/nand/nand_imx.c |2 +-
 drivers/mtd/nand/nand_mxs.c |2 +-
 drivers/mtd/nand/nand_omap_gpmc.c   |4 +-
 drivers/mtd/nand/nand_s3c24xx.c |2 +-
 drivers/mtd/nand/nomadik_nand.c |2 +-
 drivers/mtd/nor/cfi_flash.c |2 +-
 drivers/net/altera_tse.c|2 +-
 drivers/net/ar231x.c|2 +-
 drivers/net/arc_emac.c  |2 +-
 drivers/net/at91_ether.c|2 +-
 drivers/net/cpsw.c  |2 +-
 drivers/net/cs8900.c|2 +-
 drivers/net/davinci_emac.c  |2 +-
 drivers/net/designware.c|2 +-
 drivers/net/dm9k.c  |2 +-
 drivers/net/ep93xx.c|2 +-
 drivers/net/ethoc.c |2 +-
 drivers/net/fec_imx.c   |2 +-
 drivers/net/fec_mpc5200.c   |2 +-
 drivers/net/gianfar.c   |6 +--
 drivers/net/ks8851_mll.c|2 +-
 drivers/net/ksz8864rmn.c|2 +-
 drivers/net/macb.c  |2 +-
 drivers/net/netx_eth.c  |2 +-
 drivers/net/orion-gbe.c |2 +-
 drivers/net/phy/at803x.c|6 +--
 drivers/net/phy/lxt.c   |2 +-
 drivers/net/phy/mdio_bus.c  |2 

[PATCH 01/10] drvlist: factor the driver list out of 'devinfo'

2014-05-30 Thread Holger Schurig
The command 'devinfo' was first spitting out all devices, and then
also all drivers. This patch separates them into two commands,
'devinfo' as before, and also the new command 'drvinfo'

Signed-off-by: Holger Schurig holgerschu...@gmail.com
---
 commands/Kconfig   |9 -
 commands/Makefile  |1 +
 commands/devinfo.c |9 ++---
 commands/drvinfo.c |   47 +++
 4 files changed, 58 insertions(+), 8 deletions(-)
 create mode 100644 commands/drvinfo.c

diff --git a/commands/Kconfig b/commands/Kconfig
index 6043cb6..c3b4007 100644
--- a/commands/Kconfig
+++ b/commands/Kconfig
@@ -79,11 +79,18 @@ config CMD_DEVINFO
  devinfo [DEVICE]
 
  If called without arguments, devinfo shows a summary of the known
- devices and drivers.
+ devices.
 
  If called with a device path being the argument, devinfo shows more
  default information about this device and its parameters.
 
+config CMD_DRVINFO
+   tristate
+   default y
+   prompt drvinfo
+   help
+ List compiled-in device drivers and the devices they support.
+
 config CMD_HELP
tristate
default y
diff --git a/commands/Makefile b/commands/Makefile
index 030a906..a84d333 100644
--- a/commands/Makefile
+++ b/commands/Makefile
@@ -94,6 +94,7 @@ obj-$(CONFIG_CMD_MIITOOL) += miitool.o
 obj-$(CONFIG_CMD_DETECT)   += detect.o
 obj-$(CONFIG_CMD_BOOT) += boot.o
 obj-$(CONFIG_CMD_DEVINFO)  += devinfo.o
+obj-$(CONFIG_CMD_DRVINFO)  += drvinfo.o
 obj-$(CONFIG_CMD_READF)+= readf.o
 obj-$(CONFIG_CMD_MENUTREE) += menutree.o
 obj-$(CONFIG_CMD_2048) += 2048.o
diff --git a/commands/devinfo.c b/commands/devinfo.c
index 685431b..448792d 100644
--- a/commands/devinfo.c
+++ b/commands/devinfo.c
@@ -55,7 +55,6 @@ static int do_devinfo_subtree(struct device_d *dev, int depth)
 static int do_devinfo(int argc, char *argv[])
 {
struct device_d *dev;
-   struct driver_d *drv;
struct param_d *param;
int i;
struct resource *res;
@@ -67,10 +66,6 @@ static int do_devinfo(int argc, char *argv[])
if (!dev-parent)
do_devinfo_subtree(dev, 0);
}
-
-   printf(\ndrivers:\n);
-   for_each_driver(drv)
-   printf(%s\n,drv-name);
} else {
dev = get_device_by_name(argv[1]);
 
@@ -149,7 +144,7 @@ Example from an MPC5200 based system:
 
 BAREBOX_CMD_HELP_START(devinfo)
 BAREBOX_CMD_HELP_TEXT(If called without arguments, devinfo shows a summary of 
the known)
-BAREBOX_CMD_HELP_TEXT(devices and drivers.)
+BAREBOX_CMD_HELP_TEXT(devices.)
 BAREBOX_CMD_HELP_TEXT()
 BAREBOX_CMD_HELP_TEXT(If called with a device path being the argument, 
devinfo shows more)
 BAREBOX_CMD_HELP_TEXT(default information about this device and its 
parameters.)
@@ -158,7 +153,7 @@ BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(devinfo)
.cmd= do_devinfo,
-   BAREBOX_CMD_DESC(show information about devices and drivers)
+   BAREBOX_CMD_DESC(show information about devices)
BAREBOX_CMD_OPTS([DEVICE])
BAREBOX_CMD_GROUP(CMD_GRP_INFO)
BAREBOX_CMD_HELP(cmd_devinfo_help)
diff --git a/commands/drvinfo.c b/commands/drvinfo.c
new file mode 100644
index 000..161118a
--- /dev/null
+++ b/commands/drvinfo.c
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2013 Sascha Hauer, Pengutronix
+ * Copyright (C) 2014 Holger Schurig
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#include common.h
+#include command.h
+#include driver.h
+
+int do_drvinfo(int argc, char *argv[])
+{
+   struct driver_d *drv;
+   struct device_d *dev;
+
+   printf(Driver\tDevice(s)\n);
+   printf(\n);
+   for_each_driver(drv) {
+   printf(%s\n,drv-name);
+   for_each_device(dev) {
+   if (dev-driver == drv)
+   printf(\t%s\n, dev_name(dev));
+   }
+   }
+
+   if (IS_ENABLED(CONFIG_CMD_DEVINFO))
+   printf(\nUse 'devinfo DEVICE' for more information\n);
+
+   return 0;
+}
+
+
+BAREBOX_CMD_START(drvinfo)
+   .cmd= do_drvinfo,
+   BAREBOX_CMD_DESC(list compiled-in device drivers)
+   BAREBOX_CMD_GROUP(CMD_GRP_INFO)
+BAREBOX_CMD_END
-- 
1.7.10.4


___
barebox mailing list
barebox@lists.infradead.org

[PATCH 09/10] beautify PHY driver names

2014-05-30 Thread Holger Schurig
Some device names where texts like Atheros 8035 ethernet or similar. They
now got a prefix phy- and just their name and look now much more like the
other driver names.

Signed-off-by: Holger Schurig holgerschu...@gmail.com
---
 drivers/net/phy/at803x.c   |6 +++---
 drivers/net/phy/lxt.c  |2 +-
 drivers/net/phy/micrel.c   |   18 +-
 drivers/net/phy/national.c |2 +-
 drivers/net/phy/phy.c  |2 +-
 drivers/net/phy/smsc.c |   10 +-
 6 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c
index a244c87..a7b3ece 100644
--- a/drivers/net/phy/at803x.c
+++ b/drivers/net/phy/at803x.c
@@ -88,7 +88,7 @@ static struct phy_driver at803x_driver[] = {
/* ATHEROS 8035 */
.phy_id = 0x004dd072,
.phy_id_mask= 0xffef,
-   .drv.name   = Atheros 8035 ethernet,
+   .drv.name   = phy-ath8035,
.config_init= at803x_config_init,
.features   = PHY_GBIT_FEATURES,
.config_aneg= genphy_config_aneg,
@@ -97,7 +97,7 @@ static struct phy_driver at803x_driver[] = {
/* ATHEROS 8030 */
.phy_id = 0x004dd076,
.phy_id_mask= 0xffef,
-   .drv.name   = Atheros 8030 ethernet,
+   .drv.name   = phy-ath8030,
.config_init= at803x_config_init,
.features   = PHY_GBIT_FEATURES,
.config_aneg= genphy_config_aneg,
@@ -106,7 +106,7 @@ static struct phy_driver at803x_driver[] = {
/* ATHEROS 8031 */
.phy_id = 0x004dd074,
.phy_id_mask= 0xffef,
-   .drv.name   = Atheros 8031 ethernet,
+   .drv.name   = phy-ath8031,
.config_init= at803x_config_init,
.features   = PHY_GBIT_FEATURES,
.config_aneg= genphy_config_aneg,
diff --git a/drivers/net/phy/lxt.c b/drivers/net/phy/lxt.c
index 9e5ddbb..3ec5299 100644
--- a/drivers/net/phy/lxt.c
+++ b/drivers/net/phy/lxt.c
@@ -19,7 +19,7 @@ static struct phy_driver lxt97x_driver[] = {
 {
.phy_id = 0x001378e0,
.phy_id_mask= 0xfff0,
-   .drv.name   = LXT971,
+   .drv.name   = phy-lxt971,
.features   = PHY_BASIC_FEATURES,
 } };
 
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index 8aea653..cf4ee77 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -191,7 +191,7 @@ static struct phy_driver ksphy_driver[] = {
 {
.phy_id = PHY_ID_KS8737,
.phy_id_mask= 0x00f0,
-   .drv.name   = Micrel KS8737,
+   .drv.name   = phy-ks8737,
.features   = (PHY_BASIC_FEATURES | SUPPORTED_Pause),
.config_init= kszphy_config_init,
.config_aneg= genphy_config_aneg,
@@ -199,7 +199,7 @@ static struct phy_driver ksphy_driver[] = {
 }, {
.phy_id = PHY_ID_KSZ8021,
.phy_id_mask= 0x00ff,
-   .drv.name   = Micrel KSZ8021,
+   .drv.name   = phy-ksz8021,
.features   = (PHY_BASIC_FEATURES | SUPPORTED_Pause |
   SUPPORTED_Asym_Pause),
.config_init= ksz8021_config_init,
@@ -208,7 +208,7 @@ static struct phy_driver ksphy_driver[] = {
 }, {
.phy_id = PHY_ID_KSZ8031,
.phy_id_mask= 0x00ff,
-   .drv.name   = Micrel KSZ8031,
+   .drv.name   = phy-ksz8031,
.features   = (PHY_BASIC_FEATURES | SUPPORTED_Pause |
   SUPPORTED_Asym_Pause),
.config_init= ksz8021_config_init,
@@ -217,7 +217,7 @@ static struct phy_driver ksphy_driver[] = {
 }, {
.phy_id = PHY_ID_KSZ8041,
.phy_id_mask= 0x00f0,
-   .drv.name   = Micrel KSZ8041,
+   .drv.name   = phy-ksz8041,
.features   = (PHY_BASIC_FEATURES | SUPPORTED_Pause
| SUPPORTED_Asym_Pause),
.config_init= kszphy_config_init,
@@ -226,7 +226,7 @@ static struct phy_driver ksphy_driver[] = {
 }, {
.phy_id = PHY_ID_KSZ8051,
.phy_id_mask= 0x00f0,
-   .drv.name   = Micrel KSZ8051,
+   .drv.name   = phy-ksz8051,
.features   = (PHY_BASIC_FEATURES | SUPPORTED_Pause
| SUPPORTED_Asym_Pause),
.config_init= ks8051_config_init,
@@ -234,7 +234,7 @@ static struct phy_driver ksphy_driver[] = {
.read_status= genphy_read_status,
 }, {
.phy_id = PHY_ID_KSZ8001,
-   .drv.name   = Micrel KSZ8001 or KS8721,
+   .drv.name   = phy-ksz8001-ks8721,
.phy_id_mask= 0x00ff,
.features   = (PHY_BASIC_FEATURES | SUPPORTED_Pause),
.config_init= kszphy_config_init,
@@ -248,7 +248,7 @@ static struct phy_driver ksphy_driver[] = {
 */
.phy_id = PHY_ID_KSZ9021,
.phy_id_mask= 0x000e,
-   

[PATCH 07/10] misc: upper-case some abbreviations

2014-05-30 Thread Holger Schurig
Signed-off-by: Holger Schurig holgerschu...@gmail.com
---
 arch/arm/Kconfig |4 ++--
 arch/arm/cpu/cpu.c   |2 +-
 arch/arm/lib/bootm.c |4 ++--
 commands/Kconfig |   20 ++--
 common/bootm.c   |4 ++--
 common/filetype.c|   20 ++--
 lib/decompress_bunzip2.c |2 +-
 7 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index c236a9e..8674a2d 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -252,7 +252,7 @@ config THUMB2_BAREBOX
bool Compile barebox in thumb-2 mode (read help)
help
  This enables compilation of barebox in thumb-2 mode which generates
- ~25% smaller binaries. Arm Assembly code needs some fixups to be able
+ ~25% smaller binaries. ARM assembly code needs some fixups to be able
  to work correctly in thumb-2 mode. the barebox core should have these
  fixups since most assembly code is derived from the Kernel. However,
  your board lowlevel init code may break in thumb-2 mode. You have been
@@ -267,7 +267,7 @@ config ARM_BOARD_APPEND_ATAG
 
 endmenu
 
-menu Arm specific settings
+menu ARM specific settings
 
 config CPU_V7_DCACHE_SKIP
bool Skip DCache Invalidate
diff --git a/arch/arm/cpu/cpu.c b/arch/arm/cpu/cpu.c
index 895e07e..badd676 100644
--- a/arch/arm/cpu/cpu.c
+++ b/arch/arm/cpu/cpu.c
@@ -124,7 +124,7 @@ coredevice_initcall(arm_request_stack);
 static void thumb2_execute(void *func, int argc, char *argv[])
 {
/*
-* Switch back to arm mode before executing external
+* Switch back to ARM mode before executing external
 * programs.
 */
__asm__ __volatile__ (
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index 1d69052..4896d01 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -135,7 +135,7 @@ static int do_bootm_linux(struct image_data *data)
load_address = mem_start + PAGE_ALIGN(
   uimage_get_size(data-os, data-os_num) * 4);
if (bootm_verbose(data))
-   printf(no os load address, defaulting to 0x%08lx\n,
+   printf(no OS load address, defaulting to 0x%08lx\n,
load_address);
}
 
@@ -294,7 +294,7 @@ static int do_bootz_linux(struct image_data *data)
 
load_address = data-os_address;
if (bootm_verbose(data))
-   printf(no os load address, defaulting to 0x%08lx\n,
+   printf(no OS load address, defaulting to 0x%08lx\n,
load_address);
}
 
diff --git a/commands/Kconfig b/commands/Kconfig
index c3b4007..a1b1fc8 100644
--- a/commands/Kconfig
+++ b/commands/Kconfig
@@ -809,24 +809,24 @@ Detect file type
  what you have compiled into barebox. Example of filetype -l:
 
  known filetypes:
- arm-zimage  : arm Linux zImage
- lzo : lzo compressed
- lz4 : lz4 compressed
- arm-barebox : arm barebox image
+ arm-zimage  : ARM Linux zImage
+ lzo : LZO compressed
+ lz4 : LZ4 compressed
+ arm-barebox : ARM barebox image
  u-boot  : U-Boot uImage
  ubi : UBI image
  jffs2   : JFFS2 image
- gzip: gzip compressed
- bzip2   : bzip2 compressed
- dtb : open firmware flat device tree
- android : Android boot image
- sh  : Bourne Shell
+ gzip: GZIP compressed
+ bzip2   : BZIP2 compressed
+ dtb : open firmware Device Tree flattened Binary
+ android : android boot image
+ sh  : bourne SHell
  mips-barebox: MIPS barebox image
  fat : FAT filesytem
  mbr : MBR sector
  bmp : BMP image
  png : PNG image
- ext : ext filesystem
+ ext : EXT filesystem
  gpt : GUID Partition Table
  bpk : Binary PacKage
  bbenv   : barebox environment file
diff --git a/common/bootm.c b/common/bootm.c
index b250bd1..d6e02a7 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -403,7 +403,7 @@ int bootm_boot(struct bootm_data *bootm_data)
if (os_type == filetype_uimage) {
ret = bootm_open_os_uimage(data);
if (ret) {
-   printf(loading os image failed with %s\n,
+   printf(Loading OS image failed with %s\n,
strerror(-ret));
goto err_out;
}
@@ -455,7 +455,7 @@ int bootm_boot(struct bootm_data *bootm_data)
  

[PATCH 10/10] device drivers: harmonize underscore in driver names

2014-05-30 Thread Holger Schurig
Some device names were in the form imx_spi, others in the form imx-gpt.
As most device names used the dash and not the underscore, this device
driver harmonizes them all.

Signed-off-by: Holger Schurig holgerschu...@gmail.com
---
 arch/arm/boards/at91rm9200ek/init.c |8 
 arch/arm/boards/at91sam9261ek/init.c|4 ++--
 arch/arm/boards/at91sam9m10g45ek/init.c |2 +-
 arch/arm/boards/nhk8815/setup.c |2 +-
 arch/arm/boards/phytec-phycore-imx27/pcm970.c   |2 +-
 arch/arm/boards/tny-a926x/init.c|4 ++--
 arch/arm/boards/usb-a926x/init.c|4 ++--
 arch/arm/mach-imx/iim.c |2 +-
 arch/arm/mach-imx/imx25.c   |2 +-
 arch/arm/mach-imx/imx27.c   |2 +-
 arch/arm/mach-imx/imx31.c   |2 +-
 arch/arm/mach-imx/imx35.c   |2 +-
 arch/arm/mach-imx/imx51.c   |2 +-
 arch/arm/mach-imx/imx53.c   |2 +-
 arch/arm/mach-imx/ocotp.c   |2 +-
 arch/mips/mach-ar231x/ar231x_reset.c|2 +-
 arch/nios2/boards/generic/generic.c |2 +-
 arch/x86/boards/x86_generic/intf_platform_ide.c |4 ++--
 drivers/ata/intf_platform_ide.c |2 +-
 drivers/clk/clk-ar933x.c|2 +-
 drivers/clocksource/arm_smp_twd.c   |2 +-
 drivers/clocksource/nomadik.c   |2 +-
 drivers/gpio/gpio-davinci.c |2 +-
 drivers/gpio/gpio-pl061.c   |2 +-
 drivers/input/gpio_keys.c   |2 +-
 drivers/input/twl6030_pwrbtn.c  |2 +-
 drivers/mci/atmel_mci.c |2 +-
 drivers/mci/dw_mmc.c|2 +-
 drivers/mci/mci-bcm2835.c   |2 +-
 drivers/mci/mci_spi.c   |2 +-
 drivers/mci/mxs.c   |2 +-
 drivers/mci/s3c.c   |2 +-
 drivers/mtd/devices/mtd_dataflash.c |2 +-
 drivers/mtd/nand/atmel_nand.c   |2 +-
 drivers/mtd/nand/nand_imx.c |2 +-
 drivers/mtd/nand/nand_mxs.c |2 +-
 drivers/mtd/nand/nand_omap_gpmc.c   |4 ++--
 drivers/mtd/nand/nand_s3c24xx.c |2 +-
 drivers/mtd/nand/nomadik_nand.c |2 +-
 drivers/mtd/nor/cfi_flash.c |2 +-
 drivers/net/altera_tse.c|2 +-
 drivers/net/ar231x.c|2 +-
 drivers/net/arc_emac.c  |2 +-
 drivers/net/at91_ether.c|2 +-
 drivers/net/cpsw.c  |2 +-
 drivers/net/cs8900.c|2 +-
 drivers/net/davinci_emac.c  |2 +-
 drivers/net/designware.c|2 +-
 drivers/net/dm9k.c  |2 +-
 drivers/net/ep93xx.c|2 +-
 drivers/net/ethoc.c |2 +-
 drivers/net/fec_imx.c   |2 +-
 drivers/net/fec_mpc5200.c   |2 +-
 drivers/net/gianfar.c   |6 +++---
 drivers/net/ks8851_mll.c|2 +-
 drivers/net/ksz8864rmn.c|2 +-
 drivers/net/macb.c  |2 +-
 drivers/net/netx_eth.c  |2 +-
 drivers/net/orion-gbe.c |2 +-
 drivers/net/phy/mdio_bus.c  |2 +-
 drivers/net/smc9.c  |2 +-
 drivers/net/smc911x.c   |2 +-
 drivers/net/tap.c   |2 +-
 drivers/net/xgmac.c |2 +-
 drivers/pwm/pxa_pwm.c   |2 +-
 drivers/serial/arm_dcc.c|4 ++--
 drivers/serial/atmel.c  |2 +-
 drivers/serial/serial_altera.c  |2 +-
 drivers/serial/serial_altera_jtag.c |2 +-
 drivers/serial/serial_ar933x.c  |2 +-
 drivers/serial/serial_auart.c   |2 +-
 drivers/serial/serial_blackfin.c|2 +-
 drivers/serial/serial_cadence.c |2 +-
 drivers/serial/serial_imx.c |2 +-
 drivers/serial/serial_mpc5xxx.c |2 +-
 drivers/serial/serial_netx.c|2 +-
 drivers/serial/serial_ns16550.c |2 +-
 drivers/serial/serial_omap4_usbboot.c   |2 +-
 drivers/serial/serial_pl010.c   |2 +-
 drivers/serial/serial_pxa.c |2 +-
 

Re: [PATCH v2 2/7] ARM: uemd: add DEBUG_LL support

2014-05-30 Thread Holger Schurig
Oops, you're of course right!

___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


[RFC] picotcp.20140530

2014-05-30 Thread Antony Pavlov
Hi All!

My new barebox with picotcp support brunch is pushed to github:

https://github.com/frantony/barebox/tree/picotcp.20140530

For this version reworked content of Daniele Lacamera's push request
is used (see https://github.com/frantony/barebox/pull/1).

Changes since picotcp.20140525:

  * rebased over latest barebox;
  * the latest picotcp is used (warnings and big-endian
tests fixed);
  * add picotcp dhcp client support by Daniele Lacamera
  * qemu mips malta defconfig is dropped as barebox qemu
malta has no network device support (you can rebase
over experimental pci branch but it is very different story ...)
  * other small fixes.

-- 
Best regards,
  Antony Pavlov

___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: [PATCH 02/10] devinfo: reduce indentation

2014-05-30 Thread Holger Schurig
barebox:/ devinfo
devices:
`-- global
`-- platform
   `-- mem0
  `-- 0x-0x3fff (1 GiB): /dev/ram0
   `-- a01000.interrupt-controller
   `-- soc.0
  `-- 11.dma-apbh
  `-- a00600.timer
  `-- a02000.l2-cache
...

___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: [PATCH 03/10] devinfo: make the output of devinfo DEVICE nicer

2014-05-30 Thread Holger Schurig
Example output before of devinfo fb0:

resources:
num   : 0
start : 0x4c242000
size  : 0x0030
driver: none
bus: none

available modes:
hsd100pxn1   1024x768@0

Parameters:
  enable = 0
   mode_name = hsd100pxn1 (hsd100pxn1)


Example output after this patch:

Resources:
  num: 0
  start: 0x4c242000
  size: 0x0030
Available modes:
  hsd100pxn1: 1024x768@0
Parameters:
  enable: 0
  mode_name: hsd100pxn1 (hsd100pxn1)

___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: [PATCH 01/10] drvlist: factor the driver list out of 'devinfo'

2014-05-30 Thread Holger Schurig
barebox:/ drvinfo
Driver  Device(s)
---
imx-gpio
209c000.gpio
20a.gpio
20a4000.gpio
20a8000.gpio
20ac000.gpio
20b.gpio
20b4000.gpio
imx6-ccm
20c4000.ccm
imx-iomuxv3
20e.iomuxc
imx-gpt
2098000.gpt
...
mem
mem0
mem1
barebox-environment

Use 'devinfo DEVICE' for more information
barebox:/

___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: [PATCH 04/10] parameters: only show possible enumerations if there are any

2014-05-30 Thread Holger Schurig
Before this patch, drvinfo fb0 displayed (beside other things):

Parameters:
  enable: 0
  mode_name: hsd100pxn1 (hsd100pxn1)

Now it shows:

Parameters:
  enable: 0
  mode_name: hsd100pxn1

___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


[RFC] net: picoping: try to make it asynchronious: fail

2014-05-30 Thread Antony Pavlov
Picotcp tends to work in an asynchronious way.

E.g. for ping we have to use pico_icmp4_ping()
(to start ping task) and the special icmp4 handler
(callback function) cb_ping().

But the ping command in barebox works in very simple
way:

  * user types 'ping IP' in the barebox shell command line;
  * the ping command takes all control until it gets the positive
or a negative result;
  * the control is returned to the barebox shell.

To use asynchronious-oriented picotcp functions in syncronious-oriented
barebox workflow we have to work out necessary picotcp usage template.

This patch propose simplest template. But this template has two major
disadvantages:

  * user can't completely cancel ping using ctrl-c,
the ping request send task continue to work in the background:

barebox@barebox sandbox:/ picoping 10.0.0.2
48 bytes from 10.0.0.2: icmp_req=1 ttl=64 time=0 ms
48 bytes from 10.0.0.2: icmp_req=2 ttl=64 time=0 ms
48 bytes from 10.0.0.2: icmp_req=3 ttl=64 time=0 ms
ctrl-c pressed
barebox@barebox sandbox:/ picoping 10.0.0.2
48 bytes from 10.0.0.2: icmp_req=1 ttl=64 time=1 ms
48 bytes from 10.0.0.2: icmp_req=5 ttl=64 time=0 ms
48 bytes from 10.0.0.2: icmp_req=2 ttl=64 time=0 ms
48 bytes from 10.0.0.2: icmp_req=6 ttl=64 time=0 ms
48 bytes from 10.0.0.2: icmp_req=3 ttl=64 time=0 ms
48 bytes from 10.0.0.2: icmp_req=7 ttl=64 time=0 ms
48 bytes from 10.0.0.2: icmp_req=4 ttl=64 time=0 ms
48 bytes from 10.0.0.2: icmp_req=8 ttl=64 time=0 ms

  * user has to press ctrl-c after the last ping response is received
to return to barebox shell.

Has anybody any ideas how to improve the situation?
---
 net/test_picotcp.c | 21 +
 1 file changed, 21 insertions(+)

diff --git a/net/test_picotcp.c b/net/test_picotcp.c
index 5f7138e..035ef09 100644
--- a/net/test_picotcp.c
+++ b/net/test_picotcp.c
@@ -98,9 +98,15 @@ BAREBOX_CMD_START(test_picotcp)
 BAREBOX_CMD_END
 
 #include pico_icmp4.h
+#include poller.h
 
 #define NUM_PING 10
 
+#define PING_STATE_WORK0
+#define PING_STATE_DONE1
+
+static int ping_state;
+
 /* callback function for receiving ping reply */
 void cb_ping(struct pico_icmp4_stats *s)
 {
@@ -108,6 +114,10 @@ void cb_ping(struct pico_icmp4_stats *s)
int time_sec = 0;
int time_msec = 0;
 
+   if (ping_state == PING_STATE_DONE) {
+   return;
+   }
+
/* convert ip address from icmp4_stats structure to string */
pico_ipv4_to_string(host, s-dst.addr);
 
@@ -132,8 +142,19 @@ static int do_picoping(int argc, char *argv[])
return 1;
}
 
+   ping_state = PING_STATE_WORK;
+
pico_icmp4_ping(argv[1], NUM_PING, 1000, 5000, 48, cb_ping);
 
+   while (ping_state != PING_STATE_DONE) {
+   if (ctrlc()) {
+   ping_state = PING_STATE_DONE;
+   break;
+   }
+   get_time_ns();
+   poller_call();
+   }
+
return 0;
 }
 
-- 
1.9.2


___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: [PATCH 09/10] beautify PHY driver names

2014-05-30 Thread Alexander Aring
Hi,

On Fri, May 30, 2014 at 11:07:35AM +0200, Holger Schurig wrote:
 Some device names where texts like Atheros 8035 ethernet or similar. They
 now got a prefix phy- and just their name and look now much more like the
 other driver names.


these names are taken from linux kernel code to have a similar name
convention like linux in barebox.

I would leave the names like linux. Maybe you get a name prefix into the
linux kernel, then we should change it in barebox also.

If you want to try that I wish you good luck. :-)

- Alex

___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: [PATCH 09/10] beautify PHY driver names

2014-05-30 Thread Holger Schurig
I changed them because (before my patches) the driver list in
devinfo looked ugly, with my drvinfo command that one looked ugly.
Those driver names sticked out like a sore thumb.

Now, if I do diff linux/driver/net/phy/micrel.c
barebox/driver/net/phy/micrel.c, I can see that those files are a bit
similar ... but only a bit. Diff spits out 569 lines of diff output.
And as micrel.c is only 281 lines long, this means that almost no
identical lines are in those two files anyway ...so, the drivers
are following the Linux model, but they are not Linux drivers anyway.

As this is purely cosmetical, I won't fight over it. Or at least not more :-)

___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: [PATCH 06/10] meminfo: purely cosmetical changes

2014-05-30 Thread Antony Pavlov
On Fri, 30 May 2014 11:07:32 +0200
Holger Schurig holgerschu...@gmail.com wrote:

cosmetic?

I can't find the word cosmetical in my dictionary.

P.S. I by myself often write unificate instead of unify :)

 Signed-off-by: Holger Schurig holgerschu...@gmail.com
 ---
  common/dlmalloc.c|8 
  common/tlsf_malloc.c |2 +-
  2 files changed, 5 insertions(+), 5 deletions(-)
 
 diff --git a/common/dlmalloc.c b/common/dlmalloc.c
 index f006206..d831e90 100644
 --- a/common/dlmalloc.c
 +++ b/common/dlmalloc.c
 @@ -1942,13 +1942,13 @@ static void malloc_update_mallinfo(void)
  void malloc_stats(void)
  {
   malloc_update_mallinfo();
 - printf(max system bytes = %10u\n, (unsigned int)(max_total_mem));
 - printf(system bytes = %10u\n,
 + printf(Maximum system memory: %u\n, (unsigned int)(max_total_mem));
 + printf(Current system memory: %u\n,
   (unsigned int)(sbrked_mem + mmapped_mem));
 - printf(in use bytes = %10u\n,
 + printf(in use: %u\n,
   (unsigned int)(current_mallinfo.uordblks + mmapped_mem));
  #if HAVE_MMAP
 - fprintf(stderr, max mmap regions = %10u\n,
 + printf(Maximum mmap'ed mmap regions: %u\n,
(unsigned int) max_n_mmaps);
  #endif
  }
 diff --git a/common/tlsf_malloc.c b/common/tlsf_malloc.c
 index aa8fc13..a3541d8 100644
 --- a/common/tlsf_malloc.c
 +++ b/common/tlsf_malloc.c
 @@ -97,5 +97,5 @@ void malloc_stats(void)
  
   tlsf_walk_heap(tlsf_mem_pool, malloc_walker, s);
  
 - printf(used: %10zu\nfree: %10zu\n, s.used, s.free);
 + printf(used: %zu\nfree: %zu\n, s.used, s.free);
  }
 -- 
 1.7.10.4
 
 
 ___
 barebox mailing list
 barebox@lists.infradead.org
 http://lists.infradead.org/mailman/listinfo/barebox


-- 
-- 
Best regards,
  Antony Pavlov

___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: [PATCH 06/10] meminfo: purely cosmetical changes

2014-05-30 Thread Holger Schurig
Use another directory then :-)

http://www.dict.cc/deutsch-englisch/kosmetisch.html

___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


[PATCH] oftree, of_dump: fix help texts

2014-05-30 Thread Holger Schurig
* don't use FOO for options
* don't use \n in BAREBOX_CMD_HELP_OPT
* harmonize Kconfig help text with command help text

Signed-off-by: Holger Schurig holgerschu...@gmail.com
---
 commands/Kconfig   |   11 ++-
 commands/of_dump.c |6 +++---
 commands/oftree.c  |4 ++--
 3 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/commands/Kconfig b/commands/Kconfig
index 6043cb6..bd058ae 100644
--- a/commands/Kconfig
+++ b/commands/Kconfig
@@ -1897,7 +1897,7 @@ config CMD_OF_DUMP
  Usage: of_dump [-f] [NODE]
 
  Options:
-   -f dtbwork on dtb instead of internal devicetree
+   -f DTB   work on DTB instead of internal devicetree
 
 config CMD_OF_NODE
tristate
@@ -1938,12 +1938,13 @@ config CMD_OFTREE
help
  oftree - handle device trees
 
- Usage: oftree [-lpfdn] [DTB]
+ Usage: oftree [-lspf]
 
  Options:
- -lLoad DTB to internal device tree
- -pprobe devices from stored device tree
- -ffree stored device tree
+   -l DTB  Load DTB to internal devicetree
+   -s DTB  save internal devicetree to DTB
+   -p  probe devices from stored device tree
+   -f  free stored device tree
 
 config CMD_TIME
bool time
diff --git a/commands/of_dump.c b/commands/of_dump.c
index e341942..e85d859 100644
--- a/commands/of_dump.c
+++ b/commands/of_dump.c
@@ -95,13 +95,13 @@ out:
 
 BAREBOX_CMD_HELP_START(of_dump)
 BAREBOX_CMD_HELP_TEXT(Options:)
-BAREBOX_CMD_HELP_OPT  (-f dtb,  work on dtb instead of internal 
devicetree\n)
+BAREBOX_CMD_HELP_OPT  (-f DTB,  work on dtb instead of internal devicetree)
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(of_dump)
.cmd= do_of_dump,
-   BAREBOX_CMD_DESC(dump devicetree nodes)
-   BAREBOX_CMD_OPTS([-f])
+   BAREBOX_CMD_DESC(Dump device tree or parts of it.)
+   BAREBOX_CMD_OPTS([-f] [NODE])
BAREBOX_CMD_GROUP(CMD_GRP_MISC)
BAREBOX_CMD_COMPLETE(devicetree_file_complete)
BAREBOX_CMD_HELP(cmd_of_dump_help)
diff --git a/commands/oftree.c b/commands/oftree.c
index a3b0e04..1ab86f0 100644
--- a/commands/oftree.c
+++ b/commands/oftree.c
@@ -136,8 +136,8 @@ out:
 
 BAREBOX_CMD_HELP_START(oftree)
 BAREBOX_CMD_HELP_TEXT(Options:)
-BAREBOX_CMD_HELP_OPT (-l DTB,  Load DTB to internal devicetree\n)
-BAREBOX_CMD_HELP_OPT (-s DTB,  save internal devicetree to DTB\n)
+BAREBOX_CMD_HELP_OPT (-l DTB,  Load DTB to internal devicetree)
+BAREBOX_CMD_HELP_OPT (-s DTB,  save internal devicetree to DTB)
 BAREBOX_CMD_HELP_OPT (-p,  probe devices from stored device tree)
 BAREBOX_CMD_HELP_OPT (-f,  free stored device tree)
 BAREBOX_CMD_HELP_END
-- 
1.7.10.4


___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox