From 63330ee31df62743aa6a74e54320566da320dda1 Mon Sep 17 00:00:00 2001 From: Nathan Rossi Date: Tue, 10 Jun 2014 10:52:24 +1000 Subject: qemu: Fix axi-ethernet for newer kernels * Backport patch from upstream which fixes axi-ethernet phy accesses with newer kernels Signed-off-by: Nathan Rossi --- ...axienet.c-Add-phy-soft-reset-bit-clearing.patch | 37 ++++++++++++++++++++++ recipes-devtools/qemu/qemu_2.0.0.bbappend | 1 + 2 files changed, 38 insertions(+) create mode 100644 recipes-devtools/qemu/files/net-xilinx_axienet.c-Add-phy-soft-reset-bit-clearing.patch diff --git a/recipes-devtools/qemu/files/net-xilinx_axienet.c-Add-phy-soft-reset-bit-clearing.patch b/recipes-devtools/qemu/files/net-xilinx_axienet.c-Add-phy-soft-reset-bit-clearing.patch new file mode 100644 index 00000000..8e8032e9 --- /dev/null +++ b/recipes-devtools/qemu/files/net-xilinx_axienet.c-Add-phy-soft-reset-bit-clearing.patch @@ -0,0 +1,37 @@ +From f663faac3e2e9d9134415f75d429ae30432e6038 Mon Sep 17 00:00:00 2001 +From: Nathan Rossi +Date: Tue, 8 Apr 2014 18:52:39 -0700 +Subject: [PATCH] net: xilinx_axienet.c: Add phy soft reset bit clearing + +Clear the BMCR Reset when writing to registers. + +Signed-off-by: Nathan Rossi +[ PC: + * Trivial style fixes to commit message +] +Signed-off-by: Peter Crosthwaite +Reviewed-by: Beniamino Galvani +Reviewed-by: Edgar E. Iglesias +Signed-off-by: Stefan Hajnoczi +Upstream-Status: Backport +--- + hw/net/xilinx_axienet.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/hw/net/xilinx_axienet.c b/hw/net/xilinx_axienet.c +index 839d97c..0f485a0 100644 +--- a/hw/net/xilinx_axienet.c ++++ b/hw/net/xilinx_axienet.c +@@ -142,6 +142,9 @@ tdk_write(struct PHY *phy, unsigned int req, unsigned int data) + phy->regs[regnum] = data; + break; + } ++ ++ /* Unconditionally clear regs[BMCR][BMCR_RESET] */ ++ phy->regs[0] &= ~0x8000; + } + + static void +-- +1.9.0 + diff --git a/recipes-devtools/qemu/qemu_2.0.0.bbappend b/recipes-devtools/qemu/qemu_2.0.0.bbappend index 94296457..01f76bb4 100644 --- a/recipes-devtools/qemu/qemu_2.0.0.bbappend +++ b/recipes-devtools/qemu/qemu_2.0.0.bbappend @@ -3,4 +3,5 @@ QEMU_TARGETS += "microblazeel" FILESEXTRAPATHS_append := "${THISDIR}/files:" SRC_URI_append += " \ file://HACK_zynq_slcr_Bring_SLCR_out_of_reset_in_kernel_state.patch \ + file://net-xilinx_axienet.c-Add-phy-soft-reset-bit-clearing.patch \ " -- cgit v1.2.3-54-g00ecf