summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/wd'Sascha Hauer2018-01-053-0/+145
|\
| * watchdog: add ar9344-wdt driverOleksij Rempel2018-01-053-0/+145
| | | | | | | | | | | | | | | | | | This driver was developed and tested on QCA AR9344 WiSoC but it may work on most known Atheros/QCA WiSoCs. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/net'Sascha Hauer2018-01-051-0/+8
|\ \
| * | driver: Add device_detect_all() functionSascha Hauer2017-12-011-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | Add a device_detect_all function to detect all devices and use it in the detect command. This makes the functionality reusable in other code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/misc'Sascha Hauer2018-01-052-15/+9
|\ \ \
| * | | mtd: spi-nor: mx25l3205d/mx25l6405d: append SECT_4KUlrich Ölmann2017-11-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a port of Linux kernel commit | commit 0501f2e5ff28a02295e42fc9e7164a20ef4c30d5 | Author: Andreas Fenkart <afenkart@gmail.com> | Date: Thu Nov 5 10:04:23 2015 +0100 | | mtd: spi-nor: mx25l3205d/mx25l6405d: append SECT_4K | | according datasheet both chips can erase 4kByte sectors individually | | Signed-off-by: Andreas Fenkart <andreas.fenkart@dev.digitalstrom.org> | Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | clk: sp810: hardwire parent to 1MHz clockLucas Stach2017-11-171-13/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This works around a limitation in our handling of the vexpress config bus. For now just hardcode the clock parent to the 1MHz clock, which is the default as emulated by QEMU and also the setting the Linux kernel will configure later. This fixes the vexpress clocksource running at a wrong rate leading to bogus delays and sleep times. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/mii'Sascha Hauer2018-01-055-0/+341
|\ \ \ \
| * | | | net: mdio-mux: Avoid probing multiplexed bussesAndrey Smirnov2017-12-062-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling mdiobus_detect() for a bus that serves as a parent for a MDIO bus multiplexer would result in parent bus being populated with devices that are present on downstream bus that multiplexer happens to be "pointing" at that moment. To avoid that introduce 'is_multiplexed' flag to struct mii_bus and change mdiobus_detect to ignore busses for which that flag is set. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | net: phy: Port GPIO controlled MDIO multiplexer driverAndrey Smirnov2017-12-063-0/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Port Linux version driver to Barebox, to support such device found in various revisions of ZII's VF610 development board. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | net: phy: Port MDIO bus miltiplexer framework from Linux kernelAndrey Smirnov2017-12-063-0/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Port mdio-mux.c from Linux kernel to Barebox, to support adding dirvers that rely on that infrastructure/API. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | mdio_bus: Port of_mdio_find_bus() from Linux kernelAndrey Smirnov2017-12-061-0/+27
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | Port of_mdio_find_bus() from Linux kernel. This function is used in MDIO multiplexor infrastructure added in following commit. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/imx'Sascha Hauer2018-01-051-2/+5
|\ \ \ \
| * | | | spi: imx: make xchg_single timeout value compatible for older boardsAlexander Kurz2017-12-151-2/+5
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A call of xchg_single will issue the transfer of 24 data bits with a given maximum frequency. Since there exist some i.MX based boards with spi-max-frequency = <100000>, change the xchg_single timeout to still support those boards. Fixes: 1439cdf7c6fc ("spi: imx: add timeout to xchg_single") Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/i2c'Sascha Hauer2018-01-051-5/+15
|\ \ \ \
| * | | | i2c: mv64xxx: add timeout waiting for bus readyBastian Stender2017-11-171-5/+15
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | This prevents barebox hanging e.g. in case the i2c clock is accidentally connected to GND. Signed-off-by: Bastian Stender <bst@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | net/e1000: indicate at boot time if flash is in secure modeUwe Kleine-König2017-12-062-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the flash is in secure mode it is not possible to modify its contents. So log that useful information at probe time. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | net/e1000: add missing \n in error messageUwe Kleine-König2017-12-011-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | net/e1000: implement protect and unprotect for attached flashUwe Kleine-König2017-11-282-0/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some supported flash devices (e.g. SST25VF040) are write protected after power up. If the device holds a valid firmware image the i210 can handle that just fine. If however there is no firmware programmed, a procedure is needed to remove this protection before an image can be flashed. So implement the needed callbacks to make the commands protect and unprotect do the right thing. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | net/e1000: expand timeout for flash erasureUwe Kleine-König2017-11-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Erasing the whole flash takes approximately 7s on one of my test machines. Expand the timeout accordingly. Note however that it is in general not allowed to hold the flash semaphore for so long and "firmware might implement a timeout mechanism and take ownership of the relevant [lock]" after one second. So a chip erase should better only be done when firmware doesn't make use of the flash. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | net/e1000: indicate in error messages where the failure occuredUwe Kleine-König2017-11-241-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There used to be four places that all emit the same error message. Even if in a given context not all four of them can be relevant, there are always two possible locations where the message can origin from. So make the output slightly different in all places to ease future debugging. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | net/e1000: don't access the (simulated) eeprom when it is invalidUwe Kleine-König2017-11-243-6/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The shadow RAM that is used to serve read requests from the eeprom interface isn't valid in all cases. Catch these by returning an error in the eeprom read function and make eeprom validation dependant on working access. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | net/e1000: log flash/invm status at probe timeUwe Kleine-König2017-11-241-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide some info about flash/eeprom state at boot up Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | net/e1000: don't fail to bind on uninitialized flashUwe Kleine-König2017-11-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the flash doesn't hold a valid firmware image there are still some things (like accessing the flash) possible. Don't return an error code in this case but return 0 instead. This way the driver is regularily bound and just doesn't provide a network interface. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | net/e1000: provide device for accessing emulated eepromUwe Kleine-König2017-11-242-1/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This device uses e1000_read_eeprom to provide access to the emulated eeprom on e1000-igb. Only reading is implemented for now. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | net/e1000: fix size of invm deviceUwe Kleine-König2017-11-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The iNVM storage is 2 Kib containing 64 32bit words (0-63). Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | net/e1000: provide access to iNVM even if a flash is presentUwe Kleine-König2017-11-242-67/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An i210 (aka e1000_igb) supports two different non-volatile storages for configuration. There is a built-in one-time programmable storage called iNVM and an optional external SPI-Flash. If a flash is populated and contains a valid configuration image the iNVM is not used (if I understood the documentation correctly). Still the iNVM can be useful if the flash is not configured. Also the iNVM contains manufacturing identification information. So it makes sense to provide the invm device even if a flash is present. This patch also cleans up some confusion that suggests that invm is a way to access the (simulated) eeprom structures and drops some unused enum values. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | net/e1000: reorder functionsUwe Kleine-König2017-11-241-70/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bring functions in a more natural order which allows to drop a few forward declarations. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | net/e1000: don't use the eeprom word size as timeout to get a semaphoreUwe Kleine-König2017-11-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nothing in the documentation suggests that the time to get a semaphore depends on the size of the (optional) eeprom and I doubt there is a relation. Given that 2048 is the maximal value for word_size unless a flash is used to emulate the eeprom, pick 2049 as alternative arbitrary value that probably doesn't result in regressions. This drops the only user of ->word_size outside of eeprom.c which allows easier restructurings there in the future. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | net/e1000: fix coding style at a few locationsUwe Kleine-König2017-11-242-5/+14
| |/ / |/| | | | | | | | | | | | | | | | | | | | While working on the e1000 driver I noticed a few coding style misdeeds. These are fixed here. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | usbgadget: fastboot: select FILE_LISTLucas Stach2017-11-211-0/+1
|/ / | | | | | | | | | | | | | | | | The file list functions are used by the fastboot gadget since a3976c3a84f2 (usbgadget: fastboot: Use function to find file_list entry by name). Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | i.MX: esdhc: wait until SDSTB is asserted, not other way arroundOleksij Rempel2017-11-171-1/+1
| | | | | | | | | | | | | | this added 10msec on each sd/mmc clock switch request. 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-11-131-0/+4
|\ \
| * | usb: imx: implement support for "over-current-active-high" propertyUwe Kleine-König2017-10-271-0/+4
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | This property is already documented in the bindings and supported by Linux. As on i.MX25 the HW default is active high and up to now barebox didn't force this to low (which is the default for e.g. i.MX6), add the property to barebox' imx25.dtsi to keep existing behaviour. If on a board the OC pin is active low, you need to add /delete-property/ over-current-active-high; in the board.dts. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | efi-block: detect when the block device is a USB DiskJean-Christophe PLAGNIOL-VILLARD2017-10-271-1/+16
| | | | | | | | | | | | | | | | | | | | use usbdisk as a basename This will be usefull as example when we want to search for a usb disk for failsafe update or install. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | EFI: add poweroff supportJean-Christophe PLAGNIOL-VILLARD2017-10-271-0/+1
|/ | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* 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>