[PATCH] elf.h: Use EI_NIDENT instead of numeric value

2017-10-09 Thread Antony Pavlov
This is an adoption of the linux kernel commit | commit eb6900fbfa43cb50391b80b38608e25280705693 | Author: Cyrill Gorcunov | Date: Tue Apr 29 01:01:17 2008 -0700 | | ELF: Use EI_NIDENT instead of numeric value | | Signed-off-by: Cyrill Gorcunov

Re: [PATCH 3/3] HACK: e1000: don't check for FLSWCTL.GLDONE when waiting for idle

2017-10-09 Thread Uwe Kleine-König
On Mon, Oct 09, 2017 at 11:36:16AM +0200, Uwe Kleine-König wrote: > I don't understand all the consequences of this patch yet, but this makes > reading > out the flash chip connected to an i210 work for me. > --- > drivers/net/e1000/eeprom.c | 4 ++-- > 1 file changed, 2 insertions(+), 2

Re: [PATCH 3/3] HACK: e1000: don't check for FLSWCTL.GLDONE when waiting for idle

2017-10-09 Thread Andrey Smirnov
On Mon, Oct 9, 2017 at 7:24 AM, Uwe Kleine-König wrote: > On Mon, Oct 09, 2017 at 11:36:16AM +0200, Uwe Kleine-König wrote: >> I don't understand all the consequences of this patch yet, but this makes >> reading >> out the flash chip connected to an i210 work for

Re: [PATCH 3/3] HACK: e1000: don't check for FLSWCTL.GLDONE when waiting for idle

2017-10-09 Thread Uwe Kleine-König
On Mon, Oct 09, 2017 at 11:15:09AM -0700, Andrey Smirnov wrote: > On Mon, Oct 9, 2017 at 7:24 AM, Uwe Kleine-König > wrote: > > On Mon, Oct 09, 2017 at 11:36:16AM +0200, Uwe Kleine-König wrote: > >> I don't understand all the consequences of this patch yet, but

Re: [PATCH 1/3] e1000: implement register mapping for E1000_{EERD,FLSW{CTL,DATA,CNT}}

2017-10-09 Thread Uwe Kleine-König
On Mon, Oct 09, 2017 at 11:22:34AM -0700, Andrey Smirnov wrote: > On Mon, Oct 9, 2017 at 2:36 AM, Uwe Kleine-König > wrote: > > Fixes: 4ff3269a70b5 ("e1000: Expose i210's external flash as MTD") > > Signed-off-by: Uwe Kleine-König >

Re: [PATCH 0/3] gpiolib: introduce gpio initializer

