blob: e1724e657df52049da84238bb69f089286318887 [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 *
Wolfgang Denk1a459662013-07-08 09:37:19 +020010 * SPDX-License-Identifier: GPL-2.0+
wdenk16f21702002-08-26 21:58:50 +000011 */
12
13#include <common.h>
14#include <mpc824x.h>
Ben Warren8ca0b3f2008-08-31 10:45:44 -070015#include <netdev.h>
wdenk16f21702002-08-26 21:58:50 +000016#include <asm/processor.h>
Peter Tyser561858e2008-11-03 09:30:59 -060017#include <timestamp.h>
wdenk16f21702002-08-26 21:58:50 +000018
19#include "mousse.h"
20#include "m48t59y.h"
21#include <pci.h>
22
23
24int checkboard (void)
25{
26 ulong busfreq = get_bus_freq (0);
27 char buf[32];
28
29 puts ("Board: MOUSSE MPC8240/KAHLUA - CHRP (MAP B)\n");
Peter Tyser561858e2008-11-03 09:30:59 -060030 printf ("Built: %s at %s\n", U_BOOT_DATE, U_BOOT_TIME);
wdenk16f21702002-08-26 21:58:50 +000031 printf ("MPLD: Revision %d\n", SYS_REVID_GET ());
32 printf ("Local Bus: %s MHz\n", strmhz (buf, busfreq));
33
34 return 0;
35}
36
37int checkflash (void)
38{
39 printf ("checkflash\n");
40 flash_init ();
41 return 0;
42}
43
Becky Bruce9973e3c2008-06-09 16:03:40 -050044phys_size_t initdram (int board_type)
wdenk16f21702002-08-26 21:58:50 +000045{
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020046 return CONFIG_SYS_RAM_SIZE;
wdenk16f21702002-08-26 21:58:50 +000047}
48
49
50void get_tod (void)
51{
52 int year, month, day, hour, minute, second;
53
54 m48_tod_get (&year, &month, &day, &hour, &minute, &second);
55
56 printf (" Current date/time: %d/%d/%d %d:%d:%d \n",
57 month, day, year, hour, minute, second);
58
59}
60
61/*
62 * EPIC, PCI, and I/O devices.
63 * Initialize Mousse Platform, probe for PCI devices,
64 * Query configuration parameters if not set.
65 */
66int misc_init_f (void)
67{
68 m48_tod_init (); /* Init SGS M48T59Y TOD/NVRAM */
69 printf ("RTC: M48T589 TOD/NVRAM (%d) bytes\n", TOD_NVRAM_SIZE);
70 get_tod ();
71 return 0;
72}
Ben Warren8ca0b3f2008-08-31 10:45:44 -070073
74int board_eth_init(bd_t *bis)
75{
76 return pci_eth_init(bis);
77}