Re: [U-Boot] [RFC, PATCH v3 0/3] mtd, ubi, ubifs: resync with Linux-3.14

2014-06-12 Thread Heiko Schocher

Hello all,

Am 11.06.2014 09:20, schrieb Heiko Schocher:

resync mtd, ubi and ubifs subsystem with linux:


The patches in this patchserie are not marked as RFC , which is correct,
so this cover-letter patch 0/3 shouldn't have been marked as RFC,
so please ignore this, sorry for that.

bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [RFC, PATCH v3 0/3] mtd, ubi, ubifs: resync with Linux-3.14

2014-06-12 Thread Tom Rini
On Wed, Jun 11, 2014 at 09:20:10AM +0200, Heiko Schocher wrote:

 resync mtd, ubi and ubifs subsystem with linux:
 
 commit 455c6fdbd219161bd09b1165f11699d6d73de11c
 Author: Linus Torvalds torva...@linux-foundation.org
 Date:   Sun Mar 30 20:40:15 2014 -0700
 
 Linux 3.14
 
 Main reason for this sync is, we now have UBI fastmap support
 in U-Boot.
 
 Tested it on am33xx, imx6 and mpc83xx boards. MAKEALL for arm and powerpc
 compiles clean.

It blows up other arches however:
blackfin/m68k/nds32/sparc/x86 is:
In file included from /home/trini/work/u-boot/u-boot/include/nand.h:37:0,
 from /home/trini/work/u-boot/u-boot/common/cmd_bootm.c:75:
/home/trini/work/u-boot/u-boot/include/linux/compat.h:77:18: error: 
redefinition of typedef ‘gfp_t’
/home/trini/work/u-boot/u-boot/include/linux/types.h:142:30: note: previous 
declaration of ‘gfp_t’ was here
microblaze/mips is:
In file included from /home/trini/work/u-boot/u-boot/arch/microblaze/include/asm
/bitops.h:9:0,
 from /home/trini/work/u-boot/u-boot/include/linux/bitops.h:110,
 from /home/trini/work/u-boot/u-boot/include/common.h:20,
 from /home/trini/work/u-boot/u-boot/include/ubi_uboot.h:17,
 from /home/trini/work/u-boot/u-boot/drivers/mtd/mtdcore.c:33:
/home/trini/work/u-boot/u-boot/arch/microblaze/include/asm/system.h:126:0: 
warning: smp_rmb redefined [enabled by default]
/home/trini/work/u-boot/u-boot/include/linux/compat.h:157:0: note: this is the 
location of the previous definition

I can test if you shoot me a private branch or just patches to git am,
but x86 isn't too hard to test (esp if you grab the patches that were posted
so that your 64bit host toolchain can be used) and I know ELDK supports
MIPS :)

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [RFC, PATCH v3 0/3] mtd, ubi, ubifs: resync with Linux-3.14

2014-06-11 Thread Heiko Schocher
resync mtd, ubi and ubifs subsystem with linux:

commit 455c6fdbd219161bd09b1165f11699d6d73de11c
Author: Linus Torvalds torva...@linux-foundation.org
Date:   Sun Mar 30 20:40:15 2014 -0700

Linux 3.14

Main reason for this sync is, we now have UBI fastmap support
in U-Boot.

Tested it on am33xx, imx6 and mpc83xx boards. MAKEALL for arm and powerpc
compiles clean.

Tested UBI fastmap on a board with 512 MiB nand flash. Attach time
from old U-Boot was 2 seconds, reduced with UBI fastmap to 0.2 seconds.

Please test this patchserie!

The patches 

  lib, rbtree: resync with Linux-3.14
  lib, list_sort: add list_sort from linux 3.14
  mtd, ubi, ubifs: resync with Linux-3.14

are not checkpatch clean, as they use code from Linux and
I do not want to change this.

Remarks:
- UBI Fastmap is now availiable in U-Boot
  activate it with CONFIG_MTD_UBI_FASTMAP

- replace UBI_LINUX in current UBI code from U-Boot with
  __UBOOT__ as this define is used in other places in U-Boot
  where code from other projects is used.

- move a lot of defines from include/ubi_uboot.h to
  include/linux/compat.h, as this is the correcter place for it.

- add usb device to linux device, so usb uses struct device
  from linux/compat.h

