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 | * |
| 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 Warren | 840f8a5 | 2008-08-31 10:45:44 -0700 | [diff] [blame] | 31 | #include <netdev.h> |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 32 | #include <asm/processor.h> |
Peter Tyser | 6294850 | 2008-11-03 09:30:59 -0600 | [diff] [blame] | 33 | #include <timestamp.h> |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 34 | |
| 35 | #include "mousse.h" |
| 36 | #include "m48t59y.h" |
| 37 | #include <pci.h> |
| 38 | |
| 39 | |
| 40 | int checkboard (void) |
| 41 | { |
| 42 | ulong busfreq = get_bus_freq (0); |
| 43 | char buf[32]; |
| 44 | |
| 45 | puts ("Board: MOUSSE MPC8240/KAHLUA - CHRP (MAP B)\n"); |
Peter Tyser | 6294850 | 2008-11-03 09:30:59 -0600 | [diff] [blame] | 46 | printf ("Built: %s at %s\n", U_BOOT_DATE, U_BOOT_TIME); |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 47 | printf ("MPLD: Revision %d\n", SYS_REVID_GET ()); |
| 48 | printf ("Local Bus: %s MHz\n", strmhz (buf, busfreq)); |
| 49 | |
| 50 | return 0; |
| 51 | } |
| 52 | |
| 53 | int checkflash (void) |
| 54 | { |
| 55 | printf ("checkflash\n"); |
| 56 | flash_init (); |
| 57 | return 0; |
| 58 | } |
| 59 | |
Becky Bruce | bd99ae7 | 2008-06-09 16:03:40 -0500 | [diff] [blame] | 60 | phys_size_t initdram (int board_type) |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 61 | { |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 62 | return CONFIG_SYS_RAM_SIZE; |
wdenk | 16f2170 | 2002-08-26 21:58:50 +0000 | [diff] [blame] | 63 | } |
| 64 | |
| 65 | |
| 66 | void get_tod (void) |
| 67 | { |
| 68 | int year, month, day, hour, minute, second; |
| 69 | |
| 70 | m48_tod_get (&year, &month, &day, &hour, &minute, &second); |
| 71 | |
| 72 | printf (" Current date/time: %d/%d/%d %d:%d:%d \n", |
| 73 | month, day, year, hour, minute, second); |
| 74 | |
| 75 | } |
| 76 | |
| 77 | /* |
| 78 | * EPIC, PCI, and I/O devices. |
| 79 | * Initialize Mousse Platform, probe for PCI devices, |
| 80 | * Query configuration parameters if not set. |
| 81 | */ |
| 82 | int misc_init_f (void) |
| 83 | { |
| 84 | m48_tod_init (); /* Init SGS M48T59Y TOD/NVRAM */ |
| 85 | printf ("RTC: M48T589 TOD/NVRAM (%d) bytes\n", TOD_NVRAM_SIZE); |
| 86 | get_tod (); |
| 87 | return 0; |
| 88 | } |
Ben Warren | 840f8a5 | 2008-08-31 10:45:44 -0700 | [diff] [blame] | 89 | |
| 90 | int board_eth_init(bd_t *bis) |
| 91 | { |
| 92 | return pci_eth_init(bis); |
| 93 | } |