aboutsummaryrefslogtreecommitdiff
path: root/board/samsung
AgeCommit message (Collapse)Author
2024-04-02usb: udc: dwc3: Fold board dm_usb_gadget_handle_interrupts() into DWC3 gadgetMarek Vasut
The dm_usb_gadget_handle_interrupts() has no place in board code. Move this into DWC3 driver. The OMAP implementation is special, add new weak dwc3_uboot_interrupt_status() function to decide whether DWC3 interrupt handling should be called, and override it in OMAP DWC3 code, to repair the special OMAP interrupt handling code until OMAP gets switched over to DM UDC proper. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> # vim3 Tested-by: Caleb Connolly <caleb.connolly@linaro.org> # qcom sdm845 Link: https://lore.kernel.org/r/20240317044357.547037-1-marek.vasut+renesas@mailbox.org Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-02-27Kconfig: Centralize prompting for SYS_CONFIG_NAMETom Rini
Generally speaking, we do not prompt for this value and define it in the board specific Kconfig file. There are some valid use cases however today where we do prompt for this value, so instead of having this be done in a number of locations, do this at the top-level location only. This removes the question from a number of other locations and makes it consistent that when we do set the value directly, we always do it the same way. We don't need to specify the type, it's always string. Signed-off-by: Tom Rini <trini@konsulko.com>
2024-01-24board: samsung: Add support for E850-96 boardSam Protsenko
Add support for WinLink E850-96 board [1]. It's based on Exynos850 SoC and follows 96boards specification, so it's compatible with 96boards mezzanine boards [2]. This patch enables next features: * Serial console * USI * PMU (muxing AP UART path) * Pinctrl * Clocks * Timer (ARMv8 architected) * Reset control It's quite a minimal enablement. Features like MMC, USB and Ethernet will be enabled later. The rationale for config values is as follows: * TEXT_BASE = 0xf8800000 That's where BL2 loads the U-Boot payload, so TEXT_BASE must be exactly this value. Overall the memory map is designed in a way to keep the bootloader in the upper 128 MiB area of RAM, which is 0xf8000000..0xffffffff. That includes bootloader's code, stack, data, heap, MMU tables, etc. All the memory below that 128 MiB chunk can be used for storing boot images (0x80000000..0xf8000000). * CUSTOM_SYS_INIT_SP_ADDR = 0xf8c00000 Just 4 MiB above the TEXT_BASE address, to leave enough space for U-Boot code and stack itself (grows downwards). * SYS_LOAD_ADDR = 0x80000000 The beginning of RAM. That's where Linux kernel image must be loaded. * SYS_MALLOC_LEN = 0x81f000 8 MiB for malloc() + ENV_SIZE (128 KiB) * SYS_MALLOC_F_LEN = 0x4000 Increase malloc() pool size available before relocation from 8 KiB (default) to 16 KiB. Otherwise "alloc space exhausted" message appears in U-Boot log during board_init_f() stage. There are next reasons for doing so: 1. Having "bootph-all" flags in some dts nodes leads to binding those during pre-relocation stage, and binding (DM) uses dynamic memory allocation 2. clk-exynos850 driver uses CCF clocks, which in turn use dynamic memory allocation Device tree file was imported from Linux kernel. All nodes and boot phase flags added in exynos850-e850-96-u-boot.dtsi are only needed to enable serial console: * oscclk -> cmu_top -> cmu_peri: generate UART/USI clocks * pinctrl_alive and uart1_pins: needed to mux UART pins * pmu_system_controller: configures AP UART path to uart1_pins * usi_uart: configures USI block to operate as a UART protocol * serial_0: enables serial console (UART) [1] https://www.96boards.org/product/e850-96b/ [2] https://www.96boards.org/products/mezzanine/ Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2023-11-27board: samsung: Fix SYS_CONFIG_NAME configs in axy17lte KconfigSam Protsenko
There is a couple of issues related to SYS_CONFIG_NAME config in axy17lte Kconfig. 1. The global SYS_CONFIG_NAME in axy17lte Kconfig overrides SYS_CONFIG_NAME for all boards specified after this line in arch/arm/mach-exynos/Kconfig: source "board/samsung/axy17lte/Kconfig" Right now it's the last 'source' line there, so the issue is not reproducible. But once some board is moved or added after this line the next build error will happen: GEN include/autoconf.mk.dep In file included from ./include/common.h:16: include/config.h:3:10: fatal error: configs/exynos78x0-common.h.h: No such file or directory 3 | #include <configs/exynos78x0-common.h.h> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. That's happening because axy17lte Kconfig defines SYS_CONFIG_NAME option in global namespace (not guarded with any "if TARGET_..."), so it basically rewrites the correct SYS_CONFIG_NAME defined in the hypothetical boards which might appear after axy17lte in mach-exynos Kconfig. 2. Another side of the issue is that SYS_CONFIG_NAME is defined incorrectly in axy17lte Kconfig: config SYS_CONFIG_NAME default "exynos78x0-common.h" The .h extension should not have been specified there. It's leading to a build error, as the generated include file has a double '.h' extension. 3. Each target in axy17lte/Kconfig defines its own SYS_CONFIG_NAME. But all of those in fact incorrect, as corresponding include/configs/<CONFIG_SYS_CONFIG_NAME>.h header files don't exist. 4. The global SYS_CONFIG_NAME pretty much repeats the help description from arch/Kconfig and doc/README.kconfig. Corresponding defconfig files (a*y17lte_defconfig) fix above issues by overriding SYS_CONFIG_NAME and correctly setting it to "exynos78x0-common". Fix all mentioned issues by removing the incorrect global SYS_CONFIG_NAME and instead specifying it (correctly) in SYS_CONFIG_NAME options for each target instead. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Fixes: 3e2095e960b4 ("board: samsung: add support for Galaxy A series of 2017 (a5y17lte)") Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2023-10-09exynos: Cleanup exynos_initTom Rini
- None of the callers perform error checking and based on the non-empty versions of this function, there's no checking to be done, so make this a void. - Add a default weak version of the function. - Remove the empty versions of exynos_init now that we have a weak version. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-10-09board: Remove essentially empty board files and MakefilesTom Rini
As part of reviewing a new platform, Daniel Schwierzeck noted that we can have an empty Makefile in the board directory and don't need an empty board.c file as well. Further with further cleanup in the Makefile we can now omit the Makefile entirely. Remove a number of now unnecessary board.c and Makefiles. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-09-24common: Drop linux/printk.h from common headerSimon Glass
This old patch was marked as deferred. Bring it back to life, to continue towards the removal of common.h Move this out of the common header and include it only where needed. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-09-15board: usb: Replace legacy usb_gadget_handle_interrupts()Marek Vasut
The usb_gadget_handle_interrupts() is no longer used anywhere, replace the remaining uses with dm_usb_gadget_handle_interrupts() which takes udevice as a parameter. Some of the UDC drivers currently ignore the index parameter altogether, those also ignore the udevice and have to be reworked. Other like the dwc3_uboot_handle_interrupt() had to be switched from index to udevice look up to avoid breakage. Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> # on khadas vim3 Signed-off-by: Marek Vasut <marex@denx.de>
2023-05-15samsung: common: do not reset if cros-ec uclass is missingHenrik Grimler
Otherwise non-ChromeOS samsung devices, like the odroid boards, are stuck in a bootloop if CONFIG_CROS_EC is not enabled: <...> MMC: SAMSUNG SDHCI: 2, EXYNOS DWMMC: 0 Loading Environment from MMC... *** Warning - bad CRC, using default environment cros-ec communications failure -96 Please reset with Power+Refresh Cannot init cros-ec device resetting ... Issue started after commit e44d7e73fe0d ("dm: core: Switch uclass_*_device_err to use uclass_*_device_check"). Signed-off-by: Henrik Grimler <henrik@grimler.se> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
2023-05-03board: Fix board file path for sdm845.c for Samsung and Qualcomm boardsBhupesh Sharma
Currently a few 'board/qualcomm/../Makefile' point to incorrect path of sdm845 board file. Fix the same. Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org> Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
2022-12-23global: Migrate CONFIG_SMP_PEN_ADDR to CFGTom Rini
Perform a simple rename of CONFIG_SMP_PEN_ADDR to CFG_SMP_PEN_ADDR Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23global: Migrate CONFIG_SET_DFU_ALT_BUF_LEN to CFGTom Rini
Perform a simple rename of CONFIG_SET_DFU_ALT_BUF_LEN to CFG_SET_DFU_ALT_BUF_LEN Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23global: Migrate CONFIG_ODROID_REV_AIN to CFGTom Rini
Perform a simple rename of CONFIG_ODROID_REV_AIN to CFG_ODROID_REV_AIN Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23global: Migrate CONFIG_ENV_SROM_BANK to CFGTom Rini
Perform a simple rename of CONFIG_ENV_SROM_BANK to CFG_ENV_SROM_BANK Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23global: Migrate CONFIG_DFU_ALT et al to CFGTom Rini
Perform simple renames of: CONFIG_DFU_ALT to CFG_DFU_ALT CONFIG_DFU_ALT_BOOT_EMMC to CFG_DFU_ALT_BOOT_EMMC CONFIG_DFU_ALT_BOOT_SD to CFG_DFU_ALT_BOOT_SD CONFIG_DFU_ALT_SYSTEM to CFG_DFU_ALT_SYSTEM CONFIG_DFU_ENV_SETTINGS to CFG_DFU_ENV_SETTINGS Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-22arm: samsung: Rename CONFIG_G_DNL_*_NUM variablesTom Rini
Following how g_dnl_bind_fixup is used on other platforms, rename the unchanging defines used here to be prefixed with EXYNOS rather than Samsung, and define them here. Cc: Minkyu Kang <mk7.kang@samsung.com> Cc: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-22Convert CONFIG_FLASH_SPANSION_S29WS_N et al to KconfigTom Rini
This converts the following to Kconfig: CONFIG_FLASH_SPANSION_S29WS_N CONFIG_FLASH_VERIFY CONFIG_FSL_FM_10GEC_REGULAR_NOTATION CONFIG_FSL_ISBC_KEY_EXT CONFIG_FSL_TRUST_ARCH_v1 CONFIG_FSL_SDHC_V2_3 CONFIG_MAX_DSP_CPUS CONFIG_MIU_2BIT_INTERLEAVED CONFIG_SERIAL_BOOT CONFIG_SPI_BOOTING CONFIG_X86EMU_RAW_IO Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-05arm: samsung: Move CONFIG_MISC_COMMON to KconfigTom Rini
This option controls using board/samsung/common/misc.c, so add a Kconfig file there as well and select it from the boards which use this functionality. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Minkyu Kang <mk7.kang@samsung.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_SDRAM_* to CFG_SYS_SDRAM_*Tom Rini
The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_SDRAM 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-11-10Convert CONFIG_SYS_I2C_INIT_BOARD to KconfigTom Rini
This converts the following to Kconfig: CONFIG_SYS_I2C_INIT_BOARD Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-10-30video: samsung: Drop old LCD codeSimon Glass
This relies on the old LCD implementation which is to be removed. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: Drop ld9040 driverSimon Glass
This is not used anymore. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: Drop CONFIG_LCD_MENUSimon Glass
This relies on the old LCD implementation which is to be removed. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-08-20smdkc100: Remove legacy non-DM_ETH codeTom Rini
Now that we are about to enable DM_ETH by default, remove legacy code. Cc: Minkyu Kang <mk7.kang@samsung.com> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
2022-06-28arm: samsung: Migrate a number of symbols to KconfigTom Rini
- In a number of cases, use CONFIG_ARCH_EXYNOS[45] rather than CONFIG_EXYNOS[45] - In other cases, test for CONFIG_ARCH_EXYNOS or CONFIG_ARCH_S5PC1XX - Migrate specific SoC CONFIG values to Kconfig - Use CONFIG_TARGET_x rather than CONFIG_x - Migrate other CONFIG_EXYNOS_x symbols to Kconfig - Reference CONFIG_EXYNOS_RELOCATE_CODE_BASE directly as EXYNOS_RELOCATE_CODE_BASE - Rename CONFIG_S5P_PA_SYSRAM to CONFIG_SMP_PEN_ADDR to match the rest of U-Boot usage. Cc: Minkyu Kang <mk7.kang@samsung.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2022-06-28arm: samsung: Remove dead LCD codeTom Rini
Since bb5930d5c97f ("exynos: video: Convert several boards to driver model for video") there have been no callers of any of the exynos_lcd_* family of functions. Remove these from the boards, and then remove unused logo and related code as well. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
2022-06-23linker_lists: Rename sections to remove . prefixAndrew Scull
Rename the sections used to implement linker lists so they begin with '__u_boot_list' rather than '.u_boot_list'. The double underscore at the start is still distinct from the single underscore used by the symbol names. Having a '.' in the section names conflicts with clang's ASAN instrumentation which tries to add redzones between the linker list elements, causing expected accesses to fail. However, clang doesn't try to add redzones to user sections, which are names with all alphanumeric and underscore characters. Signed-off-by: Andrew Scull <ascull@google.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-04-19Convert CONFIG_SYS_MEM_TOP_HIDE to KconfigTom Rini
This converts the following to Kconfig: CONFIG_SYS_MEM_TOP_HIDE Signed-off-by: Tom Rini <trini@konsulko.com>
2022-01-13board: samsung: fix menu entries for a{3,7}y17lteHenrik Grimler
a7y17lte is called SM-A720F, and a3y17lte SM-A320F. a3y17lte also should select PINCTRL_EXYNOS78x0, not the (non-existent) PINCTRL_EXYNOS7880, and it has an Exynos 7870 SoC and not 7880. Fixes: 3e2095e960b4 ("board: samsung: add support for Galaxy A series of 2017 (a5y17lte)") Signed-off-by: Henrik Grimler <henrik@grimler.se> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2021-11-09Merge https://source.denx.de/u-boot/custodians/u-boot-samsungTom Rini
[trini: Migrate CONFIG_EXYNOS7420 as part of merging, so espresso7420 still builds] Signed-off-by: Tom Rini <trini@konsulko.com>
2021-10-31board: samsung: add support for Galaxy A series of 2017 (a5y17lte)Dzmitry Sankouski
Samsung Galaxy A3, A5, A7 (2017) - middle class Samsung smartphones. U-boot can be used as chain-loaded bootloader to gain control on booting vanilla linux(and possibly others) kernels Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com> Cc: Minkyu Kang <mk7.kang@samsung.com>
2021-10-31board: samsung: add Samsung Galaxy S9/S9+(SM-G96x0) boardDzmitry Sankouski
Samsung S9 SM-G9600 - Snapdragon SDM845 version of the phone, for China \ Hong Kong markets. Has unlockable bootloader, unlike SM-G960U (American market version), which allows running u-boot as a chain-loaded bootloader. Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com> Cc: Ramon Fried <rfried.dev@gmail.com> Cc: Tom Rini <trini@konsulko.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-09-04i2c: Convert CONFIG_POWER_I2C et al to KconfigSimon Glass
This converts the following to Kconfig: CONFIG_POWER_I2C CONFIG_POWER_LEGACY They are handled at the same time due to a dependency between them. Update the Makefile rule to use legacy power only in U-Boot proper. Unfortunately a separate rule is needed in SPL to be able to build legacy power. Add SPL related symbols for both, to allow for SPL-only usage. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> [trini: More SPL related cleanups, reword commit message] Signed-off-by: Tom Rini <trini@konsulko.com>
2021-09-04power: Rename CONFIG_POWER to CONFIG_POWER_LEGACYSimon Glass
This option is used in pre-driver model code and much of it has never been converted to driver model. We want to add a new option to enable power support, so we can use a simple rule in the Makefile. Rename this one, which is really about a particular implementation of power. Also update the pmic.h header file so it either includes the legacy API or the driver model one. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2021-08-03Merge https://source.denx.de/u-boot/custodians/u-boot-samsungTom Rini
2021-08-02global: Convert simple_strtoul() with decimal to dectoul()Simon Glass
It is a pain to have to specify the value 10 in each call. Add a new dectoul() function and update the code to use it. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-07-27samsung: exynos: Convert SROMC interface to a driverSimon Glass
Add a bus driver for this and use it to configure the bus parameters for the Ethernet interface. Drop the old pre-driver-model code. Switch over to use driver model for Ethernet. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2021-05-24ARM: fix LTO for rockchip and samsungMarek Behún
When building with LTO, the compiler complains about type mismatch of function usb_gadget_handle_interrupts(). This function is defined without parameters in files arch/arm/mach-rockchip/board.c board/samsung/common/exynos5-dt.c but it should have one parameter, int index. Fix this. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2021-05-24treewide: Convert macro and uses of __section(foo) to __section("foo")Marek Behún
This commit does the same thing as Linux commit 33def8498fdd. Use a more generic form for __section that requires quotes to avoid complications with clang and gcc differences. Remove the quote operator # from compiler_attributes.h __section macro. Convert all unquoted __section(foo) uses to quoted __section("foo"). Also convert __attribute__((section("foo"))) uses to __section("foo") even if the __attribute__ has multiple list entry forms. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-02-23samsung: origen: change maintainerMinkyu Kang
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2021-02-23samsung: espresso7420: change maintainerMinkyu Kang
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2021-02-23samsung: smdkv310: change maintainerMinkyu Kang
change maintainer to Jaehoon Signed-off-by: Minkyu Kang <mk7.kang@samsung.com> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
2021-02-23samsung: smdk5420: change maintainerMinkyu Kang
change maintainer to Jaehoon Signed-off-by: Minkyu Kang <mk7.kang@samsung.com> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
2021-02-23samsung: smdk5250: change maintainerMinkyu Kang
change maintainer to Jaehoon Signed-off-by: Minkyu Kang <mk7.kang@samsung.com> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
2021-02-23samsung: goni: change maintainerMinkyu Kang
change maintainer to Jaehoon Signed-off-by: Minkyu Kang <mk7.kang@samsung.com> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
2021-02-23board: samsung: covert to driver model about power_key_pressedJaehoon Chung
Convert to driver model about power_key_pressed. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2021-02-21dm: i2c: use CONFIG_IS_ENABLED macro for DM_I2C/DM_I2C_GPIOIgor Opaniuk
Use CONFIG_IS_ENABLED() macro, which provides more convenient way to check $(SPL)DM_I2C/$(SPL)DM_I2C_GPIO configs for both SPL and U-Boot proper. CONFIG_IS_ENABLED(DM_I2C) expands to: - 1 if CONFIG_SPL_BUILD is undefined and CONFIG_DM_I2C is set to 'y', - 1 if CONFIG_SPL_BUILD is defined and CONFIG_SPL_DM_I2C is set to 'y', - 0 otherwise. All occurences were replaced automatically using these bash cmds: $ find . -type f -exec sed -i 's/ifndef CONFIG_DM_I2C/if !CONFIG_IS_ENABLED(DM_I2C)/g' {} + $ find . -type f -exec sed -i 's/ifdef CONFIG_DM_I2C/if CONFIG_IS_ENABLED(DM_I2C)/g' {} + $ find . -type f -exec sed -i 's/defined(CONFIG_DM_I2C)/CONFIG_IS_ENABLED(DM_I2C)/g' {} + $ find . -type f -exec sed -i 's/ifndef CONFIG_DM_I2C_GPIO/if !CONFIG_IS_ENABLED(DM_I2C_GPIO)/g' {} + $ find . -type f -exec sed -i 's/ifdef CONFIG_DM_I2C_GPIO/if CONFIG_IS_ENABLED(DM_I2C_GPIO)/g' {} + $ find . -type f -exec sed -i 's/defined(CONFIG_DM_I2C_GPIO)/CONFIG_IS_ENABLED(DM_I2C_GPIO)/g' {} + Reviewed-by: Heiko Schocher <hs@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Igor Opaniuk <igor.opaniuk@foundries.io> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.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>