Commit 703ae7bc authored by Robert Sprowson's avatar Robert Sprowson

When standalone only register with ResourceFS in the base instance

Otherwise subsequent instantiations get an error because the Messages file is already there.

Version 0.27. Tagged as 'XHCIDriver-0_27'
parent 5cbd4521
/* (0.26)
/* (0.27)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 0.26
#define Module_MajorVersion_CMHG 0.27
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 29 Mar 2018
#define Module_Date_CMHG 02 Jun 2018
#define Module_MajorVersion "0.26"
#define Module_Version 26
#define Module_MajorVersion "0.27"
#define Module_Version 27
#define Module_MinorVersion ""
#define Module_Date "29 Mar 2018"
#define Module_Date "02 Jun 2018"
#define Module_ApplicationDate "29-Mar-18"
#define Module_ApplicationDate "02-Jun-18"
#define Module_ComponentName "XHCIDriver"
#define Module_ComponentPath "mixed/RiscOS/Sources/HWSupport/USB/Controllers/XHCIDriver"
#define Module_FullVersion "0.26"
#define Module_HelpVersion "0.26 (29 Mar 2018)"
#define Module_LibraryVersionInfo "0:26"
#define Module_FullVersion "0.27"
#define Module_HelpVersion "0.27 (02 Jun 2018)"
#define Module_LibraryVersionInfo "0:27"
......@@ -230,10 +230,16 @@ _kernel_oserror *xhcidriver_init(const char *cmd_tail, int podule_base, void *pw
{
_kernel_oserror *err;
g_pw = pw;
g_instance = (uint32_t)podule_base;
#ifndef ROM
/* Register the messages for RAM based modules */
err = _swix(ResourceFS_RegisterFiles, _IN(0), Resources());
if (err != NULL) return err;
/* Register the messages in the base instance for RAM modules */
if (g_instance == 0)
{
err = _swix(ResourceFS_RegisterFiles, _IN(0), Resources());
if (err != NULL) return err;
}
#endif
/* Try open, report fail */
err = _swix(MessageTrans_OpenFile, _INR(0,2), g_msgblock, Module_MessagesFile, 0);
......@@ -242,8 +248,6 @@ _kernel_oserror *xhcidriver_init(const char *cmd_tail, int podule_base, void *pw
/* Open the debug if compiled in */
debug_initialise(Module_Title, "", "");
debug_set_device(PRINTF_OUTPUT);
g_pw = pw;
g_instance = (uint32_t)podule_base;
/* Get the memory barriers for DMA related sync */
err = _swix(OS_MMUControl, _IN(0) | _OUT(0),
......@@ -315,7 +319,7 @@ initclose:
_swix(MessageTrans_CloseFile, _IN(0), g_msgblock);
initdereg:
#ifndef ROM
_swix(ResourceFS_DeregisterFiles, _IN(0), Resources());
if (g_instance == 0) _swix(ResourceFS_DeregisterFiles, _IN(0), Resources());
#endif
return err;
}
......@@ -336,7 +340,7 @@ _kernel_oserror *xhcidriver_final(int fatal, int podule, void *pw)
if (magic != NULL) _swix(OS_Module, _IN(0) | _IN(2), ModHandReason_Free, magic);
_swix(MessageTrans_CloseFile, _IN(0), g_msgblock);
#ifndef ROM
_swix(ResourceFS_DeregisterFiles, _IN(0), Resources());
if (g_instance == 0) _swix(ResourceFS_DeregisterFiles, _IN(0), Resources());
#endif
UNUSED(fatal);
......
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