Commit 2241ad56 authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Post review fixups

Unknown SWIs now return the error with V set rather than calling OS_GenerateError.
A couple of non-X SWIs changed added 'X'.
Use SETV/CLRV now we have sight of central headers to simplify the exit points.
Query use of SWIEQ/SWINE pair.

Version 0.54. Tagged as 'GPIO-0_54'
parent 5c01f74d
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "0.53"
Module_Version SETA 53
Module_MajorVersion SETS "0.54"
Module_Version SETA 54
Module_MinorVersion SETS ""
Module_Date SETS "09 Oct 2014"
Module_ApplicationDate SETS "09-Oct-14"
Module_ComponentName SETS "GPIO"
Module_ComponentPath SETS "bsd/RiscOS/Sources/ThirdParty/TankStage/HWSupport/GPIO"
Module_FullVersion SETS "0.53"
Module_HelpVersion SETS "0.53 (09 Oct 2014)"
Module_FullVersion SETS "0.54"
Module_HelpVersion SETS "0.54 (09 Oct 2014)"
END
/* (0.53)
/* (0.54)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 0.53
#define Module_MajorVersion_CMHG 0.54
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 09 Oct 2014
#define Module_MajorVersion "0.53"
#define Module_Version 53
#define Module_MajorVersion "0.54"
#define Module_Version 54
#define Module_MinorVersion ""
#define Module_Date "09 Oct 2014"
......@@ -18,6 +18,6 @@
#define Module_ComponentName "GPIO"
#define Module_ComponentPath "bsd/RiscOS/Sources/ThirdParty/TankStage/HWSupport/GPIO"
#define Module_FullVersion "0.53"
#define Module_HelpVersion "0.53 (09 Oct 2014)"
#define Module_LibraryVersionInfo "0:53"
#define Module_FullVersion "0.54"
#define Module_HelpVersion "0.54 (09 Oct 2014)"
#define Module_LibraryVersionInfo "0:54"
......@@ -51,9 +51,8 @@ dieerror
;---------------------------------------------
errorcommon
STR r0,[r13,#0] ;change r0 on stack
LDMFD r13!, {r0-r11,r14} ;
MSR CPSR_f,#V_bit ;
MOV pc,r14 ;
SETV
Pull "r0-r11,pc"
;---------------------------------------------
RM_errMesg
DCD Error_block
......@@ -87,6 +86,10 @@ nomachineerror
DCD Error_block+7
DCB "The GPIO module does not support this SOC",0
ALIGN
initerrortick
DCD Error_block+8
DCB "The GPIO module could not claim TickerV",0
ALIGN
;---------------------------------------------
END
......
......@@ -184,10 +184,11 @@ RM_Init
BVS initerror4 ;
STR r3,[r5] ;store logical address
50
MOV r0,#&1C ;ticker
MOV r0,#TickerV
ADRL r1,FlashVector ;
MOV r2,r12 ;
SWI OS_Claim ;
SWI XOS_Claim ;
BVS initerrortick
MOV r0,#1 ;protect i2c
LDR r10,[r12,#machine] ;get board type
......@@ -197,9 +198,9 @@ RM_Init
BLGE Pi_Enable_I2C ;
BLLT Enable_I2C ;
BL get_i2c_info ;get extender info
60 POP {r0-r11,lr} ;
MSR CPSR_f,#0<<V_bit_number ;
MOV pc,lr
60
CLRV
POP {r0-r11,pc} ;
maxRMA DCD RMAlimit
dummy_gpio_table
......
......@@ -37,17 +37,16 @@ RM_Die
PUSH {r0-r11,lr}
LDR r12,[r12]
MOV r0,#&1C ;ticker
MOV r0,#TickerV
ADRL r1,FlashVector ;
MOV r2,r12 ;
SWI OS_Release ;
SWI XOS_Release ;
MOV r0,#ModHandReason_Free ;
MOV r2,r12 ;remove RMA main block
SWI XOS_Module ;
MOVVC r0,#ModHandReason_Free ;
MOVVC r2,r12 ;remove RMA main block
SWIVC XOS_Module ;
BVS dieerror
MSR CPSR_f,#0<<V_bit_number ;
POP {r0-r11,pc}
POP {r0-r11,pc} ;V implicitly clear
;******************************************************************************
......
......@@ -472,10 +472,9 @@ Pi_SWIentry
30
RM_UnknownSWIerror
PUSH {lr}
ADRL r0,RM_errMesg
SWI OS_GenerateError
POP {pc}
SETV
MOV pc,lr
;---------------------------------------------
;Reserved
......
......@@ -284,6 +284,7 @@ i2c_read
MOV r0,r5 ;
ADD r1,r3,#2 ;
CMP r4,#1 ;
! 0, "SWIs corrupt flags, what is the intent here?"
SWIEQ XOS_IICOp ;
SWINE OS_IICOp ;
ADD r1,r12,#i2creturn ;iic return block pointer
......@@ -310,6 +311,7 @@ i2c_write
MOV r0,r5 ;
ADD r1,r3,#1 ;
CMP r4,#1 ;
! 0, "SWIs corrupt flags, what is the intent here?"
SWIEQ XOS_IICOp ;
SWINE OS_IICOp ;
POP {r0-r5,pc}
......
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