summaryrefslogtreecommitdiff
path: root/board/gdsys
AgeCommit message (Collapse)AuthorFilesLines
2021-09-30WS cleanup: remove trailing empty linesWolfgang Denk1-1/+0
Signed-off-by: Wolfgang Denk <wd@denx.de>
2021-09-28board: gdsys: a38x: ensure mdiodev->name is NULL terminated after ↵Vladimir Oltean1-3/+1
MDIO_NAME_LEN truncation strncpy() simply bails out when copying a source string whose size exceeds the destination string size, potentially leaving the destination string unterminated. One possible way to address is to pass MDIO_NAME_LEN - 1 and a previously zero-initialized destination string, but this is more difficult to maintain. The chosen alternative is to use strlcpy(), which properly limits the copy len in the (srclen >= size) case to "size - 1", and which is also more efficient than the strncpy() byte-by-byte implementation by using memcpy. The destination string returned by strlcpy() is always NULL terminated. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2021-08-02global: Convert simple_strtoul() with decimal to dectoul()Simon Glass1-8/+8
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-08-02global: Convert simple_strtoul() with hex to hextoul()Simon Glass2-17/+17
It is a pain to have to specify the value 16 in each call. Add a new hextoul() function and update the code to use it. Add a proper comment to simple_strtoul() while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-07-31arm: mvebu: gdsys: Remove custom spl_board_init()Pali Rohár2-21/+1
The gdsys a38x config file (controlcenterdc_defconfig) uses BootROM to load U-Boot proper. Since it is now possible to do this via U-Boot SPL framework, we do not need to provide custom spl_board_init() which calls return_to_bootrom(). Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2021-04-10ppc: Remove controlcenterd boardsTom Rini11-2036/+0
These boards have not been converted to CONFIG_DM_MMC by the deadline. Remove them. Cc: Mario Six <mario.six@gdsys.cc> Cc: Dirk Eibach <dirk.eibach@gdsys.cc> Signed-off-by: Tom Rini <trini@konsulko.com>
2021-04-10ppc: Remove gdsys hrcon boardsTom Rini11-1026/+3
These boards have not been converted to CONFIG_DM_MMC, along with other DM conversions, by the deadline. Remove them. Cc: Dirk Eibach <dirk.eibach@gdsys.cc> Signed-off-by: Tom Rini <trini@konsulko.com>
2021-04-10ppc: Remove gdsys strider boardsTom Rini9-861/+1
These boards have not been converted to CONFIG_DM_MMC, along with other DM conversions, by the deadline. Remove them. Cc: Dirk Eibach <dirk.eibach@gdsys.cc> Signed-off-by: Tom Rini <trini@konsulko.com>
2021-03-02tpm: Switch TPMv1 over to use the new APISimon Glass5-40/+40
Take over the plain 'tpm_...' functions for use by the new TPM API. Rename all the TPMv1 functions so they are called from the API. Update the TPMv1 functions so that they are called from the API. Change existing users to use the tpm1_ prefix so they don't need to go through the API, which might introduce uncertainty. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-02-26ddr: marvell: a38x: add support for twin-die combined memory deviceMoti Buskila1-0/+1
commit 6285efb8a118940877522c4c07bd7c64569b4f5f upstream. the twin-die combined memory device should be treatened as X8 device and not as X16 one Signed-off-by: Moti Buskila <motib@marvell.com> Reviewed-by: Kostya Porotchkin <kostap@marvell.com> [ - the default value for twin_die_combined is set to NOT_COMBINED for all boards, as this was default behaviour prior this change ] Signed-off-by: Marek Behún <marek.behun@nic.cz> Tested-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
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>
2020-11-06board: Rename uclass to sysinfoSimon Glass2-27/+32
This uclass is intended to provide a way to obtain information about a U-Boot board. But the concept of a U-Boot 'board' is the whole system, not just one circuit board, meaning that 'board' is something of a misnomer for this uclass. In addition, the name 'board' is a bit overused in U-Boot and we want to use the same uclass to provide SMBIOS information. The obvious name is 'system' but that is so vague as to be meaningless. Use 'sysinfo' instead, since this uclass is aimed at providing information on the system. Rename everything accordingly. Note: Due to the patch delta caused by the symbol renames, this patch shows some renamed files as being deleted in one place and created in another. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-07-17treewide: convert bd_t to struct bd_info by coccinelleMasahiro Yamada4-7/+7
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-05-19common: Drop linux/bitops.h from common headerSimon Glass5-0/+6
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-19common: Drop linux/delay.h from common headerSimon Glass10-0/+10
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-19common: Drop linux/stringify.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 log.h from common headerSimon Glass5-0/+5
Move this header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-19command: Remove the cmd_tbl_t typedefSimon Glass7-17/+23
We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-19common: Drop image.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 bootstage.h from common headerSimon Glass1-0/+1
Move this fairly uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-19common: Drop net.h from common headerSimon Glass2-0/+2
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-18common: Drop flash.h from common headerSimon Glass2-0/+2
Move this uncommon header out of the common header. Fix up some style problems in flash.h while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-18common: Move hang() to the same header as panic()Simon Glass1-0/+1
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 Glass1-0/+1
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 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>
2019-12-03common: Move pci_init_board() out of common.hSimon Glass2-0/+2
This function can be dropped when all boards use driver model for PCI. For now, move it into init.h with a comment. 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 Glass4-0/+4
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: Move command functions out of common.hSimon Glass2-0/+2
Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-03crc32: Use the crc.h header for crc functionsSimon Glass2-0/+2
Drop inclusion of crc.h in common.h and use the correct header directly instead. With this we can drop the conflicting definition in fw_env.h and rely on the crc.h header, which is already included. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-08-11env: Move env_get() to env.hSimon Glass4-0/+4
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_get_ulong() to env.hSimon Glass1-0/+1
Move env_get_ulong() over to the new header file. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-08-11env: Move env_set_ulong() to env.hSimon Glass1-0/+1
Move env_set_ulong() over to the new header file. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-05-21mpc83xx: Add gazerbeam boardDirk Eibach5-1/+211
The gdsys gazerbeam board is based on a Freescale MPC8308 SOC. It boots from NOR-Flash, kernel and rootfs are stored on SD-Card. On board peripherals include: - 2x 10/100 Mbit/s Ethernet (optional) Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc> Signed-off-by: Mario Six <mario.six@gdsys.cc>
2019-05-21gdsys: ioep-fpga: Switch to gazerbeam-style reportingMario Six1-140/+489
Use a more extensive FPGA feature reporting style in the gdsys ioep-fpga driver. Signed-off-by: Mario Six <mario.six@gdsys.cc>
2019-05-21gdsys: cmd_ioloop: Make DM compatibleMario Six1-5/+288
Make the ioloop command DM compatible, while keeping the old functionality for not-yet-converted boards. Signed-off-by: Mario Six <mario.six@gdsys.cc>
2019-05-21gdsys: cmd_ioloop: Introduce commenting enumMario Six1-4/+9
Replace the boolean parameter of io_check_status that controls whether the status is printed or not with a documenting enum. Signed-off-by: Mario Six <mario.six@gdsys.cc>
2019-05-21gdsys: cmd_ioloop: Fix style violationsMario Six1-40/+38
Fix some style violations in the ioloop command, and make the code more readable where possible. Signed-off-by: Mario Six <mario.six@gdsys.cc>
2019-05-21gdsys: mpc8308: Add FPGA flavor optionMario Six1-0/+20
More recent versions of IHS FPGAs feature a different memory layout. Add a Kconfig option to differentiate between the legacy layout, and the new layout (which is used on the upcoming "Gazerbeam" and later boards). Signed-off-by: Mario Six <mario.six@gdsys.cc>
2019-05-21gdsys: Introduce GDSYS_LEGACY_DRIVERSMario Six11-0/+58
Future gdsys boards will switch from the legacy drivers in board/gdsys/common to DM-based drivers. Define a Kconfig option that disables the legacy drivers. Signed-off-by: Mario Six <mario.six@gdsys.cc>
2019-05-21gdsys: mpc8308: Don't use manual RAM config if RAM driver is activeMario Six1-0/+4
The "manual" RAM configuration should not be used if the DM RAM driver is active, hence, disable the code if the CONFIG_MPC83XX_SDRAM config variable is defined. Signed-off-by: Mario Six <mario.six@gdsys.cc>
2019-05-21gdsys: mpc8308: Migrate SYS_FPGA{0, 1}_{BASE, SIZE} to KconfigMario Six1-0/+22
Move CONFIG_SYS_FPGA0_BASE, CONFIG_SYS_FPGA0_SIZE, CONFIG_SYS_FPGA1_BASE, and CONFIG_SYS_FPGA1_SIZE to Kconfig. Signed-off-by: Mario Six <mario.six@gdsys.cc>
2019-05-21gdsys: mpc8308: Use shadow register for output GPIO valuesMario Six4-3/+25
Since the gpio output status on MPC8xxx cannot be read back, it has to be buffered locally. Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc> Signed-off-by: Mario Six <mario.six@gdsys.cc>
2019-05-21gdsys: mpc8308: Fix style violationsMario Six3-57/+59
Fix some style violations in the gdsys MPC8308 board files, and make the code more readable. Signed-off-by: Mario Six <mario.six@gdsys.cc>
2019-05-21gdsys: Post ppc4xx removal cleanupMario Six2-131/+0
The ppc4xx architecture was removed, and with it several old gdsys 44x boards, but some "debris" from these purged boards was left over. This patch removes these remnants (mostly entries in Makefiles, some now superfluous data structures and some now obsolete config variables from the whitelist). Signed-off-by: Mario Six <mario.six@gdsys.cc>
2019-05-21gdsys: phy: Adapt fixup_88e1518() to latest Release NotesDirk Eibach1-2/+0
The initialization sequence in the newest release notes of the 88e1518 phy omits two commands. Remove them from the sequence. Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
2019-05-21ihs_mdio: Use new regmap interfaceMario Six1-2/+3
For the DM case, use the proper parameter for the regmap_init_mem call (which is the ofnode, not the udevice). Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-05-21mpc83xx: Get rid of CONFIG_SYS_DDR_SDRAM_BASEMario Six1-2/+2
CONFIG_SYS_DDR_SDRAM_BASE is set to the same value as CONFIG_SYS_SDRAM_BASE on all existing boards. Just use CONFIG_SYS_SDRAM_BASE instead. Signed-off-by: Mario Six <mario.six@gdsys.cc>
2019-05-21strider: Migrate to CONFIG_TARGET_STRIDERMario Six2-3/+3
Use the proper CONFIG_TARGET_STRIDER Kconfig option to replace the CONFIG_STRIDER ad-hoc config option. Signed-off-by: Mario Six <mario.six@gdsys.cc>
2019-05-21hrcon: Migrate to CONFIG_TARGET_HRCONMario Six2-2/+2
Use the proper CONFIG_TARGET_HRCON Kconfig option to replace the CONFIG_HRCON ad-hoc config option. Signed-off-by: Mario Six <mario.six@gdsys.cc>
2019-01-21board: mvebu: drop unused ETH_PHY macro definitionsBaruch Siach1-4/+0
These macros are not used anywhere in the boards code. Cc: Chris Packham <chris.packham@alliedtelesis.co.nz> Cc: Dirk Eibach <dirk.eibach@gdsys.cc> Cc: Mario Six <mario.six@gdsys.cc> Cc: Dennis Gilmore <dgilmore@redhat.com> Signed-off-by: Baruch Siach <baruch@tkos.co.il> Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>