]> git.proxmox.com Git - mirror_edk2.git/commit
EmbeddedPkg/Lan9118Dxe: add LAN9118 MMIO wrappers
authorMark Rutland <mark.rutland@arm.com>
Fri, 6 May 2016 17:19:07 +0000 (18:19 +0100)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Tue, 10 May 2016 12:48:48 +0000 (14:48 +0200)
commit73683a2464e2f81b7b9dfb9b84b537290235bbe1
tree8132fc4ae387013b37666a3780cf28e18647f2c6
parent28f52b9fae9feba369ff0d773e0b0e610c0aa6f8
EmbeddedPkg/Lan9118Dxe: add LAN9118 MMIO wrappers

As described in the LAN9118 datasheet, delays are necessary after some
reads and writes in order to ensure subsequent reads do not see stale
data.

This patch adds helpers to provide these delays automatically, by
performing dummy reads of the BYTE_TEST register (as recommended in the
LAN9118 datasheet). This approach allows the device register file itself
to provide the required delay, avoiding issues with early write
acknowledgement, or re-ordering of MMIO accesses aganist other
instructions (e.g. the delay loop).

Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Ryan Harkin <ryan.harkin@linaro.org>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118DxeHw.h
EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118DxeUtil.c
EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118DxeUtil.h