Changeset d1347a37 in rtems


Ignore:
Timestamp:
10/12/14 15:06:05 (9 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, 5, master
Children:
7bddaa3c
Parents:
8a442b5
git-author:
Joel Sherrill <joel.sherrill@…> (10/12/14 15:06:05)
git-committer:
Joel Sherrill <joel.sherrill@…> (10/13/14 15:33:26)
Message:

idp/clock/ckinit.c: Fix warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/m68k/idp/clock/ckinit.c

    r8a442b5 rd1347a37  
    1 /*  Clock_init()
    2  *
    3  *
     1/*
    42 *  This is modified by Doug McBride to get it to work for the MC68EC040
    53 *  IDP board.  The below comments are kept to show that some prior work
     
    97 *  This routine initializes the mc68230 on the MC68EC040 board.
    108 *  The tick frequency is 40 milliseconds.
    11  *
    12  *  Input parameters:  NONE
    13  *
    14  *  Output parameters:  NONE
    15  *
     9 */
     10
     11/*
    1612 *  COPYRIGHT (c) 1989-1999.
    1713 *  On-Line Applications Research Corporation (OAR).
     
    3935
    4036/*
    41  * These are set by clock driver during its init
    42  */
    43 
    44 rtems_device_major_number rtems_clock_major = ~0;
    45 rtems_device_minor_number rtems_clock_minor;
    46 
    47 /*
    4837 *  ISR Handler
    4938 *
     
    5241 * MC68230, 2^5 is the prescaler factor, and 1ms is the common interrupt
    5342 * interval for the Clock_isr routine.
     43 *
    5444 * Therefore, 203 (decimal) is the number to program into the CPRH-L registers
    5545 * of the MC68230 for countdown.  However, I have found that 193 instead of
     
    5747 * than that
    5848 */
    59 
    60 rtems_isr Clock_isr(
     49static rtems_isr Clock_isr(
    6150  rtems_vector_number vector
    6251)
     
    6453  Clock_driver_ticks += 1;
    6554  /* acknowledge interrupt
    66         MC68230_TSR = 1; */
     55  MC68230_TSR = 1; */
    6756  MC68230_WRITE (MC68230_TSR, 1);
    6857
    6958  if ( Clock_isrs == 1 ) {
    7059    rtems_clock_tick();
    71         /* Cast to an integer so that 68EC040 IDP which doesn't have an FPU doesn't
    72            have a heart attack -- if you use newlib1.6 or greater and get
    73            libgcc.a for gcc with software floating point support, this is not
    74            a problem */
     60    /* Cast to an integer so that 68EC040 IDP which doesn't have an FPU doesn't
     61       have a heart attack -- if you use newlib1.6 or greater and get
     62       libgcc.a for gcc with software floating point support, this is not
     63       a problem */
    7564    Clock_isrs =
    7665      (int)(rtems_configuration_get_microseconds_per_tick() / 1000);
     
    8271void Disable_clock(void)
    8372{
    84         /* Disable timer */
    85         MC68230_WRITE (MC68230_TCR, 0x00);
     73    /* Disable timer */
     74    MC68230_WRITE (MC68230_TCR, 0x00);
    8675}
    8776
    88 void Install_clock(
     77static void Install_clock(
    8978  rtems_isr_entry clock_isr )
    9079{
     
    10594
    10695  /* Set CPRH through CPRL to 193 (not 203) decimal for countdown--see ckisr.c
    107         CPRH = 0x00;
    108         CPRM = 0x00;
    109         CPRL = 0xC1; */
     96      CPRH = 0x00;
     97      CPRM = 0x00;
     98      CPRL = 0xC1; */
    11099  MC68230_WRITE (MC68230_CPRH, 0x00);
    111100  MC68230_WRITE (MC68230_CPRM, 0x00);
     
    113102
    114103  /* Enable timer and use it as an external periodic interrupt generator
    115         MC68230_TCR = 0xA1; */
     104     MC68230_TCR = 0xA1; */
    116105/*    led_putnum('a'); * for debugging purposes */
    117106  MC68230_WRITE (MC68230_TCR, 0xA1);
     
    129118
    130119  /* disable timer
    131         data = TCR;
    132         TCR = (data & 0xFE); */
     120     data = TCR;
     121     TCR = (data & 0xFE); */
    133122  MC68230_READ (MC68230_TCR, data);
    134123  MC68230_WRITE (MC68230_TCR, (data & 0xFE));
     
    145134  Install_clock( Clock_isr );
    146135
    147   /*
    148    * make major/minor avail to others such as shared memory driver
    149    */
    150 
    151   rtems_clock_major = major;
    152   rtems_clock_minor = minor;
    153 
    154136  return RTEMS_SUCCESSFUL;
    155137}
Note: See TracChangeset for help on using the changeset viewer.