Commit 56975866 authored by Robert Sprowson's avatar Robert Sprowson Committed by ROOL

Change to unsigned physical addresses

The prototype for vtophys returns an unsigned value, update this driver to match the port header file from USBDriver-1_31.
Use symbolic names for HAL calls.

Version 0.42. Tagged as 'EHCIDriver-0_42'
parent 61ff395b
......@@ -33,7 +33,7 @@ OBJS = call_veneer usbroothub_subr bsd_fns ehcimodule ehci
HDRS =
CMHGDEPENDS = ehcimodule
LIBS = ${CALLXLIB} ${ASMUTILS}
CDEFINES += ${CDEBUG} -DKERNEL -D_KERNEL -Dpaddr_t=int -D__P(A)=A -DKLD_MODULE -DDISABLE_PACKED
CDEFINES += ${CDEBUG} -DKERNEL -D_KERNEL -D__P(A)=A -DKLD_MODULE -DDISABLE_PACKED
ROMCDEFINES = -DROM
RES_AREA = resource_files
CINCLUDES = -IC:USB,TCPIPLibs:,C:,tbox:
......
/* (0.41)
/* (0.42)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 0.41
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 27 Jan 2018
#define Module_MajorVersion_CMHG 0.42
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 04 Jul 2020
#define Module_MajorVersion "0.41"
#define Module_Version 41
#define Module_MajorVersion "0.42"
#define Module_Version 42
#define Module_MinorVersion ""
#define Module_Date "27 Jan 2018"
#define Module_Date "04 Jul 2020"
#define Module_ApplicationDate "27-Jan-18"
#define Module_ApplicationDate "04-Jul-20"
#define Module_ComponentName "EHCIDriver"
#define Module_ComponentPath "mixed/RiscOS/Sources/HWSupport/USB/Controllers/EHCIDriver"
#define Module_FullVersion "0.41"
#define Module_HelpVersion "0.41 (27 Jan 2018)"
#define Module_LibraryVersionInfo "0:41"
#define Module_FullVersion "0.42"
#define Module_HelpVersion "0.42 (04 Jul 2020)"
#define Module_LibraryVersionInfo "0:42"
......@@ -62,11 +62,11 @@ static uint64_t gettime (void)
if (readcode == NULL)
{
_swix (OS_Hardware, _INR(8,9)|_OUTR(0,1),
1, EntryNo_HAL_CounterRead,
OSHW_LookupRoutine, EntryNo_HAL_CounterRead,
&readcode, &ws);
_swix (OS_Hardware, _INR(8,9)| _OUT(0),
0, EntryNo_HAL_CounterPeriod,
OSHW_CallHAL, EntryNo_HAL_CounterPeriod,
&max_count);
/* conversion to ns, assume counter is for 1 cs */
......@@ -187,7 +187,7 @@ int wakeup (void* ident) {
void delay (int d)
{
_swix (OS_Hardware, _IN(0)|_INR(8,9), d, 0, EntryNo_HAL_CounterDelay);
_swix (OS_Hardware, _IN(0)|_INR(8,9), d, OSHW_CallHAL, EntryNo_HAL_CounterDelay);
}
void usb_delay_ms(usbd_bus_handle h, u_int d)
......@@ -277,17 +277,17 @@ callout_reset (struct callout *c, int i, void (*f)(void *), void *v) {
/*---------------------------------------------------------------------------*/
/* Kernel virtual memory replacement functions */
/*---------------------------------------------------------------------------*/
int vtophys (void* v)
paddr_t vtophys (void* v)
{
struct {
int page;
void* logical;
int physical;
void* physical;
} block;
block.logical = v;
_swix (OS_Memory, _INR (0, 2), (1<<9) + (1<<13), &block, 1);
return block.physical;
return (paddr_t)block.physical;
}
/*---------------------------------------------------------------------------*/
......
......@@ -709,7 +709,7 @@ void triggercbs(void)
void riscos_irqclear(int devno)
{
_swix(OS_Hardware, _IN(0)|_INR(8,9), devno, 0, EntryNo_HAL_IRQClear);
_swix(OS_Hardware, _IN(0)|_INR(8,9), devno, OSHW_CallHAL, EntryNo_HAL_IRQClear);
}
static _kernel_oserror *_riscos_abort_pipe (_kernel_swi_regs *r, void *pw, void *v)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment