OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [lib/] [libbsp/] [a29k/] [portsw/] [shmsupp/] [getcfg.c] - Blame information for rev 493

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 11:59:40 chris Exp $
32
 */
33
 
34
#include <rtems.h>
35
#include <bsp.h>
36
#include <shm_driver.h>
37
 
38
#ifndef lint
39
static char _sccsid[] = "@(#)getcfg.c 04/08/96     1.1\n";
40
#endif
41
 
42
/*
43
 *  configured if currently polling of interrupt driven
44
 */
45
 
46
#define INTERRUPT 0        /* XXX: */
47
#define POLLING   1        /* XXX: fix me -- is polling ONLY!!! */
48
 
49
 
50
shm_config_table BSP_shm_cfgtbl;
51
 
52
void Shm_Get_configuration(
53
  rtems_unsigned32   localnode,
54
  shm_config_table **shmcfg
55
)
56
{
57
   BSP_shm_cfgtbl.base         = 0x0;
58
   BSP_shm_cfgtbl.length       = 1 * MEGABYTE;
59
   BSP_shm_cfgtbl.format       = SHM_BIG;
60
 
61
   /*
62
    *  Override cause_intr or shm_isr if your target has
63
    *  special requirements.
64
    */
65
 
66
   BSP_shm_cfgtbl.cause_intr   = Shm_Cause_interrupt;
67
 
68
#ifdef NEUTRAL_BIG
69
   BSP_shm_cfgtbl.convert      = NULL_CONVERT;
70
#else
71
   BSP_shm_cfgtbl.convert      = CPU_swap_u32;
72
#endif
73
 
74
   BSP_shm_cfgtbl.poll_intr    = POLLED_MODE;
75
   BSP_shm_cfgtbl.Intr.address = NO_INTERRUPT;
76
   BSP_shm_cfgtbl.Intr.value   = NO_INTERRUPT;
77
   BSP_shm_cfgtbl.Intr.length  = NO_INTERRUPT;
78
 
79
   *shmcfg = &BSP_shm_cfgtbl;
80
}

powered by: WebSVN 2.1.0

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