SAMA5 OHCI: Use physical address and flush and/or invalidate data caches as necessary

This commit is contained in:
Gregory Nutt
2013-08-14 12:23:06 -06:00
parent 16ac25fd09
commit 79d5239023
5 changed files with 622 additions and 170 deletions
+5 -1
View File
@@ -5330,7 +5330,7 @@
* arch/arm/src/sama5/sam_dmac.c: Finally after many bugfixes (the * arch/arm/src/sama5/sam_dmac.c: Finally after many bugfixes (the
last being caching issues), the SAMA5 DMA support has been last being caching issues), the SAMA5 DMA support has been
verified (with SPI) (2013-8-9). verified (with SPI) (2013-8-9).
* arch/arm/src/sama5/sam_memories.c and .h: Central logic for * arch/arm/src/sama5/sam_memories.c and .h: Centralize logic for
conversions between physical and virtual addresses (2013-8-9). conversions between physical and virtual addresses (2013-8-9).
* arch/arm/src/sama5/sam_hsmci.c and sam34/sam_hsmci.c: Correct a * arch/arm/src/sama5/sam_hsmci.c and sam34/sam_hsmci.c: Correct a
race condition in the SAMA5 HSCMI driver: The tranfer done race condition in the SAMA5 HSCMI driver: The tranfer done
@@ -5404,3 +5404,7 @@
passes information associated with the RHport implicitly. The klugey, passes information associated with the RHport implicitly. The klugey,
procedural alternative was to add the function address to every procedural alternative was to add the function address to every
interface method (which I started to do but backed above) (2013-8-13). interface method (which I started to do but backed above) (2013-8-13).
* arch/arm/src/sama5/sam_memories.c and .h: Extended logic so do
conversions from physical to virtual addresses (2013-8-14).
* arch/arm/src/sama5/sam_ohci.c: Add D cache contols and conversion
between physical and virtual address (2013-8-14).
+3 -3
View File
@@ -348,15 +348,15 @@ config SAMA5_OHCI
if SAMA5_OHCI if SAMA5_OHCI
config SAMA5_OHCI_NEDS config SAMA5_OHCI_NEDS
int "Number of endpoint descriptors" int "Number of endpoint descriptors"
default 2 default 6
config SAMA5_OHCI_NTDS config SAMA5_OHCI_NTDS
int "Number of transfer descriptors" int "Number of transfer descriptors"
default 3 default 9
config SAMA5_OHCI_TDBUFFERS config SAMA5_OHCI_TDBUFFERS
int "Number of transfer descriptor buffers" int "Number of transfer descriptor buffers"
default 2 default 6
config SAMA5_OHCI_TDBUFSIZE config SAMA5_OHCI_TDBUFSIZE
int "Size of one transfer descriptor buffer" int "Size of one transfer descriptor buffer"
File diff suppressed because it is too large Load Diff
+13 -2
View File
@@ -82,7 +82,7 @@ extern "C"
* *
****************************************************************************/ ****************************************************************************/
uintptr_t sam_physregaddr(uintptr_t vregaddr); uintptr_t sam_physregaddr(uintptr_t virtregaddr);
/**************************************************************************** /****************************************************************************
* Name: sam_physramaddr * Name: sam_physramaddr
@@ -93,7 +93,18 @@ uintptr_t sam_physregaddr(uintptr_t vregaddr);
* *
****************************************************************************/ ****************************************************************************/
uintptr_t sam_physramaddr(uintptr_t vregaddr); uintptr_t sam_physramaddr(uintptr_t vramaddr);
/****************************************************************************
* Name: sam_virtramaddr
*
* Description:
* Give the phsical address of a RAM memory location, return the virtual
* address of that location.
*
****************************************************************************/
uintptr_t sam_virtramaddr(uintptr_t physramaddr);
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
File diff suppressed because it is too large Load Diff