- onenand changes only compile tested.

- Following Code in drivers/mtd/nand/nand_base.c nand_do_write_ops()
  adapted for U-Boot:

  +#ifndef __UBOOT__
/* Reject writes, which are not page aligned */
if (NOTALIGNED(to) || NOTALIGNED(ops-len)) {
  +else
  + /* Reject writes, which are not page aligned */
  + if (NOTALIGNED(to)) {
  +endif

  as the original linux code leads in not working use of the env
  var filesize. For example a nand write 8000 8 ${filesize}
  would not work with it ...

- add CONFIG_MTD_NAND_VERIFY_WRITE from U-Boot code
  (only compile tested)

- Documented the config defines in README

- kmalloc now uses memalign for allocating memory. This prevented
  crashes when tested ubi/ubifs on imx6 board.

- To produce this patch I did three steps:
  - copied the linux source files to U-Boot tree - commit this
  - adapt license text in each file - commit this
  - make the code again compile clean and working - commit this

  Then squashed this three patches to this patch, to not break
  bisectability. To make further sync with linux easier, the
  above three patches can be found in:

  
http://git.denx.de/?p=u-boot/u-boot-testing.git;a=shortlog;h=refs/heads/update-mtd%2Bubi-linux-v3.14

  This branch is only thought for further linux syncs! Please
  do not use this branch for testing this patchseries!

- Hope I get all U-Boot specific changes ... so please, test,
  test, test ...

- changes for v2:
  - add lib/linux_compat.c as Joerg Krause detected

- changes for v3:
  - patch:
Patchwork [U-Boot,RFC,v2,1/4] dm: rename device struct to udevice
http://patchwork.ozlabs.org/patch/351422/
not longer needed, as it found its way into mainline
  - add in the commit message the description, how this sync patch
with linux was done, as Marek and Tom suggested.
  - rebase with current U-Boot commit
61e76f53708cf082ef9061a140b57df3513b8ba1

Cc: Marek Vasut ma...@denx.de
Cc: Sergey Lapin sla...@ossfans.org
Cc: Scott Wood scottw...@freescale.com
Cc: Wolfgang Denk w...@denx.de
Cc: Joerg Krause jkra...@posteo.de


Heiko Schocher (3):
  lib, rbtree: resync with Linux-3.14
  lib, list_sort: add list_sort from linux 3.14
  mtd, ubi, ubifs: resync with Linux-3.14

 README  |   61 +
 board/prodrive/alpr/nand.c  |4 +
 board/socrates/nand.c   |6 +
 board/tqc/tqm8272/nand.c|4 +
 common/cmd_ubi.c|   29 +-
 common/cmd_ubifs.c  |2 +-
 drivers/mtd/mtdconcat.c |  230 ++-
 drivers/mtd/mtdcore.c   | 1112 -
 drivers/mtd/mtdcore.h   |   23 +
 drivers/mtd/mtdpart.c   |  521 +-
 drivers/mtd/nand/fsl_elbc_nand.c|4 +
 drivers/mtd/nand/fsl_ifc_nand.c |4 +
 drivers/mtd/nand/fsl_upm.c  |4 +
 drivers/mtd/nand/mpc5121_nfc.c  |4 +
 drivers/mtd/nand/mxc_nand.c |8 +
 drivers/mtd/nand/nand_base.c| 1897 +++--
 drivers/mtd/nand/nand_bbt.c |  296 ++--
 drivers/mtd/nand/nand_ids.c |  256 +--
 drivers/mtd/nand/nand_util.c|3 +
 drivers/mtd/nand/ndfc.c |4 +
 drivers/mtd/onenand/onenand_base.c  |1 +
 drivers/mtd/onenand/onenand_bbt.c   |1 -
 drivers/mtd/onenand/samsung.c   |   10 +-
 drivers/mtd/ubi/Makefile|3 +-
 drivers/mtd/ubi/attach.c| 1754 
 drivers/mtd/ubi/build.c |  812 ++---
 drivers/mtd/ubi/crc32.c |   13 +-
 drivers/mtd/ubi/crc32table.h|2 +-
 drivers/mtd/ubi/debug.c |  482 --
 drivers/mtd/ubi/debug.h |  178 +-
 drivers/mtd/ubi/eba.c   |  474 --