GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / cfe / cfe / arch / mips / board / bcm97115 / src / bcm97115_devs.c
blob51ad634d6134b5e132c16d7dbc18592a0731c82c
1 /* *********************************************************************
2 * Broadcom Common Firmware Environment (CFE)
4 * Board device initialization File: bcm97115_devs.c
6 * This is the "C" part of the board support package. The
7 * routines to create and initialize the console, wire up
8 * device drivers, and do other customization live here.
10 * Author: Matt Carlson (mcarlson@broadcom.com)
12 *********************************************************************
14 * XX Copyright 2000,2001
15 * Broadcom Corporation. All rights reserved.
17 * BROADCOM PROPRIETARY AND CONFIDENTIAL
19 * This software is furnished under license and may be used and
20 * copied only in accordance with the license.
21 ********************************************************************* */
23 #include "lib_types.h"
24 #include "cfe_iocb.h"
25 #include "cfe_device.h"
26 #include "cfe.h"
28 #include "bcm97115.h"
31 /* *********************************************************************
32 * Devices we're importing
33 ********************************************************************* */
35 extern cfe_driver_t bcm97115_uart;
36 extern cfe_driver_t bcm4413drv;
38 /* *********************************************************************
39 * Some board-specific parameters
40 ********************************************************************* */
43 /* *********************************************************************
44 * board_console_init()
46 * Add the console device and set it to be the primary
47 * console.
49 * Input parameters:
50 * nothing
52 * Return value:
53 * nothing
54 ********************************************************************* */
56 void board_console_init(void)
58 /* Add the serial port driver. */
59 cfe_add_device( &bcm97115_uart, UARTA_BASE, 0, 0 );
61 cfe_set_console( "uart0" );
65 /* *********************************************************************
66 * board_device_init()
68 * Initialize and add other devices. Add everything you need
69 * for bootstrap here, like disk drives, flash memory, UARTs,
70 * network controllers, etc.
72 * Input parameters:
73 * nothing
75 * Return value:
76 * nothing
77 ********************************************************************* */
79 void board_device_init(void)
81 /* Modify some gpios so HD is released from reset. */
82 *((volatile unsigned char *)0xfffe0057) &= 0xfd;
83 *((volatile unsigned char *)0xfffe0053) |= 0x02;
85 *((volatile unsigned short *)0xfffe0900) = 0x07FF;
87 /* Set TM_TOP mux for LED */
88 *(volatile unsigned char *)(0xfffe8008) = 0x00;
89 *(volatile unsigned char *)(0xfffe009d) = 0x00;
90 *(volatile unsigned char *)(0xfffe0092) = 0x00;
91 *(volatile unsigned char *)(0xfffe0093) = 0x55;
92 *(volatile unsigned char *)(0xfffe0094) = 0x01;
93 *(volatile unsigned char *)(0xfffe0095) = 0xaa;
94 *(volatile unsigned char *)(0xfffe009a) = 0x80;
96 /* Add the ethernet driver. */
97 cfe_add_device( &bcm4413drv, 0, 0, 0 );
102 /* *********************************************************************
103 * board_device_reset()
105 * Reset devices. This call is done when the firmware is restarted,
106 * as might happen when an operating system exits, just before the
107 * "reset" command is applied to the installed devices. You can
108 * do whatever board-specific things are here to keep the system
109 * stable, like stopping DMA sources, interrupts, etc.
111 * Input parameters:
112 * nothing
114 * Return value:
115 * nothing
116 ********************************************************************* */
118 void board_device_reset(void)
123 /* *********************************************************************
124 * board_final_init()
126 * Do any final initialization, such as adding commands to the
127 * user interface.
129 * If you don't want a user interface, put the startup code here.
130 * This routine is called just before CFE starts its user interface.
132 * Input parameters:
133 * nothing
135 * Return value:
136 * nothing
137 ********************************************************************* */
139 void board_final_init(void)