summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* clk: at91: update to PMC bindingsSam Ravnborg2019-02-252-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on kernel 5.0-rc6 update at91 clk support to match the new PMC bindings. Manually added all changes done in the kernel from 4.9-rc3 to 5.0-rc6. New drivers required was added as seperate commits. This includes dt-compat code required to support at91sam5d3, as this is not yet ported to use the new PMC bindings. clk-programmable saw some extra changes - it had never been bulit. It is used only by at91sama5d2 - and barebox has no board support for this cpu (yet). The CONFIG_SOC symbols is used to select the relevant drivers. CONFIG_SOC_SAM9 selects several drivers, and in the future this can be split to keep the image size down. In the kernel CLK_OF_DECLARE_DRIVER() can be used for a two step init. In barebox this is a simple one step init. It was added to have less differences between the kernel and the barebox versions of the drivers. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Tested-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* regmap: Implement syscon_regmap_lookup_by_compatible()Ahmad Fatoum2019-02-251-0/+5
| | | | | | | | | Implement syscon_regmap_lookup_by_compatible() to simplify porting kernel code. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Tested-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/pci'Sascha Hauer2019-02-131-10/+2
|\
| * PCI: Consify pci_ops in struct pci_controllerAndrey Smirnov2019-01-161-1/+1
| | | | | | | | | | | | Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * PCI: Convert ->res_start() to return resource_size_tAndrey Smirnov2019-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | On 64-bit machines int doesn't cover full address space, so convert .res_start to both accept resource_size_t as a parameter and return it as result. Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * PCI: Drop "rom_address" from struct pci_devAndrey Smirnov2019-01-161-1/+0
| | | | | | | | | | | | | | | | This field is not being used in Barebox. Drop it. Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * PCI: Drop "ops" from struct pci_busAndrey Smirnov2019-01-161-2/+0
| | | | | | | | | | | | | | | | | | Drop "ops" from struct pci_bus, since the same struct can be accessed via host->pci_ops. No functional change intended. Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * PCI: Drop "name" from struct pci_busAndrey Smirnov2019-01-161-2/+0
| | | | | | | | | | | | | | | | | | This field is not used by Barebox. Remove it. No functional change intended. Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * PCI: Drop "resources" from struct pci_busAndrey Smirnov2019-01-161-1/+0
| | | | | | | | | | | | | | | | | | This field is not used by Barebox. Remove it. No functional change intended. Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * PCI: Drop "slots" from struct pci_busAndrey Smirnov2019-01-161-1/+0
| | | | | | | | | | | | | | | | | | This field is not used by Barebox. Remove it. No functional change intended. Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * PCI: Make pci_scan_bus staticAndrey Smirnov2019-01-161-1/+0
| | | | | | | | | | | | | | | | | | Pci_scan_bus is not used anyhwere outside pci.c. Mark in static to reflect that. No functional change intended. Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/mmc-esdhc'Sascha Hauer2019-02-131-0/+48
|\ \
| * | mci: imx-esdhc: move platform_dataSascha Hauer2019-02-061-0/+48
| | | | | | | | | | | | | | | | | | | | | move platform_data from mach-imx/include/mach/ to include/platform_data where it's available for other architectures aswell. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/misc'Sascha Hauer2019-02-133-0/+5
|\ \ \
| * | | net: Phy: Update phy interface modes from LinuxSascha Hauer2019-02-061-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This syncs the phy interface modes with Linux and adds names that were previously missing. With this we no longer have holes in the phy mode name arrays and thus of_get_phy_mode no longer derefences NULL pointers when it finds such a hole. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mtd: peb: Add function to skip bad blocksSascha Hauer2019-01-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a function that given a pointer to a PEB number increases the number until the corresponding PEB is good. It also checks for the PEB number being inside the mtd device. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | move umode_t typedef from asm/types.h to linux/types.hAntony Pavlov2019-01-181-0/+1
| | |/ | |/| | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/lseek'Sascha Hauer2019-02-132-8/+3
|\ \ \
| * | | fs: let truncate take a loff_t argumentSascha Hauer2019-02-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | loff_t is the correct type for file sizes. Use it to allow to truncate to sizes bigger than 32bit. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | fs: devfs: Change .lseek callbacks to return 'int'Andrey Smirnov2019-02-042-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Returning requested offset from .lseek() callback doesn't really give us any new information while bringing unnecessary complications. Change all .lseek() types (both in struct struct cdev_operations and in struct fs_driver_d) to return 'int' and adjust the rest of the codebase accordingly. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | devfs: Drop dev_lseek_default()Andrey Smirnov2019-01-291-5/+0
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only the following cdevs do not declare an .lseek() operation: - Console devices in common/console.c - Firmware framework in common/firmware.c - JTAG driver in drivers/misc/jtag.c - UBI in drivers/mtd/ubi/barebox.c Of those four, first two are marked DEVFS_IS_CHARACTER_DEV and implement only .write() operation and the last two don't implement anything but .ioctl(). While there's probably no meaningful way to use lseek() against any of those devices, there doesn't seem to be any harm in allowing it either. Change devfs_lseek() to ignore absense of .lseek() callback and drop dev_lseek_default() and all references to it in the codebase. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/kbuild'Sascha Hauer2019-02-131-16/+37
|\ \ \
| * | | kconfig.h: update to v4.16-rc2Masahiro Yamada2019-01-221-16/+37
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | I intentionally copied this from a little bit old kernel version because Barebox cannot import commit 101110f6271c ("Kbuild: always define endianess in kconfig.h"). Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/imx'Sascha Hauer2019-02-134-3/+186
|\ \ \
| * | | include: Import dt-bindings/reset/imx8mq-reset.hAndrey Smirnov2019-02-111-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Import dt-bindings/reset/imx8mq-reset.h from Liunx kernel until that file trickles down into dts/include/. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | reset: Constify "ops" in struct reset_controller_devAndrey Smirnov2019-02-111-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | drivers: base: Port power management code from LinuxAndrey Smirnov2019-01-181-0/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Port an extremely abridged version of power management/power domain code from Linux as a dependency of i.MX7D PCIe work. Currenlty only bare minimum of functionality is implemented. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | regulator: Add support for setting regulator's voltageAndrey Smirnov2019-01-181-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add code needed to implement regulator_set_voltage(). Currently only bare minmum needed for ANATOP driver (added in follow up commit) is supported. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | regulator: Port basic regmap regulator functionsAndrey Smirnov2019-01-181-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to be able to port Linux driver relying on this API, port various regmap related regulator function to Barebox. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | regulator: Convert drivers to use struct regulator_descAndrey Smirnov2019-01-181-1/+5
| | |/ | |/| | | | | | | | | | | | | | | | | | | To simplify porting kernel code, port a very basic struct regulator_desc and convert all of the code to use it. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/e1000'Sascha Hauer2019-02-132-0/+64
|\ \ \
| * | | include: Import io-64-nonatomic-*.h from LinuxAndrey Smirnov2019-02-112-0/+64
| | |/ | |/| | | | | | | | | | | | | | | | | | | Import io-64-nonatomic-*.h from Linux to be able to use various non-atomic 64-bit I/O accessors. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/digest'Sascha Hauer2019-02-132-1/+3
|\ \ \
| * | | crypto: digest: Change the signature of digest_file_window()Andrey Smirnov2019-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On 32-bit systems "ulong" will limit digest_file_window()'s maximum size to 4 GiB. Convert "start" and "size" to "loff_t" in order to be able to handle maximum file size supported by the rest of the system. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | treewide: Introduce MAP_FAILED and replace ad-hoc constants with itAndrey Smirnov2019-01-161-0/+2
| | |/ | |/| | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | drivers: of: Add function to enable and register a device by aliasTeresa Remmet2019-02-131-0/+8
| |/ |/| | | | | | | | | | | | | In some cases node names are not unique and passing the full path is really long. So make add a new device by passing the alias string possible. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Revert "mtd: nand: Kill the chip->scan_bbt() hook"Sascha Hauer2019-01-211-1/+4
|/ | | | This reverts commit 95ce69795506293eae28d6e64055d2c7ae27f164.
* Merge branch 'for-next/mtd'Sascha Hauer2019-01-153-19/+6
|\
| * mtd: nand: Kill cellinfoLadislav Michl2018-12-171-2/+1
| | | | | | | | | | | | | | | | | | The only information used from cellinfo field is whenever flash is SLC or MLC, therefore eliminate it completely. This patch is based on Linux commit 7db906b79f69. Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mtd: nand: Kill the chip->scan_bbt() hookLadislav Michl2018-12-171-4/+1
| | | | | | | | | | | | | | | | | | | | | | Linux commit e80eba758151 adapted for Barebox: None of the existing drivers are overloading the ->scan_bbt() method, let's get rid of it and replace calls to ->scan_bbt() by nand_create_bbt() ones. Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mtd: nand_bbt: make nand_scan_bbt() staticLadislav Michl2018-12-141-1/+0
| | | | | | | | | | | | | | | | | | Linux commit 17799359e7b adapted for Barebox: This implementation detail is no longer needed outside of nand_bbt.c. Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mtd: nand_bbt: kill NAND_BBT_SCANALLPAGESLadislav Michl2018-12-141-2/+0
| | | | | | | | | | | | | | | | | | | | Linux commit 5961ad2cb4dd adapted for Barebox: Now that the last user of NAND_BBT_SCANALLPAGES has been removed, let's kill this peculiar BBT feature flag. Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mtd: nand: simplify nand_bch_init() usageLadislav Michl2018-12-141-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Linux commit a8c65d504e0b modified for Barebox: nand_bch_init() requires several arguments which could directly be deduced from the mtd device. Get rid of those useless parameters. nand_bch_init() is also requiring the caller to provide a proper eccbytes value, while this value could be deduced from the ecc.size and ecc.strength value. Fallback to eccbytes calculation when it is set to 0. Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mtd: nand: remove NAND_BBT_SCANEMPTYLadislav Michl2018-12-141-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Relevant part of Linux commit dad2256269cb: NAND_BBT_SCANEMPTY is a strange, badly-supported option with omap as its single remaining user. NAND_BBT_SCANEMPTY was likely used by accident in omap2[1]. And anyway, omap2 doesn't scan the chip for bad blocks (courtesy of NAND_SKIP_BBTSCAN), and so its use of this option is irrelevant. This patch drops the NAND_BBT_SCANEMPTY option. [1] http://lists.infradead.org/pipermail/linux-mtd/2012-July/042902.html Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mtd: nand: hide in-memory BBT implementation detailsLadislav Michl2018-12-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Linux commit b32843b772db adapted for Barebox: nand_base.c shouldn't have to know the implementation details of nand_bbt's in-memory BBT. Specifically, nand_base shouldn't perform the bit masking and shifting to isolate a BBT entry. Instead, just move some of the BBT code into a new nand_markbad_bbt() interface. This interface allows external users (i.e., nand_base) to mark a single block as bad in the BBT. Then nand_bbt will take care of modifying the in-memory BBT and updating the flash-based BBT (if applicable). Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2019-01-153-1/+8
|\ \
| * | printk: Pass groupsize to memory_display() in print_hex_dump()Andrey Smirnov2019-01-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Don't hardcode grouping data into 4-byte words in print_hex_dump() implementation and instead pass 'groupsize' to memory_display(), since that's what that parameter is for. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | Add generic implementation for muldi3Martin Hofmann2019-01-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since version v2018.08.0 some shared copies of gcc routines got added to barebox so that archs don't need to have their own copy inside their lib. The arch I am working on atm also needs support for muldi3 which is not present as a generic version right now. This patch adds the generic version from latest linux v4.20 to barebox and lets the archs select it in their Kconfig so they don't need to provide it themself. Signed-off-by: Martin Hofmann <martin.hofmann_at_mni.thm.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | include/linux/time.h: define USEC_PER_SEC and friendsAhmad Fatoum2018-12-171-0/+6
| |/ | | | | | | | | | | | | | | Linux has them in include/linux/time64.h and they are useful for making (especially microsecond) use readable such as in read*_poll_timeout. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>