aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* env: sata: Add missed env location for SATA bootYe Li2019-01-091-0/+3
| | | | | | | | | The env location label ENVL_ESATA is missed in location tables, so when we configure the ENV in SATA, u-boot fails to get correct env location and cause boot hang in board_f. Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
* arm: Round the dma_alloc_coherent memory size to cache line alignedYe Li2019-01-091-1/+1
| | | | | | | | | | | | | | | | | | | | When running usb dwc3 gadget driver, we meet random USB enumeration failure in fastboot. The root cause is a cache coherence issue. When it happens, the ctrl_req in gadget driver is allocated at 0xfe932f40, and the usb_composite_dev (cdev) is allocated at 0xfe932f60. So after we submit the setup request (cache flushed) to USB controller, any accessing to usb_composite_dev variable will cause the cache line refill, then when setup transfer is completed, reading the setup data in ctrl_req will gets old value from cache not from memory. The ctrl_req is allocated by API dma_alloc_coherent, but u-boot don't have cohernet memory. so it still needs cache maintain operations before/after HW accessing. Since the cache flush or invalidate bases on cache line, so when the allocated memory size is not cache line aligned, potentially it may meet such issue. This patch modifies the dma_alloc_coherent API to round the size to cache line aligned. Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
* doc: README.commands: fix typeHeinrich Schuchardt2019-01-091-1/+1
| | | | | | | %s/commmand/command/ Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
* dm: video: lcd: MIGRATION: Add migration plan for videoSimon Glass2019-01-092-0/+18
| | | | | | Add a migration plan for video which is an important subsystem in U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: pci: MIGRATION: Add migration plan for PCISimon Glass2019-01-092-0/+20
| | | | | | Add a migration plan for PCI which is an important subsystem in U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org>
* igep003x: MAINTAINER: Remove myself as maintainer and add JavierEnric Balletbo i Serra2019-01-091-1/+1
| | | | | | | | | I can't continue maintaining the board because I don't have access to the hardware anymore, so remove myself from the entry and add Javier who has volunteered to help and maintain the board. Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Signed-off-by: Javier Martínez Canillas <javier@dowhile0.org>
* Add a github template telling people to not use pull requests thereTom Rini2019-01-091-0/+3
| | | | | | | | | | On our mirror account on github we have gotten a handful of pull requests. At this time github does not allow you to disable pull requests on a project. The generally suggested work-around is to add a pull request template that tells people to not use that workflow. Add one here that points to the wiki page on submitted patches. Signed-off-by: Tom Rini <trini@konsulko.com>
* mmc: bring back partition init for non-DM MMC driversAndre Przywara2019-01-091-0/+4
| | | | | | | | | | | | | | | Commit d0851c893706 ("blk: Call part_init() in the post_probe() method") removed the call to part_init() in mmc.c, as this is done by the DM_MMC framework. However Allwinner is (still) relying on a non-DM MMC driver, so we are now missing the implicit partition init, leading to failing MMC accesses due to the missing partition information. Bring the call back just for non-DM MMC driver to fix this regression. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Soeren Moch <smoch@web.de>
* sunxi: drop default SPL_LIBDISK_SUPPORT enablementAndre Przywara2019-01-091-1/+0
| | | | | | | | | | | | There is no code for using partition labels in the Allwinner SPL port. Even so the name is slightly misleading, CONFIG_SPL_LIBDISK_SUPPORT was meant to guard partition code for the SPL. Remove the "imply" line in the Kconfig to make this obvious and avoid unneeded code inclusions, helping to keep the H6 SPL code small. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* Makefile: Correct logic for DM_SCSI + unconverted drivers checkTom Rini2019-01-081-1/+3
| | | | | | | | | | When checking for boards that are enabling a SATA driver that isn't converted to DM yet we need to be sure to not also trip over boards that do set CONFIG_DM_SCSI by itself, as that is not a bug. Reported-by: Andy Shevchenko <andy.shevchenko@gmail.com> Fixes: ea9d7c17fc4c ("dm: MIGRATION: Add migration plan for CONFIG_SATA") Signed-off-by: Tom Rini <trini@konsulko.com>
* Prepare v2019.01-rc3v2019.01-rc3Tom Rini2019-01-071-1/+1
| | | | Signed-off-by: Tom Rini <trini@konsulko.com>
* configs: Resync with savedefconfigTom Rini2019-01-07305-493/+140
| | | | | | Rsync all defconfig files using moveconfig.py Signed-off-by: Tom Rini <trini@konsulko.com>
* Merge branch 'master' of git://git.denx.de/u-boot-samsungTom Rini2019-01-069-15/+20
|\
| * exynos: Leave the compiler to choose the register to avoid possible r0 ↵Guillaume GARDET2019-01-041-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | corruption Reported-by: Siarhei Siamashka <siarhei.siamashka@gmail.com> Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr> Cc: Albert Aribaud <albert.u.boot@aribaud.net> Cc: Minkyu Kang <mk7.kang@samsung.com> Cc: Tom Rini <trini@konsulko.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
| * exynos: allow SPL to build in thumb modeGuillaume GARDET2019-01-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Building peach-pi smdk5420 and peach-pit with thumb mode for SPL ends-up in the following error: Error: Thumb encoding does not support an immediate here -- `msr cpsr_c,#0x13|0xC0' Use an intermediate register to be able to use thumb for exynos5 SPL. Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr> Cc: Albert Aribaud <albert.u.boot@aribaud.net> Cc: Minkyu Kang <mk7.kang@samsung.com> Cc: Tom Rini <trini@konsulko.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
| * exynos: imply SYS_THUMB_BUILDGuillaume GARDET2018-12-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows smaller binaries. This is needed for and has been tested on Arndale board, as u-boot.bin is now bigger than the 512K load limit, with GCC8, without thumb mode. Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr> Cc: Albert Aribaud <albert.u.boot@aribaud.net> Cc: Minkyu Kang <mk7.kang@samsung.com> Cc: Tom Rini <trini@konsulko.com> Acked-by: Lukasz Majewski <lukma@denx.de> Acked-by: Minkyu Kang <mk7.kang@samsung.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
| * Revert "arm: config: fix default console only to specify the device"Seung-Woo Kim2018-12-266-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 232ed3ca534708527a9515c7c41bc3542949525c. In exynos boards, ${console} is used to set bootargs but it sets without "console=", so CONFIG_DEFAULT_CONSOLE for these boards is designated with "console=" but it is removed. So revert the commit. References for using ${console} in board/samsung/common/bootscripts/autoboot.cmd board/samsung/common/bootscripts/bootzimg.cmd Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
| * odroid: Update README.odroid for support of Odroid HC1Anand Moon2018-12-211-2/+5
| | | | | | | | | | | | | | | | updated READM.odroid for supported Odroid HC1 development board. Signed-off-by: Anand Moon <linux.amoon@gmail.com> Reviewed-by: Lukasz Majewski <lukma@denx.de> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
| * exynos5-dt-types: add missing dtb file for Odroid HC1/HC2Anand Moon2018-12-211-0/+1
| | | | | | | | | | | | | | | | Add missing exynos5422-odroidhc1.dtb needed to set for dfu env. Signed-off-by: Anand Moon <linux.amoon@gmail.com> Reviewed-by: Lukasz Majewski <lukma@denx.de> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
* | Merge tag 'for-master-20190106' of git://git.denx.de/u-boot-rockchipTom Rini2019-01-061-2/+3
|\ \ | | | | | | | | | | | | Fixes: - rockchip: rk3399: fix missing braces in full pinctrl
| * | rockchip: rk3399: fix missing braces in full pinctrlPhilipp Tomsich2019-01-061-2/+3
|/ / | | | | | | | | | | | | | | | | | | | | Braces around the error-case for rk3399_pinctrl_set_pin_pupd lead to an unconditional (and unintended) return from the function without it ever setting pin-configurations. Fix it. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | Merge tag 'for-v2019.01' of git://git.denx.de/u-boot-videoTom Rini2019-01-034-4/+26
|\ \ | | | | | | | | | TrueType fixes and documentation
| * | dm: video: fix test failures with enabled default TrueType fontAnatolij Gustschin2018-12-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | With enabled default Nimbus font dm_test_video_truetype* tests fail. Update expected expressions to fix them. Signed-off-by: Anatolij Gustschin <agust@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | video: rockchip: Use TrueType fonts with jerrySimon Glass2018-12-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | As an example of how to enable TrueType fonts, move chromebook_jerry over to use these. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
| * | video: Add a default TrueType fontSimon Glass2018-12-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | At present it is possible to enable TrueType support but not include any fonts. This results in a blank display. Select Nimbus as the default font to avoid this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
| * | video: Add information about using TrueType fontsSimon Glass2018-12-281-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | U-Boot supports using TrueType fonts on the console, which is useful for presenting a nice UI to users, e.g. for system recovery. Add information about how to compile this on ARM platforms, since this is not obvious. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
* | | Merge tag 'for-master-20190103' of git://git.denx.de/u-boot-rockchipTom Rini2019-01-0316-13/+317
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Last-minute fixes for 2019.1: - clamp DRAM size to below 32bit for 32bit targets to support 4GB - fix copyright notice on some Rockchip-contributed files - adjust vdd_log for the RK3399-Q7 to improve stability in some workloads
| * | | rockchip: rk3399-puma: Set VDD_LOG to 950 mV.Christoph Muellner2019-01-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch sets VDD_LOG to 950 mV on RK3399-Q7. This is required to address stability issues on Puma in heavy-load use-cases. Reported-by: Assaf Agmon <assaf@r-go.io> Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
| * | | rockchip: rk3399-puma: enable full pinctrl driver in Puma defconfig.Christoph Muellner2019-01-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch enables the full pinctrl driver in the defconfig for the RK3399-Q7. Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
| * | | rockchip: rk3399: Add Kconfig option for full pinctrl driverChristoph Muellner2019-01-022-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a Kconfig option to enable the full pinctrl driver for the RK3399. This flag needs to be enabed in order to get the features of the full pinctrl driver compiled in (i.e. a .set_state() callback). Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
| * | | rockchip: rk3399: Add improved pinctrl driver.Christoph Muellner2019-01-021-0/+227
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current pinctrl driver for the RK3399 has a range of qulity issues. E.g. it only implements the .set_state_simple() callback, it does not parse the available pinctrl information from the DTS (instead uses hardcoded values), is not flexible enough to cover devices without 'interrupt' field in the DTS (e.g. PWM), is not written generic enough to make code reusable among other rockchip SoCs... This patch addresses these issues by reimplementing the whole driver from scratch using the .set_state() callback. The new implementation covers all featurese of the old code (i.e. it supports pinmuxing and pullup/pulldown configuration). This patch has been tested on a RK3399-Q7 SoM (Puma). Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
| * | | dm: pinctrl: Add pinctrl_decode_pin_config_dm().Christoph Muellner2019-01-022-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pinctrl_decode_pin_config_dm() is basically a feature-equivalent implementation of pinctrl_decode_pin_config(), which operates on struct udevice devices and uses the dev_read_*() API. Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
| * | | rockchip: rk3399-puma: enable PWM regulator in Puma defconfig.Christoph Muellner2019-01-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch enables the PWM regulator driver in the defconfig for the RK3399-Q7. Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
| * | | power: regulator: Allow PWM regulator to be omitted from SPL.Christoph Muellner2019-01-022-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows to enable the PWM regulator driver independent for U-Boot and SPL. Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
| * | | rockchip: rk3399-puma: Cleanup of vdd_log DTS entry.Christoph Muellner2019-01-021-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch eliminates the non-standard entries "rockchip,pwm_id" and "rockchip,pwm_voltage". They are neither documented nor read out by any driver. Additionally it introduces the entry regulator-init-microvolt and sets it to 900 mV, which is the default target value for VDD_LOG. Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
| * | | rockchip: ram: update license for sdram driverKever Yang2019-01-026-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rockchip may use this sdram copy of source code for both open source and internal project, update the license to use both GPL2.0+ and BSD-3 Clause. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
| * | | rockchip: rk3036: ram: update licenseKever Yang2019-01-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All the source code of sdram_rk3036.c are from Rockchip, update the copyright to owned by Rockchip. Because rockchip may use this copy of code both for open source project and internal project, update the license to use both GPL2.0+ and BSD-3 Clause. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
| * | | rockchip: sdram-common: fix wrong size for 4GB in 32bit SoCKever Yang2019-01-021-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is workaround for issue we can't get correct size for 4GB ram in 32bit system and available before we really need ram space out of 4GB, eg.enable ARM LAPE(rk3288 supports 8GB ram). The size of 4GB is '0x1 00000000', and this value will be truncated to 0 in 32bit system, and system can not get correct ram size. Rockchip SoCs reserve a blob of space for peripheral near 4GB, and we are now setting SDRAM_MAX_SIZE as max available space for ram in 4GB, so we can use this directly to workaround the issue. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Tested-By: Vagrant Cascadian <vagrant@debian.org> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
* | | | Merge branch 'master' of git://git.denx.de/u-boot-spiTom Rini2019-01-024-4/+34
|\ \ \ \ | |/ / / |/| | |
| * | | dm: MIGRATION: Update migration plan for DM_SPI_FLASHJagan Teki2019-01-021-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Migration plan for DM_SPI_FLASH is v2019.07 since it depends on DM_SPI migration. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
| * | | dm: MIGRATION: Update migration plan for SPIJagan Teki2019-01-022-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - v2019.04 for no dm conversion drivers - v2019.07 for partially converted drivers. Note: there were many updates on this deadline, so better not update this again. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
| * | | mtd: nand: raw: Add Hynix H27UBG8T2BTR id tableNikolai Zhubr2019-01-021-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds Hynix H27UBG8T2BTR id table as part of raw nand, these chips were available in some A20-olinuxino-micro boards. Signed-off-by: Nikolai Zhubr <n-a-zhubr@yandex.ru> [jagan: add proper commit message] Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
| * | | spi: sun4i: Add rx_buf NULL pointer checkStefan Mavrodiev2019-01-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current driver doesn't check if the destination pointer is NULL. This cause the data from the FIFO to be stored inside the internal SDRAM ( address 0 ). The patch add simple check if the destination pointer is NULL. Signed-off-by: Stefan Mavrodiev <stefan@olimex.com> Acked-by: Jagan Teki <jagan@openedev.com> [jagan: fix commit message] Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
* | | | Merge branch 'master' of git://git.denx.de/u-boot-sunxiTom Rini2019-01-011-10/+8
|\ \ \ \
| * | | | Revert "sunxi: board: Print error after power initialization fails"From: Karl Palsson2018-12-301-10/+8
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit a8011eb84dfa("sunxi: board: Print error after power initialization fails") moved the DRAM init after the increase of the CPU clock frequency. This lead to various DRAM initialisation failures on some boards (hangs or wrong size reported, on a NanoPi Duo2 and OrangePi Zero, for instance). Lowering the CPU frequency significantly (for instance to 408 MHz) seems to work around the problem, so this points to some timing issues in the DRAM code. Debugging this sounds like a larger job, so let's just revert this patch to bring back those boards. Beside this probably unintended change the patch just moved the error message around, so reverting this is not a real loss. This reverts commit a8011eb84dfac5187cebf00ed8bc981bdb5c1fa1. Tested-By: Priit Laes <plaes@plaes.org> Signed-off-by: Karl Palsson <karlp@tweak.net.au> Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
* | | | Merge tag 'u-boot-imx-20190101' of git://www.denx.de/git/u-boot-imxTom Rini2019-01-01106-564/+8718
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | imx for 2019.01 - introduce support for i.MX8M - fix size limit for Vhybrid / pico boards - several board fixes - w1 driver for MX2x / MX5x
| * | | pico-imx7d: Increase the CONFIG_ENV_OFFSET sizeFabio Estevam2019-01-011-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | U-Boot binary has grown in such a way that it goes beyond the reserved area for the environment variables. Running "saveenv" causes U-Boot to hang because of this overlap. Fix this problem by increasing the CONFIG_ENV_OFFSET size. Also, in order to prevent this same problem in the future, use CONFIG_BOARD_SIZE_LIMIT, which will detect the overlap in build-time. CONFIG_BOARD_SIZE_LIMIT does not accept math expressions, so declare CONFIG_ENV_OFFSET with its direct value instead. Signed-off-by: Fabio Estevam <festevam@gmail.com> Acked-by: Otavio Salvador <otavio@ossystems.com.br>
| * | | nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)Lukasz Majewski2019-01-011-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for device tree and enumeration via device model for the Vybrid's NFC NAND driver. Signed-off-by: Lukasz Majewski <lukma@denx.de>
| * | | Kconfig: Add entry for VF610 NAND NFC device tree aware driverLukasz Majewski2019-01-011-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit provides code to add proper entry to Kconfig to enable support for VF610 device tree aware driver. Signed-off-by: Lukasz Majewski <lukma@denx.de>
| * | | nand: vybrid: Use calloc() instead of malloc() to allocate struct nfcLukasz Majewski2019-01-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this change it is possible that Vybrid's NFC driver malloc() call will obtain some memory used (and correctly free'd) by some previous driver (in this case pinctrl for Vybrid). As a result some fields of struct nfc - in out case mtd->_get_device - are "pre initialized" with some random values. On the latter stage of booting, when e.g. somebody calls 'mtdparts default' the "data abort" is observed when __get_mtd_device() function is called. The mtd->_get_device pointer is not NULL and wrong value is referenced. Signed-off-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Stefan Agner <stefan.agner@toradex.com>