summaryrefslogtreecommitdiffstats
path: root/include/linux
Commit message (Collapse)AuthorAgeFilesLines
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-2413-143/+13
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* usb: fix unaligned access in device_qual()Heiko Schocher2013-06-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | while playing with dfu, I tapped in an unaligned access when doing on the host side a "lsusb -d [vendornr]: -v" I get on the board: GADGET DRIVER: usb_dnl_dfu data abort MAYBE you should read doc/README.arm-unaligned-accesses pc : [<8ff71db8>] lr : [<8ff75aec>] sp : 8ef40d18 ip : 00000005 fp : 00000000 r10: 00000000 r9 : 47401410 r8 : 8ef40f38 r7 : 8ef4aae8 r6 : 0000000a r5 : 8ef4ab28 r4 : 8ef4ab80 r3 : 0000000a r2 : 00000006 r1 : 00000006 r0 : 8ef4aae8 Flags: Nzcv IRQs off FIQs on Mode SVC_32 Resetting CPU ... reason is that in the "struct usb_composite_dev" the "struct usb_device_descriptor desc;" is on an odd address, and this struct gets accessed in drivers/usb/gadget/composite.c device_qual() Fix it, by align this var "struct desc" fix to an aligned address. Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Samuel Egli <samuel.egli@siemens.com>
* add support for Xilinx 1000BASE-X phy (GTX)Charles Coldwell2013-06-242-0/+6
| | | | | | | | | | commit 39695029bc15041c809df3db4ba19bd729c447fa Author: Charles Coldwell <coldwell@ll.mit.edu> Date: Tue Feb 19 08:27:33 2013 -0500 Changes to support the Xilinx 1000BASE-X phy (GTX/MGT) Signed-off-by: Charles Coldwell <coldwell@ll.mit.edu>
* usb: Use get_unaligned() in usb_endpoint_maxp() for wMaxPacketSizeVivek Gautam2013-06-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Use unaligned access to fetch wMaxPacketSize in usb_endpoint_maxp() api. In its absence we see following data abort message: ============================================================== data abort MAYBE you should read doc/README.arm-unaligned-accesses pc : [<bf794e24>] lr : [<bf794e1c>] sp : bf37c7b0 ip : 0000002f fp : 00000000 r10: 00000000 r9 : 00000002 r8 : bf37fecc r7 : 00000001 r6 : bf7d8931 r5 : bf7d891c r4 : bf7d8800 r3 : bf7d65b0 r2 : 00000002 r1 : bf7d65b4 r0 : 00000027 Flags: nZCv IRQs off FIQs off Mode SVC_32 Resetting CPU ... resetting ... ============================================================== Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com> Cc: Ilya Yanok <ilya.yanok@cogentembedded.com> Cc: Marek Vasut <marex@denx.de>
* Merge branch 'master' of git://git.denx.de/u-boot-nand-flashTom Rini2013-05-315-315/+271
|\
| * mtd: resync with Linux-3.7.1Sergey Lapin2013-05-315-315/+271
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is essentially an update of u-boot MTD subsystem to the state of Linux-3.7.1 with exclusion of some bits: - the update is concentrated on NAND, no onenand or CFI/NOR/SPI flashes interfaces are updated EXCEPT for API changes. - new large NAND chips support is there, though some updates have got in Linux-3.8.-rc1, (which will follow on top of this patch). To produce this update I used tag v3.7.1 of linux-stable repository. The update was made using application of relevant patches, with changes relevant to U-Boot-only stuff sticked together to keep bisectability. Then all changes were grouped together to this patch. Signed-off-by: Sergey Lapin <slapin@ossfans.org> [scottwood@freescale.com: some eccstrength and build fixes] Signed-off-by: Scott Wood <scottwood@freescale.com>
* | mtd: nand: add driver for diskonchip g4 nand flashMike Dunn2013-05-051-0/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a driver for the diskonchip G4 nand flash device. It is based on the driver from the linux kernel. This also includes a separate SPL driver. A separate SPL driver is used because the device operates in a different mode (reliable mode) when loading a boot image, and also because the storage format of the boot image is different from normal data (pages are stored redundantly). The SPL driver basically mimics how a typical IPL reads data from the device. The special operating mode and storage format are used to compensate for the fact that the IPL does not contain the BCH ecc decoding algorithm (due to size constraints). Although the u-boot SPL *could* use ecc, it operates like an IPL for the sake of simplicity and uniformity, since the IPL and SPL share the task of loading the u-boot image. As a side benefit, the SPL driver is very small. [port from linux kernel 3.4 commit 570469f3bde7f71cc1ece07a18d54a05b6a8775d] Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
* | lib: import bitrev library from the linux kernelMike Dunn2013-05-051-0/+23
|/ | | | | | | | | | | This patch adds the bitrev library from the linux kernel. This is a simple algorithm that uses an 8 bit look-up table to reverse the bits in data types of 8, 16, or 32 bit widths. The docg4 nand flash driver uses it. [port from linux kernel v3.9 commit 7ee32a6d30d1c8a3b7a07a6269da8f0a08662927] [originally added: v2.6.20 by commit a5cfc1ec58a07074dacb6aa8c79eff864c966d12] Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
* Consolidate bool typeYork Sun2013-04-013-4/+5
| | | | | | | | | | | | | 'bool' is defined in random places. This patch consolidates them into a single header file include/linux/types.h, using stdbool.h introduced in C99. All other #define, typedef and enum are removed. They are all consistent with true = 1, false = 0. Replace FALSE, False with false. Replace TRUE, True with true. Skip *.py, *.php, lib/* files. Signed-off-by: York Sun <yorksun@freescale.com>
* Make linux kernel string funcs available to toolsJoe Hershberger2012-12-132-4/+9
| | | | | | | | | | isspace() and strim() are not in the typical user-mode string.h, so put them in a separate compilation unit so that they can be built into tools that need them independent of the other common string functions. This allows code shared by u-boot and the linux user-mode tools to link. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
* Add strcasecmp() and strncasecmp()Simon Glass2012-12-111-2/+5
| | | | | | | | | | | strncasecmp() is present as strnicmp() but disabled. Make it available and define strcasecmp() also. There is a only a small performance penalty to having strcasecmp() call strncasecmp(), so do this instead of a standalone function, to save code space. Update the prototype in arch-specific headers as needed to avoid warnings. Signed-off-by: Simon Glass <sjg@chromium.org>
* include/linux/byteorder: Always defines __fswab64, __swab64p and __swab64sNobuhiro Iwamatsu2012-11-301-2/+0
| | | | | | | | | | | | | | | | | | When __BYTEORDER_HAS_U64__ is not defined, we got warning following: ----- /tmp/include/linux/byteorder/little_endian.h: In function ‘__cpu_to_be64p’: /tmp/include/linux/byteorder/little_endian.h:71:2: warning: implicit declaration of function ‘__swab64p’ [-Wimplicit-function-declaration] ----- Usually, __arch__swab64* required for __fswab64, __swab64p and __swab64s is defined. Therefore, __BYTEORDER_HAS_U64__ is unnecessary. This removes __BYTEORDER_HAS_U64__. Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> CC: Kim Phillips <kim.phillips@freescale.com> Reviewed-by: Kim Phillips <kim.phillips@freescale.com>
* Merge branch 'master' of git://git.denx.de/u-boot-nand-flashTom Rini2012-11-261-3/+4
|\
| * nand: Move the sub-page read support enable to a flagJoe Hershberger2012-11-261-3/+4
| | | | | | | | | | | | | | | | | | Use a flag instead of a hard-coded macro so that sub-page reads can be enabled in other cases (such as on-die ecc). This is the same as a5ff4f102937a3492bca4a9ff0c341d78813414c in Linux Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
* | musb-new: port of Linux musb driverIlya Yanok2012-11-201-0/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Existing U-Boot musb driver has no support for the new gadget framework and also seems to have other limitations. As gadget framework is ported from Linux it seems pretty natural to port musb gadget driver as well. This driver supports both host and peripheral modes. This is not a replacement for current musb driver (at least now) as there are still some consumers of the old UDC interface. No DMA operation support included, CONFIG_MUSB_PIO_ONLY should be defined. Virtual root hub device is not implemented. Known problems: with no devices connected usb_lowlevel_start() fails. Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
* | linux/usb/ch9.h: update with the version from Linux treeIlya Yanok2012-11-201-15/+499
|/ | | | Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
* include/linux/stddef.h: avoid 'warning: preprocessor token offsetof redefined'Kim Phillips2012-11-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hack to avoid: /opt/gcc-4.6.3-nolibc/powerpc-linux/bin/../lib/gcc/powerpc-linux/4.6.3/include/stddef.h:413:9: warning: preprocessor token offsetof redefined u-boot/include/linux/stddef.h:20:9: this was the original definition tried protecting with __KERNEL__, and #including compiler.h first. Even tried include dir reordering to no avail: +++ b/config.mk @@ -194,7 +194,11 @@ OBJCFLAGS += --gap-fill=0xff gccincdir := $(shell $(CC) -print-file-name=include) CPPFLAGS := $(DBGFLAGS) $(OPTFLAGS) $(RELFLAGS) \ - -D__KERNEL__ + -D__KERNEL__ \ + -I $(gccincdir) \ + -nostdinc + +# -isystem $(gccincdir) \ # Enable garbage collection of un-used sections for SPL ifeq ($(CONFIG_SPL_BUILD),y) @@ -227,8 +231,7 @@ CPPFLAGS += -I$(OBJTREE)/include2 -I$(OBJTREE)/include endif CPPFLAGS += -I$(TOPDIR)/include -CPPFLAGS += -fno-builtin -ffreestanding -nostdinc \ - -isystem $(gccincdir) -pipe $(PLATFORM_CPPFLAGS) +CPPFLAGS += -fno-builtin -ffreestanding -pipe $(PLATFORM_CPPFLAGS) Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
* include/linux/unaligned/generic.h: fix warning: preprocessor token __force ↵Kim Phillips2012-11-041-3/+0
| | | | | | | | | | | | | | redefined include/linux/unaligned/generic.h:5:9: warning: preprocessor token __force redefined include/linux/compiler.h:10:10: this was the original definition fixup __force 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 b1b4e89a0f3b75854c39a62cae41bad56d210adf "Add LZO decompressor support". Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
* include/linux/compat.h: fix warning: preprocessor token {__iomem, __user} ↵Kim Phillips2012-11-042-3/+2
| | | | | | | | | | | | | | | | | redefined 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 932394ac43e2e778e664eeb6e456fecd0fae6e59 "Rewrite of NAND code based on what is in 2.6.12 Linux kernel". Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
* include/linux/byteorder: import latest endian definitions from linuxKim Phillips2012-11-043-96/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | u-boot's byteorder headers did not contain endianness attributions for use with sparse, causing a lot of false positives. Import the kernel's latest definitions, and enable them by including compiler.h and types.h. They come with 'const' added for some swab functions, so fix those up, too: include/linux/byteorder/big_endian.h:46:2: warning: passing argument 1 of '__swab64p' discards 'const' qualifier from pointer target type [enabled by default] Also, note: u-boot's historic __BYTE_ORDER definition has been preserved (for the time being at least). We also remove ad-hoc barrier() definitions, since we're including compiler.h in files that hadn't in the past: macb.c:54:0: warning: "barrier" redefined [enabled by default] In addition, including compiler.h in byteorder changes the 'noinline' definition to expand to __attribute__((noinline)). This fixes arch/powerpc/lib/bootm.c: bootm.c:329:16: error: attribute '__attribute__': unknown attribute bootm.c:329:16: error: expected ')' before '__attribute__' bootm.c:329:25: error: expected identifier or '(' before ')' token powerpc sparse builds yield: include/common.h:356:22: error: marked inline, but without a definition the unknown-reason inlining without a definition is considered obsolete given it was part of the 2002 initial commit, and no arm version was 'fixed.' also fixed: ydirectenv.h:60:0: warning: "inline" redefined [enabled by default] and: Configuring for devconcenter - Board: intip, Options: DEVCONCENTER make[1]: *** [4xx_ibm_ddr2_autocalib.o] Error 1 make: *** [arch/powerpc/cpu/ppc4xx/libppc4xx.o] Error 2 powerpc-fsl-linux-size: './u-boot': No such file 4xx_ibm_ddr2_autocalib.c: In function 'DQS_autocalibration': include/asm/ppc4xx-sdram.h:1407:13: sorry, unimplemented: inlining failed in call to 'ppc4xx_ibm_ddr2_register_dump': function body not available 4xx_ibm_ddr2_autocalib.c:1243:32: sorry, unimplemented: called from here and: In file included from crc32.c:50:0: crc32table.h:4:1: warning: implicit declaration of function '___constant_swab32' [-Wimplicit-function-declaration] crc32table.h:4:1: error: initializer element is not constant crc32table.h:4:1: error: (near initialization for 'crc32table_le[0]') Signed-off-by: Kim Phillips <kim.phillips@freescale.com> [trini: Remove '#endif' in include/common.h around setenv portion] Signed-off-by: Tom Rini <trini@ti.com>
* COMMON: Add __stringify() functionMarek Vasut2012-10-151-0/+12
| | | | | | | | | | | | | Copied from Linux kernel: commit 8f7c2c37319a81ef4c2bfdec67b1ccd5744d97e4 Date: Wed Apr 8 16:58:57 2009 +0800 Pull in the __stringify() macro from Linux kernel. This macro is usually used to convert numbers to strings at preprocessor level, yet it is not limited only to that. This is useful as it allows higher usage of puts() in favour of printf(). Signed-off-by: Marek Vasut <marex@denx.de> Cc: Wolfgang Denk <wd@denx.de>
* Merge branch 'master' of git://git.denx.de/u-boot-armTom Rini2012-09-211-3/+4
|\
| * nand: Try to align the default buffersSimon Glass2012-09-071-3/+4
| | | | | | | | | | | | | | | | | | | | The NAND layer needs to use cache-aligned buffers by default. Towards this goal. align the default buffers and their members according to the minimum DMA alignment defined for the architecture. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Warren <twarren@nvidia.com> Acked-by: Scott Wood <scottwood@freescale.com>
* | mtd: nand: allow NAND_NO_SUBPAGE_WRITE to be set from driverMarek Vasut2012-09-171-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is based on Linux kernel -next: commit 14f44abf1dafc20ba42ce8616a8fc8fbd1b3712b Author: Brian Norris <computersforpeace@gmail.com> Date: Fri Jul 13 09:28:24 2012 -0700 mtd: nand: allow NAND_NO_SUBPAGE_WRITE to be set from driver The NAND_CHIPOPTIONS_MSK has limited utility and is causing real bugs. It silently masks off at least one flag that might be set by the driver (NAND_NO_SUBPAGE_WRITE). This breaks the GPMI NAND driver and possibly others. Really, as long as driver writers exercise a small amount of care with NAND_* options, this mask is not necessary at all; it was only here to prevent certain options from accidentally being set by the driver. But the original thought turns out to be a bad idea occasionally. Thus, kill it. Note, this patch fixes some major gpmi-nand breakage. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Brian Norris <computersforpeace@gmail.com> Cc: Eric Nelson <eric.nelson@boundarydevices.com> Cc: Fabio Estevam <festevam@gmail.com> Cc: Otavio Salvador <otavio@ossystems.com.br> Cc: Scott Wood <scottwood@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* | nand: consolidate duplicated constantsJoe Hershberger2012-09-171-0/+2
|/ | | | | | | NAND_CMD_ constants for lock/unlock should be in the header Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* st_smi: Change SMI timeout valuesAmit Virdi2012-07-071-2/+2
| | | | | Signed-off-by: Amit Virdi <amit.virdi@st.com> Signed-off-by: Stefan Roese <sr@denx.de>
* st_smi: Add support for SPEAr SMI driverVipin KUMAR2012-07-071-0/+117
| | | | | | | | | | | | | | SMI is the serial memory interface controller provided by ST. Earlier, a driver exists in the u-boot source code for the SMI IP. However, it was specific to spear platforms. This commit converts the same driver to a more generic driver. As a result, the driver files are renamed to st_smi.c and st_smi.h and moved into drivers/mtd folder for reusability by other platforms using smi controller peripheral. Signed-off-by: Vipin Kumar <vipin.kumar@st.com> Signed-off-by: Amit Virdi <amit.virdi@st.com> Signed-off-by: Stefan Roese <sr@denx.de>
* mtd/NAND: Add FSMC driver supportVipin KUMAR2012-07-071-0/+101
| | | | | | | | | | | | | | Flexible static memory controller is a peripheral provided by ST, which controls the access to NAND chips along with many other memory device chips eg NOR, SRAM. This patch adds the driver support for FSMC controller interfacing with NAND memory. Signed-off-by: Vipin Kumar <vipin.kumar@st.com> Signed-off-by: Amit Virdi <amit.virdi@st.com> Signed-off-by: Stefan Roese <sr@denx.de> Acked-by: Scott Wood <scottwood@freescale.com>
* Merge branch 'master' of git://git.denx.de/u-boot-usbWolfgang Denk2012-05-203-67/+356
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'master' of git://git.denx.de/u-boot-usb: USB: S5P: Add ehci support usb:udc:samsung Add functions for storing private gadget data in UDC driver usb:gadget:composite: Support for composite at gadget.h usb:gadget:composite USB composite gadget support usb:udc:samsung:cleanup Replace DEBUG_* macros with debug_cond() calls usb:udc: Remove duplicated USB definitions from include/linux/usb/ch9.h file USB: Document the QH and qTD antics in EHCI-HCD USB: Drop cache flush bloat in EHCI-HCD USB: Drop ehci_alloc/ehci_free in ehci-hcd USB: Align buffers at cacheline usb: use noinline define
| * usb:gadget:composite: Support for composite at gadget.hLukasz Majewski2012-05-201-0/+6
| | | | | | | | | | | | | | | | | | Add device data pointer to the USB gadget's device struct. Wrapper for extracting usb_gadget from Linux's usb device Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: Marek Vasut <marex@denx.de>
| * usb:gadget:composite USB composite gadget supportLukasz Majewski2012-05-201-0/+350
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | USB Composite gadget implementation for u-boot. It builds on top of USB UDC drivers. This commit is based on following files from Linux Kernel v2.6.36: ./include/linux/usb/composite.h ./drivers/usb/gadget/composite.c SHA1: d187abb9a83e6c6b6e9f2ca17962bdeafb4bc903 Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: Marek Vasut <marex@denx.de>
| * usb:udc: Remove duplicated USB definitions from include/linux/usb/ch9.h fileLukasz Majewski2012-05-201-67/+0
| | | | | | | | | | | | | | | | | | | | | | Remove the repeated USB descriptor code and use usbdescriptors.h file. ch9.h file has been copied from linux and is needed for USB gadget related work. Now usbdescriptors.h and ch9.h shall be used together. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: Marek Vasut <marex@denx.de>
* | input: Add linux/input.h for key code supportSimon Glass2012-05-151-0/+155
| | | | | | | | | | | | | | | | We want to able to decode Linux fdt keymaps, so bring part of this enormous header file over to U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Warren <twarren@nvidia.com>
* | arm: adapt asm/linkage.h from LinuxAneesh V2012-05-151-1/+6
|/ | | | | | | | This will add ARM specific over-rides for the defines from linux/linkage.h Signed-off-by: Aneesh V <aneesh@ti.com> Tested-by: Mike Frysinger <vapier@gentoo.org>
* lin_gadget: use common linux/compat.hMike Frysinger2012-04-301-0/+3
| | | | | | | | | | | | | | | | 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>
* linux/compat.h: rename from linux/mtd/compat.hMike Frysinger2012-04-305-4/+4
| | | | | | This lets us use it in more places than just mtd code. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* onenand: Replace ONENAND_IS_MLC() with ONENAND_HAS_4KB()Lukasz Majewski2012-04-041-0/+4
| | | | | | | | | | | | | | | | | | This replacement causes 4KB page size devices to work properly with u-boot. The old ONENAND_IS_MLC() behavior has been preserved by explicit setting of ONENAND_HAS_4KB_PAGE for those devices. This change makes the onenand_base.c file more resembling the respective kernel sources. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> --- Test HW: - Samsung S5PC110 GONI - Samsung S5PC210 Universal
* onenand:samsung Target dependent OneNAND chip probe functionLukasz Majewski2012-04-042-0/+3
| | | | | | | | | | Separate callback for probing OneNAND memory chip. If no special function is defined, default implementation will be used. This approach gives more flexibility for OneNAND device probing. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* nand: reinstate lazy bad block scanningScott Wood2012-02-281-0/+2
| | | | | | | | | | | | | commit 2a8e0fc8b3dc31a3c571e439fbf04b882c8986be ("nand: Merge changes from Linux nand driver") accidentally reverted commit 13f0fd94e3cae6f8a0d9fba5d367e311edc8ebde ("NAND: Scan bad blocks lazily."). Reinstate the change, as amended by commit ff49ea8977b56916edd5b1766d9939010e30b181 ("NAND: Mark the BBT as scanned prior to calling scan_bbt."). Signed-off-by: Scott Wood <scottwood@freescale.com>
* Revert "nand: make 1-bit software ECC configurable"Scott Wood2012-02-281-25/+0
| | | | | | | | | | | | | | This reverts commit 4fee6c2f295f932b8febdc7ce8731ba045695fa5. It breaks boards that currently rely on soft-ecc, as pointed out here: http://patchwork.ozlabs.org/patch/140872/ The reverted patch should be resubmitted with documentation, and with the CONFIG_MTD_ECC_SOFT selected from every board that needs it. We could start by looking at what NAND driver the board selects, and whether that driver ever asks for soft ECC. Signed-off-by: Scott Wood <scottwood@freescale.com>
* linkage.h: move from blackfin to common includesMacpaul Lin2012-02-121-0/+76
| | | | | | | | | | | 1. Add linkage.h support from blackfin to common include, which is a reduced version from Linux. 2. Add architecture part support of linkage.h into blackfin 3. Fix include path of in blackfin related to linkage.h due to header file movement. Signed-off-by: Macpaul Lin <macpaul@andestech.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* nand: make 1-bit software ECC configurableChristian Hitz2012-01-261-0/+25
| | | | | | | | | | The software ECC algorithm is not necessary when hardware ECC is available and can be left out for a smaller image size. Enable with CONFIG_MTD_ECC_SOFT. Signed-off-by: Christian Hitz <christian.hitz@aizo.com> Cc: Scott Wood <scottwood@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* nand: Sanitize ONFI strings.Christian Hitz2012-01-261-0/+4
| | | | | | | | | | | [backport from linux commit 02f8c6aee8df3cdc935e9bdd4f2d020306035dbe] This is part of the synchronization with the nand driver to the Linux 3.0 state. Signed-off-by: Christian Hitz <christian.hitz@aizo.com> Cc: Scott Wood <scottwood@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* nand: Merge changes to BBT from Linux nand driverChristian Hitz2012-01-261-0/+2
| | | | | | | | | | [backport from linux commit 02f8c6aee8df3cdc935e9bdd4f2d020306035dbe] This patch synchronizes the nand driver with the Linux 3.0 state. Signed-off-by: Christian Hitz <christian.hitz@aizo.com> Cc: Scott Wood <scottwood@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* nand: Merge changes from Linux nand driverChristian Hitz2012-01-262-165/+232
| | | | | | | | | | | [backport from linux commit 02f8c6aee8df3cdc935e9bdd4f2d020306035dbe] This patch synchronizes the nand driver with the Linux 3.0 state. Signed-off-by: Christian Hitz <christian.hitz@aizo.com> Cc: Scott Wood <scottwood@freescale.com> [scottwood@freescale.com: minor fixes] Signed-off-by: Scott Wood <scottwood@freescale.com>
* nand: Merge BCH code from Linux nand driverChristian Hitz2012-01-263-7/+154
| | | | | | | | | | | | [backport from linux commit 02f8c6aee8df3cdc935e9bdd4f2d020306035dbe] This patch merges the BCH ECC algorithm from the 3.0 Linux kernel. This enables U-Boot to support modern NAND flash chips that require more than 1-bit of ECC in software. Signed-off-by: Christian Hitz <christian.hitz@aizo.com> Cc: Scott Wood <scottwood@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* nand: Add common functions to linux/mtd/nand.hSimon Schwarz2011-12-061-0/+7
| | | | | | | | | | | | Functions often used in SPL are now part of linux/mtd/nand.h. Static modifiers are removed from these functions in drivers/mtd/nand/nand_base.c. Signed-off-by: Simon Schwarz <simonschwarzcor@gmail.com> Cc: scottwood@freescale.com Cc: s-paulraj@ti.com Cc: albert.u.boot@aribaud.net Acked-by: Scott Wood <scottwood@freescale.com>
* Add isblankJason Hobbs2011-10-171-0/+6
| | | | | | | | | | | Existing ctype checks are implemented using a 256 byte lookup table, allowing each character to be in any of 8 character classes. Since there are 8 existing character classes without the blank class, I implemented isblank without using the lookup table. Since there are only two blank characters - tab and space - this is a more reasonable approach than doubling the size of the lookup table to accommodate one more class. Signed-off-by: Jason Hobbs <jason.hobbs@calxeda.com>
* NAND: Really ignore bad blocks when scrubbingMarek Vasut2011-10-031-0/+1
| | | | | | | | | | Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Scott Wood <scottwood@freescale.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Detlev Zundel <dzu@denx.de> [scottwood@freescale.com: use chip instead of redundant priv_nand] Signed-off-by: Scott Wood <scottwood@freescale.com>
* Add missing header for gcc3Scott McNutt2011-10-011-0/+21
| | | | | | | | When include/linux/compiler.h is included, the associated gcc3 header is required for older build environments. Signed-off-by: Scott McNutt <smcnutt@psyent.com> Acked-by: Mike Frysinger <vapier@gentoo.org>
OpenPOWER on IntegriCloud