Changeset 46c20c8 in mainline for boot/arch/arm32/include/main.h
- Timestamp:
- 2010-11-26T20:08:10Z (15 years ago)
- 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. - File:
-
- 1 moved
-
boot/arch/arm32/include/main.h (moved) (moved from boot/arch/arm32/loader/print/print.c ) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
boot/arch/arm32/include/main.h
rfb150d78 r46c20c8 1 1 /* 2 2 * Copyright (c) 2007 Michal Kebrt 3 * Copyright (c) 20 09 Vineeth Pillai3 * Copyright (c) 2010 Jiri Svoboda 4 4 * All rights reserved. 5 5 * … … 28 28 */ 29 29 30 31 30 /** @addtogroup arm32boot 32 31 * @{ 33 32 */ 34 33 /** @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 37 51 38 52 39 #include <printf.h> 53 /** GXemul testarm serial console output register */ 54 #define TESTARM_SCONS_ADDR 0x10000000 40 55 56 /** IntegratorCP serial console output register */ 57 #define ICP_SCONS_ADDR 0x16000000 41 58 42 /** Address where characters to be printed are expected. */ 43 #ifdef MACHINE_testarm 44 #define PUTC_ADDRESS 0x10000000 59 extern void bootstrap(void); 60 45 61 #endif 46 47 #ifdef MACHINE_integratorcp48 #define PUTC_ADDRESS 0x1600000049 #endif50 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 }77 62 78 63 /** @} 79 64 */ 80
Note:
See TracChangeset
for help on using the changeset viewer.
