aboutsummaryrefslogtreecommitdiff
path: root/board/nokia
AgeCommit message (Collapse)Author
2022-12-09Nokia RX-51: Use ENTRY/ENDPROC for save_boot_paramsPali Rohár
ENTRY/ENDPROC macros from linux/linkage.h will make code more readable and also will properly mark assembly symbol in ELF binary as function symbol. Signed-off-by: Pali Rohár <pali@kernel.org>
2022-12-05Nokia RX-51: Migrate legacy USB device options to KconfigTom Rini
Move a number of legacy USB UDC options to Kconfig, over from the config header. Cc: Pali Rohár <pali@kernel.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-05global: Move remaining CONFIG_SYS_* to CFG_SYS_*Tom Rini
The rest of the unmigrated CONFIG symbols in the CONFIG_SYS namespace do not easily transition to Kconfig. In many cases they likely should come from the device tree instead. Move these out of CONFIG namespace and in to CFG namespace. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-12-05global: Move remaining CONFIG_SYS_NS16550_* to CFG_SYS_NS16550_*Tom Rini
The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NS16550 namespace do not easily transition to Kconfig. In many cases they likely should come from the device tree instead. Move these out of CONFIG namespace and in to CFG namespace. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-10-31Rename CONFIG_SYS_TEXT_BASE to CONFIG_TEXT_BASESimon Glass
The current name is inconsistent with SPL which uses CONFIG_SPL_TEXT_BASE and this makes it imposible to use CONFIG_VAL(). Rename it to resolve this problem. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-18Nokia RX-51: Fix compilation with non-zero CONFIG_SYS_TEXT_BASEPali Rohár
For some unknown reason GNU assembler version 2.31.1 (arm-linux-gnueabi-as from Debian Buster) cannot compile following code from located in file board/nokia/rx51/lowlevel_init.S: kernoffs: .word KERNEL_OFFSET - (. - CONFIG_SYS_TEXT_BASE) when CONFIG_SYS_TEXT_BASE is set to 0x80008000. It throws strange compile error which is even without line number: AS board/nokia/rx51/lowlevel_init.o {standard input}: Assembler messages: {standard input}: Error: attempt to get value of unresolved symbol `L0' make[2]: *** [scripts/Makefile.build:293: board/nokia/rx51/lowlevel_init.o] Error 1 I have no idea about this error and my experiments showed that ARM GNU assembler is happy with negation of that number. So changing code to: kernoffs: .word . - CONFIG_SYS_TEXT_BASE - KERNEL_OFFSET and then replacing mathematical addition by substraction of "kernoffs" value (so calculation of address does not change) compiles assembler file without any error now. There should be not any functional change. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2022-10-12Nokia RX-51: Fix double space key pressPali Rohár
Space key is indicated by two different bits. Some HW models indicate press of space key only by the first bit. Qemu indicates it by both bits at the same time, which is currently interpreted by u-boot as double key press. Fix this issue by setting first bit when only second is set (to support HW models which indicate press only by second bit) and always clearing second bit before processing to not report double space key press. Signed-off-by: Pali Rohár <pali@kernel.org>
2022-09-18cyclic: Use schedule() instead of WATCHDOG_RESET()Stefan Roese
Globally replace all occurances of WATCHDOG_RESET() with schedule(), which handles the HW_WATCHDOG functionality and the cyclic infrastructure. Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Tom Rini <trini@konsulko.com> [am335x_evm, mx6cuboxi, rpi_3,dra7xx_evm, pine64_plus, am65x_evm, j721e_evm]
2022-09-15Nokia RX-51: Do not clear unknown memory in lowlevel_init.SPali Rohár
If kernel image in uImage or zImage format is not detected by lowlevel_init.S code then do not clear memory location where image was expected. If image is not detected then this memory region is unknown. So do not unconditionally clear it. Signed-off-by: Pali Rohár <pali@kernel.org>
2022-09-15Nokia RX-51: Remove label copy_kernel_start from lowlevel_init.SPali Rohár
Label copy_kernel_start is now unused. Remove it. Signed-off-by: Pali Rohár <pali@kernel.org>
2022-08-20Nokia RX-51: Move board required options from defconfig to KconfigPali Rohár
Some of config options are board specific and should be set in into their default values automatically. So move them from defconfig file to Kconfig definitions to ensure that possible user custom defconfig files would have these required options also enabled. Signed-off-by: Pali Rohár <pali@kernel.org>
2022-08-20Nokia RX-51: Simplify calculation of attached kernel image addressPali Rohár
Now when board starup code does not copy image to CONFIG_SYS_TEXT_BASE address there is no need to calculate all addresses from base address at runtime. The only address which needs to be calculated is attached kernel image address which can be simplified at compile time without need to know CONFIG_SYS_TEXT_BASE address or relocation address at the runtime. Signed-off-by: Pali Rohár <pali@kernel.org>
2022-08-20Nokia RX-51: Simplify copy kernel codePali Rohár
Expression (r + (r0 - r1)) produce same result as (r - (r1 - r0)). So it does not matter which one is called. Always call the first option and remove second one. Signed-off-by: Pali Rohár <pali@kernel.org>
2022-08-20Nokia RX-51: Use U-Boot generic position independent codePali Rohár
Switch from custom board specific fixup/copy code to U-Boot generic position independent code provided by config option POSITION_INDEPENDENT. This also slightly decrease size of u-boot.bin binary (by 52 bytes). Note that option POSITION_INDEPENDENT increase size but not more than custom board fixup/copy code which is being deleted (as it is not needed anymore). Signed-off-by: Pali Rohár <pali@kernel.org>
2022-08-20Nokia RX-51: Fix invalidating zImage kernel formatPali Rohár
Prior starting copy of kernel image to target location, invalidate also zImage magic header. This ensures that on target location would be image with valid header only in the case valid header was also in the source location and copy from source to target finished successfully. Copy is always skipped when kernel image in source location is invalid. Add also comment to the code which explain what is the code doing. Fixes: cc434fccba4c ("Nokia RX-51: Add support for booting kernel in zImage format") Signed-off-by: Pali Rohár <pali@kernel.org>
2022-05-09Nokia RX-51: Convert to CONFIG_DM_SERIALPali Rohár
For CONFIG_DM_SERIAL it is required to increase CONFIG_SYS_MALLOC_F_LEN as default value is not enough for memory hungry CONFIG_DM_SERIAL code. Signed-off-by: Pali Rohár <pali@kernel.org> Tested-by: Merlijn Wajer <merlijn@wizzup.org>
2022-03-09Nokia RX-51: Convert to CONFIG_DM_VIDEOPali Rohár
Mechanically convert video_hw_init() function to UCLASS_VIDEO probe callback and replace CONFIG_CFB_CONSOLE by CONFIG_DM_VIDEO. As framebuffer base address is setup by the bootloader which loads U-Boot, set plat->base to that fixed framebuffer address. This change was tested in qemu n900 machine and is working fine. What does not work is CONFIG_VIDEO_LOGO, seems to be buggy. Signed-off-by: Pali Rohár <pali@kernel.org>
2022-02-08Nokia RX-51: Convert to CONFIG_DM_KEYBOARDPali Rohár
Signed-off-by: Pali Rohár <pali@kernel.org>
2022-01-29Nokia RX-51: Convert documentation to rst formatPali Rohár
Convert documentation to rst format Signed-off-by: Pali Rohár <pali@kernel.org> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2021-09-07arm: Disable ATAGs supportTom Rini
With the exceptions of ds109, ds414, icnova-a20-swac, nokia_rx51 and stemmy, disable ATAG support. A large number of platforms had enabled support but never supported a kernel so old as to require it. Further, some platforms are old enough to support both, but are well supported by devicetree booting, and have been for a number of years. This is because some of the ATAGs related functions have been re-used to provide the same kind of information, but for devicetree or just generally to inform the user. When needed still, rename these functions to get_board_revision() instead, to avoid conflicts. In other cases, these functions were simply unused, so drop them. Cc: Andre Przywara <andre.przywara@arm.com> Cc: Jagan Teki <jagan@amarulasolutions.com> Cc: Phil Sutter <phil@nwl.cc> Cc: Stefan Bosch <stefan_b@posteo.net> Signed-off-by: Tom Rini <trini@konsulko.com>
2021-07-15Nokia RX-51: Add support for booting kernel in zImage formatPali Rohár
Enable U-Boot bootz command and update env scripts to try loading also zImage file and to try booting via bootz command. Update also lowlevel_init.S code for checking validity of zImage magic to correctly relocate kernel in zImage format. This change allows U-Boot to directly boot Linux kernel without need for converting kernel image into U-Boot uImage format. Signed-off-by: Pali Rohár <pali@kernel.org> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Link: https://lore.kernel.org/r/20210618132704.32066-1-pali@kernel.org
2021-06-09Nokia RX-51: Enable CONFIG_WDT to remove deprecation warningPali Rohár
Also convert CONFIG_HW_WATCHDOG to CONFIG_WATCHDOG. Signed-off-by: Pali Roh?r <pali@kernel.org> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Link: https://lore.kernel.org/r/20210309201915.16586-1-pali@kernel.org
2021-03-03Nokia RX-51: Move content of rx51.h to rx51.cPali Rohár
After removal of MUX configuration there is no need to have extra rx51.h. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Lukasz Majewski <lukma@denx.de> Acked-by: Pavel Machek <pavel@ucw.cz>
2021-03-03Nokia RX-51: Remove function set_muxconf_regs()Pali Rohár
This function is not used and was never called. This board contains '#define CONFIG_SKIP_LOWLEVEL_INIT' because X-Loader set everything up, including MUX configuration. Also this MUX configuration is incorrect and does not match hardware. So remove this dead, unused and broken code. This change will decrease size of U-Boot binary. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Lukasz Majewski <lukma@denx.de> Acked-by: Pavel Machek <pavel@ucw.cz>
2021-02-15Merge branch '2021-02-02-drop-asm_global_data-when-unused'Tom Rini
- Merge the patch to take <asm/global_data.h> out of <common.h>
2021-02-04Nokia RX-51: Convert to CONFIG_DM_MMCPali Rohár
Move twl4030_power_mmc_init() from board_mmc_power_init() to misc_init_r() and disable CONFIG_SYS_MALLOC_F. Otherwise U-Boot cannot initialize MMC. Also disable CONFIG_CMD_SLEEP CONFIG_DM_DEVICE_REMOVE CONFIG_MMC_VERBOSE to free some space. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2021-02-02common: Drop asm/global_data.h from common headerSimon Glass
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-11Merge branch 'next'Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2021-01-05dm: Rename U_BOOT_DEVICE() to U_BOOT_DRVINFO()Simon Glass
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>
2021-01-05Nokia RX-51: Decrease i2c speed to 100000Pali Rohár
It looks like that i2c bus lot of times timeout on some units. Prior migration to CONFIG_DM_I2C i2c speed was set to CONFIG_SYS_OMAP24_I2C_SPEED value which was 100000. Lower speed fixes timeout problems, so change speed back to its previous value. Signed-off-by: Pali Rohár <pali@kernel.org> Fixes: 8d8c18170325 ("Nokia RX-51: Convert to CONFIG_DM_I2C") Reviewed-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2020-12-13dm: treewide: Rename ..._platdata variables to just ..._platSimon Glass
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-11-15Nokia RX-51: Make onenand workingIvaylo Dimitrov
set_gpmc_cs0() sets wrong timings and size for Nokia N900 onenand flash. Fix that by setting the correct timings and size from the board code Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> Tested-by: Pali Rohár <pali@kernel.org>
2020-11-15Nokia RX-51: During init disable lp5523 led instead of resetting itPali Rohár
After commit d5243359e1af ("OMAP24xx I2C: Add support for set-speed") U-Boot is unstable to reset lp5523 led. That commit added pooling for i2c poll ARDY bit which apparently is never set. It is not known what is happening here. Purpose of resetting lp5523 led in Nokia RX-51 code is just to turn off very bright led which is powered on by NOLO and expects next boot image (kernel or U-Boot) to turn it off. After testing we observed that just disabling lp5523 led is working fine. So as a workaround to this ARDY bit i2c issue we disable lp5523 led instead of resetting it. Signed-off-by: Pali Rohár <pali@kernel.org> Cc: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
2020-11-15Nokia RX-51: Fix crashing in U-Boot mmc function omap_hsmmc_stop_clock()Pali Rohár
After commit 04a2ea248f58 ("mmc: disable UHS modes if Vcc cannot be switched on and off") U-Boot started crashing on Nokia RX-51 while initializing mmc and caused reboot loop. It looks like that some clocks were not enabled and this patch fixes U-Boot mmc crash. Signed-off-by: Pali Rohár <pali@kernel.org> Cc: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
2020-11-15Nokia RX-51: Convert to CONFIG_DM_I2CPali Rohár
Use twl4030_i2c_read(), i2c_get_chip_for_busnum() and remove CONFIG_SYS_I2C. Signed-off-by: Pali Rohár <pali@kernel.org>
2020-07-17treewide: convert bd_t to struct bd_info by coccinelleMasahiro Yamada
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-06-13Nokia RX-51: Fix checking if serial console was enabledPali Rohár
There was incorrect logic for parsing OMAP_TAG_UART atag. Signed-off-by: Pali Rohár <pali@kernel.org>
2020-05-25Merge tag 'ti-v2020.07-rc3' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-ti - Enable DM_ETH on omap3_logic board - Enable Caches in SPL for K3 platforms - Enable backup boot mode support for J721E - Update the DDR timings for AM654 EVM - Add automated tests for RX-51
2020-05-19Nokia RX-51: Add automated test for running RX-51 build in qemuPali Rohár
This patch contains test/nokia_rx51_test.sh script which automatically download and compile all needed tools in local temporary directory to generate a simple MTD images for booting Maemo kernel image by U-Boot from RAM, eMMC and OneNAND. MTD images are then run in virtual n900 machine provided by qemu-linaro project. This script does not need any special privileges, so it can be run as non-root nobody user. It can be used to check that U-Boot for Nokia N900 is not broken and can be successfully booted in emulator. Script is registered to .azure-pipelines.yml, .gitlab-ci.yml and .travis.yml so it would be automatically run on those CI services. Signed-off-by: Pali Rohár <pali@kernel.org>
2020-05-18common: Drop init.h from common headerSimon Glass
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-11Nokia RX-51: Remember setup_console_atag optionPali Rohár
When variable setup_console_atag is unset then read default value from OMAP atags which passed NOLO bootloader to U-Boot. This would allow to boot Maemo Linux kernel from U-Boot with serial console settings configured in NOLO bootloader (which loads U-Boot). So serial console needs to be enabled only at one place, globally in NOLO. Signed-off-by: Pali Rohár <pali@kernel.org>
2020-05-11Nokia RX-51: Remove PART* macrosPali Rohár
Now when code for defining partitions is duplicated at two locations (option CONFIG_MTDPARTS_DEFAULT in nokia_rx51_defconfig file and macro OMAP_TAG_PARTITION_CONFIG in rx51.c file) there is no need to have common macros. Lets inline PART* macros to rx51.c file. Signed-off-by: Pali Rohár <pali@kernel.org>
2020-05-11Nokia RX-51: Move comment about CONFIG_SYS_TEXT_BASE to correct placePali Rohár
In commit commit 278b90ce786f ("configs: Migrate CONFIG_SYS_TEXT_BASE") was moved definition for CONFIG_SYS_TEXT_BASE option but author probably forgot to move also comment for lines which are moving. So do it now! Signed-off-by: Pali Rohár <pali@kernel.org>
2020-05-11Nokia RX-51: Add README.nokia_rx51 file to MAINTAINERSPali Rohár
This entry was missing in MAINTAINERS file. Signed-off-by: Pali Rohár <pali@kernel.org>
2020-05-11Nokia RX-51: Update my email addressPali Rohár
I'm using a new email address, so reflect this state also in U-Boot. Signed-off-by: Pali Rohár <pali@kernel.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>
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>
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 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>
2015-10-22omap-common: Common function to display die id, replacing omap3-specific versionPaul Kocialkowski
This introduces omap_die_id_display to display the full die id. There is no need to store it in an environment variable, that no boot script is using anyway. Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Reviewed-by: Tom Rini <trini@konsulko.com>