Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:23:58

0001 /*
0002  * This file contains the RTC driver table for Motorola shared BSPs.
0003  *
0004  * The license and distribution terms for this file may be
0005  * found in the file LICENSE in this distribution or at
0006  * http://www.rtems.org/license/LICENSE.
0007  */
0008 
0009 #include <bsp.h>
0010 #include <libchip/rtc.h>
0011 #include <libchip/m48t08.h>
0012 
0013 /* Forward function declaration */
0014 #if !defined(mot_ppc_mvme2100)
0015 uint32_t mvmertc_get_register( uintptr_t, uint8_t );
0016 void mvmertc_set_register( uintptr_t, uint8_t, uint32_t );
0017 #endif
0018 
0019 /* The following table configures the RTC drivers used in this BSP */
0020 rtc_tbl RTC_Table[] = {
0021     {
0022         "/dev/rtc",                /* sDeviceName */
0023         RTC_M48T08,                /* deviceType  -- actually M48T59 */
0024         &m48t08_fns,               /* pDeviceFns */
0025         rtc_probe,                 /* deviceProbe */
0026         NULL,                      /* pDeviceParams */
0027 #if defined(mot_ppc_mvme2100)
0028         0xFFE81ff8,                /* ulCtrlPort1 */
0029         0x00,                      /* ulDataPort */
0030         m48t08_get_register,       /* getRegister */
0031         m48t08_set_register        /* setRegister */
0032 #else
0033         0xFFE81ff8,                /* ulCtrlPort1 */
0034         0x00,                      /* ulDataPort */
0035         mvmertc_get_register,      /* getRegister */
0036         mvmertc_set_register       /* setRegister */
0037 #endif
0038     }
0039 };
0040 
0041 /* Some information used by the RTC driver */
0042 
0043 #define NUM_RTCS (sizeof(RTC_Table)/sizeof(rtc_tbl))
0044 
0045 size_t RTC_Count = NUM_RTCS;
0046 
0047 #if !defined(mot_ppc_mvme2100)
0048 #include <rtems/bspIo.h>
0049 void mvmertc_set_register(
0050   uintptr_t base,
0051   uint8_t   reg,
0052   uint32_t  value
0053 )
0054 {
0055   printk( "RTC SUPPORT NOT IMPLEMENTED ON THIS BOARD\n");
0056 }
0057 
0058 uint32_t mvmertc_get_register(
0059   uintptr_t base,
0060   uint8_t   reg
0061 )
0062 {
0063   printk( "RTC SUPPORT NOT IMPLEMENTED ON THIS BOARD\n");
0064   return 0;
0065 }
0066 #endif