GitLab has been upgraded to 13.3.6. If you encounter any issues mail code@riscosopen.org

Commit 8ee45d86 authored by ROOL's avatar ROOL 🤖

Remove some part finished HAL support

Detail:
  A few sections of code guarded by USBHAL defines carried over from MUSBDriver, but were never finished due to the complexity of DWCDriver.
  These are no longer needed now the kernel scans for keys, so remove them.
Admin:
  Couple of warnings in cmodule.c also attended to.
  Submission for USB bounty.

Version 0.32. Tagged as 'DWCDriver-0_32'
parent 8e8a2962
| Copyright 2012 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.
|
Dir <Obey$Dir>
amu_machine export PHASE=hdrs THROWBACK=-throwback
amu_machine export PHASE=libs THROWBACK=-throwback
......@@ -19,12 +19,9 @@
COMPONENT = DWCDriver
RES_AREA = resource_files
OBJS = cmodule call_veneer triggercbs dwc_common_riscos dwc_otg_riscos softc_root softc_device port regaccess
OBJS_HAL = o_hal.musb o_hal.musb_peri o_hal.musb_root o_hal.musb_usb o_hal.musb_util o_hal.tps o_hal.musb_hal
LIBS = ${CALLXLIB} ${ASMUTILS} ${TBOXINTLIB}
CMHGFILE = modhead
HDRS =
USBDIR = <Lib$Dir>.USB
CUSTOMEXP = custom
#
# Debug switch
......@@ -40,9 +37,7 @@ CFLAGS += -wp -wc
CDEFINES += -DKERNEL -D_KERNEL -Dpaddr_t=int -D__P(A)=A -DKLD_MODULE -DDISABLE_PACKED
ROMCDEFINES = -DROM
CINCLUDES = -ITCPIPLibs:,C:USB,OS:
CMHGDEFINES += -DCOMPONENT=${COMPONENT}
CMHGDEPENDS = cmodule dwc_otg_riscos softc_root softc_device
LDFLAGS = -Symbols rm.sym${TARGET}
VPATH = dwc.driver dwc.dwc_common_port
......@@ -57,28 +52,4 @@ CFLAGS += -DBCM2835
include CModule
${DIRS}::
${MKDIR} o_hal
clean::
@IfThere o_hal Then ${ECHO} ${WIPE} o_hal ${WFLAGS}
@IfThere o_hal Then ${WIPE} o_hal ${WFLAGS}
export: export_${PHASE}
export_hdrs:
@${NOP}
export_libs: ${USBDIR}.o.${COMPONENT}
@echo ${COMPONENT}: export complete (libs)
# HAL libraries:
.SUFFIXES: .o_hal
.c.o_hal:; ${CC} -APCS 3/nofp/noswst -wp -ff -DUSBHAL -c -depend !Depend -DKERNEL -D_KERNEL -Dpaddr_t=int -D__P(A)=A -DKLD_MODULE -DDISABLE_PACKED ${CINCLUDES} ${THROWBACK} -o $@ $<
.s.o_hal:; ${AS} ${ASFLAGS} -APCS 3/nofp/noswst -o $@ $<
${USBDIR}.o.${COMPONENT}: ${OBJS_HAL} ${DIRS}
${MKDIR} ${USBDIR}.o
${AR} ${ARFLAGS} ${USBDIR}.o.${COMPONENT} ${OBJS_HAL}
# Dynamic dependencies:
/* (0.31)
/* (0.32)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 0.31
#define Module_MajorVersion_CMHG 0.32
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 19 Aug 2017
#define Module_Date_CMHG 19 Sep 2017
#define Module_MajorVersion "0.31"
#define Module_Version 31
#define Module_MajorVersion "0.32"
#define Module_Version 32
#define Module_MinorVersion ""
#define Module_Date "19 Aug 2017"
#define Module_Date "19 Sep 2017"
#define Module_ApplicationDate "19-Aug-17"
#define Module_ApplicationDate "19-Sep-17"
#define Module_ComponentName "DWCDriver"
#define Module_ComponentPath "mixed/RiscOS/Sources/HWSupport/USB/Controllers/DWCDriver"
#define Module_FullVersion "0.31"
#define Module_HelpVersion "0.31 (19 Aug 2017)"
#define Module_LibraryVersionInfo "0:31"
#define Module_FullVersion "0.32"
#define Module_HelpVersion "0.32 (19 Sep 2017)"
#define Module_LibraryVersionInfo "0:32"
......@@ -178,7 +178,7 @@ static _kernel_oserror* new_instance (_kernel_swi_regs* r, void* pw, void* h)
return NULL;
}
static _kernel_oserror *init_driver()
static _kernel_oserror *init_driver(void)
{
if(driver_init)
return NULL;
......@@ -200,7 +200,7 @@ static _kernel_oserror *init_driver()
return NULL;
}
static void shutdown_driver()
static void shutdown_driver(void)
{
if(!driver_init)
return;
......
......@@ -502,7 +502,7 @@ static struct {
_kernel_oserror *dwc_otg_riscos_init(const uint32_t *hw_base,const uint8_t *mphi_base,int usb_device_number,int mphi_device_number,dwc_softc_t *softc)
{
/* Initialise veneers */
#if defined (__riscos) && !defined(USBHAL)
#ifdef __riscos
if (!veneers_built)
{
build_veneer((int*)&softc_bus_methods_entry, (int*)&softc_bus_methods, sizeof(softc_bus_methods));
......
......@@ -27,9 +27,9 @@ service-call-handler: module_services Service_USB,
Service_ReleaseFIQ,
Service_ResourceFSStarting
title-string: COMPONENT
title-string: Module_ComponentName
help-string: COMPONENT Module_MajorVersion_CMHG
help-string: Module_ComponentName Module_MajorVersion_CMHG
date-string: Module_Date_CMHG
......
......@@ -27,27 +27,15 @@
#define ErrorNumber_DWC_FailStartHCD (ErrorBase_DWCDriver+9)
#define ErrorNumber_DWC_BadDevParms (ErrorBase_DWCDriver+10)
#ifndef USBHAL
extern void* private_word;
extern void build_veneer (int* vn, int* st, size_t sz);
#endif
extern int dma_offset;
extern _kernel_oserror *endpoint_disable_cb(_kernel_swi_regs *r,void *pw,void *handle);
#ifdef USBHAL
/* HAL interface */
extern void USBHAL_MUSBDriver_Init(void);
extern void abort_pipe(void *addr);
#define riscos_abort_pipe(ADDR) USBHAL_AddCallback(abort_pipe,ADDR)
#define riscos_cancel_abort_pipe(ADDR) USBHAL_RemoveCallback(abort_pipe,ADDR)
extern int usbhal_musb_do_intr(struct usbd_bus *,int irqdevno);
extern void usbhal_musb_shutdown(struct usbd_bus *);
#else
extern void riscos_cancel_abort_pipe (void* v);
#endif
#ifdef DEBUGLIB
extern int address_valid(void *addr,int align);
......
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