diff options
Diffstat (limited to 'bootloader')
-rw-r--r-- | bootloader/SOURCES | 3 | ||||
-rw-r--r-- | bootloader/rk27xx.c | 45 |
2 files changed, 48 insertions, 0 deletions
diff --git a/bootloader/SOURCES b/bootloader/SOURCES index 3e173386e7..9448515a58 100644 --- a/bootloader/SOURCES +++ b/bootloader/SOURCES | |||
@@ -69,4 +69,7 @@ main-pp.c | |||
69 | show_logo.c | 69 | show_logo.c |
70 | #elif defined(MPIO_HD200) || defined(MPIO_HD300) | 70 | #elif defined(MPIO_HD200) || defined(MPIO_HD300) |
71 | mpio_hd200_hd300.c | 71 | mpio_hd200_hd300.c |
72 | #elif defined(RK27_GENERIC) | ||
73 | rk27xx.c | ||
74 | show_logo.c | ||
72 | #endif | 75 | #endif |
diff --git a/bootloader/rk27xx.c b/bootloader/rk27xx.c new file mode 100644 index 0000000000..37778db6dc --- /dev/null +++ b/bootloader/rk27xx.c | |||
@@ -0,0 +1,45 @@ | |||
1 | #include "config.h" | ||
2 | #include <stdlib.h> | ||
3 | #include <stdio.h> | ||
4 | #include <string.h> | ||
5 | #include "inttypes.h" | ||
6 | #include "string.h" | ||
7 | #include "cpu.h" | ||
8 | #include "system.h" | ||
9 | #include "lcd.h" | ||
10 | #include "kernel.h" | ||
11 | #include "thread.h" | ||
12 | #include "backlight.h" | ||
13 | #include "backlight-target.h" | ||
14 | #include "font.h" | ||
15 | #include "common.h" | ||
16 | #include "version.h" | ||
17 | |||
18 | extern int show_logo( void ); | ||
19 | void main(void) | ||
20 | { | ||
21 | |||
22 | _backlight_init(); | ||
23 | |||
24 | system_init(); | ||
25 | kernel_init(); | ||
26 | enable_irq(); | ||
27 | |||
28 | lcd_init_device(); | ||
29 | _backlight_on(); | ||
30 | font_init(); | ||
31 | lcd_setfont(FONT_SYSFIXED); | ||
32 | |||
33 | show_logo(); | ||
34 | sleep(HZ*2); | ||
35 | |||
36 | while(1) | ||
37 | { | ||
38 | reset_screen(); | ||
39 | printf("GPIOA: 0x%0x", GPIO_PADR); | ||
40 | printf("GPIOB: 0x%0x", GPIO_PBDR); | ||
41 | printf("GPIOC: 0x%0x", GPIO_PCDR); | ||
42 | printf("GPIOD: 0x%0x", GPIO_PDDR); | ||
43 | sleep(HZ/10); | ||
44 | } | ||
45 | } | ||