- Jul 22, 2015
-
-
Masahiro Yamada authored
Currently, kzalloc() returns zero-filled memory, while kmalloc() simply ignores the second argument and never fills the memory area with zeros. I want kmalloc(size, __GFP_ZERO) to behave as kzalloc() does, which will make it easier to add more memory allocator variants. With the introduction of __GFP_ZERO flag, going forward, kzmalloc() variants can fall back to kmalloc() enabling the __GFP_ZERO flag. Signed-off-by:
Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by:
Heiko Schocher <hs@denx.de> Acked-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Lukasz Majewski <l.majewski@samsung.com>
-
Masahiro Yamada authored
The vzalloc(size) is equivalent to kzalloc(size, 0). Move it to include/linux/compat.h as an inline function in order to avoid the function call overhead. Signed-off-by:
Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by:
Heiko Schocher <hs@denx.de> Acked-by:
Simon Glass <sjg@chromium.org>
-
Masahiro Yamada authored
The macro cpu_relax() is defined by several headers in different ways. arch/{arm,avr32,mips}/include/asm/processor.h defines it as follows: #define cpu_relax() barrier() On the other hand, include/linux/compat.h defines it as follows: #define cpu_relax() do {} while (0) If both headers are included from the same source file, the warning warning: "cpu_relax" redefined [enabled by default] is displayed. It effectively makes it impossible to include <linux/compat.h> from some sources. Drop the latter. Signed-off-by:
Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by:
Heiko Schocher <hs@denx.de> Acked-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Lukasz Majewski <l.majewski@samsung.com>
-
- Apr 14, 2015
-
-
Kishon Vijay Abraham I authored
Did a bunch of things to get dwc3/gadget.c compile in u-boot without build errors and warnings *) Changed the included header files to that used in u-boot. *) Used dma_alloc_coherent and dma_free_coherent APIs of u-boot *) removed sg support *) remove jiffies and used a simple while loop *) removed irq support and added a function to call these interrupt handler. Signed-off-by:
Kishon Vijay Abraham I <kishon@ti.com> Reviewed-by:
Lukasz Majewski <l.majewski@samsung.com>
-
- Jan 28, 2015
-
-
This commit is a preperation for a subsequent UBIFS commit which needs atomic_long operations. Therefor "include/asm-generic/atomic-long.h" is imported from 1860e37 Linux 3.15 Signed-off-by:
Anton Habegger <anton.habegger@gmail.com>
-
- Dec 08, 2014
-
-
Masahiro Yamada authored
__user and __iomem are defined in include/linux/compiler.h. MAX_ERRNO is defined in include/linux/err.h. Signed-off-by:
Masahiro Yamada <yamada.m@jp.panasonic.com>
-
- Nov 20, 2014
-
-
Masahiro Yamada authored
U-Boot has imported various utility macros from Linux scattering them to various places without consistency. In include/common.h are min, max, min3, max3, ARRAY_SIZE, ALIGN, container_of, DIV_ROUND_UP, etc. In include/linux/compat.h are min_t, max_t, round_up, round_down, etc. We also have duplicated defines of min_t in some *.c files. Moreover, we are suffering from too cluttered include/common.h. This commit moves various macros that originate in include/linux/kernel.h of Linux to their original position. Note: This commit simply moves the macros; the macros roundup, min, max, min2, max3, ARRAY_SIZE are different from those of Linux at this point. Signed-off-by:
Masahiro Yamada <yamada.m@jp.panasonic.com>
-
- Aug 25, 2014
-
-
Heiko Schocher authored
- move linux specific defines from usb and video code into linux/compat.h - move common linux specific defines from include/ubi_uboot.h to linux/compat.h - add for new mtd/ubi/ubifs sync new needed linux specific defines to linux/compat.h Signed-off-by:
Heiko Schocher <hs@denx.de> Cc: Marek Vasut <marex@denx.de> Cc: Anatolij Gustschin <agust@denx.de> [trini: Add spin_lock_irqsave/spin_unlock_irqrestore dummies from usb/lin_gadet_compat.h] Signed-off-by:
Tom Rini <trini@ti.com>
-
- Jul 22, 2014
-
-
Lijun Pan authored
[backport from linux commit 204b885e and 218e180e7] 64 bit processors are becomming more and more popular. lower_32_bits and upper_32_bits save our labor doing shifts/manipulations like (u32)(n) and (u32)((n) >> 32). They are good helpers in both little and big endian cases. Port these two functions here from Linux:include/linux/kernel.h, cater the comment message to little/big endian cases. Later on, developers could include linux/compat.h if they want to use these two functions. Signed-off-by:
Lijun Pan <Lijun.Pan@freescale.com>
-
- Aug 22, 2013
-
-
Wu, Josh authored
Since kernel code current use many dev_xxx() instead of using printk. To compatible, move those dev_xxx from usb driver to linux/compat.h. Then all driver code can use dev_err, dev_info and dev_vdbg. This patch also removed duplicated macro definitions in usb driver. Signed-off-by:
Josh Wu <josh.wu@atmel.com> Acked-by:
Scott Wood <scottwood@freescale.com> Signed-off-by:
Andreas Bießmann <andreas.devel@googlemail.com>
-
- Nov 04, 2012
-
-
Kim Phillips authored
include/linux/compat.h:4:9: warning: preprocessor token __user redefined include/linux/compiler.h:7:10: this was the original definition include/linux/compat.h:5:9: warning: preprocessor token __iomem redefined include/linux/compiler.h:12:10: this was the original definition fixup __iomem, __user definitions in compat.h code appears to be placed there as a cover up from a code import from linux when u-boot didn't yet have a compiler.h, introduced by commit 932394ac "Rewrite of NAND code based on what is in 2.6.12 Linux kernel". Signed-off-by:
Kim Phillips <kim.phillips@freescale.com>
-
- Apr 30, 2012
-
-
Mike Frysinger authored
Merge our duplicate definitions with the common header. Also fix drivers/usb/gadget/s3c_udc_otg_xfer_dma.c to use min() instead of min_t() since we remove the latter from compat.h. Additionally use memalign() directly as the lin_gadget specific kmalloc() macro is removed from lin_gadget_compat.h by this patch. Signed-off-by:
Mike Frysinger <vapier@gentoo.org> Signed-off-by:
Anatolij Gustschin <agust@denx.de> Cc: Lukasz Majewski <l.majewski@samsung.com>
-
Mike Frysinger authored
This lets us use it in more places than just mtd code. Signed-off-by:
Mike Frysinger <vapier@gentoo.org>
-
- Jan 17, 2010
-
-
Matthias Kaehlcke authored
the macros likely and unlikely were defined in include/linux/mtd/compat.h, but used in code not related to MTD. moved the macro definitions to compiler.h Signed-off-by:
Matthias Kaehlcke <matthias@kaehlcke.net>
-
- Jun 12, 2009
-
-
Stefan Roese authored
This patch adds concatenation support to the U-Boot MTD infrastructure. By enabling CONFIG_MTD_CONCAT this MTD CFI wrapper will concatenate all found NOR devices into one single MTD device. This can be used by e.g by UBI to access a partition that spans over multiple NOR chips. Signed-off-by:
Stefan Roese <sr@denx.de>
-
- Aug 12, 2008
-
-
William Juul authored
- Fixing leading white spaces - Fixing indentation where 4 spaces are used instead of tab - Removing C++ comments (//), wherever I introduced them Signed-off-by:
William Juul <william.juul@tandberg.com> Signed-off-by:
Scott Wood <scottwood@freescale.com>
-
William Juul authored
A lot changed in the Linux MTD code, since it was last ported from Linux to U-Boot. This patch takes U-Boot NAND support to the level of Linux 2.6.22.1 and will enable support for very large NAND devices (4KB pages) and ease the compatibility between U-Boot and Linux filesystems. This patch is tested on two custom boards with PPC and ARM processors running YAFFS in U-Boot and Linux using gcc-4.1.2 cross compilers. MAKEALL ppc/arm has some issues: * DOC/OneNand/nand_spl is not building (I have not tried porting these parts, and since I do not have any HW and I am not familiar with this code/HW I think its best left to someone else.) Except for the issues mentioned above, I have ported all drivers necessary to run MAKEALL ppc/arm without errors and warnings. Many drivers were trivial to port, but some were not so trivial. The following drivers must be examined carefully and maybe rewritten to some degree: cpu/ppc4xx/ndfc.c cpu/arm926ejs/davinci/nand.c board/delta/nand.c board/zylonite/nand.c Signed-off-by:
William Juul <william.juul@tandberg.com> Signed-off-by:
Stig Olsen <stig.olsen@tandberg.com> Signed-off-by:
Scott Wood <scottwood@freescale.com>
-
- Sep 07, 2006
-
-
Stefan Roese authored
- Add support for PPC440EPx & PPC440GRx - Add support for PPC440EP(x)/GR(x) NAND controller in cpu/ppc4xx directory - Add NAND boot functionality for Sequoia board, please see doc/README.nand-boot-ppc440 for details - This Sequoia NAND image doesn't support environment in NAND for now. This will be added in a short while. Patch by Stefan Roese, 07 Sep 2006
-
- Aug 17, 2005
-
-
Wolfgang Denk authored
Patch by Ladislav Michl, 29 Jun 2005
-