diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2004-11-10 23:51:17 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2004-11-10 23:51:17 +0000 |
commit | e79a194755c89fc9330ce74d6af450fa7c18c802 (patch) | |
tree | 8b4ba416f0d5996b89bb1a342e8b40b84d86b42e /c/src/lib/libbsp/powerpc/shared/tod/todcfg.c | |
parent | 2004-11-10 Richard Campbell <richard.campbell@oarcorp.com> (diff) | |
download | rtems-e79a194755c89fc9330ce74d6af450fa7c18c802.tar.bz2 |
2004-11-10 Richard Campbell <richard.campbell@oarcorp.com>
* Makefile.am, bootloader/misc.c, bootloader/pci.c, bootloader/pci.h,
console/console.c, console/inch.c, console/reboot.c, console/uart.c,
console/uart.h, irq/irq.c, irq/irq.h, irq/irq_init.c,
motorola/motorola.c, motorola/motorola.h, openpic/openpic.c,
openpic/openpic.h, pci/detect_raven_bridge.c, pci/pci.c,
start/start.S, startup/bspstart.c, vectors/vectors_init.c,
vme/vmeconfig.c: Add MVME2100 BSP and MPC8240 support. There was also
a significant amount of spelling and whitespace cleanup.
* tod/todcfg.c: New file.
Diffstat (limited to 'c/src/lib/libbsp/powerpc/shared/tod/todcfg.c')
-rw-r--r-- | c/src/lib/libbsp/powerpc/shared/tod/todcfg.c | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/powerpc/shared/tod/todcfg.c b/c/src/lib/libbsp/powerpc/shared/tod/todcfg.c new file mode 100644 index 0000000000..12d81a877c --- /dev/null +++ b/c/src/lib/libbsp/powerpc/shared/tod/todcfg.c @@ -0,0 +1,69 @@ +/* + * This file contains the RTC driver table for Motorola shared BSPs. + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.com/license/LICENSE. + * + * $Id$ + */ + +#include <bsp.h> +#include <libchip/rtc.h> +#include <libchip/m48t08.h> + +/* Forward function declaration */ +#if !defined(mvme2100) +unsigned32 mvmertc_get_register( unsigned32, unsigned8 ); +void mvmertc_set_register( unsigned32, unsigned8, unsigned32 ); +#endif + +/* The following table configures the RTC drivers used in this BSP */ +rtc_tbl RTC_Table[] = { + { + "/dev/rtc", /* sDeviceName */ + RTC_M48T08, /* deviceType -- actually M48T59 */ + &m48t08_fns, /* pDeviceFns */ + rtc_probe, /* deviceProbe */ + NULL, /* pDeviceParams */ +#if defined(mvme2100) + 0xFFE81ff8, /* ulCtrlPort1 */ + 0x00, /* ulDataPort */ + m48t08_get_register, /* getRegister */ + m48t08_set_register /* setRegister */ +#else + 0xFFE81ff8, /* ulCtrlPort1 */ + 0x00, /* ulDataPort */ + mvmertc_get_register, /* getRegister */ + mvmertc_set_register /* setRegister */ +#endif + } +}; + +/* Some information used by the RTC driver */ + +#define NUM_RTCS (sizeof(RTC_Table)/sizeof(rtc_tbl)) + +unsigned long RTC_Count = NUM_RTCS; + +rtems_device_minor_number RTC_Minor; + +#if !defined(mvme2100) +#include <rtems/bspIo.h> +void mvmertc_set_register( + unsigned32 base, + unsigned8 reg, + unsigned32 value +) +{ + printk( "RTC SUPPORT NOT IMPLEMENTED ON THIS BOARD\n"); +} + +unsigned32 mvmertc_get_register( + unsigned32 base, + unsigned8 reg +) +{ + printk( "RTC SUPPORT NOT IMPLEMENTED ON THIS BOARD\n"); +} +#endif |