OFFLIST Re: [PATCH 0/5] ARM: at91: add first DT support for Calao usb/tny boards

2023-09-26 Thread Wolfram Sang
Hi! > This is not yet a complete replacement: > > - We use the legacy NAND driver instead of the newly backported driver > that Linux uses with the hardware, presumably without issues > > - OHCI hangs during probe, so it's disabled for now > > - A barebox with comparative

[PATCH 2/2] defconfigs: usb-a9g20: update to a working version

2023-04-27 Thread Wolfram Sang
have to go. Signed-off-by: Wolfram Sang --- arch/arm/configs/usb_a9g20_defconfig | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/arch/arm/configs/usb_a9g20_defconfig b/arch/arm/configs/usb_a9g20_defconfig index 20b1f27b9e..56f78ba7a8 100644 --- a/arch/arm

[PATCH 0/2] ARM: at91: usb-a9g20: make it work out of the box again

2023-04-27 Thread Wolfram Sang
Here are the remaining two patches to make a (for me) useable barebox with the defconfig and no other patches. Comments welcome! Wolfram Sang (2): ARM: at91: usb-a926x: remove nand partitions from config defconfigs: usb-a9g20: update to a working version .../boards/usb-a926x/defaultenv-usb

[PATCH 1/2] ARM: at91: usb-a926x: remove nand partitions from config

2023-04-27 Thread Wolfram Sang
, remove it from the config file. Signed-off-by: Wolfram Sang --- Or shall I rather remove it from the board file? arch/arm/boards/usb-a926x/defaultenv-usb-a926x/config | 4 1 file changed, 4 deletions(-) diff --git a/arch/arm/boards/usb-a926x/defaultenv-usb-a926x/config b/arch/arm/boards/usb

Re: [PATCH 0/3] mtd: nand: atmel: legacy: fix boot on USB-A9G20

2023-04-27 Thread Wolfram Sang
Hi Sascha, > Anyway, what's really missing is DT support. I scribbled a patch to get > you started in case you are motivated. Basically it's: Compile in the > device tree, throw away all the device registration from the board code, > see where it gets you and fix the fallout ;) So, I tried this

Re: [PATCH 0/3] mtd: nand: atmel: legacy: fix boot on USB-A9G20

2023-04-27 Thread Wolfram Sang
> > I accidently erased it, so my journey for unbricking the device began. > > at91bootstrap, openocd, barebox - they all once supported A9G20, but > > nowadays all of them were broken. Well, I fixed openocd and barebox > > mostly so far, the bootstrap is still the missing piece. > > You may be

Re: [PATCH 0/3] mtd: nand: atmel: legacy: fix boot on USB-A9G20

2023-03-21 Thread Wolfram Sang
Hi, > > It is a direct replacement for at91bootstrap and loads barebox as the > > next step bootloader. > The above is entirely correct - as the barebox variant supports booting from > SD card only, where at91bootstrap support additional boot sources. So, I quickly built the bootstrap for A9263

Re: [PATCH 0/3] mtd: nand: atmel: legacy: fix boot on USB-A9G20

2023-03-21 Thread Wolfram Sang
Hi Sascha! > Nice to hear from you here ;) Yeah, it has been only 10 years... :) > I have no idea how the SDRAM setup is done on the USB-A9G20. There seems > to be SDRAM setup code for the USB-A9263, but not for the USB-A9G20. Is > there some AT91Bootstrap required? Yes. There is a bootstrap

Re: [PATCH 0/3] mtd: nand: atmel: legacy: fix boot on USB-A9G20

2023-03-19 Thread Wolfram Sang
Hi Sam, > It is only a few weeks ago I argued that there was no users of the older > at91sam* boards, and then you prove me wrong here. At your service ;) > I will try to remember that you may be able to test should someone > decide to move the barebox support for qil_a9g20 to DT and add PBL >

[PATCH 3/3] mtd: nand: atmel: legacy: remove superfluous code

2023-03-19 Thread Wolfram Sang
54bcca always populates 'ecc_mode' but forgot to remove the code which overwrote the previously hardcoded 'NAND_ECC_SOFT' when needed. This is obsolete now. Fixes: 54bcca ("mtd: atmel_nand: retrieve ecc_mode from pdata") Signed-off-by: Wolfram Sang --- drivers/mtd/nand/atme

[PATCH 1/3] mtd: nand: atmel: legacy: add 'algo' to use

