7c285728594fae79970d82b0e1d525ae6d7892ea
[openwrt/svn-archive/archive.git] / target / linux / at91-2.6 / image / romboot / patches / 000-fixenv.patch
1 diff -uNr romboot/main.cpp romboot.new/main.cpp
2 --- romboot/main.cpp 2004-07-16 17:10:04.000000000 +0200
3 +++ romboot.new/main.cpp 2006-03-03 02:27:37.000000000 +0100
4 @@ -23,12 +23,12 @@
5 #define AT91C_UBOOT_DATAFLASH_ADDR 0xC0008000
6
7 // crystal= 18.432MHz
8 -//#define AT91C_PLLA_VALUE 0x2026BE04 // -> 179.712MHz
9 -//#define AT91C_PLLA_MCK 0x0000202
10 +#define AT91C_PLLA_VALUE 0x2026BE04 // -> 179.712MHz
11 +#define AT91C_PLLA_MCK 0x0000202
12
13 // crystal= 20.000MHz
14 -#define AT91C_PLLA_VALUE 0x2023BE04 // -> 180MHz
15 -#define AT91C_PLLA_MCK 0x0000202
16 +//#define AT91C_PLLA_VALUE 0x2023BE04 // -> 180MHz
17 +//#define AT91C_PLLA_MCK 0x0000202
18
19 #define DELAY_MAIN_FREQ 1000
20 #define DISP_LINE_LEN 16
21 @@ -151,7 +151,7 @@
22 //*-----------------------------------------------------------------------------
23 void AT91F_DisplayMenu(void)
24 {
25 - printf("\n\rATMEL LOADER %s %s %s\n\r", AT91C_VERSION, __DATE__, __TIME__);
26 + printf("\n\rFDL LOADER %s %s %s\n\r", AT91C_VERSION, __DATE__, __TIME__);
27 printf(menu_separ);
28 AT91F_DataflashPrintInfo();
29 printf(menu_separ);
30 @@ -306,6 +306,19 @@
31 AT91F_SetPLL();
32 }
33
34 +void LedCode(void)
35 +{
36 + int *pRegister;
37 + pRegister = (int *)0xFFFFF800; // Enable port C peripheral reg
38 + *pRegister = 0x3c00;
39 + pRegister = (int *)0xFFFFF810; // Output Enable reg
40 + *pRegister = 0x3c00;
41 + pRegister = (int *)0xFFFFF830; // Set data
42 + *pRegister = 0x1400;
43 + pRegister = (int *)0xFFFFF834; // Clear bits
44 + *pRegister = 0x2800;
45 +}
46 +
47 void AT91F_StartUboot(unsigned int dummy, void *pvoid)
48 {
49 printf("Load U-BOOT from dataflash[%x] to SDRAM[%x]\n\r", AT91C_UBOOT_DATAFLASH_ADDR, AT91C_UBOOT_ADDR);
50 @@ -313,6 +326,7 @@
51 printf("Set PLLA to 180Mhz and Master clock to 60Mhz and start U-BOOT\n\r");
52 //* Reset registers
53 AT91F_ResetRegisters();
54 + LedCode();
55 Jump(AT91C_UBOOT_ADDR);
56 while(1);
57 }