summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* dts: update to v5.2-rc4Sascha Hauer2019-06-19126-926/+166
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Documentation: user: suggest U-Boot's bootm, not goAhmad Fatoum2019-06-181-2/+2
| | | | | | | | | | | | | | | Unlike barebox, U-Boot's go command doesn't have any provisions for cache handling and as such, bootstrapping barebox via go can cause stale data to be erroneously executed as instructions. The official documentation[1] suggests use of bootm instead, which does the necessary flushing and invalidation. Update our documentation accordingly. [1]: http://www.denx.de/wiki/view/DULG/UBootStandalone#Section_5.12.3. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* pcf857x: fix CONFIG_OF to OFDEVICEMichael Grzeschik2019-06-171-1/+1
| | | | | | | | There is not CONFIG_OF symbol. We fix this by using OFDEVICE instead. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* startup: execute /env/bin/init as part of the initial shellIan Abbott2019-06-131-4/+5
| | | | | | | | | | | | | | | Commit 90df2a955e3c ("defaultenv: Convert init script to C") unintentionally changed the way the legacy "/env/bin/init" script is run, so that it runs in a sub-shell context, effectively changing `run_command("source /env/bin/init");` to `run_command("/env/bin/init");`. Therefore, any changes to shell environment variables made by the script are undone when the script exits. This patch reverts back to the old behavior. Fixes: 90df2a955e3c ("defaultenv: Convert init script to C") Cc: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* startup: Do not overwrite global.linux.bootargs.consoleSascha Hauer2019-06-131-3/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* plathome-openblocks-a6: use image format 0Uwe Kleine-König2019-06-131-1/+1
| | | | | | | | This machine is powered by a kirkwood processor which needs version 0. Fixes: 58390878bc30 ("plathome-openblocks-a6: provide a kwbimage.cfg file") 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/usb-phy'Sascha Hauer2019-06-115-141/+63
|\
| * ARM: i.MX: Drop unused usb-imx6.cAndrey Smirnov2019-05-273-115/+1
| | | | | | | | | | | | | | | | Looks like usb-imx6.c was abandoned and there are no references to either of the functions difined there. Drop it. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: imx-usb-phy: Disable charger detect during initializationAndrey Smirnov2019-05-271-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I can't find any erratas this is in refernce to, but apparently external changer detector needs to be disabled to prevent poor USB data signal quality. The problem manifest itself as a intermittent USB transfer corruption that happens to some device under and only under specific circumstances. In my case the failure was observed with Transcent SD/micro-SD card reader (05e3:0745 Genesys Logic, Inc. Logilink CR0012) when connected directly to front panel USB of ZII RDU2 board (the problem would go away if device was conntecte via a hub/USB-analyzer/male-female type A extender cable). Note that this fix is present in Linux kernel as well as some abandoned Barebox code removed in the next patch. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: imx-usb-phy: Use stmp_reset_block() to reset PHYAndrey Smirnov2019-05-272-10/+6
| | | | | | | | | | | | | | | | | | Upstream kernel driver uses stmp_reset_block() to reset the PHY, so convert the code to do so as well to save some code and sync both drivers. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: imx-usb-phy: Wrap lines to silence checkpatchAndrey Smirnov2019-05-211-2/+4
| | | | | | | | | | | | | | | | Those two line are the only thing that checkpatch is complaining about. Wrap them to slince it. No functional change intended. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: imx-usb-phy: Import register definitions from Linux driverAndrey Smirnov2019-05-211-17/+18
| | | | | | | | | | | | | | | | Import register definitions from Linux driver to simplify comparing/sharing code a bit. No functional change intended. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/usb-ehci'Sascha Hauer2019-06-112-187/+242
|\ \
| * | usb: host: ehci: Allocate only NUM_QH queue heads for qh_listAndrey Smirnov2019-05-231-1/+1
| | | | | | | | | | | | | | | | | | | | | Use NUM_QH, not NUM_TD to specify allocation size. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ush: host: ehci: Simplify QH initialization in ehci_submit_async()Andrey Smirnov2019-05-231-12/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We use a fixed circular list for asynchronous schedule that never changes, so if we drop an explicit memset() that zeros out an entire struct and replace it with code initializine all of the fields explicitly, we can set QH list once in ehci_init() and never touch it again. While at it move qt_altnext initialization to ehci_init() as well since we never change that field either. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: host: ehci: Treat ehci->qh_list as an arrayAndrey Smirnov2019-05-231-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Since ehci->qh_list is an array, convert the code to use ehci->qh_list[0] to access its first element to make things a bit more clear. No functional change intended. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: host: ehci: Drop explicit memset() in ehci_init()Andrey Smirnov2019-05-231-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Memory allocated by dma_alloc_coherent() is already zeroed out, ehci->qh_list[0] never changes during the operation of the driver and ehci->qh_list[1] will be explicitly initialized by ehci_submit_async() so this additional memset() shouldn't be necessary. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: host: ehci: Replace explicit printf() with dev_err()Andrey Smirnov2019-05-231-3/+7
| | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: host: ehci: Add a comment explaing IOC setting for dataAndrey Smirnov2019-05-231-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | Add a comment explaining the rationale behinde QT_TOKEN_IOC(req == NULL). Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: host: ehci: Use bool to simplify ehci_submit_async()Andrey Smirnov2019-05-231-3/+3
| | | | | | | | | | | | | | | | | | | | | Change the type of 'c' to bool and drop the trigrah. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: host: ehci: Drop needless assignments in ehci_submit_async()Andrey Smirnov2019-05-231-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | Neither of those is necessary, since both will be overwritten further down in the code. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: host: ehci: Simplify ehci_submit_async()'s epilogueAndrey Smirnov2019-05-231-38/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Re-organize the epilogue of ehci_submit_async() to bail out early if token is still marked as "active" and drop no longer necessary check for "dev->status != USB_ST_NOT_PROC". While at it return -EIO instead of -1 in the case of error. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: host: ehci: Initialize qTDs explicitlyAndrey Smirnov2019-05-231-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | Convert the code to initialize only used qTDs as well as initializing all of the fields explicitly without doing a wholesale memset() first. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: host: ehci: Simplify ehci_td_buffer()Andrey Smirnov2019-05-231-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rework the code of ehci_td_buffer() with following trivial changes: * Switch to using dma_addr_t for 'delta' and 'next' * Convert while to for loop * Replace explicit magic number with dedicated contants derived via ARRAY_SIZE * Use ALIGN_DOWN to calculate 'next' * Return -ENOMEM instead of -1 when we ran out of buffers Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: host: ehci: Simplify qTD buffer synchronizationAndrey Smirnov2019-05-232-43/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only two buffers ever need to be sychronized and DMA direction of it is always known based on the type of request we are processing. Simplify the code by moving synchronization to be a part of ehci_prepare_qtd(). While at it convert the code to use dma_map_single() API. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: host: ehci: Introduce ehci_prepare_qtd()Andrey Smirnov2019-05-231-31/+35
| | | | | | | | | | | | | | | | | | | | | | | | Move shared struct qTD initialization code into a subroutine and convert the rest of the code to use it. No functional change intended. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: host: ehci: Drop unnecessary cleanup codeAndrey Smirnov2019-05-231-15/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This looks like a leftover from U-Boot. Analogous code there would walk all qTDs and call ehci_free() on each one of them, but since we don't have anything of the sort it seems the whole loop can be dropped. Note that U-Boot dropped that code in de98e8b22a10676fd226318c92a9be7f519208ca Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: host: ehci: Replace magic number with macrosAndrey Smirnov2019-05-232-49/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | Import a number of missing macros from U-Boot and convert ehci-hcd to use them instead of explicitly specifying magic shifts. No functional change intended. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: host: ehci: Use to USBSTS to wait for transfer completionAndrey Smirnov2019-05-232-14/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we already set up our last qTD to have IOC flag set we may as well take advange of that and poll USBSTS to wait for transfer completion. Doesn't change much, but allows us to drop a custom polling loop and re-use handshake() instead. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: host: ehci: Share code to enable/disable async scheduleAndrey Smirnov2019-05-231-19/+20
| | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: host: ehci: Do not zero out DMA coherent memoryAndrey Smirnov2019-05-231-2/+0
| |/ | | | | | | | | | | | | | | Memory returned by dma_alloc_coherent() should already be zeroed out, so there's no need to do this explicitly. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/ubootenv'Sascha Hauer2019-06-1113-0/+1013
|\ \
| * | ARM: rdu1: Add U-Boot environment partitionCory Tusar2019-06-071-0/+21
| | | | | | | | | | | | | | | Signed-off-by: Cory Tusar <cory.tusar@zii.aero> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: rdu2: Add U-Boot environment partitionsAndrey Smirnov2019-06-071-0/+27
| | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | fs: Add a driver to access U-Boot environment variablesAndrey Smirnov2019-06-074-0/+536
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add a driver working on top of ubootvar device and exposing U-Boot environment variable data as files. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Cory Tusar <cory.tusar@zii.aero> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | misc: Add a driver to expose U-Boot environment variable dataAndrey Smirnov2019-06-074-0/+416
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a driver to expose U-Boot environment variable data as a single mmap-able device, hiding various low-level details such as: * Preamble format differences * Read/write logic in presence of redundant partition Not very useful on its own, it is a crucial low-level plumbing needed by filesystem driver introduced in the following commit. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Cory Tusar <cory.tusar@zii.aero> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | drivers: Introduce late_platform_driver()Andrey Smirnov2019-06-071-0/+2
| | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | filetype: Allow specifying cdev's filetype explicitlyAndrey Smirnov2019-06-072-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Allow specifying cdev's filetype explicitly to support the cases where the type of a cdev is known apriori, yet cannot be determined by reading the cdev's content. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | filetype: Add "U-Boot environmemnt variable data" filetypeAndrey Smirnov2019-06-072-0/+3
| | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/misc'Sascha Hauer2019-06-1139-166/+433
|\ \ \
| * | | remove CONFIG_DEBUG_INFOOleksij Rempel2019-06-072-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ELF file should have debug symbols, the binary should have no symbols any way. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | firmware: add gitignore file for *.binRouven Czerwinski2019-06-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no intention to commit static firmware to this directory. If there is a use case, gitignore can be overridden explicitly. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | images: ignore *.csfbin filesRouven Czerwinski2019-06-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The csfbin files are created during a HABV4 build, ignore them since they are automatically generated. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | filetype: fix typoAntony Pavlov2019-06-071-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | MIPS: use anonymous labels in ENTRY_FUNCTION_END and STOP_WITH_DEBUG_EVENT ↵Peter Mamonov2019-06-071-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | macros Use of global labels of the same name inside ENTRY_FUNCTION_END and STOP_WITH_DEBUG_EVENT prevents simultaneous use of both macros. It also prevents multiple use of one of them. Signed-off-by: Peter Mamonov <pmamonov@gmail.com> Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | Documentation: add riscv mentionAntony Pavlov2019-06-041-0/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | riscv: dts: erizo-generic: fix memory node nameAntony Pavlov2019-06-041-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | net: macb: dma_sync_* receive buffersLadislav Michl2019-06-041-7/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Receive buffers are properly synchronized only if Cadence is GEM. Fix it for MACB as well. Fixes: 86dc5259e25d (net: macb: no need for coherent memory for receive buffer) Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | gpio: add driver for PCF857x, PCA{85, 96}7x, and MAX732[89] I2C GPIO expandersMichael Grzeschik2019-06-043-0/+274
| | | | | | | | | | | | | | | | | | | | | | | | Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | scripts: kwboot: fix comparison with out-of-range constantAhmad Fatoum2019-05-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clang detects that system char signedness will affect program runtime: scripts/kwboot.c:395:10: warning: result of comparison of constant 255 with expression of type 'char' is always true [-Wtautological-constant-out-of-range-compare] if (*p != 0xff) ~~ ^ ~~~~ Fix this by using uint8_t where appropriate. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>