Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Nobuhiro Iwamatsu | 6c0bbdc | 2007-09-23 02:31:13 +0900 | [diff] [blame] | 2 | /* |
Nobuhiro Iwamatsu | 0955ef3 | 2008-06-17 16:27:38 +0900 | [diff] [blame] | 3 | * Copyright (C) 2007,2008 |
Nobuhiro Iwamatsu | 6c0bbdc | 2007-09-23 02:31:13 +0900 | [diff] [blame] | 4 | * Nobuhiro Iwamatsu <iwamatsu@nigauri.org> |
| 5 | * |
| 6 | * Copyright (C) 2007 |
| 7 | * Kenati Technologies, Inc. |
Wolfgang Denk | 61fb15c5 | 2007-12-27 01:52:50 +0100 | [diff] [blame] | 8 | * |
Nobuhiro Iwamatsu | 6c0bbdc | 2007-09-23 02:31:13 +0900 | [diff] [blame] | 9 | * board/ms7722se/ms7722se.c |
Nobuhiro Iwamatsu | 6c0bbdc | 2007-09-23 02:31:13 +0900 | [diff] [blame] | 10 | */ |
| 11 | |
| 12 | #include <common.h> |
Ben Warren | 7194ab8 | 2009-10-04 22:37:03 -0700 | [diff] [blame] | 13 | #include <netdev.h> |
Nobuhiro Iwamatsu | 6c0bbdc | 2007-09-23 02:31:13 +0900 | [diff] [blame] | 14 | #include <asm/io.h> |
| 15 | #include <asm/processor.h> |
| 16 | |
| 17 | #define LED_BASE 0xB0800000 |
| 18 | |
| 19 | int checkboard(void) |
| 20 | { |
| 21 | puts("BOARD: Hitachi UL MS7722SE\n"); |
| 22 | return 0; |
| 23 | } |
| 24 | |
| 25 | int board_init(void) |
| 26 | { |
| 27 | /* Setup PTXMD[1:0] for /CS6A */ |
| 28 | outw(inw(PXCR) & ~0xf000, PXCR); |
| 29 | |
| 30 | return 0; |
| 31 | } |
| 32 | |
Nobuhiro Iwamatsu | 0955ef3 | 2008-06-17 16:27:38 +0900 | [diff] [blame] | 33 | void led_set_state(unsigned short value) |
Nobuhiro Iwamatsu | 6c0bbdc | 2007-09-23 02:31:13 +0900 | [diff] [blame] | 34 | { |
Nobuhiro Iwamatsu | 0955ef3 | 2008-06-17 16:27:38 +0900 | [diff] [blame] | 35 | writew(value & 0xFF, LED_BASE); |
Nobuhiro Iwamatsu | 6c0bbdc | 2007-09-23 02:31:13 +0900 | [diff] [blame] | 36 | } |
Ben Warren | 7194ab8 | 2009-10-04 22:37:03 -0700 | [diff] [blame] | 37 | |
| 38 | #ifdef CONFIG_CMD_NET |
| 39 | int board_eth_init(bd_t *bis) |
| 40 | { |
| 41 | int rc = 0; |
| 42 | #ifdef CONFIG_SMC91111 |
| 43 | rc = smc91111_initialize(0, CONFIG_SMC91111_BASE); |
| 44 | #endif |
| 45 | return rc; |
| 46 | } |
| 47 | #endif |