Commit 99a3529d authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Determine need for IRQ delay at runtime, not with StrongARM switch.

Resolve deprecated pop instruction.

Version 0.44. Tagged as 'Serial-0_44'
parent 2a06fbd9
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "0.43"
Module_Version SETA 43
Module_MajorVersion SETS "0.44"
Module_Version SETA 44
Module_MinorVersion SETS ""
Module_Date SETS "18 Jul 2011"
Module_ApplicationDate SETS "18-Jul-11"
Module_Date SETS "26 Nov 2011"
Module_ApplicationDate SETS "26-Nov-11"
Module_ComponentName SETS "Serial"
Module_ComponentPath SETS "castle/RiscOS/Sources/HWSupport/Serial"
Module_FullVersion SETS "0.43"
Module_HelpVersion SETS "0.43 (18 Jul 2011)"
Module_FullVersion SETS "0.44"
Module_HelpVersion SETS "0.44 (26 Nov 2011)"
END
/* (0.43)
/* (0.44)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 0.43
#define Module_MajorVersion_CMHG 0.44
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 18 Jul 2011
#define Module_Date_CMHG 26 Nov 2011
#define Module_MajorVersion "0.43"
#define Module_Version 43
#define Module_MajorVersion "0.44"
#define Module_Version 44
#define Module_MinorVersion ""
#define Module_Date "18 Jul 2011"
#define Module_Date "26 Nov 2011"
#define Module_ApplicationDate "18-Jul-11"
#define Module_ApplicationDate "26-Nov-11"
#define Module_ComponentName "Serial"
#define Module_ComponentPath "castle/RiscOS/Sources/HWSupport/Serial"
#define Module_FullVersion "0.43"
#define Module_HelpVersion "0.43 (18 Jul 2011)"
#define Module_LibraryVersionInfo "0:43"
#define Module_FullVersion "0.44"
#define Module_HelpVersion "0.44 (26 Nov 2011)"
#define Module_LibraryVersionInfo "0:44"
......@@ -50,6 +50,8 @@ PutCharOutputFileHandle # 4 ; = file handle for putchar stream (0 i
HWAddress # 4 ; = address of controller
WaitForIRQsToFire # 4 ; -> routine to allow pending IRQs to fire
; now some power control variables (only valid on machines with 82C710/711)
portable_present # 4 ; = 0 if we don't think the Portable module is present
......@@ -132,7 +134,6 @@ printertype = "Set PrinterType$2 devices#buffer3:$."
devicename = "Serial", 0
[ international
! 0, "Internationalised"
resource_file = "Resources:$.Resources.Serial.Messages", 0
]
ALIGN
......@@ -216,6 +217,11 @@ init Entry
STR r0, InputBufferHandle
STR r0, OutputBufferHandle
MOV r0, #0 :OR: 1 ; Read feature flags and address of IRQ delay routine too
MOV r1, #0 ; In case of unknown SWI error
SWI XOS_PlatformFeatures
STR r1, WaitForIRQsToFire
MOV r0, #2 ; =2, read machine hardware type
SWI XOS_ReadSysInfo
EXIT VS ; return if it went wrong!!!
......@@ -481,10 +487,9 @@ serviceentry LDR wp, [wp]
MOV r0, #0 ; our file handle is not in use any more
STR r0, PutCharOutputFileHandle ; so zero it
STR r0, [sp, #1*4] ; indicate we've closed it on exit too
SWI XOS_Find ; close file, ignore errors
MOV r1, #0 ; indicate we've closed it
Pull "r0,lr,pc" ; restore r0, junk r1 and exit
Pull "r0-r1,pc"
20
[ standalonemessages
......
......@@ -129,7 +129,6 @@
GET Hdr:FSNumbers
GET Hdr:HighFSI
GET Hdr:NewErrors
; GET Hdr:NewSpace
GET Hdr:DevNos
GET Hdr:Services
GET Hdr:Symbols
......@@ -141,7 +140,6 @@
GET Hdr:Serial
GET Hdr:RS423
GET Hdr:Buffer
; GET Hdr:IOEB
$GetIO
GET Hdr:IO.IOEB
GET Hdr:MsgTrans
......@@ -221,10 +219,6 @@ close SETD false ; debugging stream closing
GET Init.s
GET Common.s
GBLL StrongARM
StrongARM SETL {TRUE}
GBLS getaroundaasm
[ OldHardware
getaroundaasm SETS "GET s.Serial6551"
......
......@@ -140,7 +140,7 @@ serial1_bit * 8
; call with r1..r7 containing parameters.
;
; With bit 31 set then r2 is a pointer to a command block containing the
; relevant parameters. This is mainly to save lots of fafing around in
; relevant parameters. This is mainly to save lots of faffing around in
; the support module and moving registers about.
;
......@@ -1106,7 +1106,7 @@ break710 EntryS "r0, r11"
;
;
nobreak710 Entry "r0,r7,r11"
nobreak710 Entry "r0,r6-r7,r11"
BL SetPower_On
......@@ -1124,6 +1124,7 @@ nobreak710 Entry "r0,r7,r11"
]
LDR r11, HWAddress
LDR r6, WaitForIRQsToFire
LDR r0, SerialDeviceFlags
ORR r0, r0, #1:SHL:SF_StoppingBreak ; indicate that we wish to stop break
......@@ -1143,20 +1144,15 @@ nobreak710 Entry "r0,r7,r11"
15
TST r0, #LS_TXShiftEmpty
BNE %FT20 ; transmitter has finished shifting, so can clear break bit
[ No32bitCode
TEQP lr, pc ; restore IRQ state for a bit
|
MSR CPSR_c, r7 ; restore IRQ state for a bit
]
[ StrongARM
;StrongARM core will not see interrupt unless disable is cleared for at least 5 cycles,
;in order to fill synchroniser pipe
NOP
NOP
NOP
NOP
NOP
]
TEQ r6, #0
MOVNE lr, pc
MOVNE pc, r6 ; if needed do enough of a delay interrupts to occur
[ No32bitCode
TEQP lr, pc ; then disable them again
|
......
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