Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2a4df71

Browse files
Cleanup romstage
1 parent1a64b14 commit2a4df71

File tree

1 file changed

+0
-58
lines changed

1 file changed

+0
-58
lines changed

‎romstage.c

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,11 @@ VideoCoreIV first stage bootloader.
2222

2323
uint32_tg_CPUID;
2424

25-
#defineUART_DR (UART_BASE+0x00)
26-
#defineUART_RSRECR (UART_BASE+0x04)
27-
#defineUART_FR (UART_BASE+0x18)
28-
#defineUART_ILPR (UART_BASE+0x20)
2925
#defineUART_IBRD (UART_BASE+0x24)
3026
#defineUART_FBRD (UART_BASE+0x28)
3127
#defineUART_LCRH (UART_BASE+0x2C)
3228
#defineUART_CR (UART_BASE+0x30)
33-
#defineUART_IFLS (UART_BASE+0x34)
34-
#defineUART_IMSC (UART_BASE+0x38)
35-
#defineUART_RIS (UART_BASE+0x3C)
36-
#defineUART_MIS (UART_BASE+0x40)
3729
#defineUART_ICR (UART_BASE+0x44)
38-
#defineUART_DMACR (UART_BASE+0x48)
39-
#defineUART_ITCR (UART_BASE+0x80)
40-
#defineUART_ITIP (UART_BASE+0x84)
41-
#defineUART_ITOP (UART_BASE+0x88)
42-
#defineUART_TDR (UART_BASE+0x8C)
4330

4431
voiduart_putc(unsignedintch) {
4532
while(UART_MSR&0x20);
@@ -72,39 +59,6 @@ void uart_init(void) {
7259
mmio_write32(UART_CR,0x301);
7360
}
7461

75-
voidled_init(void) {
76-
unsignedintra;
77-
78-
ra=GP_FSEL1;
79-
ra &= ~(7 <<18);
80-
ra |=1 <<18;
81-
82-
GP_FSEL1=ra;
83-
}
84-
85-
/*
86-
#define CM_PLLC_DIGRST_BITS 9:9
87-
#define CM_PLLC_DIGRST_SET 0x00000200
88-
#define CM_PLLC_ANARST_BITS 8:8
89-
#define CM_PLLC_ANARST_SET 0x00000100
90-
#define CM_PLLC_HOLDPER_BITS 7:7
91-
#define CM_PLLC_HOLDPER_SET 0x00000080
92-
#define CM_PLLC_LOADPER_BITS 6:6
93-
#define CM_PLLC_LOADPER_SET 0x00000040
94-
#define CM_PLLC_HOLDCORE2_BITS 5:5
95-
#define CM_PLLC_HOLDCORE2_SET 0x00000020
96-
#define CM_PLLC_LOADCORE2_BITS 4:4
97-
#define CM_PLLC_LOADCORE2_SET 0x00000010
98-
#define CM_PLLC_HOLDCORE1_BITS 3:3
99-
#define CM_PLLC_HOLDCORE1_SET 0x00000008
100-
#define CM_PLLC_LOADCORE1_BITS 2:2
101-
#define CM_PLLC_LOADCORE1_SET 0x00000004
102-
#define CM_PLLC_HOLDCORE0_BITS 1:1
103-
#define CM_PLLC_HOLDCORE0_SET 0x00000002
104-
#define CM_PLLC_LOADCORE0_BITS 0:0
105-
#define CM_PLLC_LOADCORE0_SET 0x00000001
106-
*/
107-
10862
voidswitch_vpu_to_pllc() {
10963
A2W_XOSC_CTRL |=A2W_PASSWORD |A2W_XOSC_CTRL_PLLCEN_SET;
11064

@@ -164,19 +118,13 @@ void set_interrupt(int intno, bool enable) {
164118

165119
uint32_tv=mmio_read32(IC0_BASE+offset)& ~slot;
166120
mmio_write32(IC0_BASE+offset,enable ?v |slot :v);
167-
168-
printf("%d: %X\n",intno,mmio_read32(IC0_BASE+offset));
169121
}
170122

171123
externvoidsdram_init();
172124
externvoidarm_init();
173125
externvoidmonitor_start();
174126
externvoidPEStartPlatform();
175127

176-
voidprint_crap() {
177-
printf("TB_BOOT_OPT = 0x%X\n",TB_BOOT_OPT);
178-
}
179-
180128
int_main(unsignedintcpuid,unsignedintload_address) {
181129
switch_vpu_to_pllc();
182130

@@ -201,11 +149,6 @@ int _main(unsigned int cpuid, unsigned int load_address) {
201149
"OPENSOURCE"
202150
);
203151

204-
printf("CPUID = 0x%X\n",cpuid);
205-
printf("LoadAddr = 0x%X\n",load_address);
206-
207-
print_crap();
208-
209152
g_CPUID=cpuid;
210153

211154
__cxx_init();
@@ -221,4 +164,3 @@ int _main(unsigned int cpuid, unsigned int load_address) {
221164

222165
panic("main exiting!");
223166
}
224-

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp