summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* clk: socfpga: add arria10 clk driversSteffen Trumtrar2017-05-036-1/+572
| | | | | | | | | | | Arria10 has a (slightly) different clock controller than the Cyclone5. Add new drivers for it. This driver only reads out the setup and builds the clocktree, it does not setup any clocks. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: designware: add dwmac-3.72a compatibleSteffen Trumtrar2017-05-031-0/+3
| | | | | | | This compatible will be needed for Arria10. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* clk: socfpga: move driver to subdirectorySteffen Trumtrar2017-05-033-1/+2
| | | | | | | Prepare for Arria10 clock driver. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: socfpga: rename socfpga->cyclone5Steffen Trumtrar2017-05-031-4/+4
| | | | | | | | Prepare the SoCFPGA code base for different system types (Arria10, Stratix10,...). Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* HAB: don't reference unused HAB opsLucas Stach2017-04-261-2/+2
| | | | | Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: nand_omap_gpmc: fix BCH error correctionMatt Reimer2017-04-191-1/+2
| | | | | | | | | | | | | | | | | | | BCH error detection and correction was only looking at the first of four syndrome polynomials, which meant it was failing to detect and correct bitflips in the last 3/4 of the data. In effect, only the first 512 bytes of a 2048 byte page were being protected by ECC. The syndrome polynomials (BCH error codes) are stored in the NAND's OOB, each of which protects 512 bytes of data. The driver used eccsteps = 1 which effectively made it only use the first polynomial, and therefore was only protecting the first 512 bytes of the page. The fix is to pull over a bit of code from the kernel's omap_correct_data() that sets eccsteps = 4 when the page size is 2048 bytes and hardware ECC is being used. Signed-off-by: Matt Reimer <mreimer@sdgsystems.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: of: only add partition layout param when GLOBAL support is enabledLucas Stach2017-04-191-3/+5
| | | | | | Fixes: a2fa18f9f483 (mtd: of: Make used partition binding configurable) Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/tegra'Sascha Hauer2017-04-075-0/+89
|\
| * add driver for Tegra124 memory controllerLucas Stach2017-03-305-0/+89
| | | | | | | | | | | | | | | | This driver performs the required initialization to get the GPU into a functional state, so it can be used when the OS is running. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/state'Sascha Hauer2017-04-071-0/+6
|\ \
| * | state: Do not load state during state_new_from_nodeSascha Hauer2017-03-311-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | The caller of state_new_from_node() may have it's own ideas what to do when loading the state fails, so do not load it in the initialization function, but instead let the caller do it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/ofpart'Sascha Hauer2017-04-0710-77/+318
|\| |
| * | of: of_path: add of_find_node_by_devpath()Sascha Hauer2017-03-311-0/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We already have of_find_path_by_node() which finds a device path for a given device node. This is used by the state framework to find its backend path. This path has to be translated back to a device node when Linux is started. The current approach turned out to be too simple: We assumed that the node path is the same in the tree Linux is started with. This is not true in several cases: - partition nodes should have the name "partition@<offset>", but in several trees they have "partition@<num>" - There are two different partition bindings: The legacy binding and the new one with an additional partitions subnode which has a compatible = "fixed-partitions" property. The node path only stays the same when the internal tree uses the same bindings and node names as the tree Linux is started with. To overcome this limitation we create of_find_node_by_devpath() which converts the device path back to a device node. It does so by finding the device node of the hardware device rather than the partition node. It then parses over the partitions in this device node with the known bindings looking for a partition which matches in offset and size to the barebox partition. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | of: partition: Register the of partition fixup for of partition usersSascha Hauer2017-03-313-1/+6
| | | | | | | | | | | | | | | | | | | | | at24, at25 and mci core are using of_parse_partitions(). Register the fixup for them aswell. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | of: partitions: flag partitions from a partition tableSascha Hauer2017-03-311-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | We are going to call the of_partition_fixup for regular block devices like MMC/SD aswell. Add a flag to partitions indicating they are instanciated from a on-disk partition table so that they won't be added as device tree partitions during fixup. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | of: partition: only create partition node when partitions existSascha Hauer2017-03-311-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | With the legacy partition binding we did not modify the device node when no partition exist, but with the new binding we would create the "partitions" node with compatible = "fixed-partitions". Prevent that by catching the absence of partitions early. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | fs: devfs-core: replace DEVFS_IS_PARTITION flag with pointer to the master cdevSascha Hauer2017-03-312-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | Instead of having a flag indicating a cdev is a partition on some master cdev, just add a master pointer to the cdev, so that we can also find out who the master is. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | of: partition: Make partition fixup independent from mtd devicesSascha Hauer2017-03-311-18/+27
| | | | | | | | | | | | | | | | | | | | | | | | The of partition parser is not only used for mtd device, but also for regular block devices, so make the of_mtd_fixup code independent of mtd devices also, so that other devices can be fixed up, too. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | of: partition: support 64bit partition sizesSascha Hauer2017-03-301-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | Do not assume that #address-cells and #size-cells are both 1. Parse them appropriately to support devices > 4GuB. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: of: Make used partition binding configurableSascha Hauer2017-03-301-7/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far we used the legacy partition binding when fixing up the mtd partition nodes. Change this to default to the new binding with a "partitions" submode. Make this behaviour configurable though: This creates a new of_binding device variable for mtd devices. This can be set to: - "new": Use the new partition binding (default) - "legacy": Use the old partition binding - "donttouch": Do not touch the partition node Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | of: partition: Move of_mtd_fixup to drivers/of/Sascha Hauer2017-03-302-62/+72
| | | | | | | | | | | | | | | | | | | | | | | | Move the fixup code where the parser code is already. Since the code will not only be used for mtd in the future drivers/of/ is a better place than drivers/mtd/. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | treewide: Use of_property_write_string() where appropriateSascha Hauer2017-03-302-9/+5
| | | | | | | | | | | | | | | | | | | | | Replace users which use of_set_property() to set a property to a string with of_property_write_string(). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | of: Add of_property_write_string()Sascha Hauer2017-03-301-0/+22
| |/ | | | | | | | | | | | | Setting a property to a string is used many times. Create a convenience function for it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/nvmem'Sascha Hauer2017-04-076-0/+909
|\ \
| * | nvmem: add snvs_lpgpr for freescale imx6Steffen Trumtrar2017-03-303-0/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | SNVS LPGPR is Non Volatile Low Power Generic Purpose Register which can be used as part of nvmem framework. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | drivers: add nvmem framework from kernelSteffen Trumtrar2017-03-305-0/+780
| |/ | | | | | | | | | | | | | | | | | | Add the nvmem framework from Linux. Based on the v4.4-rc3 version. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/net'Sascha Hauer2017-04-071-0/+126
|\ \
| * | net/phy: marvell: import support for 88E1111 from the LinuxPeter Mamonov2017-03-301-0/+126
| |/ | | | | | | | | Signed-off-by: Peter Mamonov <pmamonov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/mtd'Sascha Hauer2017-04-071-1/+3
|\ \
| * | mtd: when creating bitflips the offset has to be page alignedSascha Hauer2017-03-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | mtd_peb_create_bitflips() assumes the offset is page aligned. Enforce this and in the nand_bitlfip command print a warning if it's not aligned. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: create bitflips in the correct pageSascha Hauer2017-03-301-1/+1
| |/ | | | | | | | | | | | | | | In mtd_peb_create_bitflips() buf always points to the first page in a block. If we want to create bitflips in other pages we have to add the offset into the block. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2017-04-0713-18/+261
|\ \
| * | usb: gadget: set otg to peripheral mode on autostartOleksij Rempel2017-04-061-0/+3
| | | | | | | | | | | | | | | | | | | | | we won't be able to start if otg is not properly configured. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | watchdog: new driver for Armada XPUwe Kleine-König2017-03-313-0/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This SoC uses a variant of the IP that is also used on most other Marvell SoCs. For now it only supports Armada XP but the naming is already chosen such that adding support for further SoCs doesn't result in much renaming. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | clocksource: mvebu: don't request the used iomem resourceUwe Kleine-König2017-03-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The register ranges of the device nodes timer@20300 and watchdog@20300 overlap, so it is impossible that both devices properly use request_iomem_region (e.g. by using dev_request_mem_resource). In Linux only the watchdog driver is registered in /proc/iomem, do the same for barebox. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: gadget: start usbgadget automaticallyOleksij Rempel2017-03-313-0/+79
| | | | | | | | | | | | | | | | | | | | | ... if global variable configured to do it. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | video: edid.c: fix "no previous prototype" warningAntony Pavlov2017-03-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch fixes this compiler's warning: drivers/video/edid.c:390:5: warning: no previous prototype for 'fb_get_mode' [-Wmissing-prototypes] int fb_get_mode(int flags, u32 val, struct fb_videomode *var) ^ Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: phy: mdio-gpio.c: fix "no previous prototype" warningAntony Pavlov2017-03-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch fixes this compiler's warning: drivers/net/phy/mdio-gpio.c:48:24: warning: no previous prototype for 'mdio_gpio_of_get_info' [-Wmissing-prototypes] struct mdio_gpio_info *mdio_gpio_of_get_info(struct device_d *dev) ^ Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ata: ide-sff: add LBA48 supportAntony Pavlov2017-03-302-11/+46
| | | | | | | | | | | | | | | | | | | | | See http://wiki.osdev.org/ATA_PIO_Mode#48_bit_PIO for details. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | clk: No-op CLK_OF_DECLARE if not enabledAndrey Smirnov2017-03-302-4/+0
| |/ | | | | | | | | | | | | | | | | Instead of wrapping each defenition of CLK_OF_DECLARE hook with preprocessor guards, change the definition of CLK_OF_DECLARE to expand into no-op if COMMON_CLK_OF_PROVIDER is not enabled. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/mips'Sascha Hauer2017-04-071-3/+3
|\ \
| * | clk: clk-gate-shared: fix "no previous prototype" warningAntony Pavlov2017-03-301-3/+3
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | The patch fixes these compiler's warnings: drivers/clk/clk-gate-shared.c:72:13: warning: no previous prototype for 'clk_gate_shared_alloc' [-Wmissing-prototypes] struct clk *clk_gate_shared_alloc(const char *name, const char *parent, const char *companion, ^ drivers/clk/clk-gate-shared.c:89:6: warning: no previous prototype for 'clk_gate_shared_free' [-Wmissing-prototypes] void clk_gate_shared_free(struct clk *clk) ^ Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/led'Sascha Hauer2017-04-073-60/+199
|\ \
| * | led-trigger: Allow multiple led triggers of the same typeSascha Hauer2017-03-301-28/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to have a static array of trigger types which, allows only one led per trigger. While this is enough for panic and heartbeat, it falls short when multiple leds are associated to the default-on trigger. The default-on trigger is used to turn on a led statically from devicetree and may be used multiple times. This patch reworks the led triggers so that a trigger struct is allocated dynamically when needed and put onto a list. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | led: trigger: Use led triggersSascha Hauer2017-03-301-35/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Since the LED framework now supports blinking/flashing, use this functionality in the LED triggers. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | led: add blinking/flashing and led_blink_pattern interfaceSascha Hauer2017-03-302-1/+101
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far blinking/flashing LEDs is only supported on led-trigger level. Even without triggers it useful to be able to blink/flash LEDs, so add this functionality to the LED core. A led_blink_pattern consists of a number of on and off-periods which are described in an array. Using such an array you can encode nearly every blink pattern you need. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/imx'Sascha Hauer2017-04-073-4/+361
|\ \
| * | i.MX: hab: Add HAB fusebox related convenience functions / commandSascha Hauer2017-04-042-0/+359
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Secure boot with HAB requires handling of the super root key hash and actually locking down the device. The related information is stored in the i.MX fusebox device (IIM on older SoCs, OCOTP on newer SoCs). This patch adds several convenience functions to store and read the super root key hash and to lock down a SoC. Also we add a command to do this from the command line. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | video: ipu: register framebuffer, even when no modes are foundSascha Hauer2017-04-031-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | When no monitor is connected it might be normal that no modes are found. Do not bail out with an error in this case, which gives an ugly error message, but instead still register the framebuffer. This gives the user a chance to examine it and see that the framebuffer has no modes. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | video: ipu: convert "failed to get modes" message to dev_dbgSascha Hauer2017-04-031-1/+1
| |/ | | | | | | | | | | | | | | When no monitor is connected the it's normal for some outputs that no modes can be found. Convert dev_err to dev_dbg to decrease the visibility of this message. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>