blob: ee1e99c1172688cacef807360e5a8c8e5e0629ab [file] [log] [blame]
Nobuhiro Iwamatsu6c0bbdc2007-09-23 02:31:13 +09001/*
Nobuhiro Iwamatsu0955ef32008-06-17 16:27:38 +09002 * Copyright (C) 2007,2008
Nobuhiro Iwamatsu6c0bbdc2007-09-23 02:31:13 +09003 * Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
4 *
5 * Copyright (C) 2007
6 * Kenati Technologies, Inc.
Wolfgang Denk61fb15c52007-12-27 01:52:50 +01007 *
Nobuhiro Iwamatsu6c0bbdc2007-09-23 02:31:13 +09008 * board/ms7722se/ms7722se.c
9 *
Wolfgang Denk1a459662013-07-08 09:37:19 +020010 * SPDX-License-Identifier: GPL-2.0+
Nobuhiro Iwamatsu6c0bbdc2007-09-23 02:31:13 +090011 */
12
13#include <common.h>
Ben Warren7194ab82009-10-04 22:37:03 -070014#include <netdev.h>
Nobuhiro Iwamatsu6c0bbdc2007-09-23 02:31:13 +090015#include <asm/io.h>
16#include <asm/processor.h>
17
John Rigby29565322010-12-20 18:27:51 -070018DECLARE_GLOBAL_DATA_PTR;
19
Nobuhiro Iwamatsu6c0bbdc2007-09-23 02:31:13 +090020#define LED_BASE 0xB0800000
21
22int checkboard(void)
23{
24 puts("BOARD: Hitachi UL MS7722SE\n");
25 return 0;
26}
27
28int board_init(void)
29{
30 /* Setup PTXMD[1:0] for /CS6A */
31 outw(inw(PXCR) & ~0xf000, PXCR);
32
33 return 0;
34}
35
Nobuhiro Iwamatsu0955ef32008-06-17 16:27:38 +090036int dram_init(void)
Nobuhiro Iwamatsu6c0bbdc2007-09-23 02:31:13 +090037{
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020038 gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
39 gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
40 printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
Nobuhiro Iwamatsu6c0bbdc2007-09-23 02:31:13 +090041 return 0;
42}
43
Nobuhiro Iwamatsu0955ef32008-06-17 16:27:38 +090044void led_set_state(unsigned short value)
Nobuhiro Iwamatsu6c0bbdc2007-09-23 02:31:13 +090045{
Nobuhiro Iwamatsu0955ef32008-06-17 16:27:38 +090046 writew(value & 0xFF, LED_BASE);
Nobuhiro Iwamatsu6c0bbdc2007-09-23 02:31:13 +090047}
Ben Warren7194ab82009-10-04 22:37:03 -070048
49#ifdef CONFIG_CMD_NET
50int board_eth_init(bd_t *bis)
51{
52 int rc = 0;
53#ifdef CONFIG_SMC91111
54 rc = smc91111_initialize(0, CONFIG_SMC91111_BASE);
55#endif
56 return rc;
57}
58#endif