aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel')
-rw-r--r--meta-amd-bsp/recipes-kernel/amd-spi/amd-spi_1.0.bb16
-rw-r--r--meta-amd-bsp/recipes-kernel/amd-spi/files/Makefile14
-rw-r--r--meta-amd-bsp/recipes-kernel/amd-spi/files/spi_amd.c479
-rw-r--r--meta-amd-bsp/recipes-kernel/amd-spi/files/spi_amd.h28
-rw-r--r--meta-amd-bsp/recipes-kernel/amd-spi/files/spirom.c517
-rw-r--r--meta-amd-bsp/recipes-kernel/amd-spi/files/spirom.h53
-rw-r--r--meta-amd-bsp/recipes-kernel/kmod/files/blacklist-ccp.conf2
-rw-r--r--meta-amd-bsp/recipes-kernel/kmod/kmod_%.bbappend8
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0001-usb-xhci-Add-LPM-support-to-AMD-xhci-controller.patch32
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0002-amd-xgbe-fix-for-the-crash-which-happens-during-SFP-.patch77
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0003-amd-xgbe-Fix-NETDEV-WATCHDOG-transmit-queue-timed-ou.patch32
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0004-spi-spidev-Add-dummy-spidev-device-to-SPI-bus.patch100
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0005-amd-xgbe-Fix-for-Network-fluctuations.patch39
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0006-amd-xgbe-sets-XGBE_LINK_INIT-when-there-is-a-link-fa.patch39
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0007-amd-xgbe-improved-KR-training-sequence.patch286
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0008-amd-xgbe-rrc-is-required-only-for-Fixed-PHY-configur.patch33
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0009-amd-xgbe-increased-cdr-delay.patch35
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0010-amd-xgbe-synchronization-between-AN-state-machine-an.patch123
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/afalg.cfg41
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-ccp.cfg27
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-emmc-patches.scc0
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-spi-patches.scc1
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-usb-patches.scc1
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-xgbe-patches.scc8
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-xgbe.cfg51
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86-extra-config.cfg305
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86-standard-only.cfg3
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86-user-config.cfg396
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86-user-features.scc0
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86-user-patches.scc0
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86.cfg59
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/disable-graphics.cfg4
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/dpdk.cfg5
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/kvm.cfg39
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amd-emmc-patches.scc0
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amd-spi-patches.scc0
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amd-usb-patches.scc0
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amd-wdt-patches.scc0
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amd-xgbe-patches.scc0
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amdgpu-patches.scc0
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/console.cfg7
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/disable-bluetooth.cfg1
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/disable-intel-graphics.cfg0
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/disable-kgdb.cfg1
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/enable-bluetooth.cfg13
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/enable-kgdb.cfg3
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/hid.cfg5
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/logo.cfg1
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/misc-patches.scc0
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/sound.cfg29
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/spi-driver.cfg1
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/usb-serial.cfg1
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/wdt-driver.cfg1
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/wifi-drivers.cfg9
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-amdx86_5.10.inc36
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-common_5.10.inc27
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-e3000_5.10.inc3
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-ethanolx_5.10.inc3
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-rt_5.10.bbappend6
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-v1000_5.10.inc3
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto_5.10.bbappend9
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.4/linux-yocto-ethanolx_5.4.inc (renamed from meta-amd-bsp/recipes-kernel/linux-5.4/linux-yocto-rome_5.4.inc)2
62 files changed, 1906 insertions, 1108 deletions
diff --git a/meta-amd-bsp/recipes-kernel/amd-spi/amd-spi_1.0.bb b/meta-amd-bsp/recipes-kernel/amd-spi/amd-spi_1.0.bb
deleted file mode 100644
index aacb1039..00000000
--- a/meta-amd-bsp/recipes-kernel/amd-spi/amd-spi_1.0.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-DESCRIPTION = "This kernel module provides support for AMD SPI controller driver"
-LICENSE = "BSD | GPLv2"
-LIC_FILES_CHKSUM = "file://spi_amd.c;endline=29;md5=e9fdf6da58412e619d89ec9e135a1be3"
-
-inherit module kernel-openssl
-
-SRC_URI = "file://Makefile \
- file://spi_amd.c \
- file://spi_amd.h \
- file://spirom.c \
- file://spirom.h \
- "
-
-S = "${WORKDIR}"
-
-# The inherit of module.bbclass will take care of the rest
diff --git a/meta-amd-bsp/recipes-kernel/amd-spi/files/Makefile b/meta-amd-bsp/recipes-kernel/amd-spi/files/Makefile
deleted file mode 100644
index f778a69a..00000000
--- a/meta-amd-bsp/recipes-kernel/amd-spi/files/Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
-obj-m := spi_amd.o spirom.o
-
-SRC := $(shell pwd)
-
-all:
- $(MAKE) -C $(KERNEL_SRC) M=$(SRC)
-
-modules_install:
- $(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install
-
-clean:
- rm -f *.o *~ core .depend .*.cmd *.ko *.mod.c
- rm -f Module.markers Module.symvers modules.order
- rm -rf .tmp_versions Modules.symvers
diff --git a/meta-amd-bsp/recipes-kernel/amd-spi/files/spi_amd.c b/meta-amd-bsp/recipes-kernel/amd-spi/files/spi_amd.c
deleted file mode 100644
index 998d9ea6..00000000
--- a/meta-amd-bsp/recipes-kernel/amd-spi/files/spi_amd.c
+++ /dev/null
@@ -1,479 +0,0 @@
-/*****************************************************************************
-*
-* Copyright (c) 2013, Advanced Micro Devices, Inc.
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-* * Neither the name of Advanced Micro Devices, Inc. nor the names of
-* its contributors may be used to endorse or promote products derived
-* from this software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL ADVANCED MICRO DEVICES, INC. BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
-*
-***************************************************************************/
-#include <linux/init.h>
-#include <linux/module.h>
-#include <linux/pci.h>
-#include <linux/spi/spi.h>
-#include <linux/kthread.h>
-
-#include "spi_amd.h"
-
-struct amd_platform_data {
- u8 chip_select;
-};
-
-struct amd_spi {
- void __iomem *io_remap_addr;
- unsigned long io_base_addr;
- u32 rom_addr;
- struct spi_master *master;
- struct amd_platform_data controller_data;
- struct task_struct *kthread_spi;
- struct list_head msg_queue;
- wait_queue_head_t wq;
-};
-
-static struct pci_device_id amd_spi_pci_device_id[] = {
- { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_LPC_BRIDGE) },
- {}
-};
-MODULE_DEVICE_TABLE(pci, amd_spi_pci_device_id);
-
-static inline u8 amd_spi_readreg8(struct spi_master *master, int idx)
-{
- struct amd_spi *amd_spi = spi_master_get_devdata(master);
-
- return ioread8((u8 *)amd_spi->io_remap_addr + idx);
-}
-
-static inline void amd_spi_writereg8(struct spi_master *master, int idx,
- u8 val)
-{
- struct amd_spi *amd_spi = spi_master_get_devdata(master);
-
- iowrite8(val, ((u8 *)amd_spi->io_remap_addr + idx));
-}
-
-static inline void amd_spi_setclear_reg8(struct spi_master *master, int idx,
- u8 set, u8 clear)
-{
- u8 tmp = amd_spi_readreg8(master, idx);
- tmp = (tmp & ~clear) | set;
- amd_spi_writereg8(master, idx, tmp);
-}
-
-static inline u32 amd_spi_readreg32(struct spi_master *master, int idx)
-{
- struct amd_spi *amd_spi = spi_master_get_devdata(master);
-
- return ioread32((u8 *)amd_spi->io_remap_addr + idx);
-}
-
-static inline void amd_spi_writereg32(struct spi_master *master, int idx,
- u32 val)
-{
- struct amd_spi *amd_spi = spi_master_get_devdata(master);
-
- iowrite32(val, ((u8 *)amd_spi->io_remap_addr + idx));
-}
-
-static inline void amd_spi_setclear_reg32(struct spi_master *master, int idx,
- u32 set, u32 clear)
-{
- u32 tmp = amd_spi_readreg32(master, idx);
- tmp = (tmp & ~clear) | set;
- amd_spi_writereg32(master, idx, tmp);
-}
-
-static void amd_spi_select_chip(struct spi_master *master)
-{
- struct amd_spi *amd_spi = spi_master_get_devdata(master);
- u8 chip_select = amd_spi->controller_data.chip_select;
-
- amd_spi_setclear_reg8(master, AMD_SPI_ALT_CS_REG, chip_select,
- AMD_SPI_ALT_CS_MASK);
-}
-
-
-static void amd_spi_clear_fifo_ptr(struct spi_master *master)
-{
- amd_spi_setclear_reg32(master, AMD_SPI_CTRL0_REG, AMD_SPI_FIFO_CLEAR,
- AMD_SPI_FIFO_CLEAR);
-}
-
-static void amd_spi_set_opcode(struct spi_master *master, u8 cmd_opcode)
-{
- amd_spi_setclear_reg32(master, AMD_SPI_CTRL0_REG, cmd_opcode,
- AMD_SPI_OPCODE_MASK);
-}
-
-static inline void amd_spi_set_rx_count(struct spi_master *master,
- u8 rx_count)
-{
- amd_spi_setclear_reg8(master, AMD_SPI_RX_COUNT_REG, rx_count, 0xff);
-}
-
-static inline void amd_spi_set_tx_count(struct spi_master *master,
- u8 tx_count)
-{
- amd_spi_setclear_reg8(master, AMD_SPI_TX_COUNT_REG, tx_count, 0xff);
-}
-
-static void amd_spi_execute_opcode(struct spi_master *master)
-{
- struct amd_spi *amd_spi = spi_master_get_devdata(master);
- bool spi_busy;
-
- /* Set ExecuteOpCode bit in the CTRL0 register */
- amd_spi_setclear_reg32(master, AMD_SPI_CTRL0_REG, AMD_SPI_EXEC_CMD,
- AMD_SPI_EXEC_CMD);
-
- /* poll for SPI bus to become idle */
- spi_busy = (ioread32((u8 *)amd_spi->io_remap_addr +
- AMD_SPI_CTRL0_REG) & AMD_SPI_BUSY) == AMD_SPI_BUSY;
- while (spi_busy) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule();
- set_current_state(TASK_RUNNING);
- spi_busy = (ioread32((u8 *)amd_spi->io_remap_addr +
- AMD_SPI_CTRL0_REG) & AMD_SPI_BUSY) == AMD_SPI_BUSY;
- }
-}
-
-/* Helper function */
-#ifdef CONFIG_SPI_DEBUG
-static void amd_spi_dump_reg(struct spi_master *master)
-{
- struct amd_spi *amd_spi = spi_master_get_devdata(master);
-
- printk(KERN_DEBUG DRIVER_NAME ": SPI CTRL 0 registers: 0x%.8x\n",
- ioread32((u8 *)amd_spi->io_remap_addr + AMD_SPI_CTRL0_REG));
- /*
- * We cannot read CTRL1 register, because reading it would
- * inadvertently increment the FIFO pointer.
- */
- printk(KERN_DEBUG DRIVER_NAME ": SPI ALT CS registers: 0x%.2x\n",
- ioread8((u8 *)amd_spi->io_remap_addr + AMD_SPI_ALT_CS_REG));
- printk(KERN_DEBUG DRIVER_NAME ": SPI Tx Byte Count: 0x%.2x\n",
- ioread8((u8 *)amd_spi->io_remap_addr + AMD_SPI_TX_COUNT_REG));
- printk(KERN_DEBUG DRIVER_NAME ": SPI Rx Byte Count: 0x%.2x\n",
- ioread8((u8 *)amd_spi->io_remap_addr + AMD_SPI_RX_COUNT_REG));
- printk(KERN_DEBUG DRIVER_NAME ": SPI Status registers: 0x%.8x\n",
- ioread32((u8 *)amd_spi->io_remap_addr + AMD_SPI_STATUS_REG));
-}
-#else
-static void amd_spi_dump_reg(struct spi_master *master) {}
-#endif
-
-
-static int amd_spi_master_setup(struct spi_device *spi)
-{
- struct spi_master *master = spi->master;
- struct amd_spi *amd_spi = spi_master_get_devdata(master);
-
- amd_spi->controller_data.chip_select = spi->chip_select;
-
- amd_spi_select_chip(master);
-
- return 0;
-}
-
-static int amd_spi_master_transfer(struct spi_master *master,
- struct spi_message *msg)
-{
- struct amd_spi *amd_spi = spi_master_get_devdata(master);
-
- /*
- * Add new message to the queue and let the kernel thread know
- * about it.
- */
- list_add_tail(&msg->queue, &amd_spi->msg_queue);
- wake_up_interruptible(&amd_spi->wq);
-
- return 0;
-}
-static int amd_spi_thread(void *t)
-{
- struct amd_spi *amd_spi = t;
- struct spi_master *master = amd_spi->master;
- struct spi_transfer *transfer = NULL;
- struct spi_message *message = NULL;
- int direction = 0,i = 0,saved_index = 0;
- int opcode_found = 0,recv_flag = 0,tx_len = 0,rx_len = 0;
- u8 cmd_opcode = 0;
- long timeout = 0;
- u8 *buffer = NULL;
-
- /*
- * What we do here is actually pretty simple. We pick one message
- * at a time from the message queue set up by the controller, and
- * then process all the spi_transfers of that spi_message in one go.
- * We then remove the message from the queue, and complete the
- * transaction. This might not be the best approach, but this is how
- * we chose to implement this. Note that out SPI controller has FIFO
- * size of 70 bytes, but we consider it to contain a maximum of
- * 64-bytes of data and 3-bytes of address.
- */
- while (1) {
- /*
- * Let us wait on a wait queue till the message queue is empty.
- */
- do {
- timeout = wait_event_interruptible_timeout(amd_spi->wq,
- !list_empty(&amd_spi->msg_queue),1000);
-
- /* check stop condition */
- if (kthread_should_stop()) {
- set_current_state(TASK_RUNNING);
- return 0;
- }
- } while(timeout == 0);
-
- /*
- * Else, pull the very first message from the queue and process
- * all transfers within that message. And process the messages
- * in a pure linear fashion. We also remove the spi_message
- * from the queue.
- */
- message = list_entry(amd_spi->msg_queue.next,
- struct spi_message, queue);
- list_del_init(&message->queue);
-
- /* We store the CS# line to be used for this spi_message */
- amd_spi->controller_data.chip_select =
- message->spi->chip_select;
-
- /* Setting all variables to default value. */
- direction = i = 0;
- opcode_found = 0;
- recv_flag = tx_len = rx_len = 0;
- cmd_opcode = 0;
- buffer = NULL;
- saved_index = 0;
-
- amd_spi_select_chip(master);
-
- /*
- * This loop extracts spi_transfers from the spi message,
- * programs the command into command register. Pointer variable
- * *buffer* points to either tx_buf or rx_buf of spi_transfer
- * depending on direction of transfer. Also programs FIFO of
- * controller if data has to be transmitted.
- */
- list_for_each_entry(transfer, &message->transfers,
- transfer_list)
- {
- if(transfer->rx_buf != NULL)
- direction = RECEIVE;
- else if(transfer->tx_buf != NULL)
- direction = TRANSMIT;
-
- switch (direction) {
- case TRANSMIT:
- buffer = (u8 *)transfer->tx_buf;
-
- if(opcode_found != 1) {
- /* Store no. of bytes to be sent into
- * FIFO */
- tx_len = transfer->len - 1;
- /* Store opcode */
- cmd_opcode = *(u8 *)transfer->tx_buf;
- /* Pointing to start of TX data */
- buffer++;
- /* Program the command register*/
- amd_spi_set_opcode(master, cmd_opcode);
- opcode_found = 1;
- } else {
- /* Store no. of bytes to be sent into
- * FIFO */
- tx_len = transfer->len;
- }
-
- /* Write data into the FIFO. */
- for (i = 0; i < tx_len; i++) {
- iowrite8(buffer[i],
- ((u8 *)amd_spi->io_remap_addr +
- AMD_SPI_FIFO_BASE +
- i + saved_index));
- }
-
- /* Set no. of bytes to be transmitted */
- amd_spi_set_tx_count(master,
- tx_len + saved_index);
-
- /*
- * Saving the index, from where next
- * spi_transfer's data will be stored in FIFO.
- */
- saved_index = i;
- break;
- case RECEIVE:
- /* Store no. of bytes to be received from
- * FIFO */
- rx_len = transfer->len;
- buffer = (u8 *)transfer->rx_buf;
- recv_flag=1;
- break;
- }
- }
-
- /* Set the RX count to the number of bytes to expect in
- * response */
- amd_spi_set_rx_count(master, rx_len );
- amd_spi_clear_fifo_ptr(master);
- amd_spi_dump_reg(master);
- /* Executing command */
- amd_spi_execute_opcode(master);
- amd_spi_dump_reg(master);
-
- if(recv_flag == 1) {
- /* Read data from FIFO to receive buffer */
- for (i = 0; i < rx_len; i++) {
- buffer[i] = ioread8((u8 *)amd_spi->io_remap_addr
- + AMD_SPI_FIFO_BASE
- + tx_len + i);
- }
-
- recv_flag = 0;
- }
-
- /* Update statistics */
- message->actual_length = tx_len + rx_len + 1 ;
- /* complete the transaction */
- message->status = 0;
- spi_finalize_current_message(master);
- }
-
- return 0;
-}
-
-static int amd_spi_pci_probe(struct pci_dev *pdev,
- const struct pci_device_id *id)
-{
- struct device *dev = &pdev->dev;
- struct spi_master *master;
- struct amd_spi *amd_spi;
- u32 io_base_addr;
- int err = 0;
-
- /* Allocate storage for spi_master and driver private data */
- master = spi_alloc_master(dev, sizeof(struct amd_spi));
- if (master == NULL) {
- dev_err(dev, "Error allocating SPI master\n");
- return -ENOMEM;
- }
-
- amd_spi = spi_master_get_devdata(master);
- amd_spi->master = master;
-
- /*
- * Lets first get the base address of SPI registers. The SPI Base
- * Address is stored at offset 0xA0 into the LPC PCI configuration
- * space. As per the specification, it is stored at bits 6:31 of the
- * register. The address is aligned at 64-byte boundary,
- * so we should just mask the lower 6 bits and get the address.
- */
- pci_read_config_dword(pdev, AMD_PCI_LPC_SPI_BASE_ADDR_REG,
- &io_base_addr);
- amd_spi->io_base_addr = io_base_addr & AMD_SPI_BASE_ADDR_MASK;
- amd_spi->io_remap_addr = ioremap_nocache(amd_spi->io_base_addr,
- AMD_SPI_MEM_SIZE);
- if (amd_spi->io_remap_addr == NULL) {
- dev_err(dev, "ioremap of SPI registers failed\n");
- err = -ENOMEM;
- goto err_free_master;
- }
- dev_dbg(dev, "io_base_addr: 0x%.8lx, io_remap_address: %p\n",
- amd_spi->io_base_addr, amd_spi->io_remap_addr);
- INIT_LIST_HEAD(&amd_spi->msg_queue);
- init_waitqueue_head(&amd_spi->wq);
- amd_spi->kthread_spi = kthread_run(amd_spi_thread, amd_spi,
- "amd_spi_thread");
-
- /* Now lets initialize the fields of spi_master */
- master->bus_num = 0; /*
- * This should be the same as passed in
- * spi_board_info structure
- */
- master->num_chipselect = 4; /* Can be overwritten later during setup */
- master->mode_bits = 0;
- master->flags = 0;
- master->setup = amd_spi_master_setup;
- master->transfer_one_message = amd_spi_master_transfer;
- /* Register the controller with SPI framework */
- err = spi_register_master(master);
- if (err) {
- dev_err(dev, "error registering SPI controller\n");
- goto err_iounmap;
- }
- pci_set_drvdata(pdev, amd_spi);
-
- return 0;
-
-err_iounmap:
- iounmap(amd_spi->io_remap_addr);
-err_free_master:
- spi_master_put(master);
-
- return 0;
-}
-
-static void amd_spi_pci_remove(struct pci_dev *pdev)
-{
- struct amd_spi *amd_spi = pci_get_drvdata(pdev);
-
- kthread_stop(amd_spi->kthread_spi);
- iounmap(amd_spi->io_remap_addr);
- spi_unregister_master(amd_spi->master);
- spi_master_put(amd_spi->master);
- pci_set_drvdata(pdev, NULL);
-}
-
-static struct pci_driver amd_spi_pci_driver = {
- .name = "amd_spi",
- .id_table = amd_spi_pci_device_id,
- .probe = amd_spi_pci_probe,
- .remove = amd_spi_pci_remove,
-};
-
-static int __init amd_spi_init(void)
-{
- int ret;
-
- pr_info("AMD SPI Driver v%s\n", SPI_VERSION);
-
- ret = pci_register_driver(&amd_spi_pci_driver);
- if (ret)
- return ret;
-
- return 0;
-}
-module_init(amd_spi_init);
-
-static void __exit amd_spi_exit(void)
-{
- pci_unregister_driver(&amd_spi_pci_driver);
-}
-module_exit(amd_spi_exit);
-
-MODULE_LICENSE("Dual BSD/GPL");
-MODULE_AUTHOR("Arindam Nath <arindam.nath@amd.com>");
-MODULE_AUTHOR("Sanjay Mehta <sanju.mehta@amd.com>");
-MODULE_DESCRIPTION("AMD SPI Master Controller Driver");
diff --git a/meta-amd-bsp/recipes-kernel/amd-spi/files/spi_amd.h b/meta-amd-bsp/recipes-kernel/amd-spi/files/spi_amd.h
deleted file mode 100644
index ec58b9a8..00000000
--- a/meta-amd-bsp/recipes-kernel/amd-spi/files/spi_amd.h
+++ /dev/null
@@ -1,28 +0,0 @@
-#ifndef SPI_AMD_H
-#define SPI_AMD_H
-
-#define DRIVER_NAME "spi_amd"
-#define SPI_VERSION "1.0"
-
-#define AMD_SPI_CTRL0_REG 0x00
- #define AMD_SPI_EXEC_CMD (0x1 << 16)
- #define AMD_SPI_OPCODE_MASK 0xFF
- #define AMD_SPI_FIFO_CLEAR (0x1 << 20)
- #define AMD_SPI_BUSY (0x1 << 31)
-#define AMD_SPI_ALT_CS_REG 0x1D
- #define AMD_SPI_ALT_CS_MASK 0x3
-#define AMD_SPI_FIFO_BASE 0x80
-#define AMD_SPI_TX_COUNT_REG 0x48
-#define AMD_SPI_RX_COUNT_REG 0x4B
-#define AMD_SPI_STATUS_REG 0x4C
-
-#define AMD_PCI_LPC_SPI_BASE_ADDR_REG 0xA0
-#define AMD_SPI_BASE_ADDR_MASK ~0x3F
-#define AMD_SPI_MEM_SIZE 200
-
-#define PCI_DEVICE_ID_AMD_LPC_BRIDGE 0x790E
-
-#define TRANSMIT 1
-#define RECEIVE 2
-
-#endif /* SPI_AMD_H */
diff --git a/meta-amd-bsp/recipes-kernel/amd-spi/files/spirom.c b/meta-amd-bsp/recipes-kernel/amd-spi/files/spirom.c
deleted file mode 100644
index 8547afd1..00000000
--- a/meta-amd-bsp/recipes-kernel/amd-spi/files/spirom.c
+++ /dev/null
@@ -1,517 +0,0 @@
-/*****************************************************************************
-*
-* spirom.c - SPI ROM client driver
-*
-* Copyright (c) 2014, Advanced Micro Devices, Inc.
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*
-***************************************************************************/
-#include <linux/init.h>
-#include <linux/module.h>
-#include <linux/ioctl.h>
-#include <linux/fs.h>
-#include <linux/device.h>
-#include <linux/err.h>
-#include <linux/list.h>
-#include <linux/errno.h>
-#include <linux/mutex.h>
-#include <linux/slab.h>
-#include <linux/spi/spi.h>
-#include <linux/pci.h>
-#include <linux/delay.h>
-
-#include <linux/uaccess.h>
-
-#include "spirom.h"
-
-#define SPIROM_VERSION "0.2"
-
-/*
- * SPI has a character major number assigned. We allocate minor numbers
- * dynamically using a bitmask. You must use hotplug tools, such as udev
- * (or mdev with busybox) to create and destroy the /dev/spiromB.C device
- * nodes, since there is no fixed association of minor numbers with any
- * particular SPI bus or device.
- */
-#define SPIROM_MAJOR 153 /* assigned */
-#define N_SPI_MINORS 32 /* ... up to 256 */
-
-#define SPI_BUS 0
-#define SPI_BUS_CS1 0
-
-static unsigned long minors[N_SPI_MINORS / BITS_PER_LONG];
-
-
-struct spirom_data {
- dev_t devt;
- spinlock_t spi_lock;
- struct spi_device *spi;
- struct list_head device_entry;
- struct completion done;
-
- struct mutex buf_lock;
- unsigned users;
-};
-
-static LIST_HEAD(device_list);
-static DEFINE_MUTEX(device_list_lock);
-
-/*-------------------------------------------------------------------------*/
-
-/*
- * We can't use the standard synchronous wrappers for file I/O; we
- * need to protect against async removal of the underlying spi_device.
- */
-static void spirom_complete(void *arg)
-{
- complete(arg);
-}
-
-static ssize_t
-spirom_sync(struct spirom_data *spirom, struct spi_message *message)
-{
- int status;
-
- message->complete = spirom_complete;
- message->context = &spirom->done;
-
- spin_lock_irq(&spirom->spi_lock);
- if (spirom->spi == NULL)
- status = -ESHUTDOWN;
- else
- status = spi_async(spirom->spi, message);
- spin_unlock_irq(&spirom->spi_lock);
-
- if (status == 0) {
- /*
- * There might be cases where the controller driver has been
- * unloaded in the middle of a transaction. So we might end up
- * in a situation where we will be waiting for an event which
- * will never happen. So we provide a timeout of 1 second for
- * situations like this.
- */
- wait_for_completion_timeout(&spirom->done, HZ);
- status = message->status;
- if (status == 0)
- status = message->actual_length;
- }
- return status;
-}
-
-static int spirom_message(struct spirom_data *spirom,
- struct spi_ioc_transfer *u_trans, unsigned long arg)
-{
- struct spi_message msg;
- struct spi_transfer *transfer;
- u8 *buffer;
- int status = u_trans->len;
-
- buffer = u_trans->buf;
- spi_message_init(&msg);
-
- /* The very first spi_transfer will contain the command only */
- transfer = kzalloc(sizeof(struct spi_transfer), GFP_KERNEL);
- if (!transfer)
- return -ENOMEM;
-
- transfer->tx_buf = buffer;
- transfer->len = 1;
- buffer += transfer->len;
- spi_message_add_tail(transfer, &msg);
-
- /*
- * If the command expects an address as its argument, we populate
- * it in the very next spi_transfer.
- */
- if (u_trans->addr_present) {
- transfer = kzalloc(sizeof(struct spi_transfer), GFP_KERNEL);
- if (!transfer)
- return -ENOMEM;
-
- transfer->tx_buf = buffer;
- transfer->len = 3; // 3-byte address
- buffer += transfer->len;
- spi_message_add_tail(transfer, &msg);
- }
-
- /*
- * Next is data, which can have a maximum of 64-bytes, the size limited
- * by the number of bytes that can stored in the controller FIFO.
- */
- if (u_trans->len) {
- transfer = kzalloc(sizeof(struct spi_transfer), GFP_KERNEL);
- if (!transfer)
- return -ENOMEM;
-
- if (u_trans->direction == TRANSMIT)
- transfer->tx_buf = buffer;
- else if (u_trans->direction == RECEIVE)
- transfer->rx_buf = buffer;
-
- transfer->len = u_trans->len;
- /* No need to increment buffer pointer */
- spi_message_add_tail(transfer, &msg);
- }
-
- status = spirom_sync(spirom, &msg);
-
- if (u_trans->direction == RECEIVE) {
- /*
- * The received data should have been populated in
- * u_trans->buf, so we just need to copy it into the
- * user-space buffer.
- */
- buffer = u_trans->buf;
- if (u_trans->addr_present) {
- buffer += 4; // 1-byte command and 3-byte address
- if(__copy_to_user((u8 __user *)
- (((struct spi_ioc_transfer *)arg)->buf) + 4,
- buffer, u_trans->len)) {
- status = -EFAULT;
- }
- } else {
- buffer += 1; // 1-byte command only
- if(__copy_to_user((u8 __user *)
- (((struct spi_ioc_transfer *)arg)->buf) + 1,
- buffer, u_trans->len)) {
- status = -EFAULT;
- }
- }
- }
-
- /* Done with everything, free the memory taken by spi_transfer */
- while (msg.transfers.next != &msg.transfers) {
- transfer = list_entry(msg.transfers.next, struct spi_transfer,
- transfer_list);
- msg.transfers.next = transfer->transfer_list.next;
- transfer->transfer_list.next->prev = &msg.transfers;
- kfree(transfer);
- }
-
- return status;
-}
-
-static long
-spirom_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
-{
- int err = 0;
- int retval = 0;
- struct spirom_data *spirom;
- struct spi_device *spi;
- u32 tmp;
- struct spi_ioc_transfer *ioc;
-
- /* Check type and command number */
- if (_IOC_TYPE(cmd) != SPI_IOC_MAGIC)
- return -ENOTTY;
-
- /* Check access direction once here; don't repeat below.
- * IOC_DIR is from the user perspective, while access_ok is
- * from the kernel perspective; so they look reversed.
- */
- if (_IOC_DIR(cmd) & _IOC_READ)
- err = !access_ok((void __user *)arg, _IOC_SIZE(cmd));
- if (err == 0 && _IOC_DIR(cmd) & _IOC_WRITE)
- err = !access_ok((void __user *)arg, _IOC_SIZE(cmd));
- if (err)
- return -EFAULT;
-
- /* guard against device removal before, or while,
- * we issue this ioctl.
- */
- spirom = filp->private_data;
- spin_lock_irq(&spirom->spi_lock);
- spi = spi_dev_get(spirom->spi);
- spin_unlock_irq(&spirom->spi_lock);
-
- if (spi == NULL)
- return -ESHUTDOWN;
-
- /* use the buffer lock here for triple duty:
- * - prevent I/O (from us) so calling spi_setup() is safe;
- * - prevent concurrent SPI_IOC_WR_* from morphing
- * data fields while SPI_IOC_RD_* reads them;
- * - SPI_IOC_MESSAGE needs the buffer locked "normally".
- */
- mutex_lock(&spirom->buf_lock);
-
- /* segmented and/or full-duplex I/O request */
- if (_IOC_NR(cmd) != _IOC_NR(SPI_IOC_MESSAGE(0)) ||
- _IOC_DIR(cmd) !=_IOC_WRITE) {
- retval = -ENOTTY;
- goto out;
- }
-
- tmp = sizeof(struct spi_ioc_transfer);
-
- /* copy into scratch area */
- ioc = kzalloc(tmp, GFP_KERNEL);
- if (!ioc) {
- retval = -ENOMEM;
- goto out;
- }
- if (__copy_from_user(ioc, (struct spi_ioc_transfer __user *)arg,
- tmp)) {
- kfree(ioc);
- retval = -EFAULT;
- goto out;
- }
-
- /* translate to spi_message, execute */
- retval = spirom_message(spirom, ioc, arg);
- kfree(ioc);
-
-out:
- mutex_unlock(&spirom->buf_lock);
- spi_dev_put(spi);
- return retval;
-}
-
-static int spirom_open(struct inode *inode, struct file *filp)
-{
- struct spirom_data *spirom;
- int status = -ENXIO;
-
- mutex_lock(&device_list_lock);
-
- list_for_each_entry(spirom, &device_list, device_entry) {
- if (spirom->devt == inode->i_rdev) {
- status = 0;
- break;
- }
- }
- if (status == 0) {
- if (status == 0) {
- spirom->users++;
- filp->private_data = spirom;
- nonseekable_open(inode, filp);
- }
- } else
- pr_debug("spirom: nothing for minor %d\n", iminor(inode));
-
- mutex_unlock(&device_list_lock);
- return status;
-}
-
-static int spirom_release(struct inode *inode, struct file *filp)
-{
- struct spirom_data *spirom;
- int status = 0;
-
- mutex_lock(&device_list_lock);
- spirom = filp->private_data;
- filp->private_data = NULL;
-
- /* last close? */
- spirom->users--;
- if (!spirom->users) {
- int dofree;
-
- /* ... after we unbound from the underlying device? */
- spin_lock_irq(&spirom->spi_lock);
- dofree = (spirom->spi == NULL);
- spin_unlock_irq(&spirom->spi_lock);
-
- if (dofree)
- kfree(spirom);
- }
- mutex_unlock(&device_list_lock);
-
- return status;
-}
-
-static const struct file_operations spirom_fops = {
- .owner = THIS_MODULE,
- .unlocked_ioctl = spirom_ioctl,
- .open = spirom_open,
- .release = spirom_release,
-};
-
-static int __init add_spi_device_to_bus(void)
-{
- struct spi_master *spi_master;
- struct spi_device *spi_device;
- struct spi_board_info spi_info;
-
- spi_master = spi_busnum_to_master(SPI_BUS);
- if (!spi_master) {
- printk(KERN_ALERT "Please make sure to \'modprobe "
- "spi_amd\' driver first\n");
- return -1;
- }
- memset(&spi_info, 0, sizeof(struct spi_board_info));
-
- strlcpy(spi_info.modalias, "spirom", SPI_NAME_SIZE);
- spi_info.bus_num = SPI_BUS; //Bus number of SPI master
- spi_info.chip_select = SPI_BUS_CS1; //CS on which SPI device is connected
-
- spi_device = spi_new_device(spi_master, &spi_info);
- if (!spi_device)
- return -ENODEV;
-
- return 0;
-}
-
-/*-------------------------------------------------------------------------*/
-
-/* The main reason to have this class is to make mdev/udev create the
- * /dev/spiromB.C character device nodes exposing our userspace API.
- * It also simplifies memory management.
- */
-
-static struct class *spirom_class;
-
-/*-------------------------------------------------------------------------*/
-
-static int spirom_probe(struct spi_device *spi)
-{
- struct spirom_data *spirom;
- int status;
- unsigned long minor;
-
- /* Allocate driver data */
- spirom = kzalloc(sizeof(*spirom), GFP_KERNEL);
- if (!spirom)
- return -ENOMEM;
-
- /* Initialize the driver data */
- spirom->spi = spi;
- spin_lock_init(&spirom->spi_lock);
- mutex_init(&spirom->buf_lock);
-
- INIT_LIST_HEAD(&spirom->device_entry);
- init_completion(&spirom->done);
-
- /* If we can allocate a minor number, hook up this device.
- * Reusing minors is fine so long as udev or mdev is working.
- */
- mutex_lock(&device_list_lock);
- minor = find_first_zero_bit(minors, N_SPI_MINORS);
- if (minor < N_SPI_MINORS) {
- struct device *dev;
-
- spirom->devt = MKDEV(SPIROM_MAJOR, minor);
- dev = device_create(spirom_class, &spi->dev, spirom->devt,
- spirom, "spirom%d.%d",
- spi->master->bus_num, spi->chip_select);
- status = IS_ERR(dev) ? PTR_ERR(dev) : 0;
- } else {
- dev_dbg(&spi->dev, "no minor number available!\n");
- status = -ENODEV;
- }
- if (status == 0) {
- set_bit(minor, minors);
- list_add(&spirom->device_entry, &device_list);
- }
- mutex_unlock(&device_list_lock);
-
- if (status == 0)
- spi_set_drvdata(spi, spirom);
- else
- kfree(spirom);
-
- return status;
-}
-
-static int spirom_remove(struct spi_device *spi)
-{
- struct spirom_data *spirom = spi_get_drvdata(spi);
-
- /* make sure ops on existing fds can abort cleanly */
- spin_lock_irq(&spirom->spi_lock);
- spirom->spi = NULL;
- spi_set_drvdata(spi, NULL);
- spin_unlock_irq(&spirom->spi_lock);
-
- /* prevent new opens */
- mutex_lock(&device_list_lock);
- list_del(&spirom->device_entry);
- clear_bit(MINOR(spirom->devt), minors);
- device_destroy(spirom_class, spirom->devt);
- if (spirom->users == 0)
- kfree(spirom);
- mutex_unlock(&device_list_lock);
-
- return 0;
-}
-
-static struct spi_driver spirom_spi = {
- .driver = {
- .name = "spirom",
- .owner = THIS_MODULE,
- },
- .probe = spirom_probe,
- .remove = spirom_remove,
-
- /* NOTE: suspend/resume methods are not necessary here.
- * We don't do anything except pass the requests to/from
- * the underlying controller. The refrigerator handles
- * most issues; the controller driver handles the rest.
- */
-};
-
-/*-------------------------------------------------------------------------*/
-
-static int __init spirom_init(void)
-{
- int status;
-
- pr_info("AMD SPIROM Driver v%s\n", SPIROM_VERSION);
-
- /* Claim our 256 reserved device numbers. Then register a class
- * that will key udev/mdev to add/remove /dev nodes. Last, register
- * the driver which manages those device numbers.
- */
- BUILD_BUG_ON(N_SPI_MINORS > 256);
- status = register_chrdev(SPIROM_MAJOR, "spi", &spirom_fops);
- if (status < 0)
- return status;
-
- spirom_class = class_create(THIS_MODULE, "spirom");
- if (IS_ERR(spirom_class)) {
- unregister_chrdev(SPIROM_MAJOR, spirom_spi.driver.name);
- return PTR_ERR(spirom_class);
- }
-
- status = spi_register_driver(&spirom_spi);
- if (status < 0) {
- class_destroy(spirom_class);
- unregister_chrdev(SPIROM_MAJOR, spirom_spi.driver.name);
- }
-
- status = add_spi_device_to_bus();
- if (status < 0) {
- spi_unregister_driver(&spirom_spi);
- class_destroy(spirom_class);
- unregister_chrdev(SPIROM_MAJOR, spirom_spi.driver.name);
- }
-
- return status;
-}
-module_init(spirom_init);
-
-static void __exit spirom_exit(void)
-{
- spi_unregister_driver(&spirom_spi);
- class_destroy(spirom_class);
- unregister_chrdev(SPIROM_MAJOR, spirom_spi.driver.name);
-}
-module_exit(spirom_exit);
-
-MODULE_AUTHOR("Arindam Nath <arindam.nath@amd.com>");
-MODULE_DESCRIPTION("User mode SPI ROM interface");
-MODULE_LICENSE("GPL v2");
-MODULE_ALIAS("spi:spirom");
diff --git a/meta-amd-bsp/recipes-kernel/amd-spi/files/spirom.h b/meta-amd-bsp/recipes-kernel/amd-spi/files/spirom.h
deleted file mode 100644
index 941b357a..00000000
--- a/meta-amd-bsp/recipes-kernel/amd-spi/files/spirom.h
+++ /dev/null
@@ -1,53 +0,0 @@
-#ifndef SPIROM_H
-#define SPIROM_H
-
-#include <linux/types.h>
-
-/*---------------------------------------------------------------------------*/
-
-/* IOCTL commands */
-
-#define SPI_IOC_MAGIC 'k'
-
-#define TRANSMIT 1
-#define RECEIVE 2
-
-/*
- * struct spi_ioc_transfer - interface structure between application and ioctl
- *
- * @buf: Buffer to hold 1-byte command, 3-bytes address, and 64-byte data for
- * transmit or receive. The internal FIFO of our controller can hold a
- * maximum of 70 bytes, including the address. But here we assume the
- * maximum data excluding address to be 64-bytes long.
- *
- * @direction: Direction of data transfer, either TRANSMIT or RECEIVE.
- *
- * @len: Length of data excluding command and address.
- *
- * @addr_present: Flag to indicate whether 'buf' above contains an address.
- */
-struct spi_ioc_transfer {
- __u8 buf[64 + 1 + 3];
- __u8 direction;
- __u8 len;
- __u8 addr_present;
-};
-
-/* not all platforms use <asm-generic/ioctl.h> or _IOC_TYPECHECK() ... */
-#define SPI_MSGSIZE(N) \
- ((((N)*(sizeof (struct spi_ioc_transfer))) < (1 << _IOC_SIZEBITS)) \
- ? ((N)*(sizeof (struct spi_ioc_transfer))) : 0)
-#define SPI_IOC_MESSAGE(N) _IOW(SPI_IOC_MAGIC, 0, char[SPI_MSGSIZE(N)])
-
-/* SPI ROM command codes */
-#define ROM_WREN 0x06
-#define ROM_WRDI 0x04
-#define ROM_RDSR 0x05
-#define ROM_RDID 0x9F
-#define ROM_CHIP_ERASE 0x60
-#define ROM_SECTOR_ERASE 0x20
-#define ROM_BLOCK_ERASE 0xD8
-#define ROM_READ 0x03
-#define ROM_WRITE 0x02
-
-#endif /* SPIROM_H */
diff --git a/meta-amd-bsp/recipes-kernel/kmod/files/blacklist-ccp.conf b/meta-amd-bsp/recipes-kernel/kmod/files/blacklist-ccp.conf
new file mode 100644
index 00000000..3389f0c7
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/kmod/files/blacklist-ccp.conf
@@ -0,0 +1,2 @@
+blacklist ccp
+blacklist ccp_crypto
diff --git a/meta-amd-bsp/recipes-kernel/kmod/kmod_%.bbappend b/meta-amd-bsp/recipes-kernel/kmod/kmod_%.bbappend
new file mode 100644
index 00000000..3ce16fe9
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/kmod/kmod_%.bbappend
@@ -0,0 +1,8 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+SRC_URI += "file://blacklist-ccp.conf"
+
+do_install_append_ethanolx () {
+ install -m755 ${WORKDIR}/blacklist-ccp.conf \
+ ${D}${sysconfdir}/modprobe.d/blacklist-ccp.conf
+}
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0001-usb-xhci-Add-LPM-support-to-AMD-xhci-controller.patch b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0001-usb-xhci-Add-LPM-support-to-AMD-xhci-controller.patch
new file mode 100644
index 00000000..387ea135
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0001-usb-xhci-Add-LPM-support-to-AMD-xhci-controller.patch
@@ -0,0 +1,32 @@
+From c4c82690a760351b6e0b0d387f7ab40066531c81 Mon Sep 17 00:00:00 2001
+From: Sudheesh Mavila <sudheesh.mavila@amd.com>
+Date: Fri, 24 Jul 2020 15:43:52 +0530
+Subject: [PATCH 01/10] usb: xhci: Add LPM support to AMD xhci controller
+
+xHCI quirk for LPM and Runtime power management for AMD Raven xHCI
+
+Signed-off-by: Sudheesh Mavila <sudheesh.mavila@amd.com>
+---
+ drivers/usb/host/xhci-pci.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
+index 5bbccc9a0179..1d939747ba29 100644
+--- a/drivers/usb/host/xhci-pci.c
++++ b/drivers/usb/host/xhci-pci.c
+@@ -172,6 +172,12 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
+ if (pdev->vendor == PCI_VENDOR_ID_AMD)
+ xhci->quirks |= XHCI_TRUST_TX_LENGTH;
+
++ if (pdev->vendor == PCI_VENDOR_ID_AMD &&
++ (pdev->device == 0x15e0 || pdev->device == 0x15e1 || pdev->device == 0x15e5)) {
++ xhci->quirks |= XHCI_LPM_SUPPORT;
++ xhci->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW;
++ }
++
+ if ((pdev->vendor == PCI_VENDOR_ID_AMD) &&
+ ((pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_4) ||
+ (pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_3) ||
+--
+2.17.1
+
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0002-amd-xgbe-fix-for-the-crash-which-happens-during-SFP-.patch b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0002-amd-xgbe-fix-for-the-crash-which-happens-during-SFP-.patch
new file mode 100644
index 00000000..9cbb46a0
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0002-amd-xgbe-fix-for-the-crash-which-happens-during-SFP-.patch
@@ -0,0 +1,77 @@
+From 1cbf1b80948bcb1c46b9674d6ff8f2b2629d1327 Mon Sep 17 00:00:00 2001
+From: Sudheesh Mavila <sudheesh.mavila@amd.com>
+Date: Thu, 13 Feb 2020 15:26:20 +0530
+Subject: [PATCH 02/10] amd-xgbe fix for the crash which happens during SFP
+ hotplug
+
+ INFO: task kworker/u32:3:238 blocked for more than 120 seconds.
+ Tainted: G E 5.4.2-sfp-fix+ #58
+ "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
+ kworker/u32:3 D 0 238 2 0x80004000
+ Workqueue: enp2s0f1 xgbe_service [amd_xgbe]
+ Call Trace:
+ ? __schedule+0x293/0x700
+ schedule+0x2f/0xa0
+ schedule_preempt_disabled+0xa/0x10
+ __mutex_lock.isra.9+0x26d/0x4e0
+ ? xgbe_phy_get_comm_ownership+0x1f/0x110 [amd_xgbe]
+ xgbe_phy_get_comm_ownership+0x1f/0x110 [amd_xgbe]
+ xgbe_phy_mii_read+0x28/0xb0 [amd_xgbe]
+ ? kernfs_put+0xe9/0x190
+ __mdiobus_read+0x3b/0xd0
+ __phy_modify_changed+0x2b/0x80
+ phy_modify+0x38/0x60
+ phy_suspend+0x84/0xc0
+ phy_detach+0x5e/0x120
+ xgbe_phy_free_phy_device.isra.22+0x1d/0x50 [amd_xgbe]
+ xgbe_phy_sfp_mod_absent.isra.25+0xe/0x50 [amd_xgbe]
+ xgbe_phy_sfp_detect+0x16a/0x9b0 [amd_xgbe]
+ ? xgbe_phy_link_status+0x10a/0x490 [amd_xgbe]
+ xgbe_phy_link_status+0x10a/0x490 [amd_xgbe]
+ xgbe_phy_status+0x57/0x380 [amd_xgbe]
+ process_one_work+0x1f4/0x3e0
+ worker_thread+0x2d/0x3e0
+ ? process_one_work+0x3e0/0x3e0
+ kthread+0x113/0x130
+ ? kthread_park+0x90/0x90
+ ret_from_fork+0x22/0x40
+
+Signed-off-by: Sudheesh Mavila <sudheesh.mavila@amd.com>
+---
+ drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
+index 18e48b3bc402..90f33c3ddb32 100644
+--- a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
++++ b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
+@@ -1283,7 +1283,7 @@ static int xgbe_phy_sfp_read_eeprom(struct xgbe_prv_data *pdata)
+
+ memcpy(&phy_data->sfp_eeprom, &sfp_eeprom, sizeof(sfp_eeprom));
+
+- xgbe_phy_free_phy_device(pdata);
++
+ } else {
+ phy_data->sfp_changed = 0;
+ }
+@@ -1320,7 +1320,6 @@ static void xgbe_phy_sfp_mod_absent(struct xgbe_prv_data *pdata)
+ {
+ struct xgbe_phy_data *phy_data = pdata->phy_data;
+
+- xgbe_phy_free_phy_device(pdata);
+
+ phy_data->sfp_mod_absent = 1;
+ phy_data->sfp_phy_avail = 0;
+@@ -1372,6 +1371,9 @@ static void xgbe_phy_sfp_detect(struct xgbe_prv_data *pdata)
+ xgbe_phy_sfp_phy_settings(pdata);
+
+ xgbe_phy_put_comm_ownership(pdata);
++
++ if((phy_data->sfp_mod_absent) || (phy_data->sfp_changed))
++ xgbe_phy_free_phy_device(pdata);
+ }
+
+ static int xgbe_phy_module_eeprom(struct xgbe_prv_data *pdata,
+--
+2.17.1
+
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0003-amd-xgbe-Fix-NETDEV-WATCHDOG-transmit-queue-timed-ou.patch b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0003-amd-xgbe-Fix-NETDEV-WATCHDOG-transmit-queue-timed-ou.patch
new file mode 100644
index 00000000..0f349c8c
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0003-amd-xgbe-Fix-NETDEV-WATCHDOG-transmit-queue-timed-ou.patch
@@ -0,0 +1,32 @@
+From f8d8a70eba5e18fc11c7c7db44cfcd5469d52690 Mon Sep 17 00:00:00 2001
+From: Sudheesh Mavila <sudheesh.mavila@amd.com>
+Date: Sun, 12 Apr 2020 20:49:35 +0530
+Subject: [PATCH 03/10] amd-xgbe Fix NETDEV WATCHDOG: transmit queue timed out
+
+netif_carrier_off() called immediately after netif_tx_stop_all_queues()
+
+Signed-off-by: Sudheesh Mavila <sudheesh.mavila@amd.com>
+---
+ drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 3 +++
+ 1 file changed, 3 insertions(+)
+ mode change 100644 => 100755 drivers/net/ethernet/amd/xgbe/xgbe-drv.c
+
+diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
+old mode 100644
+new mode 100755
+index 395eb0b52680..230c9c4cc9b5
+--- a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
++++ b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
+@@ -1180,6 +1180,9 @@ int xgbe_powerdown(struct net_device *netdev, unsigned int caller)
+ netif_device_detach(netdev);
+
+ netif_tx_stop_all_queues(netdev);
++ /* Bug fix to crash while resetting the port */
++ netif_carrier_off(pdata->netdev);
++ netif_dbg(pdata, link, pdata->netdev," netif_carrier_off is doing before stopping PHY \n");
+
+ xgbe_stop_timers(pdata);
+ flush_workqueue(pdata->dev_workqueue);
+--
+2.17.1
+
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0004-spi-spidev-Add-dummy-spidev-device-to-SPI-bus.patch b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0004-spi-spidev-Add-dummy-spidev-device-to-SPI-bus.patch
new file mode 100644
index 00000000..7efbde04
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0004-spi-spidev-Add-dummy-spidev-device-to-SPI-bus.patch
@@ -0,0 +1,100 @@
+From 838a8a77639dc2c1bb349830fe75025aacbe096b Mon Sep 17 00:00:00 2001
+From: Sanjay R Mehta <sanju.mehta@amd.com>
+Date: Tue, 3 Mar 2020 14:44:41 +0530
+Subject: [PATCH 04/10] spi: spidev: Add dummy spidev device to SPI bus
+
+Signed-off-by: Sanjay R Mehta <sanju.mehta@amd.com>
+Signed-off-by: Sudheesh Mavila <sudheesh.mavila@amd.com>
+---
+ drivers/spi/spidev.c | 40 +++++++++++++++++++++++++++++++++++++++-
+ 1 file changed, 39 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c
+index 859910ec8d9f..710d9d8b5383 100644
+--- a/drivers/spi/spidev.c
++++ b/drivers/spi/spidev.c
+@@ -27,6 +27,8 @@
+
+ #include <linux/uaccess.h>
+
++#define SPI_BUS 0
++#define SPI_BUS_CS1 0
+
+ /*
+ * This supports access to SPI devices using normal userspace I/O calls.
+@@ -46,6 +48,7 @@
+
+ static DECLARE_BITMAP(minors, N_SPI_MINORS);
+
++struct spi_device *spi_device;
+
+ /* Bit masks for spi_device.mode management. Note that incorrect
+ * settings for some settings can cause *lots* of trouble for other
+@@ -741,7 +744,7 @@ static int spidev_probe(struct spi_device *spi)
+ of_device_is_compatible(spi->dev.of_node, "spidev"),
+ "%pOF: buggy DT: spidev listed directly in DT\n", spi->dev.of_node);
+
+- spidev_probe_acpi(spi);
++// spidev_probe_acpi(spi);
+
+ /* Allocate driver data */
+ spidev = kzalloc(sizeof(*spidev), GFP_KERNEL);
+@@ -827,6 +830,32 @@ static struct spi_driver spidev_spi_driver = {
+
+ /*-------------------------------------------------------------------------*/
+
++static int __init add_spi_device_to_bus(void)
++{
++ struct spi_master *spi_master;
++ struct spi_board_info spi_info;
++
++ spi_master = spi_busnum_to_master(SPI_BUS);
++ if (!spi_master) {
++ printk(KERN_ALERT "Please make sure to \'modprobe "
++ "spi_amd\' driver first\n");
++ return -1;
++ }
++ memset(&spi_info, 0, sizeof(struct spi_board_info));
++
++ strlcpy(spi_info.modalias, "spidev", SPI_NAME_SIZE);
++ spi_info.bus_num = SPI_BUS; //Bus number of SPI master
++ spi_info.chip_select = SPI_BUS_CS1; //CS on which SPI device is connected
++
++ spi_device = spi_new_device(spi_master, &spi_info);
++ if (!spi_device)
++ return -ENODEV;
++
++ return 0;
++}
++
++
++
+ static int __init spidev_init(void)
+ {
+ int status;
+@@ -851,6 +880,14 @@ static int __init spidev_init(void)
+ class_destroy(spidev_class);
+ unregister_chrdev(SPIDEV_MAJOR, spidev_spi_driver.driver.name);
+ }
++
++ status = add_spi_device_to_bus();
++ if (status < 0) {
++ spi_unregister_driver(&spidev_spi_driver);
++ class_destroy(spidev_class);
++ unregister_chrdev(SPIDEV_MAJOR, spidev_spi_driver.driver.name);
++ }
++
+ return status;
+ }
+ module_init(spidev_init);
+@@ -858,6 +895,7 @@ module_init(spidev_init);
+ static void __exit spidev_exit(void)
+ {
+ spi_unregister_driver(&spidev_spi_driver);
++ spi_unregister_device(spi_device);
+ class_destroy(spidev_class);
+ unregister_chrdev(SPIDEV_MAJOR, spidev_spi_driver.driver.name);
+ }
+--
+2.17.1
+
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0005-amd-xgbe-Fix-for-Network-fluctuations.patch b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0005-amd-xgbe-Fix-for-Network-fluctuations.patch
new file mode 100644
index 00000000..72638d6d
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0005-amd-xgbe-Fix-for-Network-fluctuations.patch
@@ -0,0 +1,39 @@
+From a3cab0a6e63a95ad35ce408a4e455fe6354d8aa0 Mon Sep 17 00:00:00 2001
+From: Sudheesh Mavila <sudheesh.mavila@amd.com>
+Date: Tue, 12 Jan 2021 15:11:03 +0530
+Subject: [PATCH 05/10] amd-xgbe: Fix for Network fluctuations
+
+BEL SFP, when connected to amd-xgbe shows frequent link down and up events on dmesg.
+Refer ticket EMBDEV-8951. This fix avoids the frquent link up/down issue.
+
+Signed-off-by: Sudheesh Mavila <sudheesh.mavila@amd.com>
+---
+ drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
+index 90f33c3ddb32..5307f7e6e64b 100644
+--- a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
++++ b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
+@@ -1049,6 +1049,18 @@ static int xgbe_phy_find_phy_device(struct xgbe_prv_data *pdata)
+ }
+ phy_data->phydev = phydev;
+
++ switch (phy_data->port_mode) {
++ case XGBE_PORT_MODE_SFP:
++ /* reset the sfp phy EMBDEV-8951 */
++ if(phydev)
++ genphy_soft_reset(phydev);
++ else
++ netdev_err(pdata->netdev, "phy reset failed\n");
++ break;
++ default:
++ break;
++ }
++
+ xgbe_phy_external_phy_quirks(pdata);
+
+ linkmode_and(phydev->advertising, phydev->advertising,
+--
+2.17.1
+
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0006-amd-xgbe-sets-XGBE_LINK_INIT-when-there-is-a-link-fa.patch b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0006-amd-xgbe-sets-XGBE_LINK_INIT-when-there-is-a-link-fa.patch
new file mode 100644
index 00000000..a506c211
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0006-amd-xgbe-sets-XGBE_LINK_INIT-when-there-is-a-link-fa.patch
@@ -0,0 +1,39 @@
+From d97a0266f1b8d3b76b4aa581eb7b19603ff8fcea Mon Sep 17 00:00:00 2001
+From: Sudheesh Mavila <sudheesh.mavila@amd.com>
+Date: Fri, 23 Oct 2020 01:45:15 +0530
+Subject: [PATCH 06/10] amd-xgbe sets XGBE_LINK_INIT when there is a link
+ failure
+
+When "link down" happens due to a link partner, the xgbe driver
+will not set XGBE_LINK_INIT. This is observed when the port speed
+capability is set to 10G in backplane mode.
+
+This fix sets XGBE_LINK_INIT when there is a link failure and
+XGBE_LINK_INIT is not set. This helps the driver to restart AN
+when AN link timeout happens.
+
+Signed-off-by: Sudheesh Mavila <sudheesh.mavila@amd.com>
+---
+ drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
+index 4e97b4869522..91397cf3c5ab 100644
+--- a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
++++ b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
+@@ -1371,6 +1371,12 @@ static void xgbe_phy_status(struct xgbe_prv_data *pdata)
+ xgbe_phy_status_result(pdata);
+
+ netif_carrier_off(pdata->netdev);
++
++ if (link_aneg && ((pdata->phy_if.phy_impl.cur_mode(pdata) == XGBE_MODE_KR) ||
++ (pdata->phy_if.phy_impl.cur_mode(pdata) == XGBE_MODE_KX_1000))) {
++ if (!test_bit(XGBE_LINK_INIT, &pdata->dev_state))
++ set_bit(XGBE_LINK_INIT, &pdata->dev_state);
++ }
+ }
+
+ adjust_link:
+--
+2.17.1
+
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0007-amd-xgbe-improved-KR-training-sequence.patch b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0007-amd-xgbe-improved-KR-training-sequence.patch
new file mode 100644
index 00000000..92c253e3
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0007-amd-xgbe-improved-KR-training-sequence.patch
@@ -0,0 +1,286 @@
+From 1d9082fe8167fe3d2c9db39a22a727b99496d172 Mon Sep 17 00:00:00 2001
+From: Sudheesh Mavila <sudheesh.mavila@amd.com>
+Date: Sat, 9 Jan 2021 12:26:09 +0530
+Subject: [PATCH 07/10] amd-xgbe: improved KR training sequence
+
+amd-xgbe driver handles KR training sequence directly by
+programming the h/w IP registers. This causes KR training
+failure if the h/w blocks are not operated correctly or they are
+not in sync. The new sequence increase the stability of AN process
+in KR mode by making sure that the h/w blocks are in expected
+state when the AN is in progress.
+
+This patch fix the problem of long linkup time due to repeated KR failure
+observed in AMD platforms.
+
+Signed-off-by: Sudheesh Mavila <sudheesh.mavila@amd.com>
+Signed-off-by: Rahul Kumar <rahul.kumar1@amd.com>
+---
+ drivers/net/ethernet/amd/xgbe/xgbe-common.h | 8 +++
+ drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 44 ++++++++++++++--
+ drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 56 ++++++++++++++-------
+ drivers/net/ethernet/amd/xgbe/xgbe.h | 5 ++
+ 4 files changed, 92 insertions(+), 21 deletions(-)
+
+diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-common.h b/drivers/net/ethernet/amd/xgbe/xgbe-common.h
+index b2cd3bdba9f8..ae1d553962dd 100644
+--- a/drivers/net/ethernet/amd/xgbe/xgbe-common.h
++++ b/drivers/net/ethernet/amd/xgbe/xgbe-common.h
+@@ -1279,6 +1279,10 @@
+ #define MDIO_PMA_10GBR_FECCTRL 0x00ab
+ #endif
+
++#ifndef MDIO_PMA_RX_CTRL0
++#define MDIO_PMA_RX_CTRL0 0x8050
++#endif
++
+ #ifndef MDIO_PMA_RX_CTRL1
+ #define MDIO_PMA_RX_CTRL1 0x8051
+ #endif
+@@ -1327,6 +1331,10 @@
+ #define MDIO_VEND2_AN_STAT 0x8002
+ #endif
+
++#ifndef MDIO_PMA_RX_EQ_CTRL
++#define MDIO_PMA_RX_EQ_CTRL 0x8009
++#endif
++
+ #ifndef MDIO_VEND2_PMA_CDR_CONTROL
+ #define MDIO_VEND2_PMA_CDR_CONTROL 0x8056
+ #endif
+diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
+index 91397cf3c5ab..f4359407269a 100644
+--- a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
++++ b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
+@@ -402,6 +402,16 @@ static void xgbe_an73_set(struct xgbe_prv_data *pdata, bool enable,
+ reg |= MDIO_AN_CTRL1_RESTART;
+
+ XMDIO_WRITE(pdata, MDIO_MMD_AN, MDIO_CTRL1, reg);
++
++ if (xgbe_in_kr_mode(pdata) && (enable || restart)) {
++ reg = XMDIO_READ(pdata, MDIO_MMD_PMAPMD, MDIO_PMA_10GBR_PMD_CTRL);
++ reg |= XGBE_KR_TRAINING_ENABLE;
++ reg |= XGBE_KR_TRAINING_START;
++ XMDIO_WRITE(pdata, MDIO_MMD_PMAPMD, MDIO_PMA_10GBR_PMD_CTRL, reg);
++
++ XMDIO_WRITE_BITS(pdata, MDIO_MMD_PMAPMD, MDIO_PMA_RX_EQ_CTRL,
++ BIT(15), BIT(15)); /* Disable RX Adapter */
++ }
+ }
+
+ static void xgbe_an73_restart(struct xgbe_prv_data *pdata)
+@@ -409,7 +419,7 @@ static void xgbe_an73_restart(struct xgbe_prv_data *pdata)
+ xgbe_an73_enable_interrupts(pdata);
+ xgbe_an73_set(pdata, true, true);
+
+- netif_dbg(pdata, link, pdata->netdev, "CL73 AN enabled/restarted\n");
++ netif_dbg(pdata, link, pdata->netdev, "CL73 AN enabled/restarted, CL72 started\n");
+ }
+
+ static void xgbe_an73_disable(struct xgbe_prv_data *pdata)
+@@ -489,20 +499,40 @@ static enum xgbe_an xgbe_an73_tx_training(struct xgbe_prv_data *pdata,
+ XMDIO_WRITE(pdata, MDIO_MMD_PMAPMD, MDIO_PMA_10GBR_FECCTRL, reg);
+
+ /* Start KR training */
++ if (!pdata->phy_if.phy_impl.kr_training_cdroff(pdata))
++ netif_dbg(pdata, link, pdata->netdev, "setting phy_data->phy_cdr_notrack\n");
++
++ pdata->cdr_delay_required = 1;
++
+ if (pdata->phy_if.phy_impl.kr_training_pre)
+ pdata->phy_if.phy_impl.kr_training_pre(pdata);
+
+ reg = XMDIO_READ(pdata, MDIO_MMD_PMAPMD, MDIO_PMA_10GBR_PMD_CTRL);
+- reg |= XGBE_KR_TRAINING_ENABLE;
+ reg |= XGBE_KR_TRAINING_START;
+ XMDIO_WRITE(pdata, MDIO_MMD_PMAPMD, MDIO_PMA_10GBR_PMD_CTRL, reg);
+
++ pdata->kr_done = 1;
++
+ netif_dbg(pdata, link, pdata->netdev,
+ "KR training initiated\n");
+
++ /* set RX_EQ_MGMT_MODE to disable RX Adapt Requests */
++ XMDIO_WRITE_BITS(pdata, MDIO_MMD_PMAPMD, MDIO_PMA_RX_EQ_CTRL, BIT(15), BIT(15));
++ XMDIO_WRITE_BITS(pdata, MDIO_MMD_PMAPMD, MDIO_VEND2_PMA_CDR_CONTROL,
++ XGBE_PMA_CDR_TRACK_EN_MASK,
++ XGBE_PMA_CDR_TRACK_EN_OFF);
++ XMDIO_WRITE_BITS(pdata, MDIO_MMD_PMAPMD, MDIO_PMA_RX_CTRL0, BIT(8), 0);
+ if (pdata->phy_if.phy_impl.kr_training_post)
+ pdata->phy_if.phy_impl.kr_training_post(pdata);
+
++ XMDIO_WRITE_BITS(pdata, MDIO_MMD_PMAPMD, MDIO_PMA_RX_CTRL0, BIT(8), BIT(8));
++ pdata->cdr_delay_required = 0;
++ udelay(1);
++ XMDIO_WRITE_BITS(pdata, MDIO_MMD_PMAPMD, MDIO_PMA_RX_EQ_CTRL,
++ BIT(15), 0);
++ if (pdata->phy_if.phy_impl.update_cdr_delay)
++ pdata->phy_if.phy_impl.update_cdr_delay(pdata);
++
+ return XGBE_AN_PAGE_RECEIVED;
+ }
+
+@@ -897,8 +927,6 @@ static void xgbe_an73_state_machine(struct xgbe_prv_data *pdata)
+ pdata->kx_state = XGBE_RX_BPA;
+ pdata->an_start = 0;
+
+- if (pdata->phy_if.phy_impl.an_post)
+- pdata->phy_if.phy_impl.an_post(pdata);
+
+ netif_dbg(pdata, link, pdata->netdev, "CL73 AN result: %s\n",
+ xgbe_state_as_string(pdata->an_result));
+@@ -1243,6 +1271,9 @@ static int __xgbe_phy_config_aneg(struct xgbe_prv_data *pdata, bool set_mode)
+ /* Re-enable auto-negotiation interrupt */
+ enable_irq(pdata->an_irq);
+
++ if (pdata->phy_if.phy_impl.an_post)
++ pdata->phy_if.phy_impl.an_post(pdata);
++
+ xgbe_an_init(pdata);
+ xgbe_an_restart(pdata);
+
+@@ -1360,6 +1391,10 @@ static void xgbe_phy_status(struct xgbe_prv_data *pdata)
+ clear_bit(XGBE_LINK_INIT, &pdata->dev_state);
+
+ netif_carrier_on(pdata->netdev);
++
++ if (link_aneg && pdata->kr_done)
++ pdata->phy_if.phy_impl.reset_cdr_delay(pdata);
++
+ } else {
+ if (test_bit(XGBE_LINK_INIT, &pdata->dev_state)) {
+ xgbe_check_link_timeout(pdata);
+@@ -1454,6 +1489,7 @@ static int xgbe_phy_start(struct xgbe_prv_data *pdata)
+
+ /* Indicate the PHY is up and running */
+ pdata->phy_started = 1;
++ pdata->an_result = XGBE_AN_NO_LINK;
+
+ xgbe_an_init(pdata);
+ xgbe_an_enable_interrupts(pdata);
+diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
+index 5307f7e6e64b..88663acae8b3 100644
+--- a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
++++ b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
+@@ -2949,13 +2949,16 @@ static void xgbe_phy_cdr_track(struct xgbe_prv_data *pdata)
+ if (!phy_data->phy_cdr_notrack)
+ return;
+
+- usleep_range(phy_data->phy_cdr_delay,
+- phy_data->phy_cdr_delay + 500);
++ /* when there is no link, no need to use the cdr delay, when ever a page is */
++ /* received , pdata->cdr_delay_required is set to 1 */
++ if (pdata->cdr_delay_required) {
++ usleep_range(phy_data->phy_cdr_delay,
++ phy_data->phy_cdr_delay + 500);
++ }
+
+ XMDIO_WRITE_BITS(pdata, MDIO_MMD_PMAPMD, MDIO_VEND2_PMA_CDR_CONTROL,
+ XGBE_PMA_CDR_TRACK_EN_MASK,
+ XGBE_PMA_CDR_TRACK_EN_ON);
+-
+ phy_data->phy_cdr_notrack = 0;
+ }
+
+@@ -2972,9 +2975,7 @@ static void xgbe_phy_cdr_notrack(struct xgbe_prv_data *pdata)
+ XMDIO_WRITE_BITS(pdata, MDIO_MMD_PMAPMD, MDIO_VEND2_PMA_CDR_CONTROL,
+ XGBE_PMA_CDR_TRACK_EN_MASK,
+ XGBE_PMA_CDR_TRACK_EN_OFF);
+-
+ xgbe_phy_rrc(pdata);
+-
+ phy_data->phy_cdr_notrack = 1;
+ }
+
+@@ -2984,6 +2985,36 @@ static void xgbe_phy_kr_training_post(struct xgbe_prv_data *pdata)
+ xgbe_phy_cdr_track(pdata);
+ }
+
++static void xgbe_phy_reset_cdr_delay(struct xgbe_prv_data *pdata)
++{
++ struct xgbe_phy_data *phy_data = pdata->phy_data;
++
++ phy_data->phy_cdr_delay = XGBE_CDR_DELAY_INIT;
++ pdata->kr_done = 0;
++}
++
++static void xgbe_phy_update_cdr_delay(struct xgbe_prv_data *pdata)
++{
++ struct xgbe_phy_data *phy_data = pdata->phy_data;
++
++ if (phy_data->phy_cdr_delay < XGBE_CDR_DELAY_MAX)
++ phy_data->phy_cdr_delay += XGBE_CDR_DELAY_INC;
++ else
++ phy_data->phy_cdr_delay = XGBE_CDR_DELAY_INIT;
++}
++
++static int xgbe_phy_kr_training_cdroff(struct xgbe_prv_data *pdata)
++{
++ int ret;
++ struct xgbe_phy_data *phy_data = pdata->phy_data;
++
++ ret = phy_data->phy_cdr_notrack;
++ if (!phy_data->phy_cdr_notrack)
++ phy_data->phy_cdr_notrack = 1;
++
++ return ret;
++}
++
+ static void xgbe_phy_kr_training_pre(struct xgbe_prv_data *pdata)
+ {
+ if (pdata->debugfs_an_cdr_track_early)
+@@ -3001,18 +3032,6 @@ static void xgbe_phy_an_post(struct xgbe_prv_data *pdata)
+ break;
+
+ xgbe_phy_cdr_track(pdata);
+-
+- switch (pdata->an_result) {
+- case XGBE_AN_READY:
+- case XGBE_AN_COMPLETE:
+- break;
+- default:
+- if (phy_data->phy_cdr_delay < XGBE_CDR_DELAY_MAX)
+- phy_data->phy_cdr_delay += XGBE_CDR_DELAY_INC;
+- else
+- phy_data->phy_cdr_delay = XGBE_CDR_DELAY_INIT;
+- break;
+- }
+ break;
+ default:
+ break;
+@@ -3451,6 +3470,9 @@ void xgbe_init_function_ptrs_phy_v2(struct xgbe_phy_if *phy_if)
+
+ phy_impl->kr_training_pre = xgbe_phy_kr_training_pre;
+ phy_impl->kr_training_post = xgbe_phy_kr_training_post;
++ phy_impl->kr_training_cdroff = xgbe_phy_kr_training_cdroff;
++ phy_impl->reset_cdr_delay = xgbe_phy_reset_cdr_delay;
++ phy_impl->update_cdr_delay = xgbe_phy_update_cdr_delay;
+
+ phy_impl->module_info = xgbe_phy_module_info;
+ phy_impl->module_eeprom = xgbe_phy_module_eeprom;
+diff --git a/drivers/net/ethernet/amd/xgbe/xgbe.h b/drivers/net/ethernet/amd/xgbe/xgbe.h
+index ba8321ec1ee7..c99b34c41f71 100644
+--- a/drivers/net/ethernet/amd/xgbe/xgbe.h
++++ b/drivers/net/ethernet/amd/xgbe/xgbe.h
+@@ -888,6 +888,9 @@ struct xgbe_phy_impl_if {
+ /* Pre/Post KR training enablement support */
+ void (*kr_training_pre)(struct xgbe_prv_data *);
+ void (*kr_training_post)(struct xgbe_prv_data *);
++ int (*kr_training_cdroff)(struct xgbe_prv_data *pdata);
++ void (*reset_cdr_delay)(struct xgbe_prv_data *pdata);
++ void (*update_cdr_delay)(struct xgbe_prv_data *pdata);
+
+ /* SFP module related info */
+ int (*module_info)(struct xgbe_prv_data *pdata,
+@@ -1254,6 +1257,8 @@ struct xgbe_prv_data {
+ unsigned int fec_ability;
+ unsigned long an_start;
+ enum xgbe_an_mode an_mode;
++ unsigned int kr_done;
++ unsigned int cdr_delay_required;
+
+ /* I2C support */
+ struct xgbe_i2c i2c;
+--
+2.17.1
+
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0008-amd-xgbe-rrc-is-required-only-for-Fixed-PHY-configur.patch b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0008-amd-xgbe-rrc-is-required-only-for-Fixed-PHY-configur.patch
new file mode 100644
index 00000000..29be3aee
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0008-amd-xgbe-rrc-is-required-only-for-Fixed-PHY-configur.patch
@@ -0,0 +1,33 @@
+From 739c48e581242c57425de1a632d307e4c7a036dd Mon Sep 17 00:00:00 2001
+From: Sudheesh Mavila <sudheesh.mavila@amd.com>
+Date: Tue, 10 Nov 2020 12:42:28 +0530
+Subject: [PATCH 08/10] amd-xgbe: rrc is required only for Fixed PHY
+ configuration
+
+xgbe driver does RRC in every 10 seconds if the link is down.
+When AN is enabled and KR training is in progress,
+doing RRC cause KR training failure. The patch enables RRC only
+if AN is disabled.
+
+Signed-off-by: Sudheesh Mavila <sudheesh.mavila@amd.com>
+---
+ drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
+index 88663acae8b3..a043c30358d2 100644
+--- a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
++++ b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
+@@ -2638,7 +2638,8 @@ static int xgbe_phy_link_status(struct xgbe_prv_data *pdata, int *an_restart)
+ /* No link, attempt a receiver reset cycle */
+ if (phy_data->rrc_count++ > XGBE_RRC_FREQUENCY) {
+ phy_data->rrc_count = 0;
+- xgbe_phy_rrc(pdata);
++ if (pdata->phy.autoneg == AUTONEG_DISABLE)
++ xgbe_phy_rrc(pdata);
+ }
+
+ return 0;
+--
+2.17.1
+
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0009-amd-xgbe-increased-cdr-delay.patch b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0009-amd-xgbe-increased-cdr-delay.patch
new file mode 100644
index 00000000..19eedbf1
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0009-amd-xgbe-increased-cdr-delay.patch
@@ -0,0 +1,35 @@
+From f811f3596ae62941ce01aa84beef4159844de39f Mon Sep 17 00:00:00 2001
+From: Sudheesh Mavila <sudheesh.mavila@amd.com>
+Date: Wed, 11 Nov 2020 12:13:33 +0530
+Subject: [PATCH 09/10] amd-xgbe: increased cdr delay
+
+amd-xgbe driver needs delay to emable CDR.
+Some link partner's use 20ms of idle time before sending valid clock.
+The patch uses a delay of 22ms for the first time and increases
+by a step of 22ms.
+
+Signed-off-by: Sudheesh Mavila <sudheesh.mavila@amd.com>
+---
+ drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
+index a043c30358d2..f3566a480f2d 100644
+--- a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
++++ b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
+@@ -149,9 +149,9 @@
+ #define XGBE_RATECHANGE_COUNT 500
+
+ /* CDR delay values for KR support (in usec) */
+-#define XGBE_CDR_DELAY_INIT 10000
+-#define XGBE_CDR_DELAY_INC 10000
+-#define XGBE_CDR_DELAY_MAX 100000
++#define XGBE_CDR_DELAY_INIT 22000
++#define XGBE_CDR_DELAY_INC 22000
++#define XGBE_CDR_DELAY_MAX 110000
+
+ /* RRC frequency during link status check */
+ #define XGBE_RRC_FREQUENCY 10
+--
+2.17.1
+
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0010-amd-xgbe-synchronization-between-AN-state-machine-an.patch b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0010-amd-xgbe-synchronization-between-AN-state-machine-an.patch
new file mode 100644
index 00000000..8fd1c8b5
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0010-amd-xgbe-synchronization-between-AN-state-machine-an.patch
@@ -0,0 +1,123 @@
+From bff033e9aa3ebf9d7e2bb42be9d635e9c65bcbe0 Mon Sep 17 00:00:00 2001
+From: Sudheesh Mavila <sudheesh.mavila@amd.com>
+Date: Sat, 9 Jan 2021 23:41:36 +0530
+Subject: [PATCH 10/10] amd-xgbe: synchronization between AN state machine and
+ status polling timer thread
+
+xgbe driver uses a TIMEOUT to restart AN process if link is down.
+This create issue when TIMEOUT comes in between a KR training or RCC
+is in process. The patch avoids AN restart if TIMEOUT happens
+during KR cycle or RRC.
+
+TIMEOUT value also reduced to 1 sec to enable fast
+synchronization between LP.
+
+Signed-off-by: Sudheesh Mavila <sudheesh.mavila@amd.com>
+---
+ drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 29 +++++++++++++++++++--
+ drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 1 +
+ drivers/net/ethernet/amd/xgbe/xgbe.h | 4 ++-
+ 3 files changed, 31 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
+index f4359407269a..c70c38d96020 100644
+--- a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
++++ b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
+@@ -512,6 +512,7 @@ static enum xgbe_an xgbe_an73_tx_training(struct xgbe_prv_data *pdata,
+ XMDIO_WRITE(pdata, MDIO_MMD_PMAPMD, MDIO_PMA_10GBR_PMD_CTRL, reg);
+
+ pdata->kr_done = 1;
++ pdata->kr_start_time = jiffies;
+
+ netif_dbg(pdata, link, pdata->netdev,
+ "KR training initiated\n");
+@@ -884,6 +885,8 @@ static void xgbe_an73_state_machine(struct xgbe_prv_data *pdata)
+ break;
+
+ case XGBE_AN_PAGE_RECEIVED:
++ if (xgbe_in_kr_mode(pdata))
++ pdata->an_int = 0;
+ pdata->an_state = xgbe_an73_page_received(pdata);
+ pdata->an_supported++;
+ break;
+@@ -1306,11 +1309,34 @@ static bool xgbe_phy_aneg_done(struct xgbe_prv_data *pdata)
+ static void xgbe_check_link_timeout(struct xgbe_prv_data *pdata)
+ {
+ unsigned long link_timeout;
++ int wait = 200;
++ unsigned long kr_time;
++ unsigned long rrc_time;
+
+ link_timeout = pdata->link_check + (XGBE_LINK_TIMEOUT * HZ);
+ if (time_after(jiffies, link_timeout)) {
+ netif_dbg(pdata, link, pdata->netdev, "AN link timeout\n");
+- xgbe_phy_config_aneg(pdata);
++ /* AN restart should not happen within 500ms of start of RRC or KR tarining */
++ /* This loop ensures no AN restart during RRC window and KR training window */
++ while (wait--) {
++ mutex_lock(&pdata->an_mutex);
++ kr_time = pdata->kr_start_time + msecs_to_jiffies(XGBE_AN_MS_TIMEOUT);
++ rrc_time = pdata->rrc_start_time + msecs_to_jiffies(XGBE_AN_MS_TIMEOUT);
++ mutex_unlock(&pdata->an_mutex);
++ if (time_after(jiffies, kr_time) && time_after(jiffies, rrc_time))
++ break;
++ if (pdata->an_result == XGBE_AN_COMPLETE)
++ break;
++
++ usleep_range(5000, 6000);
++ }
++ /* AN restart is required, if AN result is not COMPLETE */
++ if (pdata->an_result != XGBE_AN_COMPLETE)
++ xgbe_phy_config_aneg(pdata);
++ else if ((pdata->an_result == XGBE_AN_COMPLETE) &&
++ (xgbe_cur_mode(pdata) == XGBE_MODE_KX_1000))
++ xgbe_phy_config_aneg(pdata);
++
+ }
+ }
+
+@@ -1489,7 +1515,6 @@ static int xgbe_phy_start(struct xgbe_prv_data *pdata)
+
+ /* Indicate the PHY is up and running */
+ pdata->phy_started = 1;
+- pdata->an_result = XGBE_AN_NO_LINK;
+
+ xgbe_an_init(pdata);
+ xgbe_an_enable_interrupts(pdata);
+diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
+index f3566a480f2d..f24b8121db2e 100644
+--- a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
++++ b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
+@@ -2977,6 +2977,7 @@ static void xgbe_phy_cdr_notrack(struct xgbe_prv_data *pdata)
+ XGBE_PMA_CDR_TRACK_EN_MASK,
+ XGBE_PMA_CDR_TRACK_EN_OFF);
+ xgbe_phy_rrc(pdata);
++ pdata->rrc_start_time = jiffies;
+ phy_data->phy_cdr_notrack = 1;
+ }
+
+diff --git a/drivers/net/ethernet/amd/xgbe/xgbe.h b/drivers/net/ethernet/amd/xgbe/xgbe.h
+index c99b34c41f71..3ed98e2f8695 100644
+--- a/drivers/net/ethernet/amd/xgbe/xgbe.h
++++ b/drivers/net/ethernet/amd/xgbe/xgbe.h
+@@ -288,7 +288,7 @@
+
+ /* Auto-negotiation */
+ #define XGBE_AN_MS_TIMEOUT 500
+-#define XGBE_LINK_TIMEOUT 5
++#define XGBE_LINK_TIMEOUT 1
+
+ #define XGBE_SGMII_AN_LINK_STATUS BIT(1)
+ #define XGBE_SGMII_AN_LINK_SPEED (BIT(2) | BIT(3))
+@@ -1258,6 +1258,8 @@ struct xgbe_prv_data {
+ unsigned long an_start;
+ enum xgbe_an_mode an_mode;
+ unsigned int kr_done;
++ unsigned long kr_start_time;
++ unsigned long rrc_start_time;
+ unsigned int cdr_delay_required;
+
+ /* I2C support */
+--
+2.17.1
+
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/afalg.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/afalg.cfg
new file mode 100644
index 00000000..3a101779
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/afalg.cfg
@@ -0,0 +1,41 @@
+#
+# General setup
+#
+CONFIG_AUDIT=y
+CONFIG_HAVE_ARCH_AUDITSYSCALL=y
+CONFIG_AUDITSYSCALL=y
+
+CONFIG_INTEGRITY_AUDIT=y
+
+#
+# Crypto core or helper
+#
+
+CONFIG_CRYPTO_USER=m
+CONFIG_CRYPTO_CRYPTD=m
+
+# Authenticated Encryption with Associated Data
+#
+CONFIG_CRYPTO_ECHAINIV=m
+
+
+#
+# Ciphers
+#
+CONFIG_CRYPTO_DES3_EDE_X86_64=m
+
+#
+# Random Number Generation
+#
+CONFIG_CRYPTO_ANSI_CPRNG=m
+CONFIG_CRYPTO_DRBG_MENU=y
+CONFIG_CRYPTO_DRBG_HMAC=y
+CONFIG_CRYPTO_DRBG_HASH=y
+CONFIG_CRYPTO_DRBG_CTR=y
+CONFIG_CRYPTO_DRBG=y
+CONFIG_CRYPTO_JITTERENTROPY=y
+CONFIG_CRYPTO_USER_API=m
+CONFIG_CRYPTO_USER_API_HASH=m
+CONFIG_CRYPTO_USER_API_SKCIPHER=m
+CONFIG_CRYPTO_USER_API_RNG=m
+CONFIG_CRYPTO_USER_API_AEAD=m
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-ccp.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-ccp.cfg
new file mode 100644
index 00000000..109cda5c
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-ccp.cfg
@@ -0,0 +1,27 @@
+CONFIG_SERIAL_8250_DMA=y
+CONFIG_DMADEVICES=y
+# CONFIG_DMADEVICES_DEBUG is not set
+#
+# DMA Devices
+#
+CONFIG_DMA_ENGINE=y
+CONFIG_DMA_VIRTUAL_CHANNELS=y
+CONFIG_DMA_ACPI=y
+# CONFIG_INTEL_IDMA64 is not set
+# CONFIG_INTEL_IOATDMA is not set
+# CONFIG_QCOM_HIDMA_MGMT is not set
+# CONFIG_QCOM_HIDMA is not set
+CONFIG_DW_DMAC_CORE=y
+# CONFIG_DW_DMAC is not set
+# CONFIG_DW_DMAC_PCI is not set
+CONFIG_HSU_DMA=y
+#
+# DMA Clients
+#
+# CONFIG_ASYNC_TX_DMA is not set
+# CONFIG_DMATEST is not set
+CONFIG_CRYPTO_DEV_CCP=y
+CONFIG_CRYPTO_DEV_CCP_DD=m
+CONFIG_CRYPTO_DEV_CCP_CRYPTO=m
+CONFIG_CRYPTO_DEV_SP_CCP=y
+CONFIG_CRYPTO_DEV_SP_PSP=y
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-emmc-patches.scc b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-emmc-patches.scc
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-emmc-patches.scc
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-spi-patches.scc b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-spi-patches.scc
new file mode 100644
index 00000000..6c97c1aa
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-spi-patches.scc
@@ -0,0 +1 @@
+patch 0004-spi-spidev-Add-dummy-spidev-device-to-SPI-bus.patch
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-usb-patches.scc b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-usb-patches.scc
new file mode 100644
index 00000000..76ea98f4
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-usb-patches.scc
@@ -0,0 +1 @@
+patch 0001-usb-xhci-Add-LPM-support-to-AMD-xhci-controller.patch
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-xgbe-patches.scc b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-xgbe-patches.scc
new file mode 100644
index 00000000..e2922c00
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-xgbe-patches.scc
@@ -0,0 +1,8 @@
+patch 0002-amd-xgbe-fix-for-the-crash-which-happens-during-SFP-.patch
+patch 0003-amd-xgbe-Fix-NETDEV-WATCHDOG-transmit-queue-timed-ou.patch
+patch 0005-amd-xgbe-Fix-for-Network-fluctuations.patch
+patch 0006-amd-xgbe-sets-XGBE_LINK_INIT-when-there-is-a-link-fa.patch
+patch 0007-amd-xgbe-improved-KR-training-sequence.patch
+patch 0008-amd-xgbe-rrc-is-required-only-for-Fixed-PHY-configur.patch
+patch 0009-amd-xgbe-increased-cdr-delay.patch
+patch 0010-amd-xgbe-synchronization-between-AN-state-machine-an.patch
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-xgbe.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-xgbe.cfg
new file mode 100644
index 00000000..463ed1e8
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-xgbe.cfg
@@ -0,0 +1,51 @@
+CONFIG_MDIO=y
+CONFIG_AMD_XGBE=y
+CONFIG_AMD_XGBE_HAVE_ECC=y
+CONFIG_PHYLIB=y
+CONFIG_MDIO_GPIO=y
+
+CONFIG_USB_USBNET=y
+CONFIG_USB_NET_AX8817X=y
+CONFIG_USB_NET_AX88179_178A=y
+CONFIG_USB_NET_CDCETHER=y
+# CONFIG_USB_NET_CDC_EEM is not set
+CONFIG_USB_NET_CDC_NCM=y
+# CONFIG_USB_NET_HUAWEI_CDC_NCM is not set
+# CONFIG_USB_NET_CDC_MBIM is not set
+# CONFIG_USB_NET_DM9601 is not set
+# CONFIG_USB_NET_SR9700 is not set
+# CONFIG_USB_NET_SR9800 is not set
+# CONFIG_USB_NET_SMSC75XX is not set
+# CONFIG_USB_NET_SMSC95XX is not set
+# CONFIG_USB_NET_GL620A is not set
+CONFIG_USB_NET_NET1080=y
+# CONFIG_USB_NET_PLUSB is not set
+# CONFIG_USB_NET_MCS7830 is not set
+# CONFIG_USB_NET_RNDIS_HOST is not set
+CONFIG_USB_NET_CDC_SUBSET_ENABLE=y
+CONFIG_USB_NET_CDC_SUBSET=y
+# CONFIG_USB_ALI_M5632 is not set
+# CONFIG_USB_AN2720 is not set
+CONFIG_USB_BELKIN=y
+CONFIG_USB_ARMLINUX=y
+# CONFIG_USB_EPSON2888 is not set
+# CONFIG_USB_KC2190 is not set
+CONFIG_USB_NET_ZAURUS=y
+CONFIG_USB_NET_CX82310_ETH=y
+# CONFIG_USB_NET_KALMIA is not set
+# CONFIG_USB_NET_QMI_WWAN is not set
+# CONFIG_USB_HSO is not set
+# CONFIG_USB_NET_INT51X1 is not set
+# CONFIG_USB_IPHETH is not set
+# CONFIG_USB_SIERRA_NET is not set
+# CONFIG_USB_VL600 is not set
+# CONFIG_USB_NET_CH9200 is not set
+
+CONFIG_VFIO_PCI=y
+
+CONFIG_X86_X2APIC=y
+CONFIG_X86_NUMACHIP=y
+CONFIG_INET_TCP_DIAG=m
+CONFIG_INET_UDP_DIAG=m
+CONFIG_INET_DIAG=m
+CONFIG_NETLABEL=y
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86-extra-config.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86-extra-config.cfg
new file mode 100644
index 00000000..3a88bccf
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86-extra-config.cfg
@@ -0,0 +1,305 @@
+CONFIG_PERF_EVENTS_INTEL_UNCORE=y
+CONFIG_FIX_EARLYCON_MEM=y
+CONFIG_CROSS_MEMORY_ATTACH=y
+CONFIG_USELIB=y
+CONFIG_HAVE_ARCH_AUDITSYSCALL=y
+CONFIG_GENERIC_IRQ_LEGACY_ALLOC_HWIRQ=y
+CONFIG_GENERIC_MSI_IRQ=y
+CONFIG_CLOCKSOURCE_VALIDATE_LAST_CYCLE=y
+CONFIG_SRCU=y
+# CONFIG_TASKS_RCU is not set
+CONFIG_BUILD_BIN2C=y
+CONFIG_LOG_CPU_MAX_BUF_SHIFT=12
+CONFIG_PAGE_COUNTER=y
+CONFIG_BPF=y
+CONFIG_MULTIUSER=y
+CONFIG_SGETMASK_SYSCALL=y
+CONFIG_SYSFS_SYSCALL=y
+# CONFIG_BPF_SYSCALL is not set
+CONFIG_ADVISE_SYSCALLS=y
+CONFIG_HAVE_DMA_CONTIGUOUS=y
+CONFIG_HAVE_ARCH_HUGE_VMAP=y
+CONFIG_ARCH_HAS_ELF_RANDOMIZE=y
+CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y
+# CONFIG_MODULE_COMPRESS is not set
+CONFIG_RWSEM_SPIN_ON_OWNER=y
+CONFIG_LOCK_SPIN_ON_OWNER=y
+CONFIG_X86_FEATURE_NAMES=y
+# CONFIG_X86_GOLDFISH is not set
+# CONFIG_IOSF_MBI_DEBUG is not set
+CONFIG_X86_VSYSCALL_EMULATION=y
+CONFIG_X86_DIRECT_GBPAGES=y
+CONFIG_MEMORY_BALLOON=y
+# CONFIG_ZSWAP is not set
+# CONFIG_ZPOOL is not set
+# CONFIG_ZBUD is not set
+CONFIG_GENERIC_EARLY_IOREMAP=y
+# CONFIG_X86_PMEM_LEGACY is not set
+# CONFIG_EFI_MIXED is not set
+CONFIG_HAVE_LIVEPATCH=y
+# CONFIG_LIVEPATCH is not set
+CONFIG_ACPI_LEGACY_TABLES_LOOKUP=y
+CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC=y
+CONFIG_ACPI_SYSTEM_POWER_STATES_SUPPORT=y
+CONFIG_ACPI_HOTPLUG_IOAPIC=y
+# CONFIG_ACPI_REDUCED_HARDWARE_ONLY is not set
+CONFIG_HAVE_ACPI_APEI=y
+CONFIG_HAVE_ACPI_APEI_NMI=y
+# CONFIG_PMIC_OPREGION is not set
+CONFIG_PMC_ATOM=y
+CONFIG_NET_UDP_TUNNEL=m
+# CONFIG_NET_FOU is not set
+# CONFIG_NET_FOU_IP_TUNNELS is not set
+# CONFIG_GENEVE is not set
+CONFIG_NET_PTP_CLASSIFY=y
+CONFIG_BRIDGE_NETFILTER=m
+CONFIG_NF_NAT_REDIRECT=m
+# CONFIG_NETFILTER_XT_NAT is not set
+# CONFIG_NF_LOG_ARP is not set
+# CONFIG_NF_LOG_IPV4 is not set
+CONFIG_NF_REJECT_IPV4=m
+CONFIG_NF_NAT_PPTP=m
+CONFIG_NF_NAT_H323=m
+# CONFIG_IP_NF_NAT is not set
+# CONFIG_NF_REJECT_IPV6 is not set
+# CONFIG_NF_LOG_IPV6 is not set
+CONFIG_TIPC_MEDIA_UDP=y
+# CONFIG_NET_ACT_VLAN is not set
+# CONFIG_NET_ACT_BPF is not set
+# CONFIG_NET_ACT_CONNMARK is not set
+# CONFIG_MPLS is not set
+# CONFIG_NET_SWITCHDEV is not set
+CONFIG_BT_BREDR=y
+CONFIG_BT_LE=y
+# CONFIG_BT_SELFTEST is not set
+CONFIG_BT_DEBUGFS=y
+CONFIG_BT_INTEL=m
+CONFIG_BT_BCM=m
+CONFIG_BT_HCIBTUSB_BCM=y
+# CONFIG_BT_HCIUART_INTEL is not set
+# CONFIG_BT_HCIUART_BCM is not set
+CONFIG_UEVENT_HELPER=y
+# CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set
+CONFIG_ALLOW_DEV_COREDUMP=y
+# CONFIG_BLK_DEV_PMEM is not set
+# CONFIG_INTEL_MEI_TXE is not set
+# CONFIG_ECHO is not set
+# CONFIG_CXL_BASE is not set
+# CONFIG_SCSI_AM53C974 is not set
+# CONFIG_SCSI_WD719X is not set
+# CONFIG_DM_ERA is not set
+# CONFIG_DM_LOG_WRITES is not set
+# CONFIG_IPVLAN is not set
+# CONFIG_NET_VENDOR_AGERE is not set
+# CONFIG_ET131X is not set
+# CONFIG_ALTERA_TSE is not set
+# CONFIG_BCMGENET is not set
+# CONFIG_CX_ECAT is not set
+# CONFIG_FM10K is not set
+# CONFIG_NET_VENDOR_QUALCOMM is not set
+# CONFIG_NET_VENDOR_ROCKER is not set
+# CONFIG_NET_VENDOR_SAMSUNG is not set
+# CONFIG_SXGBE_ETH is not set
+# CONFIG_BCM7XXX_PHY is not set
+# CONFIG_MDIO_BCM_UNIMAC is not set
+CONFIG_USB_NET_DRIVERS=y
+# CONFIG_ATH9K_DYNACK is not set
+# CONFIG_ATH9K_CHANNEL_CONTEXT is not set
+CONFIG_ATH9K_PCOEM=y
+CONFIG_BRCMFMAC_PROTO_BCDC=y
+# CONFIG_BRCMFMAC_PCIE is not set
+CONFIG_IWLWIFI_LEDS=y
+# CONFIG_RTL8723BE is not set
+# CONFIG_RTL8192EE is not set
+# CONFIG_RTL8821AE is not set
+# CONFIG_RSI_91X is not set
+# CONFIG_MOUSE_ELAN_I2C is not set
+# CONFIG_TABLET_SERIAL_WACOM4 is not set
+# CONFIG_TOUCHSCREEN_GOODIX is not set
+# CONFIG_TOUCHSCREEN_ELAN is not set
+# CONFIG_TOUCHSCREEN_SX8654 is not set
+CONFIG_DEVMEM=y
+CONFIG_SERIAL_EARLYCON=y
+# CONFIG_SERIAL_8250_FINTEK is not set
+# CONFIG_SERIAL_SC16IS7XX is not set
+# CONFIG_IPMI_SSIF is not set
+# CONFIG_TCG_CRB is not set
+# CONFIG_TCG_TIS_ST33ZP24 is not set
+# CONFIG_XILLYBUS is not set
+CONFIG_ACPI_I2C_OPREGION=y
+# CONFIG_I2C_SLAVE is not set
+# CONFIG_SPI_CADENCE is not set
+# CONFIG_SPMI is not set
+# CONFIG_PINCTRL_BAYTRAIL is not set
+# CONFIG_PINCTRL_CHERRYVIEW is not set
+# CONFIG_PINCTRL_SUNRISEPOINT is not set
+CONFIG_GPIOLIB_IRQCHIP=y
+# CONFIG_GPIO_DWAPB is not set
+# CONFIG_GPIO_F7188X is not set
+# CONFIG_GPIO_ICH is not set
+# CONFIG_GPIO_SCH311X is not set
+# CONFIG_GPIO_ADP5588 is not set
+# CONFIG_GPIO_BT8XX is not set
+# CONFIG_BATTERY_GAUGE_LTC2941 is not set
+# CONFIG_SENSORS_APPLESMC is not set
+# CONFIG_SENSORS_G760A is not set
+# CONFIG_SENSORS_G762 is not set
+# CONFIG_SENSORS_I5500 is not set
+# CONFIG_SENSORS_CORETEMP is not set
+# CONFIG_SENSORS_POWR1220 is not set
+# CONFIG_SENSORS_LTC2945 is not set
+# CONFIG_SENSORS_LTC4151 is not set
+# CONFIG_SENSORS_LTC4215 is not set
+# CONFIG_SENSORS_LTC4222 is not set
+# CONFIG_SENSORS_LTC4245 is not set
+# CONFIG_SENSORS_LTC4260 is not set
+# CONFIG_SENSORS_LTC4261 is not set
+# CONFIG_SENSORS_MAX1111 is not set
+# CONFIG_SENSORS_MAX16065 is not set
+# CONFIG_SENSORS_MAX1619 is not set
+# CONFIG_SENSORS_MAX1668 is not set
+# CONFIG_SENSORS_MAX197 is not set
+# CONFIG_SENSORS_MAX6639 is not set
+# CONFIG_SENSORS_MAX6642 is not set
+# CONFIG_SENSORS_MAX6650 is not set
+# CONFIG_SENSORS_MAX6697 is not set
+# CONFIG_SENSORS_MCP3021 is not set
+# CONFIG_SENSORS_ADCXX is not set
+# CONFIG_SENSORS_NTC_THERMISTOR is not set
+# CONFIG_SENSORS_NCT6683 is not set
+# CONFIG_SENSORS_NCT6775 is not set
+# CONFIG_SENSORS_NCT7802 is not set
+# CONFIG_SENSORS_NCT7904 is not set
+# CONFIG_SENSORS_SHTC1 is not set
+# CONFIG_SENSORS_SMM665 is not set
+# CONFIG_SENSORS_ADC128D818 is not set
+# CONFIG_SENSORS_TMP103 is not set
+# CONFIG_THERMAL_GOV_BANG_BANG is not set
+# CONFIG_INTEL_SOC_DTS_THERMAL is not set
+# CONFIG_INT340X_THERMAL is not set
+# CONFIG_XILINX_WATCHDOG is not set
+# CONFIG_CADENCE_WATCHDOG is not set
+CONFIG_BCMA_DRIVER_PCI=y
+# CONFIG_MFD_BCM590XX is not set
+# CONFIG_MFD_AXP20X is not set
+# CONFIG_MFD_DA9150 is not set
+# CONFIG_MFD_DLN2 is not set
+# CONFIG_MFD_INTEL_QUARK_I2C_GPIO is not set
+# CONFIG_INTEL_SOC_PMIC is not set
+# CONFIG_MFD_MAX77843 is not set
+# CONFIG_MFD_MT6397 is not set
+# CONFIG_MFD_MENF21BMC is not set
+# CONFIG_MFD_RT5033 is not set
+# CONFIG_MFD_RN5T618 is not set
+# CONFIG_MFD_SKY81452 is not set
+# CONFIG_MFD_TPS65218 is not set
+# CONFIG_MEDIA_SDR_SUPPORT is not set
+# CONFIG_USB_GSPCA_DTCS033 is not set
+# CONFIG_USB_GSPCA_TOUPTEK is not set
+# CONFIG_DRM_I2C_ADV7511 is not set
+# CONFIG_DRM_VGEM is not set
+# CONFIG_HSA_AMD is not set
+CONFIG_FB_CMDLINE=y
+CONFIG_HDMI=y
+CONFIG_DUMMY_CONSOLE_COLUMNS=80
+CONFIG_DUMMY_CONSOLE_ROWS=25
+# CONFIG_HID_BETOP_FF is not set
+# CONFIG_HID_CP2112 is not set
+# CONFIG_HID_GT683R is not set
+# CONFIG_HID_LENOVO is not set
+# CONFIG_HID_LOGITECH_HIDPP is not set
+# CONFIG_HID_PENMOUNT is not set
+# CONFIG_HID_PLANTRONICS is not set
+# CONFIG_HID_RMI is not set
+# CONFIG_USB_OTG_FSM is not set
+CONFIG_USB_XHCI_PCI=y
+# CONFIG_USB_MAX3421_HCD is not set
+# CONFIG_USB_UAS is not set
+# CONFIG_USBIP_CORE is not set
+# CONFIG_USB_ISP1760 is not set
+# CONFIG_USB_LINK_LAYER_TEST is not set
+# CONFIG_USB_CHAOSKEY is not set
+# CONFIG_USB_LED_TRIG is not set
+# CONFIG_MMC_USDHI6ROL0 is not set
+# CONFIG_MMC_TOSHIBA_PCI is not set
+# CONFIG_LEDS_CLASS_FLASH is not set
+# CONFIG_LEDS_LP8860 is not set
+# CONFIG_EDAC_IE31200 is not set
+# CONFIG_RTC_DRV_ABB5ZES3 is not set
+# CONFIG_RTC_DRV_ABX80X is not set
+# CONFIG_RTC_DRV_PCF85063 is not set
+# CONFIG_RTC_DRV_DS1343 is not set
+# CONFIG_RTC_DRV_DS1347 is not set
+# CONFIG_RTC_DRV_MCP795 is not set
+# CONFIG_RTC_DRV_DS1685_FAMILY is not set
+# CONFIG_RTC_DRV_DS2404 is not set
+# CONFIG_RTC_DRV_XGENE is not set
+# CONFIG_FB_SM750 is not set
+# CONFIG_GS_FPGABOOT is not set
+# CONFIG_UNISYSSPAR is not set
+# CONFIG_FB_TFT is not set
+# CONFIG_DELL_SMO8800 is not set
+# CONFIG_TOSHIBA_HAPS is not set
+# CONFIG_COMMON_CLK_PXA is not set
+# CONFIG_COMMON_CLK_CDCE706 is not set
+# CONFIG_ATMEL_PIT is not set
+# CONFIG_SH_TIMER_CMT is not set
+# CONFIG_SH_TIMER_MTU2 is not set
+# CONFIG_SH_TIMER_TMU is not set
+# CONFIG_EM_TIMER_STI is not set
+# CONFIG_SOC_TI is not set
+# CONFIG_PM_DEVFREQ_EVENT is not set
+# CONFIG_BCM_KONA_USB2_PHY is not set
+# CONFIG_MCB is not set
+CONFIG_RAS=y
+# CONFIG_ANDROID is not set
+CONFIG_EFI_RUNTIME_WRAPPERS=y
+# CONFIG_F2FS_FS is not set
+# CONFIG_FS_DAX is not set
+# CONFIG_OVERLAY_FS is not set
+CONFIG_KERNFS=y
+CONFIG_EFIVAR_FS=m
+# CONFIG_SQUASHFS_LZ4 is not set
+# CONFIG_PSTORE_PMSG is not set
+# CONFIG_NFSD_PNFS is not set
+CONFIG_GRACE_PERIOD=y
+CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4
+# CONFIG_DEBUG_INFO_SPLIT is not set
+# CONFIG_DEBUG_INFO_DWARF4 is not set
+# CONFIG_GDB_SCRIPTS is not set
+# CONFIG_PAGE_OWNER is not set
+# CONFIG_PAGE_EXTENSION is not set
+CONFIG_HAVE_ARCH_KASAN=y
+# CONFIG_KASAN is not set
+CONFIG_KASAN_SHADOW_OFFSET=0xdffffc0000000000
+# CONFIG_SCHED_STACK_END_CHECK is not set
+# CONFIG_DEBUG_TIMEKEEPING is not set
+# CONFIG_LOCK_TORTURE_TEST is not set
+# CONFIG_PROVE_RCU is not set
+# CONFIG_TORTURE_TEST is not set
+# CONFIG_TRACEPOINT_BENCHMARK is not set
+# CONFIG_TEST_HEXDUMP is not set
+# CONFIG_TEST_RHASHTABLE is not set
+# CONFIG_TEST_LKM is not set
+# CONFIG_TEST_BPF is not set
+# CONFIG_TEST_FIRMWARE is not set
+# CONFIG_TEST_UDELAY is not set
+# CONFIG_MEMTEST is not set
+CONFIG_INTEGRITY=y
+# CONFIG_INTEGRITY_SIGNATURE is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_GCM=m
+CONFIG_CRYPTO_GHASH=m
+# CONFIG_CRYPTO_DES3_EDE_X86_64 is not set
+# CONFIG_CRYPTO_DRBG_MENU is not set
+# CONFIG_CRYPTO_USER_API_RNG is not set
+# CONFIG_CRYPTO_DEV_QAT_DH895xCC is not set
+CONFIG_KVM_COMPAT=y
+# CONFIG_HAVE_ARCH_BITREVERSE is not set
+CONFIG_RATIONAL=y
+CONFIG_ARCH_HAS_FAST_MULTIPLIER=y
+# CONFIG_AUDIT_ARCH_COMPAT_GENERIC is not set
+CONFIG_HAS_IOPORT_MAP=y
+CONFIG_GLOB=y
+# CONFIG_GLOB_SELFTEST is not set
+CONFIG_UIO=y
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86-standard-only.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86-standard-only.cfg
new file mode 100644
index 00000000..bfc1701d
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86-standard-only.cfg
@@ -0,0 +1,3 @@
+CONFIG_TRANSPARENT_HUGEPAGE=y
+CONFIG_TRANSPARENT_HUGEPAGE_MADVISE=y
+CONFIG_X86_POWERNOW_K8=y
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86-user-config.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86-user-config.cfg
new file mode 100644
index 00000000..76a144e0
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86-user-config.cfg
@@ -0,0 +1,396 @@
+CONFIG_X86_BIGSMP=y
+
+#
+# IRQ subsystem
+#
+CONFIG_GENERIC_IRQ_CHIP=y
+CONFIG_IRQ_DOMAIN=y
+
+CONFIG_CGROUP_PERF=y
+# CONFIG_CGROUP_DEBUG is not set
+CONFIG_CHECKPOINT_RESTORE=y
+CONFIG_SCHED_AUTOGROUP=y
+CONFIG_MODVERSIONS=y
+CONFIG_MODULE_SRCVERSION_ALL=y
+CONFIG_BLK_DEV_BSGLIB=y
+CONFIG_BLK_DEV_INTEGRITY=y
+CONFIG_BLK_DEV_THROTTLING=y
+CONFIG_BLK_CMDLINE_PARSER=y
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+
+#
+# IO Schedulers
+#
+CONFIG_X86_AMD_PLATFORM_DEVICE=y
+CONFIG_PROCESSOR_SELECT=y
+CONFIG_CPU_SUP_AMD=y
+CONFIG_HPET_TIMER=y
+CONFIG_HPET_EMULATE_RTC=y
+CONFIG_GART_IOMMU=y
+CONFIG_SWIOTLB=y
+CONFIG_NR_CPUS=256
+CONFIG_X86_MCE=y
+CONFIG_X86_MCE_AMD=y
+CONFIG_X86_MCE_INJECT=m
+
+#
+# Performance monitoring
+#
+CONFIG_MICROCODE=y
+CONFIG_MICROCODE_AMD=y
+CONFIG_X86_MSR=m
+CONFIG_X86_CPUID=m
+CONFIG_NUMA=y
+CONFIG_AMD_NUMA=y
+CONFIG_X86_64_ACPI_NUMA=y
+CONFIG_NODES_SHIFT=6
+CONFIG_ARCH_MEMORY_PROBE=y
+CONFIG_NEED_MULTIPLE_NODES=y
+CONFIG_MEMORY_ISOLATION=y
+CONFIG_HAVE_BOOTMEM_INFO_NODE=y
+CONFIG_MEMORY_HOTPLUG=y
+CONFIG_MEMORY_HOTPLUG_SPARSE=y
+CONFIG_MEMORY_HOTREMOVE=y
+CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION=y
+CONFIG_BOUNCE=y
+CONFIG_MMU_NOTIFIER=y
+CONFIG_KSM=y
+CONFIG_MEMORY_FAILURE=y
+CONFIG_CLEANCACHE=y
+CONFIG_FRONTSWAP=y
+CONFIG_CMA=y
+CONFIG_KEXEC=y
+CONFIG_CRASH_DUMP=y
+CONFIG_PHYSICAL_ALIGN=0x1000000
+CONFIG_RANDOMIZE_MEMORY=y
+CONFIG_RANDOMIZE_MEMORY_PHYSICAL_PADDING=0xa
+CONFIG_COMPAT_VDSO=y
+CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
+CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
+CONFIG_USE_PERCPU_NUMA_NODE_ID=y
+
+#
+# Power management and ACPI options
+#
+CONFIG_ARCH_HIBERNATION_HEADER=y
+CONFIG_HIBERNATE_CALLBACKS=y
+CONFIG_HIBERNATION=y
+CONFIG_PM_STD_PARTITION=""
+CONFIG_PM_TRACE=y
+CONFIG_PM_TRACE_RTC=y
+CONFIG_ACPI_VIDEO=m
+CONFIG_ACPI_NUMA=y
+CONFIG_ACPI_SBS=m
+CONFIG_ACPI_HED=y
+CONFIG_ACPI_BGRT=y
+CONFIG_ACPI_APEI=y
+CONFIG_ACPI_APEI_PCIEAER=y
+CONFIG_ACPI_APEI_MEMORY_FAILURE=y
+CONFIG_ACPI_APEI_EINJ=m
+CONFIG_ACPI_APEI_ERST_DEBUG=m
+CONFIG_SFI=y
+
+#
+# CPU Frequency scaling
+#
+CONFIG_CPU_FREQ_GOV_POWERSAVE=y
+CONFIG_CPU_FREQ_GOV_USERSPACE=y
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
+
+#
+# CPU frequency scaling drivers
+#
+CONFIG_X86_PCC_CPUFREQ=y
+CONFIG_X86_ACPI_CPUFREQ=y
+CONFIG_X86_ACPI_CPUFREQ_CPB=y
+CONFIG_X86_POWERNOW_K8=y
+CONFIG_X86_AMD_FREQ_SENSITIVITY=m
+CONFIG_X86_SPEEDSTEP_CENTRINO=y
+CONFIG_X86_P4_CLOCKMOD=m
+
+#
+# shared options
+#
+CONFIG_X86_SPEEDSTEP_LIB=m
+
+
+#
+# Bus options (PCI etc.)
+#
+CONFIG_PCI_MMCONFIG=y
+CONFIG_PCI_REALLOC_ENABLE_AUTO=y
+CONFIG_PCI_STUB=m
+CONFIG_PCI_ATS=y
+CONFIG_PCI_IOV=y
+CONFIG_PCI_PRI=y
+CONFIG_PCI_PASID=y
+CONFIG_HOTPLUG_PCI_CPCI=y
+CONFIG_HOTPLUG_PCI_CPCI_GENERIC=m
+
+#
+# PCI host controller drivers
+#
+CONFIG_AMD_NB=y
+
+#
+# RapidIO Switch drivers
+#
+CONFIG_X86_SYSFB=y
+
+
+#
+# Queueing/Scheduling
+#
+CONFIG_NET_SCH_FQ=m
+#
+# Misc devices
+#
+CONFIG_ENCLOSURE_SERVICES=m
+
+#
+# EEPROM support
+#
+CONFIG_EEPROM_LEGACY=m
+
+
+#
+# Controllers with non-SFF native interface
+#
+CONFIG_SATA_AHCI_PLATFORM=m
+
+
+#
+# Distributed Switch Architecture drivers
+#
+CONFIG_E1000=y
+CONFIG_E1000E=y
+CONFIG_E1000E_HWTS=y
+CONFIG_IGB=y
+CONFIG_IGB_HWMON=y
+CONFIG_IGBVF=y
+CONFIG_IXGB=y
+CONFIG_IXGBE=y
+CONFIG_IXGBE_HWMON=y
+CONFIG_IXGBEVF=y
+
+#
+# MDIO bus device drivers
+#
+CONFIG_MDIO_GPIO=m
+
+#
+# MII PHY device drivers
+#
+CONFIG_AMD_PHY=m
+
+CONFIG_SERIAL_8250_NR_UARTS=48
+CONFIG_SERIAL_8250_RUNTIME_UARTS=32
+CONFIG_SERIAL_8250_EXTENDED=y
+CONFIG_SERIAL_8250_MANY_PORTS=y
+CONFIG_SERIAL_8250_SHARE_IRQ=y
+CONFIG_SERIAL_8250_DETECT_IRQ=y
+CONFIG_SERIAL_8250_RSA=y
+CONFIG_SERIAL_8250_DW=y
+
+#
+# Non-8250 serial port support
+#
+CONFIG_IPMI_HANDLER=m
+CONFIG_NVRAM=m
+
+#
+# PCMCIA character devices
+#
+CONFIG_HANGCHECK_TIMER=m
+CONFIG_TCG_TPM=y
+
+CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_ALGOBIT=y
+CONFIG_I2C_PIIX4=m
+#
+# I2C system bus drivers (mostly embedded / system-on-chip)
+#
+CONFIG_I2C_CBUS_GPIO=m
+CONFIG_I2C_DESIGNWARE_CORE=y
+CONFIG_I2C_DESIGNWARE_PLATFORM=y
+CONFIG_I2C_DESIGNWARE_PCI=m
+CONFIG_I2C_DESIGNWARE_BAYTRAIL=y
+CONFIG_I2C_GPIO=m
+CONFIG_I2C_KEMPLD=m
+CONFIG_I2C_OCORES=m
+CONFIG_SPI=y
+# CONFIG_SPI_DEBUG is not set
+CONFIG_SPI_MASTER=y
+#
+# SPI Protocol Masters
+#
+CONFIG_SPI_SPIDEV=m
+#
+# Pin controllers
+#
+CONFIG_PINCTRL_AMD=y
+CONFIG_GPIOLIB=y
+CONFIG_GPIO_ACPI=y
+CONFIG_DEBUG_GPIO=y
+CONFIG_GPIO_SYSFS=y
+CONFIG_GPIO_GENERIC=y
+#
+# Memory mapped GPIO drivers
+#
+CONFIG_GPIO_GENERIC_PLATFORM=y
+
+#
+# PCI GPIO expanders
+#
+CONFIG_GPIO_ML_IOH=m
+
+#
+# Native drivers
+#
+CONFIG_SENSORS_K10TEMP=m
+CONFIG_SENSORS_FAM15H_POWER=m
+
+#
+# ACPI drivers
+#
+CONFIG_SENSORS_ACPI_POWER=m
+
+
+#
+# Graphics support
+#
+CONFIG_AGP_AMD64=y
+CONFIG_VGA_SWITCHEROO=y
+
+
+#
+# Frame buffer Devices
+#
+
+#
+# Frame buffer hardware drivers
+#
+
+#
+# Console display driver support
+#
+
+
+#
+# CODEC drivers
+#
+
+
+#
+# USB HID support
+#
+CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
+
+CONFIG_USB_OHCI_HCD_PCI=y
+CONFIG_USB_OHCI_HCD_PLATFORM=y
+
+#
+# MMC/SD/SDIO Card Drivers
+#
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_BLOCK_MINORS=8
+
+#
+# MMC/SD/SDIO Host Controller Drivers
+#
+CONFIG_MMC_SPI=m
+
+CONFIG_EDAC_SUPPORT=y
+CONFIG_EDAC=y
+CONFIG_EDAC_LEGACY_SYSFS=y
+CONFIG_EDAC_DECODE_MCE=y
+CONFIG_EDAC_AMD64=y
+CONFIG_EDAC_AMD64_ERROR_INJECTION=y
+
+#
+# DMABUF options
+#
+CONFIG_AUXDISPLAY=y
+
+
+#
+# Clock Source drivers
+#
+CONFIG_IOMMU_API=y
+CONFIG_IOMMU_SUPPORT=y
+
+#
+# Generic IOMMU Pagetable Support
+#
+CONFIG_IOMMU_IOVA=y
+CONFIG_AMD_IOMMU=y
+CONFIG_AMD_IOMMU_V2=y
+CONFIG_DMAR_TABLE=y
+CONFIG_IRQ_REMAP=y
+
+#
+# Broadcom SoC drivers
+#
+CONFIG_PM_DEVFREQ=y
+
+#
+# DEVFREQ Governors
+#
+CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y
+CONFIG_DEVFREQ_GOV_PERFORMANCE=y
+CONFIG_DEVFREQ_GOV_POWERSAVE=y
+CONFIG_DEVFREQ_GOV_USERSPACE=y
+# CONFIG_DEVFREQ_GOV_PASSIVE is not set
+
+
+CONFIG_MEMORY=y
+
+#
+# Firmware Drivers
+#
+CONFIG_EDD=y
+CONFIG_EDD_OFF=y
+CONFIG_DMI_SYSFS=m
+
+#
+# EFI (Extensible Firmware Interface) Support
+#
+CONFIG_EFI_VARS=y
+CONFIG_EFI_VARS_PSTORE=m
+CONFIG_EFI_RUNTIME_MAP=y
+CONFIG_UEFI_CPER=y
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_UDF_FS=m
+
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_VMCORE=y
+CONFIG_HUGETLBFS=y
+CONFIG_HUGETLB_PAGE=y
+CONFIG_PSTORE=y
+
+#
+# Compile-time checks and compiler options
+#
+CONFIG_DEBUG_KERNEL=y
+
+CONFIG_SECURITYFS=y
+CONFIG_GENERIC_ALLOCATOR=y
+CONFIG_INTERVAL_TREE=y
+
+#
+# Graphics support
+#
+
+#
+# Console display driver support
+#
+
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86-user-features.scc b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86-user-features.scc
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86-user-features.scc
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86-user-patches.scc b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86-user-patches.scc
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86-user-patches.scc
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86.cfg
new file mode 100644
index 00000000..b321cee6
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86.cfg
@@ -0,0 +1,59 @@
+CONFIG_PRINTK=y
+
+# Basic hardware support for the box - network, USB, PCI, sound
+CONFIG_NETDEVICES=y
+CONFIG_ATA=y
+CONFIG_ATA_GENERIC=y
+CONFIG_ATA_SFF=y
+CONFIG_PCI=y
+CONFIG_MMC=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_PCI=y
+CONFIG_USB_SUPPORT=y
+CONFIG_USB=y
+CONFIG_PATA_SCH=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_PCIEPORTBUS=y
+CONFIG_NET=y
+CONFIG_USB_UHCI_HCD=y
+CONFIG_BLK_DEV_SD=y
+CONFIG_CHR_DEV_SG=y
+
+# Make sure these are on, otherwise the bootup won't be fun
+CONFIG_EXT3_FS=y
+CONFIG_UNIX=y
+CONFIG_INET=y
+CONFIG_MODULES=y
+CONFIG_SHMEM=y
+CONFIG_TMPFS=y
+CONFIG_PACKET=y
+
+CONFIG_I2C=y
+CONFIG_AGP=y
+CONFIG_PM=y
+CONFIG_ACPI=y
+CONFIG_INPUT=y
+
+# Needed for booting (and using) USB memory sticks
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_ISO8859_1=y
+
+CONFIG_RD_GZIP=y
+
+# Filesystems
+CONFIG_EXT2_FS_SECURITY=y
+CONFIG_NFSD=m
+CONFIG_NFSD_V3=y
+CONFIG_NFSD_V4=y
+CONFIG_QFMT_V2
+CONFIG_QUOTA=y
+CONFIG_QUOTA_NETLINK_INTERFACE=y
+CONFIG_QUOTA_TREE=m
+CONFIG_QUOTACTL=y
+CONFIG_SQUASHFS=y
+CONFIG_SQUASHFS_XATTR=y
+CONFIG_SQUASHFS_ZLIB=y
+CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
+CONFIG_TMPFS_POSIX_ACL=y
+CONFIG_TMPFS_XATTR=y
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/disable-graphics.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/disable-graphics.cfg
new file mode 100644
index 00000000..da9cb204
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/disable-graphics.cfg
@@ -0,0 +1,4 @@
+# CONFIG_FB is not set
+# CONFIG_DRM is not set
+# CONFIG_AGP is not set
+# CONFIG_VGA_SWITCHEROO is not set
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/dpdk.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/dpdk.cfg
new file mode 100644
index 00000000..00225509
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/dpdk.cfg
@@ -0,0 +1,5 @@
+CONFIG_UIO_PCI_GENERIC=m
+
+CONFIG_VFIO_PCI=m
+CONFIG_VFIO_VIRQFD=m
+CONFIG_VFIO_NOIOMMU=y
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/kvm.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/kvm.cfg
new file mode 100644
index 00000000..f4ca1c77
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/kvm.cfg
@@ -0,0 +1,39 @@
+CONFIG_TASKSTATS=y
+CONFIG_TASK_DELAY_ACCT=y
+# CONFIG_TASK_XACCT is not set
+
+CONFIG_USER_RETURN_NOTIFIER=y
+CONFIG_PREEMPT_NOTIFIERS=y
+CONFIG_VFIO_IOMMU_TYPE1=y
+CONFIG_VFIO_VIRQFD=y
+CONFIG_VFIO=y
+# CONFIG_VFIO_NOIOMMU is not set
+CONFIG_VFIO_PCI=y
+# CONFIG_VFIO_PCI_VGA is not set
+CONFIG_VFIO_PCI_MMAP=y
+CONFIG_VFIO_PCI_INTX=y
+CONFIG_VFIO_PCI_IGD=y
+CONFIG_IRQ_BYPASS_MANAGER=y
+CONFIG_VIRT_DRIVERS=y
+CONFIG_SCHED_INFO=y
+CONFIG_VIRTIO_PCI_LEGACY=y
+CONFIG_VIRTIO_INPUT=y
+
+CONFIG_HAVE_KVM_IRQCHIP=y
+CONFIG_HAVE_KVM_IRQFD=y
+CONFIG_HAVE_KVM_IRQ_ROUTING=y
+CONFIG_HAVE_KVM_EVENTFD=y
+CONFIG_KVM_MMIO=y
+CONFIG_KVM_ASYNC_PF=y
+CONFIG_HAVE_KVM_MSI=y
+CONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT=y
+CONFIG_KVM_VFIO=y
+CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT=y
+CONFIG_KVM_COMPAT=y
+CONFIG_HAVE_KVM_IRQ_BYPASS=y
+CONFIG_KVM=y
+# CONFIG_KVM_INTEL is not set
+CONFIG_KVM_AMD=y
+# CONFIG_KVM_MMU_AUDIT is not set
+
+CONFIG_KVM_AMD_SEV=y
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amd-emmc-patches.scc b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amd-emmc-patches.scc
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amd-emmc-patches.scc
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amd-spi-patches.scc b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amd-spi-patches.scc
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amd-spi-patches.scc
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amd-usb-patches.scc b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amd-usb-patches.scc
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amd-usb-patches.scc
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amd-wdt-patches.scc b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amd-wdt-patches.scc
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amd-wdt-patches.scc
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amd-xgbe-patches.scc b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amd-xgbe-patches.scc
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amd-xgbe-patches.scc
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amdgpu-patches.scc b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amdgpu-patches.scc
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amdgpu-patches.scc
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/console.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/console.cfg
new file mode 100644
index 00000000..9e30450e
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/console.cfg
@@ -0,0 +1,7 @@
+CONFIG_FB=y
+CONFIG_FIRMWARE_EDID=y
+CONFIG_FB_TILEBLITTING=y
+CONFIG_FB_EFI=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FB_VESA=y
+CONFIG_FB_SIMPLE=y
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/disable-bluetooth.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/disable-bluetooth.cfg
new file mode 100644
index 00000000..ce6ddb43
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/disable-bluetooth.cfg
@@ -0,0 +1 @@
+# CONFIG_BT is not set
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/disable-intel-graphics.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/disable-intel-graphics.cfg
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/disable-intel-graphics.cfg
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/disable-kgdb.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/disable-kgdb.cfg
new file mode 100644
index 00000000..b8a2218b
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/disable-kgdb.cfg
@@ -0,0 +1 @@
+# CONFIG_KGDB is not set
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/enable-bluetooth.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/enable-bluetooth.cfg
new file mode 100644
index 00000000..581830f0
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/enable-bluetooth.cfg
@@ -0,0 +1,13 @@
+CONFIG_BT=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_BNEP=m
+CONFIG_BT_HIDP=m
+CONFIG_BT_HCIBFUSB=m
+CONFIG_BT_HCIBTUSB=m
+CONFIG_BT_HCIBTSDIO=m
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIBCM203X=m
+CONFIG_BT_HCIBPA10X=m
+CONFIG_BT_HCIVHCI=m
+CONFIG_BT_MRVL=m
+CONFIG_BT_ATH3K=m
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/enable-kgdb.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/enable-kgdb.cfg
new file mode 100644
index 00000000..55f296b2
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/enable-kgdb.cfg
@@ -0,0 +1,3 @@
+CONFIG_KGDB=y
+CONFIG_KGDB_LOW_LEVEL_TRAP=y
+CONFIG_KGDB_KDB=y
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/hid.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/hid.cfg
new file mode 100644
index 00000000..cbab0fa7
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/hid.cfg
@@ -0,0 +1,5 @@
+CONFIG_HID_A4TECH=m
+CONFIG_HID_LOGITECH=m
+CONFIG_HID_LOGITECH_DJ=m
+CONFIG_HID_MICROSOFT=m
+CONFIG_HID_MULTITOUCH=m
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/logo.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/logo.cfg
new file mode 100644
index 00000000..9772c12e
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/logo.cfg
@@ -0,0 +1 @@
+CONFIG_LOGO=y
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/misc-patches.scc b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/misc-patches.scc
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/misc-patches.scc
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/sound.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/sound.cfg
new file mode 100644
index 00000000..250714ae
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/sound.cfg
@@ -0,0 +1,29 @@
+CONFIG_SOUND=y
+CONFIG_SND=y
+CONFIG_SND_SEQUENCER=y
+CONFIG_SND_SEQ_DUMMY=y
+CONFIG_SND_MIXER_OSS=y
+CONFIG_SND_HRTIMER=y
+CONFIG_SND_DYNAMIC_MINORS=y
+CONFIG_SND_PCSP=y
+CONFIG_SND_HDA_GENERIC=y
+CONFIG_SND_HDA_INTEL=y
+CONFIG_SND_HDA_HWDEP=y
+CONFIG_SND_HDA_INPUT_BEEP=y
+CONFIG_SND_HDA_PATCH_LOADER=y
+CONFIG_SND_HDA_CODEC_REALTEK=y
+CONFIG_SND_HDA_CODEC_ANALOG=y
+CONFIG_SND_HDA_CODEC_SIGMATEL=y
+CONFIG_SND_HDA_CODEC_VIA=y
+CONFIG_SND_HDA_CODEC_HDMI=y
+CONFIG_SND_HDA_CODEC_CIRRUS=y
+CONFIG_SND_HDA_CODEC_CONEXANT=y
+CONFIG_SND_HDA_CODEC_CA0110=y
+CONFIG_SND_HDA_CODEC_CA0132=y
+CONFIG_SND_HDA_CODEC_CMEDIA=y
+CONFIG_SND_HDA_CODEC_SI3054=y
+CONFIG_SND_USB_AUDIO=y
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_PCM_OSS_PLUGINS=y
+CONFIG_SND_SEQUENCER_OSS=y
+CONFIG_SND_SOC=m
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/spi-driver.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/spi-driver.cfg
new file mode 100644
index 00000000..67795055
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/spi-driver.cfg
@@ -0,0 +1 @@
+CONFIG_SPI_AMD=m
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/usb-serial.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/usb-serial.cfg
new file mode 100644
index 00000000..11402439
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/usb-serial.cfg
@@ -0,0 +1 @@
+CONFIG_USB_SERIAL_MOS7840=y
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/wdt-driver.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/wdt-driver.cfg
new file mode 100644
index 00000000..a4f53782
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/wdt-driver.cfg
@@ -0,0 +1 @@
+CONFIG_SP5100_TCO=y
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/wifi-drivers.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/wifi-drivers.cfg
new file mode 100644
index 00000000..8b407303
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/wifi-drivers.cfg
@@ -0,0 +1,9 @@
+CONFIG_CFG80211_WEXT=y
+CONFIG_WEXT_CORE=y
+CONFIG_WEXT_PROC=y
+CONFIG_IWLWIFI=m
+CONFIG_IWLDVM=m
+CONFIG_IWLWIFI_OPMODE_MODULAR=y
+CONFIG_CARL9170=m
+CONFIG_CARL9170_LEDS=y
+CONFIG_CARL9170_WPC=y
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-amdx86_5.10.inc b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-amdx86_5.10.inc
new file mode 100644
index 00000000..395f1538
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-amdx86_5.10.inc
@@ -0,0 +1,36 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/linux-yocto-${LINUX_VERSION}-amdx86:"
+
+SRC_URI_append_amdx86 += "file://amdx86-user-features.scc \
+ file://amdx86-user-patches.scc \
+ file://amdx86.cfg \
+ file://amdx86-user-config.cfg \
+ file://amdx86-extra-config.cfg \
+ file://amd-xgbe.cfg \
+ file://amd-ccp.cfg \
+ file://kvm.cfg \
+ ${@bb.utils.contains('EXTRA_IMAGE_FEATURES', 'amd-feature-networking', 'file://dpdk.cfg', '', d)} \
+ file://afalg.cfg \
+ file://disable-graphics.cfg \
+ file://amdx86-standard-only.cfg \
+"
+
+SRC_URI_remove_amdx86 = " file://sound.cfg"
+
+do_validate_branches_append() {
+ # Droping configs related to sound generating spurious warnings
+ sed -i '/kconf hardware snd_hda_intel.cfg/d' ${WORKDIR}/${KMETA}/features/sound/snd_hda_intel.scc
+
+ # Droping configs related to graphics generating spurious warnings
+ sed -i '/CONFIG_DRM/d' ${WORKDIR}/${KMETA}/bsp/common-pc/common-pc-gfx.cfg
+ sed -i '/kconf hardware i915.cfg/d' ${WORKDIR}/${KMETA}/features/i915/i915.scc
+
+ # Droping configs related to vga/framebuffer-console generating spurious warnings
+ sed -i '/CONFIG_FB/d' ${WORKDIR}/${KMETA}/bsp/common-pc/common-pc-gfx.cfg
+ sed -i '/CONFIG_FRAMEBUFFER_CONSOLE/d' ${WORKDIR}/${KMETA}/bsp/common-pc/common-pc-gfx.cfg
+ sed -i '/CONFIG_FB/d' ${WORKDIR}/${KMETA}/cfg/efi-ext.cfg
+ sed -i '/CONFIG_FRAMEBUFFER_CONSOLE/d' ${WORKDIR}/${KMETA}/cfg/efi-ext.cfg
+
+ # Drop configs limiting the max number of cpus - we use our own setting in amdx86-user-config.cfg
+ sed -i '/CONFIG_NR_CPUS/d' ${WORKDIR}/${KMETA}/cfg/smp.cfg
+ sed -i '/CONFIG_NR_CPUS/d' ${WORKDIR}/${KMETA}/cfg/smp_64.cfg
+}
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-common_5.10.inc b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-common_5.10.inc
new file mode 100644
index 00000000..f0e4fab9
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-common_5.10.inc
@@ -0,0 +1,27 @@
+INC_PR := "r0"
+PR := "${INC_PR}.1"
+
+KMACHINE_amd ?= "common-pc-64"
+SRCREV_meta_amd ?= "031f6c76e488a3563f35258c72ff1de3e25a512e"
+LINUX_VERSION_amd ?= "5.10.25"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/linux-yocto-${LINUX_VERSION}:"
+
+SRC_URI_append_amd = " file://amd-xgbe-patches.scc \
+ file://amd-emmc-patches.scc \
+ file://amd-spi-patches.scc \
+ file://amd-usb-patches.scc \
+ file://amd-wdt-patches.scc \
+ file://logo.cfg \
+ file://console.cfg \
+ file://sound.cfg \
+ file://hid.cfg \
+ file://usb-serial.cfg \
+ file://spi-driver.cfg \
+ file://wdt-driver.cfg \
+ file://wifi-drivers.cfg \
+ file://disable-intel-graphics.cfg \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'file://enable-bluetooth.cfg', 'file://disable-bluetooth.cfg', d)} \
+ ${@bb.utils.contains('DISTRO', 'poky-amd', 'file://enable-kgdb.cfg', 'file://disable-kgdb.cfg', d)}"
+
+KERNEL_FEATURES_append_amd = " cfg/smp.scc"
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-e3000_5.10.inc b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-e3000_5.10.inc
new file mode 100644
index 00000000..c33aa632
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-e3000_5.10.inc
@@ -0,0 +1,3 @@
+require linux-yocto-amdx86_5.10.inc
+
+COMPATIBLE_MACHINE = "e3000"
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-ethanolx_5.10.inc b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-ethanolx_5.10.inc
new file mode 100644
index 00000000..614df797
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-ethanolx_5.10.inc
@@ -0,0 +1,3 @@
+require linux-yocto-amdx86_5.10.inc
+
+COMPATIBLE_MACHINE = "ethanolx"
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-rt_5.10.bbappend b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-rt_5.10.bbappend
new file mode 100644
index 00000000..a70452fe
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-rt_5.10.bbappend
@@ -0,0 +1,6 @@
+require linux-yocto-common_5.10.inc
+
+KBRANCH_amd ?= "v5.10/standard/preempt-rt/base"
+SRCREV_machine_amd ?= "be2935bce35f9adb6d0e735d42651e81a5094adf"
+
+include linux-yocto-${MACHINE}_5.10.inc
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-v1000_5.10.inc b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-v1000_5.10.inc
new file mode 100644
index 00000000..a4ca1efc
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-v1000_5.10.inc
@@ -0,0 +1,3 @@
+require linux-yocto-amdx86_5.10.inc
+
+COMPATIBLE_MACHINE = "v1000"
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto_5.10.bbappend b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto_5.10.bbappend
new file mode 100644
index 00000000..9b45f237
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto_5.10.bbappend
@@ -0,0 +1,9 @@
+require linux-yocto-common_5.10.inc
+
+KBRANCH_amd ?= "v5.10/standard/base"
+SRCREV_machine_amd ?= "cf5b0320cf4544d3db9ce3ddd6ddb7553a610651"
+
+SRC_URI_append_amdgpu += "file://amdgpu-patches.scc \
+ file://misc-patches.scc"
+
+include linux-yocto-${MACHINE}_5.10.inc
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.4/linux-yocto-rome_5.4.inc b/meta-amd-bsp/recipes-kernel/linux-5.4/linux-yocto-ethanolx_5.4.inc
index f5361a7a..c1cf9826 100644
--- a/meta-amd-bsp/recipes-kernel/linux-5.4/linux-yocto-rome_5.4.inc
+++ b/meta-amd-bsp/recipes-kernel/linux-5.4/linux-yocto-ethanolx_5.4.inc
@@ -1,3 +1,3 @@
require linux-yocto-amdx86_5.4.inc
-COMPATIBLE_MACHINE = "rome"
+COMPATIBLE_MACHINE = "ethanolx"