wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 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 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 10 | * SPDX-License-Identifier: GPL-2.0+ |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 11 | */ |
| 12 | |
| 13 | #include <common.h> |
| 14 | #include <mpc824x.h> |
Ben Warren | 840f8a5 | 2008-08-31 10:45:44 -0700 | [diff] [blame] | 15 | #include <netdev.h> |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 16 | #include <asm/processor.h> |
Peter Tyser | 6294850 | 2008-11-03 09:30:59 -0600 | [diff] [blame] | 17 | #include <timestamp.h> |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 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"); |
Peter Tyser | 6294850 | 2008-11-03 09:30:59 -0600 | [diff] [blame] | 30 | printf ("Built: %s at %s\n", U_BOOT_DATE, U_BOOT_TIME); |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 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 | |
Becky Bruce | bd99ae7 | 2008-06-09 16:03:40 -0500 | [diff] [blame] | 44 | phys_size_t initdram (int board_type) |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 45 | { |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 46 | return CONFIG_SYS_RAM_SIZE; |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 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 | } |
Ben Warren | 840f8a5 | 2008-08-31 10:45:44 -0700 | [diff] [blame] | 73 | |
| 74 | int board_eth_init(bd_t *bis) |
| 75 | { |
| 76 | return pci_eth_init(bis); |
| 77 | } |