2023-03-19 Thread Wolfram Sang
Fixes "WARNING: Unsupported ECC algorithm!" on my USB-A9G20. Fixes: b6bcd96de5 ("mtd: nand: Update to Linux-5.9") Signed-off-by: Wolfram Sang --- Or maybe we should make HAMMING the default fallback in nand_base.c? drivers/mtd/nand/atmel/legacy.c | 4 1 file c

[PATCH 0/3] mtd: nand: atmel: legacy: fix boot on USB-A9G20

2023-03-19 Thread Wolfram Sang
While trying to unbrick my Calao USB-A9G20, barebox couldn't read the NAND BB tables unlike the binary-only barebox from 2013. The first two patches fix that. The third one is a cleanup. Happy hacking! Wolfram Sang (3): mtd: nand: atmel: legacy: add 'algo' to use mtd: nand: atmel: legacy

[PATCH 2/3] mtd: nand: atmel: legacy: use proper ecc_shift

2023-03-19 Thread Wolfram Sang
l_nand: Add per board ECC setup") Signed-off-by: Wolfram Sang --- The other option is to revert babffbb193. I don't see any user. The code was obviously not enough tested as well. drivers/mtd/nand/atmel/legacy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH] commands: edit: fix typo in Kconfig help text

2023-03-19 Thread Wolfram Sang
Signed-off-by: Wolfram Sang --- commands/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/Kconfig b/commands/Kconfig index ec15f4e543..27769950d9 100644 --- a/commands/Kconfig +++ b/commands/Kconfig @@ -1383,7 +1383,7 @@ config CMD_EDIT depends

[PATCH] commands: nand: add missing parameters to help

2023-03-19 Thread Wolfram Sang
Signed-off-by: Wolfram Sang --- commands/Kconfig | 4 +++- commands/nand.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/commands/Kconfig b/commands/Kconfig index 27769950d9..76dfca2dfd 100644 --- a/commands/Kconfig +++ b/commands/Kconfig @@ -1950,12 +1950,14 @@ config

[PATCH] nand: mxs: NO_SUBPAGE_WRITE flag was overwritten

2012-12-17 Thread Wolfram Sang
It is not the chip, but this controller which cannot do subpage writes. So, make sure we add the flag at the proper place, so it doesn't get overwritten by flash detection anymore. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- drivers/mtd/nand/nand_mxs.c | 12 +--- 1 file

[PATCH V3 01/11] mtd: drop custom is_power_of_2()

2012-12-17 Thread Wolfram Sang
We have proper version in log2.h these days. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- drivers/mtd/ubi/ubi-barebox.h |5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/mtd/ubi/ubi-barebox.h b/drivers/mtd/ubi/ubi-barebox.h index 72f29a6..7574607 100644

[PATCH V3 03/11] lib: update size_human_readable to latest version

2012-12-17 Thread Wolfram Sang
Copy over the latest version from u-boot which handles bigger sizes now and does arithmetic with shifts instead of divisions. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- include/common.h |2 +- lib/display_options.c | 47 +++ 2

[PATCH V3 06/11] devfs mtd: add MEMERASE ioctl support

2012-12-17 Thread Wolfram Sang
To make that, we need to shift mtd_erase before mtd_ioctl. ubi-utils need that, especially ubiformat. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- drivers/mtd/core.c | 68 +++- fs/devfs-core.c|3 ++- 2 files changed, 37

[PATCH V3 02/11] lib: misc: add 'iB' suffixes to strtoull_suffix

2012-12-17 Thread Wolfram Sang
Since this is the 'official' notation, we should support it. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- lib/misc.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/misc.c b/lib/misc.c index 1a08502..0f3eb9a 100644 --- a/lib/misc.c +++ b/lib/misc.c

[PATCH V3 07/11] mtd: utils: apply macros for message printouts

2012-12-17 Thread Wolfram Sang
mtd-utils have a few macros for printouts. Provide the wrappers to make it easier to import them. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- include/mtd/utils.h | 47 +++ 1 file changed, 47 insertions(+) create mode 100644 include/mtd

[PATCH V3 00/11] ubiformat for barebox

2012-12-17 Thread Wolfram Sang
something * add '-y' to do something in dubious situations :) * quite some bugfixes (* verified subpage-size handling, found a bug in nand_mxs driver) Please test, comment, apply... Thanks, Wolfram Wolfram Sang (11): mtd: drop custom is_power_of_2() lib: misc: add 'iB' suffixes

[PATCH V3 05/11] ubi: bump ubi-media.h to newest version

2012-12-17 Thread Wolfram Sang
Needed for ubiformat, we are interested in image_seq especially. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- include/mtd/ubi-media.h | 55 ++- 1 file changed, 30 insertions(+), 25 deletions(-) diff --git a/include/mtd/ubi-media.h b/include

