]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - board/blackstamp/blackstamp.c
Merge branch 'master' of git://git.denx.de/u-boot-arm
[karo-tx-uboot.git] / board / blackstamp / blackstamp.c
1 /*
2  * U-boot - blackstamp.c BlackStamp board specific routines
3  * Most code stolen from boards/bf533-stamp/bf533-stamp.c
4  * Edited to the BlackStamp by Ben Matthews for UR LLE
5  *
6  * Copyright (c) 2005-2009 Analog Devices Inc.
7  *
8  * (C) Copyright 2000-2004
9  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
10  *
11  * Licensed under the GPL-2 or later.
12  */
13
14 #include <common.h>
15 #include <asm/io.h>
16
17 DECLARE_GLOBAL_DATA_PTR;
18
19 int checkboard(void)
20 {
21         printf("Board: BlackStamp\n");
22         printf("Support: http://blackfin.uclinux.org/gf/project/blackstamp/\n");
23         return 0;
24 }
25
26 phys_size_t initdram(int board_type)
27 {
28         gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
29         gd->bd->bi_memsize = CONFIG_SYS_MAX_RAM_SIZE;
30         return gd->bd->bi_memsize;
31 }
32
33 #ifdef SHARED_RESOURCES
34 void swap_to(int device_id)
35 {
36         bfin_write_FIO_DIR(bfin_read_FIO_DIR() | PF0);
37         SSYNC();
38         if (device_id == ETHERNET)
39                 bfin_write_FIO_FLAG_S(PF0);
40         else if (device_id == FLASH)
41                 bfin_write_FIO_FLAG_C(PF0);
42         else
43                 printf("Unknown device to switch\n");
44         SSYNC();
45 }
46 #endif