OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [lib/] [libbsp/] [no_cpu/] [no_bsp/] [shmsupp/] [getcfg.c] - Blame information for rev 846

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*  void Shm_Get_configuration( localnode, &shmcfg )
2
 *
3
 *  This routine initializes, if necessary, and returns a pointer
4
 *  to the Shared Memory Configuration Table for the XXX target.
5
 *
6
 *  INPUT PARAMETERS:
7
 *    localnode - local node number
8
 *    shmcfg    - address of pointer to SHM Config Table
9
 *
10
 *  OUTPUT PARAMETERS:
11
 *    *shmcfg   - pointer to SHM Config Table
12
 *
13
XXX: FIX THE COMMENTS BELOW WHEN THE CPU IS KNOWN
14
 *  NOTES:  The XYZ does not have an interprocessor interrupt.
15
 *
16
 *          The following table illustrates the configuration limitations:
17
 *
18
 *                                   BUS     MAX
19
 *                          MODE    ENDIAN  NODES
20
 *                        ========= ====== =======
21
 *                         POLLED    BIG    2+
22
 *                        INTERRUPT **** NOT SUPPORTED ****
23
 *
24
 *  COPYRIGHT (c) 1989-1999.
25
 *  On-Line Applications Research Corporation (OAR).
26
 *
27
 *  The license and distribution terms for this file may be
28
 *  found in the file LICENSE in this distribution or at
29
 *  http://www.OARcorp.com/rtems/license.html.
30
 *
31
 *  $Id: getcfg.c,v 1.2 2001-09-27 12:00:27 chris Exp $
32
 */
33
 
34
#include <rtems.h>
35
#include <bsp.h>
36
#include <shm_driver.h>
37
 
38
/*
39
 *  configured if currently polling of interrupt driven
40
 */
41
 
42
#define INTERRUPT 0        /* XXX: */
43
#define POLLING   1        /* XXX: fix me -- is polling ONLY!!! */
44
 
45
 
46
shm_config_table BSP_shm_cfgtbl;
47
 
48
void Shm_Get_configuration(
49
  rtems_unsigned32   localnode,
50
  shm_config_table **shmcfg
51
)
52
{
53
   BSP_shm_cfgtbl.base         = 0x0;
54
   BSP_shm_cfgtbl.length       = 1 * MEGABYTE;
55
   BSP_shm_cfgtbl.format       = SHM_BIG;
56
 
57
   /*
58
    *  Override cause_intr or shm_isr if your target has
59
    *  special requirements.
60
    */
61
 
62
   BSP_shm_cfgtbl.cause_intr   = Shm_Cause_interrupt;
63
 
64
#ifdef NEUTRAL_BIG
65
   BSP_shm_cfgtbl.convert      = NULL_CONVERT;
66
#else
67
   BSP_shm_cfgtbl.convert      = CPU_swap_u32;
68
#endif
69
 
70
   BSP_shm_cfgtbl.poll_intr    = POLLED_MODE;
71
   BSP_shm_cfgtbl.Intr.address = NO_INTERRUPT;
72
   BSP_shm_cfgtbl.Intr.value   = NO_INTERRUPT;
73
   BSP_shm_cfgtbl.Intr.length  = NO_INTERRUPT;
74
 
75
   *shmcfg = &BSP_shm_cfgtbl;
76
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.