source: rtems/c/src/lib/libbsp/sparc/leon2/leon_smc91111/leon_smc91111.c @ aaaedba

4.115
Last change on this file since aaaedba was 9b4422a2, checked in by Joel Sherrill <joel.sherrill@…>, on 05/03/12 at 15:09:24

Remove All CVS Id Strings Possible Using a Script

Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines

next to each other after Id string line removed.

+ remove entire comment blocks which only exited to

contain CVS Ids

+ If the processing left a blank line at the top of

a file, it was removed.

  • Property mode set to 100644
File size: 1.4 KB
Line 
1#include <rtems.h>
2
3#include <bsp.h>
4#include <rtems/bspIo.h>
5
6#include <stdlib.h>
7#include <stdio.h>
8#include <stdarg.h>
9#include <rtems/error.h>
10#include <rtems/rtems_bsdnet.h>
11
12#include <sys/param.h>
13#include <sys/mbuf.h>
14
15#include <sys/socket.h>
16#include <sys/sockio.h>
17#include <net/if.h>
18#include <netinet/in.h>
19#include <netinet/if_ether.h>
20
21#include <libchip/smc91111exp.h>
22
23
24#define SMC91111_BASE_ADDR (void*)0x20000300
25#define SMC91111_BASE_IRQ  4
26#define SMC91111_BASE_PIO  4
27
28scmv91111_configuration_t leon_scmv91111_configuration = {
29  SMC91111_BASE_ADDR, /* base address */
30  SMC91111_BASE_IRQ,  /* IRQ number (on LEON vector is irq) */
31  SMC91111_BASE_PIO,  /* PIO */
32  100,                /* 100b */
33  1,                  /* fulldx */
34  1                   /* autoneg */
35};
36
37int _rtems_smc91111_driver_attach(
38  struct rtems_bsdnet_ifconfig *config,
39  scmv91111_configuration_t    *scm_config
40);
41
42/*
43 * Attach an SMC91111 driver to the system
44 */
45int rtems_smc91111_driver_attach_leon2(struct rtems_bsdnet_ifconfig *config)
46{
47
48  /* activate io area */
49  printk("Activating Leon2 io port\n");
50  /*configure pio */
51  *((volatile unsigned int *)0x80000000) |= 0x10f80000;
52  *((volatile unsigned int *)0x800000A8) |=
53    (0xe0 | leon_scmv91111_configuration.pio)
54      << (8 * (leon_scmv91111_configuration.vector - 4)); /* vector = irq-no */
55
56  return _rtems_smc91111_driver_attach(config,&leon_scmv91111_configuration);
57}
Note: See TracBrowser for help on using the repository browser.