Ignore:
Timestamp:
2013-02-13T20:19:29Z (11 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
06c4609
Parents:
4c754f6
Message:

fix sysclock frequency reading and print an error message is the operation was unsuccessful

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/arm32/src/mach/beaglebone/beaglebone.c

    r4c754f6 r0f66886  
    117117static void bbone_timer_irq_start(void)
    118118{
     119        unsigned sysclk_freq;
     120
    119121        /* Initialize the IRQ */
    120122        static irq_t timer_irq;
     
    132134           CLK_SRC_M_OSC);
    133135        /* Initialize the DMTIMER2 */
    134         am335x_timer_init(&bbone.timer, DMTIMER2, HZ,
    135             am335x_ctrl_module_clock_freq_get(bbone.ctrl_module));
     136        if (am335x_ctrl_module_clock_freq_get(bbone.ctrl_module,
     137            &sysclk_freq) != EOK) {
     138                printf("Cannot get the system clock frequency!\n");
     139                return;
     140        }
     141
     142        am335x_timer_init(&bbone.timer, DMTIMER2, HZ, sysclk_freq);
    136143        /* Enable the interrupt */
    137144        am335x_irc_enable(bbone.irc_addr, AM335x_DMTIMER2_IRQ);
Note: See TracChangeset for help on using the changeset viewer.