Mike Frysinger | a57f684 | 2008-10-12 23:28:33 -0400 | [diff] [blame] | 1 | /* |
Bin Meng | 7557405 | 2016-02-05 19:30:11 -0800 | [diff] [blame] | 2 | * U-Boot - blackstamp.c BlackStamp board specific routines |
Mike Frysinger | a57f684 | 2008-10-12 23:28:33 -0400 | [diff] [blame] | 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 | ae25035 | 2010-06-02 06:19:19 -0400 | [diff] [blame] | 16 | #include <asm/gpio.h> |
Mike Frysinger | a57f684 | 2008-10-12 23:28:33 -0400 | [diff] [blame] | 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 | |
Mike Frysinger | a57f684 | 2008-10-12 23:28:33 -0400 | [diff] [blame] | 27 | #ifdef SHARED_RESOURCES |
| 28 | void swap_to(int device_id) |
| 29 | { |
Mike Frysinger | ae25035 | 2010-06-02 06:19:19 -0400 | [diff] [blame] | 30 | gpio_request(GPIO_PF0, "eth_flash_swap"); |
| 31 | gpio_direction_output(GPIO_PF0, device_id == ETHERNET); |
Mike Frysinger | a57f684 | 2008-10-12 23:28:33 -0400 | [diff] [blame] | 32 | SSYNC(); |
| 33 | } |
| 34 | #endif |
Ben Warren | 0fd6aae | 2009-10-04 22:37:03 -0700 | [diff] [blame] | 35 | |
| 36 | #ifdef CONFIG_SMC91111 |
| 37 | int board_eth_init(bd_t *bis) |
| 38 | { |
| 39 | return smc91111_initialize(0, CONFIG_SMC91111_BASE); |
| 40 | } |
| 41 | #endif |