Ignore:
Timestamp:
2013-09-29T06:56:33Z (12 years ago)
Author:
Beniamino Galvani <b.galvani@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a9bd960d
Parents:
3deb0155 (diff), 13be2583 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

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

    r3deb0155 rdd0c8a0  
    6060
    6161static struct beagleboard {
    62         amdm37x_irc_regs_t *irc_addr;
    63         amdm37x_uart_t uart;
     62        omap_irc_regs_t *irc_addr;
     63        omap_uart_t uart;
    6464        amdm37x_gpt_t timer;
    6565} beagleboard;
     
    8585static void bb_timer_irq_handler(irq_t *irq)
    8686{
     87        amdm37x_gpt_irq_ack(&beagleboard.timer);
     88
    8789        /*
    8890         * We are holding a lock which prevents preemption.
    8991         * Release the lock, call clock() and reacquire the lock again.
    9092         */
    91         amdm37x_gpt_irq_ack(&beagleboard.timer);
    9293        spinlock_unlock(&irq->lock);
    9394        clock();
     
    102103            PAGE_NOT_CACHEABLE);
    103104        ASSERT(beagleboard.irc_addr);
    104         amdm37x_irc_init(beagleboard.irc_addr);
     105        omap_irc_init(beagleboard.irc_addr);
    105106
    106107        /* Initialize timer. Use timer1, because it is in WKUP power domain
     
    122123
    123124        /* Enable timer interrupt */
    124         amdm37x_irc_enable(beagleboard.irc_addr, AMDM37x_GPT1_IRQ);
     125        omap_irc_enable(beagleboard.irc_addr, AMDM37x_GPT1_IRQ);
    125126
    126127        /* Start timer here */
     
    146147static void bbxm_irq_exception(unsigned int exc_no, istate_t *istate)
    147148{
    148         const unsigned inum = amdm37x_irc_inum_get(beagleboard.irc_addr);
    149         amdm37x_irc_irq_ack(beagleboard.irc_addr);
     149        const unsigned inum = omap_irc_inum_get(beagleboard.irc_addr);
    150150
    151151        irq_t *irq = irq_dispatch_and_lock(inum);
     
    159159                    CPU->id, inum);
    160160        }
     161        /** amdm37x manual ch. 12.5.2 (p. 2428) places irc ack at the end
     162         * of ISR. DO this to avoid strange behavior. */
     163        omap_irc_irq_ack(beagleboard.irc_addr);
    161164}
    162165
     
    167170static void bbxm_output_init(void)
    168171{
     172#ifdef CONFIG_OMAP_UART
    169173        /* UART3 is wired to external RS232 connector */
    170         const bool ok = amdm37x_uart_init(&beagleboard.uart,
     174        const bool ok = omap_uart_init(&beagleboard.uart,
    171175            AMDM37x_UART3_IRQ, AMDM37x_UART3_BASE_ADDRESS, AMDM37x_UART3_SIZE);
    172176        if (ok) {
    173177                stdout_wire(&beagleboard.uart.outdev);
    174178        }
     179#endif
    175180}
    176181
    177182static void bbxm_input_init(void)
    178183{
     184#ifdef CONFIG_OMAP_UART
    179185        srln_instance_t *srln_instance = srln_init();
    180186        if (srln_instance) {
    181187                indev_t *sink = stdin_wire();
    182188                indev_t *srln = srln_wire(srln_instance, sink);
    183                 amdm37x_uart_input_wire(&beagleboard.uart, srln);
    184                 amdm37x_irc_enable(beagleboard.irc_addr, AMDM37x_UART3_IRQ);
     189                omap_uart_input_wire(&beagleboard.uart, srln);
     190                omap_irc_enable(beagleboard.irc_addr, AMDM37x_UART3_IRQ);
    185191        }
     192#endif
    186193}
    187194
Note: See TracChangeset for help on using the changeset viewer.