Changeset 03f655c in rtems


Ignore:
Timestamp:
04/28/05 17:25:59 (19 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
17228d13
Parents:
ce7d49bc
Message:

2005-04-28 Joel Sherrill <joel@…>

  • bsp_howto/rtc.t: Rewritten to account for removal of dmv177.
Location:
doc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • doc/ChangeLog

    rce7d49bc r03f655c  
     12005-04-28      Joel Sherrill <joel@OARcorp.com>
     2
     3        * bsp_howto/rtc.t: Rewritten to account for removal of dmv177.
     4
    152005-03-04      Joel Sherrill <joel@OARcorp.com>
    26
  • doc/bsp_howto/rtc.t

    rce7d49bc r03f655c  
    3434RTC chip.
    3535
    36 The DY-4 DMV177 BSP uses the shared libchip implementation of the RTC
    37 driver.  Its @code{RTC_Table} configuration table can be found in
    38 @code{c/src/lib/libbsp/powerpc/dmv177/tod/config.c}.
     36The DY-4 DMV177 BSP used the shared libchip implementation of the RTC
     37driver.  There were no DMV177 specific configuration routines.  A BSP
     38could use configuration routines to dynamically determine what type
     39of real-time clock is on a particular board.  This would be useful for
     40a BSP supporting multiple board models.  The relevant ports of
     41the DMV177's @code{RTC_Table} configuration table is below:
     42
     43@example
     44
     45#include <bsp.h>
     46#include <libchip/rtc.h>
     47#include <libchip/icm7170.h>
     48
     49boolean dmv177_icm7170_probe(int minor);
     50
     51rtc_tbl RTC_Table[] = {
     52  { "/dev/rtc0",                /* sDeviceName */
     53    RTC_ICM7170,                /* deviceType */
     54    &icm7170_fns,               /* pDeviceFns */
     55    dmv177_icm7170_probe,       /* deviceProbe */
     56    (void *) ICM7170_AT_1_MHZ,  /* pDeviceParams */
     57    DMV170_RTC_ADDRESS,         /* ulCtrlPort1 */
     58    0,                          /* ulDataPort */
     59    icm7170_get_register_8,     /* getRegister */
     60    icm7170_set_register_8,     /* setRegister */
     61  }
     62};
     63
     64unsigned long  RTC_Count = (sizeof(RTC_Table)/sizeof(rtc_tbl));
     65rtems_device_minor_number  RTC_Minor;
     66
     67boolean dmv177_icm7170_probe(int minor)
     68{
     69  volatile unsigned16 *card_resource_reg;
     70
     71  card_resource_reg = (volatile unsigned16 *) DMV170_CARD_RESORCE_REG;
     72
     73  if ( (*card_resource_reg & DMV170_RTC_INST_MASK) == DMV170_RTC_INSTALLED )
     74    return TRUE;
     75  return FALSE;
     76}
     77
     78@end example
    3979
    4080@section Initialization
Note: See TracChangeset for help on using the changeset viewer.