1 #include "asm/arch/sci_types.h"
5 #include <asm/arch/bits.h>
6 #include <asm/arch-sc8830/chip_drv_config_extern.h>
8 char * version_string="fdl2";
10 int printf(const char *fmt, ...)
15 char printbuffer[CONFIG_SYS_PBSIZE];
18 i = vsprintf(printbuffer, fmt, args);
19 serial_puts(printbuffer);
26 printf("###ERROR####Please RESET the board###\n");
29 #if defined (CONFIG_SYS_SC8800X_UART0)
30 #define UART_PHYS ARM_UART0_BASE
31 #elif defined (CONFIG_SYS_SC8800X_UART1)
32 #define UART_PHYS ARM_UART1_BASE
33 #elif defined (CONFIG_SYS_SC8800X_UART2)
34 #define UART_PHYS ARM_UART2_BASE
35 #elif defined (CONFIG_SYS_SC8800X_UART3)
36 #define UART_PHYS ARM_UART3_BASE
38 #error "define CONFIG_SYS_SC88000X_UARTx in configs file to use UART driver"
41 #define __REG(x) (*((volatile u32 *)(x)))
48 int vprintf(const char *fmt, va_list args)
51 char printbuffer[CONFIG_SYS_PBSIZE];
53 /* For this to work, printbuffer must be larger than
54 * * anything we ever want to print.
56 i = vsprintf(printbuffer, fmt, args);
58 /* Print the string */
59 serial_puts(printbuffer);
63 void putc(const char c)
68 void puts(const char *str)
78 int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
83 void hw_watchdog_reset(void)
87 #if !((defined CONFIG_EMMC_BOOT)||(defined CONFIG_SC8830) || defined(CONFIG_SC9630))
88 uint32 SCI_GetTickCount(void)
90 volatile uint32 tmp_tick1;
91 volatile uint32 tmp_tick2;
93 tmp_tick1 = SYSTEM_CURRENT_CLOCK;
94 tmp_tick2 = SYSTEM_CURRENT_CLOCK;
96 while (tmp_tick1 != tmp_tick2)
98 tmp_tick1 = tmp_tick2;
99 tmp_tick2 = SYSTEM_CURRENT_CLOCK;