New driver
This commit is contained in:
@@ -12,6 +12,6 @@ This package contains network drivers for the following hardware:
|
|||||||
- Vampire500/600 with ENC28J60 module connected to the SD-card slot
|
- Vampire500/600 with ENC28J60 module connected to the SD-card slot
|
||||||
- Vampire500V2+ with ENC28J60 module connected to the expansion port
|
- Vampire500V2+ with ENC28J60 module connected to the expansion port
|
||||||
|
|
||||||
Full source code is included (GPL). Please refer to README.sdnet and
|
Full source code is included. Please refer to README.sdnet and
|
||||||
README.enc for installation and operation instructions
|
README.enc for installation and operation instructions
|
||||||
|
|
||||||
|
|||||||
@@ -63,6 +63,8 @@ PRIORITY=PRI/K/N,BPS/K/N,MTU/K/N,FULLDUPLEX/S,FLOWCONTROL/S,TIMER/K/N,MULTICAST/
|
|||||||
Changelog:
|
Changelog:
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
1.93 - recompiled using SAS/C, now 1kB smaller
|
||||||
|
|
||||||
1.91 - first Beta of completely rewritten driver
|
1.91 - first Beta of completely rewritten driver
|
||||||
- support for concurrent IP stacks
|
- support for concurrent IP stacks
|
||||||
- faster handling of statistics
|
- faster handling of statistics
|
||||||
|
|||||||
@@ -2,8 +2,9 @@ SDNet - A SANA-II driver for ENC28J60 10BaseT ethernet modules
|
|||||||
|
|
||||||
Copyright (C) 2016-2018 Henryk Richter <henryk.richter@gmx.net>
|
Copyright (C) 2016-2018 Henryk Richter <henryk.richter@gmx.net>
|
||||||
|
|
||||||
This driver is supposed to support ENC28J60 modules hooked up to the MicroSD
|
This driver is supposed to support ENC28J60 modules hooked up to the
|
||||||
slot of Vampire 500/600 cards or the expansion port of Vampire 500V2+ cards.
|
MicroSD slot of Vampire 500/600 cards (sdnet.device) or the
|
||||||
|
expansion port of Vampire 500V2+ cards (v2expeth.device).
|
||||||
|
|
||||||
|
|
||||||
Installation:
|
Installation:
|
||||||
@@ -31,7 +32,7 @@ Vampire500 Expansion port Hardware
|
|||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
|
||||||
Please see http://wiki.apollo-accelerators.com/doku.php/expansionport for
|
Please see http://wiki.apollo-accelerators.com/doku.php/expansionport for
|
||||||
guidance.
|
cabling guidance.
|
||||||
|
|
||||||
|
|
||||||
MicroSD Slot Hardware:
|
MicroSD Slot Hardware:
|
||||||
@@ -67,7 +68,7 @@ looking at the connectors) to the ENC28J60 module:
|
|||||||
| 2 ---- /CS -------------------- /CS
|
| 2 ---- /CS -------------------- /CS
|
||||||
| 1 ---- /INT -- __________ -- /INT
|
| 1 ---- /INT -- __________ -- /INT
|
||||||
------ ------------- \_| 3.3 kOhm |_/
|
------ ------------- \_| 3.3 kOhm |_/
|
||||||
\___| `----------´
|
\___| `----------´
|
||||||
|
|
||||||
As there is a myriad of ENC28J60 modules available, the naming scheme on
|
As there is a myriad of ENC28J60 modules available, the naming scheme on
|
||||||
a particular board might differ. Please be aware the some of the boards
|
a particular board might differ. Please be aware the some of the boards
|
||||||
@@ -151,13 +152,16 @@ NOSPECIALSTATS/S,PRIORITY=PRI/K/N,BPS/K/N,MTU/K/N,FULLDUPLEX/S,SPISPEED/K/N,
|
|||||||
TIMER/K/N,MULTICAST/S
|
TIMER/K/N,MULTICAST/S
|
||||||
|
|
||||||
SPISPEED - SPI clock divider (1-10, default 2), controls maximum
|
SPISPEED - SPI clock divider (1-10, default 2), controls maximum
|
||||||
clock of SPI bus. Actual I/O clock is Core_Clock/(3+SPISPEED).
|
clock of SPI bus. Actual I/O clock is Core_Clock/(2+SPISPEED).
|
||||||
|
|
||||||
FULLDUPLEX - change Ethernet module into full duplex mode,
|
FULLDUPLEX - change Ethernet module into full duplex mode,
|
||||||
caution: requires manual configuration of duplex mode
|
caution: requires MANUAL configuration of duplex mode
|
||||||
on the switch, too.
|
on the SWITCH, TOO! Otherwise you get a heavy
|
||||||
|
amount of collisions and bad performance!
|
||||||
|
|
||||||
PRIORITY - server task priority (default 1)
|
PRIORITY - server task priority (default 1). It depends on the TCP/IP stack
|
||||||
|
whether a priority higher than 1 gives performance benefits. I'd
|
||||||
|
suggest to leave the setting at default, at least for Roadshow.
|
||||||
|
|
||||||
BPS - bit per seconds for statistics purposes
|
BPS - bit per seconds for statistics purposes
|
||||||
|
|
||||||
@@ -169,13 +173,29 @@ TIMER/K/N,MULTICAST/S
|
|||||||
MULTICAST - obsolete, kept for config file backwards compatibility with
|
MULTICAST - obsolete, kept for config file backwards compatibility with
|
||||||
old driver
|
old driver
|
||||||
|
|
||||||
example (useful for DSL via PPPoE on x11 core with AmiTCP):
|
INTERRUPT - (V2EXPETH ONLY!), from Gold 2.10 release and v2expeth.device
|
||||||
|
1.94 onwards, you can enable the interrupts and avoid polling.
|
||||||
|
It is suggested to disable the timer in that case.
|
||||||
|
See below for an example
|
||||||
|
|
||||||
|
example1 (useful for DSL via PPPoE on x11 core with AmiTCP):
|
||||||
echo "MTU=1492 SPISPEED=1 PRIORITY=6" >ENVARC:sana2/sdnet.config
|
echo "MTU=1492 SPISPEED=1 PRIORITY=6" >ENVARC:sana2/sdnet.config
|
||||||
|
|
||||||
|
example2 (V500 expansion port, Gold 2.10 or later, interrupt driven):
|
||||||
|
echo "TIMER=0 INTERRUPT SPISPEED=1" >ENVARC:sana2/v2expeth.config
|
||||||
|
|
||||||
|
|
||||||
Changelog:
|
Changelog:
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
1.95 - workaround for MiamiDX bugs, 32 Bit Buffer copy routines could not be
|
||||||
|
used safely with it.
|
||||||
|
|
||||||
|
1.94 - implemented interrupts for modules connected to V500v2+ expansion port
|
||||||
|
|
||||||
|
1.93 - minor restructuring, SAS/C makefile added
|
||||||
|
- smaller binaries (functionally identical)
|
||||||
|
|
||||||
1.92 - workaround for linker issue, version bump
|
1.92 - workaround for linker issue, version bump
|
||||||
|
|
||||||
1.91 - minor cleanups
|
1.91 - minor cleanups
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -19,7 +19,7 @@
|
|||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# debug = 1 will include string debugging for terminal/sushi/sashimi
|
# debug = 1 will include string debugging for terminal/sushi/sashimi
|
||||||
debug = 1
|
debug = 0
|
||||||
# compiler_vcc = 1 will trigger VBCC, else GCC
|
# compiler_vcc = 1 will trigger VBCC, else GCC
|
||||||
compiler_vcc = 1
|
compiler_vcc = 1
|
||||||
|
|
||||||
|
|||||||
@@ -19,9 +19,9 @@
|
|||||||
# Date, version, extra objects to build
|
# Date, version, extra objects to build
|
||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
DEVICEVERSION=1
|
#DEVICEVERSION=1
|
||||||
DEVICEREVISION=92
|
#DEVICEREVISION=95
|
||||||
DEVICEDATE=10.06.2018
|
#DEVICEDATE=08.09.2018
|
||||||
SUBDIR=enc624j6net
|
SUBDIR=enc624j6net
|
||||||
ASMOBJECTS = $(SUBDIR)/enc624j6l.o $(SUBDIR)/intervaltimer.o
|
ASMOBJECTS = $(SUBDIR)/enc624j6l.o $(SUBDIR)/intervaltimer.o
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,8 @@
|
|||||||
# author: Henryk Richter <henryk.richter@gmx.net>
|
# author: Henryk Richter <henryk.richter@gmx.net>
|
||||||
#
|
#
|
||||||
# concept:
|
# concept:
|
||||||
|
# this makefile is intended mainly for cross compilation,
|
||||||
|
# although building on AmigaOS works (see Common.mk)
|
||||||
#
|
#
|
||||||
# tools required:
|
# tools required:
|
||||||
# - vbcc or m68k-amigaos-gcc (Default: gcc)
|
# - vbcc or m68k-amigaos-gcc (Default: gcc)
|
||||||
@@ -13,6 +15,7 @@
|
|||||||
# - system headers (default: /opt/amigaos-68k/os-include, see Common.mk)
|
# - system headers (default: /opt/amigaos-68k/os-include, see Common.mk)
|
||||||
#
|
#
|
||||||
# porting:
|
# porting:
|
||||||
|
# see smakefile for native building using SAS/C
|
||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
@@ -20,10 +23,10 @@
|
|||||||
# Name, version
|
# Name, version
|
||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
DEVICEVERSION=1
|
#DEVICEVERSION=1
|
||||||
DEVICEREVISION=92
|
#DEVICEREVISION=95
|
||||||
DEVICEDATE=27.06.2018
|
#DEVICEDATE=08.09.2018
|
||||||
DEVICEEXTRA=Beta
|
#DEVICEEXTRA=Beta
|
||||||
ASMOBJECTS = $(SUBDIR)/vampuuid.o $(SUBDIR)/intervaltimer.o $(SUBDIR)/enc28j60.o $(SUBDIR)/enc28j60l.o
|
ASMOBJECTS = $(SUBDIR)/vampuuid.o $(SUBDIR)/intervaltimer.o $(SUBDIR)/enc28j60.o $(SUBDIR)/enc28j60l.o
|
||||||
SUBDIR=sdnet
|
SUBDIR=sdnet
|
||||||
|
|
||||||
@@ -33,11 +36,16 @@ DEVICEID=sdnet.device
|
|||||||
DEFINES = # -DPROTO_V2EXPNET
|
DEFINES = # -DPROTO_V2EXPNET
|
||||||
ASMDEFS = # -DPROTO_V2EXPNET
|
ASMDEFS = # -DPROTO_V2EXPNET
|
||||||
CPU = 68020
|
CPU = 68020
|
||||||
|
TESTTOOL = sdnettest
|
||||||
|
|
||||||
DEVICEID2=v2expeth.device
|
DEVICEID2=v2expeth.device
|
||||||
DEFINES2 = -DPROTO_V2EXPNET
|
DEFINES2 = -DPROTO_V2EXPNET
|
||||||
ASMDEFS2 = -DPROTO_V2EXPNET
|
ASMDEFS2 = -DPROTO_V2EXPNET
|
||||||
CPU2 = 68020
|
CPU2 = 68020
|
||||||
|
TESTTOOL2 = v2expethtest
|
||||||
|
|
||||||
|
# additional housekeeping
|
||||||
|
EXTRACLEAN = $(SUBDIR)/sdnettest.o $(SUBDIR)/sdnettest.2o
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# import generic ruleset
|
# import generic ruleset
|
||||||
@@ -46,3 +54,15 @@ CPU2 = 68020
|
|||||||
|
|
||||||
include Common.mk
|
include Common.mk
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# ruleset for test tools
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
$(TESTTOOL) : $(ASMOBJECTS) $(SUBDIR)/sdnettest.o
|
||||||
|
$(LINKEXE) $(LDFLAGS) -o $@ $(SUBDIR)/sdnettest.o $(ASMOBJECTS)
|
||||||
|
|
||||||
|
$(TESTTOOL2) : $(ASMOBJECTS) $(SUBDIR)/sdnettest.2o
|
||||||
|
$(LINKEXE) $(LDFLAGS) -o $@ $(SUBDIR)/sdnettest.2o $(ASMOBJECTS)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@
|
|||||||
#define _INC_DEBUG_H
|
#define _INC_DEBUG_H
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
#include <clib/exec_protos.h>
|
|
||||||
extern void KPrintF(char *, ...), KGetChar(void);
|
extern void KPrintF(char *, ...), KGetChar(void);
|
||||||
|
|
||||||
#define D(_x_) do { KPrintF("%s:%ld:",__FILE__,__LINE__); KPrintF _x_; } while(0)
|
#define D(_x_) do { KPrintF("%s:%ld:",__FILE__,__LINE__); KPrintF _x_; } while(0)
|
||||||
|
|||||||
@@ -27,11 +27,56 @@
|
|||||||
#include <dos/dostags.h>
|
#include <dos/dostags.h>
|
||||||
#include <utility/tagitem.h>
|
#include <utility/tagitem.h>
|
||||||
#include <exec/lists.h>
|
#include <exec/lists.h>
|
||||||
|
#ifdef HAVE_VERSION_H
|
||||||
|
#include "version.h"
|
||||||
|
#endif
|
||||||
|
/* NSD support is optional */
|
||||||
|
#ifdef NEWSTYLE
|
||||||
|
#include <devices/newstyle.h>
|
||||||
|
#include <devices/sana2devqueryext.h> /* new extension, code can be built without this include (but also without ext query then...) */
|
||||||
|
|
||||||
|
const UWORD dev_supportedcmds[] = {
|
||||||
|
NSCMD_DEVICEQUERY,
|
||||||
|
CMD_READ,
|
||||||
|
CMD_WRITE,
|
||||||
|
S2_READORPHAN,
|
||||||
|
S2_BROADCAST,
|
||||||
|
S2_MULTICAST,
|
||||||
|
S2_ONEVENT,
|
||||||
|
S2_ONLINE,
|
||||||
|
S2_OFFLINE,
|
||||||
|
S2_CONFIGINTERFACE,
|
||||||
|
S2_GETSTATIONADDRESS,
|
||||||
|
S2_DEVICEQUERY,
|
||||||
|
S2_TRACKTYPE,
|
||||||
|
S2_UNTRACKTYPE,
|
||||||
|
S2_GETTYPESTATS,
|
||||||
|
S2_GETGLOBALSTATS,
|
||||||
|
S2_ADDMULTICASTADDRESS,
|
||||||
|
S2_DELMULTICASTADDRESS,
|
||||||
|
#ifdef S2_DEVICEQUERYEXT
|
||||||
|
S2_DEVICEQUERYEXT,
|
||||||
|
#endif
|
||||||
|
0
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct NSDeviceQueryResult NSDQueryAnswer = {
|
||||||
|
0,
|
||||||
|
16, /* up to SupportedCommands (inclusive) */
|
||||||
|
NSDEVTYPE_SANA2,
|
||||||
|
0, /* subtype */
|
||||||
|
(UWORD*)dev_supportedcmds
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "device.h"
|
#include "device.h"
|
||||||
#include "hw.h"
|
#include "hw.h"
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ASM SAVEDS struct Device *DevInit( ASMR(d0) DEVBASEP ASMREG(d0),
|
ASM SAVEDS struct Device *DevInit( ASMR(d0) DEVBASEP ASMREG(d0),
|
||||||
ASMR(a0) BPTR seglist ASMREG(a0),
|
ASMR(a0) BPTR seglist ASMREG(a0),
|
||||||
ASMR(a6) struct Library *_SysBase ASMREG(a6) )
|
ASMR(a6) struct Library *_SysBase ASMREG(a6) )
|
||||||
@@ -151,8 +196,11 @@ ASM SAVEDS LONG DevOpen( ASMR(a1) struct IOSana2Req *ioreq ASMREG(a1),
|
|||||||
(struct TagItem *)ioreq->ios2_BufferManagement)));
|
(struct TagItem *)ioreq->ios2_BufferManagement)));
|
||||||
dbm->dbm_CopyFromBuffer = (BMCALL)((void (*)())(GetTagData(S2_CopyFromBuff, 0,
|
dbm->dbm_CopyFromBuffer = (BMCALL)((void (*)())(GetTagData(S2_CopyFromBuff, 0,
|
||||||
(struct TagItem *)ioreq->ios2_BufferManagement)));
|
(struct TagItem *)ioreq->ios2_BufferManagement)));
|
||||||
#if 0
|
|
||||||
dbm->dbm_CopyToBuffer32 = (0); /* DEBUG */
|
/* v1.95: disable CopyToBuffer32 due to problems with MiamiDX */
|
||||||
|
/* MiamiDX requires byte count to be a multiple of 4 */
|
||||||
|
#if 1
|
||||||
|
dbm->dbm_CopyToBuffer32 = (0);
|
||||||
dbm->dbm_CopyFromBuffer32 = (0);
|
dbm->dbm_CopyFromBuffer32 = (0);
|
||||||
#else
|
#else
|
||||||
dbm->dbm_CopyToBuffer32 = (BMCALL)((void (*)())(GetTagData(S2_CopyToBuff32, 0,
|
dbm->dbm_CopyToBuffer32 = (BMCALL)((void (*)())(GetTagData(S2_CopyToBuff32, 0,
|
||||||
@@ -237,6 +285,12 @@ ASM SAVEDS BPTR DevClose( ASMR(a1) struct IOSana2Req *ioreq ASMREG(a1),
|
|||||||
|
|
||||||
ReleaseSemaphore( &db->db_Units[unit].du_Sem );
|
ReleaseSemaphore( &db->db_Units[unit].du_Sem );
|
||||||
|
|
||||||
|
/* clear flags */
|
||||||
|
if( !(db->db_Units[unit].du_OpenCount) )
|
||||||
|
{
|
||||||
|
db->db_Units[unit].du_Flags &= ~(DUF_EXCLUSIVE|DUF_PROMISC);
|
||||||
|
}
|
||||||
|
|
||||||
/* give server time to offline down the hardware */
|
/* give server time to offline down the hardware */
|
||||||
if( (db->db_ServerProc) &&
|
if( (db->db_ServerProc) &&
|
||||||
!(db->db_Units[unit].du_OpenCount) &&
|
!(db->db_Units[unit].du_OpenCount) &&
|
||||||
@@ -517,6 +571,31 @@ ASM SAVEDS VOID DevBeginIO( ASMR(a1) struct IOSana2Req *ioreq ASMREG(a1),
|
|||||||
ioreq->ios2_Req.io_Error = S2ERR_NO_ERROR;
|
ioreq->ios2_Req.io_Error = S2ERR_NO_ERROR;
|
||||||
ioreq->ios2_WireError = S2WERR_GENERIC_ERROR;
|
ioreq->ios2_WireError = S2WERR_GENERIC_ERROR;
|
||||||
break;
|
break;
|
||||||
|
#ifndef NSCMD_DEVICEQUERY
|
||||||
|
#warning "Building without NSD support"
|
||||||
|
#else
|
||||||
|
case NSCMD_DEVICEQUERY:
|
||||||
|
{
|
||||||
|
struct IOStdReq *stdrq = (struct IOStdReq *)ioreq;
|
||||||
|
|
||||||
|
if( (!stdrq->io_Data) || (stdrq->io_Length < sizeof( NSDQueryAnswer ) ) )
|
||||||
|
{
|
||||||
|
ioreq->ios2_Req.io_Error = IOERR_BADLENGTH;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CopyMem( (void*)&NSDQueryAnswer, stdrq->io_Data, sizeof( NSDQueryAnswer ) );
|
||||||
|
stdrq->io_Actual = sizeof( NSDQueryAnswer );
|
||||||
|
ioreq->ios2_Req.io_Error = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
/* query contents may ask for live data: handle in server.c */
|
||||||
|
case S2_DEVICEQUERYEXT:
|
||||||
|
dbForwardIO( db, ioreq );
|
||||||
|
ioreq = (0);
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
case CMD_RESET:
|
case CMD_RESET:
|
||||||
case CMD_UPDATE:
|
case CMD_UPDATE:
|
||||||
@@ -525,7 +604,8 @@ ASM SAVEDS VOID DevBeginIO( ASMR(a1) struct IOSana2Req *ioreq ASMREG(a1),
|
|||||||
case CMD_START:
|
case CMD_START:
|
||||||
case CMD_FLUSH:
|
case CMD_FLUSH:
|
||||||
ioreq->ios2_Req.io_Error = IOERR_NOCMD;
|
ioreq->ios2_Req.io_Error = IOERR_NOCMD;
|
||||||
ioreq->ios2_WireError = S2WERR_GENERIC_ERROR;
|
/* we might not get a SANA-II request at this point, don't assume anything about struct */
|
||||||
|
/* ioreq->ios2_WireError = S2WERR_GENERIC_ERROR; */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case S2_ADDMULTICASTADDRESS:
|
case S2_ADDMULTICASTADDRESS:
|
||||||
|
|||||||
@@ -15,6 +15,9 @@
|
|||||||
#include <exec/nodes.h>
|
#include <exec/nodes.h>
|
||||||
#include <exec/initializers.h>
|
#include <exec/initializers.h>
|
||||||
#include <exec/libraries.h>
|
#include <exec/libraries.h>
|
||||||
|
#ifdef HAVE_VERSION_H
|
||||||
|
#include "version.h"
|
||||||
|
#endif
|
||||||
#include "compiler.h"
|
#include "compiler.h"
|
||||||
#include "device.h"
|
#include "device.h"
|
||||||
|
|
||||||
@@ -32,7 +35,7 @@ extern const char DeviceName[];
|
|||||||
extern const char DeviceVersionString[];
|
extern const char DeviceVersionString[];
|
||||||
extern const APTR DeviceInitTab[];
|
extern const APTR DeviceInitTab[];
|
||||||
|
|
||||||
const struct Resident _00RomTag = {
|
static const struct Resident _00RomTag = {
|
||||||
RTC_MATCHWORD,
|
RTC_MATCHWORD,
|
||||||
( struct Resident* ) &_00RomTag,
|
( struct Resident* ) &_00RomTag,
|
||||||
( struct Resident* ) &_00RomTag + 1,
|
( struct Resident* ) &_00RomTag + 1,
|
||||||
|
|||||||
@@ -12,6 +12,10 @@
|
|||||||
#include <dos/dostags.h>
|
#include <dos/dostags.h>
|
||||||
#include <utility/tagitem.h>
|
#include <utility/tagitem.h>
|
||||||
#include <exec/lists.h>
|
#include <exec/lists.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_VERSION_H
|
||||||
|
#include "version.h"
|
||||||
|
#endif
|
||||||
#include "device.h"
|
#include "device.h"
|
||||||
#include "hw.h"
|
#include "hw.h"
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
@@ -24,7 +28,8 @@
|
|||||||
#define DEVICEEXTRA
|
#define DEVICEEXTRA
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char DeviceVersionString[] = "$VER: " xstr(DEVICENAME) " " xstr(DEVICEVERSION) "." xstr(DEVICEREVISION) xstr(DEVICEEXTRA) " (" xstr(DEVICEDATE) ")";
|
static const char _DeviceVersionString[] = "$VER: " xstr(DEVICENAME) " " xstr(DEVICEVERSION) "." xstr(DEVICEREVISION) xstr(DEVICEEXTRA) " (" xstr(DEVICEDATE) ")";
|
||||||
|
const char *DeviceVersionString = (const char *)_DeviceVersionString;
|
||||||
const char DeviceName[] = xstr(DEVICENAME);
|
const char DeviceName[] = xstr(DEVICENAME);
|
||||||
|
|
||||||
|
|
||||||
@@ -57,7 +62,7 @@ struct DeviceInitData
|
|||||||
INITBYTE( STRUCTOFFSET(Library,lib_Flags), LIBF_SUMUSED|LIBF_CHANGED ),
|
INITBYTE( STRUCTOFFSET(Library,lib_Flags), LIBF_SUMUSED|LIBF_CHANGED ),
|
||||||
INITWORD( STRUCTOFFSET(Library,lib_Version), DEVICEVERSION ),
|
INITWORD( STRUCTOFFSET(Library,lib_Version), DEVICEVERSION ),
|
||||||
INITWORD( STRUCTOFFSET(Library,lib_Revision), DEVICEREVISION ),
|
INITWORD( STRUCTOFFSET(Library,lib_Revision), DEVICEREVISION ),
|
||||||
0x80, (UBYTE) ((LONG)STRUCTOFFSET(Library,lib_IdString)), (ULONG) &DeviceVersionString[6],
|
0x80, (UBYTE) ((LONG)STRUCTOFFSET(Library,lib_IdString)), (ULONG) &_DeviceVersionString[6],
|
||||||
(ULONG) 0
|
(ULONG) 0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -18,10 +18,11 @@
|
|||||||
; - RXSTART_INIT = $0c00 -> currently $2000 due to previous location bug
|
; - RXSTART_INIT = $0c00 -> currently $2000 due to previous location bug
|
||||||
;
|
;
|
||||||
|
|
||||||
; incdir Temp:Amiga/src/Zorro-LAN-IDE.git/Driver/enc624j6net/
|
incdir src:baxnet/trunk/source/
|
||||||
|
;Temp:Amiga/src/Zorro-LAN-IDE.git/Driver/enc624j6net/
|
||||||
include "enc624j6net/registers.i"
|
include "enc624j6net/registers.i"
|
||||||
include "enc624j6net/macros.i"
|
include "enc624j6net/macros.i"
|
||||||
include lvo/exec_lib.i
|
|
||||||
; enable debugging code block
|
; enable debugging code block
|
||||||
DEBUG EQU 1
|
DEBUG EQU 1
|
||||||
;
|
;
|
||||||
@@ -34,7 +35,7 @@ ADD_4RX EQU 1 ;add 4 to valid RX size (fake CRC), fixes shapeshifter RAW treatme
|
|||||||
PSTART_INIT EQU $0BF0 ; 16 Bytes private storage for driver
|
PSTART_INIT EQU $0BF0 ; 16 Bytes private storage for driver
|
||||||
PSTOP_INIT EQU $0BFF ; (see below for definitions)
|
PSTOP_INIT EQU $0BFF ; (see below for definitions)
|
||||||
|
|
||||||
RXSTART_INIT EQU $2000 ; start of RX buffer, room for 14 packets
|
RXSTART_INIT EQU $0C00 ; start of RX buffer, room for 14 packets
|
||||||
RXSTOP_INIT EQU $5fff ; end of RX buffer
|
RXSTOP_INIT EQU $5fff ; end of RX buffer
|
||||||
|
|
||||||
TXSTART_INIT EQU $0000 ; start of TX buffer, room for 2 packets
|
TXSTART_INIT EQU $0000 ; start of TX buffer, room for 2 packets
|
||||||
@@ -109,8 +110,9 @@ ENC_BOARDID EQU 123 ;ZII-IDE-LAN-CP
|
|||||||
XDEF _enc624j6l_DisableInterrupt
|
XDEF _enc624j6l_DisableInterrupt
|
||||||
XDEF _enc624j6l_EnableGlobalInterrupt
|
XDEF _enc624j6l_EnableGlobalInterrupt
|
||||||
XDEF _enc624j6l_DisableGlobalInterrupt
|
XDEF _enc624j6l_DisableGlobalInterrupt
|
||||||
XDEF _enc624j6l_broadcast_multicast_filter
|
XDEF _enc624j6l_bc_mc_filter
|
||||||
|
|
||||||
|
XDEF _enc624j6l_ReadPHY
|
||||||
;
|
;
|
||||||
; System includes
|
; System includes
|
||||||
;
|
;
|
||||||
@@ -220,6 +222,11 @@ opendos:
|
|||||||
tst.l d0
|
tst.l d0
|
||||||
ble error
|
ble error
|
||||||
|
|
||||||
|
move.l _boardbase(pc),a0
|
||||||
|
; moveq #PHSTAT1,d0 ;AUTONEG DONE, forced speeds/duplex
|
||||||
|
moveq #PHSTAT3,d0 ;AUTONEG DONE, forced speeds/duplex
|
||||||
|
bsr _enc624j6l_ReadPHY
|
||||||
|
|
||||||
;---------- transmit test stuff ---------------
|
;---------- transmit test stuff ---------------
|
||||||
moveq #100,d2
|
moveq #100,d2
|
||||||
.txtest:
|
.txtest:
|
||||||
@@ -530,7 +537,7 @@ _enc624j6l_Init:
|
|||||||
moveq #ECON1_RXEN,d0 ;no RX, my dear (yet)
|
moveq #ECON1_RXEN,d0 ;no RX, my dear (yet)
|
||||||
CLRREG ECON1,a0,d0 ;
|
CLRREG ECON1,a0,d0 ;
|
||||||
|
|
||||||
;set clock out frequency (see defines above)
|
;33.333Mhz clock out frequency (see defines above)
|
||||||
move.w #CLOCK_DEF_CLR,d0 ;clr mask
|
move.w #CLOCK_DEF_CLR,d0 ;clr mask
|
||||||
CLRREG ECON2,a0,d0
|
CLRREG ECON2,a0,d0
|
||||||
move.w #CLOCK_DEF_SET,d0 ;set mask
|
move.w #CLOCK_DEF_SET,d0 ;set mask
|
||||||
@@ -545,7 +552,7 @@ _enc624j6l_Init:
|
|||||||
WRITEREG ERXST,a0,d0 ;set RX start pointer (end will be $5fff)
|
WRITEREG ERXST,a0,d0 ;set RX start pointer (end will be $5fff)
|
||||||
WRITEREG PNextPacket,a0,d0 ;set user read pointer
|
WRITEREG PNextPacket,a0,d0 ;set user read pointer
|
||||||
|
|
||||||
bsr _enc624j6l_broadcast_multicast_filter ;in: A0/D1, out: D0
|
bsr _enc624j6l_bc_mc_filter ;in: A0/D1, out: D0
|
||||||
|
|
||||||
move #RXSTOP_INIT&$fffe,d0
|
move #RXSTOP_INIT&$fffe,d0
|
||||||
WRITEREG ERXTAIL,a0,d0 ;tail pointer in buffer = rx-2, wraparound
|
WRITEREG ERXTAIL,a0,d0 ;tail pointer in buffer = rx-2, wraparound
|
||||||
@@ -604,7 +611,7 @@ _enc624j6l_Init:
|
|||||||
; D1 - init flags
|
; D1 - init flags
|
||||||
;out: D0 >0 = OK
|
;out: D0 >0 = OK
|
||||||
; <=0 = FAIL
|
; <=0 = FAIL
|
||||||
_enc624j6l_broadcast_multicast_filter:
|
_enc624j6l_bc_mc_filter:
|
||||||
move.l a0,d0
|
move.l a0,d0
|
||||||
beq.s .rts
|
beq.s .rts
|
||||||
|
|
||||||
@@ -826,7 +833,7 @@ _enc624j6l_DisableInterrupt:
|
|||||||
|
|
||||||
moveq #0,d0 ;magic trick: the board enables Interrupts
|
moveq #0,d0 ;magic trick: the board enables Interrupts
|
||||||
lea $4000(a0),a0
|
lea $4000(a0),a0
|
||||||
move.w d0,($4000,a0)
|
move.w d0,$4000(a0) ;was $4002
|
||||||
lea -$4000(a0),a0
|
lea -$4000(a0),a0
|
||||||
|
|
||||||
;WRITEREG $8000,a0,d0 ;only with this "sesame"
|
;WRITEREG $8000,a0,d0 ;only with this "sesame"
|
||||||
@@ -892,14 +899,18 @@ _enc624j6l_IntServer_List:
|
|||||||
bra.s .intdis_loop
|
bra.s .intdis_loop
|
||||||
.boardsdone:
|
.boardsdone:
|
||||||
|
|
||||||
|
;faster: get from extended Driver board list instead from ZII/ZIII card
|
||||||
ifne 1
|
ifne 1
|
||||||
|
|
||||||
move.l (a6)+,d0 ;Sigtask
|
move.l (a6)+,d0 ;SigTask
|
||||||
beq.s .rts
|
beq.s .rts
|
||||||
move.l d0,a1
|
|
||||||
|
|
||||||
|
move.l (a6)+,d1 ;SigBit
|
||||||
|
move.l d0,a1 ;SigTask
|
||||||
|
|
||||||
|
move.l (a6)+,a6 ;ExecBase
|
||||||
moveq #0,d0
|
moveq #0,d0
|
||||||
move.l (a6)+,d1 ;Sigbit
|
|
||||||
bset d1,d0
|
bset d1,d0
|
||||||
|
|
||||||
else
|
else
|
||||||
@@ -915,10 +926,11 @@ _enc624j6l_IntServer_List:
|
|||||||
READREG PSigBit,a0,d1 ;get signal bit
|
READREG PSigBit,a0,d1 ;get signal bit
|
||||||
bset d1,d0 ;signal mask
|
bset d1,d0 ;signal mask
|
||||||
|
|
||||||
|
move.l 4.w,a6
|
||||||
|
|
||||||
endc
|
endc
|
||||||
|
|
||||||
move.l 4.w,a6
|
jsr _LVOSignal(a6)
|
||||||
jsr _LVOSignal(a6)
|
|
||||||
|
|
||||||
.rts
|
.rts
|
||||||
move.l (sp)+,a6
|
move.l (sp)+,a6
|
||||||
@@ -1083,8 +1095,9 @@ _enc624j6l_HaveRecv:
|
|||||||
move.l a0,d0
|
move.l a0,d0
|
||||||
beq.s .err
|
beq.s .err
|
||||||
|
|
||||||
READREG ESTAT,a0,d0
|
moveq #0,d0
|
||||||
and.l #$ff,d0 ;ESTAT_PKTCNT7...ESTAT_PKTCNT0
|
READREG ESTAT,a0,d1
|
||||||
|
move.b d1,d0 ;ESTAT_PKTCNT7...ESTAT_PKTCNT0
|
||||||
.rts:
|
.rts:
|
||||||
rts
|
rts
|
||||||
.err: moveq #-1,d0
|
.err: moveq #-1,d0
|
||||||
@@ -1112,8 +1125,9 @@ _enc624j6l_RecvFrame: ;
|
|||||||
move.l a0,d1
|
move.l a0,d1
|
||||||
beq .err
|
beq .err
|
||||||
|
|
||||||
READREG ESTAT,a0,d0 ;number of pending frames
|
moveq #0,d0
|
||||||
and.l #$ff,d0 ;clear out count (ESTAT_PKTCNT7...ESTAT_PKTCNT0)
|
READREG ESTAT,a0,d2 ;number of pending frames
|
||||||
|
move.b d2,d0 ;clear out count (ESTAT_PKTCNT7...ESTAT_PKTCNT0)
|
||||||
beq .rts ;nothing in buffer, return sheer emptiness
|
beq .rts ;nothing in buffer, return sheer emptiness
|
||||||
;at least one frame in buffer
|
;at least one frame in buffer
|
||||||
|
|
||||||
@@ -1280,12 +1294,6 @@ _enc624j6l_RecvFrame: ;
|
|||||||
bge.s .rts
|
bge.s .rts
|
||||||
|
|
||||||
moveq #0,d0
|
moveq #0,d0
|
||||||
|
|
||||||
; cmp.l #$d8803977,6(a3)
|
|
||||||
; beq .rts
|
|
||||||
; moveq #0,d0
|
|
||||||
; clr.l 6(a3)
|
|
||||||
|
|
||||||
.rts:
|
.rts:
|
||||||
movem.l (sp)+,d2-d7/a1-a3
|
movem.l (sp)+,d2-d7/a1-a3
|
||||||
rts
|
rts
|
||||||
@@ -1319,7 +1327,7 @@ _enc624j6l_RecvFrame: ;
|
|||||||
; notes:
|
; notes:
|
||||||
;
|
;
|
||||||
_enc624j6l_TransmitFrame:
|
_enc624j6l_TransmitFrame:
|
||||||
movem.l d2-d4/a2,-(sp)
|
movem.l d2-d5/a2,-(sp)
|
||||||
|
|
||||||
;---------------- parameter check -------------------------------------
|
;---------------- parameter check -------------------------------------
|
||||||
|
|
||||||
@@ -1344,13 +1352,6 @@ _enc624j6l_TransmitFrame:
|
|||||||
move.l a1,d1 ;no send frame ?
|
move.l a1,d1 ;no send frame ?
|
||||||
beq.w .err ;exit
|
beq.w .err ;exit
|
||||||
|
|
||||||
move.w d0,d4 ;still need length later
|
|
||||||
addq #7,d0 ;round up
|
|
||||||
asr.w #3,d0 ;size/8 = words
|
|
||||||
subq.w #1,d0 ;dbf...
|
|
||||||
blt.w .err ;size<2 ? bail out
|
|
||||||
|
|
||||||
|
|
||||||
;------ double-buffered frame copy to send buffer ---------------------
|
;------ double-buffered frame copy to send buffer ---------------------
|
||||||
READREG PNextTX,a0,d2 ;"last written, maybe still pending frame"
|
READREG PNextTX,a0,d2 ;"last written, maybe still pending frame"
|
||||||
and.w #PSwapTX,d2 ;sanity, leave only desired bits
|
and.w #PSwapTX,d2 ;sanity, leave only desired bits
|
||||||
@@ -1358,6 +1359,40 @@ _enc624j6l_TransmitFrame:
|
|||||||
WRITEREG PNextTX,a0,d2 ;remember pointer (d2 also for ETXST later)
|
WRITEREG PNextTX,a0,d2 ;remember pointer (d2 also for ETXST later)
|
||||||
|
|
||||||
lea (a0,d2.w),a2 ;write pointer for frame
|
lea (a0,d2.w),a2 ;write pointer for frame
|
||||||
|
|
||||||
|
ifeq _OPT_BUFFER_SWAP
|
||||||
|
|
||||||
|
;faster TX when buffer swapping is not necessary
|
||||||
|
move.l d0,d4 ;remember length
|
||||||
|
moveq #63,d5 ;
|
||||||
|
and.l d5,d0 ;remainder of 64 byte copy loop
|
||||||
|
move.l d4,d5 ;length in bytes
|
||||||
|
asr.w #6,d5 ;64 byte blocks
|
||||||
|
subq.w #1,d5 ;dbf
|
||||||
|
blt.s .smallcopy
|
||||||
|
bra.s .largecopy_start
|
||||||
|
|
||||||
|
.largecopy:
|
||||||
|
move.l d1,(a2)+
|
||||||
|
.largecopy_start:
|
||||||
|
rept 15
|
||||||
|
move.l (a1)+,(a2)+ ;save to SRAM
|
||||||
|
endr
|
||||||
|
move.l (a1)+,d1
|
||||||
|
dbf d5,.largecopy
|
||||||
|
|
||||||
|
move.l d1,(a2)+
|
||||||
|
bra.s .smallcopy
|
||||||
|
|
||||||
|
endc ;_OPT_BUFFER_SWAP
|
||||||
|
|
||||||
|
move.w d0,d4 ;still need length later
|
||||||
|
.smallcopy:
|
||||||
|
addq #7,d0 ;round up
|
||||||
|
asr.w #3,d0 ;size/8 = words
|
||||||
|
subq.w #1,d0 ;dbf...
|
||||||
|
blt.w .err ;size<2 ? bail out
|
||||||
|
|
||||||
swap d4
|
swap d4
|
||||||
move.w #8,d4
|
move.w #8,d4
|
||||||
.txcopy:
|
.txcopy:
|
||||||
@@ -1375,14 +1410,16 @@ _enc624j6l_TransmitFrame:
|
|||||||
swap d3
|
swap d3
|
||||||
move.l d1,(a2)+ ;save to SRAM
|
move.l d1,(a2)+ ;save to SRAM
|
||||||
move.l d3,(a2)+ ;save to SRAM
|
move.l d3,(a2)+ ;save to SRAM
|
||||||
else
|
else ;_OPT_BUFFER_SWAP
|
||||||
move.l (a1)+,(a2)+ ;save to SRAM
|
move.l (a1)+,(a2)+ ;save to SRAM
|
||||||
move.l (a1)+,(a2)+ ;save to SRAM
|
move.l (a1)+,(a2)+ ;save to SRAM
|
||||||
endc
|
endc ;_OPT_BUFFER_SWAP
|
||||||
|
|
||||||
dbf d0,.txcopy
|
dbf d0,.txcopy
|
||||||
|
|
||||||
swap d4
|
swap d4
|
||||||
|
|
||||||
|
|
||||||
;---------------- wait on last frame ----------------------------------
|
;---------------- wait on last frame ----------------------------------
|
||||||
move #200,d3
|
move #200,d3
|
||||||
.txwait:
|
.txwait:
|
||||||
@@ -1410,7 +1447,7 @@ _enc624j6l_TransmitFrame:
|
|||||||
SETREG ECON1,a0,d1 ;
|
SETREG ECON1,a0,d1 ;
|
||||||
|
|
||||||
.err:
|
.err:
|
||||||
movem.l (sp)+,d2-d4/a2
|
movem.l (sp)+,d2-d5/a2
|
||||||
rts
|
rts
|
||||||
|
|
||||||
ifne _OPT_CHECKLINK_TX
|
ifne _OPT_CHECKLINK_TX
|
||||||
@@ -1423,6 +1460,60 @@ _enc624j6l_TransmitFrame:
|
|||||||
|
|
||||||
endc
|
endc
|
||||||
|
|
||||||
|
;---------------------------------------------------------------------------------------
|
||||||
|
;
|
||||||
|
; read PHY register (16 Bit)
|
||||||
|
;
|
||||||
|
; input: A0 - APTR mmapped board base address
|
||||||
|
; D0 - LONG Phy register (5 valid bits)
|
||||||
|
;
|
||||||
|
; output: LONG D0 <0 - error (bad register index)
|
||||||
|
; - 16 Bit PHY reg contents
|
||||||
|
;
|
||||||
|
; trash: -
|
||||||
|
;
|
||||||
|
; notes:
|
||||||
|
;;
|
||||||
|
;
|
||||||
|
;
|
||||||
|
_enc624j6l_ReadPHY:
|
||||||
|
moveq #31,d1
|
||||||
|
cmp.l d1,d0
|
||||||
|
bhi.w .err
|
||||||
|
|
||||||
|
bset #8,d0 ;$100 + PHY_REG
|
||||||
|
WRITEREG MIREGADR,a0,d0 ;set PHY register address
|
||||||
|
moveq #1,d0
|
||||||
|
WRITEREG MICMD,a0,d0 ;read command
|
||||||
|
|
||||||
|
moveq #25,d0 ;25 us delay (at least)
|
||||||
|
bsr _enc624j6l_UMinDelay ;
|
||||||
|
|
||||||
|
moveq #100,d1
|
||||||
|
.waitloop:
|
||||||
|
READREG MISTAT,a0,d0
|
||||||
|
btst #0,d0
|
||||||
|
beq.s .notbusy
|
||||||
|
|
||||||
|
tst.b $BFE301 ;1 CIA access = 1.4 us
|
||||||
|
subq.w #1,d1 ;>165 us exceeded ? -> something is wrong, SPEC says 25.6 us
|
||||||
|
blt.s .notbusy ;error
|
||||||
|
|
||||||
|
bra.s .waitloop
|
||||||
|
.notbusy
|
||||||
|
moveq #0,d0
|
||||||
|
WRITEREG MICMD,a0,d0 ;cancel read command
|
||||||
|
|
||||||
|
tst.w d1 ;did we run into timeout ?
|
||||||
|
blt.s .err ;yes, we don't have anything worthwhile
|
||||||
|
|
||||||
|
READREG MIRD,a0,d1
|
||||||
|
moveq #0,d0
|
||||||
|
move.w d1,d0
|
||||||
|
rts
|
||||||
|
.err:
|
||||||
|
moveq #-1,d0
|
||||||
|
rts
|
||||||
;------------------------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------------------------
|
||||||
;------------------------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------------------------
|
||||||
;
|
;
|
||||||
|
|||||||
@@ -232,7 +232,7 @@ ASM SAVEDS int enc624j6l_SetOnline( ASMR(a0) void *board ASMREG(a0) );
|
|||||||
output: <0 - error
|
output: <0 - error
|
||||||
>=0 - OK
|
>=0 - OK
|
||||||
*/
|
*/
|
||||||
ASM SAVEDS int enc624j6l_broadcast_multicast_filter(
|
ASM SAVEDS int enc624j6l_bc_mc_filter(
|
||||||
ASMR(a0) void *board ASMREG(a0),
|
ASMR(a0) void *board ASMREG(a0),
|
||||||
ASMR(d1) unsigned long flags ASMREG(d1) );
|
ASMR(d1) unsigned long flags ASMREG(d1) );
|
||||||
|
|
||||||
@@ -326,6 +326,19 @@ ASM SAVEDS void enc624j6l_IntServer_List( void );
|
|||||||
*/
|
*/
|
||||||
ASM SAVEDS int enc624j6l_CheckLinkChange( ASMR(a0) void *board ASMREG(a0) );
|
ASM SAVEDS int enc624j6l_CheckLinkChange( ASMR(a0) void *board ASMREG(a0) );
|
||||||
|
|
||||||
|
/*
|
||||||
|
Purpose: read PHY register
|
||||||
|
|
||||||
|
input: board - mmapped board base address
|
||||||
|
flags - broadcast,promiscous, multicast
|
||||||
|
|
||||||
|
output: <0 - error
|
||||||
|
>=0 - OK
|
||||||
|
*/
|
||||||
|
ASM SAVEDS int enc624j6l_ReadPHY(
|
||||||
|
ASMR(a0) void *board ASMREG(a0),
|
||||||
|
ASMR(d0) unsigned long phyreg ASMREG(d0) );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* _INC_ENC624J6L_H */
|
#endif /* _INC_ENC624J6L_H */
|
||||||
|
|||||||
@@ -0,0 +1,110 @@
|
|||||||
|
/*
|
||||||
|
enc624test.c
|
||||||
|
|
||||||
|
(C) 2018 Henryk Richter <henryk.richter@gmx.net>
|
||||||
|
|
||||||
|
Matze-Scrat-Buggs ZII card hardware test
|
||||||
|
|
||||||
|
|
||||||
|
*/
|
||||||
|
#include <exec/libraries.h>
|
||||||
|
#include <proto/exec.h>
|
||||||
|
|
||||||
|
#define ENC_MANUFACTURER 2588
|
||||||
|
#define ENC_BOARD 123
|
||||||
|
|
||||||
|
#include <proto/expansion.h>
|
||||||
|
#include <proto/dos.h>
|
||||||
|
#include <libraries/configvars.h>
|
||||||
|
#include <hardware/intbits.h>
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
#include "device.h"
|
||||||
|
#include "hw.h"
|
||||||
|
|
||||||
|
#include "enc624j6l.h"
|
||||||
|
#endif
|
||||||
|
#include "registers.h"
|
||||||
|
|
||||||
|
|
||||||
|
#define READREG(_x_,_off_) *( (volatile USHORT*)( (volatile UBYTE*)(_x_) + (_off_)) )
|
||||||
|
#define WRITEREG(_x_,_off_,_y_) *( (volatile USHORT*)( (volatile UBYTE*)(_x_) + (_off_)) ) = (_y_);
|
||||||
|
#define SETREG(_x_,_off_,_y_) *( (volatile USHORT*)( (volatile UBYTE*)(_x_) + (_off_) + SET_OFFSET )) = (_y_);
|
||||||
|
#define CLRREG(_x_,_off_,_y_) *( (volatile USHORT*)( (volatile UBYTE*)(_x_) + (_off_) + CLR_OFFSET )) = (_y_);
|
||||||
|
|
||||||
|
const BYTE exp_name[] = "expansion.library";
|
||||||
|
|
||||||
|
int main( int argc, char **argv )
|
||||||
|
{
|
||||||
|
LONG ret = 0;
|
||||||
|
ULONG ul;
|
||||||
|
volatile APTR board = (0);
|
||||||
|
volatile UBYTE *uboard;
|
||||||
|
struct Library *ExpansionBase;
|
||||||
|
struct ConfigDev *cfg = (0);
|
||||||
|
|
||||||
|
ExpansionBase = OpenLibrary( (BYTE*)exp_name, 37 );
|
||||||
|
if( !ExpansionBase )
|
||||||
|
{
|
||||||
|
Printf("Cannot open Expansion. quitting\n");
|
||||||
|
goto quit;
|
||||||
|
}
|
||||||
|
|
||||||
|
cfg = FindConfigDev( cfg, ENC_MANUFACTURER, ENC_BOARD );
|
||||||
|
if( cfg )
|
||||||
|
{
|
||||||
|
board = (volatile APTR)cfg->cd_BoardAddr;
|
||||||
|
}
|
||||||
|
if( !board )
|
||||||
|
{
|
||||||
|
Printf("Board %ld / %ld not found in expansions\n",(ULONG)ENC_MANUFACTURER,(ULONG)ENC_BOARD);
|
||||||
|
goto quit;
|
||||||
|
}
|
||||||
|
Printf("Board found at 0x%lx\n",(ULONG)board);
|
||||||
|
|
||||||
|
/* 16 Bit R/W Test */
|
||||||
|
Printf("16 Bit reg test\n",(ULONG)board);
|
||||||
|
WRITEREG( board, EUDAST, 0x1234 );
|
||||||
|
ul = READREG( board, EUDAST );
|
||||||
|
if( ul != 0x1234 )
|
||||||
|
{
|
||||||
|
Printf("Board error: wrote 0x1234, got 0x%lx\n",ul);
|
||||||
|
ret = 1;
|
||||||
|
}
|
||||||
|
WRITEREG( board, EUDAST, 0x0000 );
|
||||||
|
|
||||||
|
/* Byte R/W tests */
|
||||||
|
Printf("8 Bit buffer tests\n",(ULONG)board);
|
||||||
|
|
||||||
|
WRITEREG( board, 0xBFE, 0x0000 );
|
||||||
|
uboard = (volatile UBYTE*)board;
|
||||||
|
|
||||||
|
*(uboard+0xBFE) = 0xda;
|
||||||
|
ul = READREG( board, 0xBFE );
|
||||||
|
if( ul != 0xda00 )
|
||||||
|
{
|
||||||
|
Printf("Board error: expected 0xDA00, got 0x%lx on upper byte test\n",ul);
|
||||||
|
ret = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
WRITEREG( board, 0xBFE, 0x0000 );
|
||||||
|
*(uboard+0xBFF) = 0xbf;
|
||||||
|
ul = READREG( board, 0xBFE );
|
||||||
|
if( ul != 0x00bf )
|
||||||
|
{
|
||||||
|
Printf("Board error: expected 0x00BF, got 0x%lx on lower byte test\n",ul);
|
||||||
|
ret = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( ret )
|
||||||
|
Printf("Error(s) encountered\n");
|
||||||
|
else
|
||||||
|
Printf("Board looking good as far as tested\n");
|
||||||
|
|
||||||
|
quit:
|
||||||
|
if( ExpansionBase )
|
||||||
|
CloseLibrary(ExpansionBase);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
(C) 2018 Henryk Richter <henryk.richter@gmx.net>
|
(C) 2018 Henryk Richter <henryk.richter@gmx.net>
|
||||||
|
|
||||||
SDNet hardware interface to device
|
Matze-Scrat-Buggs ZII card hardware interface to device
|
||||||
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
@@ -73,6 +73,8 @@ void myhw_ControlIntervalTimer( DEVBASEP );
|
|||||||
|
|
||||||
hw_config_init() - set defaults for HW
|
hw_config_init() - set defaults for HW
|
||||||
hw_config_update() - update config of HW
|
hw_config_update() - update config of HW
|
||||||
|
|
||||||
|
hw_get_mac_status() - running parameters
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const BYTE exp_name[] = "expansion.library";
|
const BYTE exp_name[] = "expansion.library";
|
||||||
@@ -85,11 +87,10 @@ ASM SAVEDS LONG hw_Find_Boards( ASMR(a0) DEVBASEP ASMREG(a0) )
|
|||||||
struct Library *ExpansionBase;
|
struct Library *ExpansionBase;
|
||||||
struct ConfigDev *cfg = (0);
|
struct ConfigDev *cfg = (0);
|
||||||
|
|
||||||
if( (ExpansionBase = OpenLibrary( exp_name, 37 )) )
|
if( (ExpansionBase = OpenLibrary( (BYTE*)exp_name, 37 )) )
|
||||||
{
|
{
|
||||||
/* TODO: check for expansion port, i.e. distinguish V500/V600 */
|
|
||||||
/* TODO: actually verify that we have a module here */
|
/* TODO: actually verify that we have a module here */
|
||||||
ret = 1;
|
/* ret = 1; */
|
||||||
|
|
||||||
for( i=0 ; i < MAX_UNITS ; i++ )
|
for( i=0 ; i < MAX_UNITS ; i++ )
|
||||||
{
|
{
|
||||||
@@ -322,8 +323,64 @@ ASM SAVEDS LONG hw_check_link_change( ASMR(a0) DEVBASEP ASMREG(
|
|||||||
return 1; /* don't signal panic to the outside, everything is under control */
|
return 1; /* don't signal panic to the outside, everything is under control */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* obtain running parameters of Ethernet MAC: link up/down, Speed, Duplex */
|
||||||
|
ASM SAVEDS LONG hw_get_mac_status( ASMR(a0) DEVBASEP ASMREG(a0),
|
||||||
|
ASMR(d0) ULONG unit ASMREG(d0) )
|
||||||
|
{
|
||||||
|
struct HWData *hwd = &db->db_hwdat;
|
||||||
|
APTR boardbase = db->db_Units[unit].duh_BASE;
|
||||||
|
|
||||||
|
LONG ret;
|
||||||
|
LONG phstat3;
|
||||||
|
LONG phstat1;
|
||||||
|
LONG phcon1;
|
||||||
|
|
||||||
|
enc624j6l_ReadPHY( boardbase, PHSTAT1 );
|
||||||
|
phstat3 = enc624j6l_ReadPHY( boardbase, PHSTAT3 );
|
||||||
|
phcon1 = enc624j6l_ReadPHY( boardbase, PHCON1 );
|
||||||
|
phstat1 = enc624j6l_ReadPHY( boardbase, PHSTAT1 ); /* read again to see whether link is established */
|
||||||
|
if( ( phstat1 < 0 ) || ( phstat3 < 0 ) )
|
||||||
|
return HW_MAC_INVALID; /* no valid data found */
|
||||||
|
|
||||||
|
/* a) check Link */
|
||||||
|
ret = 0;
|
||||||
|
if( phstat1 & PHSTAT1_LLSTAT )
|
||||||
|
{
|
||||||
|
ret |= HW_MAC_LINK_UP;
|
||||||
|
|
||||||
|
/* if( phstat1 & PHSTAT1_ANDONE ) */ /* autonegotiation successful */
|
||||||
|
if( phcon1 & PHCON1_ANEN ) /* autonegotiation enabled */
|
||||||
|
ret |= HW_MAC_AUTONEGOTIATION;
|
||||||
|
|
||||||
|
phstat3 = (phstat3>>2)&7; /* get active Speed/Duplex */
|
||||||
|
switch( phstat3 )
|
||||||
|
{
|
||||||
|
case 6:
|
||||||
|
if( hwd->flowcontrol )
|
||||||
|
ret |= (HW_MAC_ON_FDX_FC<<HW_MACB_SPEED100);
|
||||||
|
else
|
||||||
|
ret |= (HW_MAC_ON_FDX<<HW_MACB_SPEED100);
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
if( hwd->flowcontrol )
|
||||||
|
ret |= (HW_MAC_ON_FDX_FC<<HW_MACB_SPEED10);
|
||||||
|
else
|
||||||
|
ret |= (HW_MAC_ON_FDX<<HW_MACB_SPEED10);
|
||||||
|
break;
|
||||||
|
case 2: ret |= (HW_MAC_ON<<HW_MACB_SPEED100);
|
||||||
|
break;
|
||||||
|
case 1: ret |= (HW_MAC_ON<<HW_MACB_SPEED10);
|
||||||
|
break;
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
ASM SAVEDS LONG hw_change_multicast( ASMR(a0) DEVBASEP ASMREG(a0),
|
ASM SAVEDS LONG hw_change_multicast( ASMR(a0) DEVBASEP ASMREG(a0),
|
||||||
ASMR(a0) ULONG unit ASMREG(d0),
|
ASMR(d0) ULONG unit ASMREG(d0),
|
||||||
ASMR(a1) struct List *mcastlist ASMREG(a1) )
|
ASMR(a1) struct List *mcastlist ASMREG(a1) )
|
||||||
{
|
{
|
||||||
/* TODO: implement Multicast hashing */
|
/* TODO: implement Multicast hashing */
|
||||||
@@ -339,7 +396,7 @@ ASM SAVEDS LONG hw_change_multicast( ASMR(a0) DEVBASEP ASMREG(
|
|||||||
if( mcastlist->lh_Head->ln_Succ )
|
if( mcastlist->lh_Head->ln_Succ )
|
||||||
flags |= PIO_INIT_MULTI_CAST;
|
flags |= PIO_INIT_MULTI_CAST;
|
||||||
|
|
||||||
enc624j6l_broadcast_multicast_filter(boardbase, flags );/* flags & (PIO_INIT_BROAD_CAST|PIO_INIT_MULTI_CAST) ); */
|
enc624j6l_bc_mc_filter(boardbase, flags );/* flags & (PIO_INIT_BROAD_CAST|PIO_INIT_MULTI_CAST) ); */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -366,6 +423,7 @@ void myhw_ControlInterrupts( DEVBASEP )
|
|||||||
hwd->hwd_act_boards[flag] = (0); /* NULL-terminate */
|
hwd->hwd_act_boards[flag] = (0); /* NULL-terminate */
|
||||||
hwd->hwd_act_boards[flag+1] = (APTR)FindTask(0); /* append task */
|
hwd->hwd_act_boards[flag+1] = (APTR)FindTask(0); /* append task */
|
||||||
hwd->hwd_act_boards[flag+2] = (APTR)hwd->hwd_IntSig; /* append sigbit */
|
hwd->hwd_act_boards[flag+2] = (APTR)hwd->hwd_IntSig; /* append sigbit */
|
||||||
|
hwd->hwd_act_boards[flag+3] = (APTR)db->db_SysBase; /* append ExecBase *((APTR*)0x4); */
|
||||||
|
|
||||||
if( flag ) /* determine on/off switch */
|
if( flag ) /* determine on/off switch */
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -15,11 +15,14 @@
|
|||||||
/* sdnet/v2expnet specific: polling timer */
|
/* sdnet/v2expnet specific: polling timer */
|
||||||
#include "intervaltimer.h"
|
#include "intervaltimer.h"
|
||||||
|
|
||||||
|
#define HW_VENDOR "a1k.org Matze Buggs Scrat"
|
||||||
|
#define HW_PRODUCT "Zorro LAN IDE CP"
|
||||||
|
|
||||||
/* this struct is available in devicebase and should carry global information */
|
/* this struct is available in devicebase and should carry global information */
|
||||||
struct HWData {
|
struct HWData {
|
||||||
struct Interrupt hwd_Interrupt; /* keep the interrupt at top of HWData !! */
|
struct Interrupt hwd_Interrupt; /* keep the interrupt at top of HWData !! */
|
||||||
struct SignalSemaphore hwd_Sem; /* list locking (global per unit) */
|
struct SignalSemaphore hwd_Sem; /* list locking (global per unit) */
|
||||||
APTR hwd_act_boards[MAX_UNITS+1+2]; /* poll all active boards by ptr in interrupt, NULL terminated, followed by SigTask,Sigbit */
|
APTR hwd_act_boards[MAX_UNITS+1+3]; /* poll all active boards by ptr in interrupt, NULL terminated, followed by SigTask,Sigbit,ExecBase */
|
||||||
|
|
||||||
ULONG hwd_SigMask; /* signal mask to wait for in server main instance */
|
ULONG hwd_SigMask; /* signal mask to wait for in server main instance */
|
||||||
|
|
||||||
|
|||||||
@@ -439,6 +439,17 @@
|
|||||||
#define EIDLED_REVID1 (1<<1)
|
#define EIDLED_REVID1 (1<<1)
|
||||||
#define EIDLED_REVID0 (1)
|
#define EIDLED_REVID0 (1)
|
||||||
|
|
||||||
|
/* ; PHY REGISTERS */
|
||||||
|
#define PHCON1 0
|
||||||
|
#define PHSTAT1 1
|
||||||
|
#define PHANA 4
|
||||||
|
#define PHANLPA 5
|
||||||
|
#define PHANE 6
|
||||||
|
#define PHCON2 0x11
|
||||||
|
#define PHSTAT2 0x1b
|
||||||
|
#define PHSTAT3 0x1f
|
||||||
|
|
||||||
|
|
||||||
/* PHCON1 bits --------- */
|
/* PHCON1 bits --------- */
|
||||||
#define PHCON1_PRST (1<<15)
|
#define PHCON1_PRST (1<<15)
|
||||||
#define PHCON1_PLOOPBK (1<<14)
|
#define PHCON1_PLOOPBK (1<<14)
|
||||||
|
|||||||
@@ -437,6 +437,16 @@ EIDLED_REVID2 EQU (1<<2)
|
|||||||
EIDLED_REVID1 EQU (1<<1)
|
EIDLED_REVID1 EQU (1<<1)
|
||||||
EIDLED_REVID0 EQU (1)
|
EIDLED_REVID0 EQU (1)
|
||||||
|
|
||||||
|
; PHY REGISTERS
|
||||||
|
PHCON1 EQU 0
|
||||||
|
PHSTAT1 EQU 1
|
||||||
|
PHANA EQU 4
|
||||||
|
PHANLPA EQU 5
|
||||||
|
PHANE EQU 6
|
||||||
|
PHCON2 EQU $11
|
||||||
|
PHSTAT2 EQU $1b
|
||||||
|
PHSTAT3 EQU $1f
|
||||||
|
|
||||||
; PHCON1 bits ---------
|
; PHCON1 bits ---------
|
||||||
PHCON1_PRST EQU (1<<15)
|
PHCON1_PRST EQU (1<<15)
|
||||||
PHCON1_PLOOPBK EQU (1<<14)
|
PHCON1_PLOOPBK EQU (1<<14)
|
||||||
@@ -598,5 +608,6 @@ CLOCK_16_SET EQU (ECON2_COCON2) ;set mask
|
|||||||
CLOCK_4_CLR EQU (ECON2_COCON2) ;clr mask
|
CLOCK_4_CLR EQU (ECON2_COCON2) ;clr mask
|
||||||
CLOCK_4_SET EQU (ECON2_COCON3|ECON2_COCON0|ECON2_COCON1) ;set mask
|
CLOCK_4_SET EQU (ECON2_COCON3|ECON2_COCON0|ECON2_COCON1) ;set mask
|
||||||
|
|
||||||
|
; changed to 25 MHz for ZIII firmware
|
||||||
CLOCK_DEF_CLR EQU CLOCK_25_CLR
|
CLOCK_DEF_CLR EQU CLOCK_25_CLR
|
||||||
CLOCK_DEF_SET EQU CLOCK_25_SET
|
CLOCK_DEF_SET EQU CLOCK_25_SET
|
||||||
|
|||||||
@@ -20,6 +20,41 @@ struct devbase;
|
|||||||
#define DEVBASEP DEVBASETYPE *db
|
#define DEVBASEP DEVBASETYPE *db
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* states for each NIC speed */
|
||||||
|
#define HW_MAC_ISACTIVE(_status_,_spd_) ( ((_status_)>>(_spd_)) & 3 ) /* returns 0 if inactive, 0...3 if active */
|
||||||
|
#define HW_MAC_OFF 0 /* this speed is inactive */
|
||||||
|
#define HW_MAC_ON 1 /* on, half duplex */
|
||||||
|
#define HW_MAC_ON_FDX 2 /* on, full duplex */
|
||||||
|
#define HW_MAC_ON_FDX_FC 3 /* on, full duplex, flow-control */
|
||||||
|
|
||||||
|
/*
|
||||||
|
MAC definitions
|
||||||
|
(flag Mask)
|
||||||
|
-> conceptually, this layout can be used for current
|
||||||
|
running mode as well as autonegotiation capabilities
|
||||||
|
masks for local NIC and peer
|
||||||
|
-> is fiber optic Ethernet relevant for us Amigans?
|
||||||
|
*/
|
||||||
|
#define HW_MAC_INVALID (-1) /* no info available */
|
||||||
|
#define HW_MAC_LINK_UP 1 /* link is up */
|
||||||
|
#define HW_MAC_AUTONEGOTIATION 2 /* autonegotiation enabled */
|
||||||
|
|
||||||
|
/* two bits each to handle the four different states per speed */
|
||||||
|
#define HW_MACB_SPEED10 2 /* bit for 10 MBit/s mask */
|
||||||
|
#define HW_MACB_SPEED100 4 /* bit for 100 MBit/s mask */
|
||||||
|
#define HW_MACB_SPEED100T2 6 /* bit for 100 MBit/s mask (100BaseT2) */
|
||||||
|
#define HW_MACB_SPEED100T4 8 /* bit for 100 MBit/s mask (100BaseT4) */
|
||||||
|
#define HW_MACB_SPEED1000 10 /* ... */
|
||||||
|
#define HW_MACB_SPEED2500 12
|
||||||
|
#define HW_MACB_SPEED5000 14
|
||||||
|
#define HW_MACB_SPEED10000 16 /* Am I optimistic ? */
|
||||||
|
#define HW_MACB_SPEEDS_END 18 /* this is the next free bit */
|
||||||
|
#define HW_MAC_SPEEDSMASK ((1<<HW_MACB_SPEEDS_END)-4)
|
||||||
|
#define HW_MAC_NEXTSPEED(_a_) ( (_a_)+2 )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* find number of boards (stateless) */
|
/* find number of boards (stateless) */
|
||||||
ASM SAVEDS LONG hw_Find_Boards( ASMR(a0) DEVBASEP ASMREG(a0) );
|
ASM SAVEDS LONG hw_Find_Boards( ASMR(a0) DEVBASEP ASMREG(a0) );
|
||||||
@@ -75,9 +110,11 @@ ASM SAVEDS LONG hw_check_link_change( ASMR(a0) DEVBASEP ASMREG(
|
|||||||
ASMR(d0) ULONG unit ASMREG(d0) );
|
ASMR(d0) ULONG unit ASMREG(d0) );
|
||||||
|
|
||||||
ASM SAVEDS LONG hw_change_multicast( ASMR(a0) DEVBASEP ASMREG(a0),
|
ASM SAVEDS LONG hw_change_multicast( ASMR(a0) DEVBASEP ASMREG(a0),
|
||||||
ASMR(a0) ULONG unit ASMREG(d0),
|
ASMR(d0) ULONG unit ASMREG(d0),
|
||||||
ASMR(a1) struct List * ASMREG(a1) );
|
ASMR(a1) struct List * ASMREG(a1) );
|
||||||
|
|
||||||
|
ASM SAVEDS LONG hw_get_mac_status( ASMR(a0) DEVBASEP ASMREG(a0),
|
||||||
|
ASMR(d0) ULONG unit ASMREG(d0) );
|
||||||
|
|
||||||
/* kept this global for now: Z-II/Z-III boards share the same interrupt */
|
/* kept this global for now: Z-II/Z-III boards share the same interrupt */
|
||||||
ASM SAVEDS ULONG hw_recv_sigmask( ASMR(a0) DEVBASEP ASMREG(a0) );
|
ASM SAVEDS ULONG hw_recv_sigmask( ASMR(a0) DEVBASEP ASMREG(a0) );
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
;
|
||||||
|
; hw.i
|
||||||
|
;
|
||||||
|
; (C) 2018 Henryk Richter <henryk.richter@gmx.net>
|
||||||
|
;
|
||||||
|
; Hardware dependent definitions
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;
|
||||||
|
ifnd _INC_HW_I
|
||||||
|
_INC_HW_I EQU 1
|
||||||
|
|
||||||
|
;/* states for each NIC speed */
|
||||||
|
HW_MAC_OFF EQU 0 ; this speed is inactive
|
||||||
|
HW_MAC_ON EQU 1 ; on, half duplex
|
||||||
|
HW_MAC_ON_FDX EQU 2 ; on, full duplex
|
||||||
|
HW_MAC_ON_FDX_FC EQU 3 ; on, full duplex, flow-control
|
||||||
|
|
||||||
|
;
|
||||||
|
;
|
||||||
|
; MAC definitions
|
||||||
|
; (flag Mask)
|
||||||
|
; -> conceptually, this layout can be used for current
|
||||||
|
; running mode as well as autonegotiation capabilities
|
||||||
|
; masks for local NIC and peer
|
||||||
|
;
|
||||||
|
HW_MAC_INVALID EQU -1 ; no info available
|
||||||
|
HW_MACB_LINK_UP EQU 0
|
||||||
|
HW_MACB_AUTONEGOTIATION EQU 1
|
||||||
|
HW_MAC_LINK_UP EQU (1<<HW_MACB_LINK_UP) ; link is up
|
||||||
|
HW_MAC_AUTONEGOTIATION EQU (1<<HW_MACB_AUTONEGOTIATION) ; autonegotiation enabled
|
||||||
|
|
||||||
|
; two bits each to handle the four different states per speed
|
||||||
|
HW_MACB_SPEED10 EQU 2 ; bit for 10 MBit/s mask
|
||||||
|
HW_MACB_SPEED100 EQU 4 ; bit for 100 MBit/s mask
|
||||||
|
HW_MACB_SPEED1000 EQU 6 ; ...
|
||||||
|
HW_MACB_SPEED2500 EQU 8
|
||||||
|
HW_MACB_SPEED5000 EQU 10
|
||||||
|
HW_MACB_SPEED10000 EQU 12 ; Am I optimistic ?
|
||||||
|
HW_MACB_SPEEDS_END EQU 14 ; this is the next free bit
|
||||||
|
HW_MAC_SPEEDSMASK EQU ((1<<HW_MACB_SPEEDS_END)-4)
|
||||||
|
|
||||||
|
endc ;_INC_HW_I
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
#ifndef DEVICES_NEWSTYLE_H
|
||||||
|
#define DEVICES_NEWSTYLE_H
|
||||||
|
/*------------------------------------------------------------------------*/
|
||||||
|
/*
|
||||||
|
* $Id: newstyle.h 1.1 1997/05/15 18:53:15 heinz Exp $
|
||||||
|
*
|
||||||
|
* Support header for the New Style Device standard
|
||||||
|
*
|
||||||
|
* (C)1996-1997 by Amiga International, Inc.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
/*------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* At the moment there is just a single new style general command:
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define NSCMD_DEVICEQUERY 0x4000
|
||||||
|
|
||||||
|
struct NSDeviceQueryResult {
|
||||||
|
/*
|
||||||
|
** Standard information, must be reset for every query
|
||||||
|
*/
|
||||||
|
ULONG DevQueryFormat; /* this is type 0 */
|
||||||
|
ULONG SizeAvailable; /* bytes available */
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Common information (READ ONLY!)
|
||||||
|
*/
|
||||||
|
UWORD DeviceType; /* what the device does */
|
||||||
|
UWORD DeviceSubType; /* depends on the main type */
|
||||||
|
UWORD *SupportedCommands; /* 0 terminated list of cmd's */
|
||||||
|
|
||||||
|
/* May be extended in the future! Check SizeAvailable! */
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#define NSDEVTYPE_UNKNOWN 0 /* No suitable category, anything */
|
||||||
|
#define NSDEVTYPE_GAMEPORT 1 /* like gameport.device */
|
||||||
|
#define NSDEVTYPE_TIMER 2 /* like timer.device */
|
||||||
|
#define NSDEVTYPE_KEYBOARD 3 /* like keyboard.device */
|
||||||
|
#define NSDEVTYPE_INPUT 4 /* like input.device */
|
||||||
|
#define NSDEVTYPE_TRACKDISK 5 /* like trackdisk.device */
|
||||||
|
#define NSDEVTYPE_CONSOLE 6 /* like console.device */
|
||||||
|
#define NSDEVTYPE_SANA2 7 /* A >=SANA2R2 networking device */
|
||||||
|
#define NSDEVTYPE_AUDIO 8 /* like audio.device */
|
||||||
|
#define NSDEVTYPE_CLIPBOARD 9 /* like clipboard.device */
|
||||||
|
#define NSDEVTYPE_PRINTER 10 /* like printer.device */
|
||||||
|
#define NSDEVTYPE_SERIAL 11 /* like serial.device */
|
||||||
|
#define NSDEVTYPE_PARALLEL 12 /* like parallel.device */
|
||||||
|
|
||||||
|
|
||||||
|
/*------------------------------------------------------------------------*/
|
||||||
|
/* The following defines should really be part of device specific
|
||||||
|
* includes. So we protect them from being redefined.
|
||||||
|
*/
|
||||||
|
#ifndef NSCMD_TD_READ64
|
||||||
|
/*
|
||||||
|
* An early new style trackdisk like device can also return this
|
||||||
|
* new identifier for TD_GETDRIVETYPE. This should no longer
|
||||||
|
* be the case though for newly written or updated NSD devices.
|
||||||
|
* This identifier is ***OBSOLETE***
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define DRIVE_NEWSTYLE (0x4E535459L) /* 'NSTY' */
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* At the moment, only four new style commands in the device
|
||||||
|
* specific range and their ETD counterparts may be implemented.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define NSCMD_TD_READ64 0xC000
|
||||||
|
#define NSCMD_TD_WRITE64 0xC001
|
||||||
|
#define NSCMD_TD_SEEK64 0xC002
|
||||||
|
#define NSCMD_TD_FORMAT64 0xC003
|
||||||
|
|
||||||
|
#define NSCMD_ETD_READ64 0xE000
|
||||||
|
#define NSCMD_ETD_WRITE64 0xE001
|
||||||
|
#define NSCMD_ETD_SEEK64 0xE002
|
||||||
|
#define NSCMD_ETD_FORMAT64 0xE003
|
||||||
|
#endif /* NSCMD_TD_READ64 */
|
||||||
|
|
||||||
|
/*------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#endif /* DEVICES_NEWSTYLE_H */
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
#ifndef SANA2_SANA2DEVQUERYEXT_H
|
||||||
|
#define SANA2_SANA2DEVQUERYEXT_H
|
||||||
|
|
||||||
|
/*
|
||||||
|
** $VER: sana2devqueryext.h 0.12 (10-Jun-2018)
|
||||||
|
** Definitions for SANA-II extended device query
|
||||||
|
** (c) 2018, Timm S. Mueller and Olaf Barthel
|
||||||
|
**
|
||||||
|
** Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
** a copy of this file, without limitation the rights to copy, publish,
|
||||||
|
** and distribute this file in unmodified form, and to use it for the
|
||||||
|
** creation of software.
|
||||||
|
** We strongly advise you not to release software into the public based on
|
||||||
|
** modifications or extensions of the definitions below, without seeking
|
||||||
|
** prior agreement with the authors regarding your changes.
|
||||||
|
**
|
||||||
|
** Application protocol:
|
||||||
|
** 1. Using NSCMD_DEVICEQUERY, check for availability of S2_DEVICEQUERYEXT.
|
||||||
|
** 2. For each attribute provide a struct S2DevQueryExtParam. Fill in a
|
||||||
|
** pointer to your data, its length, and initialize Actual to 0.
|
||||||
|
** 3. For each attribute requested, supply a tagitem with a pointer to the
|
||||||
|
** respective S2DevQueryExtParam structure as its value. Pass the taglist
|
||||||
|
** in ios2_Data. After return from the device and no I/O error,
|
||||||
|
** 4. check for the expected data size using param.Actual == sizeof(value).
|
||||||
|
** Check for the presence of any returned data using param.Actual != 0.
|
||||||
|
** The length of strings include a terminating zero byte, so param.Actual
|
||||||
|
** for a string of length 0 would be 1.
|
||||||
|
** 5. To only retrieve the number of bytes that would be written, set
|
||||||
|
** param.Data to NULL.
|
||||||
|
** 6. Unless otherwise noted, numerical values are of type ULONG by default.
|
||||||
|
**
|
||||||
|
** Driver protocol:
|
||||||
|
** 1. Support S2_DEVICEQUERYEXT per NSCMD_DEVICEQUERY.
|
||||||
|
** 2. Iterate supplied tags in ios2_Data. For each tag,
|
||||||
|
** 3. if param->Data is NULL, write the length that would be written
|
||||||
|
** into param->Actual. In the case of strings, always include the
|
||||||
|
** terminating zero byte in this length.
|
||||||
|
** 4. If param->Data is not NULL, check for
|
||||||
|
** param->Length >= sizeof(your_data). Copy your data into the
|
||||||
|
** buffer provided by param->Data. Under no circumstance may the length
|
||||||
|
** being written exceed param->Length. Write the length actually being
|
||||||
|
** written into param->Actual. At your discretion, shorten informative,
|
||||||
|
** non-indexing strings to fit into the user-supplied buffer -- but you
|
||||||
|
** are not allowed to write strings without a terminating zero byte,
|
||||||
|
** which must fit into the buffer as indicated by param->Length.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <devices/sana2.h>
|
||||||
|
|
||||||
|
struct S2DevQueryExtParam
|
||||||
|
{
|
||||||
|
APTR Data; /* Ptr to data buffer you provide */
|
||||||
|
LONG Length; /* Length of data buffer you provide */
|
||||||
|
LONG Actual; /* Number of bytes actually written */
|
||||||
|
};
|
||||||
|
|
||||||
|
#define S2_DEVICEQUERYEXT (S2_START + 0x100)
|
||||||
|
#define S2_DevQueryExtTagBase (S2_Dummy + 0x100)
|
||||||
|
|
||||||
|
/* ptr to string containing the vendor name: */
|
||||||
|
#define S2_DevQueryExtVendorName (S2_DevQueryExtTagBase + 1)
|
||||||
|
/* ptr to string containing the product name: */
|
||||||
|
#define S2_DevQueryExtProductName (S2_DevQueryExtTagBase + 2)
|
||||||
|
/* Current physical link status, see definitions below: */
|
||||||
|
#define S2_DevQueryExtLinkStatus (S2_DevQueryExtTagBase + 3)
|
||||||
|
/* Current physical link speed, see definitions below: */
|
||||||
|
#define S2_DevQueryExtLinkSpeed (S2_DevQueryExtTagBase + 4)
|
||||||
|
|
||||||
|
#define S2_DEVQUERYEXT_LINK_UNDEFINED 0xffffffff
|
||||||
|
#define S2_DEVQUERYEXT_LINK_DOWN 0
|
||||||
|
#define S2_DEVQUERYEXT_LINK_UP 1
|
||||||
|
|
||||||
|
#define S2_DEVQUERYEXT_SPEED_UNDEFINED 0xffffffff
|
||||||
|
#define S2_DEVQUERYEXT_SPEED_OTHER 0
|
||||||
|
#define S2_DEVQUERYEXT_SPEED_10M 1
|
||||||
|
#define S2_DEVQUERYEXT_SPEED_100M 2
|
||||||
|
#define S2_DEVQUERYEXT_SPEED_1000M 3
|
||||||
|
#define S2_DEVQUERYEXT_SPEED_10000M 4
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -337,7 +337,7 @@ u08 enc28j60_init(const u08 macaddr[6], u08 flags)
|
|||||||
|
|
||||||
SetBank(EIR);
|
SetBank(EIR);
|
||||||
writeOp(ENC28J60_BIT_FIELD_CLR, EIR, EIR_DMAIF|EIR_LINKIF|EIR_TXIF|EIR_TXERIF|EIR_RXERIF|EIR_PKTIF);
|
writeOp(ENC28J60_BIT_FIELD_CLR, EIR, EIR_DMAIF|EIR_LINKIF|EIR_TXIF|EIR_TXERIF|EIR_RXERIF|EIR_PKTIF);
|
||||||
writeOp(ENC28J60_BIT_FIELD_SET, EIE, EIE_INTIE|EIE_PKTIE|EIE_LINKIE|EIE_TXIE|EIE_TXERIE|EIE_RXERIE);
|
writeOp(ENC28J60_BIT_FIELD_SET, EIE, EIE_INTIE|EIE_PKTIE); /* |EIE_LINKIE|EIE_TXIE|EIE_TXERIE|EIE_RXERIE); */
|
||||||
|
|
||||||
writeOp(ENC28J60_BIT_FIELD_SET, ECON1, ECON1_RXEN);
|
writeOp(ENC28J60_BIT_FIELD_SET, ECON1, ECON1_RXEN);
|
||||||
|
|
||||||
@@ -441,6 +441,9 @@ u08 enc28j60_status(u08 status_id, u08 *value)
|
|||||||
case PIO_STATUS_LINK_UP:
|
case PIO_STATUS_LINK_UP:
|
||||||
*value = (readPhyByte(PHSTAT2) >> 2) & 1;
|
*value = (readPhyByte(PHSTAT2) >> 2) & 1;
|
||||||
return PIO_OK;
|
return PIO_OK;
|
||||||
|
case PIO_STATUS_FULLDPX:
|
||||||
|
*value = (readRegByte(MACON3) & MACON3_FULDPX) ? 1 : 0;/* + (((u16)readRegByte(MACON1+3))<<8); */
|
||||||
|
return PIO_OK;
|
||||||
default:
|
default:
|
||||||
*value = 0;
|
*value = 0;
|
||||||
return PIO_NOT_FOUND;
|
return PIO_NOT_FOUND;
|
||||||
@@ -469,6 +472,13 @@ u08 enc28j60_send(const u08 *data, u16 size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* write buffer */
|
/* write buffer */
|
||||||
|
#if 0
|
||||||
|
if(0)
|
||||||
|
{ u08* d = (u08*)data;
|
||||||
|
d[size]=0;
|
||||||
|
size=(size+1)&0xfffe;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
enc28j60l_WriteBuffer( (u08*)data, size, TXSTART_INIT );
|
enc28j60l_WriteBuffer( (u08*)data, size, TXSTART_INIT );
|
||||||
|
|
||||||
/* initiate send */
|
/* initiate send */
|
||||||
@@ -559,6 +569,14 @@ u08 enc28j60_recv(u08 *data, u16 max_size, u16 *got_size)
|
|||||||
|
|
||||||
/* read packet */
|
/* read packet */
|
||||||
readBuf(len, data);
|
readBuf(len, data);
|
||||||
|
#if 0
|
||||||
|
{
|
||||||
|
data[len]=0;
|
||||||
|
data[len+1]=0;
|
||||||
|
data[len+2]=0;
|
||||||
|
data[len+3]=0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
next_pkt();
|
next_pkt();
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -42,6 +42,7 @@
|
|||||||
/* status flags */
|
/* status flags */
|
||||||
#define PIO_STATUS_VERSION 0
|
#define PIO_STATUS_VERSION 0
|
||||||
#define PIO_STATUS_LINK_UP 1
|
#define PIO_STATUS_LINK_UP 1
|
||||||
|
#define PIO_STATUS_FULLDPX 2
|
||||||
|
|
||||||
/* control ids */
|
/* control ids */
|
||||||
#define PIO_CONTROL_FLOW 0
|
#define PIO_CONTROL_FLOW 0
|
||||||
|
|||||||
@@ -6,6 +6,9 @@
|
|||||||
; Note: This code is in some places intentionally saving more registers than
|
; Note: This code is in some places intentionally saving more registers than
|
||||||
; required by the AmigaOS ABI.
|
; required by the AmigaOS ABI.
|
||||||
;
|
;
|
||||||
|
ifnd _LVOSignal
|
||||||
|
_LVOSignal EQU -324
|
||||||
|
endc
|
||||||
|
|
||||||
; enable debugging code block
|
; enable debugging code block
|
||||||
DEBUG EQU 0
|
DEBUG EQU 0
|
||||||
@@ -32,6 +35,12 @@ _OPT_SHORT_DELAY EQU 1 ;small delays by a single CIA read
|
|||||||
XDEF _enc28j60l_Shutdown
|
XDEF _enc28j60l_Shutdown
|
||||||
XDEF _enc28j60l_SetSPISpeed
|
XDEF _enc28j60l_SetSPISpeed
|
||||||
|
|
||||||
|
ifd PROTO_V2EXPNET
|
||||||
|
; interrupt stuff, used only with V2EXPETH right now
|
||||||
|
XDEF _enc28j60l_IntServer_List
|
||||||
|
XDEF _enc28j60l_EnableInterrupt
|
||||||
|
XDEF _enc28j60l_DisableInterrupt
|
||||||
|
endc
|
||||||
;
|
;
|
||||||
;
|
;
|
||||||
; hardware support functions without SPI register banging
|
; hardware support functions without SPI register banging
|
||||||
@@ -300,6 +309,7 @@ SDCARD_DATA_R EQU $00DE0010
|
|||||||
SDCARD_CFG_W EQU $00DE0014
|
SDCARD_CFG_W EQU $00DE0014
|
||||||
SDCARD_STATUS_R EQU $00DE0016
|
SDCARD_STATUS_R EQU $00DE0016
|
||||||
SDCARD_CFG_SPEED EQU $00DE001C
|
SDCARD_CFG_SPEED EQU $00DE001C
|
||||||
|
SDCARD_INT_ENABLE EQU $00DE0018
|
||||||
else ;PROTO_V2EXPNET
|
else ;PROTO_V2EXPNET
|
||||||
; PROTO_SDNET
|
; PROTO_SDNET
|
||||||
SDCARD_DATA_W EQU $00DE0000
|
SDCARD_DATA_W EQU $00DE0000
|
||||||
@@ -307,6 +317,7 @@ SDCARD_DATA_R EQU $00DE0000
|
|||||||
SDCARD_CFG_W EQU $00DE0004
|
SDCARD_CFG_W EQU $00DE0004
|
||||||
SDCARD_STATUS_R EQU $00DE0006
|
SDCARD_STATUS_R EQU $00DE0006
|
||||||
SDCARD_CFG_SPEED EQU $00DE000C
|
SDCARD_CFG_SPEED EQU $00DE000C
|
||||||
|
SDCARD_INT_ENABLE EQU $00DE0008
|
||||||
endc ;PROTO_V2EXPNET
|
endc ;PROTO_V2EXPNET
|
||||||
|
|
||||||
SDCARD_SPEED EQU $20 ;this one is obsolete
|
SDCARD_SPEED EQU $20 ;this one is obsolete
|
||||||
@@ -999,6 +1010,107 @@ skip$
|
|||||||
rts$
|
rts$
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
;-----------------------------------------------------------------------
|
||||||
|
ifd PROTO_V2EXPNET
|
||||||
|
|
||||||
|
;---------------------------------------------------------------------------------------
|
||||||
|
;
|
||||||
|
; Hardware interrupt service routine for a list of boards
|
||||||
|
;
|
||||||
|
; In: A1 - is_data = board base address list
|
||||||
|
;
|
||||||
|
; Out: -
|
||||||
|
;
|
||||||
|
; Notes: - assumes that init() was called before
|
||||||
|
; - process list of board addresses and check for active interrupt(s)
|
||||||
|
; list layout:
|
||||||
|
; ULONG enableflag
|
||||||
|
; APTR board1,
|
||||||
|
; APTR board2,...
|
||||||
|
; APTR (0)
|
||||||
|
; APTR sigtask
|
||||||
|
; ULONG sigbit
|
||||||
|
;
|
||||||
|
_enc28j60l_IntServer_List:
|
||||||
|
movem.l d3/a6,-(sp)
|
||||||
|
|
||||||
|
move.l a1,d0 ;no pointer supplied ? -> return
|
||||||
|
beq.s .rts
|
||||||
|
move.l a1,a6
|
||||||
|
|
||||||
|
tst.l (a1)+ ;interrupt processing enabled ?
|
||||||
|
beq.s .rts_disable ;
|
||||||
|
|
||||||
|
moveq #0,d1
|
||||||
|
.boardloop:
|
||||||
|
move.l (a1)+,d0 ;next entry from list
|
||||||
|
beq.s .done ;
|
||||||
|
move.l d0,a0 ;current board
|
||||||
|
|
||||||
|
move.b #EPKTCNT,d0
|
||||||
|
bsr _enc28j60l_ReadRegByte
|
||||||
|
or.b d0,d1
|
||||||
|
|
||||||
|
bra.s .boardloop
|
||||||
|
.done:
|
||||||
|
tst.w d1
|
||||||
|
beq.s .rts
|
||||||
|
|
||||||
|
clr.l (a6)+ ;disable interrupt processing further on
|
||||||
|
|
||||||
|
; clear EIE_INTIE in all active boards directly from here
|
||||||
|
.intdis_loop:
|
||||||
|
move.l (a6)+,d0
|
||||||
|
beq.s .boardsdone
|
||||||
|
|
||||||
|
move.w #$0000,SDCARD_INT_ENABLE
|
||||||
|
;
|
||||||
|
;move.w #ENC28J60_BIT_FIELD_CLR,d3
|
||||||
|
;moveq #EIE,d0
|
||||||
|
;moveq #EIE_INTIE|EIE_PKTIE,d1
|
||||||
|
;bsr _enc28j60l_WriteOp
|
||||||
|
|
||||||
|
bra.s .intdis_loop
|
||||||
|
.boardsdone:
|
||||||
|
|
||||||
|
move.l (a6)+,d0 ;Sigtask
|
||||||
|
beq.s .rts
|
||||||
|
move.l d0,a1
|
||||||
|
|
||||||
|
moveq #0,d0
|
||||||
|
move.l (a6)+,d1 ;Sigbit
|
||||||
|
bset d1,d0
|
||||||
|
|
||||||
|
move.l 4.w,a6
|
||||||
|
jsr _LVOSignal(a6)
|
||||||
|
|
||||||
|
.rts:
|
||||||
|
movem.l (sp)+,d3/a6
|
||||||
|
moveq #0,d0 ;set Z flag
|
||||||
|
rts
|
||||||
|
.rts_disable: ;
|
||||||
|
move.w #$0000,SDCARD_INT_ENABLE
|
||||||
|
bra.s .rts
|
||||||
|
|
||||||
|
|
||||||
|
; TODO: enable/disable interrupt on board
|
||||||
|
_enc28j60l_EnableInterrupt:
|
||||||
|
move.w #$8000,SDCARD_INT_ENABLE
|
||||||
|
rts
|
||||||
|
|
||||||
|
_enc28j60l_DisableInterrupt:
|
||||||
|
move.w #$0000,SDCARD_INT_ENABLE
|
||||||
|
rts
|
||||||
|
|
||||||
|
endc ;ifd PROTO_V2EXPNET
|
||||||
|
;-----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
; DEBUG
|
||||||
|
;ifd PROTO_V2EXPNET
|
||||||
|
;dc.b "exp net variant built."
|
||||||
|
;endc
|
||||||
|
|
||||||
|
|
||||||
; section data,data
|
; section data,data
|
||||||
|
|||||||
@@ -12,6 +12,49 @@
|
|||||||
|
|
||||||
#include "compiler.h"
|
#include "compiler.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
Purpose: interrupt service routine ( after EnableInterrupt() )
|
||||||
|
|
||||||
|
This function will signal the task passed at EnableInterrupt time with
|
||||||
|
the given sigbit when at least one frame is pending.
|
||||||
|
|
||||||
|
input: -
|
||||||
|
output: -
|
||||||
|
*/
|
||||||
|
ASM SAVEDS void enc28j60l_IntServer_List( void );
|
||||||
|
|
||||||
|
/*
|
||||||
|
Purpose: enable HW interrupt
|
||||||
|
|
||||||
|
input: board - mmapped board base address
|
||||||
|
SigTask - task to signal upon interrupt (or NULL)
|
||||||
|
SigBit - Signal bit to send upon interrupt (or -1)
|
||||||
|
IntMask - ENC HW interrupts to enable (set 0, for now) = RX PACKET only
|
||||||
|
|
||||||
|
output: <0 - error
|
||||||
|
>=0 - OK
|
||||||
|
|
||||||
|
notes:
|
||||||
|
*/
|
||||||
|
ASM SAVEDS int enc28j60l_EnableInterrupt( ASMR(a0) void *board ASMREG(a0),
|
||||||
|
ASMR(a1) void* SigTask ASMREG(a1),
|
||||||
|
ASMR(d0) int SigBit ASMREG(d0),
|
||||||
|
ASMR(d1) unsigned int IntMask ASMREG(d1) );
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
Purpose: disable HW interrupt
|
||||||
|
|
||||||
|
input: board - mmapped board base address
|
||||||
|
|
||||||
|
output: <0 - error
|
||||||
|
>=0 - OK
|
||||||
|
|
||||||
|
notes:
|
||||||
|
*/
|
||||||
|
ASM SAVEDS int enc28j60l_DisableInterrupt( ASMR(a0) void *board ASMREG(a0) );
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Purpose: prepare SPI for use
|
Purpose: prepare SPI for use
|
||||||
input: -
|
input: -
|
||||||
|
|||||||
@@ -16,6 +16,8 @@
|
|||||||
#include <vampire/vampire.h>
|
#include <vampire/vampire.h>
|
||||||
#include "vampuuid.h"
|
#include "vampuuid.h"
|
||||||
#include "enc28j60.h"
|
#include "enc28j60.h"
|
||||||
|
#include <hardware/intbits.h>
|
||||||
|
#include "enc28j60l.h"
|
||||||
|
|
||||||
#ifndef PROTO_V2EXPNET
|
#ifndef PROTO_V2EXPNET
|
||||||
#define PORTID V_SDPORT
|
#define PORTID V_SDPORT
|
||||||
@@ -27,6 +29,9 @@ extern const BYTE DeviceName[];
|
|||||||
|
|
||||||
/* use generic board fields in current unit */
|
/* use generic board fields in current unit */
|
||||||
#define hw_allocated du_hwl0
|
#define hw_allocated du_hwl0
|
||||||
|
#define duh_online du_hwl1
|
||||||
|
#define duh_BASE du_hwp0
|
||||||
|
|
||||||
|
|
||||||
#define HW_INTERVALDEF 10000
|
#define HW_INTERVALDEF 10000
|
||||||
#define HW_DEFSPI 2
|
#define HW_DEFSPI 2
|
||||||
@@ -58,6 +63,21 @@ extern const BYTE DeviceName[];
|
|||||||
hw_config_update() - update config of HW
|
hw_config_update() - update config of HW
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef PROTO_V2EXPNET
|
||||||
|
#define USE_INTERRUPT
|
||||||
|
|
||||||
|
/* used only if interrupts are in play (currently V2ExpETH) */
|
||||||
|
void myhw_ControlInterrupts( DEVBASEP );
|
||||||
|
const BYTE intname[] = "v2expeth SanaII driver";
|
||||||
|
#define HW_INTSOURCE INTB_PORTS /* Int 2 */
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#define myhw_ControlInterrupts( _a_ )
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
const BYTE vres_name[] = V_VAMPIRENAME;
|
const BYTE vres_name[] = V_VAMPIRENAME;
|
||||||
|
|
||||||
/* return number of boards present in system */
|
/* return number of boards present in system */
|
||||||
@@ -156,12 +176,25 @@ ASM SAVEDS LONG hw_Setup( ASMR(a0) DEVBASEP ASMREG(a0) )
|
|||||||
LONG ret = 0;
|
LONG ret = 0;
|
||||||
struct HWData *hwd = &db->db_hwdat;
|
struct HWData *hwd = &db->db_hwdat;
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef USE_INTERRUPT
|
||||||
|
hwd->IntSig = AllocSignal(-1);
|
||||||
|
hwd->hwd_Interrupt.is_Data = (0);
|
||||||
|
#ifdef PROTO_V2EXPNET
|
||||||
|
db->db_Units[0].duh_BASE = (void*)0xDE0010;
|
||||||
|
#else
|
||||||
|
db->db_Units[0].duh_BASE = (void*)0xDE0000;
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
hwd->IntSig = -1;
|
hwd->IntSig = -1;
|
||||||
|
#endif
|
||||||
|
|
||||||
if( InitIntervalTimer( &hwd->ivtimer ) > 0 )
|
if( InitIntervalTimer( &hwd->ivtimer ) > 0 )
|
||||||
{
|
{
|
||||||
hwd->SigMask = hwd->ivtimer.IVT_SigMask;
|
hwd->SigMask = hwd->ivtimer.IVT_SigMask;
|
||||||
|
#ifdef USE_INTERRUPT
|
||||||
|
hwd->SigMask |= (1<<(hwd->IntSig));
|
||||||
|
#endif
|
||||||
ret = 1;
|
ret = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -173,6 +206,9 @@ ASM SAVEDS void hw_Shutdown( ASMR(a0) DEVBASEP ASMREG(a0) )
|
|||||||
{
|
{
|
||||||
struct HWData *hwd = &db->db_hwdat;
|
struct HWData *hwd = &db->db_hwdat;
|
||||||
|
|
||||||
|
db->db_Units[0].duh_online = 0;
|
||||||
|
myhw_ControlInterrupts( db );
|
||||||
|
|
||||||
if( hwd->IntSig >= 0 )
|
if( hwd->IntSig >= 0 )
|
||||||
FreeSignal( hwd->IntSig );
|
FreeSignal( hwd->IntSig );
|
||||||
|
|
||||||
@@ -206,8 +242,14 @@ ASM SAVEDS LONG hw_Attach( ASMR(a0) DEVBASEP ASMREG(a0),
|
|||||||
ret = 0;
|
ret = 0;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
db->db_Units[0].duh_online = 1; /* used for int server and interval timer setup */
|
||||||
|
|
||||||
enc28j60_SetSPISpeed( hwd->spispeed );
|
enc28j60_SetSPISpeed( hwd->spispeed );
|
||||||
StartIntervalTimer( &hwd->ivtimer, hwd->timervalue );
|
|
||||||
|
myhw_ControlInterrupts( db );
|
||||||
|
|
||||||
|
if( hwd->timervalue > 0 )
|
||||||
|
StartIntervalTimer( &hwd->ivtimer, hwd->timervalue );
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
@@ -220,7 +262,13 @@ ASM SAVEDS void hw_Detach( ASMR(a0) DEVBASEP ASMREG(a0),
|
|||||||
if( !unit )
|
if( !unit )
|
||||||
{
|
{
|
||||||
struct HWData *hwd = &db->db_hwdat;
|
struct HWData *hwd = &db->db_hwdat;
|
||||||
|
|
||||||
|
db->db_Units[unit].duh_online = 0; /* used for int server and interval timer setup */
|
||||||
|
myhw_ControlInterrupts( db ); /* start and/or stop (based on duh_online) */
|
||||||
|
|
||||||
StopIntervalTimer( &hwd->ivtimer );
|
StopIntervalTimer( &hwd->ivtimer );
|
||||||
|
|
||||||
|
myhw_ControlInterrupts( db ); /* start and/or stop (based on duh_online) */
|
||||||
enc28j60_exit();
|
enc28j60_exit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -235,6 +283,7 @@ ASM SAVEDS void hw_ConfigInit( ASMR(a0) DEVBASEP ASMREG(a0) )
|
|||||||
hwd->fullduplex = 0;
|
hwd->fullduplex = 0;
|
||||||
hwd->spispeed = HW_DEFSPI; /* default (see above) */
|
hwd->spispeed = HW_DEFSPI; /* default (see above) */
|
||||||
hwd->multicast = 0;
|
hwd->multicast = 0;
|
||||||
|
hwd->interrupt = 0; /* def: don`t enable interrupt */
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
USHORT i;
|
USHORT i;
|
||||||
@@ -262,6 +311,8 @@ ASM SAVEDS void hw_ConfigUpdate( ASMR(a0) DEVBASEP ASMREG(a0),
|
|||||||
hwd->spispeed = *args->spispeed;
|
hwd->spispeed = *args->spispeed;
|
||||||
if( args->multicast )
|
if( args->multicast )
|
||||||
hwd->multicast = 1;
|
hwd->multicast = 1;
|
||||||
|
if( args->interrupt )
|
||||||
|
hwd->interrupt = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -270,6 +321,12 @@ ASM SAVEDS LONG hw_send_frame( ASMR(a0) DEVBASEP ASMREG(a0),
|
|||||||
ASMR(a1) UBYTE *frame ASMREG(a1),
|
ASMR(a1) UBYTE *frame ASMREG(a1),
|
||||||
ASMR(d1) ULONG framesize ASMREG(d1) )
|
ASMR(d1) ULONG framesize ASMREG(d1) )
|
||||||
{
|
{
|
||||||
|
#ifdef USE_INTERRUPT
|
||||||
|
struct HWData *hwd = &db->db_hwdat;
|
||||||
|
|
||||||
|
hwd->hwd_act_boards[0] = (void*)(0); /* disable interrupt processing */
|
||||||
|
#endif
|
||||||
|
|
||||||
enc28j60_send( frame, framesize );
|
enc28j60_send( frame, framesize );
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -278,7 +335,21 @@ ASM SAVEDS LONG hw_send_frame( ASMR(a0) DEVBASEP ASMREG(a0),
|
|||||||
ASM SAVEDS LONG hw_recv_pending( ASMR(a0) DEVBASEP ASMREG(a0),
|
ASM SAVEDS LONG hw_recv_pending( ASMR(a0) DEVBASEP ASMREG(a0),
|
||||||
ASMR(d0) ULONG unit ASMREG(d0) )
|
ASMR(d0) ULONG unit ASMREG(d0) )
|
||||||
{
|
{
|
||||||
|
#ifdef USE_INTERRUPT
|
||||||
|
LONG ret;
|
||||||
|
struct HWData *hwd = &db->db_hwdat;
|
||||||
|
void *tmp = hwd->hwd_act_boards[0];
|
||||||
|
|
||||||
|
hwd->hwd_act_boards[0] = (void*)(0); /* disable interrupt processing */
|
||||||
|
|
||||||
|
ret = (LONG)enc28j60_has_recv();
|
||||||
|
|
||||||
|
hwd->hwd_act_boards[0] = tmp; /* restore interrupt processing enable flag */
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
#else
|
||||||
return (LONG)enc28j60_has_recv();
|
return (LONG)enc28j60_has_recv();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -288,9 +359,14 @@ ASM SAVEDS LONG hw_recv_frame( ASMR(a0) DEVBASEP ASMREG(a0),
|
|||||||
{
|
{
|
||||||
volatile SHORT sz;
|
volatile SHORT sz;
|
||||||
LONG ret;
|
LONG ret;
|
||||||
|
#ifdef USE_INTERRUPT
|
||||||
|
struct HWData *hwd = &db->db_hwdat;
|
||||||
|
|
||||||
|
hwd->hwd_act_boards[0] = (void*)(0); /* disable interrupt processing */
|
||||||
|
#endif
|
||||||
|
|
||||||
/* important: don't call this without enc28j60_has_recv() > 0 check */
|
/* important: don't call this without enc28j60_has_recv() > 0 check */
|
||||||
if( PIO_OK != enc28j60_recv( frame, 1518, (short*)&sz ) )
|
if( PIO_OK != enc28j60_recv( frame, 1518, (unsigned short*)&sz ) )
|
||||||
ret = 0;
|
ret = 0;
|
||||||
else
|
else
|
||||||
ret = (LONG)sz;
|
ret = (LONG)sz;
|
||||||
@@ -311,9 +387,43 @@ ASM SAVEDS ULONG hw_recv_sigmask( ASMR(a0) DEVBASEP ASMREG(a0)
|
|||||||
ASM SAVEDS LONG hw_check_link_change( ASMR(a0) DEVBASEP ASMREG(a0),
|
ASM SAVEDS LONG hw_check_link_change( ASMR(a0) DEVBASEP ASMREG(a0),
|
||||||
ASMR(d0) ULONG unit ASMREG(d0) )
|
ASMR(d0) ULONG unit ASMREG(d0) )
|
||||||
{
|
{
|
||||||
|
#ifdef USE_INTERRUPT
|
||||||
|
struct HWData *hwd = &db->db_hwdat;
|
||||||
|
|
||||||
|
if( hwd->hwd_Interrupt.is_Data ) /* interrupt running ? */
|
||||||
|
{
|
||||||
|
hwd->hwd_act_boards[0] = (void*)(1); /* re-enable interrupt processing */
|
||||||
|
/* re-enable interrupt when server goes to sleep */
|
||||||
|
enc28j60l_EnableInterrupt( db->db_Units[unit].duh_BASE, FindTask(0), (int)hwd->IntSig, 0 );
|
||||||
|
}
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* obtain running parameters of Ethernet MAC: link up/down, Speed, Duplex */
|
||||||
|
/* note: */
|
||||||
|
/* if this call is unsupported then return HW_MAC_INVALID */
|
||||||
|
ASM SAVEDS LONG hw_get_mac_status( ASMR(a0) DEVBASEP ASMREG(a0),
|
||||||
|
ASMR(d0) ULONG unit ASMREG(d0) )
|
||||||
|
{
|
||||||
|
LONG ret = 0; /* def: link down */
|
||||||
|
UBYTE status;
|
||||||
|
|
||||||
|
enc28j60_status( PIO_STATUS_LINK_UP, &status );
|
||||||
|
if( status )
|
||||||
|
{
|
||||||
|
ret = HW_MAC_LINK_UP; /* LINK_UP may be redundant */
|
||||||
|
|
||||||
|
enc28j60_status( PIO_STATUS_FULLDPX, &status );
|
||||||
|
if( status )
|
||||||
|
ret |= HW_MAC_ON_FDX<<HW_MACB_SPEED10;
|
||||||
|
else
|
||||||
|
ret |= HW_MAC_ON<<HW_MACB_SPEED10;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/* process the list of multicast addresses for an appropriate
|
/* process the list of multicast addresses for an appropriate
|
||||||
filtering list on the hardware
|
filtering list on the hardware
|
||||||
@@ -323,7 +433,7 @@ ASM SAVEDS LONG hw_check_link_change( ASMR(a0) DEVBASEP ASMREG(
|
|||||||
filter with hashes etc.
|
filter with hashes etc.
|
||||||
*/
|
*/
|
||||||
ASM SAVEDS LONG hw_change_multicast( ASMR(a0) DEVBASEP ASMREG(a0),
|
ASM SAVEDS LONG hw_change_multicast( ASMR(a0) DEVBASEP ASMREG(a0),
|
||||||
ASMR(a0) ULONG unit ASMREG(d0),
|
ASMR(d0) ULONG unit ASMREG(d0),
|
||||||
ASMR(a1) struct List *mcastlist ASMREG(a1) )
|
ASMR(a1) struct List *mcastlist ASMREG(a1) )
|
||||||
{
|
{
|
||||||
u08 flags;
|
u08 flags;
|
||||||
@@ -341,3 +451,78 @@ ASM SAVEDS LONG hw_change_multicast( ASMR(a0) DEVBASEP ASMREG(
|
|||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef USE_INTERRUPT
|
||||||
|
/* relies on hwd_online */
|
||||||
|
void myhw_ControlInterrupts( DEVBASEP )
|
||||||
|
{
|
||||||
|
struct HWData *hwd = &db->db_hwdat;
|
||||||
|
LONG i,flag;
|
||||||
|
|
||||||
|
if( !hwd->interrupt )
|
||||||
|
return;
|
||||||
|
|
||||||
|
flag = 0;
|
||||||
|
for( i=0 ; i < db->db_NBoards ; i++ )
|
||||||
|
{
|
||||||
|
if( db->db_Units[i].duh_online )
|
||||||
|
{
|
||||||
|
hwd->hwd_act_boards[flag+1] = db->db_Units[i].duh_BASE;
|
||||||
|
flag++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
hwd->hwd_act_boards[flag+1] = (0); /* NULL-terminate */
|
||||||
|
hwd->hwd_act_boards[flag+2] = (APTR)FindTask(0); /* append task */
|
||||||
|
hwd->hwd_act_boards[flag+3] = (APTR)hwd->IntSig; /* append sigbit */
|
||||||
|
|
||||||
|
if( flag ) /* determine on/off switch */
|
||||||
|
{
|
||||||
|
/* at least 1 board is online */
|
||||||
|
hwd->hwd_act_boards[0] = (void*)(1); /* enable interrupt processing */
|
||||||
|
|
||||||
|
if( hwd->hwd_Interrupt.is_Data )
|
||||||
|
flag = 0; /* no change */
|
||||||
|
else flag = 1; /* start interrupt */
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
hwd->hwd_act_boards[0] = 0; /* disable interrupt processing */
|
||||||
|
|
||||||
|
if( hwd->hwd_Interrupt.is_Data )
|
||||||
|
flag = -1; /* stop interrupt */
|
||||||
|
else flag = 0; /* no change */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* flag is >0 = start, <0 = stop or 0 = no change */
|
||||||
|
if( flag > 0 )
|
||||||
|
{
|
||||||
|
hwd->hwd_Interrupt.is_Code = (void(*)())enc28j60l_IntServer_List;
|
||||||
|
hwd->hwd_Interrupt.is_Data = &hwd->hwd_act_boards[0];
|
||||||
|
hwd->hwd_Interrupt.is_Node.ln_Type = NT_INTERRUPT;
|
||||||
|
hwd->hwd_Interrupt.is_Node.ln_Pri = 51;
|
||||||
|
hwd->hwd_Interrupt.is_Node.ln_Name = (char*)intname;
|
||||||
|
AddIntServer( HW_INTSOURCE, &hwd->hwd_Interrupt );
|
||||||
|
}
|
||||||
|
|
||||||
|
for( i=0 ; i < db->db_NBoards ; i++ )
|
||||||
|
{
|
||||||
|
if( db->db_Units[i].duh_online )
|
||||||
|
{
|
||||||
|
enc28j60l_EnableInterrupt( db->db_Units[i].duh_BASE, FindTask(0), (int)hwd->IntSig, 0 );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
enc28j60l_DisableInterrupt( db->db_Units[i].duh_BASE );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if( flag < 0 )
|
||||||
|
{
|
||||||
|
hwd->hwd_Interrupt.is_Data = (0);
|
||||||
|
RemIntServer( HW_INTSOURCE, &hwd->hwd_Interrupt );
|
||||||
|
hwd->hwd_Interrupt.is_Code = (0);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -15,29 +15,49 @@
|
|||||||
/* sdnet/v2expnet specific: polling timer */
|
/* sdnet/v2expnet specific: polling timer */
|
||||||
#include "intervaltimer.h"
|
#include "intervaltimer.h"
|
||||||
|
|
||||||
|
#define HW_VENDOR "Henryk Richter"
|
||||||
|
|
||||||
/* this struct is available in devicebase and should carry global information */
|
/* this struct is available in devicebase and should carry global information */
|
||||||
struct HWData {
|
struct HWData {
|
||||||
ULONG SigMask; /* signal mask to wait for in server main instance */
|
struct Interrupt hwd_Interrupt; /* keep the interrupt at top of HWData !! */
|
||||||
|
APTR hwd_act_boards[MAX_UNITS+1+2+1]; /* poll all active boards by ptr in interrupt, NULL terminated, followed by SigTask,Sigbit */
|
||||||
|
/* contents of hwd_act_boards:
|
||||||
|
1 ULONG processing ENABLE (1) or DISABLE (0)
|
||||||
|
n ULONG BOARD LIST, NULL terminated
|
||||||
|
1 ULONG SigTask
|
||||||
|
1 ULONG SigBit
|
||||||
|
*/
|
||||||
|
|
||||||
struct IVT_TimerStruct ivtimer; /* Timer interval handling (via Interrupt) */
|
struct IVT_TimerStruct ivtimer; /* Timer interval handling (via Interrupt) */
|
||||||
LONG IntSig;
|
LONG IntSig;
|
||||||
|
ULONG SigMask; /* signal mask to wait for in server main instance */
|
||||||
|
|
||||||
/* config options */
|
/* config options */
|
||||||
ULONG timervalue; /* polling interval in ms */
|
ULONG timervalue; /* polling interval in ms */
|
||||||
ULONG fullduplex; /* force full duplex */
|
ULONG fullduplex; /* force full duplex */
|
||||||
ULONG spispeed; /* SPI clock divider (>=1) */
|
ULONG spispeed; /* SPI clock divider (>=1) */
|
||||||
ULONG multicast; /* multicast recv enable */
|
ULONG multicast; /* multicast recv enable */
|
||||||
|
ULONG interrupt; /* enable interrupt */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* referenced from server.c */
|
/* referenced from server.c */
|
||||||
#if (defined PROTO_V2EXPNET)
|
#if (defined PROTO_V2EXPNET)
|
||||||
#define HW_CONFIGFILE "ENV:SANA2/v2expeth.config"
|
|
||||||
#else
|
|
||||||
#define HW_CONFIGFILE "ENV:SANA2/sdnet.config"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
#define HW_CONFIGFILE "ENV:SANA2/v2expeth.config"
|
||||||
|
/* appended to COMMON_TEMPLATE */
|
||||||
|
#define HW_CONFIGTEMPLATE "TIMER/K/N,FULLDUPLEX/S,SPISPEED/K/N,MULTICAST/S,INTERRUPT/S"
|
||||||
|
#define HW_PRODUCT "VampireV500V2 ENC28J60 ExpansionPort"
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#define HW_CONFIGFILE "ENV:SANA2/sdnet.config"
|
||||||
/* appended to COMMON_TEMPLATE */
|
/* appended to COMMON_TEMPLATE */
|
||||||
#define HW_CONFIGTEMPLATE "TIMER/K/N,FULLDUPLEX/S,SPISPEED/K/N,MULTICAST/S"
|
#define HW_CONFIGTEMPLATE "TIMER/K/N,FULLDUPLEX/S,SPISPEED/K/N,MULTICAST/S"
|
||||||
|
#define HW_PRODUCT "Vampire SDNet ENC28J60"
|
||||||
|
|
||||||
|
/* appended to COMMON_TEMPLATE */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* referenced by server.c, hw.c */
|
/* referenced by server.c, hw.c */
|
||||||
struct HWConfig
|
struct HWConfig
|
||||||
@@ -47,6 +67,7 @@ struct HWConfig
|
|||||||
ULONG fullduplex;
|
ULONG fullduplex;
|
||||||
ULONG *spispeed;
|
ULONG *spispeed;
|
||||||
ULONG multicast;
|
ULONG multicast;
|
||||||
|
ULONG interrupt;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* _INC_HWPRIVATE_H */
|
#endif /* _INC_HWPRIVATE_H */
|
||||||
|
|||||||
@@ -15,11 +15,21 @@
|
|||||||
#include <dos/dostags.h>
|
#include <dos/dostags.h>
|
||||||
#include <devices/timer.h>
|
#include <devices/timer.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_VERSION_H
|
||||||
|
#include "version.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "device.h"
|
#include "device.h"
|
||||||
#include "hw.h"
|
#include "hw.h"
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
#include "server.h"
|
#include "server.h"
|
||||||
|
|
||||||
|
#ifdef NEWSTYLE
|
||||||
|
#include <devices/newstyle.h>
|
||||||
|
#include <devices/sana2devqueryext.h> /* new extension, code can be built without this include (but also without ext query then...) */
|
||||||
|
static LONG server_queryext( DEVBASEP, ULONG unit, struct IOSana2Req *ioreq );
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* (avoid external link libraries) this call is not time critical */
|
/* (avoid external link libraries) this call is not time critical */
|
||||||
static void MemSet( void *a, ULONG val, ULONG size )
|
static void MemSet( void *a, ULONG val, ULONG size )
|
||||||
@@ -292,6 +302,7 @@ static LONG server_Config( DEVBASEP )
|
|||||||
return SERR_OK;
|
return SERR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static LONG CMPeqMAC( BYTE *a, BYTE *b )
|
static LONG CMPeqMAC( BYTE *a, BYTE *b )
|
||||||
{
|
{
|
||||||
LONG i;
|
LONG i;
|
||||||
@@ -303,6 +314,7 @@ static LONG CMPeqMAC( BYTE *a, BYTE *b )
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static LONG server_changeMulticast( DEVBASEP, ULONG unit, struct IOSana2Req *ioreq, ULONG add_del )
|
static LONG server_changeMulticast( DEVBASEP, ULONG unit, struct IOSana2Req *ioreq, ULONG add_del )
|
||||||
{
|
{
|
||||||
/* step 1: find start address in active list */
|
/* step 1: find start address in active list */
|
||||||
@@ -431,7 +443,20 @@ static LONG server_HandleS2Commands( DEVBASEP )
|
|||||||
ioreq->ios2_WireError = S2WERR_GENERIC_ERROR;
|
ioreq->ios2_WireError = S2WERR_GENERIC_ERROR;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
#ifdef S2_DEVICEQUERYEXT
|
||||||
|
case S2_DEVICEQUERYEXT:
|
||||||
|
if( server_queryext( db, unit, ioreq ) )
|
||||||
|
{
|
||||||
|
ioreq->ios2_Req.io_Error = S2ERR_NO_ERROR;
|
||||||
|
ioreq->ios2_WireError = S2WERR_GENERIC_ERROR;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ioreq->ios2_Req.io_Error = S2ERR_BAD_ARGUMENT;
|
||||||
|
ioreq->ios2_WireError = S2WERR_GENERIC_ERROR;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
default: /* shouldn't happen */
|
default: /* shouldn't happen */
|
||||||
ioreq->ios2_Req.io_Error = S2ERR_NOT_SUPPORTED;
|
ioreq->ios2_Req.io_Error = S2ERR_NOT_SUPPORTED;
|
||||||
ioreq->ios2_WireError = S2WERR_GENERIC_ERROR;
|
ioreq->ios2_WireError = S2WERR_GENERIC_ERROR;
|
||||||
@@ -444,6 +469,90 @@ static LONG server_HandleS2Commands( DEVBASEP )
|
|||||||
return SERR_OK;
|
return SERR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef S2_DEVICEQUERYEXT
|
||||||
|
const char server_vendorstring[] = HW_VENDOR;
|
||||||
|
const char server_productstring[] = HW_PRODUCT;
|
||||||
|
static LONG server_queryext( DEVBASEP, ULONG unit, struct IOSana2Req *ioreq )
|
||||||
|
{
|
||||||
|
struct TagItem *tlist;
|
||||||
|
ULONG tval,tval2;
|
||||||
|
LONG len;
|
||||||
|
struct S2DevQueryExtParam *s2qep;
|
||||||
|
ULONG *lgp;
|
||||||
|
|
||||||
|
tlist = (struct TagItem*)ioreq->ios2_Data;
|
||||||
|
|
||||||
|
/* 3*4 Bytes needed for one Tag + TAG_DONE */
|
||||||
|
if( (ioreq->ios2_DataLength < 12) || (!tlist) )
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
tval = GetTagData( S2_DevQueryExtVendorName, 0, tlist );
|
||||||
|
if( tval )
|
||||||
|
{
|
||||||
|
s2qep = (struct S2DevQueryExtParam *)tval;
|
||||||
|
|
||||||
|
len = min( s2qep->Length, sizeof(server_vendorstring) );
|
||||||
|
CopyMem( (void*)server_vendorstring, s2qep->Data, len );
|
||||||
|
s2qep->Actual = len;
|
||||||
|
}
|
||||||
|
|
||||||
|
tval = GetTagData( S2_DevQueryExtProductName, 0, tlist );
|
||||||
|
if( tval )
|
||||||
|
{
|
||||||
|
s2qep = (struct S2DevQueryExtParam *)tval;
|
||||||
|
|
||||||
|
len = min( s2qep->Length, sizeof(server_productstring) );
|
||||||
|
CopyMem( (void*)server_productstring, s2qep->Data, len );
|
||||||
|
s2qep->Actual = len;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
tval = GetTagData( S2_DevQueryExtLinkStatus, 0, tlist );
|
||||||
|
tval2 = GetTagData( S2_DevQueryExtLinkSpeed, 0, tlist );
|
||||||
|
if( (tval) || (tval2) )
|
||||||
|
{
|
||||||
|
/* ask hardware about link/speed status */
|
||||||
|
len = hw_get_mac_status(db, unit);
|
||||||
|
if( len != HW_MAC_INVALID )
|
||||||
|
{
|
||||||
|
if( tval ) /* S2_DevQueryExtLinkStatus */
|
||||||
|
{
|
||||||
|
s2qep = (struct S2DevQueryExtParam *)tval;
|
||||||
|
if( s2qep->Length >= 4 )
|
||||||
|
{
|
||||||
|
lgp = (ULONG*)s2qep->Data;
|
||||||
|
*lgp = (len & HW_MAC_LINK_UP) ? S2_DEVQUERYEXT_LINK_UP : S2_DEVQUERYEXT_LINK_DOWN;
|
||||||
|
s2qep->Actual = 4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if( tval2 ) /* S2_DevQueryExtLinkSpeed */
|
||||||
|
{
|
||||||
|
s2qep = (struct S2DevQueryExtParam *)tval2;
|
||||||
|
if( s2qep->Length >= 4 )
|
||||||
|
{
|
||||||
|
lgp = (ULONG*)s2qep->Data;
|
||||||
|
|
||||||
|
tval = S2_DEVQUERYEXT_SPEED_UNDEFINED;
|
||||||
|
if( len & HW_MAC_LINK_UP)
|
||||||
|
{
|
||||||
|
if( HW_MAC_ISACTIVE(len,HW_MACB_SPEED10) )
|
||||||
|
tval = S2_DEVQUERYEXT_SPEED_10M;
|
||||||
|
if( HW_MAC_ISACTIVE(len,HW_MACB_SPEED100) )
|
||||||
|
tval = S2_DEVQUERYEXT_SPEED_100M;
|
||||||
|
if( HW_MAC_ISACTIVE(len,HW_MACB_SPEED1000) )
|
||||||
|
tval = S2_DEVQUERYEXT_SPEED_1000M;
|
||||||
|
}
|
||||||
|
*lgp = tval;
|
||||||
|
s2qep->Actual = 4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* error conditions sent via EventQueue */
|
/* error conditions sent via EventQueue */
|
||||||
@@ -505,7 +614,7 @@ LONG server_writeerror( DEVBASEP, ULONG unit, struct IOSana2Req *ioreq, LONG cod
|
|||||||
/* note: entering here with locked semaphore */
|
/* note: entering here with locked semaphore */
|
||||||
static LONG write_frame( DEVBASEP, ULONG unit, struct IOSana2Req *ioreq )
|
static LONG write_frame( DEVBASEP, ULONG unit, struct IOSana2Req *ioreq )
|
||||||
{
|
{
|
||||||
LONG ret = SERR_OK;
|
LONG ret;/* = SERR_OK;*/
|
||||||
UBYTE *copy_ptr,*frame;
|
UBYTE *copy_ptr,*frame;
|
||||||
ULONG framesize;
|
ULONG framesize;
|
||||||
struct db_BufferManagement *dbm;
|
struct db_BufferManagement *dbm;
|
||||||
@@ -644,6 +753,7 @@ static void server_read_frame( DEVBASEP, ULONG unit, struct IOSana2Req *ioreq, U
|
|||||||
|
|
||||||
dbm = (struct db_BufferManagement *)ioreq->ios2_BufferManagement;
|
dbm = (struct db_BufferManagement *)ioreq->ios2_BufferManagement;
|
||||||
D(("ReadFrm IO %lx, DBM %lx frm %lx frmsz %ld\n",(ULONG)ioreq,(ULONG)dbm,(ULONG)frame,framesize));
|
D(("ReadFrm IO %lx, DBM %lx frm %lx frmsz %ld\n",(ULONG)ioreq,(ULONG)dbm,(ULONG)frame,framesize));
|
||||||
|
|
||||||
if(!(*dbm->dbm_CopyToBuffer32)(ioreq->ios2_Data, frame, framesize ))
|
if(!(*dbm->dbm_CopyToBuffer32)(ioreq->ios2_Data, frame, framesize ))
|
||||||
{
|
{
|
||||||
if(!(*dbm->dbm_CopyToBuffer)(ioreq->ios2_Data, frame, framesize ))
|
if(!(*dbm->dbm_CopyToBuffer)(ioreq->ios2_Data, frame, framesize ))
|
||||||
@@ -757,7 +867,7 @@ end:
|
|||||||
VOID SAVEDS ServerTask(void)
|
VOID SAVEDS ServerTask(void)
|
||||||
{
|
{
|
||||||
struct ServerMsg *msg;
|
struct ServerMsg *msg;
|
||||||
ULONG wmask,gotmask,spcmask,portsigmask,recvmask,i=0,action;
|
ULONG wmask,gotmask,spcmask,portsigmask,recvmask,i,action;
|
||||||
struct IOSana2Req*wr;
|
struct IOSana2Req*wr;
|
||||||
struct DevUnit *curunit;
|
struct DevUnit *curunit;
|
||||||
DEVBASEP = (0); /* Don`t call Libraries until server_startup() succeeds! */
|
DEVBASEP = (0); /* Don`t call Libraries until server_startup() succeeds! */
|
||||||
|
|||||||
@@ -0,0 +1,169 @@
|
|||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# SAS/C Makefile for SDNet and V2EXPETH
|
||||||
|
#
|
||||||
|
# author: Henryk Richter <henryk.richter@gmx.net>
|
||||||
|
#
|
||||||
|
# tools required:
|
||||||
|
# working SAS/C installation (sc:, sc:include and sc:netinclude assigned,
|
||||||
|
# "sc", "smake" and "slink in path)
|
||||||
|
# vasm in path (vasmm68k_mot)
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Name, version
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
#DEVICEVERSION=1
|
||||||
|
#DEVICEREVISION=95
|
||||||
|
#DEVICEDATE=08.09.2018
|
||||||
|
#DEVICEEXTRA=Beta
|
||||||
|
|
||||||
|
SUBDIR=sdnet
|
||||||
|
ASMOBJECTS = $(SUBDIR)/vampuuid.o$(TYPE) $(SUBDIR)/intervaltimer.o$(TYPE) \
|
||||||
|
$(SUBDIR)/enc28j60.o$(TYPE) $(SUBDIR)/enc28j60l.o$(TYPE)
|
||||||
|
|
||||||
|
#
|
||||||
|
# more than one flavour of the same code base may be build with this setup
|
||||||
|
#
|
||||||
|
# some arguments are passed down recursively (example):
|
||||||
|
#DEVICEID=v2expeth.device
|
||||||
|
#DEFINES1 = -DPROTO_V2EXPNET
|
||||||
|
#ASMDEFS = -DPROTO_V2EXPNET
|
||||||
|
#CPU = 68020
|
||||||
|
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# common.smk (SAS/C variant of common.mk)
|
||||||
|
#
|
||||||
|
# author: Henryk Richter <henryk.richter@gmx.net>
|
||||||
|
#
|
||||||
|
# note: when switching between different hardware targets, don`t forget
|
||||||
|
# "make clean" in between
|
||||||
|
###############################################################################
|
||||||
|
# debug = 1 will include string debugging for terminal/sushi/sashimi
|
||||||
|
# not enabled yet in SAS/C makefile
|
||||||
|
debug = 0
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# prefix for system includes (ASM)
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
PREFX = sc:
|
||||||
|
SYSINC = $(PREFX)include
|
||||||
|
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# compiler executables and support calls
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
RM = delete force quiet
|
||||||
|
CC = sc
|
||||||
|
LD = slink
|
||||||
|
MAKE = smake
|
||||||
|
CFLAGS = NOVER NOICONS nostackcheck math=standard strmerge strsect=code parameters=regs data=near opt optsize
|
||||||
|
LDFLAGS = NOICONS SC SD ND
|
||||||
|
|
||||||
|
VASM = vasmm68k_mot
|
||||||
|
VASMFORMAT = -m$(CPU) -Fhunk -nowarn=2064 -quiet -I$(SYSINC)
|
||||||
|
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# paths to the local includes
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
IPATH =
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# compile-level feature definitions
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
# see all: target for defaults in $(DEFINES)
|
||||||
|
DEFINES = $(DEFINES1) CPU=$(CPU)
|
||||||
|
#DEFINES = $(DEFINES) DEFINE DEVICEVERSION=$(DEVICEVERSION)
|
||||||
|
#DEFINES = $(DEFINES) DEFINE DEVICEREVISION=$(DEVICEREVISION)
|
||||||
|
#DEFINES = $(DEFINES) DEFINE DEVICEDATE=$(DEVICEDATE)
|
||||||
|
#DEFINES = $(DEFINES) DEFINE DEVICEEXTRA=$(DEVICEEXTRA)
|
||||||
|
DEFINES = $(DEFINES) DEFINE NEWSTYLE=1
|
||||||
|
DEFINES = $(DEFINES) DEFINE HAVE_VERSION_H=1
|
||||||
|
DEFINES = $(DEFINES) DEFINE DEVICENAME=$(DEVICEID)
|
||||||
|
ASMDEFS = $(ASMDEFS1)
|
||||||
|
#-DDEVICEVERSION=$(DEVICEVERSION) -DDEVICEREVISION=$(DEVICEREVISION)
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# debug
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
#ifeq ($(debug),1)
|
||||||
|
#CFLAGS += -DDEBUG -g
|
||||||
|
#CFLAGS2 += -DDEBUG -g
|
||||||
|
#LINKLIBS = -L$(PREFX)/lib -ldebug
|
||||||
|
#endif
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# compiler flags and optimization levels
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
CFLAGS = $(CFLAGS) INCLUDEDIR="" INCLUDEDIR=$(SUBDIR) $(DEFINES)
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# objects to build
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
# ASM based alternative to deviceheader.o would be romtag.o
|
||||||
|
|
||||||
|
OBJECTS = deviceheader.o$(TYPE) deviceinit.o$(TYPE) device.o$(TYPE) \
|
||||||
|
server.o$(TYPE) $(SUBDIR)/hw.o$(TYPE)
|
||||||
|
|
||||||
|
OBJECTS = $(OBJECTS) $(ASMOBJECTS)
|
||||||
|
|
||||||
|
BUILDDEPS = device.h server.h hw.h macros.h compiler.h
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# rules and commands
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
.asm.o$(TYPE): $(BUILDDEPS) $*.asm
|
||||||
|
$(VASM) $(VASMFORMAT) $(ASMDEFS) -o $@ $*.asm
|
||||||
|
|
||||||
|
.c.o$(TYPE): $(BUILDDEPS) $*.c
|
||||||
|
$(CC) $(CFLAGS) OBJECTNAME $@ $*.c
|
||||||
|
|
||||||
|
all:
|
||||||
|
$(MAKE) TYPE=sd sdnet.device DEVICEID=sdnet.device CPU=68020
|
||||||
|
$(MAKE) TYPE=ex v2expeth.device DEVICEID=v2expeth.device CPU=68020 \
|
||||||
|
"DEFINES1=DEFINE PROTO_V2EXPNET" ASMDEFS1=-DPROTO_V2EXPNET
|
||||||
|
|
||||||
|
sdnet.device: $(OBJECTS)
|
||||||
|
-$(LD) $(OBJECTS) LIB sc:lib/sc.lib $(LDFLAGS) TO $(DEVICEID)
|
||||||
|
|
||||||
|
v2expeth.device: $(OBJECTS)
|
||||||
|
-$(LD) $(OBJECTS) LIB sc:lib/sc.lib $(LDFLAGS) TO $(DEVICEID)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
-$(RM) sdnet.device v2expeth.device \#?.oex *.osd $(SUBDIR)/\#?.oex $(SUBDIR)/\#?.osd
|
||||||
|
|
||||||
|
install:
|
||||||
|
copy sdnet.device v2expeth.device DEVS:Networks
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# dependencies
|
||||||
|
device.o$(TYPE): device.c device.h server.h hw.h macros.h compiler.h
|
||||||
|
server.o$(TYPE): server.c device.h server.h hw.h macros.h compiler.h
|
||||||
|
deviceinit.o$(TYPE): deviceinit.c device.h server.h hw.h macros.h compiler.h
|
||||||
|
deviceheader.o$(TYPE): deviceheader.c device.h server.h hw.h macros.h compiler.h
|
||||||
|
|
||||||
@@ -0,0 +1,169 @@
|
|||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# SAS/C Makefile for ENC624J6net
|
||||||
|
#
|
||||||
|
# author: Henryk Richter <henryk.richter@gmx.net>
|
||||||
|
#
|
||||||
|
# tools required:
|
||||||
|
# working SAS/C installation (sc:, sc:include and sc:netinclude assigned,
|
||||||
|
# "sc", "smake" and "slink in path)
|
||||||
|
# vasm in path (vasmm68k_mot)
|
||||||
|
#
|
||||||
|
# call:
|
||||||
|
# smake -f smakefile.enc
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Name, version
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
#DEVICEVERSION=1
|
||||||
|
#DEVICEREVISION=95
|
||||||
|
#DEVICEDATE=08.09.2018
|
||||||
|
#DEVICEEXTRA=Beta
|
||||||
|
|
||||||
|
SUBDIR=enc624j6net
|
||||||
|
ASMOBJECTS = $(SUBDIR)/enc624j6l.o$(TYPE) $(SUBDIR)/intervaltimer.o$(TYPE)
|
||||||
|
|
||||||
|
|
||||||
|
# more than one flavour of the same code base may be build with this setup
|
||||||
|
# arguments passed down recursively (example):
|
||||||
|
#DEVICEID=v2expeth.device
|
||||||
|
#DEFINES1 = -DPROTO_V2EXPNET
|
||||||
|
#ASMDEFS = -DPROTO_V2EXPNET
|
||||||
|
#CPU = 68020
|
||||||
|
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# common.smk (SAS/C variant of common.mk)
|
||||||
|
#
|
||||||
|
# author: Henryk Richter <henryk.richter@gmx.net>
|
||||||
|
#
|
||||||
|
# note: when switching between different hardware targets, don`t forget
|
||||||
|
# "make clean" in between
|
||||||
|
###############################################################################
|
||||||
|
# debug = 1 will include string debugging for terminal/sushi/sashimi
|
||||||
|
# not enabled yet in SAS/C makefile
|
||||||
|
debug = 0
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# prefix for system includes (ASM)
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
PREFX = sc:
|
||||||
|
SYSINC = $(PREFX)include
|
||||||
|
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# compiler executables and support calls
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
RM = delete force quiet
|
||||||
|
CC = sc
|
||||||
|
LD = slink
|
||||||
|
MAKE = smake
|
||||||
|
CFLAGS = NOVER NOICONS nostackcheck math=standard strmerge strsect=code parameters=regs data=near opt optsize
|
||||||
|
LDFLAGS = NOICONS SC SD ND
|
||||||
|
|
||||||
|
VASM = vasmm68k_mot
|
||||||
|
VASMFORMAT = -m$(CPU) -Fhunk -nowarn=2064 -quiet -I$(SYSINC)
|
||||||
|
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# paths to the local includes
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
IPATH =
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# compile-level feature definitions
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
# see all: target for defaults in $(DEFINES)
|
||||||
|
DEFINES = $(DEFINES1) CPU=$(CPU)
|
||||||
|
#DEFINES = $(DEFINES) DEFINE DEVICEVERSION=$(DEVICEVERSION)
|
||||||
|
#DEFINES = $(DEFINES) DEFINE DEVICEREVISION=$(DEVICEREVISION)
|
||||||
|
#DEFINES = $(DEFINES) DEFINE DEVICEDATE=$(DEVICEDATE)
|
||||||
|
DEFINES = $(DEFINES) DEFINE NEWSTYLE=1
|
||||||
|
DEFINES = $(DEFINES) DEFINE HAVE_VERSION_H=1
|
||||||
|
DEFINES = $(DEFINES) DEFINE DEVICENAME=$(DEVICEID)
|
||||||
|
#DEFINES = $(DEFINES) DEFINE DEVICEEXTRA=$(DEVICEEXTRA)
|
||||||
|
ASMDEFS = $(ASMDEFS1)
|
||||||
|
#-DDEVICEVERSION=$(DEVICEVERSION) -DDEVICEREVISION=$(DEVICEREVISION)
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# debug
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
#ifeq ($(debug),1)
|
||||||
|
#CFLAGS += -DDEBUG -g
|
||||||
|
#CFLAGS2 += -DDEBUG -g
|
||||||
|
#LINKLIBS = -L$(PREFX)/lib -ldebug
|
||||||
|
#endif
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# compiler flags and optimization levels
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
CFLAGS = $(CFLAGS) INCLUDEDIR="" INCLUDEDIR=$(SUBDIR) $(DEFINES)
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# objects to build
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
# ASM based alternative to deviceheader.o would be romtag.o
|
||||||
|
|
||||||
|
OBJECTS = deviceheader.o$(TYPE) deviceinit.o$(TYPE) device.o$(TYPE) \
|
||||||
|
server.o$(TYPE) $(SUBDIR)/hw.o$(TYPE)
|
||||||
|
|
||||||
|
OBJECTS = $(OBJECTS) $(ASMOBJECTS)
|
||||||
|
|
||||||
|
BUILDDEPS = device.h server.h hw.h macros.h compiler.h
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# rules and commands
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
.asm.o$(TYPE): $(BUILDDEPS) $*.asm
|
||||||
|
$(VASM) $(VASMFORMAT) $(ASMDEFS) -o $@ $*.asm
|
||||||
|
|
||||||
|
.c.o$(TYPE): $(BUILDDEPS) $*.c
|
||||||
|
$(CC) $(CFLAGS) OBJECTNAME $@ $*.c
|
||||||
|
|
||||||
|
all:
|
||||||
|
$(MAKE) -f smakefile.enc TYPE=20 enc624j6net.device DEVICEID=enc624j6net.device CPU=68020
|
||||||
|
$(MAKE) -f smakefile.enc TYPE=00 enc624j6net.device_68000 DEVICEID=enc624j6net.device CPU=68000
|
||||||
|
|
||||||
|
enc624j6net.device: $(OBJECTS)
|
||||||
|
-$(LD) $(OBJECTS) LIB sc:lib/sc.lib $(LDFLAGS) TO $(DEVICEID)
|
||||||
|
|
||||||
|
enc624j6net.device_68000: $(OBJECTS)
|
||||||
|
-$(LD) $(OBJECTS) LIB sc:lib/sc.lib $(LDFLAGS) TO $(DEVICEID)_68000
|
||||||
|
|
||||||
|
clean:
|
||||||
|
-$(RM) enc624j6net.device enc624j6net.device_68000 \#?.o00 *.o20 $(SUBDIR)/\#?.o00 $(SUBDIR)/\#?.o20
|
||||||
|
|
||||||
|
install:
|
||||||
|
copy enc624j6net.device DEVS:Networks
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# dependencies
|
||||||
|
device.o$(TYPE): device.c device.h server.h hw.h macros.h compiler.h
|
||||||
|
server.o$(TYPE): server.c device.h server.h hw.h macros.h compiler.h
|
||||||
|
deviceinit.o$(TYPE): deviceinit.c device.h server.h hw.h macros.h compiler.h
|
||||||
|
deviceheader.o$(TYPE): deviceheader.c device.h server.h hw.h macros.h compiler.h
|
||||||
|
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
/*
|
||||||
|
version.h
|
||||||
|
|
||||||
|
(C) 2018 Henryk Richter <henryk.richter@gmx.net>
|
||||||
|
|
||||||
|
version and date handling
|
||||||
|
*/
|
||||||
|
#ifndef _INC_VERSION_H
|
||||||
|
#define _INC_VERSION_H
|
||||||
|
|
||||||
|
#define DEVICEVERSION 1
|
||||||
|
#define DEVICEREVISION 98
|
||||||
|
#define DEVICEEXTRA Beta
|
||||||
|
#define DEVICEDATE 02.01.2019
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -32,6 +32,7 @@
|
|||||||
<file xil_pn:branch="Implementation" xil_pn:fileType="FILE_NGC" xil_pn:name="LAN_IDE_CP.ngc"/>
|
<file xil_pn:branch="Implementation" xil_pn:fileType="FILE_NGC" xil_pn:name="LAN_IDE_CP.ngc"/>
|
||||||
<file xil_pn:branch="Implementation" xil_pn:fileType="FILE_NGD" xil_pn:name="LAN_IDE_CP.ngd"/>
|
<file xil_pn:branch="Implementation" xil_pn:fileType="FILE_NGD" xil_pn:name="LAN_IDE_CP.ngd"/>
|
||||||
<file xil_pn:branch="Implementation" xil_pn:fileType="FILE_NGR" xil_pn:name="LAN_IDE_CP.ngr"/>
|
<file xil_pn:branch="Implementation" xil_pn:fileType="FILE_NGR" xil_pn:name="LAN_IDE_CP.ngr"/>
|
||||||
|
<file xil_pn:fileType="FILE_PAD_MISC" xil_pn:name="LAN_IDE_CP.pad"/>
|
||||||
<file xil_pn:branch="Implementation" xil_pn:fileType="FILE_PNX" xil_pn:name="LAN_IDE_CP.pnx"/>
|
<file xil_pn:branch="Implementation" xil_pn:fileType="FILE_PNX" xil_pn:name="LAN_IDE_CP.pnx"/>
|
||||||
<file xil_pn:branch="Implementation" xil_pn:fileType="FILE_XST_PROJECT" xil_pn:name="LAN_IDE_CP.prj"/>
|
<file xil_pn:branch="Implementation" xil_pn:fileType="FILE_XST_PROJECT" xil_pn:name="LAN_IDE_CP.prj"/>
|
||||||
<file xil_pn:fileType="FILE_FITTER_REPORT" xil_pn:name="LAN_IDE_CP.rpt"/>
|
<file xil_pn:fileType="FILE_FITTER_REPORT" xil_pn:name="LAN_IDE_CP.rpt"/>
|
||||||
@@ -39,10 +40,13 @@
|
|||||||
<file xil_pn:branch="Implementation" xil_pn:fileType="FILE_XST_REPORT" xil_pn:name="LAN_IDE_CP.syr"/>
|
<file xil_pn:branch="Implementation" xil_pn:fileType="FILE_XST_REPORT" xil_pn:name="LAN_IDE_CP.syr"/>
|
||||||
<file xil_pn:fileType="FILE_FITTER_REPORT" xil_pn:name="LAN_IDE_CP.tspec"/>
|
<file xil_pn:fileType="FILE_FITTER_REPORT" xil_pn:name="LAN_IDE_CP.tspec"/>
|
||||||
<file xil_pn:branch="Implementation" xil_pn:fileType="FILE_VM6" xil_pn:name="LAN_IDE_CP.vm6"/>
|
<file xil_pn:branch="Implementation" xil_pn:fileType="FILE_VM6" xil_pn:name="LAN_IDE_CP.vm6"/>
|
||||||
|
<file xil_pn:fileType="FILE_FITTER_REPORT" xil_pn:name="LAN_IDE_CP.xml"/>
|
||||||
<file xil_pn:branch="Implementation" xil_pn:fileType="FILE_XST" xil_pn:name="LAN_IDE_CP.xst"/>
|
<file xil_pn:branch="Implementation" xil_pn:fileType="FILE_XST" xil_pn:name="LAN_IDE_CP.xst"/>
|
||||||
|
<file xil_pn:fileType="FILE_FITTER_REPORT" xil_pn:name="LAN_IDE_CP_build.xml"/>
|
||||||
<file xil_pn:fileType="FILE_HTML" xil_pn:name="LAN_IDE_CP_envsettings.html"/>
|
<file xil_pn:fileType="FILE_HTML" xil_pn:name="LAN_IDE_CP_envsettings.html"/>
|
||||||
<file xil_pn:fileType="FILE_DIRECTORY" xil_pn:name="LAN_IDE_CP_html"/>
|
<file xil_pn:fileType="FILE_DIRECTORY" xil_pn:name="LAN_IDE_CP_html"/>
|
||||||
<file xil_pn:fileType="FILE_XRPT" xil_pn:name="LAN_IDE_CP_ngdbuild.xrpt"/>
|
<file xil_pn:fileType="FILE_XRPT" xil_pn:name="LAN_IDE_CP_ngdbuild.xrpt"/>
|
||||||
|
<file xil_pn:fileType="FILE_PAD_EXCEL_REPORT" xil_pn:name="LAN_IDE_CP_pad.csv"/>
|
||||||
<file xil_pn:fileType="FILE_HTML" xil_pn:name="LAN_IDE_CP_summary.html"/>
|
<file xil_pn:fileType="FILE_HTML" xil_pn:name="LAN_IDE_CP_summary.html"/>
|
||||||
<file xil_pn:branch="Implementation" xil_pn:fileType="FILE_XST_PROJECT" xil_pn:name="LAN_IDE_CP_vhdl.prj"/>
|
<file xil_pn:branch="Implementation" xil_pn:fileType="FILE_XST_PROJECT" xil_pn:name="LAN_IDE_CP_vhdl.prj"/>
|
||||||
<file xil_pn:fileType="FILE_XRPT" xil_pn:name="LAN_IDE_CP_xst.xrpt"/>
|
<file xil_pn:fileType="FILE_XRPT" xil_pn:name="LAN_IDE_CP_xst.xrpt"/>
|
||||||
@@ -63,10 +67,12 @@
|
|||||||
<status xil_pn:value="SuccessfullyRun"/>
|
<status xil_pn:value="SuccessfullyRun"/>
|
||||||
<status xil_pn:value="ReadyToRun"/>
|
<status xil_pn:value="ReadyToRun"/>
|
||||||
</transform>
|
</transform>
|
||||||
<transform xil_pn:end_ts="1546445571" xil_pn:in_ck="-2520376148396271922" xil_pn:name="TRANEXT_xstsynthesize_xc9500xl" xil_pn:prop_ck="-4464240118715262847" xil_pn:start_ts="1546445559">
|
<transform xil_pn:end_ts="1546470548" xil_pn:in_ck="-2520376148396271922" xil_pn:name="TRANEXT_xstsynthesize_xc9500xl" xil_pn:prop_ck="2647934492491614606" xil_pn:start_ts="1546470526">
|
||||||
<status xil_pn:value="SuccessfullyRun"/>
|
<status xil_pn:value="SuccessfullyRun"/>
|
||||||
<status xil_pn:value="WarningsGenerated"/>
|
<status xil_pn:value="WarningsGenerated"/>
|
||||||
<status xil_pn:value="ReadyToRun"/>
|
<status xil_pn:value="ReadyToRun"/>
|
||||||
|
<status xil_pn:value="OutOfDateForInputs"/>
|
||||||
|
<status xil_pn:value="InputChanged"/>
|
||||||
<outfile xil_pn:name="LAN_IDE_CP.lso"/>
|
<outfile xil_pn:name="LAN_IDE_CP.lso"/>
|
||||||
<outfile xil_pn:name="LAN_IDE_CP.ngc"/>
|
<outfile xil_pn:name="LAN_IDE_CP.ngc"/>
|
||||||
<outfile xil_pn:name="LAN_IDE_CP.ngr"/>
|
<outfile xil_pn:name="LAN_IDE_CP.ngr"/>
|
||||||
@@ -84,31 +90,38 @@
|
|||||||
<status xil_pn:value="SuccessfullyRun"/>
|
<status xil_pn:value="SuccessfullyRun"/>
|
||||||
<status xil_pn:value="ReadyToRun"/>
|
<status xil_pn:value="ReadyToRun"/>
|
||||||
</transform>
|
</transform>
|
||||||
<transform xil_pn:end_ts="1546445578" xil_pn:in_ck="-8547647177936735053" xil_pn:name="TRAN_ngdbuild" xil_pn:prop_ck="6932115226421322529" xil_pn:start_ts="1546445571">
|
<transform xil_pn:end_ts="1546470556" xil_pn:in_ck="-8547647177936735053" xil_pn:name="TRAN_ngdbuild" xil_pn:prop_ck="6932115226421322529" xil_pn:start_ts="1546470548">
|
||||||
<status xil_pn:value="SuccessfullyRun"/>
|
<status xil_pn:value="SuccessfullyRun"/>
|
||||||
<status xil_pn:value="ReadyToRun"/>
|
<status xil_pn:value="ReadyToRun"/>
|
||||||
|
<status xil_pn:value="OutOfDateForPredecessor"/>
|
||||||
<outfile xil_pn:name="LAN_IDE_CP.bld"/>
|
<outfile xil_pn:name="LAN_IDE_CP.bld"/>
|
||||||
<outfile xil_pn:name="LAN_IDE_CP.ngd"/>
|
<outfile xil_pn:name="LAN_IDE_CP.ngd"/>
|
||||||
<outfile xil_pn:name="LAN_IDE_CP_ngdbuild.xrpt"/>
|
<outfile xil_pn:name="LAN_IDE_CP_ngdbuild.xrpt"/>
|
||||||
<outfile xil_pn:name="_ngo"/>
|
<outfile xil_pn:name="_ngo"/>
|
||||||
<outfile xil_pn:name="_xmsgs/ngdbuild.xmsgs"/>
|
<outfile xil_pn:name="_xmsgs/ngdbuild.xmsgs"/>
|
||||||
</transform>
|
</transform>
|
||||||
<transform xil_pn:end_ts="1546445619" xil_pn:in_ck="-2520376148396280667" xil_pn:name="TRANEXT_vm6File_xc9500xl" xil_pn:prop_ck="-1014768965495450326" xil_pn:start_ts="1546445578">
|
<transform xil_pn:end_ts="1546470603" xil_pn:in_ck="-2520376148396280667" xil_pn:name="TRANEXT_vm6File_xc9500xl" xil_pn:prop_ck="-1014768965495450326" xil_pn:start_ts="1546470556">
|
||||||
<status xil_pn:value="FailedRun"/>
|
<status xil_pn:value="SuccessfullyRun"/>
|
||||||
<status xil_pn:value="WarningsGenerated"/>
|
<status xil_pn:value="WarningsGenerated"/>
|
||||||
<status xil_pn:value="ReadyToRun"/>
|
<status xil_pn:value="ReadyToRun"/>
|
||||||
|
<status xil_pn:value="OutOfDateForPredecessor"/>
|
||||||
|
<outfile xil_pn:name="LAN_IDE_CP.gyd"/>
|
||||||
|
<outfile xil_pn:name="LAN_IDE_CP.mfd"/>
|
||||||
|
<outfile xil_pn:name="LAN_IDE_CP.nga"/>
|
||||||
|
<outfile xil_pn:name="LAN_IDE_CP.pad"/>
|
||||||
|
<outfile xil_pn:name="LAN_IDE_CP.pnx"/>
|
||||||
<outfile xil_pn:name="LAN_IDE_CP.rpt"/>
|
<outfile xil_pn:name="LAN_IDE_CP.rpt"/>
|
||||||
<outfile xil_pn:name="LAN_IDE_CP.tspec"/>
|
<outfile xil_pn:name="LAN_IDE_CP.tspec"/>
|
||||||
|
<outfile xil_pn:name="LAN_IDE_CP.vm6"/>
|
||||||
|
<outfile xil_pn:name="LAN_IDE_CP.xml"/>
|
||||||
|
<outfile xil_pn:name="LAN_IDE_CP_build.xml"/>
|
||||||
<outfile xil_pn:name="LAN_IDE_CP_html"/>
|
<outfile xil_pn:name="LAN_IDE_CP_html"/>
|
||||||
|
<outfile xil_pn:name="LAN_IDE_CP_pad.csv"/>
|
||||||
</transform>
|
</transform>
|
||||||
<transform xil_pn:end_ts="1546443901" xil_pn:in_ck="-2520376148396271803" xil_pn:name="TRANEXT_crtProg_xc9500" xil_pn:prop_ck="-6294026017969277533" xil_pn:start_ts="1546443899">
|
<transform xil_pn:end_ts="1546470606" xil_pn:in_ck="-2520376148396271803" xil_pn:name="TRANEXT_crtProg_xc9500" xil_pn:prop_ck="-6294026017969277533" xil_pn:start_ts="1546470603">
|
||||||
<status xil_pn:value="SuccessfullyRun"/>
|
<status xil_pn:value="SuccessfullyRun"/>
|
||||||
<status xil_pn:value="ReadyToRun"/>
|
<status xil_pn:value="ReadyToRun"/>
|
||||||
<status xil_pn:value="OutOfDateForInputs"/>
|
|
||||||
<status xil_pn:value="OutOfDateForPredecessor"/>
|
<status xil_pn:value="OutOfDateForPredecessor"/>
|
||||||
<status xil_pn:value="OutOfDateForOutputs"/>
|
|
||||||
<status xil_pn:value="InputChanged"/>
|
|
||||||
<status xil_pn:value="OutputChanged"/>
|
|
||||||
<outfile xil_pn:name="LAN_IDE_CP.jed"/>
|
<outfile xil_pn:name="LAN_IDE_CP.jed"/>
|
||||||
</transform>
|
</transform>
|
||||||
<transform xil_pn:end_ts="1545129218" xil_pn:in_ck="-2520376148396285089" xil_pn:name="TRAN_impactProgrammingTool_CPLD" xil_pn:prop_ck="-3598488201878296819" xil_pn:start_ts="1545129218">
|
<transform xil_pn:end_ts="1545129218" xil_pn:in_ck="-2520376148396285089" xil_pn:name="TRAN_impactProgrammingTool_CPLD" xil_pn:prop_ck="-3598488201878296819" xil_pn:start_ts="1545129218">
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
<property xil_pn:name="Equivalent Register Removal XST" xil_pn:value="true" xil_pn:valueState="default"/>
|
<property xil_pn:name="Equivalent Register Removal XST" xil_pn:value="true" xil_pn:valueState="default"/>
|
||||||
<property xil_pn:name="Evaluation Development Board" xil_pn:value="None Specified" xil_pn:valueState="default"/>
|
<property xil_pn:name="Evaluation Development Board" xil_pn:value="None Specified" xil_pn:valueState="default"/>
|
||||||
<property xil_pn:name="Exhaustive Fit Mode" xil_pn:value="false" xil_pn:valueState="default"/>
|
<property xil_pn:name="Exhaustive Fit Mode" xil_pn:value="false" xil_pn:valueState="default"/>
|
||||||
<property xil_pn:name="FSM Encoding Algorithm" xil_pn:value="One-Hot" xil_pn:valueState="non-default"/>
|
<property xil_pn:name="FSM Encoding Algorithm" xil_pn:value="Compact" xil_pn:valueState="non-default" xil_pn:x_locked="true"/>
|
||||||
<property xil_pn:name="Filter Files From Compile Order" xil_pn:value="true" xil_pn:valueState="default"/>
|
<property xil_pn:name="Filter Files From Compile Order" xil_pn:value="true" xil_pn:valueState="default"/>
|
||||||
<property xil_pn:name="Functional Model Target Language ArchWiz" xil_pn:value="VHDL" xil_pn:valueState="default"/>
|
<property xil_pn:name="Functional Model Target Language ArchWiz" xil_pn:value="VHDL" xil_pn:valueState="default"/>
|
||||||
<property xil_pn:name="Functional Model Target Language Coregen" xil_pn:value="VHDL" xil_pn:valueState="default"/>
|
<property xil_pn:name="Functional Model Target Language Coregen" xil_pn:value="VHDL" xil_pn:valueState="default"/>
|
||||||
@@ -97,7 +97,7 @@
|
|||||||
<property xil_pn:name="Language" xil_pn:value="VHDL" xil_pn:valueState="default"/>
|
<property xil_pn:name="Language" xil_pn:value="VHDL" xil_pn:valueState="default"/>
|
||||||
<property xil_pn:name="Last Applied Goal" xil_pn:value="Balanced" xil_pn:valueState="default"/>
|
<property xil_pn:name="Last Applied Goal" xil_pn:value="Balanced" xil_pn:valueState="default"/>
|
||||||
<property xil_pn:name="Last Applied Strategy" xil_pn:value="area;C:/Users/Matze/Amiga/Hardwarehacks/Zorro-LAN-IDE/Logic/LAN_IDE/area.xds" xil_pn:valueState="non-default"/>
|
<property xil_pn:name="Last Applied Strategy" xil_pn:value="area;C:/Users/Matze/Amiga/Hardwarehacks/Zorro-LAN-IDE/Logic/LAN_IDE/area.xds" xil_pn:valueState="non-default"/>
|
||||||
<property xil_pn:name="Last Unlock Status" xil_pn:value="true" xil_pn:valueState="non-default"/>
|
<property xil_pn:name="Last Unlock Status" xil_pn:value="false" xil_pn:valueState="default"/>
|
||||||
<property xil_pn:name="Launch SDK after Export" xil_pn:value="true" xil_pn:valueState="default"/>
|
<property xil_pn:name="Launch SDK after Export" xil_pn:value="true" xil_pn:valueState="default"/>
|
||||||
<property xil_pn:name="Library for Verilog Sources" xil_pn:value="" xil_pn:valueState="default"/>
|
<property xil_pn:name="Library for Verilog Sources" xil_pn:value="" xil_pn:valueState="default"/>
|
||||||
<property xil_pn:name="Load glbl" xil_pn:value="true" xil_pn:valueState="default"/>
|
<property xil_pn:name="Load glbl" xil_pn:value="true" xil_pn:valueState="default"/>
|
||||||
@@ -112,7 +112,7 @@
|
|||||||
<property xil_pn:name="Netlist Hierarchy" xil_pn:value="As Optimized" xil_pn:valueState="default"/>
|
<property xil_pn:name="Netlist Hierarchy" xil_pn:value="As Optimized" xil_pn:valueState="default"/>
|
||||||
<property xil_pn:name="Number of Clock Buffers" xil_pn:value="4" xil_pn:valueState="default"/>
|
<property xil_pn:name="Number of Clock Buffers" xil_pn:value="4" xil_pn:valueState="default"/>
|
||||||
<property xil_pn:name="Optimization Effort" xil_pn:value="Normal" xil_pn:valueState="default"/>
|
<property xil_pn:name="Optimization Effort" xil_pn:value="Normal" xil_pn:valueState="default"/>
|
||||||
<property xil_pn:name="Optimization Goal" xil_pn:value="Speed" xil_pn:valueState="default"/>
|
<property xil_pn:name="Optimization Goal" xil_pn:value="Speed" xil_pn:valueState="default" xil_pn:x_locked="true"/>
|
||||||
<property xil_pn:name="Other CPLD Fitter Command Line Options" xil_pn:value="" xil_pn:valueState="default"/>
|
<property xil_pn:name="Other CPLD Fitter Command Line Options" xil_pn:value="" xil_pn:valueState="default"/>
|
||||||
<property xil_pn:name="Other Compiler Options" xil_pn:value="" xil_pn:valueState="default"/>
|
<property xil_pn:name="Other Compiler Options" xil_pn:value="" xil_pn:valueState="default"/>
|
||||||
<property xil_pn:name="Other Compiler Options Fit" xil_pn:value="" xil_pn:valueState="default"/>
|
<property xil_pn:name="Other Compiler Options Fit" xil_pn:value="" xil_pn:valueState="default"/>
|
||||||
@@ -155,7 +155,7 @@
|
|||||||
<property xil_pn:name="Run for Specified Time Map" xil_pn:value="true" xil_pn:valueState="default"/>
|
<property xil_pn:name="Run for Specified Time Map" xil_pn:value="true" xil_pn:valueState="default"/>
|
||||||
<property xil_pn:name="Run for Specified Time Par" xil_pn:value="true" xil_pn:valueState="default"/>
|
<property xil_pn:name="Run for Specified Time Par" xil_pn:value="true" xil_pn:valueState="default"/>
|
||||||
<property xil_pn:name="Run for Specified Time Translate" xil_pn:value="true" xil_pn:valueState="default"/>
|
<property xil_pn:name="Run for Specified Time Translate" xil_pn:value="true" xil_pn:valueState="default"/>
|
||||||
<property xil_pn:name="Safe Implementation" xil_pn:value="No" xil_pn:valueState="default"/>
|
<property xil_pn:name="Safe Implementation" xil_pn:value="No" xil_pn:valueState="default" xil_pn:x_locked="true"/>
|
||||||
<property xil_pn:name="Selected Module Instance Name" xil_pn:value="" xil_pn:valueState="default"/>
|
<property xil_pn:name="Selected Module Instance Name" xil_pn:value="" xil_pn:valueState="default"/>
|
||||||
<property xil_pn:name="Selected Simulation Root Source Node Behavioral" xil_pn:value="" xil_pn:valueState="default"/>
|
<property xil_pn:name="Selected Simulation Root Source Node Behavioral" xil_pn:value="" xil_pn:valueState="default"/>
|
||||||
<property xil_pn:name="Selected Simulation Root Source Node Post-Map" xil_pn:value="" xil_pn:valueState="default"/>
|
<property xil_pn:name="Selected Simulation Root Source Node Post-Map" xil_pn:value="" xil_pn:valueState="default"/>
|
||||||
|
|||||||
@@ -738,7 +738,7 @@ begin
|
|||||||
CP_RD_S <= not RW;
|
CP_RD_S <= not RW;
|
||||||
CP_WE_S <= RW;
|
CP_WE_S <= RW;
|
||||||
end if;
|
end if;
|
||||||
CP_WE_QUIRK <= CP_WE_S;
|
CP_WE_QUIRK <= CP_WE_S; --the clockport write must be low exactly one 7MHz cycle!
|
||||||
end if;
|
end if;
|
||||||
end process cp_rw_gen;
|
end process cp_rw_gen;
|
||||||
|
|
||||||
|
|||||||
@@ -146,7 +146,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>-fsm_encoding</td>
|
<td>-fsm_encoding</td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
<td>Auto</td>
|
<td>Compact</td>
|
||||||
<td>AUTO</td>
|
<td>AUTO</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<TD BGCOLOR='#FFFF99'><B>Module Name:</B></TD>
|
<TD BGCOLOR='#FFFF99'><B>Module Name:</B></TD>
|
||||||
<TD>LAN_IDE_CP</TD>
|
<TD>LAN_IDE_CP</TD>
|
||||||
<TD BGCOLOR='#FFFF99'><B>Implementation State:</B></TD>
|
<TD BGCOLOR='#FFFF99'><B>Implementation State:</B></TD>
|
||||||
<TD>Translated</TD>
|
<TD>Fitted</TD>
|
||||||
</TR>
|
</TR>
|
||||||
<TR ALIGN=LEFT>
|
<TR ALIGN=LEFT>
|
||||||
<TD BGCOLOR='#FFFF99'><B>Target Device:</B></TD>
|
<TD BGCOLOR='#FFFF99'><B>Target Device:</B></TD>
|
||||||
@@ -25,7 +25,7 @@ No Errors</TD>
|
|||||||
<TR ALIGN=LEFT>
|
<TR ALIGN=LEFT>
|
||||||
<TD BGCOLOR='#FFFF99'><B>Product Version:</B></TD><TD>ISE 14.7</TD>
|
<TD BGCOLOR='#FFFF99'><B>Product Version:</B></TD><TD>ISE 14.7</TD>
|
||||||
<TD BGCOLOR='#FFFF99'><UL><LI><B>Warnings:</B></LI></UL></TD>
|
<TD BGCOLOR='#FFFF99'><UL><LI><B>Warnings:</B></LI></UL></TD>
|
||||||
<TD ALIGN=LEFT><A HREF_DISABLED='C:/Users/Matze/Amiga/Hardwarehacks/Zorro-LAN-IDE/Logic/LAN_IDE\_xmsgs/*.xmsgs?&DataKey=Warning'>53 Warnings (1 new)</A></TD>
|
<TD ALIGN=LEFT><A HREF_DISABLED='C:/Users/Matze/Amiga/Hardwarehacks/Zorro-LAN-IDE/Logic/LAN_IDE\_xmsgs/*.xmsgs?&DataKey=Warning'>46 Warnings (0 new)</A></TD>
|
||||||
</TR>
|
</TR>
|
||||||
<TR ALIGN=LEFT>
|
<TR ALIGN=LEFT>
|
||||||
<TD BGCOLOR='#FFFF99'><B>Design Goal:</B></dif></TD>
|
<TD BGCOLOR='#FFFF99'><B>Design Goal:</B></dif></TD>
|
||||||
@@ -65,9 +65,9 @@ System Settings</A>
|
|||||||
<TR ALIGN=CENTER BGCOLOR='#99CCFF'><TD ALIGN=CENTER COLSPAN='6'><B>Detailed Reports</B></TD><TD ALIGN=RIGHT WIDTH='10%'COLSPAN=1> <A HREF_DISABLED="?&ExpandedTable=DetailedReports"><B>[-]</B></a></TD></TR>
|
<TR ALIGN=CENTER BGCOLOR='#99CCFF'><TD ALIGN=CENTER COLSPAN='6'><B>Detailed Reports</B></TD><TD ALIGN=RIGHT WIDTH='10%'COLSPAN=1> <A HREF_DISABLED="?&ExpandedTable=DetailedReports"><B>[-]</B></a></TD></TR>
|
||||||
<TR BGCOLOR='#FFFF99'><TD><B>Report Name</B></TD><TD><B>Status</B></TD><TD><B>Generated</B></TD>
|
<TR BGCOLOR='#FFFF99'><TD><B>Report Name</B></TD><TD><B>Status</B></TD><TD><B>Generated</B></TD>
|
||||||
<TD ALIGN=LEFT><B>Errors</B></TD><TD ALIGN=LEFT><B>Warnings</B></TD><TD ALIGN=LEFT COLSPAN='2'><B>Infos</B></TD></TR>
|
<TD ALIGN=LEFT><B>Errors</B></TD><TD ALIGN=LEFT><B>Warnings</B></TD><TD ALIGN=LEFT COLSPAN='2'><B>Infos</B></TD></TR>
|
||||||
<TR ALIGN=LEFT><TD><A HREF_DISABLED='C:/Users/Matze/Amiga/Hardwarehacks/Zorro-LAN-IDE/Logic/LAN_IDE\LAN_IDE_CP.syr'>Synthesis Report</A></TD><TD>Current</TD><TD>Mi 2. Jan 00:55:49 2019</TD><TD ALIGN=LEFT>0</TD><TD ALIGN=LEFT><A HREF_DISABLED='C:/Users/Matze/Amiga/Hardwarehacks/Zorro-LAN-IDE/Logic/LAN_IDE\_xmsgs/xst.xmsgs?&DataKey=Warning'>52 Warnings (1 new)</A></TD><TD ALIGN=LEFT COLSPAN='2'><A HREF_DISABLED='C:/Users/Matze/Amiga/Hardwarehacks/Zorro-LAN-IDE/Logic/LAN_IDE\_xmsgs/xst.xmsgs?&DataKey=Info'>10 Infos (0 new)</A></TD></TR>
|
<TR ALIGN=LEFT><TD><A HREF_DISABLED='C:/Users/Matze/Amiga/Hardwarehacks/Zorro-LAN-IDE/Logic/LAN_IDE\LAN_IDE_CP.syr'>Synthesis Report</A></TD><TD>Current</TD><TD>Do 3. Jan 00:09:07 2019</TD><TD ALIGN=LEFT>0</TD><TD ALIGN=LEFT><A HREF_DISABLED='C:/Users/Matze/Amiga/Hardwarehacks/Zorro-LAN-IDE/Logic/LAN_IDE\_xmsgs/xst.xmsgs?&DataKey=Warning'>46 Warnings (0 new)</A></TD><TD ALIGN=LEFT COLSPAN='2'><A HREF_DISABLED='C:/Users/Matze/Amiga/Hardwarehacks/Zorro-LAN-IDE/Logic/LAN_IDE\_xmsgs/xst.xmsgs?&DataKey=Info'>10 Infos (0 new)</A></TD></TR>
|
||||||
<TR ALIGN=LEFT><TD><A HREF_DISABLED='C:/Users/Matze/Amiga/Hardwarehacks/Zorro-LAN-IDE/Logic/LAN_IDE\LAN_IDE_CP.bld'>Translation Report</A></TD><TD>Current</TD><TD>Mi 2. Jan 00:55:56 2019</TD><TD ALIGN=LEFT>0</TD><TD ALIGN=LEFT><A HREF_DISABLED='C:/Users/Matze/Amiga/Hardwarehacks/Zorro-LAN-IDE/Logic/LAN_IDE\_xmsgs/ngdbuild.xmsgs?&DataKey=Warning'>1 Warning (0 new)</A></TD><TD ALIGN=LEFT COLSPAN='2'>0</TD></TR>
|
<TR ALIGN=LEFT><TD><A HREF_DISABLED='C:/Users/Matze/Amiga/Hardwarehacks/Zorro-LAN-IDE/Logic/LAN_IDE\LAN_IDE_CP.bld'>Translation Report</A></TD><TD>Current</TD><TD>Do 3. Jan 00:09:14 2019</TD><TD ALIGN=LEFT>0</TD><TD ALIGN=LEFT>0</TD><TD ALIGN=LEFT COLSPAN='2'>0</TD></TR>
|
||||||
<TR ALIGN=LEFT><TD><A HREF_DISABLED='C:/Users/Matze/Amiga/Hardwarehacks/Zorro-LAN-IDE/Logic/LAN_IDE\LAN_IDE_CP.rpt'>CPLD Fitter Report (Text)</A></TD><TD>Out of Date</TD><TD>Mi 2. Jan 00:55:22 2019</TD><TD ALIGN=LEFT>0</TD><TD ALIGN=LEFT><A HREF_DISABLED='C:/Users/Matze/Amiga/Hardwarehacks/Zorro-LAN-IDE/Logic/LAN_IDE\_xmsgs/cpldfit.xmsgs?&DataKey=Warning'>8 Warnings (1 new)</A></TD><TD ALIGN=LEFT COLSPAN='2'><A HREF_DISABLED='C:/Users/Matze/Amiga/Hardwarehacks/Zorro-LAN-IDE/Logic/LAN_IDE\_xmsgs/cpldfit.xmsgs?&DataKey=Info'>1 Info (1 new)</A></TD></TR>
|
<TR ALIGN=LEFT><TD><A HREF_DISABLED='C:/Users/Matze/Amiga/Hardwarehacks/Zorro-LAN-IDE/Logic/LAN_IDE\LAN_IDE_CP.rpt'>CPLD Fitter Report (Text)</A></TD><TD>Current</TD><TD>Do 3. Jan 00:09:53 2019</TD><TD ALIGN=LEFT>0</TD><TD ALIGN=LEFT><A HREF_DISABLED='C:/Users/Matze/Amiga/Hardwarehacks/Zorro-LAN-IDE/Logic/LAN_IDE\_xmsgs/cpldfit.xmsgs?&DataKey=Warning'>3 Warnings (1 new)</A></TD><TD ALIGN=LEFT COLSPAN='2'><A HREF_DISABLED='C:/Users/Matze/Amiga/Hardwarehacks/Zorro-LAN-IDE/Logic/LAN_IDE\_xmsgs/cpldfit.xmsgs?&DataKey=Info'>1 Info (1 new)</A></TD></TR>
|
||||||
<TR ALIGN=LEFT><TD>Power Report</TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD COLSPAN='2'> </TD></TR>
|
<TR ALIGN=LEFT><TD>Power Report</TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD COLSPAN='2'> </TD></TR>
|
||||||
</TABLE>
|
</TABLE>
|
||||||
<BR><TABLE BORDER CELLSPACING=0 CELLPADDING=3 WIDTH='100%'>
|
<BR><TABLE BORDER CELLSPACING=0 CELLPADDING=3 WIDTH='100%'>
|
||||||
@@ -77,5 +77,5 @@ System Settings</A>
|
|||||||
</TABLE>
|
</TABLE>
|
||||||
|
|
||||||
|
|
||||||
<br><center><b>Date Generated:</b> 01/02/2019 - 00:55:58</center>
|
<br><center><b>Date Generated:</b> 01/03/2019 - 00:29:33</center>
|
||||||
</BODY></HTML>
|
</BODY></HTML>
|
||||||
@@ -79,13 +79,13 @@
|
|||||||
<ClosedNodesVersion>1</ClosedNodesVersion>
|
<ClosedNodesVersion>1</ClosedNodesVersion>
|
||||||
</ClosedNodes>
|
</ClosedNodes>
|
||||||
<SelectedItems>
|
<SelectedItems>
|
||||||
<SelectedItem></SelectedItem>
|
<SelectedItem/>
|
||||||
</SelectedItems>
|
</SelectedItems>
|
||||||
<ScrollbarPosition orientation="vertical" >0</ScrollbarPosition>
|
<ScrollbarPosition orientation="vertical" >0</ScrollbarPosition>
|
||||||
<ScrollbarPosition orientation="horizontal" >0</ScrollbarPosition>
|
<ScrollbarPosition orientation="horizontal" >0</ScrollbarPosition>
|
||||||
<ViewHeaderState orientation="horizontal" >000000ff000000000000000100000001000000000000000000000000000000000000000000000000f8000000010000000100000000000000000000000064ffffffff000000810000000000000001000000f80000000100000000</ViewHeaderState>
|
<ViewHeaderState orientation="horizontal" >000000ff000000000000000100000001000000000000000000000000000000000000000000000000f8000000010000000100000000000000000000000064ffffffff000000810000000000000001000000f80000000100000000</ViewHeaderState>
|
||||||
<UserChangedColumnWidths orientation="horizontal" >false</UserChangedColumnWidths>
|
<UserChangedColumnWidths orientation="horizontal" >false</UserChangedColumnWidths>
|
||||||
<CurrentItem></CurrentItem>
|
<CurrentItem/>
|
||||||
</ItemView>
|
</ItemView>
|
||||||
<ItemView engineview="BehavioralSim" guiview="Source" compilemode="AutoCompile" >
|
<ItemView engineview="BehavioralSim" guiview="Source" compilemode="AutoCompile" >
|
||||||
<ClosedNodes>
|
<ClosedNodes>
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<?xml version='1.0' encoding='UTF-8'?>
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
<report-views version="2.0" >
|
<report-views version="2.0" >
|
||||||
<header>
|
<header>
|
||||||
<DateModified>2019-01-02T00:24:39</DateModified>
|
<DateModified>2019-01-03T00:29:34</DateModified>
|
||||||
<ModuleName>LAN_IDE_CP</ModuleName>
|
<ModuleName>LAN_IDE_CP</ModuleName>
|
||||||
<SummaryTimeStamp>2018-12-17T23:59:32</SummaryTimeStamp>
|
<SummaryTimeStamp>2019-01-02T00:55:58</SummaryTimeStamp>
|
||||||
<SavedFilePath>C:/Users/Matze/Amiga/Hardwarehacks/Zorro-LAN-IDE/Logic/LAN_IDE/iseconfig/LAN_IDE_CP.xreport</SavedFilePath>
|
<SavedFilePath>C:/Users/Matze/Amiga/Hardwarehacks/Zorro-LAN-IDE/Logic/LAN_IDE/iseconfig/LAN_IDE_CP.xreport</SavedFilePath>
|
||||||
<ImplementationReportsDirectory>C:/Users/Matze/Amiga/Hardwarehacks/Zorro-LAN-IDE/Logic/LAN_IDE\</ImplementationReportsDirectory>
|
<ImplementationReportsDirectory>C:/Users/Matze/Amiga/Hardwarehacks/Zorro-LAN-IDE/Logic/LAN_IDE\</ImplementationReportsDirectory>
|
||||||
<DateInitialized>2016-12-13T22:08:29</DateInitialized>
|
<DateInitialized>2016-12-13T22:08:29</DateInitialized>
|
||||||
|
|||||||
Reference in New Issue
Block a user