summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* dm: core: Add a function to read into a unsigned intSimon Glass2018-12-134-0/+118
| | | | | | | | | | | The current dev_read...() functions use s32 and u32 which are convenient for device tree but not so useful for normal code, which often wants to use normal integers for values. Add a helper which supports returning an unsigned int. Also add signed versions of the unsigned readers. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sound: Create a uclass for soundSimon Glass2018-12-1310-4/+351
| | | | | | | | | | | The sound driver pulls together the audio codec and i2s drivers in order to actually make sounds. It supports setup() and play() methods. The sound_find_codec_i2s() function allows locating the linked codec and i2s devices. They can be referred to from uclass-private data. Add a uclass and a test for sound. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sandbox: Update sound to use two buffersSimon Glass2018-12-131-25/+63
| | | | | | | | | | At present we use a single buffer for sound which means we cannot be playing one sound while queueing up the next. This wouldn't matter except that a long sound (more than a second) has to be created as a single buffer, thus using a lot of memory. To better mimic what real sound drivers do, add support for double buffering in sandbox. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sound: Create a uclass for i2sSimon Glass2018-12-139-6/+163
| | | | | | | | | | | The i2s bus is commonly used with audio codecs. It provides a way to stream digital data sychronously in both directions. U-Boot only supports audio output, so this uclass is very simple, with a single tx_data() method. Add a uclass and a test for i2s. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sound: Create a uclass for audio codecsSimon Glass2018-12-139-1/+182
| | | | | | | | An audio codec provides a way to convert digital data to sound and vice versa. Add a simple uclass which just supports setting the parameters for the codec. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sound: Rename samsung_i2s_priv to i2s_uc_privSimon Glass2018-12-133-10/+10
| | | | | | | | This structure contains information that is likely needed by any i2s driver so it seems useful to attach it to the (forthcoming) i2c uclass. For now, just rename it. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sound: Create an option to use driver model for soundSimon Glass2018-12-132-0/+7
| | | | | | | | | | The U-Boot sound system provides basic support for beeping. At present it does not use driver model, but it needs to be converted. Add an option to enable driver model for sound. For now it is not connected to anything. Future work will add drivers which use this option. It will then be removed once everything is converted. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sound: exynos: Correct codec bus addressesSimon Glass2018-12-134-12/+11
| | | | | | | | For snow the codec is at address 0x11 on the i2c bus, in 7-bit format. The device tree and code are in 8-bit format (i.e. shifted left one bit). Fix both. Fix pit in a similar way. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sound: Fix up header orderingSimon Glass2018-12-133-28/+27
| | | | | | Tidy up the ordering of header files in the sounds files. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sound: wm8994: Drop wm8994_i2c_init()Simon Glass2018-12-131-11/+1
| | | | | | This function has only one line in it. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sound: max98095: Drop g_codec_info and g_max98095_infoSimon Glass2018-12-131-15/+12
| | | | | | | | These are only used in two functions so can be made local. Also change the first argument of max98095_do_init() to suit. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sound: wm8994: Drop g_codec_info and g_wm8994_infoSimon Glass2018-12-131-9/+7
| | | | | | These are only used in two functions so can be made local. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sound: max98095: Drop global i2c-address variableSimon Glass2018-12-131-4/+4
| | | | | | We can put this in the private structure and avoid a global. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sound: wm8994: Drop global i2c-address variableSimon Glass2018-12-131-4/+4
| | | | | | We can put this in the private structure and avoid a global. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sound: max98095: Split out interface setup codeSimon Glass2018-12-131-12/+24
| | | | | | | | | With driver model we want to do a minimal probe when the device is probed and then set up the codec interface later when a sound is actully played. Split this setup code out into its own function to help with this. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sound: wm899c: Split out interface setup codeSimon Glass2018-12-131-11/+23
| | | | | | | | | With driver model we want to do a minimal probe when the device is probed and then set up the codec interface later when a sound is actully played. Split this setup code out into its own function to help with this. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sound: wm8994: Create a new common init functionSimon Glass2018-12-131-23/+33
| | | | | | | | With driver model we cannot pass in the global struct, but instead want to pass in the driver-private data. Split some of the code out of wm8994_init() to handle this. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sound: max98095: Pass private data to internal functionsSimon Glass2018-12-131-74/+78
| | | | | | | | | | | | At present the driver-private data is global. To allow this code to be used with driver model, change it to pass the data down to each function. Use the name 'priv' consistently throughout. Also rename max98095_update_bits() to max98095_bic_or() which is more descriptive and shorter, thus breaking fewer lines with the parameter addition. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sound: wm8994: Pass private data to internal functionsSimon Glass2018-12-131-142/+154
| | | | | | | | | | | | At present the driver-private data is global. To allow this code to be used with driver model, change it to pass the data down to each function. Use the name 'priv' consistently throughout. Also rename wm8994_update_bits() to wm8994_bic_or() which is more descriptive and shorter, thus breaking fewer lines with the parameter addition. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sound: Drop codec_typeSimon Glass2018-12-133-33/+0
| | | | | | | This field is not really used. It is always set to a known value. Drop it to simplify the code. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sound: samsung: Rename i2stx_info to samsung_i2s_privSimon Glass2018-12-133-12/+12
| | | | | | | | This struct is only used by the Samsung I2C driver and should move into that driver. For now, rename it so it is clear that is driver-private info. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sound: Drop unused pre-device-tree codeSimon Glass2018-12-132-12/+0
| | | | | | | CONFIG_OF_CONTROL is enabled for all boards that use sound, so remove the dead code. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sound: Rename en_sound_codec to sound_codecSimon Glass2018-12-131-2/+2
| | | | | | The en_ prefix is confusing and not needed. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sound: samsung: Make local function staticSimon Glass2018-12-132-5/+5
| | | | | | | Several functions are not exported from this file. Make them static so this is clear. Signed-off-by: Simon Glass <sjg@chromium.org>
* snow: Expand U-Boot sizeSimon Glass2018-12-131-1/+1
| | | | | | | Now that we have EFI, etc. enabled, U-Boot is larger than it was. Expand the region allocated for it. Signed-off-by: Simon Glass <sjg@chromium.org>
* sandbox: Increase the pre-relocation memorySimon Glass2018-12-136-5/+2
| | | | | | | This is close to full now, so increase it to avoid problems with adding more devices. Signed-off-by: Simon Glass <sjg@chromium.org>
* Merge branch 'master' of git://git.denx.de/u-boot-i2cTom Rini2018-12-131-0/+7
|\
| * i2c: tegra: Fix regression by implementing a dummy probe_chip() callbackJean-Jacques Hiblot2018-12-121-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | Commit f32a8007ef0f ("dm: i2c: Make i2c_get_chip_for_busnum() fail if the chip is not detected") introduced a regression for the NVIDIA Jetson TX2. For some reason the xfer callback of the tegra i2c driver doesn't support probing the I2C devices with a 0-length message. Fixing the regression by providing a dummy implementation of probe_chip() that does nothing. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Tested-by: Stephen Warren <swarren@nvidia.com>
* | Merge branch '2018-12-12-master-imports'Tom Rini2018-12-1232-144/+112
|\ \ | |/ |/| | | | | | | - Various small TI platform updates - Two unit test fixes - qemu-arm updates
| * am3517_evm: Use ttyS2 instead of ttyO2Adam Ford2018-12-121-1/+1
| | | | | | | | | | | | | | | | The serial driver in the kernel moved from ttyOx to ttySx a while ago. This patch updates the console parameter to align with the kernel change. Signed-off-by: Adam Ford <aford173@gmail.com>
| * firmware: psci: introduce SPL_ARM_PSCI_FWPeng Fan2018-12-122-1/+5
| | | | | | | | | | | | | | Introduce a new macro SPL_ARM_PSCI_FW Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Stefano Babic <sbabic@denx.de>
| * test: overlay: NULL passed as fdtHeinrich Schuchardt2018-12-121-19/+9
| | | | | | | | | | | | | | | | | | | | | | The uts created in do_ut_overlay() is not the one used in cmd_ut_category(). Currently all tests are therefore called with uts->priv = NULL and fail. Using a static variable is the easiest fix here. Fixes: e93232e15ec9 ("test: overlay: Use cmd_ut_category()") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * ARM: omap3logic: Remove legacy USB code in favor of DM_USBAdam Ford2018-12-121-61/+0
| | | | | | | | | | | | | | With the defconfig options enabling DM_USB, the legacy code can be removed. Signed-off-by: Adam Ford <aford173@gmail.com>
| * ARM: omap3_logic/omap35_logic: Move to DM_USBAdam Ford2018-12-124-36/+16
| | | | | | | | | | | | | | | | | | The existing config is setup as a gadget but it doesn't use DM_USB. This patch converts all boards to DM_USB, but as host. As host, it is able to mount USB drives and browse them. Signed-off-by: Adam Ford <aford173@gmail.com>
| * arm: am335x-pdu001: Move from embedded to separate DTBFelix Brack2018-12-122-1/+2
| | | | | | | | | | | | | | There is no need for an embedded device tree for this board so let the build process generate a separate u-boot.dtb file instead. Signed-off-by: Felix Brack <fb@ltec.ch>
| * spl: fix build failure with !CONFIG_SPL_PCI_SUPPORTSekhar Nori2018-12-127-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Building U-Boot with CONFIG_PCI and CONFIG_DM_PCI enabled, but CONFIG_SPL_PCI_SUPPORT disabled, results in following linker error: lib/built-in.o: In function `fdtdec_get_pci_bar32': lib/fdtdec.c:305: undefined reference to `dm_pci_read_bar32' fdtdec.c:305:(.text.fdtdec_get_pci_bar32+0x24): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `dm_pci_read_bar32' This is because reference to dm_pci_read_bar32() remains in lib/fdtdec.c while SPL build does not descend into drivers/pci directory in drivers/Makefile if CONFIG_SPL_PCI_SUPPORT is not enabled. Fix this by applying appropriate #define guards in lib/fdtdec.c. It looks like ns16550.c has the same problem, so fixed that too. To simplify this, CONFIG_SPL_PCI_SUPPORT is renamed to CONFIG_SPL_PCI (enables use of CONFIG_IS_ENABLED() macro). Suggested-by: Vignesh R <vigneshr@ti.com> Signed-off-by: Sekhar Nori <nsekhar@ti.com> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
| * defconfigs: am335x_hs_evm: Sync HS and non-HS defconfigsAndrew F. Davis2018-12-122-7/+14
| | | | | | | | | | | | | | Sync new additions to non-HS defconfig with HS defconfig. Signed-off-by: Andrew F. Davis <afd@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
| * fdt: Add warning about CONFIG_OF_EMBEDSimon Glass2018-12-121-0/+8
| | | | | | | | | | | | | | | | | | | | | | This option has crept into use with some boards. Add a warning to try to prevent this. As an example: https://lists.denx.de/pipermail/u-boot/2017-September/304966.html Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
| * blk: Rework guard around part_init callTom Rini2018-12-128-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function part_init() will only be built when we have both CONFIG_PARTITIONS and CONFIG_HAVE_BLOCK_DEVICE set. Protect the call to this function with both of these tests now. Cc: Simon Glass <sjg@chromium.org> Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Cc: Michal Simek <michal.simek@xilinx.com> Cc: York Sun <york.sun@nxp.com> Cc: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com> Cc: Mingkai Hu <mingkai.hu@nxp.com> Cc: Stefan Roese <sr@denx.de> Cc: Marek BehĂșn <marek.behun@nic.cz> Cc: Vanessa Maegima <vanessa.maegima@nxp.com> Cc: Eugen Hristev <eugen.hristev@microchip.com> Cc: Adam Ford <aford173@gmail.com> Cc: Jagan Teki <jagan@amarulasolutions.com> Cc: Tom Warren <twarren@nvidia.com> Cc: Stephen Warren <swarren@nvidia.com> Cc: Vitaly Andrianov <vitalya@ti.com> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * test: hexdump: fix misplaced returnSimon Goldschmidt2018-12-121-2/+2
| | | | | | | | | | | | | | | | | | | | One of the hexdump tests in test/lib/hexdump.c returns right at the start of the function without testing anything. Fix this by moving the 'return 0;' statement to the end of the function. Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * qemu-arm: Add persistent environment supportSumit Garg2018-12-124-1/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently on qemu-arm platforms environment is kept in RAM. Instead use pflash device 1 to provide persistent environment support across device reset. Also (optionally) provide support for persistent environment across qemu machine OFF/ON using following instructions: - Create envstore.img using qemu-img: qemu-img create -f raw envstore.img 64M - Add a pflash drive parameter to the command line: -drive if=pflash,format=raw,index=1,file=envstore.img Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
| * qemu-arm: Enable VirtIO distro targetSumit Garg2018-12-121-0/+1
| | | | | | | | | | | | | | | | With -device virtio-blk-device,drive=hd0, it could detect distro boot target. Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Reviewed-by: Alexander Graf <agraf@suse.de>
| * ARM: davinci: Orphan Spectrum Digital AM18xx EVMAdam Ford2018-12-111-2/+5
|/ | | | | | | | | | | | | I had requested the da850 boards because their previous maintainer had an invalid e-mail address. I work at Logic PD who makes the da850-evm kits, so I have access to various boards of theirs. The Spectrum Digital AM18xx board is based on the Logic PD da850 EVM, but it's not the same company. Since I don't have the hardware to test/verify changes, I would prefer to not be responsible for this board. Signed-off-by: Adam Ford <aford173@gmail.com>
* travis: Add check for configs without MAINTAINERS entriesTom Rini2018-12-101-0/+4
| | | | | | | | The genboardscfg.py script will emit a WARNING message if we have new defconfig files that are not listed in a MAINTAINERS file. Make new cases of this a failure we catch in Travis-CI. Signed-off-by: Tom Rini <trini@konsulko.com>
* Merge tag 'fsl-qoriq-for-v2019.01-rc2' of git://git.denx.de/u-boot-fsl-qoriqTom Rini2018-12-10112-520/+4081
|\ | | | | | | | | | | | | | | Add TFA boot flow for some Layerscape platforms Add support for lx2160a SoC [trini: Add a bunch of missing MAINTAINERS entries] Signed-off-by: Tom Rini <trini@konsulko.com>
| * armv8: lx2160a: Add LX2160A SoC SupportPriyanka Jain2018-12-0616-10/+644
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LX2160A Soc is based on Layerscape Chassis Generation 3.2 architecture with features: 16 ARM v8 Cortex-A72 cores in 8 cluster, CCN508, SEC, 2 64-bit DDR4 memory controller, RGMII, 8 I2C controllers, 3 serdes modules, USB 3.0, SATA, 4 PL011 SBSA UARTs, 4 TZASC instances, etc. SoC personalites: LX2120A is SoC with Twelve 64-bit ARM v8 Cortex-A72 CPUs LX2080A is SoC with Eight 64-bit ARM v8 Cortex-A72 CPUs Signed-off-by: Bao Xiaowei <xiaowei.bao@nxp.com> Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com> Signed-off-by: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com> Signed-off-by: Vabhav Sharma <vabhav.sharma@nxp.com> Signed-off-by: Sriram Dash <sriram.dash@nxp.com> Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
| * armv8:fsl-layerscape: Add support for Chassis 3.2Priyanka Jain2018-12-065-5/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | NXP layerscape architecture Chassis 3.2 builds upon chassis3 architecture with changes like DDR Memory map change, removal of IFC and support of upto 8 I2C controller. Patch add README.lsch3_2 and the above changes under macro CONFIG_NXP_LSCH3_2. Signed-off-by: Sriram Dash <sriram.dash@nxp.com> Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
| * board/freescale/vid: Add vdd table for NXP LX2160A SoCPriyanka Jain2018-12-061-0/+37
| | | | | | | | | | Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
| * armv8: lsch3: Add support of serdes3 modulePriyanka Jain2018-12-063-0/+76
| | | | | | | | | | | | | | | | | | Some lsch3 based SoCs like lx2160a contains three serdes modules. Add support for third serdes protocol in lsch3 Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
| * board/freescale/vid: Add correction for ltc3882 read error.Priyanka Jain2018-12-061-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Voltage regulator LTC3882 device has 0.5% voltage read error. So for NXP SoC devices this generally equates to 2mV Update set_voltage_to_LTC for below: 1.Add coorection of upto 2mV in voltage comparison to take care of voltage read error of voltage regulator 2.Add loop max count kept as 100 to avoid infinte loop. Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>