Commit c6cbb401 authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Export USBDriver definitions to normal location

USBDriver was not exporting its SWI (and other) definitions to the export directory like other modules do, meaning the host controller drivers all have to reach into this component to get their hands on it.
Makefile:
  Export an assembler header, conversion to C, and SWI definitions from CMHG.
  Rationalise the dev/usb/h/* headers which are exported in addition to those that are pertinent to host controllers (was missing usbdivar, and was exporting unused usbdi_util).
  Export machine/h/bus too.
  As it's unusual for a CModule to output both a library and module and headers, the EXPDIR has been divided into EXPLIBDIR for those things in C:USB, and EXPDIR for the others.
ehcimodule.c/ohcimodule.c:
  Use the exported USBDriver.h

Version 0.98. Tagged as 'NetBSD-0_98'
parent f42c7dcf
/* (0.97)
/* (0.98)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 0.97
#define Module_MajorVersion_CMHG 0.98
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 14 Aug 2015
#define Module_Date_CMHG 21 Aug 2015
#define Module_MajorVersion "0.97"
#define Module_Version 97
#define Module_MajorVersion "0.98"
#define Module_Version 98
#define Module_MinorVersion ""
#define Module_Date "14 Aug 2015"
#define Module_Date "21 Aug 2015"
#define Module_ApplicationDate "14-Aug-15"
#define Module_ApplicationDate "21-Aug-15"
#define Module_ComponentName "NetBSD"
#define Module_ComponentPath "mixed/RiscOS/Sources/HWSupport/USB/NetBSD"
#define Module_FullVersion "0.97"
#define Module_HelpVersion "0.97 (14 Aug 2015)"
#define Module_LibraryVersionInfo "0:97"
#define Module_FullVersion "0.98"
#define Module_HelpVersion "0.98 (21 Aug 2015)"
#define Module_LibraryVersionInfo "0:98"
; Copyright 2015 Castle Technology Ltd
;
; Licensed under the Apache License, Version 2.0 (the "License");
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
; http://www.apache.org/licenses/LICENSE-2.0
;
; Unless required by applicable law or agreed to in writing, software
; distributed under the License is distributed on an "AS IS" BASIS,
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; See the License for the specific language governing permissions and
; limitations under the License.
;
SUBT Exported USBDriver constants
OldOpt SETA {OPT}
OPT OptNoList+OptNoP1List
SWIClass SETS USBDriverSWI_Name
^ USBDriverSWI_Base
AddSWI USBDriver_RegisterBus
AddSWI USBDriver_DeRegisterBus
AddSWI USBDriver_InsertTransfer
AddSWI USBDriver_TransferComplete
AddSWI USBDriver_ScheduleSoftInterrupt
AddSWI USBDriver_Version
OPT OldOpt
END
......@@ -77,7 +77,7 @@ include CModule
CFLAGS += -wp -wc
LDFLAGS += -LIST maps.${TARGET} -MAP -Xref -Symbols rm.sym${TARGET}
DBG_LIBS += ${NET5LIBS}
EXPDIR = <Lib$Dir>.USB
EXPLIBDIR = <Lib$Dir>.USB
#
# HAL library rules
......@@ -117,23 +117,35 @@ ${DIRS}::
export: export_${PHASE}
@${NOP}
export_libs: ${EXPDIR}.o.${COMPONENT}
export_libs: ${EXPLIBDIR}.o.${COMPONENT}
@echo ${COMPONENT}: library export complete
export_hdrs: ^.dev.usb.h.usbdevs
${MKDIR} ${EXPDIR}.dev.usb.h
${MKDIR} ${EXPDIR}.h
${MKDIR} ${EXPDIR}.sys.h
${MKDIR} ${EXPDIR}.Hdr
${CP} ^.dev.usb.h.usb ${EXPDIR}.dev.usb.h.usb ${CPFLAGS}
${CP} ^.dev.usb.h.usbdevs ${EXPDIR}.dev.usb.h.usbdevs ${CPFLAGS}
${CP} ^.dev.usb.h.usbdi ${EXPDIR}.dev.usb.h.usbdi ${CPFLAGS}
${CP} ^.dev.usb.h.usbdi_util ${EXPDIR}.dev.usb.h.usbdi_util ${CPFLAGS}
${CP} ^.dev.usb.h.usb_port ${EXPDIR}.dev.usb.h.usb_port ${CPFLAGS}
${CP} h.USBDevFS ${EXPDIR}.h.USBDevFS ${CPFLAGS}
${CP} ^.sys.h.device ${EXPDIR}.sys.h.device ${CPFLAGS}
${CP} ^.VersionNum ${EXPDIR}.LibVersion ${CPFLAGS}
${CP} Hdr.usbhal ${EXPDIR}.Hdr.usbhal ${CPFLAGS}
export_hdrs: h.${CMHGFILE} ^.dev.usb.h.usbdevs
${MKDIR} o
${MKDIR} ${EXPLIBDIR}.dev.usb.h
${MKDIR} ${EXPLIBDIR}.sys.h
${MKDIR} ${EXPLIBDIR}.machine.h
${MKDIR} ${EXPLIBDIR}.h
${MKDIR} ${EXPLIBDIR}.Hdr
# DeviceFS/Service call interface
${CP} h.USBDevFS ${EXPLIBDIR}.h.USBDevFS ${CPFLAGS}
# Host driver interface
${CP} ^.dev.usb.h.usb ${EXPLIBDIR}.dev.usb.h.usb ${CPFLAGS}
${CP} ^.dev.usb.h.usbdi ${EXPLIBDIR}.dev.usb.h.usbdi ${CPFLAGS}
${CP} ^.dev.usb.h.usbdivar ${EXPLIBDIR}.dev.usb.h.usbdivar ${CPFLAGS}
${CP} ^.dev.usb.h.usb_port ${EXPLIBDIR}.dev.usb.h.usb_port ${CPFLAGS}
${CP} ^.sys.h.device ${EXPLIBDIR}.sys.h.device ${CPFLAGS}
${CP} ^.machine.h.bus ${EXPLIBDIR}.machine.h.bus ${CPFLAGS}
${CP} ^.VersionNum ${EXPLIBDIR}.LibVersion ${CPFLAGS}
# Workspace size for HAL allocation (only)
${CP} Hdr.usbhal ${EXPLIBDIR}.Hdr.usbhal ${CPFLAGS}
# Conversion of the USB device database
${CP} ^.dev.usb.h.usbdevs ${EXPLIBDIR}.dev.usb.h.usbdevs ${CPFLAGS}
# Equivalent of ASMHDRS and ASMCHDRS and CMHGAUTOHDR
${CP} Hdr.USBDriver ${EXP_HDR}.USBDriver ${CPFLAGS}
${HDR2H} Hdr.USBDriver ${C_EXP_HDR}.USBDriver
${DO} ${AWK} -- "/.ifndef ${CMHGFILE_SWIPREFIX}/,/endif/" h.${CMHGFILE} > o._h_USBDriver
${FAPPEND} ${C_EXP_HDR}.USBDriver ${C_EXP_HDR}.USBDriver o._h_USBDriver
@echo ${COMPONENT}: header export complete
resources: resources_${COMPONENT}
......@@ -163,8 +175,8 @@ resources_USBDriver: LocalRes:USBDriver ${DEVICELIST}
^.dev.usb.h.usbdevs ^.dev.usb.h.usbdevs_data: ^.dev.usb.usbdevs ^.dev.usb.devlist2h/awk
${GAWK} -v os="${UNAME} -s" -f ^.dev.usb.devlist2h/awk ^.dev.usb.usbdevs
${EXPDIR}.o.${COMPONENT}: ${OBJS_HAL} ${DIRS}
${MKDIR} ${EXPDIR}.o
${EXPLIBDIR}.o.${COMPONENT}: ${OBJS_HAL} ${DIRS}
${MKDIR} ${EXPLIBDIR}.o
${AR} ${ARFLAGS} $@ ${OBJS_HAL}
${MERGEDRDIR}.${COMPONENT}Msgs: ${MSGS_ORIGIN}
......@@ -175,5 +187,4 @@ ${MERGEDRDIR}.${COMPONENT}Msgs: ${MSGS_ORIGIN}
o.${COMPONENT}Res od.${COMPONENT}Res: ${MERGEDRDIR}.${COMPONENT}Msgs ${DIRS}
${RESGEN} ${RES_AREA} $@ ${MERGEDRDIR}.${COMPONENT}Msgs ${RES_PATH}
# Dynamic dependencies:
......@@ -13,7 +13,6 @@
* limitations under the License.
*/
#include "ehcimodhead.h"
#include "USBDriver.h"
#include "swis.h"
#include <string.h>
#include <stdlib.h>
......@@ -34,6 +33,7 @@
#include "Global/Services.h"
#include "Global/HALEntries.h"
#include "Interface/PCI.h"
#include "Interface/USBDriver.h"
#include "callx/callx.h"
/* Have to avoid including stdio as there's a clash with the BSD stuff */
......
......@@ -33,6 +33,7 @@
#include "Global/HALEntries.h"
#include "Global/OsBytes.h"
#include "Interface/PCI.h"
#include "Interface/USBDriver.h"
#include "callx/callx.h"
#include "toolbox.h"
......@@ -40,7 +41,6 @@
#define __stdio_h
#include "ohcimodhead.h"
#include "USBDriver.h"
#include "DebugLib/DebugLib.h"
#include "USBDevFS.h"
......
/* Copyright 2003 Tematic Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#define USBDriver_00 0x054a40
#define USBDriver_RegisterBus 0x054a40
#define USBDriver_DeRegisterBus 0x054a41
#define USBDriver_InsertTransfer 0x054a42
#define USBDriver_TransferComplete 0x054a43
#define USBDriver_ScheduleSoftInterrupt 0x054a44
#define USBDriver_Version 0x054a45
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