summaryrefslogtreecommitdiff
path: root/arch/arm/mach-davinci
AgeCommit message (Collapse)AuthorFilesLines
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 Glass3-0/+3
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-05serial: Rename ns16550 functions to lower caseSimon Glass2-3/+3
Lower case should be used for function names. Update this driver and its callers accordingly. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2021-01-05serial: Update NS16550_t and struct NS16550Simon Glass2-4/+4
Typedefs should not be used in U-Boot and structs should be lower case. Update the code to use struct ns16550 consistently. Put a header guard on the file while we are here. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2020-07-29Makefile: Rename ALL-y to INPUTS-ySimon Glass1-1/+1
When binman is in use, most of the targets built by the Makefile are inputs to binman. We then need a final rule to run binman to produce the final outputs. Rename the variable to indicate this, and add a new 'inputs' target. 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 manuallyMasahiro Yamada1-1/+1
Some code was not converted by coccinelle, somehow. I manually fixed up the remaining, and comments, README docs. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> [trini: Add arch/arm/mach-davinci/include/mach/sdmmc_defs.h and include/fdt_support.h] Signed-off-by: Tom Rini <trini@konsulko.com>
2020-06-13mmc: davinci_mmc: Cleanup to use dt in U-boot and static platdata in SPLFaiz Abbas1-0/+7
Cleanup this driver to use dt in U-boot and static platdata in SPL. This requires the following steps: 1. Move all platdata assignment from probe() to ofdata_to_platdata(). This function is only called in U-boot. 2. Replicate all the platdata assignment being done in ofdata_to_platdata() in the omapl138 board file. This data is used in the SPL case where SPL_OF_CONTROL is not enabled. 3. Remove SPL_OF_CONTROL and related configs from omapl138_lcdk_defconfig This cleanup effectively reverts 3ef94715cc ('mmc: davinci: fix mmc boot in SPL') Signed-off-by: Faiz Abbas <faiz_abbas@ti.com> Tested-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2020-05-19common: Drop linux/delay.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 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 Glass4-0/+4
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-03-17mach-davinci: Hard-code the default SPL_LDSCRIPT pathTom Rini1-1/+1
As there is only one linker script to use in this case, rather than use the BOARDDIR variable hard-code the path. Cc: Lokesh Vutla <lokeshvutla@ti.com> Suggested-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Masahiro Yamada <masahiroy@kernel.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 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>
2019-12-15dm: gpio: Allow control of GPIO uclass in SPLSimon Glass1-1/+1
At present if CONFIG_SPL_GPIO_SUPPORT is enabled then the GPIO uclass is included in SPL/TPL without any control for boards. Some boards may want to disable this to reduce code size where GPIOs are not needed in SPL or TPL. Add a new Kconfig option to permit this. Default it to 'y' so that existing boards work correctly. Change existing uses of CONFIG_DM_GPIO to CONFIG_IS_ENABLED(DM_GPIO) to preserve the current behaviour. Also update the 74x164 GPIO driver since it cannot build with SPL. This allows us to remove the hacks in config_uncmd_spl.h and Makefile.uncmd_spl (eventually those files should be removed). Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-12-03board: omapl138_lcdk: add the mmc device to SPLBartosz Golaszewski1-0/+1
We don't have full device-tree support in SPL yet - add an appropriate U_BOOT_DEVICE() to the board file. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2019-12-03mmc: davinci: drop support for ti,dm6441-mmcBartosz Golaszewski1-6/+0
The DM family of DaVinci SoCs is no longer supported. Drop the irrelevant code from the driver. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2019-12-03common: Move get_ticks() function out of common.hSimon Glass1-0/+1
This function belongs in time.h so move it over and add a comment. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-09-13ARM: omapl138_lcdk: Enable DM_GPIO and DM and GPIO CommandsAdam Ford1-4/+0
The da8xx GPIO driver is available with DM_GPIO support. This patch enables the CMD_GPIO, CMD_DM, and DM_GPIO and DA8XX_GPIO. Signed-off-by: Adam Ford <aford173@gmail.com>
2019-08-11env: Drop environment.h header file where not neededSimon Glass1-1/+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_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>
2019-07-25net: davinci_emac: convert to using the driver modelBartosz Golaszewski1-13/+0
Now that we removed all legacy boards selecting TI_EMAC we can completely convert the driver code to using the driver model. This patch also updates all remaining users of davinci_emac. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Tested-by: Adam Ford <aford173@gmail.com> #am3517-evm & da850-evm Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2019-06-05arm: davinci: remove leftover assemblyBartosz Golaszewski2-696/+0
There are no more users of lowlevel_init.S. Remove the file. Suggested-by: Adam Ford <aford173@gmail.com> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2019-06-05ARM: davinci: Remove ipam390 linker script from KconfigAdam Ford1-1/+0
With ipam390 support removed in we can remove the reference to the linker script since that case will never be true. Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2019-06-05ARM: davinci: SPL: fix BSS initializationSekhar Nori1-1/+4
U-Boot README recommends initializing SDRAM in board_init_f(). DA850 was doing it as part of board_init_r() (through call to spl_board_init() which calls arch_cpu_init() which calls da850_ddr_setup()) This worked fine till commit 15b8c7505819 ("davinci: da850evm/omapl138-lcdk: Move BSS to SDRAM because SRAM is full") moved BSS to SDRAM. Functions like mmc_initialize() called in board_init_r() assume BSS is available. Since SDRAM was not initialized when arch/arm/lib/crt0.S tried to initialize BSS to 0, BSS is not initialized correctly. Fix this by simply calling arch_cpu_init() from board_init_f(). Also move preloader_console_init() there to help debug issues with board_init_r(). With this spl_board_init() is no longer needed, we remove it. Tested using MMC/SD boot on OMAP-L138 LCDK board. Tested-by: Adam Ford <aford173@gmail.com> #da850evm Signed-off-by: Sekhar Nori <nsekhar@ti.com> Tested-by: Peter Howard <phoward@gme.net.au> #omapl138_lcdk
2019-05-28ipam390: remove boardBartosz Golaszewski1-7/+0
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> Acked-by: Heiko Schocher <hs@denx.de>
2019-05-28ea20: remove boardBartosz Golaszewski1-7/+0
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> Acked-by: Stefano Babic <sbabic@denx.de>
2019-05-28calimain: remove boardBartosz Golaszewski1-5/+0
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-05-04arm: davinci: remove leftover code for dm* SoCsBartosz Golaszewski15-1133/+3
The support for DaVinci DM* SoCs has been dropped a while ago. There's still a lot of leftover code in mach-davinci though. Entirely remove certain files and modify the common code to no longer reference unsupported chips. Note: all DaVinci platforms supported in u-boot now define SOC_DA8XX but not all define SOC_DA850 (e.g. omapl138). We can safely remove all ifdefs for the former, but let's leave the ones for the latter. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2019-05-04arm: davinci: remove dead code for PHYs used by DaVinci DM* boardsBartosz Golaszewski6-354/+0
The support for DaVinci DM* boards has been dropped a while ago. The code for all those PHYs is no longer used and they have their own proper PHY drivers in drivers/net/phy anyway. Remove all dead code. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2019-05-03ARM: davinci: Remove unused functions from headerAdam Ford1-3/+0
There are a few functions defined in the header file, but they are not referenced by any Davinci code. In order to make a general function in the future with static function declarations, this patch will remove the references all together. Signed-off-by: Adam Ford <aford173@gmail.com>
2018-11-05driver: net: consolidate ti's code in separate folderGrygorii Strashko4-4/+4
Add drivers/net/ti/ folder and move all TI's code in this folder for better maintenance. Reviewed-by: Tom Rini <trini@konsulko.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
2018-10-10gpio: da8xx: Push generic defines of gpio.h out of mach-davinciKeerthy1-32/+0
Push generic defines of gpio.h out of mach-davinci to drivers/gpio now that non-davinci architectures are beginning to use this IP. Signed-off-by: Keerthy <j-keerthy@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> [trini: Fix calimain build] Signed-off-by: Tom Rini <trini@konsulko.com>
2018-09-29ARM: da850evm_direct_nor_defconfig: Enable DM_SERIALAdam Ford1-2/+2
With DM enabled, this patch enables DM_SERIAL and removes the NS16550 initialization from da850_lowlevel since the driver will take care of that itself. Signed-off-by: Adam Ford <aford173@gmail.com>
2018-09-14Revert "ARM: da850evm_direct_nor_defconfig: Enable DM_SERIAL"Tom Rini1-2/+2
This commit is breaking several variants of da850, so: This reverts commit 5f389201dece76b484443773dce2525dc205f5a1. Signed-off-by: Tom Rini <trini@konsulko.com>
2018-09-12ARM: da850evm_direct_nor_defconfig: Enable DM_SERIALAdam Ford1-2/+2
With DM enabled, this patch enables DM_SERIAL and removes the NS16550 initialization from da850_lowlevel since the driver will take care of that itself. Signed-off-by: Adam Ford <aford173@gmail.com>
2018-07-30Kconfig: Sort bool, default, select and imply optionsMichal Simek1-2/+2
Another round of sorting Kconfig entries aplhabetically. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@konsulko.com> Acked-by: Alexey Brodkin <abrodkin@synopsys.com> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
2018-06-18dm: gpio: Add DM compatibility to GPIO driver for DavinciAdam Ford1-1/+13
This adds DM_GPIO support for the davinici GPIO driver with DT support. Signed-off-by: Adam Ford <aford173@gmail.com>
2018-05-07SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini37-76/+37
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 Rini1-2/+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 Kiernan1-0/+1
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-22davinci: Enable DDR_INIT for DA8XXLokesh Vutla1-0/+1
Commit 6aa4ad8e3820 ("Convert CONFIG_SOC_DA8XX et al to Kconfig") converted SOC_DA8XX to Kconfig but missed enabling DDR_INIT for SOC_DA8XX, which broke OMAPL138 to boot. Commit 2e87980580d0 ("davinci: Fix omapl138_lcdk builds") disabled DDR_INIT for all DA850 SoCs. This failed all DA850 boards to boot as ddr is not being initialized. Enable SYS_DA850_DDR_INIT for DA8XX so that all DA850 and OMAPL138 will have ddr initialized Fixes: 2e87980580d0 ("davinci: Fix omapl138_lcdk builds") Fixes: 6aa4ad8e3820 ("Convert CONFIG_SOC_DA8XX et al to Kconfig") Reported-by: Sekhar Nori <nsekhar@ti.com> Tested-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: David Lechner <david@lechnology.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2018-02-08spl: eMMC/SD: Provide one __weak spl_boot_mode() functionLukasz Majewski1-5/+0
The goal of this patch is to clean up the code related to choosing SPL MMC boot mode. The spl_boot_mode() now is called only in spl_mmc_load_image() function, which is only compiled in if CONFIG_SPL_MMC_SUPPORT is enabled. To achieve the goal, all per mach/arch implementations eligible for unification has been replaced with one __weak implementation. Signed-off-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Marek Vasut <marex@denx.de> Reviewed-by: Stefano Babic <sbabic@denx.de> Acked-by: Michal Simek <michal.simek@xilinx.com> (For ZynqMP) Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
2018-01-31davinci: Fix omapl138_lcdk buildsTom Rini1-15/+14
The omapl138_lcdk platform is not a DA850 SoC so we need to select SOC_DA8XX and not SOC_DA850, as it was before. It does however point out a bit of a misnomer in how all of these PLL defines are named as they are generic to DA8xx, not DA850 centric. Remove the 'if SOC_DA850' under the defaults as these are simply the defaults. As SOC_DA8XX will select SYS_DA850_DDR_INIT when needed, we do not need it under both SOC options. Fixes: 76e22222d3aa ("Convert CONFIG_SYS_DV_CLKMODE et al to Kconfig") Signed-off-by: Tom Rini <trini@konsulko.com>
2018-01-30Convert CONFIG_SYS_DV_CLKMODE et al to KconfigAdam Ford1-1/+84
This converts the following to Kconfig: CONFIG_SYS_DV_CLKMODE CONFIG_SYS_DA850_PLL0_POSTDIV CONFIG_SYS_DA850_PLL0_PLLDIV1 CONFIG_SYS_DA850_PLL0_PLLDIV2 CONFIG_SYS_DA850_PLL0_PLLDIV3 CONFIG_SYS_DA850_PLL0_PLLDIV4 CONFIG_SYS_DA850_PLL0_PLLDIV5 CONFIG_SYS_DA850_PLL0_PLLDIV6 CONFIG_SYS_DA850_PLL0_PLLDIV7 CONFIG_SYS_DA850_PLL1_POSTDIV CONFIG_SYS_DA850_PLL1_PLLDIV1 CONFIG_SYS_DA850_PLL1_PLLDIV2 CONFIG_SYS_DA850_PLL1_PLLDIV3 Signed-off-by: Adam Ford <aford173@gmail.com>
2018-01-23Convert CONFIG_SOC_DA8XX et al to KconfigAdam Ford1-10/+26
This converts the following to Kconfig: CONFIG_SOC_DA8XX CONFIG_SOC_DA850 CONFIG_DA850_LOWLEVEL CONFIG_MACH_DAVINCI_DA850_EVM CONFIG_SYS_DA850_PLL_INIT CONFIG_SYS_DA850_DDR_INIT Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: David Lechner <david@lechnology.com> [trini: Rework CONFIG_SYS_DA850_PLL_INIT so it's selected on SOC_DA8XX] Signed-off-by: Tom Rini <trini@konsulko.com>
2017-09-15ARM: davinci: Remove CONFIG_SOC_DA830Adam Ford2-140/+0
Nothing CONFIG_SOC_DA830 anymore, so let's remove it and the one remaining source file for it. It appears to have been abandoned a while ago. Signed-off-by: Adam Ford <aford173@gmail.com>
2017-08-16env: Rename eth_getenv_enetaddr() to eth_env_get_enetaddr()Simon Glass1-1/+1
Rename this function for consistency with env_get(). Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-16env: Rename eth_setenv_enetaddr() to eth_env_set_enetaddr()Simon Glass1-1/+1
Rename this function for consistency with env_set(). Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-13spl: add hierarchical defaults for SPL_LDSCRIPTPhilipp Tomsich1-0/+4
With SPL_LDSCRIPT moved to Kconfig (and this being a 'string' config node), all the lingering definitions in header files will cause warnings/errors due to the redefinition of the configuration item. As we don't want to pollute the defconfig files (and values should usually be identical for entire architectures), the defaults are moved into Kconfig. Kconfig will always pick the first default that matches, so please keep these values at the end of each file (to allow any board-specific Kconfig, which will be included earlier) to override with an unconditional default setting. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>