summaryrefslogtreecommitdiffstats
path: root/board/synopsys
Commit message (Collapse)AuthorAgeFilesLines
* reset: Remove addr parameter from reset_cpu()Harald Seiler2021-03-022-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* common: Drop asm/global_data.h from common headerSimon Glass2021-02-024-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>
* dm: core: Access device ofnode through functionsSimon Glass2021-01-051-1/+1
| | | | | | | | At present ofnode is present in the device even if it is never used. With of-platdata this field is not used, so can be removed. In preparation for this, change the access to go through inline functions. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Drop linux/bitops.h from common headerSimon Glass2020-05-184-0/+4
| | | | | | Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Drop linux/delay.h from common headerSimon Glass2020-05-181-0/+1
| | | | | | Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Drop log.h from common headerSimon Glass2020-05-183-0/+3
| | | | | | Move this header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
* command: Remove the cmd_tbl_t typedefSimon Glass2020-05-182-13/+20
| | | | | | | | | | | | | 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>
* common: Drop init.h from common headerSimon Glass2020-05-184-0/+4
| | | | | | Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Drop image.h from common headerSimon Glass2020-05-181-0/+1
| | | | | | Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Drop net.h from common headerSimon Glass2020-05-182-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>
* ARC: HSDK: anounce state of BIM switchEugeniy Paltsev2020-05-131-0/+7
| | | | | | | | Anounce state of BIM switch which defines if U-boot is loaded and started by preloader or not. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
* ARC: HSDK-4xD: make init status resistant to U-boot reloadingEugeniy Paltsev2020-04-271-3/+25
| | | | | | | | | | | Use register intstead of static variable to store HSDK init status as we want to avoid the situation when we reload U-boot via MDB after previous init is done but HW reset (board reset) isn't done. So let's store the init status in unused register - CREG_CPU_0_ENTRY so status will survive after U-boot is reloaded via MDB. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
* ARC: HSDK-4xD: use separate config fileEugeniy Paltsev2020-04-272-1/+4
| | | | | | | | HSDK-4xD has quite different environment so let's split HSDK and HSDK-4xD configs file. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
* ARC: HSDK-4xD: tweak memory mapEugeniy Paltsev2020-04-271-0/+58
| | | | | | | | | | | For HSDK-4xD we do additional AXI bridge tweaking while doing hsdk_init command: - we shrink IOC region. - we configure ARC HS CORE SLV1 aperture depending on haps_apb_location environment variable. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
* ARC: HSDK-4xD: add CSM configuration supportEugeniy Paltsev2020-04-271-0/+27
| | | | | | | | | Add support for CSM enable/disable and CSM relocation via hsdk_init command. We allow to relocate CSM to the beginning of any aperture even if HW support finer granularity. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
* ARC: HSDK-4xD: add support for SLC enable/disableEugeniy Paltsev2020-04-271-0/+22
| | | | | | | Add support for SLC enable/disable via hsdk_init command. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
* ARC: HSDK-4xD: print timer clock valueEugeniy Paltsev2020-04-271-0/+2
| | | | | | | Print timer clock value in hsdk_clock print_all command. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
* ARC: HSDK-4xD: drop additional GPU clock infoEugeniy Paltsev2020-04-271-2/+4
| | | | | | | | | | HSDK-4xD has other GPU type so it consumes only GPU core clock. Even we have additional GPU clock dividers they are not routed to anything. So drop information about those additional clocks in hsdk_clock print_all command. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
* ARC: HSDK-4xD: print info about HDMI clocksEugeniy Paltsev2020-04-271-4/+7
| | | | | | | HSDK-4xD has HDMI working so let's print info about HDMI clocks. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
* ARC: HSDK-4xD: fix headerize script for HSDK-4xD compatibilityEugeniy Paltsev2020-04-272-3/+11
| | | | | | | | ARC HS CPU in HSDK-4xD has ARC ID = 0x54, so fix headerize script accordingly. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
* ARC: HSDK-4xD: use active low polarity of cpu_start pulseEugeniy Paltsev2020-04-271-7/+19
| | | | | | | | | | Add quirk for HSDK-4xD - due to HW issues HSDK can use any pulse polarity but HSDK-4xD require active low polarity of cpu_start pulse. So use low polarity of cpu_start pulse for both board. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
* ARC: HSDK-4xD: add initial board supportEugeniy Paltsev2020-04-274-3/+96
| | | | | | | | | | | Add initial HSDK-4xD board support. The ARC HS4x/HS4xD Development Kit includes a multicore ARC HS4xD-based chip that integrates a wide range of interfaces including Ethernet, HDMI, WiFi, Bluetooth, USB, SDIO, I2C, SPI, UART, I2S, ADC, PWM and GPIO, as well as a Think Silicon GPU. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
* ARC: rework setting of ARC CPU specific compiler optionsEugeniy Paltsev2020-02-126-2/+30
| | | | | | | | | | | | | It's a very rare if at all existing occasion when ARC CPU template is used as is w/o any changes - in the end it's a beauty and competitive advantage of ARC cores to be tailored for a particular use-case - and so it doesn't make a lot of sense to offer template-based "-mcpu" selection. Given for each and every platform we end-up adding quite a few more flags it's logical to move "-mcpu" selection to platform's definition as well which we exactly do here. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
* ARC: nsim_hs38: Add support of Virtio NET & BLKAlexey Brodkin2020-02-124-0/+42
| | | | | | | | | Given now nsim_hs38 configuration is usable on QEMU and in QEMU we have Virtio working perfectly fine the next logical step is to add support of supported & known to work net & bkl to this config. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
* dm: core: Create a new header file for 'compat' featuresSimon Glass2020-02-051-0/+1
| | | | | | | | | | | | At present dm/device.h includes the linux-compatible features. This requires including linux/compat.h which in turn includes a lot of headers. One of these is malloc.h which we thus end up including in every file in U-Boot. Apart from the inefficiency of this, it is problematic for sandbox which needs to use the system malloc() in some files. Move the compatibility features into a separate header file. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move reset_cpu() to the CPU headerSimon Glass2020-01-172-0/+2
| | | | | | Move this function out of common.h and into a relevant header file. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move some board functions out of common.hSimon Glass2019-12-021-0/+1
| | | | | | | 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>
* common: Move enable/disable_interrupts out of common.hSimon Glass2019-12-021-0/+1
| | | | | | | | Move these two functions into the irq_funcs.h header file. Also move interrupt_handler_t as this is used by the irq_install_handler() function. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* common: Move some cache and MMU functions out of common.hSimon Glass2019-12-021-0/+1
| | | | | | | | | | | | These functions belong in cpu_func.h. Another option would be cache.h but that code uses driver model and we have not moved these cache functions to use driver model. Since they are CPU-related it seems reasonable to put them here. Move them over. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* common: Move some SMP functions out of common.hSimon Glass2019-12-021-0/+1
| | | | | | | These functions belong in cpu_func.h so move them over. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* arc: emsdp: docs: Prefer Degilent over Opella-XDAlexey Brodkin2019-11-011-1/+1
| | | | | | | | | | Back in the day on early board samples built-in Digilent JTAG probe was not functional so we used externally attached Ashling Opella-XD probe. But now with production units everything works as expected and so we anybody may enjoy readily avaialble built-in JTAG probe so we specify Digilent oprion on MDB's command line example. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
* arc: emsdp/iotdk: Switch to DM_MMCAlexey Brodkin2019-11-012-61/+0
| | | | | | | Somehow EMSDP & IoT DK boards were skipped on ARC boads conversion to DM MMC. So doing it now. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
* arc: emsdp: Add more platform-specific compiler optionsAlexey Brodkin2019-09-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | Even though EM SDP is FPGA-based board and different FPGA images (known as .bit-files) are awailable for the board still there's a common subset of options we may rely on for all configs. These are: * Normalizer * Swap instructions * Simple multiplier * Barrel-shifter * Floating-point unit * Shorter instructions (code density) This among other improvements allows to compile code with 64-bit divisions, see [1]. [1] https://patchwork.ozlabs.org/patch/1156541/ Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Kever Yang <kever.yang@rock-chips.com>
* arc: emsdp: Add initialization of PSRAMAlexey Brodkin2019-09-031-0/+37
| | | | | | | If the "Page Mode" is not enabled on the device, read operations from PSRAM may result in incorrect data. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
* env: Move env_get_ulong() to env.hSimon Glass2019-08-111-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>
* env: Move env_set_ulong() to env.hSimon Glass2019-08-111-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>
* ARC: [plat-axs10x]: migrate to DM_MMCEugeniy Paltsev2019-04-181-29/+0
| | | | | Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
* ARC: [plat-hsdk]: migrate to DM_MMCEugeniy Paltsev2019-04-181-35/+6
| | | | | Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
* hsdk: readme: Suggest getting pyelftools with pipAlexey Brodkin2019-03-281-3/+4
| | | | | Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Suggested-by: Yunir Salimzyanov <yunir@synopsys.com>
* ARC: AXS10x: drop NAND supportEugeniy Paltsev2019-03-282-243/+0
| | | | | | | | | | | | | | On AXS10x boards we have non-standard NAND controller which was never really used a lot as there're other much more convenient [as they are standard & removable] persistent media like SD-card and USB mass storage. Moreover after recent changes we face with some NAND controller runtime issues. So instead of keeping support of yet another non-standard peripheral we're dropping its support for good. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
* arc: devboards: Implement checkboard()Alexey Brodkin2018-12-033-0/+24
| | | | | | This allows us to print nice board name on boot. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
* arc: emsdp: Refactor register and bit accessesAlexey Brodkin2018-12-031-9/+9
| | | | | | | | | Instead of "base + offset" define all registers right away and access them later via direct defines. Generate bit masks with "BIT" macro. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
* arc: emsdp: Read real CPU clock value from hardwareAlexey Brodkin2018-12-031-3/+39
| | | | | | | | | | | | We do real CPU clock measurement with help of built-in counters. Thus we may accommodate different real clock values that appear in different FPA images instead of relying on something hard-coded in the .dtb. And while at it make make SDIO base address define look similar to others with casting to "(void *)". Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
* arc: Get rid of board-specific print_cpuinfo()Alexey Brodkin2018-12-032-18/+0
| | | | | | | | Since we now do advanced CPU identification in generic ARC code there's no need to have per-board hardcoded data. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
* iot_dk: Add READMEAlexey Brodkin2018-11-011-0/+145
| | | | Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
* emdk->emsdp: Rename boardAlexey Brodkin2018-11-015-20/+22
| | | | | | | | Real marketing name of the board was recently updated so to accommodate that change renaming the board and all related to it. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
* axs10x/emdk/hsdk/iot_dk: Implement board_mmc_getcd()Alexey Brodkin2018-10-124-0/+28
| | | | | | | | | | | | | | | So now we may detect MMC/SD-card existence and instead of completely misleading message on missing card: ------------------------>8----------------------- Loading Environment from FAT... Card did not respond to voltage select! ------------------------>8----------------------- we now get very clear one: ------------------------>8----------------------- Loading Environment from FAT... MMC: no card present ------------------------>8----------------------- Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
* iot_dk: Save CPU clock value to gd->cpu_clkAlexey Brodkin2018-10-121-6/+8
| | | | | | | Since gd->cpu_clk is a global item we may once populate it from .dtb ans use it then in other places like for printing CPU info etc. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
* iot_dk: Add support of 136 MHz clockAlexey Brodkin2018-10-121-0/+8
| | | | Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
* iot_dk: Implement board resetAlexey Brodkin2018-10-121-0/+8
| | | | | | It is done by writing some magic sequence in a special register. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>