From f4f194e864e879896e630594448b31cc672a4934 Mon Sep 17 00:00:00 2001 From: Konstantin Porotchkin Date: Wed, 5 Apr 2017 17:42:33 +0300 Subject: arm64: mvebu: Trigger PCI devices scan at early init stage Add PCIe initialization at early init stage. This operation has a side effect of detecting all PCIe plug-in cards, so the operator is not obligated to issue "pci enum" command though CLI for this purpose. Signed-off-by: Konstantin Porotchkin Cc: Stefan Roese Cc: Igal Liberman Cc: Nadav Haklai Reviewed-by: Stefan Roese --- arch/arm/mach-mvebu/arm64-common.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'arch/arm/mach-mvebu') diff --git a/arch/arm/mach-mvebu/arm64-common.c b/arch/arm/mach-mvebu/arm64-common.c index 2ef5726905..c2c176e3d4 100644 --- a/arch/arm/mach-mvebu/arm64-common.c +++ b/arch/arm/mach-mvebu/arm64-common.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -147,5 +148,10 @@ int arch_early_init_r(void) /* Cause the SATA device to do its early init */ uclass_first_device(UCLASS_AHCI, &dev); +#ifdef CONFIG_DM_PCI + /* Trigger PCIe devices detection */ + pci_init(); +#endif + return 0; } -- cgit From a2cb55938fd9bd00dddcd0991d67fd1dd9e05ad5 Mon Sep 17 00:00:00 2001 From: Konstantin Porotchkin Date: Wed, 5 Apr 2017 18:22:31 +0300 Subject: arm64: mvebu: a8k: Add support for NAND clock get Implement mvebu_get_nand_clock call for A8K family. This function is used by PXA3XX NAND driver. Signed-off-by: Konstantin Porotchkin Cc: Stefan Roese Cc: Igal Liberman Cc: Nadav Haklai Reviewed-by: Stefan Roese --- arch/arm/mach-mvebu/armada8k/cpu.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'arch/arm/mach-mvebu') diff --git a/arch/arm/mach-mvebu/armada8k/cpu.c b/arch/arm/mach-mvebu/armada8k/cpu.c index 2325e9a180..38e7d33cb3 100644 --- a/arch/arm/mach-mvebu/armada8k/cpu.c +++ b/arch/arm/mach-mvebu/armada8k/cpu.c @@ -110,3 +110,21 @@ void reset_cpu(ulong ignored) reg &= ~(1 << RFU_SW_RESET_OFFSET); writel(reg, RFU_GLOBAL_SW_RST); } + +/* + * TODO - implement this functionality using platform + * clock driver once it gets available + * Return NAND clock in Hz + */ +u32 mvebu_get_nand_clock(void) +{ + unsigned long NAND_FLASH_CLK_CTRL = 0xF2440700UL; + unsigned long NF_CLOCK_SEL_MASK = 0x1; + u32 reg; + + reg = readl(NAND_FLASH_CLK_CTRL); + if (reg & NF_CLOCK_SEL_MASK) + return 400 * 1000000; + else + return 250 * 1000000; +} -- cgit From d374e90b2777fe54036149100af4b413eae79a77 Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Fri, 7 Apr 2017 12:56:26 +0200 Subject: arm: mvebu: Minor fixes in the AXP / A38x SERDES code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix spelling error of SERDES_VERSION - Remove superfluous definition of this macro - Remove unnecessary include of i2c.h Signed-off-by: Uwe Kleine-König Signed-off-by: Stefan Roese --- arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec-38x.c | 2 -- arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c | 4 ++-- arch/arm/mach-mvebu/serdes/axp/high_speed_env_lib.c | 6 +++--- arch/arm/mach-mvebu/serdes/axp/high_speed_env_spec.c | 1 - 4 files changed, 5 insertions(+), 8 deletions(-) (limited to 'arch/arm/mach-mvebu') diff --git a/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec-38x.c b/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec-38x.c index 104e7e88d7..0dfb9452e6 100644 --- a/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec-38x.c +++ b/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec-38x.c @@ -13,8 +13,6 @@ #include "high_speed_env_spec.h" #include "sys_env_lib.h" -#define SERDES_VERION "2.0" - u8 selectors_serdes_rev1_map[LAST_SERDES_TYPE][MAX_SERDES_LANES] = { /* 0 1 2 3 4 5 */ {0x1, 0x1, NA, NA, NA, NA}, /* PEX0 */ diff --git a/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c b/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c index 820219e68e..883b90776a 100644 --- a/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c +++ b/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c @@ -27,7 +27,7 @@ */ struct cfg_seq serdes_seq_db[SERDES_LAST_SEQ]; -#define SERDES_VERION "2.0" +#define SERDES_VERSION "2.0" #define ENDED_OK "High speed PHY - Ended Successfully\n" #define LINK_WAIT_CNTR 100 @@ -1416,7 +1416,7 @@ int serdes_phy_config(void) DEBUG_INIT_FULL_S("\n### ctrl_high_speed_serdes_phy_config ###\n"); DEBUG_INIT_S("High speed PHY - Version: "); - DEBUG_INIT_S(SERDES_VERION); + DEBUG_INIT_S(SERDES_VERSION); DEBUG_INIT_S("\n"); /* Init serdes sequences DB */ diff --git a/arch/arm/mach-mvebu/serdes/axp/high_speed_env_lib.c b/arch/arm/mach-mvebu/serdes/axp/high_speed_env_lib.c index 5925bae69f..b0e193b78c 100644 --- a/arch/arm/mach-mvebu/serdes/axp/high_speed_env_lib.c +++ b/arch/arm/mach-mvebu/serdes/axp/high_speed_env_lib.c @@ -14,7 +14,7 @@ #include "high_speed_env_spec.h" #include "board_env_spec.h" -#define SERDES_VERION "2.1.5" +#define SERDES_VERSION "2.1.5" #define ENDED_OK "High speed PHY - Ended Successfully\n" static const u8 serdes_cfg[][SERDES_LAST_UNIT] = BIN_SERDES_CFG; @@ -285,12 +285,12 @@ int serdes_phy_config(void) if (reg_read(REG_BOOTROM_ROUTINE_ADDR) & (1 << REG_BOOTROM_ROUTINE_DRAM_INIT_OFFS)) { DEBUG_INIT_S("High speed PHY - Version: "); - DEBUG_INIT_S(SERDES_VERION); + DEBUG_INIT_S(SERDES_VERSION); DEBUG_INIT_S(" - 2nd boot - Skip\n"); return MV_OK; } DEBUG_INIT_S("High speed PHY - Version: "); - DEBUG_INIT_S(SERDES_VERION); + DEBUG_INIT_S(SERDES_VERSION); DEBUG_INIT_S(" (COM-PHY-V20)\n"); /* diff --git a/arch/arm/mach-mvebu/serdes/axp/high_speed_env_spec.c b/arch/arm/mach-mvebu/serdes/axp/high_speed_env_spec.c index 115ec2cd60..704a59fa15 100644 --- a/arch/arm/mach-mvebu/serdes/axp/high_speed_env_spec.c +++ b/arch/arm/mach-mvebu/serdes/axp/high_speed_env_spec.c @@ -5,7 +5,6 @@ */ #include -#include #include #include #include -- cgit