LOGIN   :::   RECOVER PASS   :::   GET ACCOUNT    
Browse
  • Projects
  • Code (CVS)
  • Forums
  • News
  • Articles
  • Polls
  •  
    OpenCores
  • FAQ
  • CVS HowTo
  • Mission
  • Media
  • Tools
  • Advertise
  • Mirrors
  • Logos
  • Contact us
  • Find Resources
  • Job Opportunity
  •  
    Tools
  • Search
      
  • Download Cores (CVSGet)
  •  
    More
  • Wishbone
  • Perlilog
  • EDA tools
  • OpenTech CD
  •  
    Navigation: All forums > Openrisc > Message List > Message Post

    Message

    Reply | Reply all
    Date Prev | Date Next | Thread Prev | Thread Next Date Index | Thread Index

    From: =?unknown-8bit?Q?Gy=F6rgy?= 'nog' Jeney<nog@s...>
    Date: Thu Mar 24 21:09:19 CET 2005
    Subject: [openrisc] [or1ksim #43] Correct prototypes of the tick timer
    Top
    Hi,

    Makes the functions in tick.c use uorreg_t where they should instead of long.

    ChangeLog:
    * Use the uorreg_t where it should be used.

    nog.
    -------------- next part --------------
    diff -urp --unidirectional-new-file /home/nog/or1ksim-split/tick/tick.c ./tick/tick.c
    --- /home/nog/or1ksim-split/tick/tick.c 2005-03-22 17:53:14.000000000 +0100
    +++ ./tick/tick.c 2005-03-16 17:24:23.000000000 +0100
    @@ -93,7 +95,7 @@ void tick_job (void *param)
    }

    /* Starts the tick timer. This function is called by a write to ttcr spr register */
    -void spr_write_ttcr (unsigned long value)
    +void spr_write_ttcr (uorreg_t value)
    {
    unsigned mode = (ttmr & SPR_TTMR_M) >> 30;
    TRACE("set ttcr = %"PRIxREG"\n", value);
    @@ -109,7 +111,7 @@ void spr_write_ttcr (unsigned long value
    }
    }

    -void spr_write_ttmr (unsigned long value)
    +void spr_write_ttmr (uorreg_t value)
    {
    TRACE("set ttmr = %"PRIxREG"\n", value);
    ttmr = value;
    @@ -139,7 +141,7 @@ void spr_write_ttmr (unsigned long value
    }
    }

    -unsigned long spr_read_ttcr ()
    +uorreg_t spr_read_ttcr (void)
    {
    TRACE("read ttcr %lli\n", runtime.sim.cycles - cycles_start);
    return runtime.sim.cycles - cycles_start;
    diff -urp --unidirectional-new-file /home/nog/or1ksim-split/tick/tick.h ./tick/tick.h
    --- /home/nog/or1ksim-split/tick/tick.h 2002-03-07 11:39:43.000000000 +0100
    +++ ./tick/tick.h 2005-03-15 19:17:03.000000000 +0100
    @@ -24,7 +24,7 @@ void tick_reset();
    inline void tick_clock();

    /* Starts the tick timer. This function is called by a write to ttcr spr register */
    -void spr_write_ttcr (unsigned long value);
    -void spr_write_ttmr (unsigned long value);
    +void spr_write_ttcr (uorreg_t value);
    +void spr_write_ttmr (uorreg_t value);

    -unsigned long spr_read_ttcr ();
    +uorreg_t spr_read_ttcr ();

     
    Copyright (c) 1999 OPENCORES.ORG. All rights reserved.