Re: [PATCH 1/2] usb: remove unimplemented usb_get_dev_index() declaration

2014-05-21 Thread Sascha Hauer
On Thu, May 22, 2014 at 09:19:11AM +0400, Antony Pavlov wrote: > We do not have usb_get_dev_index() function, so remove this declaration. > > Signed-off-by: Antony Pavlov Applied, thanks Sascha > --- > include/usb/usb.h | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/include/usb/usb.

Re: [PATCH] vsprintf: fix formatting

2014-05-21 Thread Sascha Hauer
On Thu, May 22, 2014 at 09:20:04AM +0400, Antony Pavlov wrote: > Signed-off-by: Antony Pavlov Applied, thanks Sascha > --- > lib/vsprintf.c | 11 ++- > 1 file changed, 6 insertions(+), 5 deletions(-) > > diff --git a/lib/vsprintf.c b/lib/vsprintf.c > index c73db73..066338b 100644 > --

Re: [PATCH 3/6] commands: add of_dump command

2014-05-21 Thread Sascha Hauer
On Wed, May 21, 2014 at 03:17:20PM +0200, Holger Schurig wrote: > > + -f work on instead of internal devicetree > > +BAREBOX_CMD_HELP_OPT ("-f ", "work on instead of internal > > devicetree\n") > > In my command-rework patches I have used "-f FOO" instead of "-f > ". Two

Re: [PATCH 1/3] openrisc: update SPR registers definition

2014-05-21 Thread Sascha Hauer
On Wed, May 21, 2014 at 11:32:27PM +0200, Franck Jullien wrote: > The OpenRISC architecture specification v1.0 defines > new SPR registers. This patch adds registers definition > for group 0 and update bit definitions for the CPU > configuration register. > > Signed-off-by: Franck Jullien Applie

Re: [PATCH] devinfo: add human readable size after memory range

2014-05-21 Thread Sascha Hauer
On Wed, May 21, 2014 at 09:43:16PM +0200, Franck Jullien wrote: > It's not always easy to know what is the size of a parition. > > This patch adds the size of a memory range in human readable > format. We now have for example: > > ` cfi_flash0 > ` nor0 > ` 0x-0x

[PATCH 1/2] usb: remove unimplemented usb_get_dev_index() declaration

2014-05-21 Thread Antony Pavlov
We do not have usb_get_dev_index() function, so remove this declaration. Signed-off-by: Antony Pavlov --- include/usb/usb.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/usb/usb.h b/include/usb/usb.h index 9319f2e..b4ac4ba 100644 --- a/include/usb/usb.h +++ b/include/usb/usb.h @@ -2

[PATCH] vsprintf: fix formatting

