Commit 976d3bf5 authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Probe earlier, declare device later

Revision 0.87 moved the NVMemory probe too late for the kernel, which fell back to using its default table.
Fixes problem of apparently lost configuration
  http://www.riscosopen.org/forum/forums/4/topics/2063
Video_Init capitalised like the other initialisation functions.

Version 0.88. Tagged as 'OMAP3-0_88'
parent 014137bf
...@@ -11,13 +11,13 @@ ...@@ -11,13 +11,13 @@
GBLS Module_HelpVersion GBLS Module_HelpVersion
GBLS Module_ComponentName GBLS Module_ComponentName
GBLS Module_ComponentPath GBLS Module_ComponentPath
Module_MajorVersion SETS "0.87" Module_MajorVersion SETS "0.88"
Module_Version SETA 87 Module_Version SETA 88
Module_MinorVersion SETS "" Module_MinorVersion SETS ""
Module_Date SETS "15 Aug 2013" Module_Date SETS "17 Aug 2013"
Module_ApplicationDate SETS "15-Aug-13" Module_ApplicationDate SETS "17-Aug-13"
Module_ComponentName SETS "OMAP3" Module_ComponentName SETS "OMAP3"
Module_ComponentPath SETS "castle/RiscOS/Sources/HAL/OMAP3" Module_ComponentPath SETS "castle/RiscOS/Sources/HAL/OMAP3"
Module_FullVersion SETS "0.87" Module_FullVersion SETS "0.88"
Module_HelpVersion SETS "0.87 (15 Aug 2013)" Module_HelpVersion SETS "0.88 (17 Aug 2013)"
END END
/* (0.87) /* (0.88)
* *
* This file is automatically maintained by srccommit, do not edit manually. * This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1. * Last processed by srccommit version: 1.1.
* *
*/ */
#define Module_MajorVersion_CMHG 0.87 #define Module_MajorVersion_CMHG 0.88
#define Module_MinorVersion_CMHG #define Module_MinorVersion_CMHG
#define Module_Date_CMHG 15 Aug 2013 #define Module_Date_CMHG 17 Aug 2013
#define Module_MajorVersion "0.87" #define Module_MajorVersion "0.88"
#define Module_Version 87 #define Module_Version 88
#define Module_MinorVersion "" #define Module_MinorVersion ""
#define Module_Date "15 Aug 2013" #define Module_Date "17 Aug 2013"
#define Module_ApplicationDate "15-Aug-13" #define Module_ApplicationDate "17-Aug-13"
#define Module_ComponentName "OMAP3" #define Module_ComponentName "OMAP3"
#define Module_ComponentPath "castle/RiscOS/Sources/HAL/OMAP3" #define Module_ComponentPath "castle/RiscOS/Sources/HAL/OMAP3"
#define Module_FullVersion "0.87" #define Module_FullVersion "0.88"
#define Module_HelpVersion "0.87 (15 Aug 2013)" #define Module_HelpVersion "0.88 (17 Aug 2013)"
#define Module_LibraryVersionInfo "0:87" #define Module_LibraryVersionInfo "0:88"
...@@ -155,7 +155,7 @@ HALdescriptor DATA ...@@ -155,7 +155,7 @@ HALdescriptor DATA
DCD HAL_Null - HAL_EntryTable DCD HAL_Null - HAL_EntryTable
MEND MEND
IMPORT Video_init IMPORT Video_Init
IMPORT Interrupt_Init IMPORT Interrupt_Init
IMPORT Timer_Init IMPORT Timer_Init
IMPORT PRCM_SetClocks IMPORT PRCM_SetClocks
...@@ -176,6 +176,7 @@ HALdescriptor DATA ...@@ -176,6 +176,7 @@ HALdescriptor DATA
IMPORT GPIO_InitDevice IMPORT GPIO_InitDevice
IMPORT SDIO_InitDevices IMPORT SDIO_InitDevices
IMPORT NVMemory_Init IMPORT NVMemory_Init
IMPORT NVMemory_InitDevice
IMPORT TPS_Init IMPORT TPS_Init
IMPORT PandoraKB_Init IMPORT PandoraKB_Init
IMPORT Enable_main_battery_charging IMPORT Enable_main_battery_charging
...@@ -595,15 +596,20 @@ Board_Init_IGEPv2 ...@@ -595,15 +596,20 @@ Board_Init_IGEPv2
BL CPUClk_PreInit ; Go fast! BL CPUClk_PreInit ; Go fast!
[ MoreDebug [ MoreDebug
DebugTX "Video_init" DebugTX "Video_Init"
] ]
BL Video_init ; Uses GPTIMER2 BL Video_Init ; Uses GPTIMER2
[ MoreDebug [ MoreDebug
DebugTX "USB_Init" DebugTX "USB_Init"
] ]
BL USB_Init ; Uses GPTIMER2 BL USB_Init ; Uses GPTIMER2
[ MoreDebug
DebugTX "NVMemory_Init"
]
BL NVMemory_Init
[ MoreDebug [ MoreDebug
DebugTX "Timer_Init" DebugTX "Timer_Init"
] ]
...@@ -902,7 +908,7 @@ HAL_InitDevices ...@@ -902,7 +908,7 @@ HAL_InitDevices
DebugTime a1, "HAL_InitDevices @ " DebugTime a1, "HAL_InitDevices @ "
; Common HAL devices ; Common HAL devices
BL CPUClk_Init BL CPUClk_Init
BL NVMemory_Init BL NVMemory_InitDevice
BL RTC_Init BL RTC_Init
BL SDMA_Init BL SDMA_Init
BL VideoDevice_Init BL VideoDevice_Init
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
AREA |Asm$$Code|, CODE, READONLY, PIC AREA |Asm$$Code|, CODE, READONLY, PIC
EXPORT NVMemory_Init EXPORT NVMemory_Init
EXPORT NVMemory_InitDevice
EXPORT HAL_NVMemoryType EXPORT HAL_NVMemoryType
EXPORT HAL_NVMemorySize EXPORT HAL_NVMemorySize
EXPORT HAL_NVMemoryPageSize EXPORT HAL_NVMemoryPageSize
...@@ -300,11 +301,6 @@ NVMemory_Init ...@@ -300,11 +301,6 @@ NVMemory_Init
BNE %BT45 BNE %BT45
50 50
] ]
; If some was found, create a placeholder HAL device
LDR a1, NVMemoryFound
TEQ a1, #0
BLNE NVMemory_AddDevice
Pull "v1-v3, pc" Pull "v1-v3, pc"
NVMemory_Barrel16 NVMemory_Barrel16
...@@ -330,13 +326,16 @@ NVMemory_Barrel16 ...@@ -330,13 +326,16 @@ NVMemory_Barrel16
Pull "v1-v2, pc" Pull "v1-v2, pc"
NVMemory_AddDevice NVMemory_InitDevice
; void NVMemory_AddDevice(uint32_t bytesize) ; void NVMemory_InitDevice(void)
Push "a1, lr" LDR a3, NVMemoryFound
TEQ a3, #0
MOVEQ pc, lr
Push "a3, lr"
; Copy over template ; Copy over template
ADRL a1, NVRAMWS ADRL a1, NVRAMWS
ADR a2, NVMemory_AddDevice_Template ADR a2, NVMemory_Device_Template
MOV a3, #HALDeviceSize MOV a3, #HALDeviceSize
BL memcpy BL memcpy
...@@ -346,12 +345,12 @@ NVMemory_AddDevice ...@@ -346,12 +345,12 @@ NVMemory_AddDevice
CLZ a1, a3 CLZ a1, a3
RSB a1, a1, #31 - 8 RSB a1, a1, #31 - 8
ADR a4, NVMemory_AddDevice_IDs ADR a4, NVMemory_Device_IDs
MOV a3, a1, LSL #1 MOV a3, a1, LSL #1
LDRH a3, [a4, a3] LDRH a3, [a4, a3]
STRH a3, [a2, #HALDevice_ID] STRH a3, [a2, #HALDevice_ID]
ADR a4, NVMemory_AddDevice_Descs ADR a4, NVMemory_Device_Descs
MOV a3, #1 + :LEN:"24Cxx EEPROM" MOV a3, #1 + :LEN:"24Cxx EEPROM"
MLA a3, a3, a1, a4 MLA a3, a3, a1, a4
STR a3, [a2, #HALDevice_Description] STR a3, [a2, #HALDevice_Description]
...@@ -360,7 +359,7 @@ NVMemory_AddDevice ...@@ -360,7 +359,7 @@ NVMemory_AddDevice
MOV a1, #0 MOV a1, #0
LDR pc, OSentries + 4*OS_AddDevice LDR pc, OSentries + 4*OS_AddDevice
NVMemory_AddDevice_Template NVMemory_Device_Template
DCW HALDeviceType_SysPeri + HALDeviceSysPeri_NVRAM DCW HALDeviceType_SysPeri + HALDeviceSysPeri_NVRAM
DCW &1234 ; ID filled at runtime DCW &1234 ; ID filled at runtime
DCD HALDeviceBus_Ser + HALDeviceSerBus_IIC DCD HALDeviceBus_Ser + HALDeviceSerBus_IIC
...@@ -368,29 +367,29 @@ NVMemory_AddDevice_Template ...@@ -368,29 +367,29 @@ NVMemory_AddDevice_Template
DCD &12345678 ; Description filled at runtime DCD &12345678 ; Description filled at runtime
DCD 0 ; Address - N/A DCD 0 ; Address - N/A
% 12 ; Reserved % 12 ; Reserved
DCD NVMemory_AddDevice_Activate DCD NVMemory_Device_Activate
DCD NVMemory_AddDevice_Deactivate DCD NVMemory_Device_Deactivate
DCD NVMemory_AddDevice_Reset DCD NVMemory_Device_Reset
DCD NVMemory_AddDevice_Sleep DCD NVMemory_Device_Sleep
DCD -1 DCD -1
DCD 0 DCD 0
% 8 % 8
ASSERT (. - NVMemory_AddDevice_Template) = HALDeviceSize ASSERT (. - NVMemory_Device_Template) = HALDeviceSize
NVMemory_AddDevice_Activate NVMemory_Device_Activate
MOV a1, #1 MOV a1, #1
MOV pc, lr MOV pc, lr
NVMemory_AddDevice_Sleep NVMemory_Device_Sleep
MOV a1, #0 MOV a1, #0
NVMemory_AddDevice_Deactivate NVMemory_Device_Deactivate
NVMemory_AddDevice_Reset NVMemory_Device_Reset
MOV pc, lr MOV pc, lr
NVMemory_AddDevice_IDs NVMemory_Device_IDs
DCW HALDeviceID_NVRAM_24C02 DCW HALDeviceID_NVRAM_24C02
DCW HALDeviceID_NVRAM_24C04 DCW HALDeviceID_NVRAM_24C04
DCW HALDeviceID_NVRAM_24C08 DCW HALDeviceID_NVRAM_24C08
DCW HALDeviceID_NVRAM_24C16 DCW HALDeviceID_NVRAM_24C16
NVMemory_AddDevice_Descs NVMemory_Device_Descs
DCB "24C02 EEPROM", 0 DCB "24C02 EEPROM", 0
DCB "24C04 EEPROM", 0 DCB "24C04 EEPROM", 0
DCB "24C08 EEPROM", 0 DCB "24C08 EEPROM", 0
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
AREA |Asm$$Code|, CODE, READONLY, PIC AREA |Asm$$Code|, CODE, READONLY, PIC
EXPORT Video_init
EXPORT HAL_VideoFlybackDevice EXPORT HAL_VideoFlybackDevice
EXPORT HAL_VideoSetMode EXPORT HAL_VideoSetMode
EXPORT HAL_VideoWritePaletteEntry EXPORT HAL_VideoWritePaletteEntry
...@@ -51,6 +50,7 @@ ...@@ -51,6 +50,7 @@
EXPORT HAL_VideoBufferAlignment EXPORT HAL_VideoBufferAlignment
EXPORT HAL_VideoOutputFormat EXPORT HAL_VideoOutputFormat
EXPORT Video_Init
EXPORT VideoDevice_Init EXPORT VideoDevice_Init
EXPORT Video_Power_VBC_DVI EXPORT Video_Power_VBC_DVI
EXPORT Video_Power_VBC_Pandora EXPORT Video_Power_VBC_Pandora
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
LDR pc, OSentries + 4*$entry LDR pc, OSentries + 4*$entry
MEND MEND
Video_init Video_Init
; Configure GPIO pins so we can turn the DVI framer on/off ; Configure GPIO pins so we can turn the DVI framer on/off
LDRB a1, [sb, #BoardConfig_VideoGPIO] LDRB a1, [sb, #BoardConfig_VideoGPIO]
CMP a1, #255 CMP a1, #255
......
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