[PATCH V3 08/11] lib: add libscan

2012-12-17 Thread Wolfram Sang
Imported from mtd-utils and stripped down to needed functionality. Add prefix to functions so we have a clean namespace. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- include/mtd/libscan.h | 101 +++ lib/Kconfig |3 + lib/Makefile |1 + lib

[PATCH V3 09/11] lib: add libubigen

2012-12-17 Thread Wolfram Sang
Imported from mtd-utils and stripped down to needed functionality. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- include/mtd/libubigen.h | 182 +++ lib/Kconfig |3 + lib/Makefile|1 + lib/libubigen.c | 312

[PATCH V3 10/11] lib: add barebox version of libmtd

2012-12-17 Thread Wolfram Sang
Based on mtd-utils and stripped down to needed functionality and reworked to barebox interfaces. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- include/mtd/libmtd.h | 149 lib/Kconfig |3 + lib/Makefile |1 + lib/libmtd.c | 368

[PATCH V3 11/11] commands: add ubiformat

2012-12-17 Thread Wolfram Sang
Imported from mtd-utils and stripped down to needed functionality. Based on an older version (1.4.5.) since the newer do use MEMWRITE interfaces which we don't have in barebox (yet). Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- commands/Kconfig |8 + commands/Makefile|1

[PATCH] commands: add scrub

2012-12-13 Thread Wolfram Sang
Allows erasing a whole NAND device including the bad blocks. Only meant for development where one might accidently overwrite real bad block information. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- commands/Kconfig|8 + commands/flash.c| 68

Re: [PATCH] commands: add scrub

2012-12-13 Thread Wolfram Sang
On Thu, Dec 13, 2012 at 04:45:54PM +0100, Wolfram Sang wrote: Allows erasing a whole NAND device including the bad blocks. Only meant for development where one might accidently overwrite real bad block information. Signed-off-by: Wolfram Sang w.s...@pengutronix.de Ooops, wrong one. Please

[PATCH] commands: flash: add missing newlines to error messages

2012-12-13 Thread Wolfram Sang
Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- commands/flash.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/flash.c b/commands/flash.c index b1673de..d22d6a0 100644 --- a/commands/flash.c +++ b/commands/flash.c @@ -54,7 +54,7 @@ static int do_flerase

[PATCH 1/2] mtd: nand: add flag to ignore special handling of bad blocks

2012-12-13 Thread Wolfram Sang
This is needed for a later command to scrub away bad blocks. ONLY USE THIS FEATURE WHEN YOU KNOW WHAT YOU ARE DOING! Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- drivers/mtd/core.c|3 ++- drivers/mtd/nand/nand_write.c | 37 - include

Re: [PATCH 01/10] mtd: move is_power_of_2() to a public place

2012-12-11 Thread Wolfram Sang
On Tue, Dec 11, 2012 at 10:22:05AM +0100, Sascha Hauer wrote: On Mon, Dec 10, 2012 at 09:14:06AM +0100, Wolfram Sang wrote: Will need this later for ubiformat. Signed-off-by: Wolfram Sang w.s...@pengutronix.de We already have it in a public place: include/linux/log2.h ...where the old

Re: [PATCH 03/10] ubi: bump ubi-media.h to newest version

2012-12-11 Thread Wolfram Sang
. The above is outdated anyway. Dropped it from the whole series. -- Pengutronix e.K. | Wolfram Sang| Industrial Linux Solutions | http://www.pengutronix.de/ | signature.asc Description: Digital signature

Re: [PATCH 06/10] lib: add ubiutils-common

2012-12-11 Thread Wolfram Sang
, printull_suffix? Or ulltostr_suffix? :) -- Pengutronix e.K. | Wolfram Sang| Industrial Linux Solutions | http://www.pengutronix.de/ | signature.asc Description: Digital signature ___ barebox

[PATCH 05/10] mtd: utils: apply macros for message printouts

2012-12-10 Thread Wolfram Sang
mtd-utils have a few macros for printouts. Provide the wrappers to make it easier to import them. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- include/mtd/utils.h | 27 +++ 1 file changed, 27 insertions(+) diff --git a/include/mtd/utils.h b/include/mtd/utils.h

[PATCH 00/10] add ubiformat command

2012-12-10 Thread Wolfram Sang
Hi, here is the ubiformat series rebased against v2012.12.0. All comments I have received have been addressed. The command has been tested on a MX35 based board. Please help testing. Regards, Wolfram Sang Wolfram Sang (10): mtd: move is_power_of_2() to a public place ubi: consolidate

