summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/utils.c
AgeCommit message (Collapse)Author
2020-05-18common: Drop part.h from common headerSimon Glass
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18part: Drop disk_partition_t typedefSimon Glass
We should not be using typedefs and these make it harder to use forward declarations (to reduce header file inclusions). Drop the typedef. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-08-11env: Drop environment.h header file where not neededSimon Glass
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_set() to env.hSimon Glass
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-07-31omap: Correct the fastboot product varSam Protsenko
"fastboot flashall" expects "fastboot getvar product" value to be one of values provided in android-info.txt file (in AOSP), from "require board=" list. Before this patch, "am57xx" is returned for all AM57xx based boards, as it's set in $board env var from SYS_BOARD in board/ti/am57xx/Kconfig file, which is used for default implementation of "fastboot getvar product". In order to fix that inconsistency, let's do next: 1. In U-Boot: override fastboot.product, reusing the value from $board_name 2. In AOSP: provide values for all AM57xx boards we can use to device/ti/beagle_x15/board-info.txt file This way requirements check in "fastboot flashall" will work as expected, verifying that user tries to flash images to the board which those images were built for. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Acked-by: Andrew F. Davis <afd@ti.com>
2018-05-30fastboot: Correct dependencies in FASTBOOT_FLASHAlex Kiernan
Ensure that when selecting FASTBOOT_FLASH you end up with a buildable configuration. Prior to this you could select NAND without MTDPARTS and end up with an image which (surprisingly) excluded NAND. Also fix dependencies on FASTBOOT_GPT_NAME/FASTBOOT_MBR_NAME which require you have EFI_PARTITION/DOS_PARTITION enabled. Delete redundant FASTBOOT_FLASH_NAND_DEV from Kconfig - it was only ever used as a guard and the value was ignored in all cases, we're using FASTBOOT_FLASH_NAND as the guard now. Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
2018-05-08arm: dra76: fastboot: extend cpu type for getvar commandPraneeth Bajjuri
'commit dda0bd674481 ("arm: dra762: Add support for device package identification")' introduces ABZ and ACD package identification. This patch is to extend usage of "fastboot getvar cpu" for DRA76x ABZ and ACD devices. Helps in fixing the boot warning. Warning: fastboot.cpu: unknown CPU rev: 123863298 on CPU : DRA762-GP ES1.0 ABZ package Model: TI AM5748 IDK Board: AM574x IDK REV 1.0A Signed-off-by: Praneeth Bajjuri <praneeth@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2018-05-07SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini
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-08net: Move enetaddr env access code to env config instead of net configAlex Kiernan
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-03-13omap: Fix AM335x build with enabled fastboot flashSam Protsenko
When enabling CONFIG_FASTBOOT_FLASH in am335x_boneblack_defconfig, next build errors and warnings occur: arch/arm/mach-omap2/utils.c: In function ‘omap_set_fastboot_cpu’: arch/arm/mach-omap2/utils.c:26:16: warning: implicit declaration of function ‘omap_revision’ [-Wimplicit-function-declaration] u32 cpu_rev = omap_revision(); ^~~~~~~~~~~~~ arch/arm/mach-omap2/utils.c:29:7: error: ‘DRA762_ES1_0’ undeclared (first use in this function) Include asm/omap_common.h explicitly to avoid those. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Acked-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-12-02omap2: set the ethaddr as well as the usbethaddr env var to ensure static MACPeter Robinson
The kernel gets the ethernet MAC from the ethaddr variable, the omap boards for devices with USB based eth adapters just set the usbethaddr which doesn't appear to get passed to the kernel. The same Raspberry Pi code sets both ethaddr and usbethaddr so lets do that so linux (tested 4.13 and 4.14) get a static rather than a random MAC address, while not regressing users of usbethaddr. Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
2017-10-16arm: dra76: fastboot: extend cpu type for getvar commandPraneeth Bajjuri
'commit fa24eca1f20a ("omap: Add routine for setting fastboot variables")' adds initial support and usage of "fastboot getvar" command for DRA75x and DRA72x devices. and 'commit 0f9e6aee9dbc ("arm: dra76: Add support for ES1.0 detection")' adds initial dra76 device definition This patch is to extend usage of "fastboot getvar" for DRA76 device. Signed-off-by: Praneeth Bajjuri <praneeth@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-10-16omap-common: fastboot: extend cpu type for DRA71x rev 2.1Vishal Mahaveer
DRA71x processors are reduced pin and software compatible derivative of DRA72 processors. Extend support for this revision in "getvar cpu" command. Signed-off-by: Vishal Mahaveer <vishalm@ti.com> [praneeth@ti.com: rebase to u-boot master] Signed-off-by: Praneeth Bajjuri <praneeth@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-10-06omap: Fix warning when looking for userdata partSam Protsenko
When eMMC was formattaed for Linux partition table, "userdata" partition is missing. In this case, part_get_info_by_name() iterates over all registered drivers (which are PART_TYPE_EFI, PART_TYPE_DOS and PART_TYPE_ISO). And when it comes to PART_TYPE_ISO (which has empty partition table), we can see next warning in U-Boot output: ** First descriptor is NOT a primary desc on 1:1 ** This patch switches to part_get_info_by_name_type() API in order to check only EFI partitions for "userdata" partitions. This eliminates mentioned warning. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-10-06omap: Omit fastboot.userdata_size related errorsSam Protsenko
When using regular $partitions variable (for Linux boot), we can see some unwanted messages: > ERROR: cannot find partition: 'userdata' > at arch/arm/mach-omap2/utils.c:96/omap_mmc_get_part_size() > Warning: fastboot.userdata_size: unable to calc Let's remove those, as missing 'userdata' partition is correct behavior for Linux partition, and we don't want to see some Android-related messages in this case. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
2017-10-04treewide: replace with error() with pr_err()Masahiro Yamada
U-Boot widely uses error() as a bit noisier variant of printf(). This macro causes name conflict with the following line in include/linux/compiler-gcc.h: # define __compiletime_error(message) __attribute__((error(message))) This prevents us from using __compiletime_error(), and makes it difficult to fully sync BUILD_BUG macros with Linux. (Notice Linux's BUILD_BUG_ON_MSG is implemented by using compiletime_assert().) Let's convert error() into now treewide-available pr_err(). Done with the help of Coccinelle, excluing tools/ directory. The semantic patch I used is as follows: // <smpl> @@@@ -error +pr_err (...) // </smpl> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org> [trini: Re-run Coccinelle] Signed-off-by: Tom Rini <trini@konsulko.com>
2017-08-16env: Rename getenv/_f() to env_get()Simon Glass
We are now using an env_ prefix for environment functions. Rename these two functions for consistency. Also add function comments in common.h. Quite a few places use getenv() in a condition context, provoking a warning from checkpatch. These are fixed up in this patch also. Suggested-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-16env: Rename eth_setenv_enetaddr() to eth_env_set_enetaddr()Simon Glass
Rename this function for consistency with env_set(). Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-16env: Rename setenv() to env_set()Simon Glass
We are now using an env_ prefix for environment functions. Rename setenv() for consistency. Also add function comments in common.h. Suggested-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-12omap: Add routine for setting fastboot variablesSemen Protsenko
This patch reuses new option, which allows us to expose variables from environment to "fastboot getvar" command. Those variables must be of "fastboot.%s" format. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
2017-06-05arm: Include asm/setup.h explictlySimon Glass
Include this header where needed so we do not need to rely on common.h. Signed-off-by: Simon Glass <sjg@chromium.org>
2016-11-21arm: Introduce arch/arm/mach-omap2 for OMAP2 derivative platformsTom Rini
This moves what was in arch/arm/cpu/armv7/omap-common in to arch/arm/mach-omap2 and moves arch/arm/cpu/armv7/{am33xx,omap3,omap4,omap5} in to arch/arm/mach-omap2 as subdirectories. All refernces to the former locations are updated to the current locations. For the logic to decide what our outputs are, consolidate the tests into a single config.mk rather than including 4. Signed-off-by: Tom Rini <trini@konsulko.com>