summaryrefslogtreecommitdiff
path: root/board/compulab
AgeCommit message (Collapse)AuthorFilesLines
2021-08-02global: Convert simple_strtoul() with decimal to dectoul()Simon Glass2-2/+2
It is a pain to have to specify the value 10 in each call. Add a new dectoul() function and update the code to use it. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-07-28i2c: Rename CONFIG_SYS_I2C to CONFIG_SYS_I2C_LEGACYSimon Glass2-2/+2
It is quite confusing that CONFIG_SYS_I2C selects the legacy I2C and CONFIG_DM_I2C selects the current I2C. The deadline to migrate I2C is less than a year away. Also we want to have a CONFIG_I2C for U-Boot proper just like we have CONFIG_SPL_I2C for SPL, so we can simplify the Makefile rules. Rename this symbol so it is clear it is going away. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heiko Schocher <hs@denx.de>
2021-05-02arm: imx8m: add support for Compulab iot-gate-imx8 (imx8mm-cl-iot-gate)Ying-Chun Liu (PaulLiu)13-0/+7932
Add initial support for Compulab iot-gate-imx8 board (imx8mm-cl-iot-gate). The initial support includes: - MMC - eMMC - I2C - FEC - Serial console Signed-off-by: Kirill Kapranov <kirill.kapranov@compulab.co.il> Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il> Signed-off-by: Valentin Raevsky <valentin@compulab.co.il> Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org> Cc: Peter Robinson <pbrobinson@gmail.com>
2021-03-02reset: Remove addr parameter from reset_cpu()Harald Seiler1-1/+1
Historically, the reset_cpu() function had an `addr` parameter which was meant to pass in an address of the reset vector location, where the CPU should reset to. This feature is no longer used anywhere in U-Boot as all reset_cpu() implementations now ignore the passed value. Generic code has been added which always calls reset_cpu() with `0` which means this feature can no longer be used easily anyway. Over time, many implementations seem to have "misunderstood" the existence of this parameter as a way to customize/parameterize the reset (e.g. COLD vs WARM resets). As this is not properly supported, the code will almost always not do what it is intended to (because all call-sites just call reset_cpu() with 0). To avoid confusion and to clean up the codebase from unused left-overs of the past, remove the `addr` parameter entirely. Code which intends to support different kinds of resets should be rewritten as a sysreset driver instead. This transformation was done with the following coccinelle patch: @@ expression argvalue; @@ - reset_cpu(argvalue) + reset_cpu() @@ identifier argname; type argtype; @@ - reset_cpu(argtype argname) + reset_cpu(void) { ... } Signed-off-by: Harald Seiler <hws@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-02-02common: Drop asm/global_data.h from common headerSimon Glass4-0/+4
Move this out of the common header and include it only where needed. In a number of cases this requires adding "struct udevice;" to avoid adding another large header or in other cases replacing / adding missing header files that had been pulled in, very indirectly. Finally, we have a few cases where we did not need to include <asm/global_data.h> at all, so remove that include. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2021-01-05dm: Rename U_BOOT_DEVICE() to U_BOOT_DRVINFO()Simon Glass1-1/+1
The current macro is a misnomer since it does not declare a device directly. Instead, it declares driver_info record which U-Boot uses at runtime to create a device. The distinction seems somewhat minor most of the time, but is becomes quite confusing when we actually want to declare a device, with of-platdata. We are left trying to distinguish between a device which isn't actually device, and a device that is (perhaps an 'instance'?) It seems better to rename this macro to describe what it actually is. The macros is not widely used, since boards should use devicetree to declare devices. Rename it to U_BOOT_DRVINFO(), which indicates clearly that this is declaring a new driver_info record, not a device. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-14dm: treewide: Rename ..._platdata variables to just ..._platSimon Glass1-1/+1
Try to maintain some consistency between these variables by using _plat as a suffix for them. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-14dm: treewide: Rename 'platdata' variables to just 'plat'Simon Glass1-1/+1
We use 'priv' for private data but often use 'platdata' for platform data. We can't really use 'pdata' since that is ambiguous (it could mean private or platform data). Rename some of the latter variables to end with 'plat' for consistency. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-07-17treewide: convert bd_t to struct bd_info by coccinelleMasahiro Yamada6-8/+8
The Linux coding style guide (Documentation/process/coding-style.rst) clearly says: It's a **mistake** to use typedef for structures and pointers. Besides, using typedef for structures is annoying when you try to make headers self-contained. Let's say you have the following function declaration in a header: void foo(bd_t *bd); This is not self-contained since bd_t is not defined. To tell the compiler what 'bd_t' is, you need to include <asm/u-boot.h> #include <asm/u-boot.h> void foo(bd_t *bd); Then, the include direcective pulls in more bloat needlessly. If you use 'struct bd_info' instead, it is enough to put a forward declaration as follows: struct bd_info; void foo(struct bd_info *bd); Right, typedef'ing bd_t is a mistake. I used coccinelle to generate this commit. The semantic patch that makes this change is as follows: <smpl> @@ typedef bd_t; @@ -bd_t +struct bd_info </smpl> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-07-09arm: Remove cm_t35 boardJagan Teki4-539/+0
DM, DM_SPI and other driver model migration deadlines are expired for this board. Remove it. Cc: Igor Grinberg <grinberg@compulab.co.il> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2020-07-09arm: Remove cm_t54 boardJagan Teki6-446/+0
DM, DM_SPI and other driver model migration deadlines are expired for this board. Remove it. Cc: Dmitry Lifshitz <lifshitz@compulab.co.il> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2020-05-19common: Drop linux/delay.h from common headerSimon Glass9-0/+9
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-19common: Drop log.h from common headerSimon Glass1-0/+1
Move this header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-19common: Drop init.h from common headerSimon Glass1-0/+1
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-19common: Drop net.h from common headerSimon Glass5-0/+5
Move this header out of the common header. Network support is used in quite a few places but it still does not warrant blanket inclusion. Note that this net.h header itself has quite a lot in it. It could be split into the driver-mode support, functions, structures, checksumming, etc. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18arm: Don't include common.h in header filesSimon Glass1-0/+1
It is bad practice to include common.h in other header files since it can bring in any number of superfluous definitions. It implies that some C files don't include it and thus may be missing CONFIG options that are set up by that file. The C files should include these themselves. Update some header files in arch/arm to drop this. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-02-06dm: core: Create a new header file for 'compat' featuresSimon Glass1-0/+1
At present dm/device.h includes the linux-compatible features. This requires including linux/compat.h which in turn includes a lot of headers. One of these is malloc.h which we thus end up including in every file in U-Boot. Apart from the inefficiency of this, it is problematic for sandbox which needs to use the system malloc() in some files. Move the compatibility features into a separate header file. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-18common: Move hang() to the same header as panic()Simon Glass3-0/+3
At present panic() is in the vsprintf.h header file. That does not seem like an obvious choice for hang(), even though it relates to panic(). So let's put hang() in its own header. Signed-off-by: Simon Glass <sjg@chromium.org> [trini: Migrate a few more files] Signed-off-by: Tom Rini <trini@konsulko.com>
2020-01-17common: Move RAM-sizing functions to init.hSimon Glass4-0/+4
These functions relate to memory init so move them into the init header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-17common: Move reset_cpu() to the CPU headerSimon Glass1-0/+1
Move this function out of common.h and into a relevant header file. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-17common: Move clock functions into a new fileSimon Glass1-0/+1
These three clock functions don't use driver model and should be migrated. In the meantime, create a new file to hold them. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-07board: cm_fx6: Enable DM support for video, fix build errorSuniel Mahesh1-0/+5
Enable driver model for Video to remove the following compile warning on CM-FX6 SOM based target: ===================== WARNING ====================== This board does not use CONFIG_DM_VIDEO Please update the board to use CONFIG_DM_VIDEO before the v2019.07 release. ==================================================== This change introduced build error as shown: LD u-boot drivers/built-in.o: In function ipu_displays_init' arm-linux-ld.bfd: BFD (GNU Binutils) 2.29.1 assertion fail elf32-arm.c:9509 Makefile:1621: recipe for target 'u-boot' failed make: *** [u-boot] Error 1 The DM converted video driver calls ipu_displays_init in its probe, which inturn calls relevant board_video_skip. Defining ipu_displays_init in the board file fixes build error. Target was compile tested, build was clean. Signed-off-by: Suniel Mahesh <sunil.m@techveda.org>
2019-12-03common: Move old EEPROM functions into a new headerSimon Glass1-0/+1
These functions do not use driver model but are still used. Move them to a new eeprom.h header file. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-03common: Move some board functions out of common.hSimon Glass2-0/+2
A number of board function belong in init.h with the others. Move them. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-03common: Drop global inclusion of status_led.hSimon Glass1-0/+1
This is only used by a few files so it should not be in the common header. Move it out. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-08-11env: Drop environment.h header file where not neededSimon Glass5-5/+0
This header file is now only used by files that access internal environment features. Drop it from various places where it is not needed. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2019-08-11env: Move env_get() to env.hSimon Glass1-0/+1
Move env_get() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2019-08-11env: Move env_set() to env.hSimon Glass5-0/+5
Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2019-06-23Convert to use fsl_esdhc_imx for i.MX platformsYangbo Lu8-22/+22
Converted to use fsl_esdhc_imx for i.MX platforms. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> Tested-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Martyn Welch <martyn.welch@collabora.com> Acked-by: Jason Liu <Jason.hui.liu@nxp.com>
2019-05-28cm_t3517: remove boardBartosz Golaszewski6-501/+1
This board still doesn't select CONFIG_DM and seems to be umaintained. As it makes progress on modernizing several DaVinci drivers more difficult and the maintainer has not expressed interest in updating it, this patch proposes to remove it. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2019-04-17arm: am57xx: cl-som-am57x: remove board supportUri Mashiach7-672/+0
U-Boot support for the CL-SOM-AM57x module is no longer required. Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il>
2018-08-23usb: musb-new: Fix improper musb host pointerJagan Teki1-2/+2
When MUSB is operating in peripheral mode, probe registering musb core using musb_register which intern return int value for validation. so there is no scope to preserve struct musb pointer but the same can be used in .remove musb_stop. So fix this by return musb_register with struct musb pointer. Cc: Igor Grinberg <grinberg@compulab.co.il> Cc: Purna Chandra Mandal <purna.mandal@microchip.com> Tested-by: Chen-Yu Tsai <wens@csie.org> # A33-OlinuXino Tested-by: Jagan Teki <jagan@amarulasolutions.com> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2018-07-25board: constify struct node_info arrayMasahiro Yamada1-1/+1
Add 'const' (also 'static' in some places) to struct node_info arrays to save memory footprint. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-05-07SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini42-92/+42
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
2018-04-27Remove unnecessary instances of DECLARE_GLOBAL_DATA_PTRTom Rini4-8/+0
We have a large number of places where while we historically referenced gd in the code we no longer do, as well as cases where the code added that line "just in case" during development and never dropped it. Signed-off-by: Tom Rini <trini@konsulko.com>
2018-04-09net: Move enetaddr env access code to env config instead of net configAlex Kiernan7-0/+7
In order that we can use eth_env_* even when CONFIG_NET isn't set, move these functions to environment code from net code. This fixes failures such as: board/ti/am335x/built-in.o: In function `board_late_init': board/ti/am335x/board.c:752: undefined reference to `eth_env_set_enetaddr' u-boot/board/ti/am335x/board.c:766: undefined reference to `eth_env_set_enetaddr' which caters for use cases such as: commit f411b5cca48f ("board: am335x: Always set eth/eth1addr environment variable") when Ethernet is required in Linux, but not U-Boot. Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
2018-02-22Revert "mx6: ddr: Allow changing REFSEL and REFR fields"Maxim Yu. Osipov1-2/+0
This reverts commit edf0093732225c2fd0791c3864e9a3eef1f92f19 for cm_fx6 iMX.6 Solo module as it causes frequent (around 10 percent of power cycles) board's hangs. These hangs happen in SPL when BSS is being initialized in SDRAM - it appear that variables from BSS contain trash values which lead to board hangs. Looks like that SDRAM doesn't yet finish initialization in these cases. Signed-off-by: Maxim Yu. Osipov <mosipov@ilbers.de> Reviewed-by: Stefano Babic <sbabic@denx.de>
2018-02-15usb: host: xhci-omap: Remove redundant board_usb_init and board_usb_cleanup ↵Faiz Abbas2-0/+27
functions board_usb_init()/_cleanup() should be in board files and don't have a place in the xhci-omap driver. Weak versions for board_usb_init()/_cleanup() already exist in common/usb.c (for host mode) and drivers/usb/gadget/g_dnl.c (for gadget mode). Therefore, remove init and cleanup functions from xhci-omap and implement them in the board files. Signed-off-by: Faiz Abbas <faiz_abbas@ti.com> Reviewed-by: Marek Vasut <marex@denx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2018-01-12ARM: imx: cm_fx6: export board and soc info to envChristopher Spinrath1-0/+21
Like many other i.MX6 based boards, there are multiple variants of the cm-fx6 module featuring different SoC variants. Furthermore, the module can be paired with multiple baseboards. At the same time modern distribution like Fedora require U-Boot to select a proper devicetree which depends on the SoC variant and the baseboard. Thus, export the SoC variant and the actual board to the environment following the conventions of other i.MX6 devices (e.g. the NXP boards) such that the environment can select a devicetree file to load. For now, we only know for sure that the cm-fx6 module and the SB-fx6m baseboard amount to a Utilite Computer variant (depending on the SoC). Further combinations may be added in the future; e.g. CompuLab's evaluation board once someone can verify the identification string stored in its eeprom. Signed-off-by: Christopher Spinrath <christopher.spinrath@rwth-aachen.de> Reviewed-by: Stefano Babic <sbabic@denx.de>
2017-12-29ARM: imx: cm_fx6: remove esdhc init code from board fileChristopher Spinrath1-29/+0
Commit 5248930ebf48 ("dm: imx: cm_fx6: Enable more driver model support") enabled driver model support for MMC. Remove the old mmc init code, which is no longer used, from the board file. Signed-off-by: Christopher Spinrath <christopher.spinrath@rwth-aachen.de> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-12-29ARM: imx: cm_fx6: remove sata init code from board fileChristopher Spinrath1-42/+0
Commit 5248930ebf48 ("dm: imx: cm_fx6: Enable more driver model support") enabled driver model support for AHCI. Remove the old, now unused, sata init code from the board file. Signed-off-by: Christopher Spinrath <christopher.spinrath@rwth-aachen.de> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-11-26usb: hub: identify the hub-device to usb_hub_reset_devicesPhilipp Tomsich1-1/+1
When usb_hub_reset_devices is called, it should be passed both an indicator which hub it should operate on and what port number (local to that hub) should be reset. Previously, the usb_hub.c code did not include such context and always started resets from port number 1, performing multiple reset-requests for the same devices: /* * Reset any devices that may be in a bad state when applying * the power. This is a __weak function. Resetting of the devices * should occur in the board file of the device. */ for (i = 0; i < dev->maxchild; i++) usb_hub_reset_devices(i + 1); This adds an additional 'hub' parameter to usb_hub_reset_devices that provides the context to fully qualify the port-number in. Existing implementations are changed to accept and ignore the new parameter. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Tested-by: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>
2017-10-21net: Add SMC911X driver to Kconfig, convertAdam Ford1-1/+2
We add the various SMC91XX symbols to drivers/net/Kconfig and then this converts the following to Kconfig: CONFIG_SMC911X CONFIG_SMC911X_BASE CONFIG_SMC911X_16_BIT CONFIG_SMC911X_32_BIT Signed-off-by: Adam Ford <aford173@gmail.com> [trini: Apply to the rest of the tree, re-squash old and new patch] Signed-off-by: Tom Rini <trini@konsulko.com>
2017-10-12arm: imx7d: add support for Compulab cl-som-imx7Ilya Ledvich8-0/+813
Add initial support for Compulab cl-som-imx7 SoM. The initial support includes: - MMC - eMMC - SPI flash - I2C - FEC - USB - Serial console Signed-off-by: Ilya Ledvich <ilya@compulab.co.il>
2017-09-18imx6: drop duplicated bss memset and board_init_r() callAnatolij Gustschin1-3/+0
bss section is cleared in crt0.S. board_init_r() is also entered from crt0 code. Signed-off-by: Anatolij Gustschin <agust@denx.de> Cc: Christian Gmeiner <christian.gmeiner@gmail.com> Cc: Nikita Kiryanov <nikita@compulab.co.il> Cc: Jagan Teki <jagan@amarulasolutions.com> Cc: Tim Harvey <tharvey@gateworks.com> Cc: Marek Vasut <marex@denx.de> Cc: Lukasz Majewski <lukma@denx.de> Cc: Fabio Estevam <fabio.estevam@nxp.com> Reviewed-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
2017-09-15arm: am57xx: cl-som-am57x: Use new pinctrl macrosSuman Anna1-52/+53
Commit 6ae4c3efbd62 ("ARM: DRA7: Add pinctrl register definitions") has added new macros for pinmux configuration in line with the kernel definitions. Fixup the current pinctrl data for the CompuLab CL-SOM-AM57x board to use these new macros to facilitate the removal of the old macros. NOTE: The PEN and PDIS macro values used previously were actually defined inversely, a value of 1 in bit position 16 actually means that the internal pullup/pulldown is disabled and not enabled as inferred by PEN. So, previous pinmux config data such as (PDIS | PTU) is confusing as it actually was meant for enabling internal pullup. The data is fixed up only to be equivalent to the previous data. Signed-off-by: Suman Anna <s-anna@ti.com>
2017-08-19Merge branch 'master' of git://git.denx.de/u-boot-mmcTom Rini1-0/+80
2017-08-17dm: imx: cm_fx6: Add MMC support for CONFIG_BLKSimon Glass1-0/+11
When CONFIG_BLK is enabled our weak board_mmc_init() will not be called. Since there is no clock driver for MX6 yet, we must manually enable the clocks. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-17dm: imx: cm_fx6: Support driver model for SATASimon Glass1-0/+69
Add support for using driver model for SATA with the cm_fx6 board. The old code remains for now to permit testing. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-16env: Rename eth_getenv_enetaddr() to eth_env_get_enetaddr()Simon Glass6-9/+9
Rename this function for consistency with env_get(). Signed-off-by: Simon Glass <sjg@chromium.org>