Initial commit
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
From e33a814e772cdc36436c8c188d8c42d019fda639 Mon Sep 17 00:00:00 2001
|
||||
From: Dirk Mueller <dmueller@suse.com>
|
||||
Date: Tue, 14 Jan 2020 18:53:41 +0100
|
||||
Subject: [PATCH] scripts/dtc: Remove redundant YYLOC global declaration
|
||||
|
||||
gcc 10 will default to -fno-common, which causes this error at link
|
||||
time:
|
||||
|
||||
(.text+0x0): multiple definition of `yylloc'; dtc-lexer.lex.o (symbol from plugin):(.text+0x0): first defined here
|
||||
|
||||
This is because both dtc-lexer as well as dtc-parser define the same
|
||||
global symbol yyloc. Before with -fcommon those were merged into one
|
||||
defintion. The proper solution would be to to mark this as "extern",
|
||||
however that leads to:
|
||||
|
||||
dtc-lexer.l:26:16: error: redundant redeclaration of 'yylloc' [-Werror=redundant-decls]
|
||||
26 | extern YYLTYPE yylloc;
|
||||
| ^~~~~~
|
||||
In file included from dtc-lexer.l:24:
|
||||
dtc-parser.tab.h:127:16: note: previous declaration of 'yylloc' was here
|
||||
127 | extern YYLTYPE yylloc;
|
||||
| ^~~~~~
|
||||
cc1: all warnings being treated as errors
|
||||
|
||||
which means the declaration is completely redundant and can just be
|
||||
dropped.
|
||||
|
||||
Signed-off-by: Dirk Mueller <dmueller@suse.com>
|
||||
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
|
||||
[robh: cherry-pick from upstream]
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Rob Herring <robh@kernel.org>
|
||||
---
|
||||
scripts/dtc/dtc-lexer.l | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
--- a/scripts/dtc/dtc-lexer.l
|
||||
+++ b/scripts/dtc/dtc-lexer.l
|
||||
@@ -38,7 +38,6 @@ LINECOMMENT "//".*\n
|
||||
#include "srcpos.h"
|
||||
#include "dtc-parser.tab.h"
|
||||
|
||||
-YYLTYPE yylloc;
|
||||
extern bool treesource_error;
|
||||
|
||||
/* CAUTION: this will stop working if we ever use yyless() or yyunput() */
|
||||
@@ -0,0 +1,103 @@
|
||||
From 67db0da72eb7ed87ebaaeb8a26891cb2cf916500 Mon Sep 17 00:00:00 2001
|
||||
From: Luis Araneda <luaraneda@gmail.com>
|
||||
Date: Sun, 21 Jul 2019 23:24:12 -0400
|
||||
Subject: [U-Boot] [PATCH] arm: zynq: read mac address from SPI flash memory
|
||||
|
||||
Implement a method for reading the MAC address from an
|
||||
SPI flash memory.
|
||||
In particular, this method is used by the Zybo Z7 board
|
||||
to read the MAC address from the OTP region in the SPI NOR
|
||||
memory
|
||||
|
||||
Signed-off-by: Luis Araneda <luaraneda@gmail.com>
|
||||
---
|
||||
As of 2019-08-18, this patch has not been accepted by upstream U-Boot.
|
||||
Keep this patch until an alternative is accepted by upstream.
|
||||
---
|
||||
board/xilinx/common/board.c | 28 ++++++++++++++++++++++++++++
|
||||
configs/zynq_zybo_z7_defconfig | 3 +++
|
||||
drivers/misc/Kconfig | 17 +++++++++++++++++
|
||||
3 files changed, 48 insertions(+)
|
||||
|
||||
--- a/board/xilinx/common/board.c
|
||||
+++ b/board/xilinx/common/board.c
|
||||
@@ -6,7 +6,10 @@
|
||||
|
||||
#include <common.h>
|
||||
#include <dm/uclass.h>
|
||||
+#include <dm/device.h>
|
||||
+#include <dm/device-internal.h>
|
||||
#include <i2c.h>
|
||||
+#include <spi_flash.h>
|
||||
|
||||
int zynq_board_read_rom_ethaddr(unsigned char *ethaddr)
|
||||
{
|
||||
@@ -34,5 +37,30 @@ int zynq_board_read_rom_ethaddr(unsigned
|
||||
debug("%s: I2C EEPROM MAC %pM\n", __func__, ethaddr);
|
||||
#endif
|
||||
|
||||
+#if defined(CONFIG_MAC_ADDR_IN_SPI_FLASH)
|
||||
+ struct spi_flash *flash;
|
||||
+ struct udevice *dev;
|
||||
+
|
||||
+ ret = spi_flash_probe_bus_cs(CONFIG_SF_DEFAULT_BUS,
|
||||
+ CONFIG_SF_DEFAULT_CS,
|
||||
+ 0, 0, &dev);
|
||||
+ if (ret) {
|
||||
+ printf("SPI(bus:%u cs:%u) probe failed\n",
|
||||
+ CONFIG_SF_DEFAULT_BUS,
|
||||
+ CONFIG_SF_DEFAULT_CS);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ flash = dev_get_uclass_priv(dev);
|
||||
+ flash->read_opcode = CONFIG_MAC_ADDR_SPI_FLASH_READ_CMD;
|
||||
+
|
||||
+ if (spi_flash_read_dm(dev,
|
||||
+ CONFIG_MAC_ADDR_SPI_FLASH_DATA_OFFSET,
|
||||
+ 6, ethaddr))
|
||||
+ printf("SPI MAC address read failed\n");
|
||||
+
|
||||
+ device_remove(dev, DM_REMOVE_NORMAL);
|
||||
+#endif
|
||||
+
|
||||
return ret;
|
||||
}
|
||||
--- a/configs/zynq_zybo_z7_defconfig
|
||||
+++ b/configs/zynq_zybo_z7_defconfig
|
||||
@@ -42,6 +42,9 @@ CONFIG_DFU_RAM=y
|
||||
CONFIG_FPGA_XILINX=y
|
||||
CONFIG_FPGA_ZYNQPL=y
|
||||
CONFIG_DM_GPIO=y
|
||||
+CONFIG_MAC_ADDR_IN_SPI_FLASH=y
|
||||
+CONFIG_MAC_ADDR_SPI_FLASH_READ_CMD=0x4b
|
||||
+CONFIG_MAC_ADDR_SPI_FLASH_DATA_OFFSET=0x20
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_ZYNQ=y
|
||||
CONFIG_SPI_FLASH=y
|
||||
--- a/drivers/misc/Kconfig
|
||||
+++ b/drivers/misc/Kconfig
|
||||
@@ -366,6 +366,23 @@ config SYS_I2C_EEPROM_ADDR_OVERFLOW
|
||||
|
||||
endif
|
||||
|
||||
+config MAC_ADDR_IN_SPI_FLASH
|
||||
+ bool "MAC address in SPI flash"
|
||||
+ help
|
||||
+ Read MAC address from an SPI flash memory
|
||||
+
|
||||
+if MAC_ADDR_IN_SPI_FLASH
|
||||
+
|
||||
+config MAC_ADDR_SPI_FLASH_READ_CMD
|
||||
+ hex "Read command for the SPI flash memory"
|
||||
+ default 0
|
||||
+
|
||||
+config MAC_ADDR_SPI_FLASH_DATA_OFFSET
|
||||
+ hex "Offset of MAC data in SPI flash memory"
|
||||
+ default 0
|
||||
+
|
||||
+endif
|
||||
+
|
||||
config GDSYS_RXAUI_CTRL
|
||||
bool "Enable gdsys RXAUI control driver"
|
||||
depends on MISC
|
||||
Reference in New Issue
Block a user