summaryrefslogtreecommitdiffstats
path: root/include/linux
Commit message (Collapse)AuthorAgeFilesLines
* usb: dwc3: Add phy interface for dwc3_ubootJagan Teki2019-11-231-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | U-Boot has two different variants of dwc3 initializations, - with dm variant gadget, so the respective dm driver would call the dwc3_init in core. - with non-dm variant gadget, so the usage board file would call dwc3_uboot_init in core. The driver probe would handle all respective gadget properties including phy interface via phy_type property and then trigger dwc3_init for dm-variant gadgets. So, to support the phy interface for non-dm variant gadgets, the better option is dwc3_uboot_init since there is no dedicated controller for non-dm variant gadgets. This patch support for adding phy interface like 8/16-bit UTMI+ code for dwc3_uboot. This change used Linux phy.h enum list, to make proper code compatibility. Cc: Marek Vasut <marex@denx.de> Tested-by: Levin Du <djw@t-chip.com.cn> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Marek Vasut <marex@denx.de> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
* Merge branch 'master' of git://git.denx.de/u-boot-usbTom Rini2019-11-084-0/+112
|\ | | | | | | - Assorted fixes
| * usb: composite: add BOS descriptor support to composite frameworkT Karthik Reddy2019-11-072-0/+12
| | | | | | | | | | | | | | | | | | | | To add usb-3.0 support to peripheral device add BOS & SS capability descriptors to gadget composite framework. Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com> Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Roger Quadros <rogerq@ti.com>
| * usb: udc: Introduce ->udc_set_speed() methodSherry Sun2019-11-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch was copied from kernel commit: 67fdfda4a99ed. Sometimes, the gadget driver we want to run has max_speed lower than what the UDC supports. In such situations, UDC might want to make sure we don't try to connect on speeds not supported by the gadget driver because that will just fail. So here introduce a new optional ->udc_set_speed() method which can be implemented by interested UDC drivers to achieve this purpose. Signed-off-by: Sherry Sun <sherry.sun@nxp.com> Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
| * usb: gadget: Add match_ep() op to usb_gadget_opsVignesh Raghavendra2019-11-071-0/+23
| | | | | | | | | | | | | | | | | | | | | | Add match_ep() op to usb_gadget_ops similar to Linux kernel which is useful in finding a suitable ep match for the function driver. This will avoid adding more gadget_is_xxx() handling code to usb_ep_autoconfig(). Also sync usb_ep_caps struct thats is usually used in the match_ep() callback by the gadget controller driver Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
| * bitmaps: import for_each_set_bit() macroVignesh Raghavendra2019-11-071-0/+61
| | | | | | | | | | | | | | | | Import for_each_set_bit() and associated macros and functions from Linux. This is useful in parsing interrupt registers and take action on each bit that is set. Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
| * list: import list_first_entry_or_null()Vignesh Raghavendra2019-11-071-0/+14
| | | | | | | | | | | | | | Import list_first_entry_or_null() macro from Linux that would be used by Cadence USB driver Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
* | linux err: make ERR_PTR/PTR_ERR architecture specificSimon Goldschmidt2019-11-071-4/+4
|/ | | | | | | | | | This patch changes ERR_PTR/PTR_ERR to use CONFIG_ERR_PTR_OFFSET to map errno values into a pointer region that cannot contain valid pointers. IS_ERR and IS_ERR_OR_NULL have to be converted to use PTR_ERR, too, for this to work. Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
* fdt: Add INT32_MAX to kernel.h for libfdtSimon Glass2019-11-042-0/+3
| | | | | | | | | | | Unfortunately libfdt needs this value now, which is present in the stdint.h header. That file is just a placeholder in U-Boot and these sorts of constants appear in the linux/kernel.h header instead. To keep libfdt happy, add INT32_MAX too. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* Merge tag 'dm-pull-29oct19' of git://git.denx.de/u-boot-dmTom Rini2019-11-011-0/+1
|\ | | | | | | | | | | - Fix for patman with email addresses containing commas - Bootstage improvements for TPL, SPL - Various sandbox and dm improvements and fixes
| * fdt: Fix alignment issue when reading 64-bits properties from fdtJean-Jacques Hiblot2019-10-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | The FDT specification [0] gives a requirement of aligning properties on 32-bits. Make sure that the compiler is aware of this constraint when accessing 64-bits properties. [0]: https://github.com/devicetree-org/devicetree-specification/blob/master/source/flattened-format.rst Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | linux/types.h: Surround 'struct ustat' with __linux__Bin Meng2019-10-281-0/+2
|/ | | | | | | | | | | 'struct ustat' uses linux-specific typedefs to declare its memebers: __kernel_daddr_t and __kernel_ino_t. It is currently not used by any U-Boot codes, but when we build U-Boot tools for other platform like Windows, this becomes a problem. Let's surround it with __linux__. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
* mtd: spi: Add 'struct spi_flash {' to the codeSimon Glass2019-10-081-1/+7
| | | | | | | | | At present spi_flash is defined to be spi_nor which is confusing since it is not possible to find the 'spi_flash' by normal text search. Add a comment to help with this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* kconfig: doc: Update comment regarding CONFIG_IS_ENABLED(FOO) for TPLLukasz Majewski2019-09-191-0/+2
| | | | | | | This patch adds some commit info for CONFIG_IS_ENABLED(FOO) when used in TPL context. Signed-off-by: Lukasz Majewski <lukma@denx.de>
* mtd: spi-nor: add missing SST26* flash IC protection opsEugeniy Paltsev2019-09-161-0/+4
| | | | | | | | | | | | | | | Commit c4e8862308d4 (mtd: spi: Switch to new SPI NOR framework) performs switch from previous 'spi_flash' infrastructure without proper testing/investigations which results in a regressions for SST26 flash series. Add missing SST26* flash IC protection ops which were introduced previously by Commit 3d4fed87a5fa (mtd: sf: Add support of sst26wf* flash ICs protection ops) Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
* clk: gate: support sandboxPeng Fan2019-07-311-0/+3
| | | | | | Introduce io_gate_val for sandbox clk gate test usage Signed-off-by: Peng Fan <peng.fan@nxp.com>
* clk: add composite clk supportPeng Fan2019-07-311-0/+22
| | | | | | Import clk composite clk support from Linux Kernel 5.1-rc5 Signed-off-by: Peng Fan <peng.fan@nxp.com>
* clk-provider: include clk-uclass.hPeng Fan2019-07-311-0/+1
| | | | | | Because clk-provider use clk_ops, so let's include clk-uclass.h Signed-off-by: Peng Fan <peng.fan@nxp.com>
* clk: fixed_rate: export clk_fixed_ratePeng Fan2019-07-311-0/+7
| | | | | | Export the structure for others to use. Signed-off-by: Peng Fan <peng.fan@nxp.com>
* clk: add clk-gate supportPeng Fan2019-07-311-0/+18
| | | | | | Import clk-gate support from Linux Kernel 5.1-rc5 Signed-off-by: Peng Fan <peng.fan@nxp.com>
* clk: export mux/divider opsPeng Fan2019-07-311-0/+5
| | | | | | Export mux/divider ops and divider_recalc_rate for composite usage Signed-off-by: Peng Fan <peng.fan@nxp.com>
* clk: mux: add set parent supportPeng Fan2019-07-311-0/+2
| | | | | | Add set parent support for clk mux Signed-off-by: Peng Fan <peng.fan@nxp.com>
* Merge branch '2019-07-26-ti-imports'Tom Rini2019-07-271-0/+11
|\ | | | | | | | | - Bring in the rest of the J271E platform - Various OMAP3/AM3517, DA850 fixes
| * firmware: ti_sci: Add a command for releasing all exclusive devicesLokesh Vutla2019-07-261-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Any host while requesting for a device can request for its exclusive access. If an exclusive permission is obtained then it is the host's responsibility to release the device before the software entity on the host completes its execution. Else any other host's request for the device will be nacked. So add a command that releases all the exclusive devices that is acquired by the current host. This should be used with utmost care and can be called only at the end of the execution. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
| * firmware: ti_sci: Add processor shutdown API methodAndreas Dannenberg2019-07-261-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Add and expose a new processor shutdown API that wraps the two TISCI messages involved in initiating a core shutdown. The API will first queue a message to have the DMSC wait for a certain processor boot status to happen followed by a message to trigger the actual shutdown- with both messages being sent without waiting or requesting for a response. Note that the processor shutdown API call will need to be followed up by user software placing the respective core into either WFE or WFI mode. Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
| * firmware: ti_sci: Allow for device shared and exclusive requestsLokesh Vutla2019-07-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Sysfw provides an option for requesting exclusive access for a device using the flags MSG_FLAG_DEVICE_EXCLUSIVE. If this flag is not used, the device is meant to be shared across hosts. Once a device is requested from a host with this flag set, any request to this device from a different host will be nacked by sysfw. Current tisci driver enables this flag for every device requests. But this may not be true for all the devices. So provide a separate commands in driver for exclusive and shared device requests. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
* | Merge tag 'u-boot-imx-20190719' of ↵Tom Rini2019-07-271-0/+132
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | https://gitlab.denx.de/u-boot/custodians/u-boot-imx u-boot-imx-20190719 - CCF for i.MX6 - nandbcb command to write SPL into NAND - Switch to DM (i.MX28) - Boards: Toradex, engicam, DH - Fixes for i.MX8 - Fixes for i.MX7ULP Travis: https://travis-ci.org/sbabic/u-boot-imx/builds/561147504
| * clk: sandbox: Adjust clk-mux.c to emulate reading divider value from HWLukasz Majewski2019-07-191-0/+4
| | | | | | | | | | | | | | | | | | | | | | The generic mux clock code for CCF requires reading the clock multiplexer value from HW registers. As sandbox by design has readl() as no-op it was necessary to provide this value in the other way. The new field in the mux structure (accessible only when sandbox is run) has been introduced for this purpose. Signed-off-by: Lukasz Majewski <lukma@denx.de>
| * clk: sandbox: Adjust clk-divider to emulate reading its value from HWLukasz Majewski2019-07-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | The generic divider clock code for CCF requires reading the divider value from HW registers. As sandbox by design has readl() as no-op it was necessary to provide this value in the other way. The new field in the divider structure (accessible only when sandbox is run) has been introduced for this purpose. Signed-off-by: Lukasz Majewski <lukma@denx.de>
| * clk: Port Linux common clock framework [CCF] for imx6q to U-boot (tag: v5.1.12)Lukasz Majewski2019-07-191-0/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch brings the files from Linux kernel (linux-stable/linux-5.1.y SHA1: 5752b50477da)to provide clocks support as it is used on the Linux kernel with Common Clock Framework [CCF] setup. The directory structure has been preserved. The ported code only supports reading information from PLL, MUX, Divider, etc and enabling/disabling the clocks USDHCx/ECSPIx depending on used bus. Moreover, it is agnostic to the alias numbering as the information about the clock is read from the device tree. One needs to pay attention to the comments indicating necessary for U-Boot's driver model changes. If needed, the code can be extended to support the "set" part of the clock management. Signed-off-by: Lukasz Majewski <lukma@denx.de>
| * clk: Introduce clk-provider.h to store Common Clock Framework's internalsLukasz Majewski2019-07-191-0/+16
| | | | | | | | | | | | | | This file now stores the dev_get_clk_ptr() wrapper on the dev_get_uclass_priv() function. Signed-off-by: Lukasz Majewski <lukma@denx.de>
* | clk: sifive: Sync-up WRPLL library with upstream LinuxAnup Patel2019-07-191-46/+24
| | | | | | | | | | | | | | | | | | Now that SiFive clock driver is merged in upstream Linux, we sync-up WRPLL library used by SiFive clock driver with upstream Linux sources. Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* | clk: sifive: Factor-out PLL library as separate moduleAnup Patel2019-07-191-0/+101
|/ | | | | | | | To match SiFive clock driver with latest Linux, we factor-out PLL library as separate module under drivers/clk/analogbits. Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* lib: Implement strndup()Thierry Reding2019-06-051-0/+1
| | | | | Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com>
* mpc83xx: Introduce ARCH_MPC836*Mario Six2019-05-201-1/+1
| | | | | | Replace CONFIG_MPC836* with proper CONFIG_ARCH_MPC836* Kconfig options. Signed-off-by: Mario Six <mario.six@gdsys.cc>
* mpc83xx: Introduce ARCH_MPC832*Mario Six2019-05-201-1/+1
| | | | | | Replace CONFIG_MPC832* with proper CONFIG_ARCH_MPC832* Kconfig options. Signed-off-by: Mario Six <mario.six@gdsys.cc>
* mpc83xx: Introduce ARCH_MPC830*Mario Six2019-05-201-1/+1
| | | | | | Replace CONFIG_MPC830* with proper CONFIG_ARCH_MPC830* Kconfig options. Signed-off-by: Mario Six <mario.six@gdsys.cc>
* lib: add Zstandard decompression supportMarek Behún2019-05-051-0/+1147
| | | | | | | | | Add the zstd library from Linux kernel (only decompression support). There are minimal changes to build with U-Boot, otherwise the files are identical to Linux commit dc35da16 from March 2018, the files had not been touched since in kernel. Also SPDX lincese tags were added. Signed-off-by: Marek Behún <marek.behun@nic.cz>
* lib: Add xxhash supportMarek Behún2019-05-051-0/+229
| | | | | | | | | | This adds the xxhash support from Linux. Files are almost identical to those added to Linux in commit 5d240522 ("lib: Add xxhash module") (they haven't been touched since in Linux). The only difference is to add some includes to be compatible with U-Boot. Also SPDX lincese tags were added. Signed-off-by: Marek Behún <marek.behun@nic.cz>
* firmware: ti_sci: Modify auth_boot TI-SCI API to match new versionAndrew F. Davis2019-04-261-2/+2
| | | | | | | | | SYSFW version 2019.01 introduces a slightly modified version of this API, add support for it here. Signed-off-by: Andrew F. Davis <afd@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Andreas Dannenberg <dannenberg@ti.com>
* firmware: ti_sci: Add support for firewall managementAndrew F. Davis2019-04-261-0/+64
| | | | | | | | | | | | TI-SCI message protocol provides support for controlling the firewall configurations available in SoC. Introduce support for the set of TI-SCI message protocol APIs that provide us with this capability of controlling firewalls. Signed-off-by: Andrew F. Davis <afd@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Andreas Dannenberg <dannenberg@ti.com>
* compat linux: import completion from linux 4.18Philippe Reynes2019-04-221-0/+173
| | | | | | | | This patch port the file include/linux/completion.h from linux 4.18 to u-boot. It define the structure but all the function are stubbed. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
* include: linux: io: define devm_ioremap on board with ioremapPhilippe Reynes2019-04-221-1/+1
| | | | | | | | | | The macro devm_ioremap is only defined for configuration that doesn't have ioremap. But this macro may also be defined on configuration with ioremap. This patch remove the condition for the macro devm_ioremap, so it's always defined. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
* mtd: nand: provide several helpers to do common NAND operationsBoris Brezillon2019-04-221-0/+30
| | | | | | | | | | | | | | | | | | | | | Linux commit 97d90da8a88 ("mtd: nand: provide several helpers to do common NAND operations") This is part of the process of removing direct calls to ->cmdfunc() outside of the core in order to introduce a better interface to execute NAND operations. Here we provide several helpers and make use of them to remove all direct calls to ->cmdfunc(). This way, we can easily modify those helpers to make use of the new ->exec_op() interface when available. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> [miquel.raynal@free-electrons.com: rebased and fixed some conflicts] Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com> Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com> [Philippe Reynes: adapt code to u-boot and only keep new function] Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
* mtd: nand: import nand_hw_control_init()Marc Gonzalez2019-04-221-0/+7
| | | | | | | | | | | | | Linux commit d45bc58dd3b ("mtd: nand: import nand_hw_control_init()") The code to initialize a struct nand_hw_control is duplicated across several drivers. Factorize it using an inline function. Signed-off-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> [Philippe Reynes: adapt code to u-boot and only keep new function] Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
* mtd: add get/set of_node/flash_node helpersBrian Norris2019-04-221-0/+12
| | | | | | | | | | | | | | | | Linux commit 28b8b26b308 ("mtd: add get/set of_node/flash_node helpers") We are going to begin using the mtd->dev.of_node field for MTD device nodes, so let's add helpers for it. Also, we'll be making some conversions on spi_nor (and nand_chip eventually) too, so get that ready with their own helpers. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com> [Philippe Reynes: only add function nand_set_flash_node and nand_get_flash_node because others were already backported] Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
* Merge branch 'master' of git://git.denx.de/u-boot-spiTom Rini2019-04-141-1/+1
|\ | | | | | | | | | | | | | | | | Conflicts: arch/arm/dts/armada-385-amc.dts arch/arm/dts/armada-xp-theadorable.dts arch/arm/dts/stm32mp157c-ev1-u-boot.dtsi Signed-off-by: Tom Rini <trini@konsulko.com>
| * mtd: fix mtd_oobavail() incoherent returned valueMiquel Raynal2019-04-121-1/+1
| | | | | | | | | | | | | | | | mtd_oobavail() returns either mtd->oovabail or mtd->oobsize. Both values are unsigned 32-bit entities, so there is no reason to pretend returning a signed one. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
* | firmware: Add support for querying msmc memoryLokesh Vutla2019-04-121-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | DMSC can use certain amount of msmc memory available in the system. Also certain part of msmc memory can be marked as L3 cache using board config. But users might not know what size is being used and the remaining available msmc memory. In order to fix this TISCI protocol provides a messages that can query the available msmc memory in the system. Add support for this message. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
* | dma: ti: add driver to K3 UDMAVignesh R2019-04-111-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The UDMA-P is intended to perform similar (but significantly upgraded) functions as the packet-oriented DMA used on previous SoC devices. The UDMA-P module supports the transmission and reception of various packet types. The UDMA-P also supports acting as both a UTC and UDMA-C for its internal channels. Channels in the UDMA-P can be configured to be either Packet-Based or Third-Party channels on a channel by channel basis. The initial driver supports: - MEM_TO_MEM (TR mode) - DEV_TO_MEM (Packet mode) - MEM_TO_DEV (Packet mode) Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: Vignesh R <vigneshr@ti.com>