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

Subversion Repositories ao486

[/] [ao486/] [trunk/] [syn/] [components/] [sd_card/] [software/] [exe_bsp/] [alt_sys_init.c] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 alfik
/*
2
 * alt_sys_init.c - HAL initialization source
3
 *
4
 * Machine generated for CPU 'nios2_qsys_0' in SOPC Builder design 'soc'
5
 * SOPC Builder design path: ../../soc.sopcinfo
6
 *
7
 * Generated: Sun Aug 18 12:32:32 CEST 2013
8
 */
9
 
10
/*
11
 * DO NOT MODIFY THIS FILE
12
 *
13
 * Changing this file will have subtle consequences
14
 * which will almost certainly lead to a nonfunctioning
15
 * system. If you do modify this file, be aware that your
16
 * changes will be overwritten and lost when this file
17
 * is generated again.
18
 *
19
 * DO NOT MODIFY THIS FILE
20
 */
21
 
22
/*
23
 * License Agreement
24
 *
25
 * Copyright (c) 2008
26
 * Altera Corporation, San Jose, California, USA.
27
 * All rights reserved.
28
 *
29
 * Permission is hereby granted, free of charge, to any person obtaining a
30
 * copy of this software and associated documentation files (the "Software"),
31
 * to deal in the Software without restriction, including without limitation
32
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
33
 * and/or sell copies of the Software, and to permit persons to whom the
34
 * Software is furnished to do so, subject to the following conditions:
35
 *
36
 * The above copyright notice and this permission notice shall be included in
37
 * all copies or substantial portions of the Software.
38
 *
39
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
40
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
41
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
42
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
43
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
44
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
45
 * DEALINGS IN THE SOFTWARE.
46
 *
47
 * This agreement shall be governed in all respects by the laws of the State
48
 * of California and by the laws of the United States of America.
49
 */
50
 
51
#include "system.h"
52
#include "sys/alt_irq.h"
53
#include "sys/alt_sys_init.h"
54
 
55
#include <stddef.h>
56
 
57
/*
58
 * Device headers
59
 */
60
 
61
#include "altera_nios2_qsys_irq.h"
62
#include "altera_avalon_jtag_uart.h"
63
 
64
/*
65
 * Allocate the device storage
66
 */
67
 
68
ALTERA_NIOS2_QSYS_IRQ_INSTANCE ( NIOS2_QSYS_0, nios2_qsys_0);
69
ALTERA_AVALON_JTAG_UART_INSTANCE ( JTAG_UART_0, jtag_uart_0);
70
 
71
/*
72
 * Initialize the interrupt controller devices
73
 * and then enable interrupts in the CPU.
74
 * Called before alt_sys_init().
75
 * The "base" parameter is ignored and only
76
 * present for backwards-compatibility.
77
 */
78
 
79
void alt_irq_init ( const void* base )
80
{
81
    ALTERA_NIOS2_QSYS_IRQ_INIT ( NIOS2_QSYS_0, nios2_qsys_0);
82
    alt_irq_cpu_enable_interrupts();
83
}
84
 
85
/*
86
 * Initialize the non-interrupt controller devices.
87
 * Called after alt_irq_init().
88
 */
89
 
90
void alt_sys_init( void )
91
{
92
    ALTERA_AVALON_JTAG_UART_INIT ( JTAG_UART_0, jtag_uart_0);
93
}

powered by: WebSVN 2.1.0

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