summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
...
| * i2c: designware: evaluate i2c-sda-hold-time propertySteffen Trumtrar2018-01-111-0/+40
| | | | | | | | | | | | | | | | | | | | Newer designware i2c controllers allow setting the SDA hold time. Evaluate the devicetree property "i2c-sda-hold-time" and set the value accordingly. The code is an adaption of the Linux v4.12 driver. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/net-designware'Sascha Hauer2018-01-226-56/+307
|\ \
| * | net: designware: add warning for drvdataSteffen Trumtrar2018-01-111-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of silently using a wrong value, check if drvdata is defined before use. Print a warning if there is no drvdata found. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: add SoCFPGA-specific designware driverSteffen Trumtrar2018-01-113-0/+192
| | | | | | | | | | | | | | | | | | | | | Add a driver for the SoCFPGA-specific version of the designware ethernet ip core. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: designware: move probe to generic driverSteffen Trumtrar2018-01-115-55/+110
| |/ | | | | | | | | | | | | | | | | The designware ethernet core is used on multiple different SoCs. The linux kernel has a generic driver and SoC-specific drivers. Do the same here. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2018-01-223-11/+38
|\ \
| * | mci: drop unused parameter from mci_switch()Uwe Kleine-König2018-01-221-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SWITCH command has two purposes: a) switch the command set b) Write to the EXT_CSD register If the access field (bits [25:24]) in the argument are b00, we're in case a), otherwise in b). As mci_switch() always passes MMC_SWITCH_MODE_WRITE_BYTE (0b3) in the access field, only case b) is relevant here. According to the eMMC specification[1] the command set field is ignored in case b) and so the respective parameter (that is unused already now) can be dropped. [1] Embedded Multi-Media Card (e•MMC) Electrical Standard (5.1), February 2015; paragraph 6.6.1 Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | of: base: use root_node compatible as suggestion for a hostnameOleksij Rempel2018-01-171-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | on some SoCs we can use generic PLL and RAM initialization. In this cases we create board file only to provide a host name. With this patch host name will be created from device tree compatible. For example: compatible = "board_vendor,board", "chip_vendor,soc" the host name will be: "board" This function will not overwrite a host name which is already set by board or machine code. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | Kconfig: drop unused HAS_POWEROFFAntony Pavlov2018-01-111-1/+0
| |/ | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/imx'Sascha Hauer2018-01-223-2/+8
|\ \
| * | Revert "mci: imx-esdhc: Enable clock"Andrey Smirnov2018-01-111-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 61c6c24958934b6b226aa37b3b3a2c089189f52b which is pretty much a duplicate of: a97345102 "i.MX: esdhc: Enable host->clk during initialization" Since we don't need to enable that clock twice reverse the former and keep the latter. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | i.MX: Select DRIVER_SPI_IMX_2_3 for i.MX7Andrey Smirnov2018-01-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Select DRIVER_SPI_IMX_2_3 for i.MX7 since that is the variant that's being used. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | i.MX: ecspi: Enable imx->clk as a part of initializationAndrey Smirnov2018-01-111-0/+7
| |/ | | | | | | | | | | | | | | Some SoCs (e. g. i.MX7) do not enable this clock by default, so add code to take care of that in the driver. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/fastboot-sparse'Sascha Hauer2018-01-222-23/+231
|\ \
| * | usb: gadget: fastboot: Add sparse image supportSascha Hauer2018-01-182-23/+231
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sparse images are needed for fastboot to flash images that do not fit into memory. Android fastboot is kind of a dumb protocol. It first sends you a big image and afterwards it tells you where to put this image. This of course limits fastboot to files smaller than the available memory. To bypass this issue fastboot has so called Sparse image support. This is a new image format that can contain holes in the data so a big image can be written in multiple steps with holes in other areas each step. Implementing this for UBI images is kind of tricky since ubiformat normally expects to get a single image. Preparations to ubiformat a device in multiple parts have been done in previous patches. It is however, only for the first part possible to detect if it is a UBI image. The other parts are just binary data and we cannot know if we have to pass this data raw to the flash or use ubiformat. For this reason this patch makes the 'u' flag in the partition description mandatory for proper UBI image flashing on MTD devices. fastboot passes a max_download_size variable to the host. This variable contains the image size fastboot can take in one go. We have to choose a good compromise here. On one hand we do not want to risk that we actually do not have enough memory to hold the transferred image, on the other hand we want images like bootloaders not as sparse images, but in one go instead to make atomic exchange of the bootloader possible. Right now we have chosen 8MiB which should be big enough for all bootloaders. The value is configurable via global.usbgadget.fastboot_max_download_size. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/at91'Sascha Hauer2018-01-223-25/+63
|\ \
| * | atmel_lcdfb: introduce driver dataSam Ravnborg2018-01-173-25/+63
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From b1cb4bbebbe8f2ef7049cdc8604f516bb0108403 Mon Sep 17 00:00:00 2001 From: Sam Ravnborg <sam@ravnborg.org> Date: Sat, 6 Jan 2018 14:33:53 +0100 Subject: [PATCH] atmel_lcdfb: introduce driver data Introduce driver data like known from the kernel. This allows us to get rid of the hack where the intensity bit support was included in the lcd wiring mode. (No longer any support for IBGR, IRBG) It has the nice side-effect that all places where we test for hacks can now use flags and not a set of cpu's. So we keep all the configuration in one place. The configuration is included for non-DT users. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / net/e1000: fix driver probing in the presence of two e1000 devicesUwe Kleine-König2018-01-171-0/+1
|/ | | | | | | | | | | | | | | | The .id member of the struct device for the invm device is not initialized and so implicitly zero. This yields: register_device: already registered invm0 for the second i210 during probe. So use the parent's id to initialize the id for invm, too, as is already done for the corresponding e1000-nor device. Fixes: a74b97f009c6 ("e1000: Expose i210's iNVM as a cdev") 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/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>