aboutsummaryrefslogtreecommitdiff
path: root/board/nokia
AgeCommit message (Collapse)AuthorFilesLines
2021-02-02common: Drop asm/global_data.h from common headerSimon Glass1-0/+1
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 Rini1-2/+2
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>
2021-01-05Nokia RX-51: Decrease i2c speed to 100000Pali Rohár1-2/+2
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 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-11-15Nokia RX-51: Make onenand workingIvaylo Dimitrov2-0/+22
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ár1-2/+2
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ár1-0/+2
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ár1-6/+19
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 Yamada1-1/+1
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ár1-1/+1
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 Rini1-0/+1
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ár1-0/+1
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 Glass1-0/+1
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ár1-4/+19
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ár1-12/+6
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ár1-1/+8
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ár1-0/+1
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ár5-6/+6
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 Glass1-0/+1
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 Rini5-11/+5
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 Glass1-4/+4
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 Glass1-1/+1
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 Kocialkowski1-1/+1
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>
2015-06-12Nokia RX-51: Fix calculating return address in save_boot_paramsPali Rohár1-4/+0
Commit e11c6c279d823dc0d2f470c5c2e3c0a9854a640f broke calculating lr register in function save_boot_params() and caused U-Boot to crash at early boot time on Nokia N900 board. This patch fix calculating return address in lr register and make Nokia N900 board bootable again. Patch was tested in qemu and also on real N900 HW. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
2015-03-13ARM: OMAP3: rx51: Enable workaround for ARM errata 454179, 430973, 621766Nishanth Menon1-7/+12
RX51 has a secure logic which uses different parameters compared to traditional implementation. So, make the generic secure acr write over-ride-able by board file and refactor rx51 code to use this. While at it, enable the OMAP3 specific errata code for 454179, 430973, 621766. Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2015-02-16arm: Allow lr to be saved by board codeSimon Glass1-1/+2
The link register value can be required on some boards (e.g. FEL mode on sunxi) so use a branch instruction to jump to save_boot_params() instead of a branch link. This requires a branch back to save_boot_params_ret so adjust the users to deal with this. For exynos just drop the function since it doesn't do anything. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Siarhei Siamashka <siarhei.siamashka@gmail.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-01-12Nokia RX-51: Do not call secure PPA routine on non secure devicesPali Rohár1-1/+5
Since commit 41623c91b09a0c865fab41acdaff30f060f29ad6 u-boot running in qemu is crashing in function do_omap3_emu_romcode_call(). RX-51 board uses this function for Cortex-A8 errata 430973 workaround (Set IBE bit in ACR) which is needed only on real secure device and not in qemu. This board patch just disable calling secure PPA routine on non secure devices. Qemu implements GP device and with this patch u-boot is working in qemu again. Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Acked-by: Pavel Machek <pavel@ucw.cz>
2014-12-04omap_hsmmc: Board-specific TWL4030 MMC power initializationsPaul Kocialkowski1-0/+6
Boards using the TWL4030 regulator may not all use the LDOs the same way (e.g. MMC2 power can be controlled by another LDO than VMMC2). This delegates TWL4030 MMC power initializations to board-specific functions, that may still call twl4030_power_mmc_init for the default behavior. Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Reviewed-by: Tom Rini <trini@ti.com> [trini: Fix omap3_evm warning, add twl4030.h] Signed-off-by: Tom Rini <trini@ti.com>
2014-09-13kconfig: remove redundant "string" type in arch and board KconfigsMasahiro Yamada1-3/+0
Now the types of CONFIG_SYS_{ARCH, CPU, SOC, VENDOR, BOARD, CONFIG_NAME} are specified in arch/Kconfig. We can delete the ones in arch and board Kconfig files. This commit can be easily reproduced by the following command: find . -name Kconfig -a ! -path ./arch/Kconfig | xargs sed -i -e ' /config[[:space:]]SYS_\(ARCH\|CPU\|SOC\|\VENDOR\|BOARD\|CONFIG_NAME\)/ { N s/\n[[:space:]]*string// } ' Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-08-30omap3: kconfig: move board select menu and common settingsMasahiro Yamada1-8/+0
Becuase the board select menu in arch/arm/Kconfig is too big, move the OMAP3 board select menu to omap3/Kconfig. Move also common settings (CONFIG_SYS_CPU="armv7" and CONFIG_SYS_SOC="omap3 Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Reviewed-by: Tom Rini <trini@ti.com>
2014-07-30Add board MAINTAINERS filesMasahiro Yamada1-0/+6
We have switched to Kconfig and the boards.cfg file is going to be removed. We have to retrieve the board status and maintainers information from it. The MAINTAINERS format as in Linux Kernel would be nice because we can crib the scripts/get_maintainer.pl script. After some discussion, we chose to put a MAINTAINERS file under each board directory, not the top-level one because we want to collect relevant information for a board into a single place. TODO: Modify get_maintainer.pl to scan multiple MAINTAINERS files. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Suggested-by: Tom Rini <trini@ti.com> Acked-by: Simon Glass <sjg@chromium.org>
2014-07-30kconfig: add board Kconfig and defconfig filesMasahiro Yamada1-0/+23
This commit adds: - arch/${ARCH}/Kconfig provide a menu to select target boards - board/${VENDOR}/${BOARD}/Kconfig or board/${BOARD}/Kconfig set CONFIG macros to the appropriate values for each board - configs/${TARGET_BOARD}_defconfig default setting of each board (This commit was automatically generated by a conversion script based on boards.cfg) In Linux Kernel, defconfig files are located under arch/${ARCH}/configs/ directory. It works in Linux Kernel since ARCH is always given from the command line for cross compile. But in U-Boot, ARCH is not given from the command line. Which means we cannot know ARCH until the board configuration is done. That is why all the "*_defconfig" files should be gathered into a single directory ./configs/. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
2014-07-23stdio: Pass device pointer to stdio methodsSimon Glass1-3/+3
At present stdio device functions do not get any clue as to which stdio device is being acted on. Some implementations go to great lengths to work around this, such as defining a whole separate set of functions for each possible device. For driver model we need to associate a stdio_dev with a device. It doesn't seem possible to continue with this work-around approach. Instead, add a stdio_dev pointer to each of the stdio member functions. Note: The serial drivers have the same problem, but it is not strictly necessary to fix that to get driver model running. Also, if we convert serial over to driver model the problem will go away. Code size increases by 244 bytes for Thumb2 and 428 for PowerPC. 22: stdio: Pass device pointer to stdio methods arm: (for 2/2 boards) all +244.0 bss -4.0 text +248.0 powerpc: (for 1/1 boards) all +428.0 text +428.0 Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Marek Vasut <marex@denx.de> Reviewed-by: Marek Vasut <marex@denx.de>
2014-02-19Move #ifdef(CONFIG_DISPLAY_CPUINFO) from caller to calleeMasahiro Yamada1-2/+0
- When CONFIG_DISPLAY_CPUINFO is not enabled, print_cpuinfo() should be defined as an empty function in a header, include/common.h - Remove #ifdef CONFIG_DISPLAY_CPUINFO .. #endif from caller, common/board_f.c and arch/arm/lib/board.c - Remove redundant prototypes in arch/arm/lib/board.c, arch/arm/include/asm/arch-am33x/sys_proto.h and board/nokia/rx51/rx51.h, keeping the one in include/common.h - Add #ifdef CONFIG_DISPLAY_CPUINFO to the func definition where it is missing Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2013-11-01board: arm: convert makefiles to Kbuild styleMasahiro Yamada1-23/+2
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net> Cc: Andreas Bießmann <andreas.devel@googlemail.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Prafulla Wadaskar <prafulla@marvell.com> Cc: Minkyu Kang <mk7.kang@samsung.com> Cc: Vipin Kumar <vipin.kumar@st.com> Cc: Tom Warren <twarren@nvidia.com> Cc: Tom Rini <trini@ti.com>
2013-07-24Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk5-85/+5
Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
2013-05-10twl4030: make twl4030_i2c_read_u8 prototype consistentNishanth Menon1-8/+8
u-boot standard i2c read prototype is i2c_read(addr, reg, 1, &buf, 1) twl4030_i2c_read_u8(u8 addr, u8 *val, u8 reg) does not provide consistency, so switch the prototype to be consistent with rest of u-boot i2c operations: twl4030_i2c_read_u8(u8 addr, u8 reg, u8 *val) Signed-off-by: Nishanth Menon <nm@ti.com>
2013-05-10twl4030: make twl4030_i2c_write_u8 prototype consistentNishanth Menon1-18/+18
u-boot standard i2c register write prototype is i2c_reg_write(u8 addr, u8 reg, u8 val) twl4030_i2c_write_u8(u8 addr, u8 val, u8 reg) does not provide consistency, so switch the prototype to be consistent with rest of u-boot i2c operations: twl4030_i2c_write_u8(u8 addr, u8 reg, u8 val) Signed-off-by: Nishanth Menon <nm@ti.com>
2013-03-08omap_hsmmc: add driver check for write protectionNikita Kiryanov1-2/+2
Add check for write protection in omap mmc driver. Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Signed-off-by: Igor Grinberg <grinberg@compulab.co.il> Reviewed-by: Tom Rini <trini@ti.com>
2013-03-08omap_hsmmc: implement driver check for card detectionNikita Kiryanov1-2/+2
Implement driver check for card detection. Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
2012-10-30New board support: Nokia RX-51 aka N900Pali Rohár5-0/+1632
Based on previous work by: Alistair Buxton <a.j.buxton@gmail.com> Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Cc: Ивайло Димитров <freemangordon@abv.bg>