2017-10-09 Thread Uwe Kleine-König
Hello Sascha, On Fri, Oct 06, 2017 at 06:29:00AM +0200, Sascha Hauer wrote: > On Tue, Sep 26, 2017 at 11:26:43PM +0200, Uwe Kleine-König wrote: > > the target of this series is to allow gpios to be initialized but > > without the side effect that the gpios are unusable then (as is the case > >

Re: [PATCH 1/3] e1000: implement register mapping for E1000_{EERD, FLSW{CTL, DATA, CNT}}

2017-10-09 Thread Andrey Smirnov
On Mon, Oct 9, 2017 at 2:36 AM, Uwe Kleine-König wrote: > Fixes: 4ff3269a70b5 ("e1000: Expose i210's external flash as MTD") > Signed-off-by: Uwe Kleine-König > --- > drivers/net/e1000/e1000.h | 9 + >

[PATCH v2 3/3] e1000: Don't poll for FLSWCTL.GLDONE before starting a flash transaction

2017-10-09 Thread Uwe Kleine-König
While FLSWCTL.GLDONE is set when the last transaction was fully completed, there is no good reason to depend on this. According to the i210 datasheet having FLSWCTL.DONE is enough. Signed-off-by: Uwe Kleine-König --- drivers/net/e1000/eeprom.c | 13 ++---

Re: [PATCH 2/3] e1000: implement support for smaller flash chips

2017-10-09 Thread Andrey Smirnov
On Mon, Oct 9, 2017 at 2:36 AM, Uwe Kleine-König wrote: > In older revisions of the i210 data sheet (rev 2.8) M25PE80 (1 MiB) is still > listed as supported. So check the full range of FLA.FL_SIZE which also > simplifies the code. > Looks good to me: Acked-by:

[PATCH v2 1/3] e1000: implement register mapping for E1000_FLSW{CTL, DATA, CNT}

2017-10-09 Thread Uwe Kleine-König
Fixes: 4ff3269a70b5 ("e1000: Expose i210's external flash as MTD") Acked-by: Andrey Smirnov Signed-off-by: Uwe Kleine-König --- drivers/net/e1000/e1000.h | 6 +++--- drivers/net/e1000/regio.c | 9 + 2 files changed, 12

[PATCH v2 2/3] e1000: implement support for smaller flash chips

2017-10-09 Thread Uwe Kleine-König
Even though the register description of the FLA register suggests (on page 386 of the i210 datasheet (rev. 3.1)) that 2 MB, 4 MB and 8 MB are the only supported flash sizes, the list of supported flashes (on page 794 of the same document) lists for example a Micron M25PE80 which only has a size of

[PATCH v2 0/3] e1000: fix access to companion flash chip

2017-10-09 Thread Uwe Kleine-König
Hello, this is v2 of the series. Compared to (implicit) v1 I worked in Andrey's feedback and updated the commit logs. The third patch is not marked as HACK any more (and got some reformatting). In the mean time I also tested successfully the write support. For NDA reasons I don't have access to

[PATCH v1 2/2] command ccrypt

2017-10-09 Thread Gerd Pauli
Crypt and Decrypt Files using Password in Keystore needs ccryptlib and keystore Rijandel Crypt and Decrypt of files Usage: ccrypt [-e|-d] -k KEYNAME_IN_KEYSTORE SRC DST Signed-off-by: Gerd Pauli --- commands/Kconfig | 10 +++ commands/Makefile | 1 +

[PATCH v1 1/2] ccryptlib: library for encrypting/decrypting

2017-10-09 Thread Gerd Pauli
ccryptlib implements a stream cipher based on the block cipher Rijndael, the candidate for the AES standard. Ported 2017 to barebox by Gerd Pauli Copyright (C) 2000-2009 Peter Selinger. Signed-off-by: Gerd Pauli --- include/ccryptlib.h |

[PATCH] eeprom: at24: fix 'assignment from incompatible pointer type' warning

2017-10-09 Thread Antony Pavlov
The patch fixes this compiler's warning: CC drivers/eeprom/at24.o drivers/eeprom/at24.c: In function ‘at24_probe’: drivers/eeprom/at24.c:453:21: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types] at24->fops.protect = at24_cdev_protect,

again [PATCH v1 2/2] command ccrypt

2017-10-09 Thread Gerd Pauli
There was a bug in the last mail i sent. [PATCH v1 2/2] command ccrypt This is the fix. Sorry for the dust :-) Crypt and decrypt files using passwords in keystore. Needs ccryptlib and keystore Usage: ccrypt [-e|-d] -k KEYNAME_IN_KEYSTORE SRC DST Signed-off-by: Gerd Pauli

[PATCH 1/3] e1000: implement register mapping for E1000_{EERD, FLSW{CTL, DATA, CNT}}

2017-10-09 Thread Uwe Kleine-König
Fixes: 4ff3269a70b5 ("e1000: Expose i210's external flash as MTD") Signed-off-by: Uwe Kleine-König --- drivers/net/e1000/e1000.h | 9 + drivers/net/e1000/regio.c | 12 2 files changed, 17 insertions(+), 4 deletions(-) diff --git

[PATCH 3/3] HACK: e1000: don't check for FLSWCTL.GLDONE when waiting for idle

2017-10-09 Thread Uwe Kleine-König
I don't understand all the consequences of this patch yet, but this makes reading out the flash chip connected to an i210 work for me. --- drivers/net/e1000/eeprom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/e1000/eeprom.c b/drivers/net/e1000/eeprom.c

[PATCH 2/3] e1000: implement support for smaller flash chips

2017-10-09 Thread Uwe Kleine-König
In older revisions of the i210 data sheet (rev 2.8) M25PE80 (1 MiB) is still listed as supported. So check the full range of FLA.FL_SIZE which also simplifies the code. Signed-off-by: Uwe Kleine-König --- drivers/net/e1000/e1000.h | 3 ---

[PATCH 0/3] e1000: access to flash on i210

2017-10-09 Thread Uwe Kleine-König
Hello, this series allows me to read the flash chip connected to an i210 network adapter. I didn't test much yet (e.g. writing) but I think the first two patches are OK anyhow. Maybe Andrey can comment about the third patch while I'm out for lunch :-) Best regards Uwe Uwe Kleine-König (3):