summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* mtd: spi-nor: remove unused write_enable from write_regSteffen Trumtrar2019-05-081-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | Based on the Linux v4.2 commit: commit f9f3ce835ddce3c669eee869253105f88819888b Author: Jagan Teki <jteki@openedev.com> AuthorDate: Wed Aug 19 15:26:44 2015 +0530 Commit: Brian Norris <computersforpeace@gmail.com> CommitDate: Fri Sep 11 16:04:55 2015 -0700 mtd: spi-nor: Zap unneeded write_enable from write_reg The 'write_enable' argument is unused and unneeded, so remove it from the API. Signed-off-by: Jagan Teki <jteki@openedev.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Han Xu <han.xu@freescale.com> [Brian: fixed for nxp-spifi.c] Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* spi: Extend the core to ease integration of SPI memory controllersSteffen Trumtrar2019-05-082-0/+362
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sync with Linux v5.1-rc1. This is the barebox adoption of the commit commit c36ff266dc82f4ae797a6f3513c6ffa344f7f1c7 Author: Boris Brezillon <boris.brezillon@bootlin.com> Date: Thu Apr 26 18:18:14 2018 +0200 spi: Extend the core to ease integration of SPI memory controllers Some controllers are exposing high-level interfaces to access various kind of SPI memories. Unfortunately they do not fit in the current spi_controller model and usually have drivers placed in drivers/mtd/spi-nor which are only supporting SPI NORs and not SPI memories in general. This is an attempt at defining a SPI memory interface which works for all kinds of SPI memories (NORs, NANDs, SRAMs). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Frieder Schrempf <frieder.schrempf@exceet.de> Tested-by: Frieder Schrempf <frieder.schrempf@exceet.de> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* spi: Import more spi mode defines from LinuxSteffen Trumtrar2019-05-081-0/+10
| | | | | | | | | Sync with Linux v5.1-rc1. Define more spi mode flags. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* spi: Generalize SPI "master" to "controller"Steffen Trumtrar2019-05-081-12/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sync with Linux v5.1-rc1. This is the barebox adoption of the commit commit 8caab75fd2c2a92667cbb1cd315720bede3feaa9 Author: Geert Uytterhoeven <geert+renesas@glider.be> Date: Tue Jun 13 13:23:52 2017 +0200 spi: Generalize SPI "master" to "controller" Now struct spi_master is used for both SPI master and slave controllers, it makes sense to rename it to struct spi_controller, and replace "master" by "controller" where appropriate. For now this conversion is done for SPI core infrastructure only. Wrappers are provided for backwards compatibility, until all SPI drivers have been converted. Noteworthy details: - SPI_MASTER_GPIO_SS is retained, as it only makes sense for SPI master controllers, - spi_busnum_to_master() is retained, as it looks up masters only, - A new field spi_device.controller is added, but spi_device.master is retained for compatibility (both are always initialized by spi_alloc_device()), - spi_flash_read() is used by SPI masters only. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* hab/caam: Fix compilation of caam driver when hab is disabledSascha Hauer2019-04-111-2/+5
| | | | | | | | | The caam driver needs the variable habv4_need_rng_software_self_test, but this is only declared when HABV4 is enabled. Instead of exporting a variable rather provide a function to test if a software selftest of the random number generator is needed. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* hab: habv4_need_rng_software_self_test is needed without hab supportSascha Hauer2019-04-111-1/+2
| | | | | | habv4_need_rng_software_self_test Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/warnings'Sascha Hauer2019-04-091-3/+4
|\
| * mfd: twl-core: Add missing prototype for twlcore_get()Sascha Hauer2019-03-181-3/+4
| | | | | | | | | | | | twlcore_get() has no prototype provided in header file. Add it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/usb-storage'Sascha Hauer2019-04-092-23/+0
|\ \
| * | usb: Drop usb_disable_asynch()Andrey Smirnov2019-03-111-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are no users of usb_control_msg() in the codebase that pass timeout of 0, so it doesn't look like usb_disable_asynch() has any effect on USB operation. Drop that function and remove all of its uses to simplify things. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: storage: Drop struct SCSI_cmd_blockAndrey Smirnov2019-03-111-22/+0
| |/ | | | | | | | | | | | | | | | | | | | | All the info we need to pass to transport function can be captured in a struct us_blk_dev and two byte arrays, so having a dedicated struct with many unused fields doesn't really buy us anything. Drop the struct and convert the rest of the code to pass needed data explicitly. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/stm32'Sascha Hauer2019-04-091-14/+27
|\ \
| * | clk: mux: Support CLK_SET_RATE_NO_REPARENT flagSascha Hauer2019-03-111-0/+1
| | | | | | | | | | | | | | | | | | | | | Since barebox doesn't do reparenting on rate changes we only have to define the flag. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | clk: mux: Support CLK_MUX_READ_ONLY flagSascha Hauer2019-03-111-0/+1
| | | | | | | | | | | | | | | | | | Support readonly dividers using the CLK_MUX_READ_ONLY flag. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | clk: mux: Support mux specific flagsSascha Hauer2019-03-111-6/+8
| | | | | | | | | | | | | | | | | | | | | We'll need mux specific flags in the future, so add a parameter to the mux initialization functions. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | clk: divider: Support CLK_DIVIDER_READ_ONLY flagSascha Hauer2019-03-111-0/+1
| | | | | | | | | | | | | | | | | | To support a readonly divider add the CLK_DIVIDER_READ_ONLY flag. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | clk: divider: pass divider flagsSascha Hauer2019-03-111-6/+10
| | | | | | | | | | | | | | | | | | | | | The generic clk divider needs clock flags and divider flags. Fix prototypes to take both as separate arguments. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | clk: Support CLK_IS_CRITICAL flagSascha Hauer2019-03-111-0/+1
| | | | | | | | | | | | | | | | | | | | | Support CLK_IS_CRITICAL flag. Simply do not disable the clock even when the enable count is zero. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | clk: Make CLK_IGNORE_UNUSED genericSascha Hauer2019-03-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | barebox will never disable unused clocks, so add CLK_IGNORE_UNUSED as a no-op flag. With this we can keep the changes to the imported kernel code smaller. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | clk: export clk_gate_is_enabled()Sascha Hauer2019-03-111-0/+2
| | | | | | | | | | | | | | | | | | Will be needed by stm32 clk support. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | clk: parent_names should be constSascha Hauer2019-03-111-4/+4
| |/ | | | | | | | | | | | | Not only the array of pointers should be const, but also the strings they point to. Add missing const. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/pstore'Sascha Hauer2019-04-092-9/+22
|\ \
| * | pstore: Replace arguments for write() APIKees Cook2019-03-181-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to the pstore_info read() callback, there were too many arguments. This switches to the new struct pstore_record pointer instead. This adds "reason" and "part" to the record structure as well. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | pstore: Replace arguments for read() APIKees Cook2019-03-181-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The argument list for the pstore_read() interface is unwieldy. This changes passes the new struct pstore_record instead. The erst backend was already doing something similar internally. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | pstore: Extract common arguments into structureKees Cook2019-03-181-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The read/mkfile pair pass the same arguments and should be cleared between calls. Move to a structure and wipe it after every loop. Signed-off-by: Kees Cook <keescook@chromium.org> [p.zabel@pengutronix.de: ported to Barebox from Linux commit 9abdcccc3d5f] Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | pstore/ram: Clarify resource reservation labelsKees Cook2019-03-181-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When ramoops reserved a memory region in the kernel, it had an unhelpful label of "persistent ram". When reading iomem, it would be repeated many times, did not hint that it was ramoops in particular, and didn't clarify very much about what each was used for: 0x4fdd4000 - 0x4fdf3fff (size 0x00020000) persistent ram 0x4fdf4000 - 0x4fe13fff (size 0x00020000) persistent ram ... 0x4ff74000 - 0x4ff93fff (size 0x00020000) persistent ram 0x4ff94000 - 0x4ffb3fff (size 0x00020000) persistent ram 0x4ffb4000 - 0x4ffd3fff (size 0x00020000) persistent ram Instead, this adds meaningful labels for how the various regions are being used: 0x4fdd4000 - 0x4fdf3fff (size 0x00020000) ramoops:dump(0/12) 0x4fdf4000 - 0x4fe13fff (size 0x00020000) ramoops:dump(1/12) ... 0x4ff74000 - 0x4ff93fff (size 0x00020000) ramoops:console 0x4ff94000 - 0x4ffb3fff (size 0x00020000) ramoops:ftrace 0x4ffb4000 - 0x4ffd3fff (size 0x00020000) ramoops:pmsg Signed-off-by: Kees Cook <keescook@chromium.org> Reviewed-by: Joel Fernandes (Google) <joel@joelfernandes.org> [p.zabel@pengutronix.de: ported to Barebox from Linux commit 1227daa43bce] Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | pstore/ram: Do not use stack VLA for parity workspaceKees Cook2019-03-181-0/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | Instead of using a stack VLA for the parity workspace, preallocate a memory region. The preallocation is done to keep from needing to perform allocations during crash dump writing, etc. This also fixes a missed release of librs on free. Signed-off-by: Kees Cook <keescook@chromium.org> [p.zabel@pengutronix.de: ported to Barebox from Linux commit f2531f1976d9] Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/net'Sascha Hauer2019-04-091-0/+39
|\ \
| * | net: phy: Add register access helper functions for physSascha Hauer2019-03-111-0/+35
| | | | | | | | | | | | | | | | | | | | | Linux has phy helpers to access paged registers and to modify phy registers. Add them to barebox for upcoming realtek phy support. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: phy: Add PHY_ID_MATCH_* macrosSascha Hauer2019-03-111-0/+4
| |/ | | | | | | | | | | | | Linux has some macros to describe matching phy ids to vendors and models. Add them to barebox for upcoming realtek phy driver. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2019-04-092-27/+37
|\ \
| * | linux/kernel.h: split *_MAX and *_MIN macros into <linux/limits.h>Masahiro Yamada2019-03-212-27/+37
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Copy include/linux/limits.h from Linux 5.1-rc1 (removing #include <uapi/linux/limits.h>). While we are here, add SPDX License tag to <linux/kernel.h>. Based on the following Linux commits: - 54d50897d544 ("linux/kernel.h: split *_MAX and *_MIN macros into <linux/limits.h>") - 2dc0e68d5ada ("linux/kernel.h: use 'short' to define USHRT_MAX, SHRT_MAX, SHRT_MIN") Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/layerscape'Sascha Hauer2019-04-087-0/+2130
|\ \
| * | ARM: Add basic Layerscape supportSascha Hauer2019-03-132-0/+429
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds basic Layerscape support: - Makefile/Kconfig - Register maps - errata workarounds Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ddr: fsl: Add Freescale ddr driverSascha Hauer2019-03-132-0/+742
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the Freescale ddr driver used on various PowerPC and Layerscape SoCs. This is based on U-Boot-2019.01 but with many adjustments: - PowerPC support has been removed - CPP #ifdeffery replaced with C - No more global variables/functions expected from the driver, configuration is passed by the board code which calls the driver We already have the driver in the tree in an older version forked from U-Boot-2013.04. This version lacks Layerscape support and many quirks in the driver are PowerPC specific. Since the existing driver should work on all known PowerPC and PowerPC is a dead end I decided not to improve the existing driver and instead add a new Layerscape specific driver. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: Add Freescale FMan ethernet supportSascha Hauer2019-03-132-0/+695
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds ethernet support for the Freecale Layerscape SoCs. The architecture in these SoCs is called "Data Path Acceleration Architecture" (DPAA). It is comprised of: - The Queue Manager (QMan) - Buffer Manager (BMan) - Frame Manager (FMan) - Multirate Ethernet Media Access Controller (mEMAC) The code is based on the corresponding U-Boot driver enriched with device tree parsing and proper device driver support. Tested on LS1046a, should work on other SoCs aswell with some minor quirks. SerDes support has been removed for now. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | Add Freescale QUICC Engine firmware supportSascha Hauer2019-03-131-0/+264
| |/ | | | | | | | | | | | | The Freescale QUICC Engine found on Layerscape SoCs needs firmware loaded. This adds support for loading such a firmware. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / ARM: zii-common: add support for switch reset on RDU1Lucas Stach2019-03-181-0/+1
|/ | | | | Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/spd'Sascha Hauer2019-03-072-185/+542
|\
| * ddr_spd: provide common SPD typeSascha Hauer2019-03-041-0/+10
| | | | | | | | | | | | | | Provide a common struct type for the different SPD EEPROM types. Can be used to pass around SPD data without specifying the DDR type. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ddr_spd: Add function to read eepromSascha Hauer2019-03-041-0/+6
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ddr_spd: Update from U-BootSascha Hauer2019-03-041-183/+496
| | | | | | | | | | | | | | | | | | | | | | This updates the ddr_spd.h header file from U-Boot-2019.01 with some small changes: - typedefs are removed - "_s" suffix from struct types removed - remove unnecessary "extern" from function declarations Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * crc: Add PBL variant for crc_itu_t()Sascha Hauer2019-03-041-0/+16
| | | | | | | | | | | | | | Enable crc_itu_t() for PBL. For the PBL use the slower-but-smaller variant without table. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * crc: import crc_itu_t() from kernelSascha Hauer2019-03-041-2/+14
| | | | | | | | | | | | | | | | Our cyc_crc16() function is the same function as crc_itu_t() in the Linux kernel. Import and use crc_itu_t() from the Kernel for consistency. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/rpi'Sascha Hauer2019-03-072-0/+81
|\ \
| * | debug_ll: Add ns16550 early debugging functionsSascha Hauer2019-03-061-0/+56
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | debug_ll: Move pl011 header file to architecture independent placeSascha Hauer2019-03-061-0/+25
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/nvme'Sascha Hauer2019-03-077-1/+4379
|\ \ \
| * | | drivers: Import a very basic NVME implementation from LinuxAndrey Smirnov2019-02-181-0/+1271
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Import a very abridged NVME implementation from Linux kernel in order to be able to access NVME storage attached via PCIe. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | include: Import min_not_zero() macro from LinuxAndrey Smirnov2019-02-181-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Import min_not_zero() macro from Linux used by some kernel code. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>