blob: 216576ca27b202fc0939eff12b18174ca5a65736 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
#include <debug_ll.h>
#include <mach/clock-imx51_53.h>
#include <mach/iomux-mx51.h>
#include <common.h>
#include <mach/esdctl.h>
#include <mach/generic.h>
#include <asm/cache.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
static inline void setup_uart(void)
{
void __iomem *iomuxbase = IOMEM(MX51_IOMUXC_BASE_ADDR);
void __iomem *ccmbase = IOMEM(MX51_CCM_BASE_ADDR);
/*
* Restore CCM values that might be changed by the Mask ROM
* code.
*
* Source: RealView debug scripts provided by Freescale
*/
writel(MX5_CCM_CBCDR_RESET_VALUE, ccmbase + MX5_CCM_CBCDR);
writel(MX5_CCM_CSCMR1_RESET_VALUE, ccmbase + MX5_CCM_CSCMR1);
writel(MX5_CCM_CSCDR1_RESET_VALUE, ccmbase + MX5_CCM_CSCDR1);
imx_setup_pad(iomuxbase, MX51_PAD_UART1_TXD__UART1_TXD);
imx51_uart_setup_ll();
putc_ll('>');
}
extern char __dtb_imx51_babbage_start[];
ENTRY_FUNCTION(start_imx51_babbage, r0, r1, r2)
{
void *fdt;
imx5_cpu_lowlevel_init();
if (IS_ENABLED(CONFIG_DEBUG_LL))
setup_uart();
arm_setup_stack(0x20000000 - 16);
fdt = __dtb_imx51_babbage_start + get_runtime_offset();
imx51_barebox_entry(fdt);
}
static noinline void babbage_entry(void)
{
arm_early_mmu_cache_invalidate();
relocate_to_current_adr();
setup_c();
puts_ll("lowlevel init done\n");
imx51_barebox_entry(NULL);
}
ENTRY_FUNCTION(start_imx51_babbage_xload, r0, r1, r2)
{
imx5_cpu_lowlevel_init();
if (IS_ENABLED(CONFIG_DEBUG_LL))
setup_uart();
arm_setup_stack(0x20000000 - 16);
babbage_entry();
}
|