diff --git a/arch/arm/src/samv7/Kconfig b/arch/arm/src/samv7/Kconfig index 41e40b5df1..08d8f7570c 100644 --- a/arch/arm/src/samv7/Kconfig +++ b/arch/arm/src/samv7/Kconfig @@ -120,10 +120,10 @@ config SAMV7_EMAC select ARMV7M_DCACHE_WRITETHROUGH if ARMV7M_DCACHE ---help--- NOTE that write-through caching is automatically selected. This is - to work around issues with the RX and TX descriptors with are 8-bits + to work around issues with the RX and TX descriptors with are 8-bytes in size. But the D-Cache cache line size is 32-bytes. That means that you cannot reload, clean or invalidate a descriptor without also - effecting three neighboring desciptors. Setting write through mode + effecting three neighboring descriptors. Setting write through mode eliminates the need for cleaning. If only reloading and invalidating are done, then there is no problem. diff --git a/configs/samv71-xult/README.txt b/configs/samv71-xult/README.txt index 0efaff8806..f242c1faa1 100644 --- a/configs/samv71-xult/README.txt +++ b/configs/samv71-xult/README.txt @@ -88,28 +88,21 @@ The BASIC nsh configuration is fully function (as desribed below under So there is still plenty to be done. 6. There is a port of the SAMA5D4-EK Ethernet driver to the SAMV71-XULT. - Some basic functionality is present, but there is at least two, - probably related issues: + This driver appears to be 100% functional with the following caveats: - There is a compiler optimization problem. At -O2, there is odd behavior on pings and ARP messages. But the behavior is OK with - optimization disabled. This may or may not be a compiler issue; it - may be a timing issue. + optimization set to -O2. This may or may not be a compiler + optimization issue (it could also be a timing issue or a need + for some additional volatile qualifiers). - Symptoms vary from build to build but usually result in a hang. - - - The driver does not work with I- and D-Caches enabled. The behavior - is just as for when compiler optimization is enabled. I have not - yet found in coherency issues so this might also be timing related. - - At -O2, many packets can be exchanged but eventually there is a - hardfault, presumably because of a misdirected DMA. - - I have no hard evidence, but I believe that the nature of the problem - related to fact that each descriptor in the arrays are 8-bytes each, - but cache operations are performed on 32-byte memory chunks. So it is - impossible to clean or invalidate a single descriptor without also - cleaning or invalidaing adjacent descriptors. + - I- and D-Caches are enabled but the D-Cache must be enabled in + write-trough mode. This is to work around issues with the RX and TX + descriptors with are 8-bytes in size. But the D-Cache cache line size + is 32-bytes. That means that you cannot reload, clean or invalidate a + descriptor without also effecting three neighboring descriptors. + Setting write through mode eliminates the need for cleaning the D-Cache. + If only reloading and invalidating are done, then there is no problem. 7. The USBHS device controller driver (DCD) is complete but non-functional. At this point, work has stopped because I am stuck. The problem is that diff --git a/configs/samv71-xult/netnsh/defconfig b/configs/samv71-xult/netnsh/defconfig index e74dd19131..989aad9893 100644 --- a/configs/samv71-xult/netnsh/defconfig +++ b/configs/samv71-xult/netnsh/defconfig @@ -122,8 +122,9 @@ CONFIG_ARCH_DPFPU=y # CONFIG_ARMV7M_HAVE_ICACHE=y CONFIG_ARMV7M_HAVE_DCACHE=y -# CONFIG_ARMV7M_ICACHE is not set -# CONFIG_ARMV7M_DCACHE is not set +CONFIG_ARMV7M_ICACHE=y +CONFIG_ARMV7M_DCACHE=y +CONFIG_ARMV7M_DCACHE_WRITETHROUGH=y CONFIG_ARMV7M_HAVE_ITCM=y CONFIG_ARMV7M_HAVE_DTCM=y # CONFIG_ARMV7M_ITCM is not set @@ -572,6 +573,7 @@ CONFIG_ETH0_PHY_KSZ8061=y # CONFIG_ETH0_PHY_DP83848C is not set # CONFIG_ETH0_PHY_LAN8720 is not set # CONFIG_ETH0_PHY_LAN8740 is not set +# CONFIG_ETH0_PHY_LAN8740A is not set # CONFIG_ETH0_PHY_DM9161 is not set # CONFIG_PIPES is not set # CONFIG_PM is not set