summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* of: base.c: Use correct device-tree in of_add_initrd()David Jander2013-08-141-1/+1
| | | | | | | | Otherwise only the internal DT is modified, not necessarily the one passed to the kernel. Signed-off-by: David Jander <david@protonic.nl> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: Fix endless loop in of_add_memorySascha Hauer2013-08-141-1/+4
| | | | | | | of_add_memory is stuck in an endless loop when a memory bank with zero size is passed. Fix this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Cleanup Kconfig filesAlexander Shiyan2013-08-121-1/+1
| | | | | | | | | This patch provides a global cleanup barebox Kconfig files. This includes replacing spaces to tabs, formatting in accordance format. No functional changes. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: ubi: add missing prototype for ubi_volume_notifySascha Hauer2013-08-061-0/+2
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: ubi: remove calls to nonexisting functionsSascha Hauer2013-08-061-5/+0
| | | | | | | | We do not have ubi_do_get_volume_info and ubi_do_get_device_info and do not need them yet, so remove calls to these functions to fix compilation. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/serial'Sascha Hauer2013-08-052-39/+103
|\
| * serial: ns16550: fill cdev just-in-timeAntony Pavlov2013-07-241-2/+1
| | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * serial: ns16550: get clock-frequency from dtAntony Pavlov2013-07-241-0/+6
| | | | | | | | | | | | | | | | | | This patch helps clk-less boards to use device tree for clock frequency probing (taken from linux.git/drivers/tty/serial/of_serial.c). Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * serial: ns16550: Add devicetree probe supportSascha Hauer2013-07-231-1/+24
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * serial: ns16550: Add clk support and make platform_data optionalSascha Hauer2013-07-231-3/+23
| | | | | | | | | | | | | | | | The clockrate was the only really needed field from platform data. Add clk support to retrieve the clockrate and make platform data optional. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * serial: ns16550: remove f_caps from platform_dataSascha Hauer2013-07-231-4/+1
| | | | | | | | | | | | | | So far no user had the need to set the flags, so just remove them from platform data. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * serial: ns16550: introduce private structSascha Hauer2013-07-231-9/+28
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * serial: ns16550: reorder functions to avoid forward declarationSascha Hauer2013-07-231-31/+28
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * clk: provide static inline wrappersSascha Hauer2013-07-231-0/+3
| | | | | | | | | | | | | | So that drivers can use clk_* functions without having to ifdef them away. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/of'Sascha Hauer2013-08-0515-30/+640
|\ \ | | | | | | | | | | | | | | | Conflicts: arch/arm/boards/freescale-mx53-loco/board.c drivers/of/Makefile
| * | Add configurability via devicetreeSascha Hauer2013-07-184-0/+264
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the possibility to configure the place for the environment from the devicetree and to partition devices from the devicetree. Configuration has the general form of devices with a regular compatible property. This allows to later add additional drivers or drivers with different behaviour (for example to add support for redundant environment). The configuration is all in the /chosen/barebox/ hierarchy of the devicetree. This separates the configuration from the hardware description. Also it makes it possible to store the configuration in a completely separate devicetree (or devicetree overlay). For the same reason all configuration is done using nodepathes rather than phandles. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mci: Add devicetree partition parsingSascha Hauer2013-07-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | MMC/SD cards normally have a DOS/GPT partition table, but sometimes barebox uses the unpartitioned area to store its environment. Add devicetree partition parsing also for SD/MMC cards so that we have a way to describe the partition in the devicetree. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: Add devicetree partition parsingSascha Hauer2013-07-181-0/+1
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | of: Add convenience functions to en/disable devicenodesSascha Hauer2013-07-181-0/+65
| | | | | | | | | | | | | | | | | | | | | These functions allow to manipulate the "status" property of devicenodes effectively enabling/disabling devices. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | of: partition: check for valid nodeSascha Hauer2013-07-181-0/+6
| | | | | | | | | | | | | | | | | | | | | So that users can call the of partition parsers without checking if they are probed from the devicetree. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | bus: Add imx-weim supportSascha Hauer2013-07-165-0/+181
| | | | | | | | | | | | | | | | | | | | | | | | Mostly taken from the kernel with support for other SoCs from Alexander Shiyan. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Cc: Alexander Shiyan <shc_work@mail.ru>
| * | mci: set partnames of eMMC boot partitionsSascha Hauer2013-07-151-5/+7
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | of: partitions: factor out function to parse a single partitionSascha Hauer2013-07-151-25/+33
| | | | | | | | | | | | | | | | | | To make it usable for other code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | led: gpio: Add trigger supportSascha Hauer2013-07-101-0/+33
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | LED: add support for device tree parsing of gpio-ledsSebastian Hesselbarth2013-07-092-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | This adds a driver option to probe GPIO LEDs from device tree compatible with "gpio-leds" device tree nodes. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/mtd'Sascha Hauer2013-08-0552-7028/+10821
|\ \ \
| * | | mtd: Turn 'bad block at' message into pr_debugSascha Hauer2013-08-051-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | As bad blocks get more and more on modern nand flashes this message starts getting annoying. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mtd: ubi: implement ubi_volume_notifySascha Hauer2013-07-273-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | This is necessary to update the fastmap after ubi manipulations. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | UBI: reimport UBI from Linux v3.10Sascha Hauer2013-07-2521-2/+13540
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a fresh UBI import from Linux v3.10 This is done mainly to get fastmap support. This was tested with the i.MX nand driver, the MXS nand driver and on CFI NOR flash. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | UBI: remove old ubi supportSascha Hauer2013-07-2420-11114/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | To update to the latest UBI support from the Kernel first remove the old UBI support. Without it the update will be even less reviewable. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mtd: nand: mxs-nand: Add on flash bbt supportSascha Hauer2013-07-231-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | For DT only at the moment. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mtd: nand: mxs-nand: Add i.MX6 supportSascha Hauer2013-07-233-24/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The i.MX6 uses the same GPMI NAND controller as i.MX23/28 do. This adds i.MX6 support to the driver. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mtd: nand: gpmi: cleanup includesSascha Hauer2013-07-231-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | remove unused includes and use <io.h> instead of <asm/io.h> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mtd: nand: gpmi: replace MXS_BCH_BASE with driver resourcesSascha Hauer2013-07-231-6/+8
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mtd: nand: gpmi: use io_base instead of MXS_GPMI_BASESascha Hauer2013-07-231-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | we have io_base, so use it instead of hardcoded base address. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | dma: apbh: cleanup includesSascha Hauer2013-07-231-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | Several includes are unused, remove them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | dma: apbh: add devicetree probe supportSascha Hauer2013-07-231-0/+13
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | dma: apbh: Turn into a driverSascha Hauer2013-07-232-36/+80
| | | | | | | | | | | | | | | | | | | | | | | | This converts the apbh driver into a real driver. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | dma: apbh-dma: move header file to common locationSascha Hauer2013-07-232-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | As the apbh dma engine is also found on i.MX6 move the header file out of MXS specific directories. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | dma: apbh: introduce private structSascha Hauer2013-07-231-28/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the apbh driver uses a hardcoded base (MXS_APBH_BASE). As a first step to clean this up add a private data struct which is initialized during startup. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: MXS: introduce stmp device supportSascha Hauer2013-07-237-39/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MXS specific devices have some common infrastructure in the kernel known as STMP devices. We have the same in barebox, but with a mxs_ prefix instead of a stmp_ prefix. As some STMP devices are also found on i.MX6 move the common infrastructure out of MXS specific files and use the stmp_ prefix. This is done in preparation for i.MX6 NAND support. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mtd: nand: update to v3.11-rc1Sascha Hauer2013-07-2315-2321/+3295
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This updates the NAND stuff to Linux-3.11-rc1. It is synchronized as best as we can get: - locks removed - The splitting in different files we had to better support different features has been dropped. Instead this is now done mostly with the use of __maybe_unused Some barebox adjustments are forward ported, like: - Allow partial page writes - Optionally allow to erase bad blocks - check for all_ff before writing a page Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mtd: introduce mtd_read_oob and mtd_write_oobSascha Hauer2013-07-223-4/+25
| | | | | | | | | | | | | | | | | | | | | | | | Directly copied from the Kernel as of 3.11-rc1 Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mtd: introduce ecc strengthSascha Hauer2013-07-227-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces the ecc stength fields in the structures and fills them in, but leaves them unused right now. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mtd: rename mtd_read_oobSascha Hauer2013-07-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is the same function name in the Kernel but with different semantics. Rename to avoid naming conflicts when we update the mtd support from the kernel. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mtd: rename MTD_OOB_* to MTD_OPS_*Sascha Hauer2013-07-227-40/+40
| | | | | | | | | | | | | | | | | | | | | | | | To sync with the Linux kernel. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mtd: nand: write BBM to OOB even with flash-based BBTSascha Hauer2013-07-221-19/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is based on Linux: commit e2414f4c20bd4dc62186fbfd7bdec50bce6d2ead Author: Brian Norris <computersforpeace@gmail.com> Date: Mon Feb 6 13:44:00 2012 -0800 Currently, the flash-based BBT implementation writes bad block data only to its flash-based table and not to the OOB marker area. Then, as new bad blocks are marked over time, the OOB markers become incomplete and the flash-based table becomes the only source of current bad block information. This becomes an obvious problem when, for example: * code accessing the flash cannot read the flash-based BBT format * BBT is corrupted and the flash must be rescanned for bad blocks; we want to remember bad blocks that were marked from Linux So to keep the bad block markers in sync with the flash-based BBT, this patch changes the default so that we write bad block markers to the proper OOB area on each block in addition to flash-based BBT. Comments are updated, expanded, and/or relocated as necessary. The new flash-based BBT procedure for marking bad blocks: (1) erase the affected block, to allow OOB marker to be written cleanly (2) update in-memory BBT (3) write bad block marker to OOB area of affected block (4) update flash-based BBT Note that we retain the first error encountered in (3) or (4), finish the procedures, and dump the error in the end. This should handle power cuts gracefully enough. (1) and (2) are mostly harmless (note that (1) will not erase an already-recognized bad block). The OOB and BBT may be "out of sync" if we experience power loss bewteen (3) and (4), but we can reasonably expect that on next boot, subsequent I/O operations will discover that the block should be marked bad again, thus re-syncing the OOB and BBT. Note that this is a change from the previous default flash-based BBT behavior. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mtd: nand_imx: Add devicetree probe supportSascha Hauer2013-07-191-8/+68
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | of: add mtd of helpersSascha Hauer2013-07-162-0/+83
| | |/ | |/| | | | | | | | | | | | | Directly taken from the kernel Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/mfd'Sascha Hauer2013-08-054-408/+136
|\ \ \