GitLab has been upgraded to 13.3.6. If you encounter any issues mail code@riscosopen.org

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

Change to unsigned physical addresses

Don't predefine paddr_t this will clash with USBDriver-1_31.
Use symbolic names for HAL calls.

Version 0.36. Tagged as 'MUSBDriver-0_36'
parent cca81a1d
......@@ -26,7 +26,7 @@ CMHGDEPENDS = cmodule musb tps
ROMCDEFINES = -DROM
CINCLUDES = -ITCPIPLibs:,C:USB,OS:
CFLAGS += -wp -wc
CDEFINES += -DKERNEL -D_KERNEL -Dpaddr_t=int -D__P(A)=A -DKLD_MODULE -DDISABLE_PACKED
CDEFINES += -DKERNEL -D_KERNEL -D__P(A)=A -DKLD_MODULE -DDISABLE_PACKED
#
# Debug switch
......
/* (0.35)
/* (0.36)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 0.35
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 27 Jan 2018
#define Module_MajorVersion_CMHG 0.36
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 04 Jul 2020
#define Module_MajorVersion "0.35"
#define Module_Version 35
#define Module_MajorVersion "0.36"
#define Module_Version 36
#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 "MUSBDriver"
#define Module_ComponentPath "mixed/RiscOS/Sources/HWSupport/USB/Controllers/MUSBDriver"
#define Module_FullVersion "0.35"
#define Module_HelpVersion "0.35 (27 Jan 2018)"
#define Module_LibraryVersionInfo "0:35"
#define Module_FullVersion "0.36"
#define Module_HelpVersion "0.36 (04 Jul 2020)"
#define Module_LibraryVersionInfo "0:36"
......@@ -55,11 +55,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 */
......@@ -180,7 +180,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)
......
......@@ -185,7 +185,7 @@ static void init_driver(void)
_swix (OS_ClaimDeviceVector, _INR(0,4),
device_number| (1u<<31), usb_irq_entry, private_word, 0, 0);
_swix (OS_Hardware, _IN(0) | _INR(8,9),
device_number, 0, EntryNo_HAL_IRQEnable);
device_number, OSHW_CallHAL, EntryNo_HAL_IRQEnable);
driver_init = true;
}
......@@ -198,7 +198,7 @@ static void shutdown_driver(void)
/* don't disable the interrupt since it is shared, the OS will disable it
when noone is left responding */
// _swix (OS_Hardware, _IN(0) | _INR(8,9),
// device_number, 0, EntryNo_HAL_IRQDisable);
// device_number, OSHW_CallHAL, EntryNo_HAL_IRQDisable);
callx_remove_all_callbacks ();
callx_remove_all_callafters ();
callx_remove_all_calleverys ();
......@@ -283,7 +283,7 @@ _kernel_oserror* module_init (const char *cmd_tail, int podule_base, void *pw)
e = _swix(OS_Hardware, _INR(0,2)|_INR(8,9)|_OUT(0),
hal_device, &usbinfo, sizeof usbinfo,
0, EntryNo_HAL_USBControllerInfo,
OSHW_CallHAL, EntryNo_HAL_USBControllerInfo,
&usbinfolen);
if (!e && (usbinfolen == sizeof(usbinfo)) && (usbinfo.type == HALUSBControllerType_MUSBMHDRC))
{
......@@ -466,11 +466,11 @@ int usb_irq_handler(_kernel_swi_regs *r, void *pw)
int ret;
/* Prevent recursion by masking the IRQ while we handle the interrupt */
_swix(OS_Hardware, _IN(0)|_INR(8,9), device_number, 0, EntryNo_HAL_IRQDisable);
_swix(OS_Hardware, _IN(0)|_INR(8,9), device_number, OSHW_CallHAL, EntryNo_HAL_IRQDisable);
ret = musb_intr(&musb_soft);
_swix(OS_Hardware, _IN(0)|_INR(8,9), device_number, 0, EntryNo_HAL_IRQEnable);
_swix(OS_Hardware, _IN(0)|_INR(8,9), device_number, OSHW_CallHAL, EntryNo_HAL_IRQEnable);
NOTUSED(r);
NOTUSED(pw);
......@@ -483,7 +483,7 @@ int usb_irq_handler(_kernel_swi_regs *r, void *pw)
/*---------------------------------------------------------------------------*/
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)
......
......@@ -137,7 +137,7 @@ void musb_assert_fail(const char *file,int line,const char *reason)
bufpos = buf;
while(*bufpos)
{
_swix(OS_Hardware,_IN(0)|_INR(8,9), *bufpos, 0, EntryNo_HAL_DebugTX);
_swix(OS_Hardware,_IN(0)|_INR(8,9), *bufpos, OSHW_CallHAL, EntryNo_HAL_DebugTX);
bufpos++;
}
_swix(OS_CLI,_IN(0),"*dadprint");
......
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