Commit 21f0aff2 authored by John Ballance's avatar John Ballance
Browse files

Ensure cmos loaded at boot time in iMx6 if module active

Detail:
  Writes were saved to a SD based sector, but not read out at
  module initialisation
Admin:
  (highlight level of testing that has taken place)
  (bugfix number if appropriate)

  (overview of change)
Detail:
  (list files and functions that have changed)
Admin:
  (highlight level of testing that has taken place)
  (bugfix number if appropriate)


Version 0.19. Tagged as 'SDCMOS-0_19'
parent e91f79e2
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "0.18"
Module_Version SETA 18
Module_MajorVersion SETS "0.19"
Module_Version SETA 19
Module_MinorVersion SETS ""
Module_Date SETS "12 Aug 2017"
Module_ApplicationDate SETS "12-Aug-17"
Module_Date SETS "19 Jun 2018"
Module_ApplicationDate SETS "19-Jun-18"
Module_ComponentName SETS "SDCMOS"
Module_ComponentPath SETS "cddl/RiscOS/Sources/HWSupport/SD/SDCMOS"
Module_FullVersion SETS "0.18"
Module_HelpVersion SETS "0.18 (12 Aug 2017)"
Module_FullVersion SETS "0.19"
Module_HelpVersion SETS "0.19 (19 Jun 2018)"
END
/* (0.18)
/* (0.19)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 0.18
#define Module_MajorVersion_CMHG 0.19
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 12 Aug 2017
#define Module_Date_CMHG 19 Jun 2018
#define Module_MajorVersion "0.18"
#define Module_Version 18
#define Module_MajorVersion "0.19"
#define Module_Version 19
#define Module_MinorVersion ""
#define Module_Date "12 Aug 2017"
#define Module_Date "19 Jun 2018"
#define Module_ApplicationDate "12-Aug-17"
#define Module_ApplicationDate "19-Jun-18"
#define Module_ComponentName "SDCMOS"
#define Module_ComponentPath "cddl/RiscOS/Sources/HWSupport/SD/SDCMOS"
#define Module_FullVersion "0.18"
#define Module_HelpVersion "0.18 (12 Aug 2017)"
#define Module_LibraryVersionInfo "0:18"
#define Module_FullVersion "0.19"
#define Module_HelpVersion "0.19 (19 Jun 2018)"
#define Module_LibraryVersionInfo "0:19"
......@@ -145,9 +145,31 @@ CallBackFromInit ROUT
BLVS TryInit
BVS %FT90
]
[ :DEF: StoreAtDiscAddress
; See if a CMOS reset has occurred, if not our copy on the SD card
; is usable, so load cmos from it
; do this before we sit on ByteV and react to CMOS writes
MOV r0, #OsByte_ReadCMOS
MOV r1, #SystemSpeedCMOS
SWI XOS_Byte
MOVVS r2, #0
TST r2, #CMOSResetBit
BNE %ft10 ; CMOS reset
mov r6, #256
sub sp, sp, r6
MOV r1, #1 ; read
LDR r2, =StoreAtDiscAddress
MOV r3, sp
MOV r4, r6
SWI XSDFS_DiscOp
BLVC StackToCMOS
add sp, sp, r6
]
; All good - get on ByteV
MOV r0, #ByteV
10 MOV r0, #ByteV
ADR r1, MyByteV
MOV r2, r12
SWI XOS_Claim
......@@ -371,6 +393,27 @@ CMOSToStack ROUT
CMP r3, r6
BLO %B30
MOV pc, r4
;
StackToCMOS ROUT
MOV r4, lr
; Copy a block on the stack into the CMOS RAM (should be small enough)
; from physical address order
; R6 is byte count to use. Image is at sp to sp+r6-1
MOV r3, #0
31 MOV r0, #OsByte_WriteCMOS
MOV r1, r3
CMP r3, #&10
ADDLO r1, r1, #&40
CMP r3, #&40
ADDLO r1, r1, #&F0
CMP r3, #&100
SUBLO r1, r1, #&40
LDRB r2, [sp, r3]
SWI XOS_Byte
ADD r3, r3, #1
CMP r3, r6
BLO %B31
MOV pc, r4
]
Final ROUT
......
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