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

Commit fa6d61cf authored by Jeffrey Lee's avatar Jeffrey Lee

Delete unused code

Detail:
  c/port - Less code, less bugs
Admin:
  Builds, untested


Version 0.26. Tagged as 'MUSBDriver-0_26'
parent 12f81121
/* (0.25)
/* (0.26)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 0.25
#define Module_MajorVersion_CMHG 0.26
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 18 Nov 2015
#define Module_Date_CMHG 26 Mar 2016
#define Module_MajorVersion "0.25"
#define Module_Version 25
#define Module_MajorVersion "0.26"
#define Module_Version 26
#define Module_MinorVersion ""
#define Module_Date "18 Nov 2015"
#define Module_Date "26 Mar 2016"
#define Module_ApplicationDate "18-Nov-15"
#define Module_ApplicationDate "26-Mar-16"
#define Module_ComponentName "MUSBDriver"
#define Module_ComponentPath "mixed/RiscOS/Sources/HWSupport/USB/Controllers/MUSBDriver"
#define Module_FullVersion "0.25"
#define Module_HelpVersion "0.25 (18 Nov 2015)"
#define Module_LibraryVersionInfo "0:25"
#define Module_FullVersion "0.26"
#define Module_HelpVersion "0.26 (26 Mar 2016)"
#define Module_LibraryVersionInfo "0:26"
......@@ -34,10 +34,6 @@ extern int usbdebug;
int total_sleep;
#endif
extern void detach_hub (struct device*);
extern void detach_device (struct device*);
extern uint32_t hal_veneer2(uint32_t (*)(void), void*, ...);
extern uint64_t gettime (void);
......@@ -130,48 +126,6 @@ microtime(struct timeval *thetime)
thetime->tv_usec = (unsigned long) ((t / 1000) % 1000000);
}
void
selrecord(struct proc *selector, struct selinfo *selinfo)
{
dprintf (("Port", "selecting record\n"));
}
void
selwakeup(struct selinfo *selinfo)
{
dprintf (("Port", "selwakeup called\n"));
}
typedef int devclass_t;
typedef int caddr_t;
void*
devclass_get_softc (devclass_t dc, int unit)
{
return 0; /* TODO make this return something that won't make it crash.. */
}
int
config_deactivate (struct device* dev)
{
dprintf (("Port", "deactivating device\n"));
return 0;
}
struct uio;
int
uiomove(caddr_t poo, int wobble, struct uio * fred)
{
dprintf (("Port", "uiomove\n"));
return 0;
}
void
psignal(unsigned sig, const char *s) {
dprintf (("Port", "wow - we've received signal %d: %s\n", sig, s));
}
/*
* Callouts
*/
......@@ -216,25 +170,6 @@ callout_reset (struct callout *c, int i, void (*f)(void *), void *v) {
callx_add_callafter ((i + 9) / 10, callout_handler, c);
}
int kthread_create (void (f) (void*), void* h) {
(void) f;
(void) h;
// dprintf (("Port", "creating thread\n"));
return 0;
}
int kthread_create1 (int (f) (void*), void* a, void* b, char* c, char* d)
{
(void) f;
(void) a;
(void) b;
(void) c;
(void) d;
return 0;
}
void* t_handles[100];
int t_locks[100];
int nhandles = 0;
......@@ -348,76 +283,6 @@ int wakeup (void* ident) {
return 0;
}
void kthread_exit (void) {
// dprintf (("Port", "exit thread\n"));
}
void device_probe_and_attach (void) {
// dprintf (("Port", "probing device\n"));
}
/*
* usbd_ratecheck() can limit the number of error messages that occurs.
* When a device is unplugged it may take up to 0.25s for the hub driver
* to notice it. If the driver continuosly tries to do I/O operations
* this can generate a large number of messages.
*/
int
ratecheck (void* a, void* b)
{
return 0;
}
void* usbd_print;
void* vtophys (void** v)
{
#ifndef EMULATE
struct {
void* page;
void* logical;
void* physical;
} block;
block.logical = v;
_swix (OS_Memory, _INR (0, 2), (1<<9) + (1<<13) + (2<<14), &block, 1);
return block.physical;
#else
// dprintf (("Port", "Converting physical address %p\n", *v));
return v; // return actual address for the moment
#endif
}
void* malloc_contig(int len, int alignment)
{
void* p;
_kernel_oserror* e;
e = _swix(PCI_RAMAlloc, _INR(0,2)|_OUT(0), len, alignment, 0, &p);
if (e || !p)
{
dprintf (("", "failed to allocate %d bytes at %d alignment err = '%s'\n",
len, alignment, e?e->errmess:""));
return NULL;
}
memset(p, 0, len);
return p;
}
void free_contig (void **mem)
{
_swix(PCI_RAMFree, _IN(0), *mem);
}
char*
device_get_nameunit (void)
{
return "OHCI USB device";
}
int min (int a, int b)
{
if (a < b) return a;
......@@ -432,33 +297,6 @@ void logprintf (char* format, ...)
va_end (p);
}
#ifdef USB_USE_SOFTINTR
void* softintr_establish(int pri, void (*f) (void*), void* h)
{
void** p = malloc (3 * sizeof *p);
if (p == NULL) return p;
p[0] = 0;
p[1] = h;
p[2] = (void*) f;
_swix (CBAI_RegisterPollWord, _INR(0, 2), p, pri, private_word);
return p;
}
//void softintr_schedule (void** p)
//{
// dprintf (("", "Setting pollword to %p\n", p[2]));
// p[0] = p[2];
//}
void softintr_disestablish (void* p)
{
_swix (CBAI_DeregisterPollWord, _IN(0), p);
free (p);
}
#endif
void riscos_irqclear(int devno)
{
_swix(OS_Hardware, _IN(0)|_INR(8,9), devno, 0, EntryNo_HAL_IRQClear);
......
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