[PATCH 03/10] ubi: bump ubi-media.h to newest version

2012-12-10 Thread Wolfram Sang
Needed for ubiformat, we are interested in image_seq especially. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- include/mtd/ubi-media.h | 57 +++ 1 file changed, 33 insertions(+), 24 deletions(-) diff --git a/include/mtd/ubi-media.h b/include

[PATCH 01/10] mtd: move is_power_of_2() to a public place

2012-12-10 Thread Wolfram Sang
Will need this later for ubiformat. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- drivers/mtd/ubi/ubi-barebox.h |5 + include/mtd/utils.h | 25 + 2 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 include/mtd/utils.h diff

[PATCH 04/10] devfs mtd: add MEMERASE ioctl support

2012-12-10 Thread Wolfram Sang
To make that, we need to shift mtd_erase before mtd_ioctl. ubi-utils need that, especially ubiformat. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- drivers/mtd/core.c | 68 +++- fs/devfs-core.c|3 ++- 2 files changed, 37

[PATCH 08/10] lib: add libubigen

2012-12-10 Thread Wolfram Sang
Imported from mtd-utils and stripped down to needed functionality. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- include/mtd/libubigen.h | 186 lib/Kconfig |3 + lib/Makefile|1 + lib/libubigen.c | 316

[PATCH 06/10] lib: add ubiutils-common

2012-12-10 Thread Wolfram Sang
Imported from mtd-utils and stripped down to needed functionality for ubiformat. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- include/mtd/ubiutils-common.h | 26 + lib/Kconfig |3 + lib/Makefile |1 + lib/ubiutils-common.c

[PATCH 07/10] lib: add libscan

2012-12-10 Thread Wolfram Sang
Imported from mtd-utils and stripped down to needed functionality. Add prefix to functions so we have a clean namespace. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- include/mtd/libscan.h | 105 +++ lib/Kconfig |3 + lib/Makefile |1 + lib

[PATCH 09/10] lib: add barebox version of libmtd

2012-12-10 Thread Wolfram Sang
Based on mtd-utils and stripped down to needed functionality and reworked to barebox interfaces. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- include/mtd/libmtd.h | 154 + lib/Kconfig |3 + lib/Makefile |1 + lib/libmtd.c | 371

[PATCH 02/10] ubi: consolidate ubi-media.h