2014-05-21 Thread Antony Pavlov
Signed-off-by: Antony Pavlov --- lib/vsprintf.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/vsprintf.c b/lib/vsprintf.c index c73db73..066338b 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -370,7 +370,7 @@ int vsnprintf(char *buf, size_t size, const c

[PATCH 2/2] usb: drop unused USB_UHCI_*_ID macros

2014-05-21 Thread Antony Pavlov
Signed-off-by: Antony Pavlov --- include/usb/usb.h | 4 1 file changed, 4 deletions(-) diff --git a/include/usb/usb.h b/include/usb/usb.h index b4ac4ba..6f5a351 100644 --- a/include/usb/usb.h +++ b/include/usb/usb.h @@ -219,10 +219,6 @@ int usb_register_host(struct usb_host *); int usb_h

Приветствую, по поводу lists.infradead.org

2014-05-21 Thread Иван
Приветствую. Меня зовут Виктор и я представляю партнерскую программу PowerLead. Большая часть аудитории Вашего сайта lists.infradead.org желает получить нужную информацию прямо сейчас. Я предлагаю Вам хорошо зарабатывать. Установите "Онлайн-консультанта"! Задав вопрос эксперту, Ваш посетитель н

[PATCH 2/3] openrisc: fix relocation code

2014-05-21 Thread Franck Jullien
The relocation code can now relocate from anywhere to the RAM. The old code assumed that the binary was copied to the RAM by some PBL and then it just relocated the .text section from the loaded address to the linked address. Now, it first checks if vectors are somewhere else than the linked addr

[PATCH 1/3] openrisc: update SPR registers definition

2014-05-21 Thread Franck Jullien
The OpenRISC architecture specification v1.0 defines new SPR registers. This patch adds registers definition for group 0 and update bit definitions for the CPU configuration register. Signed-off-by: Franck Jullien --- arch/openrisc/include/asm/spr-defs.h | 13 - 1 files changed, 12

[PATCH 3/3] openrisc: update cpuinfo

2014-05-21 Thread Franck Jullien
Update cpuinfo to display the current CPU implementation using the VR2 register defined in the architecture specification v1.0 Signed-off-by: Franck Jullien --- arch/openrisc/lib/cpuinfo.c | 50 +++ 1 files changed, 50 insertions(+), 0 deletions(-) diff

[PATCH] devinfo: add human readable size after memory range

2014-05-21 Thread Franck Jullien
It's not always easy to know what is the size of a parition. This patch adds the size of a memory range in human readable format. We now have for example: ` cfi_flash0 ` nor0 ` 0x-0x00ff (16 MiB): /dev/nor0 ` 0x-0x0001 ( 128 K

Re: [PATCH] [RFC] [WIP] commands: add tree view capable lsusb

2014-05-21 Thread Antony Pavlov
On Wed, 21 May 2014 15:20:21 +0200 Holger Schurig wrote: > Nice, I would just remove the extra empty lines. Linux' "lsusb -t" for Good idea! I'll take a look on Linux' lsusb too. > example produces this: > > holger@desktop:~$ lsusb -t > /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci

Re: [PATCH] commands: add 'findstr' to get string from file

2014-05-21 Thread Sascha Hauer
Hi Christoph, On Tue, May 20, 2014 at 07:27:55PM +0200, Christoph Fritz wrote: > Command 'findstr' can be for example used to find the string > "MAC=1C:BA:8C:F3:82:BB" in file /dev/eeprom0 to set the > appropriate variable: > > $ findstr -o 4 -l 17 -t eth0.ethaddr MAC /dev/eeprom0 > > Usage: fi

Re: [PATCH 5/6] of: Drop devicetree merge support

2014-05-21 Thread Holger Schurig
> I assume I am the only person knowing that barebox is able to > merge devicetrees. Hihi, any software feature that isn't documented is (almost) the same as never been written. I personally don't need merging, but maybe it can be handy to support those boards that have plug-on boards, a la "Shie

Re: [PATCH] [RFC] [WIP] commands: add tree view capable lsusb

2014-05-21 Thread Holger Schurig
Nice, I would just remove the extra empty lines. Linux' "lsusb -t" for example produces this: holger@desktop:~$ lsusb -t /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M |__ Port 1: Dev 2, If 0, Class=hub, Driver=hub/8p, 480M |__ Port 1: Dev 27, If 0, Class=HID, Drive

Re: [PATCH 3/6] commands: add of_dump command

2014-05-21 Thread Holger Schurig
> + -f work on instead of internal devicetree > +BAREBOX_CMD_HELP_OPT ("-f ", "work on instead of internal > devicetree\n") In my command-rework patches I have used "-f FOO" instead of "-f ". Two reasons: 1. saves 2 bytes 2. less occurences of column align fixup with ex

Re: [PATCH 5/6] of: Drop devicetree merge support

2014-05-21 Thread Sascha Hauer
On Wed, May 21, 2014 at 08:35:11AM +0200, Esben Haabendal wrote: > Sebastian Hesselbarth writes: > > > On 05/19/2014 10:59 PM, Sascha Hauer wrote: > >> I assume I am the only person knowing that barebox is able to > >> merge devicetrees. This feature seems broken for a while now since > >> trying

Re: [PATCH 06/10] net: orion-gbe: use transparent-to-driver of mdio functions

2014-05-21 Thread Sebastian Hesselbarth
On 05/21/2014 02:18 PM, Sascha Hauer wrote: barebox can transparently handle phys specified in the devicetree. Use this functionality in the orion-gbe driver. This requires: - add a device to the orion-gbe ports. This has the port device_node attached and is set as the parent of the ethernet

Re: [PATCH 05/10] net: phy: Support limiting phy speed in the devicetree

2014-05-21 Thread Sebastian Hesselbarth
On 05/21/2014 02:18 PM, Sascha Hauer wrote: Even when both the ethernet controller and the phy support certain features a board may have additional limitations. Allow specifying it in the devicetree. Signed-off-by: Sascha Hauer --- drivers/net/phy/mdio_bus.c | 36 +

[PATCH 02/10] net: phy: move setting of phy_map to phy_register_device

2014-05-21 Thread Sascha Hauer
The phy_map should be valid once a phy_device is registered. This allows registering phys outside of mdiobus_scan. Signed-off-by: Sascha Hauer --- drivers/net/phy/mdio_bus.c | 2 -- drivers/net/phy/phy.c | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/

[PATCH 05/10] net: phy: Support limiting phy speed in the devicetree

2014-05-21 Thread Sascha Hauer
Even when both the ethernet controller and the phy support certain features a board may have additional limitations. Allow specifying it in the devicetree. Signed-off-by: Sascha Hauer --- drivers/net/phy/mdio_bus.c | 36 +++- include/linux/phy.h| 22 ++

[PATCH 10/10] net: fec_imx: Add devicetree support for mdio bus

2014-05-21 Thread Sascha Hauer
The fec has a mdio bus. This adds support for a subnode in which the phys on this bus can be specified. Signed-off-by: Sascha Hauer --- drivers/net/fec_imx.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/net/fec_imx.c b/drivers/net/fec_imx.c index 72e689d..cc2a331 100644 --- a

[PATCH 09/10] net: phy: genphy: Make it work with of_set_phy_supported

2014-05-21 Thread Sascha Hauer
phys start with features initialized from the phy driver and are eventually limited by of_set_phy_supported. This does not work with the genphy driver which starts with no features and overwrites phydev->supported with the values read from hardware in config_init. This overwrites the features adjus

[PATCH] devicetree support for ethernet phys

2014-05-21 Thread Sascha Hauer
This series adds support for specifying ethernet phys in the devicetree and to connect them with ethernet devices. We already have beginning support for that used in the orion-gbe driver. This series has the advantage that the devicetree handling is completely transparent to the ethernet driver as

[PATCH 04/10] net: phy: Support finding a phy in the devicetree

2014-05-21 Thread Sascha Hauer
When the ethernet device has a device_node then try finding the associated phy via the phy-handle property. This makes the phy handling via devicetree transparent to the ethernet drivers. Signed-off-by: Sascha Hauer --- drivers/net/phy/phy.c | 30 ++ 1 file changed,

[PATCH 08/10] net: phy: genphy: always write MII_CTRL1000 when available

2014-05-21 Thread Sascha Hauer
the phydev->supported field does not necessarily match the hardware capabilities, it could be limited by the board to force the phy to a lower speed. In this case make sure the gigabit advertise bits are cleared on a gigabit phy. Signed-off-by: Sascha Hauer --- drivers/net/phy/phy.c | 9 ++--

[PATCH 1/2] net: fec_imx: mask mii register reads correctly

2014-05-21 Thread Sascha Hauer
mii registers are 16bit wide, so mask out the higher bits. The higher bits confuse mii-tool. Signed-off-by: Sascha Hauer --- drivers/net/fec_imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/fec_imx.c b/drivers/net/fec_imx.c index 72e689d..714f8f2 100644 --- a

[PATCH 07/10] net: phy: remove now unused of_phy_device_connect

2014-05-21 Thread Sascha Hauer
Since barebox handles phys from devicetree transparently we no longer need of_phy_device_connect. Signed-off-by: Sascha Hauer --- drivers/net/phy/phy.c | 31 --- include/linux/phy.h | 14 -- 2 files changed, 45 deletions(-) diff --git a/drivers/net/phy/

[PATCH 03/10] net: phy: register phys specified in devicetree

2014-05-21 Thread Sascha Hauer
When a mdio bus has a device node attached then register the phys specified there. This makes it possible to lookup the phys using phandles later. Signed-off-by: Sascha Hauer --- drivers/net/phy/mdio_bus.c | 69 ++ 1 file changed, 69 insertions(+) dif

[PATCH 2/2] net: fec_imx: check return value of registration functions

2014-05-21 Thread Sascha Hauer
We do not care about releasing the resources in the error path, but at least check the return value of eth_register and mdiobus_register. Signed-off-by: Sascha Hauer --- drivers/net/fec_imx.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/fec_imx.c b/dri

[PATCH 01/10] net: phy: factor out phy_device_attach function

2014-05-21 Thread Sascha Hauer
phy_device_connect combines searching for a phy with actually attaching it to the ethernet device. Factor out a phy_device_attach function to have a function for each purpose. This makes the logic of phy_device_connect simpler. Signed-off-by: Sascha Hauer --- drivers/net/phy/phy.c | 99 +

[PATCH 06/10] net: orion-gbe: use transparent-to-driver of mdio functions

2014-05-21 Thread Sascha Hauer
barebox can transparently handle phys specified in the devicetree. Use this functionality in the orion-gbe driver. This requires: - add a device to the orion-gbe ports. This has the port device_node attached and is set as the parent of the ethernet device so that the ethernet code finds the co

[PATCH] mii-tool fixes

2014-05-21 Thread Sascha Hauer
The mii-tool command has several bugs in the gigabit support. This series has some fixes for them. Sascha Hauer (3): mii-tool: Fix string length mii-tool: Fix gigabit link test mii-tool: Fix gigabit advertise / link

[PATCH 2/3] mii-tool: Fix gigabit link test

2014-05-21 Thread Sascha Hauer
media_list tests for gigabit phys like this: if (mask & BMCR_SPEED1000) mask does not contain the value of the BMCR register though, so the test is completely bogus. Test for mask2 instead which is only nonzero when the phy has gigabit capabilities. Signed-off-by: Sascha Hauer --- commands/mii

[PATCH 3/3] mii-tool: Fix gigabit advertise / link partner ability mixup

2014-05-21 Thread Sascha Hauer
bmcr2 contains the gigabit advertise bits and lpa2 contains the gigabit link partner ability bits, not the other way round. Signed-off-by: Sascha Hauer --- commands/miitool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/miitool.c b/commands/miitool.c index 341

[PATCH 1/3] mii-tool: Fix string length

2014-05-21 Thread Sascha Hauer
media_list writes into a static string. Worst case length of this string is 125 bytes, but the function only allocates 100 bytes. Use 256 bytes which is long enough for some extensions. Signed-off-by: Sascha Hauer --- commands/miitool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

Re: [PATCH v2] commands: add 'findstr' to search file for string

2014-05-21 Thread Christoph Fritz
Hi Antony On Wed, 2014-05-21 at 13:22 +0400, Antony Pavlov wrote: > On Wed, 21 May 2014 10:02:42 +0200 > Christoph Fritz wrote: > > > Command 'findstr' can be for example used to find string > > We already have some commands with string.h style names: > memcmp, memcpy, memset > > Can we use

Re: [PATCH v2] commands: add 'findstr' to search file for string

2014-05-21 Thread Antony Pavlov
On Wed, 21 May 2014 10:02:42 +0200 Christoph Fritz wrote: > Command 'findstr' can be for example used to find string We already have some commands with string.h style names: memcmp, memcpy, memset Can we use 'strstr' name for your new command? Another proposition: can we add and paramete

[PATCH] [RFC] [WIP] commands: add tree view capable lsusb

2014-05-21 Thread Antony Pavlov
This patch adds U-Boot 'usb tree' command functionality to barebox. Here is a sample 'lsusb -t' output on RC Module MB 77.07 board with numerous USB devices attached: MB 77.07: / lsusb -t USB: scanning bus for devices... 0 USB Device(s) found 1 ID : | u-boot EHCI Host Controller |

[PATCH v2] commands: add 'findstr' to search file for string

2014-05-21 Thread Christoph Fritz
Command 'findstr' can be for example used to find string "MAC=1C:BA:8C:F3:82:BB" in file /dev/eeprom0 to set an appropriate environment variable: $ findstr -o 16 -l 17 -t eth0.ethaddr pcm051_eth0_MAC= /dev/eeprom0 Usage: findstr [OPTIONS] Find ASCII string in file and print it -o set offs