[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[MiNT] Some FreeMiNT kernel cleanups
Attached.
Alan.
Index: sys/sockets/xif/daynaport/scsidriver.c
===================================================================
RCS file: /mint/freemint/sys/sockets/xif/daynaport/scsidriver.c,v
retrieving revision 1.1
diff -u -r1.1 scsidriver.c
--- sys/sockets/xif/daynaport/scsidriver.c 18 Sep 2007 14:59:21 -0000 1.1
+++ sys/sockets/xif/daynaport/scsidriver.c 27 Jan 2008 22:06:09 -0000
@@ -286,7 +286,7 @@
cmd.CmdLen = 6;
cmd.Buffer = inqdata;
cmd.TransferLen = 32;
- cmd.SenseBuffer = (char *) reqbuff;
+ cmd.SenseBuffer = (BYTE *) reqbuff;
cmd.Timeout = 1 * CLOCKS_PER_SEC;
cmd.Flags = 0;
for (i = 0; i < 5; i++)
Index: sys/sockets/xif/daynaport/scsilink.c
===================================================================
RCS file: /mint/freemint/sys/sockets/xif/daynaport/scsilink.c,v
retrieving revision 1.2
diff -u -r1.2 scsilink.c
--- sys/sockets/xif/daynaport/scsilink.c 22 Jan 2008 10:31:30 -0000 1.2
+++ sys/sockets/xif/daynaport/scsilink.c 27 Jan 2008 22:06:09 -0000
@@ -174,6 +174,7 @@
* *
********************************************************/
+long driver_init(void);
long driver_init(void)
{
char message[200], macaddr[ETH_ALEN];
Index: sys/sockets/xif/daynaport/scsilink_func.c
===================================================================
RCS file: /mint/freemint/sys/sockets/xif/daynaport/scsilink_func.c,v
retrieving revision 1.1
diff -u -r1.1 scsilink_func.c
--- sys/sockets/xif/daynaport/scsilink_func.c 18 Sep 2007 14:59:21 -0000 1.1
+++ sys/sockets/xif/daynaport/scsilink_func.c 27 Jan 2008 22:06:09 -0000
@@ -92,7 +92,7 @@
/*
* globals
*/
-static char *version = "SCSILINK.LIB " VERSION " by Roger Burrows, Anodyne Software";
+// static char *version = "SCSILINK.LIB " VERSION " by Roger Burrows, Anodyne Software";
static long num_devices = 0L; /* count of entries in following table */
static struct {
Index: sys/sockets/xif/ethernat/91c111.c
===================================================================
RCS file: /mint/freemint/sys/sockets/xif/ethernat/91c111.c,v
retrieving revision 1.1
diff -u -r1.1 91c111.c
--- sys/sockets/xif/ethernat/91c111.c 22 Jan 2008 10:23:36 -0000 1.1
+++ sys/sockets/xif/ethernat/91c111.c 27 Jan 2008 22:06:09 -0000
@@ -305,14 +305,3 @@
while (*LANREG_TIMER200 < (timer200Hz + amount));
}
-
-
-
-inline short Eth_set_bank(short bank)
-{
- short tmp;
-
- tmp = ((*LANREG_BANK) >> 8); //bank nr was in upper byte
- *LANREG_BANK = (bank << 8) | 0x33;
- return tmp;
-}
Index: sys/sockets/xif/ethernat/91c111.h
===================================================================
RCS file: /mint/freemint/sys/sockets/xif/ethernat/91c111.h,v
retrieving revision 1.1
diff -u -r1.1 91c111.h
--- sys/sockets/xif/ethernat/91c111.h 22 Jan 2008 10:23:36 -0000 1.1
+++ sys/sockets/xif/ethernat/91c111.h 27 Jan 2008 22:06:09 -0000
@@ -88,6 +88,14 @@
void Eth_reset(void);
short Eth_AutoNeg(long max_wait); // Max wait in ms
void Waitms(long amount);
-inline short Eth_set_bank(short bank); //returns the old bank nr
+
+static inline short Eth_set_bank(short bank)
+{
+ short tmp;
+
+ tmp = ((*(pVUWORD)LANADDR_BANK) >> 8); //bank nr was in upper byte
+ *(pVUWORD)LANADDR_BANK = (bank << 8) | 0x33;
+ return tmp;
+}
#endif /*__91C111_H_*/
Index: sys/sockets/xif/ethernat/ethernat.c
===================================================================
RCS file: /mint/freemint/sys/sockets/xif/ethernat/ethernat.c,v
retrieving revision 1.1
diff -u -r1.1 ethernat.c
--- sys/sockets/xif/ethernat/ethernat.c 22 Jan 2008 10:23:36 -0000 1.1
+++ sys/sockets/xif/ethernat/ethernat.c 27 Jan 2008 22:06:09 -0000
@@ -157,7 +157,7 @@
static volatile int sending = 0;
//handle for all logging
-static ushort loghandle;
+//static ushort loghandle;
//global MAC address in longword format for RX use
@@ -344,7 +344,7 @@
unsigned char littlemem;
// static uchar message[100];
- unsigned long timeval;
+// unsigned long timeval;
// Cconws("Output\n\r"); //debug
@@ -688,7 +688,7 @@
long
driver_init (void)
{
- static char message[100];
+// static char message[100];
//static char eth_fname[128];
long ferror;
@@ -1091,7 +1091,8 @@
ushort fifo_reg;
ushort status, bytecount, longcnt;
short type, i;
- char packetnr, message[100];
+ char packetnr;
+// char message[100];
long tmp, *dpnt;
long desttmp[2];
BUF *b;