]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - board/mousse/mousse.c
board: powerpc: convert makefiles to Kbuild style
[karo-tx-uboot.git] / board / mousse / mousse.c
1 /*
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  * SPDX-License-Identifier:     GPL-2.0+
11  */
12
13 #include <common.h>
14 #include <mpc824x.h>
15 #include <netdev.h>
16 #include <asm/processor.h>
17 #include <timestamp.h>
18
19 #include "mousse.h"
20 #include "m48t59y.h"
21 #include <pci.h>
22
23
24 int 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");
30         printf ("Built: %s at %s\n", U_BOOT_DATE, U_BOOT_TIME);
31         printf ("MPLD:  Revision %d\n", SYS_REVID_GET ());
32         printf ("Local Bus:  %s MHz\n", strmhz (buf, busfreq));
33
34         return 0;
35 }
36
37 int checkflash (void)
38 {
39         printf ("checkflash\n");
40         flash_init ();
41         return 0;
42 }
43
44 phys_size_t initdram (int board_type)
45 {
46         return CONFIG_SYS_RAM_SIZE;
47 }
48
49
50 void 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  */
66 int 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 }
73
74 int board_eth_init(bd_t *bis)
75 {
76         return pci_eth_init(bis);
77 }