2012-12-10 Thread Wolfram Sang
We have two versions in the tree. Use the newer one, and put it into the mtd directory while we are at it. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- commands/ubi.c |2 +- drivers/mtd/ubi/ubi.h|3 +- {drivers/mtd/ubi

[PATCH 10/10] commands: add ubiformat

2012-12-10 Thread Wolfram Sang
Imported from mtd-utils and stripped down to needed functionality. Based on an older version (1.4.5.) since the newer do use MEMWRITE interfaces which we don't have in barebox (yet). Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- commands/Kconfig |9 + commands/Makefile|1

Re: [RFC 09/10] lib: add barebox version of libmtd

2012-12-09 Thread Wolfram Sang
On Sat, Oct 27, 2012 at 10:11:48PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: On 12:16 Fri 26 Oct , Wolfram Sang wrote: Based on mtd-utils and stripped down to needed functionality and reworked to barebox interfaces. based on which verison of libmtd? 1.4.5 since this is the newest

Re: [RFC 10/10] commands: add ubiformat

2012-12-09 Thread Wolfram Sang
-- Pengutronix e.K. | Wolfram Sang| Industrial Linux Solutions | http://www.pengutronix.de/ | signature.asc Description: Digital signature ___ barebox mailing list barebox@lists.infradead.org http

[PATCH] mxs: get_fecclk is hclk, not a constant

2012-12-05 Thread Wolfram Sang
The rate is not constant as the comment said, but is hclk. The result was that MII clock was often calculated wrong. Reported-by: Michael Grzeschik m.grzesc...@pengutronix.de Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- arch/arm/mach-mxs/speed-imx28.c |3 +-- 1 file changed, 1

[PATCH] mxs: tx28: fix NAND usage

2012-12-05 Thread Wolfram Sang
Pinmuxing was wrong and no GPMI device was created. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- arch/arm/boards/karo-tx28/tx28.c |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/arm/boards/karo-tx28/tx28.c b/arch/arm/boards/karo-tx28/tx28.c index a62cb82

[PATCH] mtd: nand: mxs: reset BCH earlier to avoid NAND startup problems

2012-12-05 Thread Wolfram Sang
already before sending commands to NAND. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- drivers/mtd/nand/nand_mxs.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/nand/nand_mxs.c b/drivers/mtd/nand/nand_mxs.c index 975a44f..c4509d3 100644

Re: [PATCH] mtd: nand: mxs: reset BCH earlier to avoid NAND startup problems

2012-12-05 Thread Wolfram Sang
On Wed, Dec 05, 2012 at 07:37:32PM +0100, Sascha Hauer wrote: On Wed, Dec 05, 2012 at 03:53:53PM +0100, Wolfram Sang wrote: It could happen (1 out of 100 times) that NAND did not start up correctly after warm rebooting, so barebox could not find its environment or DMA timed out due

Re: [PATCH 2/2] net fec: call fec_init at probe time

2012-10-31 Thread Wolfram Sang
: Reported-by: Wolfram Sang w.s...@pengutronix.de -- Pengutronix e.K. | Wolfram Sang| Industrial Linux Solutions | http://www.pengutronix.de/ | signature.asc Description: Digital signature

Re: [PATCH 2/3] dma: apbh: check for errors when resetting ip core

2012-10-31 Thread Wolfram Sang
On Wed, Oct 31, 2012 at 09:29:56AM +0100, Juergen Beisert wrote: Wolfram Sang wrote: Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- drivers/dma/apbh_dma.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/dma/apbh_dma.c b/drivers/dma/apbh_dma.c

Re: [PATCH 2/3] dma: apbh: check for errors when resetting ip core

2012-10-31 Thread Wolfram Sang
On Wed, Oct 31, 2012 at 09:48:31AM +0100, Juergen Beisert wrote: Wolfram Sang wrote: On Wed, Oct 31, 2012 at 09:29:56AM +0100, Juergen Beisert wrote: Wolfram Sang wrote: Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- drivers/dma/apbh_dma.c |4 +++- 1 file changed

Re: [PATCH 2/3] dma: apbh: check for errors when resetting ip core

2012-10-31 Thread Wolfram Sang
somewhere to not state too obvious things? -- Pengutronix e.K. | Wolfram Sang| Industrial Linux Solutions | http://www.pengutronix.de/ | signature.asc Description: Digital signature ___ barebox

[PATCH 1/3] arm: mxs: use timeouts in block reset routines

2012-10-30 Thread Wolfram Sang
These routines can fail, add support for that. Also, put in missing copyright headers. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- arch/arm/mach-mxs/common.c | 39 +++ 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-mxs

[PATCH 3/3] mtd: nand: mxs: check for errors when resetting ip core

2012-10-30 Thread Wolfram Sang
Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- drivers/mtd/nand/nand_mxs.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/nand/nand_mxs.c b/drivers/mtd/nand/nand_mxs.c index 8aeb14d..906d695 100644 --- a/drivers/mtd/nand/nand_mxs.c +++ b

[PATCH 2/2] configs: mx28evk: add NAND support

2012-10-30 Thread Wolfram Sang
Took the mx28evk defconfig, activated DMA and NAND, used savedefconfig; this patch is the result. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- arch/arm/configs/imx28evk_defconfig | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/arch/arm/configs

[PATCH 1/2] mxs: mx28evk: add nand device

2012-10-30 Thread Wolfram Sang
While flash layout may be custom, at least the nand0-device is good to have. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- arch/arm/boards/freescale-mx28-evk/mx28-evk.c | 20 1 file changed, 20 insertions(+) diff --git a/arch/arm/boards/freescale-mx28-evk/mx28

[RFC 00/10] ubiformat in barebox

2012-10-26 Thread Wolfram Sang
and if people are interested in testing, too, this is very much appreciated! Kind regards, Wolfram Wolfram Sang (10): mtd: move is_power_of_2() to a public place ubi: consolidate ubi-media.h ubi: bump ubi-media.h to newest version devfs mtd: add MEMERASE ioctl support mtd: utils: apply

[RFC 01/10] mtd: move is_power_of_2() to a public place

2012-10-26 Thread Wolfram Sang
Will need this later for ubiformat. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- drivers/mtd/ubi/ubi-barebox.h |5 + include/mtd/utils.h | 25 + 2 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 include/mtd/utils.h diff

[RFC 06/10] lib: add ubiutils-common

2012-10-26 Thread Wolfram Sang
Imported from mtd-utils and stripped down to needed functionality for ubiformat. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- include/mtd/ubiutils-common.h | 26 + lib/Kconfig |3 + lib/Makefile |1 + lib/ubiutils-common.c

[RFC 05/10] mtd: utils: apply macros for message printouts

2012-10-26 Thread Wolfram Sang
mtd-utils have a few macros for printouts. Provide the wrappers to make it easier to import them. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- include/mtd/utils.h | 27 +++ 1 file changed, 27 insertions(+) diff --git a/include/mtd/utils.h b/include/mtd/utils.h

[RFC 04/10] devfs mtd: add MEMERASE ioctl support

2012-10-26 Thread Wolfram Sang
To make that, we need to shift mtd_erase before mtd_ioctl. ubi-utils need that, especially ubiformat. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- drivers/mtd/core.c | 68 +++- fs/devfs-core.c|3 ++- 2 files changed, 37

[RFC 03/10] ubi: bump ubi-media.h to newest version

2012-10-26 Thread Wolfram Sang
Needed for ubiformat, we are interested in image_seq especially. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- include/mtd/ubi-media.h | 57 +++ 1 file changed, 33 insertions(+), 24 deletions(-) diff --git a/include/mtd/ubi-media.h b/include

[RFC 09/10] lib: add barebox version of libmtd

2012-10-26 Thread Wolfram Sang
Based on mtd-utils and stripped down to needed functionality and reworked to barebox interfaces. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- include/mtd/libmtd.h | 154 + lib/Kconfig |3 + lib/Makefile |1 + lib/libmtd.c | 371

[RFC 08/10] lib: add libubigen

2012-10-26 Thread Wolfram Sang
Imported from mtd-utils and stripped down to needed functionality. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- include/mtd/libubigen.h | 186 lib/Kconfig |3 + lib/Makefile|1 + lib/libubigen.c | 316

[RFC 02/10] ubi: consolidate ubi-media.h

2012-10-26 Thread Wolfram Sang
We have two versions in the tree. Use the newer one, and put it into the mtd directory while we are at it. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- commands/ubi.c |2 +- drivers/mtd/ubi/ubi.h|3 +- {drivers/mtd/ubi

[RFC 10/10] commands: add ubiformat

2012-10-26 Thread Wolfram Sang
Imported from mtd-utils and stripped down to needed functionality. Based on an older version (1.4.5.) since the newer do use MEMWRITE interfaces which we don't have in barebox (yet). Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- commands/Kconfig |9 + commands/Makefile|1

[PATCH] mtd: ubi: fix typos in comment of build.c

2012-10-25 Thread Wolfram Sang
Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- drivers/mtd/ubi/build.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c index f2c8923..1ea1209 100644 --- a/drivers/mtd/ubi/build.c +++ b/drivers/mtd/ubi/build.c

[PATCH] Makefile: disable CDPATH

2012-10-24 Thread Wolfram Sang
CDPATH has sideeffects when generating barebox_default_env.h (printing the directory name into the header file), causing a build failure. Disable it for the build. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- Makefile |3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b

Re: [PATCH] common: Makefile: 'cd' command could lead to broken default_env.h

2012-10-23 Thread Wolfram Sang
On Tue, Oct 23, 2012 at 09:04:55AM +0200, Sascha Hauer wrote: On Mon, Oct 22, 2012 at 07:14:08PM +0200, Wolfram Sang wrote: Depending on the user's settings (CDPATH), 'cd' may print out the directory which was changed to. This causes broken barebox_default_env.h to be generated. Ignore

[PATCH] common: Makefile: 'cd' command could lead to broken default_env.h

2012-10-22 Thread Wolfram Sang
Depending on the user's settings (CDPATH), 'cd' may print out the directory which was changed to. This causes broken barebox_default_env.h to be generated. Ignore the cd printout. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- common/Makefile |2 +- 1 file changed, 1 insertion(+), 1

[PATCH] mtd: ubi: cdev: fix build warning for 64-bit

2012-10-22 Thread Wolfram Sang
Got this when compiling sandbox on a 64-bit system: drivers/mtd/ubi/cdev.c: In function ‘ubi_volume_cdev_read’: drivers/mtd/ubi/cdev.c:26:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t’ [-Wformat] Signed-off-by: Wolfram Sang w.s...@pengutronix.de

Re: [PATCH] [RFC] i2c-imx: send a soft bus reset during probe

2012-09-27 Thread Wolfram Sang
I wonder if it's worth to have this as a general callback in the i2c layer. There kernel has a framework in the making. I still need to give more review to it: http://article.gmane.org/gmane.linux.drivers.i2c/12558 -- Pengutronix e.K. | Wolfram Sang

[PATCH] net: tftp: timeout only after a proper amount of time

2012-09-14 Thread Wolfram Sang
Currently, the timeout when waiting for packages is smaller than the timeout communicated to the TFTP server for retransmitting. Make sure we wait at least for two retransmissions before giving up. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- net/tftp.c |3 ++- 1 file changed, 2

[PATCH] arm: mxs: add proper resource length

2012-09-10 Thread Wolfram Sang
For some reason, the mxs-boards missed some length paramters when adding devices. This made reading from ocotp crash in the current version. Provide missing lenghts, use a consistent format and fix the length for the LCDIF. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- arch/arm/boards

[PATCH] arm: mxs: bcb: fix usage of second bootstream

2012-08-31 Thread Wolfram Sang
If a second bootstream was used, there was a sanity check which was not only wrong (using erasesize instead of writesize) but also superfluous (we got the block from an existing cdev, so it must be in the flash range). Simply remove it to make bcb work as expected. Signed-off-by: Wolfram Sang w.s

[PATCH V2] arm: mxs: get MAC from OCOTP for MX28EVK

2012-06-14 Thread Wolfram Sang
Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- V2: rewrote code according to Sascha's style guide ;) arch/arm/boards/freescale-mx28-evk/mx28-evk.c | 30 +++-- arch/arm/mach-mxs/Kconfig |1 + 2 files changed, 29 insertions(+), 2 deletions

[PATCH V2 0/8] arm: mxs: add ocotp write support

2012-06-14 Thread Wolfram Sang
write-function if really needed Wolfram Sang (8): arm: mxs: make get_hclk result useable for upcoming set_hclk arm: mxs: add imx_set_hclk arm: mxs: refactor access to power domain arm: mxs: add POWER_BASE for MX28, too arm: mxs: add functions to get/set vddio arm: mxs: refactor timeout

[PATCH V2 1/8] arm: mxs: make get_hclk result useable for upcoming set_hclk

2012-06-14 Thread Wolfram Sang
To avoid getting a different divider due to rounding errors when using set_hclk later, use DIV_ROUND_UP for the returned value. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- arch/arm/mach-mxs/speed-imx23.c |5 +++-- arch/arm/mach-mxs/speed-imx28.c |5 +++-- 2 files changed, 6

[PATCH V2 4/8] arm: mxs: add POWER_BASE for MX28, too

2012-06-14 Thread Wolfram Sang
Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- arch/arm/mach-mxs/include/mach/imx28-regs.h |1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-mxs/include/mach/imx28-regs.h b/arch/arm/mach-mxs/include/mach/imx28-regs.h index 9a2052c..23ac306 100644 --- a/arch/arm/mach-mxs

[PATCH V2 3/8] arm: mxs: refactor access to power domain

2012-06-14 Thread Wolfram Sang
usbphy initializaion needs to access the power supply and has this embedded. Refactor to a seperate power.c, since we need other accesses in the future. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- arch/arm/mach-mxs/Makefile |2 +- arch/arm/mach-mxs/include/mach/power.h

[PATCH V2 7/8] arm: mxs: use consistent naming for #defines for ocotp

2012-06-14 Thread Wolfram Sang
Will the code more readable, especially since future additions are planned. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- arch/arm/mach-mxs/ocotp.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/arch/arm/mach-mxs/ocotp.c b/arch/arm/mach-mxs

[PATCH V2 6/8] arm: mxs: refactor timeout routine for ocotp

2012-06-14 Thread Wolfram Sang
Let's keep the timeout routine in a central place. We will need it more often when we add write support. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- arch/arm/mach-mxs/ocotp.c | 26 -- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/arch/arm

[PATCH V2 8/8] arm: mxs: add write support for ocotp

2012-06-14 Thread Wolfram Sang
Since we now can change HCLK and VDDIO, we can now support writing to OCOTP. Writing is done via a special data register. This is u32, so we need to fill a temporary buffer when offset or count is not aligned. The write is also protected by a special device variable. Signed-off-by: Wolfram Sang

[PATCH] arm: mxs: get MAC from OCOTP for MX28EVK

2012-05-09 Thread Wolfram Sang
Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- arch/arm/boards/freescale-mx28-evk/mx28-evk.c | 25 +++-- arch/arm/mach-mxs/Kconfig |1 + 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/arch/arm/boards/freescale-mx28-evk/mx28

[PATCH 2/8] arm: mxs: add imx_set_hclk

2012-05-08 Thread Wolfram Sang
needed for writing the One-Time-Prgorammable Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- arch/arm/mach-mxs/include/mach/clock-imx23.h |1 + arch/arm/mach-mxs/include/mach/clock-imx28.h |1 + arch/arm/mach-mxs/speed-imx23.c | 21 + arch/arm

[PATCH 0/8] arm: mxs: add ocotp write support

2012-05-08 Thread Wolfram Sang
Because OCOTP write needs to change HCLK and VDDIO, some preparations are needed before we can finally write to OCOTP. Tested with a custom board and a TX28. Wolfram Sang (8): arm: mxs: make get_hclk result useable for upcoming set_hclk arm: mxs: add imx_set_hclk arm: mxs: refactor access

[PATCH 1/8] arm: mxs: make get_hclk result useable for upcoming set_hclk

2012-05-08 Thread Wolfram Sang
To avoid getting a different divider due to rounding errors when using set_hclk later, use DIV_ROUND_UP for the returned value. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- arch/arm/mach-mxs/speed-imx23.c |5 +++-- arch/arm/mach-mxs/speed-imx28.c |5 +++-- 2 files changed, 6

[PATCH 3/8] arm: mxs: refactor access to power domain

2012-05-08 Thread Wolfram Sang
usbphy initializaion needs to access the power supply and has this embedded. Refactor to a seperate power.c, since we need other accesses in the future. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- arch/arm/mach-mxs/Makefile |2 +- arch/arm/mach-mxs/include/mach/power.h

[PATCH 5/8] arm: mxs: add functions to get/set vddio

2012-05-08 Thread Wolfram Sang
Needed for ocotp write. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- arch/arm/mach-mxs/include/mach/power.h |2 ++ arch/arm/mach-mxs/power.c | 38 2 files changed, 40 insertions(+) diff --git a/arch/arm/mach-mxs/include/mach/power.h

[PATCH 4/8] arm: mxs: add POWER_BASE for MX28, too

2012-05-08 Thread Wolfram Sang
Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- arch/arm/mach-mxs/include/mach/imx28-regs.h |1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-mxs/include/mach/imx28-regs.h b/arch/arm/mach-mxs/include/mach/imx28-regs.h index 9a2052c..23ac306 100644 --- a/arch/arm/mach-mxs

[PATCH 6/8] arm: mxs: refactor timeout routine for ocotp

2012-05-08 Thread Wolfram Sang
Let's keep the timeout routine in a central place. We will need it more often when we add write support. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- arch/arm/mach-mxs/ocotp.c | 26 -- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/arch/arm

[PATCH 8/8] arm: mxs: add write support for ocotp

2012-05-08 Thread Wolfram Sang
Since we now can change HCLK and VDDIO, we can now support writing to OCOTP. Writing is done via a special data register. This is u32, so we need to fill a temporary buffer when offset or count is not aligned. The write is also protected by a special device variable. Signed-off-by: Wolfram Sang

[PATCH] arm: tx28: select OCOTP driver

2012-04-13 Thread Wolfram Sang
Compile fixes unknown symbol 'mxs_ocotp_read' for tx28 defconfig. Since the vendor stores the MAC address in OCOTP, we always want this driver. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- arch/arm/mach-mxs/Kconfig |1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-mxs

IMX_IIM on which SoCs?

2012-04-13 Thread Wolfram Sang
, Wolfram -- Pengutronix e.K. | Wolfram Sang| Industrial Linux Solutions | http://www.pengutronix.de/ | signature.asc Description: Digital signature ___ barebox mailing list barebox

[PATCH 0/3] arm: mxs: ocotp read support

2012-04-05 Thread Wolfram Sang
Add read support for the OCOTP so we can get MAC addresses. Also fix the printout once we got it since it doesn't come from an eeprom. Wolfram Sang (3): arm: mxs: add ocotp driver arm: mxs: tx28: get MAC from OCOTP net: eth: don't say that MAC comes from EEPROM arch/arm/boards/karo-tx28

[PATCH 3/3] net: eth: don't say that MAC comes from EEPROM

2012-04-05 Thread Wolfram Sang
Because it can also come in via other means. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- net/eth.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/eth.c b/net/eth.c index 00b8836..f62d24a 100644 --- a/net/eth.c +++ b/net/eth.c @@ -228,7 +228,7 @@ int

[PATCH 1/3] arm: mxs: add ocotp driver

2012-04-05 Thread Wolfram Sang
Read-only support for now to get MAC addresses. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- arch/arm/mach-mxs/Kconfig | 14 +++ arch/arm/mach-mxs/Makefile |1 + arch/arm/mach-mxs/include/mach/imx23-regs.h |1 + arch/arm/mach-mxs/include/mach

  1   2   >