summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* ns16550: Improve debug UART so it can work with 32-bit accessSimon Glass2015-07-211-15/+21
| | | | | | | Since Rockchip requires 32-bit serial access, add this to the driver. Refactor a little to make this easier. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: spi: Make local functions staticSimon Glass2015-07-211-4/+4
| | | | | | Several functions in this file should be marked as static. Update them. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: Add support for RAM driversSimon Glass2015-07-215-0/+56
| | | | | | | | Add support for a driver which sets up DRAM and can return information about the amount of RAM available. This is a first step towards moving RAM init to driver model. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: pmic: Add functions to adjust PMIC registersSimon Glass2015-07-211-0/+32
| | | | | | | | | It is a common requirement to update some PMIC registers. Provide some simple convenience functions to do this. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Przemyslaw Marczak <p.marczak@samsung.com> Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
* dm: power: Use debug() for errors in regulator uclassSimon Glass2015-07-211-1/+1
| | | | | | | | | To reduce unnecessary code size in an uncommon code path, use debug() where possible(). The driver returns an error which indicates failure. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Przemyslaw Marczak <p.marczak@samsung.com> Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
* dm: power: Add a function to set up all regulatorsSimon Glass2015-07-211-0/+22
| | | | | | | | | The device tree provides information about which regulators should be on at boot, or always on. Use this to set them up automatically. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Przemyslaw Marczak <p.marczak@samsung.com> Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
* dm: pmic: Split output from functionSimon Glass2015-07-211-63/+35
| | | | | | | | | | | | | | | The regulator_autoset() function mixes printf() output and PMIC adjustment code. It provides a boolean to control the output. It is better to avoid missing logic and output, and this permits a smaller SPL code size. So split the output into a separate function. Also rename the function to have a by_name() suffix, since we would like to be able to pass a device when we know it, and thus avoid the name search. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Przemyslaw Marczak <p.marczak@samsung.com> Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
* dm: power: Add regulator flags to centralise auto-set logicSimon Glass2015-07-211-0/+12
| | | | | | | | | Decide when the regulator is set up whether we want to auto-set the voltage or current. This avoids the complex logic spilling into the processing code. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Przemyslaw Marczak <p.marczak@samsung.com> Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
* dm: power: Avoid case-insensitve match for child namesSimon Glass2015-07-211-1/+1
| | | | | | | | | | This is not user input (i.e. from the command line). It should be possible to get the case correct and avoid the case-insensitive match. This will help avoid sloppy device tree setups. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Przemyslaw Marczak <p.marczak@samsung.com> Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
* mmc: Add debug() output on read errorsSimon Glass2015-07-211-2/+6
| | | | | | Allow read errors to be diagnosed more easily. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: mmc: Add an MMC uclassSimon Glass2015-07-214-0/+48
| | | | | | | Add basic support for MMC, providing a uclass which can set up an MMC device. This allows MMC drivers to move to using driver model. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: led: Add a driver for GPIO-controlled LEDsSimon Glass2015-07-213-0/+111
| | | | | | | Add a simple driver which allows use of LEDs attached to GPIOs. The linux device tree binding is used. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: Add support for LEDsSimon Glass2015-07-215-0/+76
| | | | | | | | | Add a simple uclass for LEDs, so that these can be controlled by the device tree and activated when needed. LEDs are referred to by their label. This implementation requires a driver for each type of LED (e.g GPIO, I2C). Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: Add support for generic system controllers (syscon)Simon Glass2015-07-212-0/+74
| | | | | | | | | | | Many SoCs have a number of system controllers which are dealt with as a group by a single driver. It is a pain to have to add lots of compatible strings and/or separate drivers for each. Instead we can identify the controllers by a number and request the address of the one we want. Add a simple implementation of this which can be used by SoC driver code. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: Add support for register maps (regmap)Simon Glass2015-07-212-0/+87
| | | | | | | | | | | Add a simple implementaton of register maps, supporting only direct I/O for now. This can be enhanced later to support buses which have registers, such as I2C, SPI and PCI. It allows drivers which can operate with multiple buses to avoid dealing with the particulars of register access on that bus. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: gpio: Add dm_gpio_request() to manually request a GPIOSimon Glass2015-07-211-1/+1
| | | | | | | This function can be used for testing to manually request a GPIO for use, without resorting to the legacy GPIO API. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: gpio: Add dm_gpio_lookup_name() to look up a GPIO nameSimon Glass2015-07-211-8/+26
| | | | | | | Provide a driver-model function to look up a GPIO name. Make the standard function use it. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: gpio: Allow GPIO uclass to be used in SPLSimon Glass2015-07-211-4/+0
| | | | | | | Now that we support driver model in SPL, allow GPIO drivers to be used there also. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: core: Correct device_get_child_by_of_offset() parameterSimon Glass2015-07-211-2/+2
| | | | | | This parameter is named 'seq' but should be named 'of_offset'. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: core: Add a function to find any device from device treeSimon Glass2015-07-211-0/+25
| | | | | | | | | | | | In some rare cases it is useful to be able to locate a device given a device tree node offset. An example is when you have an alias that points to a node and you want to find the associated device. The device may be SPI, MMC or something else, but you don't need to know the uclass to find it. Add a function to do a global search for a device, given its device tree offset. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: core: Use debug() instead of printf() for failuresSimon Glass2015-07-211-3/+3
| | | | | | | | To avoid bloating SPL code, use debug() where possible in the driver model core code. The error code is already returned, and can be investigated as needed. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: Move the tree/uclass dump code into its own fileSimon Glass2015-07-212-0/+97
| | | | | | | | | | In SPL it is sometimes useful to be able to obtain a dump of the current driver model state. Since commands are not available, provide a way to directly call the functions to output this information. Adjust the existing commands to use these functions. Signed-off-by: Simon Glass <sjg@chromium.org>
* Merge branch 'master' of git://git.denx.de/u-boot-fsl-qoriqTom Rini2015-07-2010-185/+266
|\
| * driver/ldpaa_eth:Avoid infinite loop in ldpaa_eth_rxPrabhakar Kushwaha2015-07-201-1/+8
| | | | | | | | | | | | | | | | Change infinite loop mechanism to timer based polling for QBMAN release in ldpaa_eth_rx. Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com> Reviewed-by: York Sun <yorksun@freescale.com>
| * driver/ldpaa_eth: Avoid TX conf framesPrabhakar Kushwaha2015-07-202-111/+4
| | | | | | | | | | | | | | | | | | | | | | Polling of TX conf frames is not a mandatory option. Packets can be transferred via WRIOP without TX conf frame. Configure ldpaa_eth driver to use TX path without confirmation frame Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: York Sun <yorksun@freescale.com>
| * driver/ldpaa_eth: Add timeout handling DQRR entry readPrabhakar Kushwaha2015-07-201-14/+22
| | | | | | | | | | | | | | | | | | | | | | Volatile command does not return frame immidiately, need to wait till a frame is available in DQRR. Ideally it should be a blocking call. Add timeout handling for DQRR frame instead of retry counter. Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: York Sun <yorksun@freescale.com>
| * driver/ldpaa_eth: Retry enqueue if portal was busyPrabhakar Kushwaha2015-07-201-2/+30
| | | | | | | | | | | | | | | | | | | | | | Do not immediately return if the enqueue function returns -EBUSY; re-try mulitple times. if timeout occures, release the buffer. Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: York Sun <yorksun@freescale.com>
| * armv8/fsl-lsch3: device tree fixups for PCI stream IDsStuart Yoder2015-07-201-0/+62
| | | | | | | | | | | | | | | | | | | | | | This patch adds the infrastructure to update device tree nodes to convey SMMU stream IDs in the device tree. Fixups are implemented for PCI controllers initially. Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com> Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com> Reviewed-by: York Sun <yorksun@freescale.com>
| * drivers/fsl-mc: dynamically create ICID pool in DPCStuart Yoder2015-07-201-0/+36
| | | | | | | | | | | | | | | | | | | | delete any existing ICID pools in the DPC and create a new one based on the stream ID partitioning for the SoC Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com> Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com> Reviewed-by: York Sun <yorksun@freescale.com>
| * armv8/fsl-lsch3: partition stream IDsStuart Yoder2015-07-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Stream IDs on ls2085a devices are not hardwired and are programmed by sw. There are a limited number of stream IDs available, and the partitioning of them is scenario dependent. This header defines the partitioning between legacy, PCI, and DPAA2 devices. Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com> Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com> Reviewed-by: York Sun <yorksun@freescale.com>
| * drivers: fsl-mc: Return error for major version mismatchPrabhakar Kushwaha2015-07-201-2/+7
| | | | | | | | | | | | | | | | | | | | Management complex major version should match to the firmware present in flash. Return error during mismatch of major version. Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: York Sun <yorksun@freescale.com>
| * drivers: fsl-mc: Update qbman driverPrabhakar Kushwaha2015-07-203-37/+53
| | | | | | | | | | | | | | | | | | | | | | | | Update qbman driver - As per latest available qbman driver - Use of atomic APIs Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com> CC: Geoff Thorpe <Geoff.Thorpe@freescale.com> CC: Haiying Wang <Haiying.Wang@freescale.com> CC: Roy Pledge <Roy.Pledge@freescale.com> Reviewed-by: York Sun <yorksun@freescale.com>
| * drivers: fsl-mc: Update flibs to mc-0.6.0.1Prabhakar Kushwaha2015-07-202-6/+8
| | | | | | | | | | | | | | | | | | | | Update flibs changes to mc-0.6.0.1 for dpmang, dprc, dpni and dpio objects Also rename qbman_portal_ce/ci_paddr to qbman_portal_ce/ci_offset in dpio_attr. These are now offsets from the SoC QBMan portals base. Signed-off-by: J. German Rivera <German.Rivera@freescale.com> Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com> Reviewed-by: York Sun <yorksun@freescale.com>
| * drivers/fsl-mc: Autoload AOIP image from NOR flashJ. German Rivera2015-07-201-0/+23
| | | | | | | | | | | | | | | | | | Load AIOP image from NOR flash into DDR so that the MC firmware the MC fw can start it at boot time Signed-off-by: J. German Rivera <German.Rivera@freescale.com> Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com> Reviewed-by: York Sun <yorksun@freescale.com>
| * driver/ldpaa_eth:Flush buffer before seeding BMAN after TX_confPrabhakar Kushwaha2015-07-201-0/+1
| | | | | | | | | | | | | | | | Flush buffer before releasing to BMan after TX_conf to ensure, the core does not have any cachelines that the WRIOP will DMA to. Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com> Reviewed-by: York Sun <yorksun@freescale.com>
| * drivers/fsl-mc: Make MC boot error messages more readableJ. German Rivera2015-07-201-18/+13
| | | | | | | | | | | | | | | | | | Make it easier for the user to notice when the MC firmware had problems booting. Signed-off-by: J. German Rivera <German.Rivera@freescale.com> Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com> Reviewed-by: York Sun <yorksun@freescale.com>
| * driver/fsl_debug_server: Fix the DDR hide logic for LS2085aBhupesh Sharma2015-07-202-8/+5
| | | | | | | | | | | | | | | | | | | | This patch fixes the DDR hide logic for LS2085a, correcting the way the Debug Server FW and MC FW images are placed on the top of system DDR and how the rest of the system DDR space is made visibile to Linux. Signed-off-by: Bhupesh Sharma <bhupesh.sharma at freescale.com> Signed-off-by: Prabhakar Kushwaha <prabhakar at freescale.com> Reviewed-by: York Sun <yorksun@freescale.com>
| * driver/ddr/fsl: Add a hook to update SPD addressYork Sun2015-07-201-0/+8
| | | | | | | | | | | | | | | | In case SPD address changes between board revisions, updating SPD address can be called from board file. Signed-off-by: York Sun <yorksun at freescale.com> Signed-off-by: Prabhakar Kushwaha <prabhakar at freescale.com>
* | fdt: armv8: Fix build warnings on armv8Haikun Wang2015-07-201-2/+2
|/ | | | | | | | | | | | | | | | | | | Fix below build warnings on armv8, drivers/spi/fsl_dspi.c: In function ‘fsl_dspi_ofdata_to_platdata’: drivers/spi/fsl_dspi.c:667:2: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘fdt_addr_t’ [-Wformat=] debug("DSPI: regs=0x%x, max-frequency=%d, endianess=%s, num-cs=%d\n", ^ lib/fdtdec.c: In function ‘fdtdec_get_addr_size’: lib/fdtdec.c:105:4: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘fdt_size_t’ [-Wformat=] debug("addr=%08lx, size=%08lx\n", ^ Signed-off-by: Haikun Wang <haikun.wang@freescale.com> Acked-by: Simon Glass <sjg@chromium.org>
* Merge git://git.denx.de/u-boot-x86Tom Rini2015-07-1512-963/+314
|\
| * pci: Disable expansion ROM address decoding when signature check failsBin Meng2015-07-141-0/+4
| | | | | | | | | | | | | | | | | | | | We should not leave the expansion ROM address window open when there is not a valid ROM. Suggested-by: Matt Porter <mporter@konsulko.com> Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
| * pci: Configure expansion ROM during auto config processBin Meng2015-07-142-31/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently PCI expansion ROM address is assigned by a call to pciauto_setup_rom() outside of the pci auto config process. This does not work when expansion ROM is on a device behind PCI bridge where bridge's memory limit register was already programmed to a value that does not cover the newly assigned expansion ROM address. To fix this, we should configure the ROM address during the auto config process. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
| * drivers: block: Remove the ata_piix driverBin Meng2015-07-143-789/+0
| | | | | | | | | | | | | | | | | | | | | | This driver was originally added to support the native IDE mode for Intel chipset, however it has some bugs like not supporting ATAPI devices, endianness issue, or even broken build when CONFIG_LAB48. Given no board is using this driver as of today, rather than fixing all these issues we just remove it from the source tree. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
| * dm: x86: baytrail: Correct PCI region 3 when driver model is usedSimon Glass2015-07-141-2/+6
| | | | | | | | | | | | | | | | Commit afbbd413a fixed this for non-driver-model. Make sure that the driver model code handles this also. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * x86: pci: Tidy up the generic x86 PCI driverSimon Glass2015-07-141-5/+8
| | | | | | | | | | | | | | | | This driver should use the x86 PCI configuration functions. Also adjust its compatible string to something generic (i.e. without a vendor name). Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * dm: spi: Correct BIOS protection logic for ICH9Simon Glass2015-07-141-5/+4
| | | | | | | | | | | | | | | | | | The logic is incorrect and currently has no effect. Fix it so that we can write to SPI flash, since by default it is write-protected. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Andrew Bradford <andrew.bradford@kodakalaris.com>
| * dm: spi: Correct status register access widthSimon Glass2015-07-141-1/+5
| | | | | | | | | | | | | | | | | | The status register on ICH9 is a single byte, so use byte access when writing to it, to avoid updating the control register also. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Jagan Teki <jteki@openedev.com>
| * x86: Configure VESA parameters before loading Linux kernelBin Meng2015-07-141-0/+28
| | | | | | | | | | | | | | | | | | Store VESA parameters to Linux setup header so that vesafb driver in the kernel could work. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Jian Luo <jian.luo4@boschrexroth.de>
| * x86: Move VGA option rom macros to KconfigBin Meng2015-07-141-2/+2
| | | | | | | | | | | | | | | | | | | | Move X86_OPTION_ROM_FILE & X86_OPTION_ROM_ADDR to arch/x86/Kconfig and rename them to VGA_BIOS_FILE & VGA_BIOS_ADDR which depend on HAVE_VGA_BIOS. The new names are consistent with other x86 binary blob options like HAVE_FSP/FSP_FILE/FSP_ADDR. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
| * video: Add 32-bit color depth support for VBEJian Luo2015-07-141-0/+1
| | | | | | | | | | | | | | | | | | | | The TunnelCreek IGD VBE reports 32-bit color depth regardless 24-bit color depth is configured. Since 24-bit mode already uses 4 bytes internally, it should be OK to just add this option in switch case. Signed-off-by: Jian Luo <jian.luo4@boschrexroth.de> Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Bin Meng <bmeng.cn@gmail.com>
OpenPOWER on IntegriCloud