summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/usbgadget'Sascha Hauer2017-10-193-11/+54
|\
| * usbgadget autostart: add usbgadget.fastboot_bbu to automatically export bbu ↵Sascha Hauer2017-09-271-0/+7
| | | | | | | | | | | | handlers Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usbgadget: fastboot: Allow to automatically export the bbu handlersSascha Hauer2017-09-272-0/+19
| | | | | | | | | | | | | | | | | | | | We have a list of registered handlers which take a barebox update. Do the next step and allow to automatically export them via fastboot so that barebox can be updated via fastboot without manually exporting the partition. Since this may not be desirable in all cases this behaviour is configurable. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usbgadget: fastboot: Use function to find file_list entry by nameSascha Hauer2017-09-271-7/+4
| | | | | | | | | | | | | | We have file_list_entry_by_name() now, so use it rather than open coding it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usbgadget: unregister when usb_composite_probe() failsSascha Hauer2017-09-271-1/+9
| | | | | | | | | | | | | | When usb_multi_register() returns an error it can't be called again as we do not unregister the driver properly. Fix this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usbgadget: only set to peripheral mode when error checking is doneSascha Hauer2017-09-271-2/+2
| | | | | | | | | | | | | | Only begin to modify the hardware when the obious errors have been checked. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usbgadget: do not register when no functions presentSascha Hauer2017-09-271-0/+4
| | | | | | | | | | | | | | registering a multifunction device makes only sense when there's at least one function configured. Just return otherwise. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usbgadget: autostart: Handle errors in file list gracefullySascha Hauer2017-09-271-1/+9
| | | | | | | | | | | | | | | | file_list_parse() can fail and returns an error pointer. Print an error message when it fails and also set to NULL again so that usb_multi_register() does not stumble upon the error pointer. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2017-10-1924-47/+133
|\ \
| * | regmap: port regmap_update_bits from linuxSteffen Trumtrar2017-10-161-0/+29
| | | | | | | | | | | | | | | | | | | | | Port the regmap_update_bits function from linux v4.14-rc1 to barebox. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | Marvell: implement marvell_of_reg_initClément Leger2017-10-161-4/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From ed1cbcd05d5efeb4012d77a9a4ab9c1da0449bdc Mon Sep 17 00:00:00 2001 From: Clement Leger <clement.leger@kalray.eu> Date: Tue, 10 Oct 2017 14:29:49 +0200 Subject: [PATCH] Marvell: implement marvell_of_reg_init Implement marvell_of_reg_init in order to use marvell,reg-init property from device-tree. The code is taken from Linux kernel and slighlty modify to fit barebox structures. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: m25p80: make it possible to use 4K erase blockAntony Pavlov2017-10-161-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We already have the MTD_SPI_NOR_USE_4K_SECTORS option handling in C code for 4K erase block support. Alas this 4K erase block support code can't be used because the MTD_SPI_NOR_USE_4K_SECTORS option support is missed in Kconfig. This patch imports necessary Kconfig MTD_SPI_NOR_USE_4K_SECTORS option declaration from linux v4.11-rc8. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | UBI: attach: add missing newline at end of pr_err()Marc Kleine-Budde2017-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds the missing newline at the end of the pr_err() statement. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mmc: allow skipping SD card initializationPhilipp Zabel2017-09-261-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows to skip SD card initialization for eMMCs by setting the "no-sd" property in the host controller device tree node. Avoiding two SD command timeouts speeds up detection time by well over 200 ms. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | remove checks for xzalloc() returning NULLUwe Kleine-König2017-09-2617-37/+0
| | | | | | | | | | | | | | | | | | | | | xzalloc() either returns memory or panics, so checking for NULL is useless. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | pinctrl: mxs: fix error message to mention right property nameUwe Kleine-König2017-09-261-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | gpiolib: check validity for gpio_info in *_active()Uwe Kleine-König2017-09-261-0/+12
| |/ | | | | | | | | | | | | | | | | | | | | | | gpio_set_active, gpio_is_active and gpio_direction_active are public functions, accordingly there should be error checking. If an invalid gpio number is given to these functions without checking gpio_adjust_value is called with gi == NULL which then dereferences this pointer. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/mips'Sascha Hauer2017-10-198-1/+1128
|\ \
| * | clk: add ar9344 clock driverOleksij Rempel2017-10-062-1/+150
| | | | | | | | | | | | | | | Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: ag71xx: define parent devicesOleksij Rempel2017-10-061-0/+2
| | | | | | | | | | | | | | | | | | | | | without it we are not able to set mac address from other driver. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: ag71xx: disable eth interface on barebox shutdownOleksij Rempel2017-09-201-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | If not disable, DMA RX engine will keep to write in to allocated memory area. As soon as some code or data of target OS will be placed to this area it will be overwritten by incoming network package. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: phy: add ar8327 driverOleksij Rempel2017-09-203-0/+286
| | | | | | | | | | | | | | | | | | | | | | | | The Atheros ar8327 is a seven port gigabit ethernet switch. This patch adds a driver for the phys in it. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: ath79: add ag71xx Ethernet driverYegor Yefremov2017-09-183-0/+681
| |/ | | | | | | | | | | | | Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/e1000'Sascha Hauer2017-10-193-28/+17
|\ \
| * | e1000: Don't poll for FLSWCTL.GLDONE before starting a flash transactionUwe Kleine-König2017-10-161-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | While FLSWCTL.GLDONE is set when the last transaction was fully completed, there is no good reason to depend on this. According to the i210 datasheet having FLSWCTL.DONE is enough. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | e1000: implement support for smaller flash chipsUwe Kleine-König2017-10-162-14/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even though the register description of the FLA register suggests (on page 386 of the i210 datasheet (rev. 3.1)) that 2 MB, 4 MB and 8 MB are the only supported flash sizes, the list of supported flashes (on page 794 of the same document) lists for example a Micron M25PE80 which only has a size of 1 MB. Also in general it seems sensible to stick to the formula given for the meaning of the values that are not explicitly listed. Acked-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | e1000: implement register mapping for E1000_FLSW{CTL, DATA, CNT}Uwe Kleine-König2017-10-162-3/+12
| | | | | | | | | | | | | | | | | | | | | Fixes: 4ff3269a70b5 ("e1000: Expose i210's external flash as MTD") Acked-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/arm'Sascha Hauer2017-10-197-6/+235
|\ \ \ | |/ / |/| |
| * | of: base: add function to copy a device tree nodeMichael Olbrich2017-10-171-0/+16
| | | | | | | | | | | | | | | | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mci: mmci: add DT supportLucas Stach2017-10-171-3/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just adds the minimal implementation to fill platform_data from the DT properties with Linux binding. As all MMC controllers are supposed to support at least the 3.3V signalling level, this gets exposed regardless of the platform data, just as other controller drivers in Barebox handle this. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | clocksource: sp804: silently ignore secondary instacesLucas Stach2017-10-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | When probing from an upstream DT, we don't always have influence on how many timer instances are enabled. Just use the first one and silently skip the other instances. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | clk: versatile: add basic clocksLucas Stach2017-10-174-0/+180
| | | | | | | | | | | | | | | | | | | | | | | | This adds the necessary basic clocks used on the ARM versatile platforms. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | of: populate clock providers before other devicesLucas Stach2017-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Clocks are a basic resource, which may be needed early by other devices or even the bus driver (as is the case with the ARM AMBA bus). Register them before populating other devices. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | eeprom: at24: fix 'assignment from incompatible pointer type' warningAntony Pavlov2017-10-161-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | The patch fixes this compiler's warning: CC drivers/eeprom/at24.o drivers/eeprom/at24.c: In function ‘at24_probe’: drivers/eeprom/at24.c:453:21: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types] at24->fops.protect = at24_cdev_protect, ^ Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / efi: add missing Kconfig selectsEnrico Jorns2017-10-161-0/+2
|/ | | | | | | | | | | | | | | | Building EFI code without block device and partition support enabled will fail with: | drivers/built-in.o: In function `efi_bio_probe': | (.text+0x125d): undefined reference to `blockdevice_register' | drivers/built-in.o: In function `efi_bio_probe': | (.text+0x126c): undefined reference to `parse_partition_table' | Makefile:766: recipe for target 'barebox' failed Thus always select BLOCK and PARTITION_DISK when enabling EFI_BOOTUP. Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/net'Sascha Hauer2017-09-081-1/+6
|\
| * Phy: Check NULL bus case and undetected phy via ofClément Leger2017-09-061-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From 5e87dc2c24051c2cd2985e513c5a825d51d9bb00 Mon Sep 17 00:00:00 2001 From: Clement Leger <clement.leger@kalray.eu> Date: Tue, 5 Sep 2017 10:37:23 +0200 Subject: [PATCH] Phy: Check NULL bus case and undetected phy via of phy_device_connect can be called with NULL miibus for automatic match with the phy described in the device tree. In the case where the phy was not detected for some unknown reason, the next calls will be done with a NULL bus. This will lead to undefined behavior and more probably crashes. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * phy: don't crash if we have no parentOleksij Rempel2017-09-061-1/+1
| | | | | | | | | | | | | | | | current code will crash if DT has no PHY entry. With this patch we will test if parent exist, before testing the parent device node. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/mtd'Sascha Hauer2017-09-082-13/+21
|\ \
| * | mtd: nand: nand_mxs: Don't call get/set features on chips which do not ↵Sascha Hauer2017-09-061-9/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | support it Older versions of the ONFI spec do not support get/set features, so do not call these commands when they are not available. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: nand: Only call ONFI get/set features on supported chipsSascha Hauer2017-09-061-2/+6
| | | | | | | | | | | | | | | | | | | | | Older versions of the ONFI spec do not support get/set features, so do not call these commands when they are not available. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: nand-mxs: improve error messagesUwe Kleine-König2017-09-061-2/+2
| |/ | | | | | | | | | | | | | | This commit adds the return value of the failing function to one message and makes the other unique. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2017-09-084-8/+64
|\ \
| * | gpio: gpio-generic: add dt supportAntony Pavlov2017-09-081-0/+9
| | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | gpio: gpio-generic: fix bgpio_map()Antony Pavlov2017-09-081-2/+2
| | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | serial: ns16550: provide big-endian supportOleksij Rempel2017-09-081-2/+17
| | | | | | | | | | | | | | | | | | | | | we need it at least for QCA AR9344 Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | of: base: port of_device_is_big_endian from linuxOleksij Rempel2017-09-081-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |commit 37786c7fee40771d13901de129af7e084ed48b55 |Author: Kevin Cernekee <cernekee@gmail.com> |Date: Thu Apr 9 13:05:14 2015 -0700 | | of: Add helper function to check MMIO register endianness | | SoC peripherals can come in several different flavors: | | - little-endian: registers always need to be accessed in LE mode (so the | kernel should perform a swap if the CPU is running BE) | | - big-endian: registers always need to be accessed in BE mode (so the | kernel should perform a swap if the CPU is running LE) | | - native-endian: the bus will automatically swap accesses, so the kernel | should never swap | | Introduce a function that checks an OF device node to see whether it | contains a "big-endian" or "native-endian" property. For the former case, | always return true. For the latter case, return true iff the kernel was | built for BE (implying that the BE MMIO accessors do not perform a swap). | Otherwise return false, assuming LE registers. | | LE registers are assumed by default because most existing drivers (libahci, | serial8250, usb) always use readl/writel in the absence of instructions | to the contrary, so that will be our fallback. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: gadget: autostart: properly release f_multi_optsOleksij Rempel2017-09-061-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the same as for usb gadget autostarter. |commit 2b9bcff79a02f770fa730e2689ba35cc03c0da7d |Author: Sascha Hauer <s.hauer@pengutronix.de> |Date: Fri Jan 20 10:03:45 2017 +0100 | | usb: gadget: properly release f_multi_opts | | The usbgadget commands uses statically allocated f_multi_opts and passes | this to usb_multi_register(). These f_multi_opts are of course no | longer valid when we leave the usbgadget command. Luckily we do not use | the data after we left the usbgadget command, so this never has been a | problem. However, f_multi_opts has some allocated members which we can | not free anymore on gadget unregistration because we no longer have the | pointer to them. | | Fix this by adding a release function to struct f_multi_opts. This way | we can allocate all memory dynamically and properly free it when not | used anymore. | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/imx'Sascha Hauer2017-09-082-35/+82
|\| |
| * | clk: imx: cpu: don't store the address of a function parameterUwe Kleine-König2017-08-151-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function imx_clk_cpu takes a const char *parent_name as second paramter. The implementation introduced in commit 9a89ed9d281e then uses the address of this function parameter to assign clk.parent_names. This is an address on the stack that is saved in the clk tree and of course this is easily overwritten by later execution paths of barebox. Without this fix the clk_dump command reproducibly crashes on i.MX7 (which is the only SoC that makes use of imx_clk_cpu()). Fixes: 9a89ed9d281e ("clk: imx: Add clk-cpu support") Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>