]>
git.ipfire.org Git - people/ms/u-boot.git/blob - board/logodl/logodl.c
2 * (C) 2002 Kyle Harris <kharris@nexus-tech.net>, Nexus Technologies, Inc.
3 * (C) 2002 Marius Groeger <mgroeger@sysgo.de>, Sysgo GmbH
4 * (C) 2003 Robert Schwebel <r.schwebel@pengutronix.de>, Pengutronix
6 * See file CREDITS for list of people who contributed to this
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of
12 * the License, or (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
26 #include <asm/arch/pxa-regs.h>
28 DECLARE_GLOBAL_DATA_PTR
;
31 * board_init: - setup some data structures
33 * @return: 0 in case of success
38 /* memory and cpu-speed are setup before relocation */
39 /* so we do _nothing_ here */
41 gd
->bd
->bi_arch_number
= MACH_TYPE_LOGODL
;
42 gd
->bd
->bi_boot_params
= 0x08000100;
43 gd
->bd
->bi_baudrate
= CONFIG_BAUDRATE
;
45 (*((volatile short*)0x14800000)) = 0xff; /* power on eth0 */
46 (*((volatile short*)0x14000000)) = 0xff; /* power on uart */
53 * dram_init: - setup dynamic RAM
55 * @return: 0 in case of success
60 gd
->bd
->bi_dram
[0].start
= PHYS_SDRAM_1
;
61 gd
->bd
->bi_dram
[0].size
= PHYS_SDRAM_1_SIZE
;
68 * logodl_set_led: - switch LEDs on or off
70 * @param led: LED to switch (0,1)
71 * @param state: switch on (1) or off (0)
74 void logodl_set_led(int led
, int state
)
80 CONFIG_SYS_LED_A_CR
= CONFIG_SYS_LED_A_BIT
;
81 } else if (state
==0) {
82 CONFIG_SYS_LED_A_SR
= CONFIG_SYS_LED_A_BIT
;
88 CONFIG_SYS_LED_B_CR
= CONFIG_SYS_LED_B_BIT
;
89 } else if (state
==0) {
90 CONFIG_SYS_LED_B_SR
= CONFIG_SYS_LED_B_BIT
;
100 * show_boot_progress: - indicate state of the boot process
102 * @param status: Status number - see README for details.
104 * The LOGOTRONIC does only have 2 LEDs, so we switch them on at the most
105 * important states (1, 5, 15).
108 void show_boot_progress (int status
)
110 if (status
< -32) status
= -1; /* let things compatible */
113 case 1: logodl_set_led(0,1); break;
114 case 5: logodl_set_led(1,1); break;
115 case 15: logodl_set_led(2,1); break;
118 logodl_set_led(0, (status
& 1)==1);
119 logodl_set_led(1, (status
& 2)==2);