Commit 7187c33d authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Don't bother providing even dummy implementations of USB port and overcurrent functions

As the flag bit in HAL_USBControllerInfo isn't set, no need to provide them.
Use symbols from Hdr:HALEntries when building the USB info.
No need for AASMFLAGS in the makefile.
Built, but not tested.

Version 0.37. Tagged as 'OMAP4-0_37'
parent b619bcbf
......@@ -26,15 +26,13 @@ CUSTOMRES = custom
CUSTOMROM = custom
ROM_TARGET = custom
LNK_TARGET = custom
AIFDBG = aif._OMAP4
AIFDBG = aif._${TARGET}
GPADBG = gpa.GPA
include StdTools
include CModule
CCFLAGS += -ff -APCS 3/32bit/nofp/noswst
ASFLAGS += -APCS 3/nofp/noswst
AASMFLAGS += -APCS 3/nofp/noswst
ROM_LIBS += ${USBDIR}.o.EHCIDriver ${USBDIR}.o.USBDriver
resources:
......
/* (0.36)
/* (0.37)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 0.36
#define Module_MajorVersion_CMHG 0.37
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 04 Sep 2014
#define Module_Date_CMHG 25 Oct 2014
#define Module_MajorVersion "0.36"
#define Module_Version 36
#define Module_MajorVersion "0.37"
#define Module_Version 37
#define Module_MinorVersion ""
#define Module_Date "04 Sep 2014"
#define Module_Date "25 Oct 2014"
#define Module_ApplicationDate "04-Sep-14"
#define Module_ApplicationDate "25-Oct-14"
#define Module_ComponentName "OMAP4"
#define Module_ComponentPath "castle/RiscOS/Sources/HAL/OMAP4"
#define Module_FullVersion "0.36"
#define Module_HelpVersion "0.36 (04 Sep 2014)"
#define Module_LibraryVersionInfo "0:36"
#define Module_FullVersion "0.37"
#define Module_HelpVersion "0.37 (25 Oct 2014)"
#define Module_LibraryVersionInfo "0:37"
......@@ -22,7 +22,7 @@
GET hdr.I2C
GET hdr.board
GET hdr.SR44x
GET <Lib$Dir>.USB.hdr.usbhal
GET <Lib$$Dir>.USB.hdr.usbhal
GET Hdr:SDHCIDevice
GET Hdr:RTCDevice
GET Hdr:GPIODevice
......
......@@ -16,19 +16,6 @@
[ :LNOT: :DEF: __HAL_USB_HDR__
GBLL __HAL_USB_HDR__
; usbinfo struct
^ 0
USBINFO_TYPE # 4 ; 0=OHCI, 1=EHCI, 2=MUSBMHDRC
USBINFO_FLAGS # 4 ; See below
USBINFO_HW # 4 ; EHCI/OHCI base addr
USBINFO_DEVNO # 4 ; IRQ number
USBINFO_SIZEOF # 0 ; Size of struct
USBINFO_FLAG_HAL_USBPortPower * 1 ; Use HAL_USBPortPower
USBINFO_FLAG_HAL_USBPortStatus * 2 ; Use HAL_USBPortStatus
USBINFO_FLAG_HAL_USBPortIRQ * 4 ; Use HAL_USBPortIRQ
USBINFO_FLAG_32bit_Regs * 8 ; Must use 32bit access for all registers
; USBTLL registers - relative to L4_USBTLL
USBTLL_REVISION * &0000
......
......@@ -244,9 +244,6 @@ HALdescriptor DATA
IMPORT HAL_KbdScanInterrupt
IMPORT HAL_USBControllerInfo
IMPORT HAL_USBPortPower
IMPORT HAL_USBPortStatus
IMPORT HAL_USBPortIRQ
HAL_EntryTable DATA
HALEntry HAL_Init
......@@ -378,11 +375,11 @@ HAL_EntryTable DATA
HALEntry HAL_IRQMax
NullEntry ;HALEntry HAL_VideoRender
NullEntry ; HAL_VideoRender
HALEntry HAL_USBPortPower
HALEntry HAL_USBPortStatus
HALEntry HAL_USBPortIRQ
NullEntry ; HAL_USBPortPower
NullEntry ; HAL_USBPortStatus
NullEntry ; HAL_USBPortDevice
HALEntry HAL_VideoIICOp
......
......@@ -36,9 +36,6 @@
EXPORT USB_Init
EXPORT HAL_USBControllerInfo
EXPORT HAL_USBPortPower
EXPORT HAL_USBPortStatus
EXPORT HAL_USBPortIRQ
IMPORT HAL_CounterDelay
IMPORT DebugHALPrintReg
......@@ -146,40 +143,32 @@ HAL_USBControllerInfo
BEQ %FT10
; Fill in the usbinfo struct
MOV a1, #HALUSBControllerType_EHCI
STR a1, [a2, #USBINFO_TYPE]
CMP a3, #USBINFO_SIZEOF
MOV a1, #USBINFO_SIZEOF
STR a1, [a2, #HALUSBControllerInfo_Type]
CMP a3, #HALUSBControllerInfo_SizeOf
MOV a1, #HALUSBControllerInfo_SizeOf
MOVLO pc, lr
; EHCI did seem to work OK without forcing 32bit register access,
; but it is technically needed so I'll leave it set.
MOV a4, #USBINFO_FLAG_32bit_Regs
STR a4, [a2, #USBINFO_FLAGS]
MOV a4, #HALUSBControllerFlag_32bit_Regs
STR a4, [a2, #HALUSBControllerInfo_Flags]
LDR a4, L4_USB_Host_Log
ADD a4, a4, #EHCI_BASE
STR a4, [a2, #USBINFO_HW]
STR a4, [a2, #HALUSBControllerInfo_HW]
MOV a4, #EHCI_IRQ
STR a4, [a2, #USBINFO_DEVNO]
STR a4, [a2, #HALUSBControllerInfo_DevNo]
MOV pc, lr
10
MOV a1, #HALUSBControllerType_MUSBMHDRC
STR a1, [a2, #USBINFO_TYPE]
CMP a3, #USBINFO_SIZEOF
MOV a1, #USBINFO_SIZEOF
STR a1, [a2, #HALUSBControllerInfo_Type]
CMP a3, #HALUSBControllerInfo_SizeOf
MOV a1, #HALUSBControllerInfo_SizeOf
MOVLO pc, lr
MOV a4, #0
STR a4, [a2, #USBINFO_FLAGS]
STR a4, [a2, #HALUSBControllerInfo_Flags]
LDR a4, L4_USB_OTG_Log
STR a4, [a2, #USBINFO_HW]
STR a4, [a2, #HALUSBControllerInfo_HW]
MOV a4, #MUSB_IRQ
STR a4, [a2, #USBINFO_DEVNO]
MOV pc, lr
; These are unused for EHCI/MUSB
HAL_USBPortPower
HAL_USBPortStatus
HAL_USBPortIRQ
MOV a1, #-1
STR a4, [a2, #HALUSBControllerInfo_DevNo]
MOV pc, lr
END
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