Changeset 46c20c8 in mainline for boot/arch/arm32/include/main.h


Ignore:
Timestamp:
2010-11-26T20:08:10Z (15 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
45df59a
Parents:
fb150d78 (diff), ffdd2b9 (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 moved

Legend:

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

    rfb150d78 r46c20c8  
    11/*
    22 * Copyright (c) 2007 Michal Kebrt
    3  * Copyright (c) 2009 Vineeth Pillai
     3 * Copyright (c) 2010 Jiri Svoboda
    44 * All rights reserved.
    55 *
     
    2828 */
    2929
    30 
    3130/** @addtogroup arm32boot
    3231 * @{
    3332 */
    3433/** @file
    35  *  @brief bootloader output logic
    36  */
     34 * @brief Boot related declarations.
     35 */
     36
     37#ifndef BOOT_arm32_MAIN_H
     38#define BOOT_arm32_MAIN_H
     39
     40/** Address where characters to be printed are expected. */
     41
     42/** GTA02 serial console UART register addresses.
     43 *
     44 * This is UART channel 2 of the S3C24xx CPU
     45 */
     46#define GTA02_SCONS_UTRSTAT     0x50008010
     47#define GTA02_SCONS_UTXH        0x50008020
     48
     49/* Bits in UTXH register */
     50#define S3C24XX_UTXH_TX_EMPTY   0x00000004
    3751
    3852
    39 #include <printf.h>
     53/** GXemul testarm serial console output register */
     54#define TESTARM_SCONS_ADDR      0x10000000
    4055
     56/** IntegratorCP serial console output register */
     57#define ICP_SCONS_ADDR          0x16000000
    4158
    42 /** Address where characters to be printed are expected. */
    43 #ifdef MACHINE_testarm
    44         #define PUTC_ADDRESS  0x10000000
     59extern void bootstrap(void);
     60
    4561#endif
    46 
    47 #ifdef MACHINE_integratorcp
    48         #define PUTC_ADDRESS  0x16000000
    49 #endif
    50 
    51 
    52 
    53 /** Prints a character to the console.
    54  *
    55  * @param ch Character to be printed.
    56  */
    57 static void putc(char ch)
    58 {
    59         if (ch == '\n')
    60                 *((volatile char *) PUTC_ADDRESS) = '\r';
    61         *((volatile char *) PUTC_ADDRESS) = ch;
    62 }
    63 
    64 
    65 /** Prints a string to the console.
    66  *
    67  * @param str String to be printed.
    68  * @param len Number of characters to be printed.
    69  */
    70 void write(const char *str, const int len)
    71 {
    72         int i;
    73         for (i = 0; i < len; ++i) {
    74                 putc(str[i]);
    75         }
    76 }
    7762
    7863/** @}
    7964 */
    80 
Note: See TracChangeset for help on using the changeset viewer.