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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [hal/] [m68k/] [mcf52xx/] [mcf5272/] [proc/] [v2_0/] [src/] [proc_startup.c] - Blame information for rev 27

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

Line No. Rev Author Line
1 27 unneback
//==========================================================================
2
//####ECOSGPLCOPYRIGHTBEGIN####
3
// -------------------------------------------
4
// This file is part of eCos, the Embedded Configurable Operating System.
5
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
6
//
7
// eCos is free software; you can redistribute it and/or modify it under
8
// the terms of the GNU General Public License as published by the Free
9
// Software Foundation; either version 2 or (at your option) any later version.
10
//
11
// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
12
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14
// for more details.
15
//
16
// You should have received a copy of the GNU General Public License along
17
// with eCos; if not, write to the Free Software Foundation, Inc.,
18
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
19
//
20
// As a special exception, if other files instantiate templates or use macros
21
// or inline functions from this file, or you compile this file and link it
22
// with other works to produce a work based on this file, this file does not
23
// by itself cause the resulting work to be covered by the GNU General Public
24
// License. However the source code for this file must still be made available
25
// in accordance with section (3) of the GNU General Public License.
26
//
27
// This exception does not invalidate any other reasons why a work based on
28
// this file might be covered by the GNU General Public License.
29
//
30
// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
31
// at http://sources.redhat.com/ecos/ecos-license/
32
// -------------------------------------------
33
//####ECOSGPLCOPYRIGHTEND####
34
//==========================================================================
35
 
36
#include <cyg/infra/cyg_type.h>
37
#include <pkgconf/hal.h>
38
#include <cyg/hal/hal_startup.h>
39
#include <cyg/hal/hal_memmap.h>
40
#include <cyg/hal/hal_arch.h>
41
#include <cyg/hal/hal_intr.h>
42
 
43
/*****************************************************************************
44
proc_reset --  Processor-specific reset vector initialization routine
45
 
46
     This routine must be called with interrupts disabled.
47
 
48
INPUT:
49
 
50
OUTPUT:
51
 
52
RETURN VALUE:
53
 
54
     None
55
 
56
*****************************************************************************/
57
void proc_reset(void)
58
{
59
    int i;
60
 
61
    //   Set up the mapping of our internal registers.  The LSB indicates that
62
    // the registers are valid.
63
 
64
    mcf5272_wr_mbar((CYG_WORD32)(MCF5272_MBAR | 1));
65
 
66
    //   Initialize the vector base register in the interrupt controller.
67
 
68
    MCF5272_SIM->intc.ipvr = HAL_PROG_INT_VEC_BASE;
69
 
70
    //   Initialize the  interrupt  control  register  and  the  icr  priority
71
    // mirror.  Disable all interrupts by setting all priorities to zero.
72
 
73
    for (i=0; i < 4; i++)
74
    {
75
        MCF5272_SIM->intc.icr[i] = hal_icr_pri_mirror[i] = 0x88888888;
76
    }
77
 
78
    //   Enable/disable the data transfter acknowledge output pin.
79
 
80
    MCF5272_SIM->gpio.pbcnt = ((MCF5272_SIM->gpio.pbcnt &
81
                                ~(MCF5272_GPIO_PBCNT_TA_MSK)) |
82
                               ((HAL_MCF5272_ENABLE_DATA_TA) ?
83
                                (MCF5272_GPIO_PBCNT_TA_EN) :
84
                                (MCF5272_GPIO_PBCNT_TA_DE)));
85
 
86
    //   Do any platform-specific reset initialization.
87
 
88
    plf_reset();
89
}
90
 

powered by: WebSVN 2.1.0

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