Changeset c9c67390 in rtems
- Timestamp:
- 02/05/99 00:34:17 (24 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- b7111263
- Parents:
- b5e4eb7
- Location:
- c/src
- Files:
-
- 9 added
- 6 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
c/src/lib/libbsp/powerpc/dmv177/include/bsp.h
rb5e4eb7 rc9c67390 49 49 */ 50 50 struct rtems_bsdnet_ifconfig; 51 extern int rtems_sonic_driver_attach(struct rtems_bsdnet_ifconfig *config);51 int rtems_dmv177_sonic_driver_attach(struct rtems_bsdnet_ifconfig *config); 52 52 #define RTEMS_BSP_NETWORK_DRIVER_NAME "sonic1" 53 #define RTEMS_BSP_NETWORK_DRIVER_ATTACH rtems_ sonic_driver_attach53 #define RTEMS_BSP_NETWORK_DRIVER_ATTACH rtems_dmv177_sonic_driver_attach 54 54 55 55 -
c/src/lib/libbsp/powerpc/dmv177/sonic/Makefile.in
rb5e4eb7 rc9c67390 9 9 PROJECT_ROOT = @PROJECT_ROOT@ 10 10 11 PGM=${ARCH}/ sonic.rel11 PGM=${ARCH}/dmvsonic.rel 12 12 13 13 # C source names, if any, go here -- minus the .c -
c/src/lib/libbsp/powerpc/dmv177/wrapup/Makefile.in
rb5e4eb7 rc9c67390 10 10 11 11 # We only build the networking device driver if HAS_NETWORKING was defined 12 NETWORKING_DRIVER_yes_V = sonic12 NETWORKING_DRIVER_yes_V = dmvsonic 13 13 NETWORKING_DRIVER = $(NETWORKING_DRIVER_$(HAS_NETWORKING)_V) 14 14 -
c/src/lib/libchip/Makefile.in
rb5e4eb7 rc9c67390 12 12 include $(RTEMS_ROOT)/make/directory.cfg 13 13 14 SUB_DIRS=rtc serial 14 # We only build the networking chip drivers if HAS_NETWORKING was defined 15 LIBNETWORKING_yes_V = network 16 LIBNETWORKING = $(LIBNETWORKING_$(HAS_NETWORKING)_V) 17 18 SUB_DIRS=rtc serial $(LIBNETWORKING) -
c/src/lib/wrapup/Makefile.in
rb5e4eb7 rc9c67390 25 25 $(wildcard $(PROJECT_RELEASE)/lib/librtcio$(LIB_VARIANT).a) \ 26 26 $(wildcard $(PROJECT_RELEASE)/lib/libserialio$(LIB_VARIANT).a) \ 27 $(wildcard $(PROJECT_RELEASE)/lib/libnetchip$(LIB_VARIANT).a) \ 27 28 $(PROJECT_RELEASE)/lib/libcsupport$(LIB_VARIANT).a \ 28 29 $(PROJECT_RELEASE)/lib/libmisc$(LIB_VARIANT).a \ -
c/src/libchip/network/sonic.c
rb5e4eb7 rc9c67390 1 1 /* 2 ******************************************************************* 3 ******************************************************************* 4 ** ** 5 ** RTEMS NETWORK DRIVER FOR NATIONAL DP83932 `SONIC' ** 6 ** SYSTEMS-ORIENTED NETWORK INTERFACE CONTROLLER ** 7 ** ** 8 ******************************************************************* 9 ******************************************************************* 10 */ 11 12 /* 13 * $Revision$ $Date$ $Author$ 14 * $State$ 15 * $Id$ 16 */ 17 18 /* 2 * RTEMS NETWORK DRIVER FOR NATIONAL DP83932 `SONIC' 3 * SYSTEMS-ORIENTED NETWORK INTERFACE CONTROLLER 4 * 5 * REUSABLE CHIP DRIVER 6 * 19 7 * References: 20 * 1) DP83932C-20/25/33 MHz SONIC(TM) Systems-Oriented Network Interface21 * Controller data sheet. TL/F/10492, RRD-B30M105, National Semiconductor,22 * 1995.23 8 * 24 * 2) Software Driver Programmer's Guide for the DP83932 SONIC(TM),25 * Application Note 746, Wesley Lee and Mike Lui, TL/F/11140,26 * RRD-B30M75, National Semiconductor, March, 1991.9 * 1) DP83932C-20/25/33 MHz SONIC(TM) Systems-Oriented Network Interface 10 * Controller data sheet. TL/F/10492, RRD-B30M105, National Semiconductor, 11 * 1995. 27 12 * 28 * 3) SVME/DMV-171 Single Board Computer Documentation Package, #805905, 29 * DY 4 Systems Inc., Kanata, Ontario, September, 1996. 30 */ 31 32 #include <bsp.h> /* XXX JRS changed order */ 33 #include "sonic.h" 13 * 2) Software Driver Programmer's Guide for the DP83932 SONIC(TM), 14 * Application Note 746, Wesley Lee and Mike Lui, TL/F/11140, 15 * RRD-B30M75, National Semiconductor, March, 1991. 16 * 17 * COPYRIGHT (c) 1989-1997. 18 * On-Line Applications Research Corporation (OAR). 19 * Copyright assigned to U.S. Government, 1994. 20 * 21 * The license and distribution terms for this file may be 22 * found in the file LICENSE in this distribution or at 23 * http://www.OARcorp.com/rtems/license.html. 24 * 25 * $Id$ 26 */ 27 28 #include <rtems.h> 34 29 #include <rtems/rtems_bsdnet.h> 35 36 /***** CONFIGURATION ****/ 37 typedef void (*sonic_write_register_t)( 38 void *base, 39 unsigned32 regno, 40 unsigned32 value 41 ); 42 43 typedef unsigned32 (*sonic_read_register_t)( 44 void *base, 45 unsigned32 regno 46 ); 47 48 typedef struct { 49 unsigned32 base_address; 50 unsigned32 vector; 51 unsigned32 dcr_value; 52 unsigned32 dc2_value; 53 unsigned32 tda_count; 54 unsigned32 rda_count; 55 sonic_write_register_t write_register; 56 sonic_read_register_t read_register; 57 } sonic_configuration_t; 58 59 /***** CONFIGURATION ****/ 30 #include <libchip/sonic.h> 60 31 61 32 #include <stdio.h> … … 74 45 #include <netinet/in.h> 75 46 #include <netinet/if_ether.h> 47 48 /* 49 * XXX fix this 50 */ 51 52 void *set_vector(void *, unsigned32, unsigned32); 76 53 77 54 /* … … 107 84 #include <rtems/dumpbuf.h> 108 85 #endif 109 110 /*111 * XXX112 */113 114 #include <dmv170.h>115 86 116 87 /* … … 1500 1471 1501 1472 int 1502 rtems_sonic_driver_attach _chip(1473 rtems_sonic_driver_attach ( 1503 1474 struct rtems_bsdnet_ifconfig *config, 1504 1475 sonic_configuration_t *chip … … 1657 1628 }; 1658 1629 #endif 1659 1660 void dmv177_sonic_write_register(1661 void *base,1662 unsigned32 regno,1663 unsigned32 value1664 )1665 {1666 volatile unsigned32 *p = base;1667 1668 #if (SONIC_DEBUG & SONIC_DEBUG_PRINT_REGISTERS)1669 printf( "%p Write 0x%04x to %s (0x%02x)\n",1670 &p[regno], value, SONIC_Reg_name[regno], regno );1671 fflush( stdout );1672 #endif1673 p[regno] = value;1674 }1675 1676 unsigned32 dmv177_sonic_read_register(1677 void *base,1678 unsigned32 regno1679 )1680 {1681 volatile unsigned32 *p = base;1682 unsigned32 value;1683 1684 value = p[regno];1685 #if (SONIC_DEBUG & SONIC_DEBUG_PRINT_REGISTERS)1686 printf( "%p Read 0x%04x from %s (0x%02x)\n",1687 &p[regno], value, SONIC_Reg_name[regno], regno );1688 fflush( stdout );1689 #endif1690 return value;1691 }1692 /******** DMV177 SPECIFIC INFORMATION ***********/1693 /*1694 * Default sizes of transmit and receive descriptor areas1695 */1696 #define RDA_COUNT 20 /* 20 */1697 #define TDA_COUNT 20 /* 10 */1698 1699 /*1700 * Default device configuration register values1701 * Conservative, generic values.1702 * DCR:1703 * No extended bus mode1704 * Unlatched bus retry1705 * Programmable outputs unused1706 * Asynchronous bus mode1707 * User definable pins unused1708 * No wait states (access time controlled by DTACK*)1709 * 32-bit DMA1710 * Empty/Fill DMA mode1711 * Maximum Transmit/Receive FIFO1712 * DC2:1713 * Extended programmable outputs unused1714 * Normal HOLD request1715 * Packet compress output unused1716 * No reject on CAM match1717 */1718 #define SONIC_DCR \1719 (DCR_DW32 | DCR_WAIT0 | DCR_PO0 | DCR_PO1 | DCR_RFT24 | DCR_TFT28)1720 #ifndef SONIC_DCR1721 # define SONIC_DCR (DCR_DW32 | DCR_TFT28)1722 #endif1723 #ifndef SONIC_DC21724 # define SONIC_DC2 (0)1725 #endif1726 1727 /*1728 * Default location of device registers1729 */1730 #ifndef SONIC_BASE_ADDRESS1731 # define SONIC_BASE_ADDRESS 0xF30000001732 # warning "Using default SONIC_BASE_ADDRESS."1733 #endif1734 1735 /*1736 * Default interrupt vector1737 */1738 #ifndef SONIC_VECTOR1739 # define SONIC_VECTOR 11740 # warning "Using default SONIC_VECTOR."1741 #endif1742 1743 sonic_configuration_t dmv177_sonic_configuration = {1744 SONIC_BASE_ADDRESS, /* base address */1745 SONIC_VECTOR, /* vector number */1746 SONIC_DCR, /* DCR register value */1747 SONIC_DC2, /* DC2 register value */1748 TDA_COUNT, /* number of transmit descriptors */1749 RDA_COUNT, /* number of receive descriptors */1750 dmv177_sonic_write_register,1751 dmv177_sonic_read_register1752 };1753 1754 int rtems_sonic_driver_attach (struct rtems_bsdnet_ifconfig *config)1755 {1756 return rtems_sonic_driver_attach_chip ( config, &dmv177_sonic_configuration );1757 1758 }1759 1760 /******** DMV177 SPECIFIC INFORMATION ***********/1761 -
c/src/libchip/network/sonic.h
rb5e4eb7 rc9c67390 1 1 /* 2 ******************************************************************. 3 ******************************************************************* 4 ** ** 5 ** DECLARATIONS FOR NATIONAL DP83932 `SONIC' ** 6 ** SYSTEMS-ORIENTED NETWORK INTERFACE CONTROLLER ** 7 ** ** 8 ******************************************************************* 9 ******************************************************************* 10 */ 11 12 /* 13 * $Revision$ $Date$ $Author$ 14 * $State$ 15 * $Id$ 2 * RTEMS NETWORK DRIVER FOR NATIONAL DP83932 `SONIC' 3 * SYSTEMS-ORIENTED NETWORK INTERFACE CONTROLLER 4 * 5 * REUSABLE CHIP DRIVER CONFIGURATION 6 * 7 * References: 8 * 9 * 1) DP83932C-20/25/33 MHz SONIC(TM) Systems-Oriented Network Interface 10 * Controller data sheet. TL/F/10492, RRD-B30M105, National Semiconductor, 11 * 1995. 12 * 13 * 2) Software Driver Programmer's Guide for the DP83932 SONIC(TM), 14 * Application Note 746, Wesley Lee and Mike Lui, TL/F/11140, 15 * RRD-B30M75, National Semiconductor, March, 1991. 16 * 17 * COPYRIGHT (c) 1989-1997. 18 * On-Line Applications Research Corporation (OAR). 19 * Copyright assigned to U.S. Government, 1994. 20 * 21 * The license and distribution terms for this file may be 22 * found in the file LICENSE in this distribution or at 23 * http://www.OARcorp.com/rtems/license.html. 24 * 25 * $Id$ 16 26 */ 17 27 … … 19 29 #define _SONIC_DP83932_ 20 30 21 #include <bsp.h> 31 /* 32 * Configuration Information 33 */ 34 35 typedef void (*sonic_write_register_t)( 36 void *base, 37 unsigned32 regno, 38 unsigned32 value 39 ); 40 41 typedef unsigned32 (*sonic_read_register_t)( 42 void *base, 43 unsigned32 regno 44 ); 45 46 typedef struct { 47 unsigned32 base_address; 48 unsigned32 vector; 49 unsigned32 dcr_value; 50 unsigned32 dc2_value; 51 unsigned32 tda_count; 52 unsigned32 rda_count; 53 sonic_write_register_t write_register; 54 sonic_read_register_t read_register; 55 } sonic_configuration_t; 22 56 23 57 /* … … 371 405 #define RDA_FREE 0xFFFF /* SONIC can use it */ 372 406 407 /* 408 * Attatch routine 409 */ 410 411 int rtems_sonic_driver_attach ( 412 struct rtems_bsdnet_ifconfig *config, 413 sonic_configuration_t *chip 414 ); 415 373 416 #endif /* _SONIC_DP83932_ */ -
c/src/wrapup/Makefile.in
rb5e4eb7 rc9c67390 25 25 $(wildcard $(PROJECT_RELEASE)/lib/librtcio$(LIB_VARIANT).a) \ 26 26 $(wildcard $(PROJECT_RELEASE)/lib/libserialio$(LIB_VARIANT).a) \ 27 $(wildcard $(PROJECT_RELEASE)/lib/libnetchip$(LIB_VARIANT).a) \ 27 28 $(PROJECT_RELEASE)/lib/libcsupport$(LIB_VARIANT).a \ 28 29 $(PROJECT_RELEASE)/lib/libmisc$(LIB_VARIANT).a \
Note: See TracChangeset
for help on using the changeset viewer.