summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | commands/miitool: Allow specifying PHY by their full pathAndrey Smirnov2017-12-061-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make -s option to be a bit more consistent with how it is used in other commands by allowing PHY device to be specified by either its name of full path in /dev. This change also allows us to leverage autocompletion since it will work as expected for paths in /dev. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | i.MX: imu-bbu-internal: Make use of devpath_to_name()Andrey Smirnov2017-12-061-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert the code to use shared function from fs.h Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | fs: Introduce devpath_to_name()Andrey Smirnov2017-12-061-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a simple function to simplify the task of accepting both full path in "/dev" and just device name as a parameter. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | commands: miitool: Constify 'phydevname' in mdiobus_show()Andrey Smirnov2017-12-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems like mdiobus_show() doesn't need more than read-only to 'phydevname', so constify it to allow passing const stings in. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | zii_vf610_dev_defconfig: Select MDIO bus GPIO multiplexerAndrey Smirnov2017-12-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Select MDIO bus GPIO multiplexer to support hardware present on the board. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | net: mdio-mux: Avoid probing multiplexed bussesAndrey Smirnov2017-12-063-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-064-0/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-062-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | ARM: vybrid: zii: Make use of DT code from Linux kernelAndrey Smirnov2017-12-066-1131/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that vf610-zii-dev.dts, vf610-zii-dev-rev-b.dts and vf610-zii-dev-rev-c.dts made their way from Linux to Barebox, convert all relevant code to make use of them. 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-058-256/+282
|\ \ \ \ \ \
| * | | | | | 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>
| * | | | | | ARM: i.MX: bbu-internal: fix typosUlrich Ölmann2017-11-281-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | ARM: i.MX: bbu-internal: fix commentUlrich Ölmann2017-11-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | ARM: rdu2: build a single image for both Quad and QuadPlus variantsLucas Stach2017-11-245-247/+270
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows for easier deployments on the different units, as there is no need to flash different images to the Quad and QuadPlus units anymore. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | boards/zii-vf610-dev: Do not keep 'SOC_SW_RSTN' lowAndrey Smirnov2017-11-171-1/+1
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From users feedback, it's not very practical keep 'SOC_SW_RSTN' low and corresponding Ethernet switch it controls in reset. Change the code to keep the line high by default. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> 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>
* | | | | | Merge branch 'for-next/e1000'Sascha Hauer2018-01-053-146/+324
|\ \ \ \ \ \
| * | | | | | 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>
* | | | | | Merge branch 'for-next/dts'Sascha Hauer2018-01-051362-17115/+34353
|\ \ \ \ \ \
| * | | | | | dts: update to v4.15-rc1Sascha Hauer2017-11-28975-16409/+33708
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | dts: update to v4.14-rc8Sascha Hauer2017-11-17427-17/+448
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | dts: update to v4.14-rc7Sascha Hauer2017-11-172-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | dts: update to v4.14-rc6Sascha Hauer2017-11-1730-688/+195
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | | | Merge branch 'for-next/doc'Sascha Hauer2018-01-0523-55/+66
|\ \ \ \ \ \ \ | |_|_|_|_|/ / |/| | | | | |
| * | | | | | ARM: psci command: Add to misc groupSascha Hauer2017-12-011-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Explicitly add psci command to the misc group to get rid of the warning that the command has no group. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | Documentation: remove :numbered: from lower level toctreesSascha Hauer2017-12-0112-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only the highest level toctree may have :numbered:, otherwise sphinxs complains loudly that the subtree is already numbered. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | Documentation: defaultenv-2: Change highlight to makeSascha Hauer2017-12-011-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's a make snippet, so change highlighting accordingly. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | Documentation: change default highlight language to shellSascha Hauer2017-12-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are many places where sphinx complains that blocks cannot be hilghlighted in 'c' and in fact I am not aware of any C code snippets in the documentation, so change the default highlighting style to shell which fits our needs much better. With this we get rid of many warnings while building the documentation. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | Documentation: socfpga: Fix numbered listSascha Hauer2017-12-011-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is no code block, change to numbered list. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | Documentation: Change many code blocks to no highlightSascha Hauer2017-12-016-27/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several blocks cannot be sensibly highlighted, so change the highliting to 'none'. Fixes many warnings in building the documentation. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | Documentation: arm-qemu-vexpress: Fix too short underlineSascha Hauer2017-12-011-1/+1
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes sphinx warning about too short underline. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | | Bootm: remove uimage_close done later in bootm_bootClément Leger2017-12-151-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From 24e24f9998342b23cd8de4145c8098f93c60cdc7 Mon Sep 17 00:00:00 2001 From: Clement Leger <clement.leger@kalray.eu> Date: Thu, 14 Dec 2017 13:29:50 +0100 Subject: [PATCH] Bootm: fix double uimage_close When uimage crc fails, the error handling path call uimage_close in bootm_open_os_uimage and also in bootm_boot. This leads to crash/exception. Keep the main error handling path in bootm_boot and remove uimage_close from bootm_open_os_uimage to avoid double uimage_close. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | | Release v2017.12.0v2017.12.0Sascha Hauer2017-12-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | | ARM: dts: bcm2835-rpi: re-enable booting from SD cardRoland Hieber2017-12-071-0/+8
| |_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Kernel commit a19adf8d86e822eba502486524127595372c85f6 [0] changed the RPi1 device tree from &sdhci to &sdhost, which was imported in barebox commit d14b844b08635c717fb52a294ed8d6872e260315. It seems that barebox does not have a driver for brcm,bcm2835-sdhost (yet), which resulted in barebox unable to boot from SD card. However, the driver for brcm,bcm2835-sdhci worked fine in the past. Although the upstream change was made for good reasons, the simplest change for barebox for now is to revert to using &sdhci and disable &sdhost. Thanks to Alexander Dahl for raising this issue on the DistroKit mailing list! [0]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a19adf8d86e822eba502486524127595372c85f6 Cc: Alexander Dahl <post@lespocky.de> Signed-off-by: Roland Hieber <rohieb@rohieb.name> Reviewed-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | common: globalvar: fix removing multiple nvvars with wildcardsSascha Hauer2017-11-301-2/+3
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nvvar_remove takes wildcards, so it can remove multiple variables. This means we cannot return after the first loop iteration, but instead must continue. Fixes: 609d3edc3ad9 (common: globvar: let nvvar_remove() report non-existing variable) Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Cc: