Changeset 0f04edd in rtems


Ignore:
Timestamp:
Apr 5, 2012, 3:23:16 PM (7 years ago)
Author:
Daniel Hellstrom <daniel@…>
Branches:
4.11, master
Children:
7499b84
Parents:
c500cbc
git-author:
Daniel Hellstrom <daniel@…> (04/05/12 15:23:16)
git-committer:
Joel Sherrill <joel.sherrill@…> (04/06/12 16:38:25)
Message:

SMC91111: updated to use shared IRQ service

Signed-off-by: Daniel Hellstrom <daniel@…>

Location:
c/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/sparc/leon2/leon_smc91111/leon_smc91111.c

    rc500cbc r0f04edd  
    2727
    2828#define SMC91111_BASE_ADDR (void*)0x20000300
    29 #define SMC91111_BASE_IRQ  LEON_TRAP_TYPE(4)
     29#define SMC91111_BASE_IRQ  4
    3030#define SMC91111_BASE_PIO  4
    3131
    3232scmv91111_configuration_t leon_scmv91111_configuration = {
    3333  SMC91111_BASE_ADDR, /* base address */
    34   SMC91111_BASE_IRQ,  /* vector number */
     34  SMC91111_BASE_IRQ,  /* IRQ number (on LEON vector is irq) */
    3535  SMC91111_BASE_PIO,  /* PIO */
    3636  100,                /* 100b */
     
    5656  *((volatile unsigned int *)0x800000A8) |=
    5757    (0xe0 | leon_scmv91111_configuration.pio)
    58       << (8 * ((leon_scmv91111_configuration.vector & 0x0f) - 4));
     58      << (8 * (leon_scmv91111_configuration.vector - 4)); /* vector = irq-no */
    5959
    6060  return _rtems_smc91111_driver_attach(config,&leon_scmv91111_configuration);
    61 
    62 };
    63 
     61}
  • c/src/lib/libbsp/sparc/leon3/leon_smc91111/leon_smc91111.c

    rc500cbc r0f04edd  
    1414scmv91111_configuration_t leon_scmv91111_configuration = {
    1515  SMC91111_BASE_ADDR,                 /* base address */
    16     LEON_TRAP_TYPE (SMC91111_BASE_IRQ), /* vector number */
     16  SMC91111_BASE_IRQ,                  /* IRQ number (on LEON vector is irq) */
    1717  SMC91111_BASE_PIO,                  /* PIO */
    18     100,                        /* 100b */
     18  100,                                /* 100b */
    1919  1,                                  /* fulldx */
    2020  1                                   /* autoneg */
  • c/src/libchip/network/smc91111.c

    rc500cbc r0f04edd  
    6262#ifdef BSP_FEATURE_IRQ_EXTENSION
    6363  #include <rtems/irq-extension.h>
    64 #else
    65   #if defined(__m68k__)
    66     extern m68k_isr_entry set_vector( rtems_isr_entry, rtems_vector_number, int );
    67   #else
    68     extern rtems_isr_entry set_vector( rtems_isr_entry, rtems_vector_number, int );
    69   #endif
    7064#endif
    7165
     
    9387
    9488/* \ ------------- Interrupt ------------- \ */
    95 rtems_isr lan91cxx_interrupt_handler(rtems_vector_number v)
    96 {
    97         struct lan91cxx_priv_data *cpd = &smc91111;
     89void lan91cxx_interrupt_handler(void *arg)
     90{
     91        struct lan91cxx_priv_data *cpd = arg;
    9892        unsigned short irq, event;
    9993        unsigned short oldbase;
     
    10301024{
    10311025        unsigned short val;
    1032         int i;
     1026        int i, rc;
    10331027
    10341028        DEBUG_FUNCTION();
     
    10541048        }
    10551049#else
    1056         db_printf("Install lan91cxx irqvector at %d\n", cpd->config.vector);
    1057         set_vector(lan91cxx_interrupt_handler, cpd->config.vector, 1);
     1050        db_printf("Install lan91cxx isr at vec/irq %d\n", cpd->config.vector);
     1051        rc = rtems_interrupt_handler_install(cpd->config.vector, "smc91cxx",
     1052                RTEMS_INTERRUPT_SHARED, lan91cxx_interrupt_handler, cpd);
     1053        if (rc != RTEMS_SUCCESSFUL)
     1054                return 0;
    10581055#endif
    10591056
  • c/src/libchip/network/smc91111exp.h

    rc500cbc r0f04edd  
    1010typedef struct scmv91111_configuration {
    1111  void                     *baseaddr;
    12   unsigned int              vector;
     12  rtems_vector_number       vector;
    1313  unsigned int              pio;
    1414  unsigned int              ctl_rspeed;
Note: See TracChangeset for help on using the changeset viewer.