Changeset fcc6224 in mainline


Ignore:
Timestamp:
2012-03-05T21:37:27Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
161fbda
Parents:
d2707fc
Message:

boot,arm32: Make arm32 bootstrap code BeagleBoard-xM aware.

Location:
boot/arch/arm32
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • boot/arch/arm32/include/arch.h

    rd2707fc rfcc6224  
    4242#ifdef MACHINE_gta02
    4343#define BOOT_BASE       0x30008000
     44#elif defined MACHINE_beagleboardxm
     45#define BOOT_BASE       0x80000000
    4446#else
    4547#define BOOT_BASE       0x00000000
     
    4749
    4850#define BOOT_OFFSET     (BOOT_BASE + 0xa00000)
     51
     52#ifdef MACHINE_beagleboardxm
     53        #define PA2KA(addr)  (addr)
     54#else
    4955
    5056#ifndef __ASM__
     
    5662#endif
    5763
     64#endif
     65
    5866/** @}
    5967 */
  • boot/arch/arm32/include/main.h

    rd2707fc rfcc6224  
    4040/** Address where characters to be printed are expected. */
    4141
     42
     43/** BeagleBoard-xM UART register address
     44 *
     45 * This is UART3 of AM/DM37x CPU
     46 */
     47#define BBXM_SCONS_THR          0x49020000
     48#define BBXM_SCONS_SSR          0x49020044
     49
     50/* Check this bit before writing (tx fifo full) */
     51#define BBXM_THR_FULL           0x00000001
     52
     53
    4254/** GTA02 serial console UART register addresses.
    4355 *
  • boot/arch/arm32/src/mm.c

    rd2707fc rfcc6224  
    6767static void init_boot_pt(void)
    6868{
    69         pfn_t split_page = 0x800;
    70        
     69/* BeagleBoard-xM (MD37x) memory starts at 2GB border,
     70 * thus mapping only lower 2GB is not not enough.
     71 * Map entire AS 1:1 instead and hope it works. */
     72#ifdef MACHINE_beagleboardxm
     73        const pfn_t split_page = PTL0_ENTRIES;
     74#else
     75        const pfn_t split_page = 0x800;
     76#endif
    7177        /* Create 1:1 virtual-physical mapping (in lower 2 GB). */
    7278        pfn_t page;
  • boot/arch/arm32/src/putchar.c

    rd2707fc rfcc6224  
    4040#include <putchar.h>
    4141#include <str.h>
     42
     43#ifdef MACHINE_beagleboardxm
     44
     45/** Send a byte to the amdm37x serial console.
     46 *
     47 * @param byte          Byte to send.
     48 */
     49static void scons_sendb_bbxm(uint8_t byte)
     50{
     51        volatile uint32_t *thr =
     52            (volatile uint32_t *)BBXM_SCONS_THR;
     53        volatile uint32_t *ssr =
     54            (volatile uint32_t *)BBXM_SCONS_SSR;
     55
     56        /* Wait until transmitter is empty. */
     57        while ((*ssr & BBXM_THR_FULL) == 1) ;
     58
     59        /* Transmit byte. */
     60        *thr = (uint32_t) byte;
     61}
     62
     63#endif
    4264
    4365#ifdef MACHINE_gta02
     
    97119static void scons_sendb(uint8_t byte)
    98120{
     121#ifdef MACHINE_beagleboardxm
     122        scons_sendb_bbxm(byte);
     123#endif
    99124#ifdef MACHINE_gta02
    100125        scons_sendb_gta02(byte);
Note: See TracChangeset for help on using the changeset viewer.