summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm
Commit message (Collapse)AuthorAgeFilesLines
* treewide: Convert macro and uses of __section(foo) to __section("foo")Marek Behún2021-05-241-2/+2
| | | | | | | | | | | | | | | | | 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>
* lmb: move CONFIG_LMB in KconfigPatrick Delaunay2021-04-221-1/+0
| | | | | | Migrate CONFIG_LMB in Kconfig. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
* ppc: Remove Cyrus_P5020 and P5040 boardsTom Rini2021-04-103-20/+1
| | | | | | | | | | | These boards have not been converted to CONFIG_DM_MMC by the deadline. Remove them. As the P5020 is the last ARCH_P5020 platform, remove that support as well. Cc: Andy Fleming <afleming@gmail.com> Cc: Priyanka Jain <priyanka.jain@nxp.com> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
* ppc: Remove ARCH_P1022 supportTom Rini2021-04-102-18/+1
| | | | | | | | | With the last of the ARCH_P1022 platforms removed, finish removing the rest of the platform support. Cc: Priyanka Jain <priyanka.jain@nxp.com> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
* ppc: Remove T2081QDS board and ARCH_T2081 supportTom Rini2021-04-102-6/+3
| | | | | | | | | | This board has not been converted to CONFIG_DM_MMC by the deadline. Remove it. It is also the only ARCH_T2081 board so remove that support as well. Cc: Shengzhou Liu <Shengzhou.Liu@nxp.com> Cc: Ruchika Gupta <ruchika.gupta@nxp.com> Signed-off-by: Tom Rini <trini@konsulko.com>
* ppc: Remove TARGET_T1040QDS referencesTom Rini2021-04-101-1/+0
| | | | | | | The TARGET_T1040QDS platforms have been removed already, drop some remaining references in the code. Signed-off-by: Tom Rini <trini@konsulko.com>
* gpio: mpc8xxx: Support controller register physical address beyond 32-bitBin Meng2021-03-051-1/+1
| | | | | | | | | dev_read_addr_size_index() returns fdt_addr_t which might be a 64-bit physical address. This might be true for some 85xx SoCs whose CCSBAR is mapped beyond 4 GiB. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
* ppc: mpc85xx: Add 'gpibe' register to 'struct ccsr_gpio'Bin Meng2021-03-051-0/+1
| | | | | | | | Without this, the DM GPIO driver for MPC8xxx does not compile for MPC85xx SoCs. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
* ppc: io.h: Use addrmap_ translation APIs only in post-relocation phaseBin Meng2021-03-051-6/+9
| | | | | | | | | | | | In phys_to_virt() and virt_to_phys(), if CONFIG_ADDR_MAP is defined, they use addrmap_ translation APIs to do the address translation. However these APIs only work in post-relocation phase. Update the code logic to fall back to use the default one when in pre-relocation phase. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
* ppc: Remove MPC8569MDS boardTom Rini2021-02-252-18/+1
| | | | | | | | | | This board has not been converted to CONFIG_DM_MMC by the deadline. Remove it. As this is the last ARCH_MPC8569 board, remove that support as well. Cc: Priyanka Jain <priyanka.jain@nxp.com> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
* dm: i2c: use CONFIG_IS_ENABLED macro for DM_I2C/DM_I2C_GPIOIgor Opaniuk2021-02-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* gpio: mpc8xxx_gpio: Fix for litte endianBiwen Li2021-02-081-0/+13
| | | | | | | Update gpio driver to use same logic for big-endian and little-endian Signed-off-by: Biwen Li <biwen.li@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
* powerpc: mpc85xx: Allow boards to override CONFIG_USB_MAX_CONTROLLER_COUNTChris Packham2020-12-101-0/+2
| | | | | | | | | If the board isn't strapped to enable USB1 then attempting to access it will result in a hang. Avoid this by allowing boards to define CONFIG_USB_MAX_CONTROLLER_COUNT. Signed-off-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
* Drop global data sdhc_adapter for powerpcYangbo Lu2020-07-271-3/+1
| | | | | | | | | | The sdhc_adapter of global data has not been used, and we do not have to use it as global data even we may need it in the future. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
* powerpc/mpc85xx: Fix compiling error with DM_GPIOMadalin Bucur2020-06-031-1/+2
| | | | | | | | | | | | | | | | | P4080DS compilation fails with DM_GPIO enabled: drivers/gpio/gpio-uclass.c:355:5: error: redefinition of 'gpio_request' int gpio_request(unsigned gpio, const char *label) ^~~~~~~~~~~~ In file included from ./arch/powerpc/include/asm/arch/gpio.h:17:0, from ./arch/powerpc/include/asm/gpio.h:1, from drivers/gpio/gpio-uclass.c:16: ./arch/powerpc/include/asm/mpc85xx_gpio.h:68:19: note: previous definition of 'gpio_request' was here static inline int gpio_request(unsigned gpio, const char *label) ^~~~~~~~~~~~ Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
* common: Drop linux/bitops.h from common headerSimon Glass2020-05-182-0/+3
| | | | | | 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>
* dma-mapping: add <asm/dma-mapping.h> for all architecturesMasahiro Yamada2020-02-201-0/+1
| | | | | | | To avoid "asm/dma-mapping.h: No such file or directory" error, we need something. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* common: Move upmconfig() to ppc.hSimon Glass2020-01-171-0/+1
| | | | | | | This file is only used by PowerPC so move it to an arch-specific header file. Signed-off-by: Simon Glass <sjg@chromium.org>
* Add global variable sdhc_per_clk for arm/powerpcYangbo Lu2020-01-161-0/+1
| | | | | | | | | | | The QorIQ eSDHC controller supports two reference clocks. They are platform clock and periperhal clock. The global variable sdhc_clk has already been used for platform clock. This patch is to add another global variable sdhc_per_clk for periperhal clock, which provides higher frequency and is required to be used for SD UHS and eMMC HS200/HS400 speed modes. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
* powerpc/mpc85xx: drop eSDHC periperhal clock codeYangbo Lu2020-01-161-8/+0
| | | | | | | | | | | | | | | | | | | The below patch added eSDHC periperhal clock code initially. 2d9ca2c mmc: fsl_esdhc: Add peripheral clock support The purpose was to fix up device tree properties "peripheral-frequency" so that linux could get the periperhal clock by it. However the implementation on both u-boot and linux was only for a Freescale SDK release. The linux part implementation had never been upstreamed. These code should not have been exist on u-boot mainline. Let's remove the powerpc part changes but keep the changes in fsl_esdhc driver. The changes in fsl_esdhc driver could be utilized to support SD UHS and eMMC HS200/HS400 speed modes for current Layerscape ARM platforms. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
* mpc83xx: set MPC83XX_GPIO_CTRLRS to 2 for MPC8309Rasmus Villemoes2020-01-081-1/+2
| | | | | | | | The MPC8309 has two gpio controllers (which is already correctly reflected in its struct immap definition). Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Mario Six <mario.six@gdsys.cc>
* mpc83xx: immap_83xx: add spi8xxx_t in immap for mpc8309Rasmus Villemoes2020-01-082-2/+2
| | | | | | | Allow drivers/spi/mpc8xxx_spi.c to be built for an mpc8309 target. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Mario Six <mario.six@gdsys.cc>
* mpc83xx: remove unused clock.hYangbo Lu2019-11-271-22/+0
| | | | | | | | | The clock.h was to define mxc_get_clock() providing clock value to fsl_esdhc driver. Since fsl_esdhc driver is using global data gd->arch.sdhc_clk directly now, we can remove this file. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
* freescale/powerpc: Rename the config CONFIG_SECURE_BOOT nameUdit Agarwal2019-11-081-2/+2
| | | | | | | | Rename the CONFIG_SECURE_BOOT name to CONFIG_NXP_ESBC to avoid conflicts with UEFI secure boot. Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com> Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
* powerpc: mpc85xx: Move CONFIG_FSL_PCIE_DISABLE_ASPM to KconfigHou Zhiqiang2019-06-201-5/+0
| | | | | | | Use the Kconfig option to select the PCIe ASPM errata. Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com> Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
* powerpc: Simplify processor.hMario Six2019-05-211-120/+0
| | | | | | | | | | | | Lots of stuff in processor.h was taken verbatim from the Linux kernel. It was never synced, so most of it was removed or changed in the kernel since it was imported. Remove all the stuff that is unused in the current U-Boot sources; should anybody feel the need to re-sync with the kernel, they can do it later on. Signed-off-by: Mario Six <mario.six@gdsys.cc>
* mpc83xx: Add arch clock.h to make SDHC workMario Six2019-05-211-0/+22
| | | | | | | | | The fsl-esdhc driver can be used for the SDHC functionality on MPC83xx, but it needs some additional definitions. Add a clock.h file, so we can use the driver for MPC83xx. Signed-off-by: Mario Six <mario.six@gdsys.cc>
* mpc83xx: Prepare usage of DM gpio driverMario Six2019-05-211-0/+8
| | | | | | | | The MPC85xx GPIO driver was converted to handle a broader range of SoCs. Prepare the MPC83xx code for usage of this driver. Signed-off-by: Mario Six <mario.six@gdsys.cc>
* powerpc: mpc83xx: Fix MPC8308 IMMR memory layoutMario Six2019-05-211-3/+39
| | | | | | | | The MPC8308 has two I2C controllers, but no PCI controller. Fix the register map layout for this SoC. Signed-off-by: Mario Six <mario.six@gdsys.cc>
* powerpc: Add LSDMR config valuesMario Six2019-05-201-0/+3
| | | | | | | | | | | | | The LSDMR_* macros are used to configure the system bus on MPC83xx. A few of the possible LSDMR_* macros were never defined in the respective include files. This renders the SDRAM support on the MPC8349EMDS unusable, because it uses these undefined macros. To make the SDRAM option work, introduce these macros into the proper config file. Signed-off-by: Mario Six <mario.six@gdsys.cc>
* mpc83xx: Introduce ARCH_MPC837XMario Six2019-05-204-6/+6
| | | | | | Replace CONFIG_MPC837x with a proper CONFIG_ARCH_MPC837X Kconfig option. Signed-off-by: Mario Six <mario.six@gdsys.cc>
* mpc83xx: Introduce ARCH_MPC836*Mario Six2019-05-203-5/+5
| | | | | | Replace CONFIG_MPC836* with proper CONFIG_ARCH_MPC836* Kconfig options. Signed-off-by: Mario Six <mario.six@gdsys.cc>
* mpc83xx: Introduce ARCH_MPC834*Mario Six2019-05-205-12/+12
| | | | | | Replace CONFIG_MPC834* with proper CONFIG_ARCH_MPC834* Kconfig options. Signed-off-by: Mario Six <mario.six@gdsys.cc>
* mpc83xx: Introduce ARCH_MPC832*Mario Six2019-05-201-1/+1
| | | | | | Replace CONFIG_MPC832* with proper CONFIG_ARCH_MPC832* Kconfig options. Signed-off-by: Mario Six <mario.six@gdsys.cc>
* mpc83xx: Introduce ARCH_MPC831*Mario Six2019-05-204-10/+10
| | | | | | Replace CONFIG_MPC833* with proper CONFIG_ARCH_MPC833* Kconfig options. Signed-off-by: Mario Six <mario.six@gdsys.cc>
* mpc83xx: Introduce ARCH_MPC830*Mario Six2019-05-205-11/+11
| | | | | | Replace CONFIG_MPC830* with proper CONFIG_ARCH_MPC830* Kconfig options. Signed-off-by: Mario Six <mario.six@gdsys.cc>
* powerpc: enabled building with CONFIG_DM=yHeinrich Schuchardt2019-03-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moving to the driver model requires CONFIG_DM to be enabled. Currently several boards like kmeter1_defconfig produce a build error when CONFIG_DM is enabled: In file included from include/common.h:35, from ./arch/powerpc/include/asm/fsl_lbc.h:10, from include/mpc83xx.h:10, from ./arch/powerpc/include/asm/ppc.h:27, from ./arch/powerpc/include/asm/u-boot.h:18, from include/dm/of.h:10, from include/dm/ofnode.h:12, from include/dm/device.h:13, from include/linux/mtd/mtd.h:26, from drivers/mtd/mtdconcat.c:25: include/image.h: In function ‘image_check_target_arch’: include/image.h:846:3: error: #error "please define IH_ARCH_DEFAULT in your arch asm/u-boot.h" # error "please define IH_ARCH_DEFAULT in your arch asm/u-boot.h" ^~~~~ include/image.h:848:31: error: ‘IH_ARCH_DEFAULT’ undeclared (first use in this function); did you mean ‘IH_ARCH_COUNT’? return image_check_arch(hdr, IH_ARCH_DEFAULT); The error can be avoided by moving the definition of IH_ARCH_DEFAULT before #include <asm/ppc.h> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
* Merge branch 'master' of git://git.denx.de/u-boot-spiTom Rini2018-12-051-7/+0
|\ | | | | | | | | | | | | | | - Various MTD fixes from Boris - Zap various unused / legacy paths. - pxa3xx NAND update from Miquel Signed-off-by: Tom Rini <trini@konsulko.com>
| * spi: Zap CONFIG_HARD_SPIJagan Teki2018-11-271-7/+0
| | | | | | | | | | | | | | | | | | | | In legacy CONFIG_HARD_SPI initalizing spi_init code, which was removed during dm conversion cleanup. So remove the dead instances of CONFIG_HARD_SPI, and related code. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
* | spl: Add support for passing handoff info to U-Boot properSimon Glass2018-11-261-3/+0
|/ | | | | | | | | | | | | There is some basic informaton that SPL normally wants to pass through to U-Boot, such as the SDRAM size and bank information. Mkae use of the new bloblist structure for this. Add a new 'handoff' blob which is set up in SPL and passed to U-Boot proper. Also adda test for sandbox_spl that checks that this works correctly and a new 'sb' command to show the information passed from SPL. Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Simon Glass <sjg@chromium.org>
* powerpc: t1040: Correct RCW EC2 settingsBin Meng2018-10-291-2/+1
| | | | | | | | | | | | | | Per T1040RM (Rev. 1, 08/2015), there are 2 issues with the RCW EC2 settings. - The value of FSL_CORENET_RCWSR13_EC2_FM1_GPIO is wrong and should be 0x04000000 (value of 1 in RCW bit [420:421]) - Value of 2/3 are reserved in RCW bit [420:421], hence there is no macro FSL_CORENET_RCWSR13_EC2_FM1_DTSEC5_MII. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Poonam Aggrwal <poonam.aggrwal@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
* powerpc: t1040: Correct RCW MAC2_GMII_SEL valueBin Meng2018-10-291-1/+1
| | | | | | | | | | Per T1040RM (Rev. 1, 08/2015), the value of FSL_CORENET_RCWSR13_MAC2_GMII_SEL_ENET_PORT is wrong and should be 0x00000080 (bit 440 in the RCW). Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Poonam Aggrwal <poonam.aggrwal@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
* misc: Add MPC83xx serdes driverMario Six2018-09-181-0/+4
| | | | | | | | Add a driver to configure the SerDes (Serializer/Deserializer) lanes on the MPC83xx architecture. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Mario Six <mario.six@gdsys.cc>
* cpu: Add MPC83xx CPU driverMario Six2018-09-181-0/+2
| | | | | | Add a CPU driver for the MPC83xx architecture. Signed-off-by: Mario Six <mario.six@gdsys.cc>
* clk: Add MPC83xx clock driverMario Six2018-09-183-1/+79
| | | | | | Add a clock driver for the MPC83xx architecture. Signed-off-by: Mario Six <mario.six@gdsys.cc>
* powerpc: Add read*_*/write*_* macrosMario Six2018-09-181-0/+18
| | | | | | | Define the read*_*/write*_* macros for the PowerPC platform to be able to use the macros in wait_bit.h. Signed-off-by: Mario Six <mario.six@gdsys.cc>
* arch: types.h: factor out fixed width typedefs to int-ll64.hMasahiro Yamada2018-09-101-28/+2
| | | | | | | | | | | | | All architectures have the same definition for s8/16/32/64 and u8/16/32/64. Factor out the duplicated code into <asm-generic/int-ll64.h>. BTW, Linux unified the kernel space definition into int-ll64.h a few years ago as you see in Linux commit 0c79a8e29b5f ("asm/types.h: Remove include/asm-generic/int-l64.h"). Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* configs: Remove empty #ifdef/#ifndef blocks from configsAlex Kiernan2018-07-101-3/+0
| | | | | | | Remove empty #ifdef/#ifndef..#endif blocks where the configuration they guarded has been completely removed. Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
* SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini2018-05-0732-65/+32
| | | | | | | | | | | | | | | | | | | | 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>