Commit 0c6225b5 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.
Built, but not tested.


Version 0.38. Tagged as 'BCM2835-0_38'
parent de83026a
/* (0.37)
/* (0.38)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 0.37
#define Module_MajorVersion_CMHG 0.38
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 09 Oct 2014
#define Module_Date_CMHG 25 Oct 2014
#define Module_MajorVersion "0.37"
#define Module_Version 37
#define Module_MajorVersion "0.38"
#define Module_Version 38
#define Module_MinorVersion ""
#define Module_Date "09 Oct 2014"
#define Module_Date "25 Oct 2014"
#define Module_ApplicationDate "09-Oct-14"
#define Module_ApplicationDate "25-Oct-14"
#define Module_ComponentName "BCM2835"
#define Module_ComponentPath "mixed/RiscOS/Sources/HAL/BCM2835"
#define Module_FullVersion "0.37"
#define Module_HelpVersion "0.37 (09 Oct 2014)"
#define Module_LibraryVersionInfo "0:37"
#define Module_FullVersion "0.38"
#define Module_HelpVersion "0.38 (25 Oct 2014)"
#define Module_LibraryVersionInfo "0:38"
;
; Copyright (c) 2012, RISC OS Open Ltd
; All rights reserved.
;
; Redistribution and use in source and binary forms, with or without
; modification, are permitted provided that the following conditions are met:
; * Redistributions of source code must retain the above copyright
; notice, this list of conditions and the following disclaimer.
; * Redistributions in binary form must reproduce the above copyright
; notice, this list of conditions and the following disclaimer in the
; documentation and/or other materials provided with the distribution.
; * Neither the name of RISC OS Open Ltd nor the names of its contributors
; may be used to endorse or promote products derived from this software
; without specific prior written permission.
;
; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
; ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
; LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
; CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
; ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
; POSSIBILITY OF SUCH DAMAGE.
;
; usbinfo struct
^ 0
USBINFO_TYPE # 4 ; 0=OHCI, 1=EHCI, 2=MUSBMHDRC, 3=Synopsys DWC
USBINFO_FLAGS # 4 ; See below
USBINFO_HW # 4 ; Base addr
USBINFO_DEVNO # 4 ; IRQ number
USBINFO_DMAOFFSET # 4 ; Offset to convert ARM phys addrs to DMA addrs
USBINFO_HW_MPHI # 4 ; MPHI address
USBINFO_DEVNO_MPHI # 4 ; MPHI 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
END
......@@ -118,9 +118,6 @@
IMPORT HAL_KbdScanInterrupt
IMPORT HAL_USBControllerInfo
IMPORT HAL_USBPortPower
IMPORT HAL_USBPortStatus
IMPORT HAL_USBPortIRQ
IMPORT SDIO_InitDevices
......@@ -506,9 +503,9 @@ HAL_EntryTable DATA
NullEntry ; HALEntry HAL_VideoRender
HALEntry HAL_USBPortPower
HALEntry HAL_USBPortStatus
HALEntry HAL_USBPortIRQ
NullEntry ; HAL_USBPortPower
NullEntry ; HAL_USBPortStatus
NullEntry ; HAL_USBPortDevice
NullEntry ; HALEntry HAL_VideoIICOp
......
......@@ -36,12 +36,8 @@
GET Hdr:HALEntries
GET hdr.BCM2835
GET hdr.StaticWS
GET hdr.USB
EXPORT HAL_USBControllerInfo
EXPORT HAL_USBPortPower
EXPORT HAL_USBPortStatus
EXPORT HAL_USBPortIRQ
; a1 = interface #
; a2 = usbinfo ptr
......@@ -54,29 +50,23 @@ HAL_USBControllerInfo
MOVHI pc, lr
; Fill in the usbinfo struct
MOV a1, #HALUSBControllerType_SynopsysDWC
STR a1, [a2, #USBINFO_TYPE]
CMP a3, #USBINFO_SIZEOF
MOV a1, #USBINFO_SIZEOF
STR a1, [a2, #HALUSBControllerInfo_Type]
CMP a3, #HALUSBControllerInfo_SizeOfType3
MOV a1, #HALUSBControllerInfo_SizeOfType3
MOVLO pc, lr
MOV a4, #0 ; flags
STR a4, [a2, #USBINFO_FLAGS]
STR a4, [a2, #HALUSBControllerInfo_Flags]
LDR ip, PeriBase
ADD a4, ip, #USB_Base
STR a4, [a2, #USBINFO_HW]
STR a4, [a2, #HALUSBControllerInfo_HW]
MOV a4, #iDev_GPU_VCUSB
STR a4, [a2, #USBINFO_DEVNO]
STR a4, [a2, #HALUSBControllerInfo_DevNo]
LDR a4, FB_CacheMode
STR a4, [a2, #USBINFO_DMAOFFSET]
STR a4, [a2, #HALUSBControllerInfo_DMAOffset]
ADD a4, ip, #MPHI_Base
STR a4, [a2, #USBINFO_HW_MPHI]
STR a4, [a2, #HALUSBControllerInfo_HW_MPHI]
MOV a4, #iDev_GPU_HostPort
STR a4, [a2, #USBINFO_DEVNO_MPHI]
STR a4, [a2, #HALUSBControllerInfo_DevNo_MPHI]
MOV pc, lr
HAL_USBPortPower
HAL_USBPortStatus
HAL_USBPortIRQ
MOV a1,#-1
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