Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset ae36ba0 in mainline


Ignore:
Timestamp:
2012-03-11T04:02:12Z (10 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master
Children:
fc965aa
Parents:
60a025d
Message:

beagleboardxm: Initialize serial line input.

Set memory size to 512MB.
Set timer1 source.

File:
1 edited

Legend:

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

    r60a025d rae36ba0  
    3838#include <genarch/drivers/amdm37x_uart/amdm37x_uart.h>
    3939#include <genarch/drivers/amdm37x_gpt/amdm37x_gpt.h>
     40#include <genarch/srln/srln.h>
    4041#include <interrupt.h>
    4142#include <mm/km.h>
     
    5556
    5657#define BBXM_MEMORY_START       0x80000000      /* physical */
    57 #define BBXM_MEMORY_SIZE        0x10000000      /* 256 MB, first chunk */
     58#define BBXM_MEMORY_SIZE        0x20000000      /* 512 MB */
    5859
    5960static struct beagleboard {
     
    8788         * Release the lock, call clock() and reacquire the lock again.
    8889         */
    89         spinlock_unlock(&irq->lock);
    90         clock();
    91         spinlock_lock(&irq->lock);
     90        spinlock_unlock(&irq->lock);
     91        clock();
     92        spinlock_lock(&irq->lock);
    9293}
    9394
     
    100101        amdm37x_irc_init(beagleboard.irc_addr);
    101102
    102         // TODO: setup 32kHz clock source for timer1
    103 
    104         /* Initialize timer, pick timer1, beacues it is in always power domain
     103        // TODO find a nicer way to setup 32kHz clock source for timer1
     104        ioport32_t *clksel = (void*) km_map(0x48004C40, 4, PAGE_NOT_CACHEABLE);
     105        *clksel &= ~1;
     106        km_unmap((uintptr_t)clksel, 4);
     107
     108        /* Initialize timer, pick timer1, because it is in always-power domain
    105109         * and has special capabilities for regular ticks */
    106110        amdm37x_gpt_timer_ticks_init(&beagleboard.timer,
    107             AMDM37x_GPT1_BASE_ADDRESS, AMDM37x_GPT1_SIZE, 100);
     111            AMDM37x_GPT1_BASE_ADDRESS, AMDM37x_GPT1_SIZE, 100); /* 100 Hz */
    108112}
    109113
     
    175179static void bbxm_input_init(void)
    176180{
     181        srln_instance_t *srln_instance = srln_init();
     182        if (srln_instance) {
     183                indev_t *sink = stdin_wire();
     184                indev_t *srln = srln_wire(srln_instance, sink);
     185                amdm37x_uart_input_wire(&beagleboard.uart, srln);
     186        }
    177187}
    178188
Note: See TracChangeset for help on using the changeset viewer.