Mike Frysinger | a57f684 | 2008-10-12 23:28:33 -0400 | [diff] [blame] | 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> |
Ben Warren | 0fd6aae | 2009-10-04 22:37:03 -0700 | [diff] [blame^] | 15 | #include <netdev.h> |
Mike Frysinger | a57f684 | 2008-10-12 23:28:33 -0400 | [diff] [blame] | 16 | #include <asm/io.h> |
| 17 | |
| 18 | DECLARE_GLOBAL_DATA_PTR; |
| 19 | |
| 20 | int checkboard(void) |
| 21 | { |
| 22 | printf("Board: BlackStamp\n"); |
| 23 | printf("Support: http://blackfin.uclinux.org/gf/project/blackstamp/\n"); |
| 24 | return 0; |
| 25 | } |
| 26 | |
| 27 | phys_size_t initdram(int board_type) |
| 28 | { |
| 29 | gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE; |
| 30 | gd->bd->bi_memsize = CONFIG_SYS_MAX_RAM_SIZE; |
| 31 | return gd->bd->bi_memsize; |
| 32 | } |
| 33 | |
| 34 | #ifdef SHARED_RESOURCES |
| 35 | void swap_to(int device_id) |
| 36 | { |
| 37 | bfin_write_FIO_DIR(bfin_read_FIO_DIR() | PF0); |
| 38 | SSYNC(); |
| 39 | if (device_id == ETHERNET) |
| 40 | bfin_write_FIO_FLAG_S(PF0); |
| 41 | else if (device_id == FLASH) |
| 42 | bfin_write_FIO_FLAG_C(PF0); |
| 43 | else |
| 44 | printf("Unknown device to switch\n"); |
| 45 | SSYNC(); |
| 46 | } |
| 47 | #endif |
Ben Warren | 0fd6aae | 2009-10-04 22:37:03 -0700 | [diff] [blame^] | 48 | |
| 49 | #ifdef CONFIG_SMC91111 |
| 50 | int board_eth_init(bd_t *bis) |
| 51 | { |
| 52 | return smc91111_initialize(0, CONFIG_SMC91111_BASE); |
| 53 | } |
| 54 | #endif |