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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [hal/] [arm/] [edb7xxx/] [v2_0/] [include/] [plf_io.h] - Blame information for rev 773

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

Line No. Rev Author Line
1 27 unneback
#ifndef CYGONCE_HAL_ARM_EDB7XXX_PLF_IO_H
2
#define CYGONCE_HAL_ARM_EDB7XXX_PLF_IO_H
3
 
4
/*=============================================================================
5
//
6
//      plf_io.h
7
//
8
//      Platform specific support (register layout, etc)
9
//
10
//=============================================================================
11
//####ECOSGPLCOPYRIGHTBEGIN####
12
// -------------------------------------------
13
// This file is part of eCos, the Embedded Configurable Operating System.
14
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
15
// Copyright (C) 2003 Gary Thomas <gary@mind.be>
16
//
17
// eCos is free software; you can redistribute it and/or modify it under
18
// the terms of the GNU General Public License as published by the Free
19
// Software Foundation; either version 2 or (at your option) any later version.
20
//
21
// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
22
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
23
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
24
// for more details.
25
//
26
// You should have received a copy of the GNU General Public License along
27
// with eCos; if not, write to the Free Software Foundation, Inc.,
28
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
29
//
30
// As a special exception, if other files instantiate templates or use macros
31
// or inline functions from this file, or you compile this file and link it
32
// with other works to produce a work based on this file, this file does not
33
// by itself cause the resulting work to be covered by the GNU General Public
34
// License. However the source code for this file must still be made available
35
// in accordance with section (3) of the GNU General Public License.
36
//
37
// This exception does not invalidate any other reasons why a work based on
38
// this file might be covered by the GNU General Public License.
39
//
40
// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
41
// at http://sources.redhat.com/ecos/ecos-license/
42
// -------------------------------------------
43
//####ECOSGPLCOPYRIGHTEND####
44
//=============================================================================
45
//#####DESCRIPTIONBEGIN####
46
//
47
// Author(s):    jskov
48
// Contributors: jskov, gthomas
49
// Date:         2002-01-28
50
// Purpose:      Platform specific support routines
51
// Description:
52
// Usage:        #include <cyg/hal/hal_io.h>
53
//
54
//####DESCRIPTIONEND####
55
//
56
//===========================================================================*/
57
 
58
#include <pkgconf/hal.h>
59
#include <pkgconf/system.h>
60
#include CYGBLD_HAL_PLATFORM_H
61
#include <cyg/hal/hal_edb7xxx.h>
62
 
63
extern unsigned long _edb7xxx_physical_address(unsigned long addr);
64
#define CYGARC_PHYSICAL_ADDRESS(x) _edb7xxx_physical_address((unsigned long) x)
65
 
66
#if defined(CYGPKG_REDBOOT_ARM_LINUX_EXEC) && defined(CYGHWR_HAL_ARM_EDB7XXX_VARIANT_EP7312)
67
#define _CYGHWR_LAYOUT_ONLY
68
#include <cyg/hal/hal_platform_setup.h>
69
// Describe memory layout for Linux
70
#define CYGHWR_REDBOOT_LINUX_ATAG_MEM(_p_)                                                      \
71
    CYG_MACRO_START                                                                             \
72
    /* Next ATAG_MEM. */                                                                        \
73
    _p_->hdr.size = (sizeof(struct tag_mem32) + sizeof(struct tag_header))/sizeof(long);        \
74
    _p_->hdr.tag = ATAG_MEM;                                                                    \
75
    /* Round up so there's only one bit set in the memory size.                                 \
76
     * Don't double it if it's already a power of two, though.                                  \
77
     */                                                                                         \
78
    _p_->u.mem.size  = 1<<hal_msbindex(CYGMEM_REGION_ram_SIZE);                                 \
79
    if (_p_->u.mem.size < CYGMEM_REGION_ram_SIZE)                                               \
80
            _p_->u.mem.size <<= 1;                                                              \
81
    _p_->u.mem.start = DRAM_PA_START;                                                           \
82
    CYG_MACRO_END
83
#endif
84
 
85
#endif // CYGONCE_HAL_ARM_EDB7XXX_PLF_IO_H
86
// EOF plf_io.h

powered by: WebSVN 2.1.0

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