blob: 6a12b576e0a14364d6f4865adc44ebc12a61ab93 [file] [log] [blame]
wdenk16f21702002-08-26 21:58:50 +00001/*
2 * MOUSSE Board Support
3 *
4 * (C) Copyright 2000
5 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
6 *
7 * (C) Copyright 2001
8 * James Dougherty, jfd@cs.stanford.edu
9 *
10 * See file CREDITS for list of people who contributed to this
11 * project.
12 *
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License as
15 * published by the Free Software Foundation; either version 2 of
16 * the License, or (at your option) any later version.
17 *
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
26 * MA 02111-1307 USA
27 */
28
29#include <common.h>
30#include <mpc824x.h>
Ben Warren840f8a52008-08-31 10:45:44 -070031#include <netdev.h>
wdenk16f21702002-08-26 21:58:50 +000032#include <asm/processor.h>
33
34#include "mousse.h"
35#include "m48t59y.h"
36#include <pci.h>
37
38
39int checkboard (void)
40{
41 ulong busfreq = get_bus_freq (0);
42 char buf[32];
43
44 puts ("Board: MOUSSE MPC8240/KAHLUA - CHRP (MAP B)\n");
45 printf ("Built: %s at %s\n", __DATE__, __TIME__);
46 printf ("MPLD: Revision %d\n", SYS_REVID_GET ());
47 printf ("Local Bus: %s MHz\n", strmhz (buf, busfreq));
48
49 return 0;
50}
51
52int checkflash (void)
53{
54 printf ("checkflash\n");
55 flash_init ();
56 return 0;
57}
58
Becky Brucebd99ae72008-06-09 16:03:40 -050059phys_size_t initdram (int board_type)
wdenk16f21702002-08-26 21:58:50 +000060{
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020061 return CONFIG_SYS_RAM_SIZE;
wdenk16f21702002-08-26 21:58:50 +000062}
63
64
65void get_tod (void)
66{
67 int year, month, day, hour, minute, second;
68
69 m48_tod_get (&year, &month, &day, &hour, &minute, &second);
70
71 printf (" Current date/time: %d/%d/%d %d:%d:%d \n",
72 month, day, year, hour, minute, second);
73
74}
75
76/*
77 * EPIC, PCI, and I/O devices.
78 * Initialize Mousse Platform, probe for PCI devices,
79 * Query configuration parameters if not set.
80 */
81int misc_init_f (void)
82{
83 m48_tod_init (); /* Init SGS M48T59Y TOD/NVRAM */
84 printf ("RTC: M48T589 TOD/NVRAM (%d) bytes\n", TOD_NVRAM_SIZE);
85 get_tod ();
86 return 0;
87}
Ben Warren840f8a52008-08-31 10:45:44 -070088
89int board_eth_init(bd_t *bis)
90{
91 return pci_eth_init(bis);
92}