summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* of: partition: fix typo when writing #address-cellsPhilipp Zabel2018-03-291-1/+1
| | | | | | | | | | | | On > 4 GiB eMMC devices, barebox writes a 32-bit address and a 64-bit size into the partition reg property, because #address-cells is accidentally written as '#addres-cells'. This causes a fallback to 32-bit address size. Fix the typo and thereby of_partition_fixup for 64-bit partitions. Fixes: a2fa18f9f483 ("mtd: of: Make used partition binding configurable") Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/rpi'Sascha Hauer2018-03-053-0/+148
|\
| * watchdog: implement bcm2835 watchdogLucas Stach2018-02-093-0/+148
| | | | | | | | | | | | | | Move out of architecture code and add some real watchdog functionality. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2018-03-054-21/+13
|\ \
| * | of: Make locally used function staticSascha Hauer2018-03-051-1/+1
| | | | | | | | | | | | | | | | | | | | | __of_unflatten_dtb is only locally used and has no prototype in include/. Make it static. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | of: Make locally used function staticSascha Hauer2018-03-051-1/+1
| | | | | | | | | | | | | | | | | | | | | of_property_get_value is only locally used and has no prototype in include/. Make it static. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: spi-nor: add support for w25q16dwMichael Grzeschik2018-03-051-0/+1
| | | | | | | | | | | | | | | Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: cpsw: fix probe with fixed-linkAndreas Schmidt2018-03-051-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | While cpsw is probe dt, it accepts only slaves nodes with "phy_id" property. In case of fixed-link there are no "phy_id" property and probe would be failed. This patch avoid the failure due to missing "phy_id" in case of fixed-link. Signed-off-by: Andreas Schmidt <mail@schmidt-andreas.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: cpsw: Call phy_device_connect() earlierSascha Hauer2018-02-221-15/+4
| |/ | | | | | | | | | | | | | | | | We only want to register a slave when a valid phy is available. Instead of manually calling mdiobus_scan() and phy_register_device() we can let this do from phy_device_connect() which also works for fixed phys. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/imx'Sascha Hauer2018-03-054-2/+320
|\ \
| * | hw_random: add driver for Freescale RNGCSteffen Trumtrar2018-02-093-0/+317
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver is ported from Freescales Linux git and can be found in the vendor/freescale/imx_2.6.35_maintain branch. According to that code, the RNGC is found on Freescales i.MX3/5 SoCs. The i.MX2x actually has an RNGB, which has no driver implementation in Freescales kernel. However as it turns out, the driver for the RNGC works fine on the (at least) i.MX25. So, they seem to be somewhat compatible. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
| * | ARM: imx25: clk: add rngb clockSteffen Trumtrar2018-02-091-2/+3
| |/ | | | | | | Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
* | Merge branch 'for-next/fastboot'Sascha Hauer2018-03-053-78/+162
|\ \
| * | usb: gadget: fastboot: Add external command execution supportSascha Hauer2018-02-092-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Custom projects may need vendor specific expansions to the fastboot command execution. Allow these to be implemented without messing in the fastboot code directly. We have a hook for all commands and also one for the "flash" command. Each hook can decide if the generic command parser is executed afterwards (return value FASTBOOT_CMD_FALLTHROUGH) or if the generic parser shall be skipped (return value 0 or negative error code). This allows board code to implement vendor specific "oem" commands or to handle the downloaded image in a special way (i.e. do signature checks on them) Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: gadget: fastboot: Add option to download to a bufferSascha Hauer2018-02-092-26/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | This adds an option to download the image data to a temporary buffer rather than to a file. While a file is generally the better option, in some special cases a buffer is better for memory usage. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: gadget: fastboot: beautify fb_run_command()Sascha Hauer2018-02-091-7/+8
| | | | | | | | | | | | | | | | | | Only some refactoring, no functional change intended. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: gadget: fastboot: fix typoSascha Hauer2018-02-091-1/+1
| | | | | | | | | | | | | | | | | | s/correspoinding/corresponding/ Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: gadget: fastboot: Always remove temporary fileSascha Hauer2018-02-091-20/+14
| | | | | | | | | | | | | | | | | | | | | | | | We should consistently remove the temporary image file, regardless of the error code. To do so, always jump to the end of the function where the temporary file is removed. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: gadget: fastboot: use read_file_2Sascha Hauer2018-02-091-2/+3
| | | | | | | | | | | | | | | | | | | | | read_file_2 gives us a proper error code and allows us to specify a maximum size which in this case we happen to know. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: gadget: fastboot: pass struct f_fastboot * aroundSascha Hauer2018-02-091-30/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | The different fastboot commands mostly do not need the USB endpoint or the USB request, they need the context data structure struct f_fastboot * instead, so rather pass this one around between the different functions. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: gadget: fastboot: Make sparse support optionalSascha Hauer2018-02-092-4/+20
| | | | | | | | | | | | | | | | | | Sparse support is not always desired, make it optional. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/efi'Sascha Hauer2018-03-051-0/+48
|\ \ \
| * | | efi: add bootsource detectionEnrico Jorns2018-02-221-0/+48
| |/ / | | | | | | | | | | | | | | | | | | | | | We check the supported protocol of the parent EFI device of 'efi_loaded_image' to see if we are booted from USB or not (HD) Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / / state: remove unused arguments from state_new_from_node()Sascha Hauer2018-02-221-1/+1
|/ / | | | | | | | | | | | | | | state_new_from_node() has arguments describing the backend path. These are never used in barebox, the backend path is always derived from the device nodes backend description. Remove these arguments. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / i2c: i2c_master_send(): don't leave flags uninitializedAntony Pavlov2018-02-091-0/+1
|/ | | | | | | | Leaving the flags field unitialized can lead to performing read operation instead of write operation. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/sandbox-libftdi'Sascha Hauer2018-02-083-0/+142
|\
| * sandbox: add gpio support with libftdi1Antony Pavlov2018-01-293-0/+142
| | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/of'Sascha Hauer2018-02-083-35/+126
|\ \
| * | of: fdt: add of_unflatten_dtb_constSascha Hauer2018-01-311-2/+34
| | | | | | | | | | | | | | | | | | | | | | | | This adds a variant of of_unflatten_dtb() which uses the property data directly from the input tree rather than copying it. This is mainly useful for a single user: FIT images. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | of: Allow for const propertiesSascha Hauer2018-01-311-21/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for const properties. We add a const void *value_const to struct property which will not be modified. The value of a property should no longer be used directly, but with the of_property_get_value() accessor which picks the right value. With this we can unflatten dtbs and use the property values directly from the dtb instead of copying them. This is useful for device trees which (ab)use properties to store huge data files, aka FIT images. To create a property whose value is not copied but used from the original input data we introduce of_new_property_const(). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | pinctrl: do not dereference a device tree property directlySascha Hauer2018-01-311-12/+6
| | | | | | | | | | | | | | | | | | | | | Use of_get_property() rather than of_find_property() to avoid dereferencing a struct property directly. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/misc'Sascha Hauer2018-02-082-4/+21
|\ \ \
| * | | net: phy: fixed-link: read link parameters from devicetreeLucas Stach2018-02-061-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement the missing reading of the fixed link parameters from the devicetree properties. Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
| * | | net: phy: scan PHYs referenced by phandleLucas Stach2018-01-251-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we point to a PHY node by phandle, that PHY might well be on a MDIO bus that hasn't been scanned when we look for the PHY. Fortunately we know exactly where to look for the PHY, so make sure to scan the bus at the right address. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | i2c: read/write_reg: don't assume client->dev to be validUwe Kleine-König2018-01-251-2/+2
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using the barebox commands i2c_read or i2c_write the client pointer passed to the respective function isn't completely initialized. This makes dev_dbg(&client->dev, ...); choke as it dereferences client->dev.driver->name with client->dev.driver being a random value. 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/e1000'Sascha Hauer2018-02-083-76/+80
|\ \ \
| * | | net/e1000: don't register EERPOM device if the content is invalidLucas Stach2018-01-301-17/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the EEPROM content isn't valid, there is no point in registering the EEPROM device, as it will reject any read attempt anyway. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | net/e1000: don't check EEPROM signature if populated from iNVMLucas Stach2018-01-302-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The EEPROM device will contain an invalid signature if it has been populated from iNVM. Since the iNVM enum type has been removed, the only way to tell if a signature check makes sense is to look at the EEPROM valid status. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | net/e1000: EEPROM isn't valid if only iNVM is availableLucas Stach2018-01-301-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no point in registering the emulated EEPROM device if only the iNVM is available with no external flash attached to the i210, as in practice it's only shadowing the iNVM. When the EEPROM is populated from iNVM, the signature is not valid, which causes other parts of the driver to fall over. To fix this just ignore the EEPROM in that case. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | net/e1000: use correct bit for flash detectionLucas Stach2018-01-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: 95c346ccaa6d (net/e1000: don't access the (simulated) eeprom when it is invalid) Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | net/e1000: remove one level of indentationLucas Stach2018-01-301-60/+61
| |/ / | | | | | | | | | | | | | | | | | | By returning early if the MAC type isn't e1000_igb. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/constify'Sascha Hauer2018-02-081-3/+6
|\ \ \
| * | | usb: gadget: fastboot: allow data.image to be constSascha Hauer2018-01-301-3/+6
| | |/ | |/| | | | | | | | | | | | | | | | | | | Do not directly store the dynamically allocated memory in data.image as we want to make that pointer const and then no longer can call free() on it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | of: mtd: partition: Use reproducible node names for fixupSascha Hauer2018-02-061-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The full names of device nodes are not as stable as we like them to be. Lately the leading zeroes in the i.MX6 device trees were removed which led to the result that we can no longer find the partition nodes in the to be fixed tree. Use reproducible names to overcome this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | of: Add function to find the same node in another treeSascha Hauer2018-02-061-0/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For our device tree fixups we have to find a node corresponding to another node in another device tree. We used to use the full name to match the nodes, but this falls apart when nodes get renamed or for example a new bus hierarchy is introduced. To make this more robust we create reproducible names from device nodes which mostly depend on the address in MMIO space, the reg property and as a last resort the name of the device node. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | net: phy: ar8327: fix ar8327n_reg_readOleksij Rempel2018-02-051-1/+1
| | | | | | | | | | | | | | | | | | | | | Actual read value was lost and only by accident worked properly. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | net: designware: add missing headersLucas Stach2018-02-052-2/+2
|/ / | | | | | | | | | | | | | | | | As the eth_device and mii_bus structs are allocated inside the dw_eth_dev struct a forward declaration isn't enough. Fixes: c1f902841ce3 (net: designware: move probe to generic driver) Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / of: base: fix segfault in of_get_machine_compatible()Aleksander Morgado2018-01-301-0/+2
|/ | | | | | | | | | | | | | | | | | | | This is running the barebox sandbox: Thread 1 "barebox" received signal SIGSEGV, Segmentation fault. 0x0000555555579e2b in _strchr (s=s@entry=0x0, c=c@entry=44) at lib/string.c:251 251 for(; *s != (char) c; ++s) (gdb) bt #0 0x0000555555579e2b in _strchr (s=s@entry=0x0, c=c@entry=44) at lib/string.c:251 #1 0x000055555556fd91 in of_get_machine_compatible () at drivers/of/base.c:2380 #2 0x000055555556fda8 in of_init_hostname () at drivers/of/base.c:2389 #3 0x000055555555f9e6 in start_barebox () at common/startup.c:106 #4 0x00005555555a291a in main () (gdb) fr 1 #1 0x000055555556fd91 in of_get_machine_compatible () at drivers/of/base.c:2380 2380 p = strchr(name, ','); Signed-off-by: Aleksander Morgado <aleksander@aleksander.es> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/socfpga'Sascha Hauer2018-01-222-10/+50
|\
| * reset: reset-socfpga: sync driver with linuxSteffen Trumtrar2018-01-111-10/+10
| | | | | | | | | | | | | | Sync the SoCFPGA reset driver with Linux v4.14-rc1. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>