mousse.c 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. #include <common.h>
  29. #include <mpc824x.h>
  30. #include <netdev.h>
  31. #include <asm/processor.h>
  32. #include "mousse.h"
  33. #include "m48t59y.h"
  34. #include <pci.h>
  35. int checkboard (void)
  36. {
  37. ulong busfreq = get_bus_freq (0);
  38. char buf[32];
  39. puts ("Board: MOUSSE MPC8240/KAHLUA - CHRP (MAP B)\n");
  40. printf ("Built: %s at %s\n", __DATE__, __TIME__);
  41. printf ("MPLD: Revision %d\n", SYS_REVID_GET ());
  42. printf ("Local Bus: %s MHz\n", strmhz (buf, busfreq));
  43. return 0;
  44. }
  45. int checkflash (void)
  46. {
  47. printf ("checkflash\n");
  48. flash_init ();
  49. return 0;
  50. }
  51. phys_size_t initdram (int board_type)
  52. {
  53. return CFG_RAM_SIZE;
  54. }
  55. void get_tod (void)
  56. {
  57. int year, month, day, hour, minute, second;
  58. m48_tod_get (&year, &month, &day, &hour, &minute, &second);
  59. printf (" Current date/time: %d/%d/%d %d:%d:%d \n",
  60. month, day, year, hour, minute, second);
  61. }
  62. /*
  63. * EPIC, PCI, and I/O devices.
  64. * Initialize Mousse Platform, probe for PCI devices,
  65. * Query configuration parameters if not set.
  66. */
  67. int misc_init_f (void)
  68. {
  69. m48_tod_init (); /* Init SGS M48T59Y TOD/NVRAM */
  70. printf ("RTC: M48T589 TOD/NVRAM (%d) bytes\n", TOD_NVRAM_SIZE);
  71. get_tod ();
  72. return 0;
  73. }
  74. int board_eth_init(bd_t *bis)
  75. {
  76. return pci_eth_init(bis);
  77. }