summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* mtd: nand-bb: Also print raw position in debug messagesSascha Hauer2015-02-101-2/+4
| | | | | | | When debugging the nand-bb devices also the raw position on the device is interesting, print it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: nand-bb: Fix test for bad block when readingSascha Hauer2015-02-101-1/+1
| | | | | | | | in nand_bb_read() 'offset' contains the virtual position on the device, but we have to test for a bad block on the raw physical position, so use bb->offset instead of offset Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: nand-bb: fix erasing bb devices with bad blocksSascha Hauer2015-02-101-3/+21
| | | | | | | mtd_erase does not skip bad blocks, we must skip them in nand_bb_erase instead. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: nand-bb: Fix accesses beyond deviceSascha Hauer2015-02-101-0/+16
| | | | | | | | | When a block is marked bad after the bb device has been created the real size of the bb device is smaller than the calculated size on creation. In this case we can't rely on the upper layers anymore that they won't pass read/write sizes in that fit into the device. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: Fix allowing to erase bad blocks on partitionsSascha Hauer2015-02-101-3/+3
| | | | | | | | | Partitions are mtd devices themselves, but the 'erasebad' parameter is only set to the master mtd device. To allow to erase bad blocks on partitions test the master device instead of the partition devices. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: nand: omap: Fix OMAP_ECC_BCH8_CODE_HW ecc modeSascha Hauer2015-02-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is broken since: | commit 00f119a29387cfb1b188fcc4daa4aa94186ac7a9 | Author: Sascha Hauer <s.hauer@pengutronix.de> | Date: Fri Aug 1 14:09:48 2014 +0200 | | mtd: omap gpmc: fix ecc bytes/size | | The ecc bytes / size are per subpage, not per page. | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> The ecc code in omap_correct_data() expects to correct a whole page at once, so we must tell the nand layer that we have 4 * 13 bytes of ecc bytes and 4 * 512 bytes of ecc size. Otherwise the NAND layer will iterate over 512 byte steps over a page and call the .correct callback each time. This only works for 2k pagesize and needs revisit once other page sizes shall be supported. It would be better to tell the nand layer the real ecc bytes (13) and ecc size (512) instead and drop the iteration in omap_correct_bch(). However, this needs better testing so it isn't done here now. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/raspberry-pi'Sascha Hauer2015-02-045-17/+249
|\
| * regulator: add bcm2835 driverJean-Christophe PLAGNIOL-VILLARD2015-02-043-0/+155
| | | | | | | | | | | | | | | | | | | | | | this will allow to handle IP power automatically and not at board level Mainline kernel need this as they do not have the regulator driver support as some IP such as USB are not power on at boot Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * regulator: allow to use it with non DT deviceJean-Christophe PLAGNIOL-VILLARD2015-02-042-17/+83
| | | | | | | | | | | | | | | | | | this will use the device name as regulator name with the same Algo as clkdev for lookup Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * amba: pl011: add support for regulatorJean-Christophe PLAGNIOL-VILLARD2015-02-041-0/+11
| | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/pxa'Sascha Hauer2015-02-044-78/+1204
|\ \
| * | net: smc1111: improve debug capabilityRobert Jarzmik2015-02-041-49/+69
| | | | | | | | | | | | | | | | | | | | | | | | Improve smc1111 driver debug messages by printing the register accessed, the current bank, and the values. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: smc1111: extend the driver for 91c94 and 91c96 supportRobert Jarzmik2015-02-041-5/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All the smcs family chips 91c94, 91c96, 91c100, 91c111 share almost the same behavior and register sets. The noticeable exceptions are coped with in this patch, ie : - 91c94 and 91c96 only have an internal 10 Mbps phy The registers used for phy discovery on later chips will corrupt the 91c96 state. - 91c94 and 91c96 have a control and config register quite different from their 91c1xx conterparts A platform data user defined couple of registers is introduced. If these values are 0, 91c1xx legacy behavior is assumed. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: smc1111: add 16 bits accessors, allow address shiftRobert Jarzmik2015-02-041-42/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Smc network IPs can be wired up in different funny ways. For example the lubbock pxa25x development platform wires all address lines shifted by 2, ie. bus A2 is smc91c96 A0, bus A3 is smc91c96 A1 etc ... In order to cope with the different possible combination, add a shift parameter for addresses. By default, the old behaviour using the 32 bit accesses is kept. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: nand: add mrvl-nand driverRobert Jarzmik2015-01-193-0/+1028
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver is taken from the Linux kernel, with the following changes : - all DMA removed - all asynchronous handling removed, including the interrupt handler, and the asynchronous state handling - pxa armada support removed Most the kernel structure was kept, to ease up future fixes integration from the kernel driver. The driver is tested on a pxa3xx system development board (aka. zylonite), and reading, writing, erasing, and bad block management were tested. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/mxs'Sascha Hauer2015-02-049-25/+407
|\ \
| * | pinctrl: Add MXS pinctrl driverSascha Hauer2015-01-283-0/+179
| | | | | | | | | | | | | | | | | | This adds a device tree pinctrl driver for MXS. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | of: Create platform_device when creating AMBA device failedSascha Hauer2015-01-281-2/+2
| | | | | | | | | | | | | | | | | | | | | If creating an AMBA device failed, maybe because AMBA support is not compiled in, register the device as regular platform device. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | serial: stm_serial: Add devicetree supportSascha Hauer2015-01-281-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds device tree support for the stm serial driver. This driver really is a AMBA primecell, so the amba-pl011 could be used. However, the current code tries to get the apb_pclk before the clocks are registered, so this does not work. Use the stm driver instead until a solution is found. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mci: mxs: Add devicetree supportSascha Hauer2015-01-281-23/+27
| | | | | | | | | | | | | | | | | | | | | Add device tree compatibles and allow retrieving data from device tree instead of platform_data only. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: MXS: Make gpio a driverSascha Hauer2015-01-283-0/+190
| | | | | | | | | | | | | | | | | | This turns the MXS gpio support into a driver. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/misc'Sascha Hauer2015-02-0411-18/+22
|\ \ \
| * | | pinctrl: remove unnecessary error checkMasahiro Yamada2015-02-021-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The file drivers/pinctrl/pinctrl.c is compiled only when CONFIG_PINCTRL is defined. "IS_ENABLED(CONFIG_PINCTRL)" is always evaluated as 1 in this function. (Although the compiler would optimize it, the source file does not look nice.) Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | usb: abolish wait_ms() functionMasahiro Yamada2015-02-025-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function is only used in drivers/usb/*. It is equivalent to mdelay(). Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | trivial: s/flasg/flash/Uwe Kleine-König2015-01-271-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | MMC: IMX: Reset MMC_BOOT register after controller reset.Andrey Panov2015-01-192-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This helps with EMMC detection when booting from EMMC directly. Taken from u-boot. Signed-off-by: Andrey Panov <rockford@yandex.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | console: allow to specify the device idJean-Christophe PLAGNIOL-VILLARD2015-01-132-1/+4
| | |/ | |/| | | | | | | | | | | | | | | | so we can use dynamic number id with specific devname Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/imx'Sascha Hauer2015-02-042-7/+41
|\ \ \
| * | | ARM: i.MX6: use generic calculation in nand bbu handlerStefan Christ2015-01-291-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The parameters ECC Strength, BadBlockMarkerByte and BadBlockMarkerStartBit in the FCB structure depends on the nand chip's pagesize and oobsize. Instead of hardcoding these values into the imx6 bbu handler calculate these values on the fly. Therefore we export the necessary functions from the nand_mxs driver to use them in the bbu handler. Signed-off-by: Stefan Christ <s.christ@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | i.MX: SPI: Respect SPI_LSB_FIRST flag in mode settingsAndrey Smirnov2015-01-161-4/+37
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | Add code to support SPI transfers that have data shifted out least significant bit first. This is useful in many cases, but specifically it is needed for drivers/firmware/altera_serial.c to work on i.MX platform. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | usb: at91_udc: pass the vbus initial valueBo Shen2015-02-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | If without pass the vbus initial value, the vbus status alway present as 0 even if the vbus is connected to 5v. Signed-off-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Fix spelling: pathes -> pathsWadim Egorov2015-01-281-1/+1
| |/ |/| | | | | | | Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | usb: musb-dsps: select OFDEVICELucas Stach2015-01-191-0/+1
|/ | | | | | | | Fixes: In function `dsps_probe': undefined reference to `of_usb_get_dr_mode' Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/mxs'Sascha Hauer2015-01-097-7/+2
|\
| * drivers: remove unnecessary mach/imx-regs.h includeSascha Hauer2015-01-057-7/+2
| | | | | | | | | | | | And replace the ones needed with the SoC specific header. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2015-01-0919-115/+43
|\ \
| * | sizes.h: move include/sizes.h to include/linux/sizes.hMasahiro Yamada2015-01-0813-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This file originates in Linux. Linux has it under include/linux/ directory since commit dccd2304cc90. Let's move it to the same place as well in barebox. This commit was generated by the following commands: find -name '*.[chS]' | xargs sed -i -e 's:<sizes.h>:<linux/sizes.h>:' git mv include/sizes.h include/linux/ Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: rtl8169: remove unnecessary cache maintenanceLucas Stach2015-01-051-19/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | The buffer descriptors are allocated from coherent memory, so there is no cache maintenance needed. Only tell the compiler that the descriptors can be modified by the hardware. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | clock: incorporate dummy clocksource into core clock codeAntony Pavlov2014-12-173-73/+10
| | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | video: imx-hdmi: search for DDC node only when EDID support is enabledLucas Stach2014-12-171-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This uses i2c functions that may not be available in every configuration and is only needed if EDID support is enabled, which in turn already selects I2C. Fixes: drivers/video/imx-ipu-v3/imx-hdmi.c: undefined reference to `of_find_i2c_adapter_by_node' Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: gadget: fastboot: allow to build without BOOTMLucas Stach2014-12-171-1/+4
| |/ | | | | | | | | | | | | | | | | | | | | This will disable the capability to boot an uploaded image directly, but keeps other fastboot functionality. This seems like a valid config. Fixes: In function `do_bootm_on_complete': undefined reference to `bootm_boot' Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/arm'Sascha Hauer2015-01-092-15/+40
|\ \
| * | net: cpsw: ignore error on slave setupSascha Hauer2015-01-061-15/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The CPSW has two slaves. When one of them fails to setup continue anyway with the other one. This fixes a crash in the beaglebone black which only has one slave connected. The code doesn't find a phy on the second slave and bails out, but the error path is broken: It frees the private data structures which contains used resources. Reported-by: Philippe Leduc <ledphilippe@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: smc1111: fix memory congestionsRobert Jarzmik2015-01-061-0/+26
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As the SMC1111 has a shared pool of 2k memory buckets for both transmission and reception, and as there are variants which have as few as 4 buckets in total, the memory pool can be hogged by unclaimed receptions, and impeed any further transmission. This happens on the zylonite pxa board, where 4 packets, most probably icmp and arp, fill the 4 buckets, preventing any further ethernet transmission, and stalling the driver. The fix is rather rough : whenever all the buckets are filled by reception packets, and if a transmission is required, the transmission code path will empty up all received packets. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | resource: dev_request_mem_region: fix return value for MIPSAntony Pavlov2015-01-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The commit commit 0d7a21334536cb36b3c9b64d868acc55aec41332 Author: Antony Pavlov <antonynpavlov at gmail.com> Date: Wed Sep 10 11:42:19 2014 +0400 MIPS: dts: use physical addresses (as Linux does) With IOMEM() adapted for MIPS we can use physical addresses in device tree reg property. has switched MIPS dts files to physical addresses usage. The patch was tested on qemu, but qemu malta board is tolerant of using physical addresses for accesing to device (Ingenic JZ4755 and JZ4780 processors are tolerant too!). But other CPUs (e.g. Loongson LS1B) can throw an exception in this situation. Additional physical address to virtual address translation on MIPS is needed. We already have this in include/common.h #if defined(CONFIG_MIPS) #include <asm/addrspace.h> #define IOMEM(addr) ((void __force __iomem *)CKSEG1ADDR(addr)) #else #define IOMEM(addr) ((void __force __iomem *)(addr)) #endif So use IOMEM() to fix dev_request_mem_region() return value. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | driver: workaroud resource request that conflicts with errno PTRJean-Christophe PLAGNIOL-VILLARD2015-01-083-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | broken since commit ed6e965824303255cacc1c1a195d3684caa26bce Author: Sascha Hauer <s.hauer@pengutronix.de> resource: Let dev_request_mem_region return an error pointer Introduce dev_request_mem_region_err_null only used on platform like at91 where the resource address conflicts with errno PTR. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | i2c: omap: fix fclk_rate for ti,omap4-i2cJan Weitzel2015-01-061-6/+5
| | | | | | | | | | | | | | | | The compatible "ti,omap4-i2c" don't help to get fclk_rate. So set it acording to cpu compatible: "ti,am33xx" and "ti,omap4" Signed-off-by: Jan Weitzel <j.weitzel@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | net: smc1111: move print_packet functionRobert Jarzmik2015-01-051-38/+37
|/ | | | | | | | Fix for a compiler complaint, because print_packet is needed by a function before it is declared. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fdt: don't strip const qualifierLucas Stach2014-12-111-1/+1
| | | | | | | | Fixes: warning: assignment discards 'const' qualifier from pointer target type Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: Fix typo collumn -> columnSascha Hauer2014-12-111-3/+3
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>