From ff124d1bb022567c2d318c9414b30188ba7b3a60 Mon Sep 17 00:00:00 2001 From: Siva Durga Prasad Paladugu Date: Sat, 6 Jun 2015 15:08:12 +0530 Subject: [PATCH] zynqmp: Define ep config for ZynqMP Define a new config "zynqmp_ep" for ZynqMP instead of xilinx_zynqmp. This config supports all emulation platforms of ZynqMP. Signed-off-by: Siva Durga Prasad Paladugu Signed-off-by: Michal Simek --- arch/arm/Kconfig | 2 +- arch/arm/cpu/armv8/Makefile | 2 +- arch/arm/cpu/armv8/zynqmp/Kconfig | 12 +++++-- board/xilinx/zynqmp/MAINTAINERS | 5 +-- ...p_defconfig => xilinx_zynqmp_ep_defconfig} | 4 +-- drivers/mtd/spi/sf_params.c | 2 +- drivers/net/zynq_gem.c | 10 +++--- include/configs/xilinx_zynqmp.h | 14 -------- include/configs/xilinx_zynqmp_ep.h | 32 +++++++++++++++++++ 9 files changed, 55 insertions(+), 28 deletions(-) rename configs/{xilinx_zynqmp_defconfig => xilinx_zynqmp_ep_defconfig} (81%) create mode 100644 include/configs/xilinx_zynqmp_ep.h diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 7511e79efef..9f99737d7f1 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -622,7 +622,7 @@ config ZYNQ select CPU_V7 select SUPPORT_SPL -config TARGET_XILINX_ZYNQMP +config ARCH_ZYNQMP bool "Support Xilinx ZynqMP Platform" select ARM64 diff --git a/arch/arm/cpu/armv8/Makefile b/arch/arm/cpu/armv8/Makefile index dee5e258b6c..6466ebb4606 100644 --- a/arch/arm/cpu/armv8/Makefile +++ b/arch/arm/cpu/armv8/Makefile @@ -16,4 +16,4 @@ obj-y += tlb.o obj-y += transition.o obj-$(CONFIG_FSL_LSCH3) += fsl-lsch3/ -obj-$(CONFIG_TARGET_XILINX_ZYNQMP) += zynqmp/ +obj-$(CONFIG_ARCH_ZYNQMP) += zynqmp/ diff --git a/arch/arm/cpu/armv8/zynqmp/Kconfig b/arch/arm/cpu/armv8/zynqmp/Kconfig index b07932e8058..c8fcfb6abbc 100644 --- a/arch/arm/cpu/armv8/zynqmp/Kconfig +++ b/arch/arm/cpu/armv8/zynqmp/Kconfig @@ -1,4 +1,12 @@ -if TARGET_XILINX_ZYNQMP +if ARCH_ZYNQMP + +choice + prompt "Xilinx ZynqMP board select" + +config TARGET_ZYNQMP_EP + bool "ZynqMP EP Board" + +endchoice config SYS_BOARD default "zynqmp" @@ -10,6 +18,6 @@ config SYS_SOC default "zynqmp" config SYS_CONFIG_NAME - default "xilinx_zynqmp" + default "xilinx_zynqmp_ep" if TARGET_ZYNQMP_EP endif diff --git a/board/xilinx/zynqmp/MAINTAINERS b/board/xilinx/zynqmp/MAINTAINERS index da333404594..20ca6522e57 100644 --- a/board/xilinx/zynqmp/MAINTAINERS +++ b/board/xilinx/zynqmp/MAINTAINERS @@ -1,6 +1,7 @@ -XILINX_ZYNQMP BOARD +XILINX_ZYNQMP_EP BOARD M: Michal Simek S: Maintained F: board/xilinx/zynqmp/ F: include/configs/xilinx_zynqmp.h -F: configs/xilinx_zynqmp_defconfig +F: include/configs/xilinx_zynqmp_ep.h +F: configs/xilinx_zynqmp_ep_defconfig diff --git a/configs/xilinx_zynqmp_defconfig b/configs/xilinx_zynqmp_ep_defconfig similarity index 81% rename from configs/xilinx_zynqmp_defconfig rename to configs/xilinx_zynqmp_ep_defconfig index 124a4e16c38..d3d3ee3f153 100644 --- a/configs/xilinx_zynqmp_defconfig +++ b/configs/xilinx_zynqmp_ep_defconfig @@ -1,5 +1,6 @@ CONFIG_ARM=y -CONFIG_TARGET_XILINX_ZYNQMP=y +CONFIG_ARCH_ZYNQMP=y +CONFIG_DEFAULT_DEVICE_TREE="zynqmp-ep" CONFIG_CMD_BDI=y CONFIG_CMD_BOOTD=y CONFIG_CMD_RUN=y @@ -15,4 +16,3 @@ CONFIG_CMD_PING=y CONFIG_CMD_TIME=y CONFIG_CMD_MISC=y CONFIG_CMD_TIMER=y -CONFIG_DEFAULT_DEVICE_TREE="zynqmp" diff --git a/drivers/mtd/spi/sf_params.c b/drivers/mtd/spi/sf_params.c index 46d631d91ad..dbe8d42cbeb 100644 --- a/drivers/mtd/spi/sf_params.c +++ b/drivers/mtd/spi/sf_params.c @@ -87,7 +87,7 @@ const struct spi_flash_params spi_flash_params_table[] = { {"N25Q256", 0x20ba19, 0x0, 64 * 1024, 512, RD_FULL, WR_QPP | SECT_4K}, {"N25Q256A", 0x20bb19, 0x0, 64 * 1024, 512, RD_FULL, WR_QPP | SECT_4K}, {"N25Q512", 0x20ba20, 0x0, 64 * 1024, 1024, RD_FULL, WR_QPP | E_FSR | SECT_4K}, -#ifdef CONFIG_TARGET_XILINX_ZYNQMP +#ifdef CONFIG_ARCH_ZYNQMP {"N25Q512A", 0x20bb20, 0x0, 64 * 1024, 1024, RD_FULL, WR_QPP | E_FSR}, #else {"N25Q512A", 0x20bb20, 0x0, 64 * 1024, 1024, RD_FULL, WR_QPP | E_FSR | SECT_4K}, diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c index 0092691bd5a..f56ea4c5a44 100644 --- a/drivers/net/zynq_gem.c +++ b/drivers/net/zynq_gem.c @@ -56,14 +56,14 @@ #define ZYNQ_GEM_NWCFG_SPEED1000 0x000000400 /* 1Gbps operation */ #define ZYNQ_GEM_NWCFG_FDEN 0x000000002 /* Full Duplex mode */ #define ZYNQ_GEM_NWCFG_FSREM 0x000020000 /* FCS removal */ -#ifdef CONFIG_TARGET_XILINX_ZYNQMP +#ifdef CONFIG_ARM64 #define ZYNQ_GEM_NWCFG_MDCCLKDIV 0x0001C0000 /* Div pclk by 224, 540MHz */ #else #define ZYNQ_GEM_NWCFG_MDCCLKDIV 0x000080000 /* Div pclk by 32, 80MHz */ #endif #define ZYNQ_GEM_NWCFG_MDCCLKDIV2 0x0000c0000 /* Div pclk by 48, 120MHz */ -#ifdef CONFIG_TARGET_XILINX_ZYNQMP +#ifdef CONFIG_ARM64 # define ZYNQ_GEM_DBUS_WIDTH (1 << 21) /* 64 bit bus */ #else # define ZYNQ_GEM_DBUS_WIDTH (0 << 21) /* 32 bit bus */ @@ -348,7 +348,7 @@ static int zynq_gem_init(struct eth_device *dev, bd_t * bis) priv->init++; } -#ifdef CONFIG_TARGET_XILINX_ZYNQMP +#ifdef CONFIG_ARM64 if (!priv->init) { #endif phy_detection(dev); @@ -384,11 +384,11 @@ static int zynq_gem_init(struct eth_device *dev, bd_t * bis) clk_rate = ZYNQ_GEM_FREQUENCY_10; break; } -#ifdef CONFIG_TARGET_XILINX_ZYNQMP +#ifdef CONFIG_ARM64 } #endif -#ifndef CONFIG_TARGET_XILINX_ZYNQMP +#ifndef CONFIG_ARM64 /* Change the rclk and clk only not using EMIO interface */ if (!priv->emio) zynq_slcr_gem_clk_setup(dev->iobase != diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h index eb67dbb1a16..0cca7ee0f96 100644 --- a/include/configs/xilinx_zynqmp.h +++ b/include/configs/xilinx_zynqmp.h @@ -55,7 +55,6 @@ #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 0x800000) /* Serial setup */ -#define CONFIG_ZYNQ_SERIAL_UART0 #define CONFIG_ZYNQ_SERIAL #define CONFIG_CONS_INDEX 0 @@ -63,10 +62,6 @@ #define CONFIG_SYS_BAUDRATE_TABLE \ { 4800, 9600, 19200, 38400, 57600, 115200 } -#define CONFIG_ZYNQMP_QSPI -#define CONFIG_ZYNQ_SDHCI0 -#define CONFIG_NAND_ARASAN - /* Command line configuration */ #define CONFIG_CMD_ENV #define CONFIG_CMD_EXT2 @@ -191,9 +186,6 @@ /* max command args */ #define CONFIG_SYS_MAXARGS 64 -#define CONFIG_ZYNQ_GEM0 -#define CONFIG_ZYNQ_GEM_PHY_ADDR0 7 - /* Ethernet driver */ #if defined(CONFIG_ZYNQ_GEM0) || defined(CONFIG_ZYNQ_GEM1) || \ defined(CONFIG_ZYNQ_GEM2) || defined(CONFIG_ZYNQ_GEM3) @@ -205,9 +197,6 @@ # define CONFIG_PHY_MARVELL #endif -#define CONFIG_ZYNQ_I2C0 -#define CONFIG_SYS_I2C_ZYNQ - /* I2C */ #if defined(CONFIG_SYS_I2C_ZYNQ) # define CONFIG_CMD_I2C @@ -216,8 +205,6 @@ # define CONFIG_SYS_I2C_ZYNQ_SLAVE 0 #endif -#define CONFIG_ZYNQMP_EEPROM - /* EEPROM */ #ifdef CONFIG_ZYNQMP_EEPROM # define CONFIG_CMD_EEPROM @@ -239,7 +226,6 @@ #define CONFIG_BOARD_EARLY_INIT_R #define CONFIG_CLOCKS -#define CONFIG_AHCI #ifdef CONFIG_AHCI #define CONFIG_LIBATA #define CONFIG_SCSI_AHCI diff --git a/include/configs/xilinx_zynqmp_ep.h b/include/configs/xilinx_zynqmp_ep.h new file mode 100644 index 00000000000..de7c4482d81 --- /dev/null +++ b/include/configs/xilinx_zynqmp_ep.h @@ -0,0 +1,32 @@ +/* + * Configuration for Xilinx ZynqMP emulation + * platforms. See zynqmp-common.h for ZynqMP + * common configs + * + * (C) Copyright 2014 - 2015 Xilinx, Inc. + * Michal Simek + * Siva Durga Prasad Paladugu + * + * Based on Configuration for Versatile Express + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef __CONFIG_ZYNQMP_EP_H +#define __CONFIG_ZYNQMP_EP_H + +#define CONFIG_ZYNQ_GEM0 +#define CONFIG_ZYNQ_GEM_PHY_ADDR0 7 + +#define CONFIG_ZYNQ_SERIAL_UART0 +#define CONFIG_ZYNQMP_QSPI +#define CONFIG_ZYNQ_SDHCI0 +#define CONFIG_ZYNQ_I2C0 +#define CONFIG_SYS_I2C_ZYNQ +#define CONFIG_ZYNQ_EEPROM +#define CONFIG_AHCI +#define CONFIG_NAND_ARASAN + +#include + +#endif /* __CONFIG_ZYNQMP_EP_H */ -- 2.47.3