summaryrefslogtreecommitdiffstats
path: root/include/linux
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Minor coding style cleanup.Wolfgang Denk2011-09-111-2/+0
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* Convert ISO-8859 files to UTF-8Albert ARIBAUD2011-08-041-1/+1
| | | | | | | | There was a mix of UTF-8 and ISO-8859 files in the U-Boot source tree, which could cause issues with the patchwork review system. This commit converts all ISO-8859 files to UTF-8. Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
* phylib: Detect link on 10G devices correctlyAndy Fleming2011-07-271-0/+8
| | | | | | | | | | | | | | | | gen10g_startup() had 2 bugs: 1) It had a boolean logic error in checking the MMD mask, and always checked all of them. 2) It checked devices which don't actually report link state, which meant that it would never believe the link was fully up. Fix the boolean logic, and then mask the MMD mask so only link-reporting devices are checked. Signed-off-by: Andy Fleming <afleming@freescale.com> Reported-by: Ed Swarthout <Ed.Swarthout@freescale.com>
* Create PHY Lib for U-BootAndy Fleming2011-04-202-0/+999
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extends the mii_dev structure to participate in a full-blown MDIO and PHY driver scheme. The mii_dev structure and miiphy calls are modified in such a way to allow the original mii command and miiphy infrastructure to work as before, but also to support a new set of APIs which allow (among other things) sharing of PHY driver code and 10G support The mii command will continue to support normal PHY management functions (Clause 22 of 802.3), but will not be changed to support 10G (Clause 45). The basic design is similar to PHY Lib from Linux, but simplified for U-Boot's network and driver infrastructure. We now have MDIO drivers and PHY drivers An MDIO driver provides: read write reset A PHY driver provides: (optionally): probe config - initial setup, starting of auto-negotiation startup - waiting for AN, and reading link state shutdown - any cleanup needed The ethernet drivers interact with the PHY Lib using these functions: phy_connect() phy_config() phy_startup() phy_shutdown() Each PHY driver can be configured separately, or all at once using config_phylib_all_drivers.h (added in the patch which adds the drivers) We also provide generic drivers for Clause 22 (10/100/1000), and Clause 45 (10G) PHYs. We also implement phy_reset(), and call it in phy_connect(). Because phy_reset() is essentially the same as miiphy_reset, but: a) must support 10G PHYs, and b) should use the phylib primitives, we implement miiphy_reset, using phy_reset(), but only when CONFIG_PHYLIB is set. Otherwise, we just use the old version. In this way, we save on compile size, even if we don't manage to save code size. Pulled ethtool.h and mdio.h from: git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 782d640afd15af7a1faf01cfe566ca4ac511319d With many, many deletions so as to enable compilation under u-boot Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Detlev Zundel <dzu@denx.de>
* NAND: add support for reading ONFI page tableFlorian Fainelli2011-04-011-0/+69
| | | | | | | | | | | | This patch adds support for reading an ONFI page parameter from a NAND device supporting it. If this is the case, struct nand_chip onfi_version member contains the supported ONFI version, 0 otherwise. This allows NAND drivers past nand_scan_ident to set the best timings for the NAND chip. Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: Scott Wood <scottwood@freescale.com>
* USB: Add USB RNDIS gadget protocolVitaly Kuzmichev2011-02-191-1/+5
| | | | | | | Port USB gadget RNDIS protocol support from linux-2.6.26 (.27 gadget stack actually has composite drivers). Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
* USB-CDC: Port struct net_device_statsVitaly Kuzmichev2011-02-191-0/+65
| | | | | | | Port struct net_device_stats and statistics collecting needed for RNDIS protocol. Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
* lib: add crc7 from LinuxThomas Chou2011-01-181-0/+14
| | | | | | | | | Crc7 is used to compute mmc spi command packet checksum. Copy from linux-2.6 lib/crc7.c include/linux/crc7.h commit ad241528c4919505afccb022acbab3eeb0db4d80 Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
* mtd: nand: Allow caller to pass alternative ID table to nand_scan_ident()Lei Wen2011-01-121-1/+3
| | | | | | | | | | | | | | This patch sync with David's patch on Linux for handling nand_scan_ident. commit 5e81e88a4c140586d9212999cea683bcd66a15c6 Author: David Woodhouse <David.Woodhouse@intel.com> Date: Fri Feb 26 18:32:56 2010 +0000 mtd: nand: Allow caller to pass alternative ID table to nand_scan_ident() Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: Lei Wen <leiwen@marvell.com>
* Merge branch 'next' of ../nextWolfgang Denk2010-12-222-3/+4
|\
| * NAND: add NAND_CMD_PARAM (0xec) definitionFlorian Fainelli2010-12-171-0/+1
| | | | | | | | | | | | This command is used to read the device ONFI parameters page. Signed-off-by: Florian Fainelli <florian@openwrt.org>
| * nand: constify id/manu tablesMike Frysinger2010-12-171-2/+2
| | | | | | | | | | | | These id tables need not be writable. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * Merge branch 'master' of ../master into nextWolfgang Denk2010-12-161-74/+107
| |\
| * | ctype: constify lookup tableMike Frysinger2010-11-281-1/+1
| | | | | | | | | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | | Coding style (white space) cleanup.Wolfgang Denk2010-12-171-94/+94
| |/ |/| | | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* | include/linux/mii.h: update for supporting GEMacpaul Lin2010-12-091-74/+107
|/ | | | | | | | This file has been synced (copy) from Linux source code. This commit was based on kernel 2.6.32. It updates gigabit related phy registers and basic definitions. Signed-off-by: Macpaul Lin <macpaul@andestech.com>
* Coding Style cleanupWolfgang Denk2010-10-273-65/+61
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* include/asm-offsets.h: automatically generate assembler constantsWolfgang Denk2010-10-261-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | A recurrent issue is that certain C level constructs like sizeof() or offsetof() cannot be used in assembler files, which is inconvenient when such constructs are used in the definition of macro names etc. To avoid duplication of such definitions (and thus another cause of problems), we adapt the Linux way to automatically generate the respective definitions from the respective C header files. In Linux, this is implemented in include/linux/kbuild.h, Kbuild, and arch/*/kernel/asm-offsets.c; we adapt the code from the Linux v2.6.36 kernel tree. We also copy the concept of the include/generated/ directory which can be used to hold other automatically generated files as well. We start with an architecture-independent lib/asm-offsets.c which generates include/generated/generic-asm-offsets.h (included by include/asm-offsets.h, which is what will be referred to in the actual source code). Later this may be extended by architecture-specific arch/*/lib/asm-offsets.c files that will generate a include/generated/asm-offsets.h. Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Kumar Gala <galak@kernel.crashing.org>
* Add linux framebuffer header include/linux/fb.hStefano Babic2010-10-221-0/+616
| | | | | | [port of linux 2.6.34 commit 6a9ee8af344e3bd7dbd61e67037096cdf7f83289] Signed-off-by: Stefano Babic <sbabic@denx.de>
* mtd: OneNAND: add support for OneNAND manufactured by NumonyxEnric Balletbo i Serra2010-10-111-0/+1
| | | | | | | | | | This patch adds the Numonyx manufacturer code (0x20) to onenand manufacturers. Signed-off-by: Enric Balletbo i Serra <eballetbo@gmail.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Steve Sakoman <steve.sakoman@linaro.org> Tested-by: Steve Sakoman <steve.sakoman@linaro.org>
* mtd: add an mtd method for get_len_incl_bad()Ben Gardiner2010-10-111-1/+3
| | | | | | | | | | | | | | | The logic to 'spread' mtd partitions needs to calculate the length in the mtd device, including bad blocks. This patch introduces a new function, mtd_get_len_incl_bad that can return both the length including bad blocks and whether that length was truncated on the device. This new function will be used by the mtdparts spread command later in this series. The definition of the function is #ifdef'd out in configurations that do not use the new 'mtdparts spread' command. Signed-off-by: Ben Gardiner<bengardiner@nanometrics.ca> CC: Scott Wood <scottwood@freescale.com>
* nand: remove dead code and suspend/resumeScott Wood2010-10-111-4/+0
| | | | | | | | | | | | | | | Get rid of the several "#if 0" sections that were keeping around Linux code that isn't relevant to U-Boot. Besides cluttering the code, these sections make tracking upstream changes harder, rather than easier. It's easy to discard obviously irrelevant diff hunks that patch rejects, but it's not as easy to notice hunks that apply cleanly to the #if 0 section, but *are* relevant to U-Boot and require modification elsewhere. Also remove suspend/resume, as this is not applicable to U-Boot. Removal saves 232 bytes on powerpc. Signed-off-by: Scott Wood <scottwood@freescale.com> Tested-by: Ben Gardiner <bengardiner@nanometrics.ca>
* USB-CDC: Fix coding style issuesVitaly Kuzmichev2010-09-203-77/+63
| | | | | | | | | | | | | | | | | Fixes most of checkpatch warnings and errors in USB gadget stack. The most frequently encountered problems are: 1) "(foo*)", "foo * bar", "foo* bar" 2) C99 // comments 3) No spaces before/after/around '?', ':', '=', '==', ',', '&', '(' 4) Spaces before '[' 5) Spaces between function names and '(' 6) Block braces in wrong places 7) Spaces before tabs 8) Macros with complex values not enclosed in parenthesis 9) Multiline comments start just after /* Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
* Integrate USB gadget layer and USB CDC driver layerRemy Bohmer2010-09-203-0/+1682
| | | | | | | Derived from Linux kernel 2.6.27 Signed-off-by: Thomas Smits <ts.smits@gmail.com> Signed-off-by: Remy Bohmer <linux@bohmer.net>
* x86: Fix support for booting bzImageGraeme Russ2010-05-068-0/+1147
| | | | | | | | | | | Add support for newer (up to 2.6.33) kernels Add zboot command which takes the address of a bzImage as its first argument and (optionally) the size of the bzImage as the second argument (the second argument is needed for older kernels which do not include the bzImage size in the header) Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
* nios2: add struct stat support in linux/stat.hThomas Chou2010-04-021-1/+1
| | | | | | | This is needed for jffs2 support. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Signed-off-by: Scott McNutt <smcnutt@psyent.com>
* move definition of macros likely and unlikely to compiler.hMatthias Kaehlcke2010-01-181-3/+0
| | | | | | | 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>
* add lzop decompression supportPeter Korsgaard2009-12-051-0/+4
| | | | | | | | | | | | | Add lzop decompression support to the existing lzo bitstream handling (think gzip versus zlib), and support it for uImage decompression if CONFIG_LZO is enabled. Lzop doesn't compress as good as gzip (~10% worse), but decompression is very fast (~0.7s faster here on a slow ppc). The lzop decompression code is based on Albin Tonnerre's recent ARM Linux lzo support patch. Cc: albin.tonnerre@free-electrons.com Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
* NAND:Extending the nand_ecclayout structureSandeep Paulraj2009-11-181-1/+1
| | | | | | | | | NANDs with page size of lesser than and equal to 2K are reaching EOL. They are bing replaced with NANDs of page size 4K and above. To support this we have to extend the eccpos field Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* Merge branch 'master' into nextWolfgang Denk2009-11-152-0/+140
|\
| * ARM: Use Linux version for unaligned access codeRemy Bohmer2009-11-072-0/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The asm-arm/unaligned.h includes linux/unaligned/access_ok.h This file is unsafe to be used on ARM, since it does an unaligned memory accesses which fails on ARM. Lookin at Linux the basic difference seems to be the header "include/asm-arm/unaligned.h". The Linux version of "unaligned.h" does *not* include "access_ok.h" at all. It includes "le_byteshift.h" and "be_byteshift.h" instead. Signed-off-by: Remy Bohmer <linux@bohmer.net> Signed-off-by: Stefan Roese <sr@denx.de> -- include/asm-arm/unaligned.h | 3 - include/linux/unaligned/be_byteshift.h | 70 +++++++++++++++++++++++++++++++++ include/linux/unaligned/le_byteshift.h | 70 +++++++++++++++++++++++++++++++++ 3 files changed, 142 insertions(+), 1 deletion(-) create mode 100644 include/linux/unaligned/be_byteshift.h create mode 100644 include/linux/unaligned/le_byteshift.h
* | Flex-OneNAND driver supportAmul Kumar Saha2009-11-132-3/+31
| | | | | | | | | | | | | | This patch adds support for Flex-OneNAND devices. Signed-off-by: Rohit Hagargundgi <h.rohit@samsung.com> Signed-off-by: Amul Kumar Saha <amul.saha@samsung.com>
* | NAND: Update to support 64 bit device sizeSandeep Paulraj2009-11-132-3/+3
|/ | | | | | | | This patch adds support for NANDs greater than 2 GB. Patch is based on the MTD NAND driver in the kernel. Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* s5pc1xx: SMDKC100: fix compile warningsMinkyu Kang2009-10-241-35/+35
| | | | | | | fix the following compile warnings warning: dereferencing type-punned pointer will break strict-aliasing rules Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
* s5pc1xx: support onenand driverMinkyu Kang2009-10-133-0/+136
| | | | | | | This patch includes the onenand driver for s5pc100 Signed-off-by: Minkyu Kang <mk7.kang@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* Correct ffs/fls regression for PowerPC etcSimon Kagstrom2009-09-171-4/+4
| | | | | | | | | | | | | | | Commits 02f99901ed1c9d828e3ea117f94ce2264bf8389e 52d61227b66d4099b39c8309ab37cb67ee09a405 introduced a regression where platform-specific ffs/fls implementations were defined away. This patch corrects that by using PLATFORM_xxx instead of the name itself. Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net> Acked-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Stefan Roese <sr@denx.de>
* Define ffs/fls for all architecturesSimon Kagstrom2009-09-151-0/+45
| | | | | | | | UBIFS requires fls(), which is not defined for arm (and some other architectures) and this patch adds it. The implementation is taken from Linux and is generic. ffs() is also defined for those that miss it. Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
* Move __set/clear_bit from ubifs.h to bitops.hSimon Kagstrom2009-09-151-0/+38
| | | | | | | | | __set_bit and __clear_bit are defined in ubifs.h as well as in asm/include/bitops.h for some architectures. This patch moves the generic implementation to include/linux/bitops.h and uses that unless it's defined by the architecture. Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
* MTD:NAND: ADD new ECC mode NAND_ECC_HW_OOB_FIRSTSandeep Paulraj2009-08-261-0/+1
| | | | | | | | | | | | | | | | | This patch adds the new mode NAND_ECC_HW_OOB_FIRST in the nand code to support 4-bit ECC on TI DaVinci devices with large page (up to 2K) NAND chips. This ECC mode is similar to NAND_ECC_HW, with the exception of read_page API that first reads the OOB area, reads the data in chunks, feeds the ECC from OOB area to the ECC hw engine and perform any correction on the data as per the ECC status reported by the engine. This patch has been accepted by Andrew Morton and can be found at http://userweb.kernel.org/~akpm/mmotm/broken-out/mtd-nand-add-new-ecc-mode-ecc_hw_oob_first.patch Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com> Signed-off-by: Sneha Narnakaje <nsnehaprabha@ti.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* NAND: ADD page Parameter to all read_page/read_page_raw API'sSandeep Paulraj2009-08-261-2/+2
| | | | | | | | | | | | | | | | This patch adds a new "page" parameter to all NAND read_page/read_page_raw APIs. The read_page API for the new mode ECC_HW_OOB_FIRST requires the page information to send the READOOB command and read the OOB area before the data area. This patch has been accepted by Andrew Morton and can be found at http://userweb.kernel.org/~akpm/mmotm/broken-out/mtd-nand-add-page-parameter-to-all-read_page-read_page_raw-apis.patch WE would like this to become part of the u-boot GIT as well Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com> Signed-off-by: Sneha Narnakaje <nsnehaprabha@ti.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* OneNAND: Remove unused read_spareramKyungmin Park2009-08-261-2/+1
| | | | | | | Remove unused read_spareram and add unlock_all as kernel does Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* Replace BCD2BIN and BIN2BCD macros with inline functionsAlbin Tonnerre2009-08-251-12/+0
| | | | | | | | | | In the process, also remove backward-compatiblity macros BIN_TO_BCD and BCD_TO_BIN and update the sole board using them to use the new bin2bcd and bcd2bin instead Signed-off-by: Albin Tonnerre <albin.tonnerre@free-electrons.com> Acked-by: Stefan Roese <sr@denx.de> Acked-by: Detlev Zundel <dzu@denx.de>
* Remove legacy NAND and disk on chip code.Scott Wood2009-07-162-256/+0
| | | | | | | | | | | | | Legacy NAND had been scheduled for removal. Any boards that use this were already not building in the previous release due to an #error. The disk on chip code in common/cmd_doc.c relies on legacy NAND, and it has also been removed. There is newer disk on chip code in drivers/mtd/nand; someone with access to hardware and sufficient time and motivation can try to get that working, but for now disk on chip is not supported. Signed-off-by: Scott Wood <scottwood@freescale.com>
* nand: Change NAND_MAX_OOBSIZE to 218 as needed for some 4k page devicesStefan Roese2009-07-161-1/+1
| | | | | | | | | This is needed for the MPC512x NAND driver (fsl_nfc_nand.c) which already defines such a 4k plus 218 bytes ECC layout. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Scott Wood <scottwood@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* Coding style cleanup; update CHANGELOGWolfgang Denk2009-07-072-4/+2
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* mtd: Update MTD infrastructure to support 64bit device sizeStefan Roese2009-06-121-8/+21
| | | | | | | | | | | This patch brings the U-Boot MTD infrastructure in sync with the current Linux MTD version (2.6.30-rc3). Biggest change is the 64bit device size support and a resync of the mtdpart.c file which has seen multiple fixes meanwhile. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Scott Wood <scottwood@freescale.com> Cc: Kyungmin Park <kmpark@infradead.org>
* mtd: Add MTD concat support to concatenate multiple MTD NOR devicesStefan Roese2009-06-122-4/+29
| | | | | | | | | 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>
OpenPOWER on IntegriCloud