SAMA5 OHCI: Fix some problems with D-Cache coherency and physical addressing related to interrupt endpoints
This commit is contained in:
parent
ad1d9d2a44
commit
34804c8ee7
@ -5606,3 +5606,7 @@
|
||||
to provide prettier ps command output. src/sam_usb.c: Use more
|
||||
descriptive task names when starting the EHCI and OHCI monitor tasks
|
||||
(2013-9-20).
|
||||
* arch/arm/src/sama5/sam_ohci.c: Fix a place where DMA-related data
|
||||
needed to be flushed to data cache; Fix another where a virual address
|
||||
was being used in a register where a physical address was required
|
||||
(2013-9-20).
|
||||
|
@ -3108,6 +3108,7 @@ static void sam_disconnect(FAR struct usbhost_driver_s *drvr)
|
||||
|
||||
FAR struct usbhost_connection_s *sam_ohci_initialize(int controller)
|
||||
{
|
||||
uintptr_t physaddr;
|
||||
uint32_t regval;
|
||||
uint8_t *buffer;
|
||||
irqstate_t flags;
|
||||
@ -3192,6 +3193,9 @@ FAR struct usbhost_connection_s *sam_ohci_initialize(int controller)
|
||||
|
||||
memset((void*)&g_hcca, 0, sizeof(struct ohci_hcca_s));
|
||||
|
||||
cp15_clean_dcache((uint32_t)&g_hcca,
|
||||
(uint32_t)&g_hcca + sizeof(struct ohci_hcca_s));
|
||||
|
||||
/* Initialize user-configurable EDs */
|
||||
|
||||
for (i = 0; i < SAMA5_OHCI_NEDS; i++)
|
||||
@ -3274,7 +3278,8 @@ FAR struct usbhost_connection_s *sam_ohci_initialize(int controller)
|
||||
|
||||
/* Set HCCA base address */
|
||||
|
||||
sam_putreg((uint32_t)&g_hcca, SAM_USBHOST_HCCA);
|
||||
physaddr = sam_physramaddr((uintptr_t)&g_hcca);
|
||||
sam_putreg(physaddr, SAM_USBHOST_HCCA);
|
||||
|
||||
/* Clear pending interrupts */
|
||||
|
||||
|
@ -1220,6 +1220,22 @@ Configurations
|
||||
-rw-rw-rw- 1503 sz-1.log
|
||||
-rw-rw-rw- 613 .bashrc
|
||||
|
||||
Or, if a (supported) USB keyboard is connected, a /dev/kbda device
|
||||
will appear:
|
||||
|
||||
nsh> ls /dev
|
||||
/dev:
|
||||
console
|
||||
kbda
|
||||
mtdblock0
|
||||
null
|
||||
ttyS0
|
||||
|
||||
/dev/kbda is a read-only serial device. Reading from /dev/kbda will
|
||||
get keyboard input as ASCII data (other encodings are possible):
|
||||
|
||||
nsh> cat /dev/kbda
|
||||
|
||||
The following features are *not* enabled in the demo configuration but
|
||||
might be of some use to you:
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user