Ignore:
Timestamp:
2008-12-05T19:59:03Z (17 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
49093a4
Parents:
0258e67
Message:

Merge sparc branch to trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/src/drivers/tick.c

    r0258e67 r965dc18  
    4646#define TICK_RESTART_TIME       50      /* Worst case estimate. */
    4747
    48 /** Initialize tick interrupt. */
     48/** Initialize tick and stick interrupt. */
    4949void tick_init(void)
    5050{
     51        /* initialize TICK interrupt */
    5152        tick_compare_reg_t compare;
    52        
     53
    5354        interrupt_register(14, "tick_int", tick_interrupt);
    5455        compare.int_dis = false;
     
    5758        tick_compare_write(compare.value);
    5859        tick_write(0);
     60
     61#if defined (US3)
     62        /* disable STICK interrupts and clear any pending ones */
     63        tick_compare_reg_t stick_compare;
     64        softint_reg_t clear;
     65
     66        stick_compare.value = stick_compare_read();
     67        stick_compare.int_dis = true;
     68        stick_compare.tick_cmpr = 0;
     69        stick_compare_write(stick_compare.value);
     70
     71        clear.value = 0;
     72        clear.stick_int = 1;
     73        clear_softint_write(clear.value);
     74#endif
    5975}
    6076
     
    6884        softint_reg_t softint, clear;
    6985        uint64_t drift;
    70        
     86
    7187        softint.value = softint_read();
    7288       
Note: See TracChangeset for help on using the changeset viewer.