Changeset 4108
- Timestamp:
- 02/24/08 23:26:25 (5 years ago)
- Location:
- trunk/src/target/u-boot/patches
- Files:
-
- 4 edited
-
uboot-neo1973-resume.patch (modified) (4 diffs)
-
uboot-s3c2440.patch (modified) (45 diffs)
-
uboot-s3c2442.patch (modified) (41 diffs)
-
uboot-s3c2443.patch (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/target/u-boot/patches/uboot-neo1973-resume.patch
r2796 r4108 7 7 --- u-boot.orig/cpu/arm920t/start.S 8 8 +++ u-boot/cpu/arm920t/start.S 9 @@ - 223,18 +223,68 @@9 @@ -181,18 +181,68 @@ copyex: 10 10 str r1, [r0] 11 11 # endif … … 76 76 -#endif 77 77 78 #ifdef CONFIG_AT91RM9200 79 #ifdef CONFIG_BOOTBINFUNC 80 @@ -292,9 +342,33 @@ 78 #if defined(CONFIG_AT91RM9200) || defined(CONFIG_S3C2410) 79 80 @@ -210,10 +260,8 @@ copyex: 81 #endif /* CONFIG_S3C2410_NAND_BOOT */ 82 83 relocate: /* relocate U-Boot to RAM */ 84 -#if !defined(CONFIG_SKIP_LOWLEVEL_INIT) && defined(CONFIG_LL_INIT_NAND_ONLY) 85 teq r0, #0 /* running at address 0 ? */ 86 - bleq cpu_init_crit /* yes -> do low-level setup */ 87 -#endif /* !CONFIG_SKIP_LOWLEVEL_INIT && CONFIG_LL_INIT_NAND_ONLY */ 88 + bleq may_resume /* yes -> do low-level setup */ 89 90 adr r0, _start /* the above may have clobbered r0 */ 91 92 @@ -239,11 +287,7 @@ _done_relocate: 81 93 82 94 #ifdef CONFIG_S3C2410_NAND_BOOT 83 95 nand_load: 96 -#if !defined(CONFIG_SKIP_LOWLEVEL_INIT) && defined(CONFIG_LL_INIT_NAND_ONLY) 97 - bl cpu_init_crit 98 -#endif 99 - 100 - /* mov r10, lr */ 101 + bl may_resume /* low-level setup and resume */ 102 103 @ reset NAND 104 mov r1, #S3C2410_NAND_BASE 105 @@ -398,6 +442,51 @@ cpu_init_crit: 106 mov pc, lr 107 #endif /* CONFIG_SKIP_LOWLEVEL_INIT */ 108 109 + 110 +/* 111 + ************************************************************************* 112 + * 113 + * may_resume 114 + * 115 + * Bring up memory and check if we're coming out of suspend. 116 + * 117 + ************************************************************************* 118 + */ 119 + 120 + 121 +may_resume: 122 + mov r10, lr /* we may call cpu_init_crit */ 123 + 84 124 + /* take sdram out of power down */ 85 125 + ldr r0, =0x56000080 /* misccr */ … … 93 133 + bpl 1b 94 134 + 95 #if !defined(CONFIG_SKIP_LOWLEVEL_INIT) && defined(CONFIG_LL_INIT_NAND_ONLY)96 bl cpu_init_crit97 #endif135 +#if !defined(CONFIG_SKIP_LOWLEVEL_INIT) && defined(CONFIG_LL_INIT_NAND_ONLY) 136 + bl cpu_init_crit 137 +#endif 98 138 +#if defined(CONFIG_S3C2410) 99 139 + /* ensure some refresh has happened */ … … 109 149 +#endif /* CONFIG_S3C2410 */ 110 150 +#endif /* CONFIG_SKIP_LOWLEVEL_INIT */ 111 112 /* mov r10, lr */ 113 151 + 152 + mov pc, r10 153 + 154 /* 155 ************************************************************************* 156 * -
trunk/src/target/u-boot/patches/uboot-s3c2440.patch
r3564 r4108 5 5 --- u-boot.orig/include/s3c24x0.h 6 6 +++ u-boot/include/s3c24x0.h 7 @@ -82,7 +82,7 @@ 7 @@ -82,7 +82,7 @@ typedef struct { 8 8 S3C24X0_REG32 PRIORITY; 9 9 S3C24X0_REG32 INTPND; … … 14 14 S3C24X0_REG32 INTSUBMSK; 15 15 #endif 16 @@ -92,11 +92,11 @@ 16 @@ -92,11 +92,11 @@ typedef struct { 17 17 /* DMAS (see manual chapter 8) */ 18 18 typedef struct { … … 28 28 #endif 29 29 S3C24X0_REG32 DCON; 30 @@ -107,7 +107,7 @@ 30 @@ -107,7 +107,7 @@ typedef struct { 31 31 #ifdef CONFIG_S3C2400 32 32 S3C24X0_REG32 res[1]; … … 37 37 #endif 38 38 } /*__attribute__((__packed__))*/ S3C24X0_DMA; 39 @@ -126,6 +126,9 @@ 39 @@ -126,6 +126,9 @@ typedef struct { 40 40 S3C24X0_REG32 CLKCON; 41 41 S3C24X0_REG32 CLKSLOW; … … 47 47 48 48 49 @@ -145,7 +148,7 @@ 49 @@ -145,7 +148,7 @@ typedef struct { 50 50 S3C24X0_REG32 res[8]; 51 51 S3C24X0_REG32 DITHMODE; … … 56 56 S3C24X0_REG32 LCDSRCPND; 57 57 S3C24X0_REG32 LCDINTMSK; 58 @@ -157,6 +160,9 @@ 58 @@ -157,6 +160,9 @@ typedef struct { 59 59 /* NAND FLASH (see S3C2410 manual chapter 6) */ 60 60 typedef struct { … … 66 66 S3C24X0_REG32 NFADDR; 67 67 S3C24X0_REG32 NFDATA; 68 @@ -164,6 +170,15 @@ 68 @@ -164,6 +170,15 @@ typedef struct { 69 69 S3C24X0_REG32 NFECC; 70 70 } /*__attribute__((__packed__))*/ S3C2410_NAND; … … 82 82 /* UART (see manual chapter 11) */ 83 83 typedef struct { 84 @@ -451,6 +466,65 @@ 84 @@ -451,6 +466,65 @@ typedef struct { 85 85 S3C24X0_REG32 GSTATUS3; 86 86 S3C24X0_REG32 GSTATUS4; … … 148 148 149 149 150 @@ -637,8 +711,13 @@ 150 @@ -637,8 +711,13 @@ typedef struct { 151 151 S3C24X0_REG32 SDIDCNT; 152 152 S3C24X0_REG32 SDIDSTA; … … 165 165 =================================================================== 166 166 --- u-boot.orig/drivers/rtc/s3c24x0_rtc.c 167 +++ u-boot/ rtc/drivers/s3c24x0_rtc.c167 +++ u-boot/drivers/rtc/s3c24x0_rtc.c 168 168 @@ -34,6 +34,8 @@ 169 169 #include <s3c2400.h> … … 484 484 --- u-boot.orig/include/common.h 485 485 +++ u-boot/include/common.h 486 @@ -4 79,7 +479,7 @@486 @@ -481,7 +481,7 @@ int prt_mpc8220_clks (void); 487 487 ulong get_OPB_freq (void); 488 488 ulong get_PCI_freq (void); … … 527 527 528 528 #define MPLL 0 529 @@ -66,8 +69,17 @@ 529 @@ -66,8 +69,17 @@ static ulong get_PLLCLK(int pllreg) 530 530 m = ((r & 0xFF000) >> 12) + 8; 531 531 p = ((r & 0x003F0) >> 4) + 2; … … 546 546 547 547 /* return FCLK frequency */ 548 @@ -81,7 +93,23 @@ 548 @@ -81,7 +93,23 @@ ulong get_HCLK(void) 549 549 { 550 550 S3C24X0_CLOCK_POWER * const clk_power = S3C24X0_GetBase_CLOCK_POWER(); … … 570 570 571 571 /* return PCLK frequency */ 572 @@ -98,4 +126,5 @@ 572 @@ -98,4 +126,5 @@ ulong get_UCLK(void) 573 573 return(get_PLLCLK(UPLL)); 574 574 } … … 599 599 600 600 int timer_load_val = 0; 601 @@ -59,6 +62,7 @@ 601 @@ -59,6 +62,7 @@ int interrupt_init (void) 602 602 /* use PWM Timer 4 because it has no output */ 603 603 /* prescaler for Timer 4 is 16 */ … … 607 607 { 608 608 /* 609 @@ -68,6 +72,9 @@ 609 @@ -68,6 +72,9 @@ int interrupt_init (void) 610 610 */ 611 611 timer_load_val = get_PCLK()/(2 * 16 * 100); … … 617 617 lastdec = timers->TCNTB4 = timer_load_val; 618 618 /* auto load, manual update of Timer 4 */ 619 @@ -178,6 +185,7 @@ 619 @@ -178,6 +185,7 @@ ulong get_tbclk (void) 620 620 tbclk = timer_load_val * 100; 621 621 #elif defined(CONFIG_SBC2410X) || \ … … 625 625 tbclk = CFG_HZ; 626 626 #else 627 @@ -232,4 +240,5 @@ 627 @@ -232,4 +240,5 @@ void s3c2410_irq(void) 628 628 } 629 629 #endif /* USE_IRQ */ … … 653 653 654 654 DECLARE_GLOBAL_DATA_PTR; 655 @@ -30 2,4 +305,5 @@655 @@ -301,4 +304,5 @@ struct serial_device s3c24xx_serial2_dev 656 656 657 657 #endif /* CONFIG_SERIAL_MULTI */ … … 673 673 #include <i2c.h> 674 674 675 @@ -63,7 +65,7 @@ 675 @@ -63,7 +65,7 @@ static int GetI2CSDA(void) 676 676 { 677 677 S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); … … 682 682 #endif 683 683 #ifdef CONFIG_S3C2400 684 @@ -82,7 +84,7 @@ 684 @@ -82,7 +84,7 @@ static void SetI2CSCL(int x) 685 685 { 686 686 S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); … … 691 691 #endif 692 692 #ifdef CONFIG_S3C2400 693 @@ -139,7 +141,7 @@ 693 @@ -139,7 +141,7 @@ void i2c_init (int speed, int slaveadd) 694 694 } 695 695 … … 700 700 #endif 701 701 #ifdef CONFIG_S3C2400 702 @@ -147,7 +149,7 @@ 702 @@ -147,7 +149,7 @@ void i2c_init (int speed, int slaveadd) 703 703 #endif 704 704 /* bus still busy probably by (most) previously interrupted transfer */ … … 709 709 gpio->GPECON = (gpio->GPECON & ~0xF0000000) | 0x10000000; 710 710 #endif 711 @@ -171,7 +173,7 @@ 711 @@ -171,7 +173,7 @@ void i2c_init (int speed, int slaveadd) 712 712 udelay (1000); 713 713 … … 760 760 761 761 /* 762 @@ -1 54,20 +158,38 @@762 @@ -166,20 +170,38 @@ copyex: 763 763 bne copyex 764 764 #endif … … 801 801 mov r1, #0x0 802 802 str r1, [r0] 803 @@ -1 78,24 +200,34 @@803 @@ -190,24 +212,34 @@ copyex: 804 804 mov r1, #0xffffffff 805 805 ldr r0, =INTMSK … … 843 843 844 844 /* Page 7-19, seven nops between UPLL and MPLL */ 845 @@ -2 07,12 +239,12 @@845 @@ -219,12 +251,12 @@ copyex: 846 846 nop 847 847 nop … … 858 858 859 859 #if 1 860 @@ -2 40,14 +272,15 @@860 @@ -252,14 +284,15 @@ copyex: 861 861 str r1, [r0, #0x28] 862 862 #endif … … 876 876 #ifndef CONFIG_SKIP_RELOCATE_UBOOT 877 877 adr r0, _start /* r0 <- current position of code */ 878 @@ -299,7 +332,7 @@ 878 @@ -305,6 +338,7 @@ nand_load: 879 bl may_resume /* low-level setup and resume */ 880 881 @ reset NAND 882 +#if defined(CONFIG_S3C2410) 883 mov r1, #S3C2410_NAND_BASE 884 ldr r2, =0xf842 @ initial value enable tacls=3,rph0=6,rph1=0 885 str r2, [r1, #oNFCONF] 886 @@ -323,6 +357,17 @@ nand_load: 887 ldr r2, [r1, #oNFCONF] 888 orr r2, r2, #0x800 @ disable chip 889 str r2, [r1, #oNFCONF] 890 +#elif defined(CONFIG_S3C2440) 891 + mov r1, #S3C2440_NAND_BASE 892 + ldr r2, =0xfff0 @ initial value tacls=3,rph0=7,rph1=7 893 + ldr r3, [r1, #oNFCONF] 894 + orr r3, r3, r2 895 + str r3, [r1, #oNFCONF] 896 + 897 + ldr r3, [r1, #oNFCONT] 898 + orr r3, r3, #1 @ enable nand controller 899 + str r3, [r1, #oNFCONT] 900 +#endif /* CONFIG_S3C2440 */ 901 902 ldr r0, _TEXT_BASE /* upper 128 KiB: relocated uboot */ 903 sub r0, r0, #CFG_MALLOC_LEN /* malloc area */ 904 @@ -385,7 +430,7 @@ done_nand_read: 905 #endif /* CONFIG_S3C2410_NAND_BOOT */ 906 done_relocate: 907 908 -#if defined(CONFIG_USE_IRQ) && defined(CONFIG_S3C2410) 909 +#if defined(CONFIG_USE_IRQ) && (defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440)) 910 /* In the case of the S3C2410, if we've somehow magically (JTAG, ...) 911 ended up in RAM, then that ram is mapped to 0x30000000 and not 0. 912 So we need to copy the interrupt vectors, etc. */ 913 @@ -502,7 +547,7 @@ may_resume: 879 914 #if !defined(CONFIG_SKIP_LOWLEVEL_INIT) && defined(CONFIG_LL_INIT_NAND_ONLY) 880 915 bl cpu_init_crit … … 885 920 ldr r1, =0xfffff 886 921 1: subs r1, r1, #1 887 @@ - 310,11 +343,12 @@922 @@ -513,7 +558,7 @@ may_resume: 888 923 ldr r0, [ r1 ] 889 924 tst r0, #0x02 /* is this resume from power down */ 890 925 ldrne pc, [r1, #4] /* gstatus3 */ 891 926 -#endif /* CONFIG_S3C2410 */ 892 +#endif /* CONFIG_S3C2410 || CONFIG_S3C244 0*/927 +#endif /* CONFIG_S3C2410 || CONFIG_S3C244 */ 893 928 #endif /* CONFIG_SKIP_LOWLEVEL_INIT */ 894 929 895 /* mov r10, lr */ 896 897 +#if defined(CONFIG_S3C2410) 898 @ reset NAND 899 mov r1, #S3C2410_NAND_BASE 900 ldr r2, =0xf842 @ initial value enable tacls=3,rph0=6,rph1=0 901 @@ -334,6 +368,17 @@ 902 ldr r2, [r1, #oNFCONF] 903 orr r2, r2, #0x800 @ disable chip 904 str r2, [r1, #oNFCONF] 905 +#elif defined(CONFIG_S3C2440) 906 + mov r1, #S3C2440_NAND_BASE 907 + ldr r2, =0xfff0 @ initial value tacls=3,rph0=7,rph1=7 908 + ldr r3, [r1, #oNFCONF] 909 + orr r3, r3, r2 910 + str r3, [r1, #oNFCONF] 911 + 912 + ldr r3, [r1, #oNFCONT] 913 + orr r3, r3, #1 @ enable nand controller 914 + str r3, [r1, #oNFCONT] 915 +#endif 916 917 #if 0 918 @ get ready to call C functions (for nand_read()) 919 @@ -402,7 +447,7 @@ 920 #endif /* CONFIG_S3C2410_NAND_BOOT */ 921 done_relocate: 922 923 -#if defined(CONFIG_USE_IRQ) && defined(CONFIG_S3C2410) 924 +#if defined(CONFIG_USE_IRQ) && (defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440)) 925 /* In the case of the S3C2410, if we've somehow magically (JTAG, ...) 926 ended up in RAM, then that ram is mapped to 0x30000000 and not 0. 927 So we need to copy the interrupt vectors, etc. */ 930 mov pc, r10 928 931 Index: u-boot/cpu/arm920t/s3c24x0/nand_read.c 929 932 =================================================================== … … 1078 1081 /* low level nand read function */ 1079 1082 int nand_read_ll(unsigned char *buf, unsigned long start_addr, int size) 1080 @@ -50,47 +161,28 @@ 1083 @@ -50,47 +161,28 @@ int nand_read_ll(unsigned char *buf, uns 1081 1084 return -1; /* invalid alignment */ 1082 1085 … … 1200 1203 { 1201 1204 struct nand_chip *chip = mtd->priv; 1202 @@ -62,23 +92,31 @@ 1205 @@ -62,23 +92,31 @@ static void s3c2410_hwcontrol(struct mtd 1203 1206 1204 1207 switch (cmd) { … … 1237 1240 } 1238 1241 return; 1239 @@ -1 80,15 +218,21 @@1242 @@ -137,15 +175,21 @@ int __board_nand_init(struct nand_chip * 1240 1243 /* initialize hardware */ 1241 1244 twrph0 = 3; twrph1 = 0; tacls = 0; … … 1260 1263 /* read_buf and write_buf are default */ 1261 1264 /* read_byte and write_byte are default */ 1262 @@ - 213,12 +257,23 @@1265 @@ -170,12 +214,23 @@ int __board_nand_init(struct nand_chip * 1263 1266 nand->options = 0; 1264 1267 #endif … … 1289 1292 --- u-boot.orig/cpu/arm920t/s3c24x0/mmc.c 1290 1293 +++ u-boot/cpu/arm920t/s3c24x0/mmc.c 1291 @@ -137,6 +137,9 @@ 1294 @@ -137,6 +137,9 @@ static int mmc_block_read(uchar *dst, ul 1292 1295 dcon |= S3C2410_SDIDCON_RXAFTERCMD|S3C2410_SDIDCON_XFER_RXSTART; 1293 1296 if (wide) … … 1299 1302 1300 1303 /* send read command */ 1301 @@ -394,13 +397,18 @@ 1304 @@ -394,13 +397,18 @@ int mmc_init(int verbose) 1302 1305 1303 1306 clk_power->CLKCON |= (1 << 9); … … 1341 1344 1342 1345 int usb_cpu_init (void) 1343 @@ -68,5 +70,5 @@ 1346 @@ -68,5 +70,5 @@ int usb_cpu_init_fail (void) 1344 1347 return 0; 1345 1348 } … … 1352 1355 --- u-boot.orig/drivers/usb/usb_ohci.c 1353 1356 +++ u-boot/drivers/usb/usb_ohci.c 1354 @@ -6 2,6 +62,7 @@1357 @@ -66,6 +66,7 @@ 1355 1358 #if defined(CONFIG_ARM920T) || \ 1356 1359 defined(CONFIG_S3C2400) || \ … … 1376 1379 DECLARE_GLOBAL_DATA_PTR; 1377 1380 1378 @@ -46,6 +50,7 @@ 1381 @@ -46,6 +50,7 @@ struct s3c24x0_pll_speed { 1379 1382 u_int16_t mhz; 1380 1383 u_int32_t mpllcon; … … 1384 1387 1385 1388 #define CLKDIVN_1_1_1 0x00 1386 @@ -53,6 +58,11 @@ 1389 @@ -53,6 +58,11 @@ struct s3c24x0_pll_speed { 1387 1390 #define CLKDIVN_1_2_4 0x03 1388 1391 #define CLKDIVN_1_4_4 0x04 … … 1396 1399 static const u_int32_t upllcon = ((0x78 << 12) + (0x2 << 4) + 0x3); 1397 1400 static const struct s3c24x0_pll_speed pll_configs[] = { 1398 @@ -77,6 +87,61 @@ 1401 @@ -77,6 +87,61 @@ static const struct s3c24x0_pll_speed pl 1399 1402 .clkdivn = CLKDIVN_1_2_4, 1400 1403 }, … … 1458 1461 #error "please define valid pll configurations for your cpu type" 1459 1462 #endif 1460 @@ -95,6 +160,10 @@ 1463 @@ -95,6 +160,10 @@ static int reconfig_mpll(u_int16_t mhz) 1461 1464 1462 1465 for (i = 0; i < ARRAY_SIZE(pll_configs); i++) { … … 1473 1476 --- u-boot.orig/common/serial.c 1474 1477 +++ u-boot/common/serial.c 1475 @@ - 59,7 +59,7 @@1478 @@ -60,7 +60,7 @@ struct serial_device *__default_serial_c 1476 1479 #else 1477 1480 return &serial0_device; … … 1482 1485 return &s3c24xx_serial0_device; 1483 1486 #elif defined(CONFIG_SERIAL2) 1484 @@ -1 29,7 +129,7 @@1487 @@ -133,7 +133,7 @@ void serial_initialize (void) 1485 1488 #if defined (CONFIG_STUART) 1486 1489 serial_register(&serial_stuart_device); … … 1495 1498 --- u-boot.orig/include/serial.h 1496 1499 +++ u-boot/include/serial.h 1497 @@ -3 5,7 +35,7 @@1500 @@ -36,7 +36,7 @@ extern struct serial_device eserial4_dev 1498 1501 1499 1502 #endif -
trunk/src/target/u-boot/patches/uboot-s3c2442.patch
r3564 r4108 12 12 #endif 13 13 14 @@ -58,7 +58,7 @@ 14 @@ -58,7 +58,7 @@ struct s3c24x0_pll_speed { 15 15 #define CLKDIVN_1_2_4 0x03 16 16 #define CLKDIVN_1_4_4 0x04 … … 21 21 #define CLKDIVN_1_3_6 0x07 22 22 #endif 23 @@ -142,6 +142,67 @@ 23 @@ -142,6 +142,67 @@ static const struct s3c24x0_pll_speed pl 24 24 #error "clock frequencies != 12MHz / 16.9344MHz not supported" 25 25 #endif … … 102 102 #endif 103 103 #include <i2c.h> 104 @@ -65,7 +65,8 @@ 104 @@ -65,7 +65,8 @@ static int GetI2CSDA(void) 105 105 { 106 106 S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); … … 112 112 #endif 113 113 #ifdef CONFIG_S3C2400 114 @@ -84,7 +85,8 @@ 114 @@ -84,7 +85,8 @@ static void SetI2CSCL(int x) 115 115 { 116 116 S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); … … 122 122 #endif 123 123 #ifdef CONFIG_S3C2400 124 @@ -141,7 +143,8 @@ 124 @@ -141,7 +143,8 @@ void i2c_init (int speed, int slaveadd) 125 125 } 126 126 … … 132 132 #endif 133 133 #ifdef CONFIG_S3C2400 134 @@ -149,7 +152,8 @@ 134 @@ -149,7 +152,8 @@ void i2c_init (int speed, int slaveadd) 135 135 #endif 136 136 /* bus still busy probably by (most) previously interrupted transfer */ … … 142 142 gpio->GPECON = (gpio->GPECON & ~0xF0000000) | 0x10000000; 143 143 #endif 144 @@ -173,7 +177,8 @@ 144 @@ -173,7 +177,8 @@ void i2c_init (int speed, int slaveadd) 145 145 udelay (1000); 146 146 … … 174 174 #endif 175 175 176 @@ -62,7 +63,7 @@ 176 @@ -62,7 +63,7 @@ int interrupt_init (void) 177 177 /* use PWM Timer 4 because it has no output */ 178 178 /* prescaler for Timer 4 is 16 */ … … 183 183 { 184 184 /* 185 @@ -241,4 +242,5 @@ 185 @@ -241,4 +242,5 @@ void s3c2410_irq(void) 186 186 #endif /* USE_IRQ */ 187 187 … … 194 194 --- u-boot.orig/cpu/arm920t/s3c24x0/mmc.c 195 195 +++ u-boot/cpu/arm920t/s3c24x0/mmc.c 196 @@ -137,7 +137,7 @@ 196 @@ -137,7 +137,7 @@ static int mmc_block_read(uchar *dst, ul 197 197 dcon |= S3C2410_SDIDCON_RXAFTERCMD|S3C2410_SDIDCON_XFER_RXSTART; 198 198 if (wide) … … 203 203 #endif 204 204 sdi->SDIDCON = dcon; 205 @@ -403,7 +403,7 @@ 205 @@ -403,7 +403,7 @@ int mmc_init(int verbose) 206 206 //sdi->SDIPRE = 0x3e; /* SDCLK = PCLK/2 / (SDIPRE+1) = 396kHz */ 207 207 sdi->SDIPRE = 0x02; /* 2410: SDCLK = PCLK/2 / (SDIPRE+1) = 11MHz */ … … 225 225 #define oNFCMD 0x8 226 226 #define oNFADDR 0xc 227 @@ -147,7 +147,7 @@ 227 @@ -147,7 +147,7 @@ static void s3c2410_hwcontrol(struct mtd 228 228 case NAND_CTL_SETNCE: 229 229 #if defined(CONFIG_S3C2410) … … 234 234 #endif 235 235 DEBUGN("NFCONF=0x%08x\n", NFCONF); 236 @@ -155,7 +155,7 @@ 236 @@ -155,7 +155,7 @@ static void s3c2410_hwcontrol(struct mtd 237 237 case NAND_CTL_CLRNCE: 238 238 #if defined(CONFIG_S3C2410) … … 243 243 #endif 244 244 DEBUGN("NFCONF=0x%08x\n", NFCONF); 245 @@ -2 78,7 +278,7 @@245 @@ -235,7 +235,7 @@ int __board_nand_init(struct nand_chip * 246 246 cfg |= S3C2410_NFCONF_TWRPH1(twrph1 - 1); 247 247 … … 252 252 NFCONF = (tacls<<12)|(twrph0<<8)|(twrph1<<4)|(0<<0); 253 253 NFCONT = (0<<13)|(0<<12)|(0<<10)|(0<<9)|(0<<8)|(1<<6)|(1<<5)|(1<<4)|(1<<1)|(1<<0); 254 @@ - 315,7 +315,7 @@254 @@ -272,7 +272,7 @@ int __board_nand_init(struct nand_chip * 255 255 nand->options = 0; 256 256 #endif … … 274 274 #define NFCONT __REGi(NF_BASE + 0x4) 275 275 #define NFCMD __REGb(NF_BASE + 0x8) 276 @@ -142,7 +142,7 @@ 276 @@ -142,7 +142,7 @@ static int nand_read_page_ll(unsigned ch 277 277 *buf = (NFDATA & 0xff); 278 278 buf++; … … 304 304 #endif 305 305 306 @@ -30 6,4 +307,5 @@306 @@ -305,4 +306,5 @@ struct serial_device s3c24xx_serial2_dev 307 307 #endif /* CONFIG_SERIAL_MULTI */ 308 308 … … 331 331 #endif 332 332 333 @@ -71,7 +71,7 @@ 333 @@ -71,7 +71,7 @@ static ulong get_PLLCLK(int pllreg) 334 334 s = r & 0x3; 335 335 #if defined(CONFIG_S3C2400) || defined(CONFIG_S3C2410) … … 340 340 if (pllreg == MPLL) 341 341 return ( 2 * m * (CONFIG_SYS_CLK_FREQ / (p << s )) ); 342 @@ -95,7 +95,7 @@ 342 @@ -95,7 +95,7 @@ ulong get_HCLK(void) 343 343 344 344 #if defined(CONFIG_S3C2400) || defined(CONFIG_S3C2410) … … 349 349 case 0x0: 350 350 return get_FCLK(); 351 @@ -127,4 +127,5 @@ 351 @@ -127,4 +127,5 @@ ulong get_UCLK(void) 352 352 } 353 353 … … 377 377 #endif 378 378 379 @@ -70,5 +71,6 @@ 379 @@ -70,5 +71,6 @@ int usb_cpu_init_fail (void) 380 380 return 0; 381 381 } … … 411 411 #endif 412 412 #include <status_led.h> 413 @@ -1 63,14 +163,15 @@413 @@ -170,14 +170,15 @@ copyex: 414 414 bne copyex 415 415 #endif … … 429 429 # define INTMSK 0x4A000008 /* Interupt-Controller base addresses */ 430 430 # define INTSUBMSK 0x4A00001C 431 @@ - 193,6 +194,17 @@431 @@ -200,6 +201,17 @@ copyex: 432 432 #endif 433 433 # define CLKDIVN_val 7 /* FCLK:HCLK:PCLK = 1:3:6 */ … … 447 447 448 448 ldr r0, =pWTCON 449 @@ -2 05,13 +217,13 @@449 @@ -212,13 +224,13 @@ copyex: 450 450 mov r1, #0xffffffff 451 451 ldr r0, =INTMSK … … 463 463 ldr r0, =CAMDIVN 464 464 mov r1, #0 465 @@ -2 77,7 +289,7 @@465 @@ -284,7 +296,7 @@ copyex: 466 466 str r1, [r0, #0x28] 467 467 #endif … … 472 472 #ifndef CONFIG_SKIP_LOWLEVEL_INIT 473 473 #ifndef CONFIG_LL_INIT_NAND_ONLY 474 @@ -2 85,7 +297,7 @@474 @@ -292,7 +304,7 @@ copyex: 475 475 #endif 476 476 … … 481 481 #ifndef CONFIG_SKIP_RELOCATE_UBOOT 482 482 adr r0, _start /* r0 <- current position of code */ 483 @@ -337,7 +349,7 @@ 483 @@ -357,7 +369,7 @@ nand_load: 484 ldr r2, [r1, #oNFCONF] 485 orr r2, r2, #0x800 @ disable chip 486 str r2, [r1, #oNFCONF] 487 -#elif defined(CONFIG_S3C2440) 488 +#elif defined(CONFIG_S3C2440) || defined(CONFIG_S3C2442) 489 mov r1, #S3C2440_NAND_BASE 490 ldr r2, =0xfff0 @ initial value tacls=3,rph0=7,rph1=7 491 ldr r3, [r1, #oNFCONF] 492 @@ -367,7 +379,7 @@ nand_load: 493 ldr r3, [r1, #oNFCONT] 494 orr r3, r3, #1 @ enable nand controller 495 str r3, [r1, #oNFCONT] 496 -#endif /* CONFIG_S3C2440 */ 497 +#endif /* CONFIG_S3C2440 || CONFIG_S3C2442 */ 498 499 ldr r0, _TEXT_BASE /* upper 128 KiB: relocated uboot */ 500 sub r0, r0, #CFG_MALLOC_LEN /* malloc area */ 501 @@ -430,7 +442,8 @@ done_nand_read: 502 #endif /* CONFIG_S3C2410_NAND_BOOT */ 503 done_relocate: 504 505 -#if defined(CONFIG_USE_IRQ) && (defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440)) 506 +#if defined(CONFIG_USE_IRQ) && (defined(CONFIG_S3C2410) || \ 507 + defined(CONFIG_S3C2440) || defined(CONFIG_S3C2442)) 508 /* In the case of the S3C2410, if we've somehow magically (JTAG, ...) 509 ended up in RAM, then that ram is mapped to 0x30000000 and not 0. 510 So we need to copy the interrupt vectors, etc. */ 511 @@ -547,7 +560,7 @@ may_resume: 484 512 #if !defined(CONFIG_SKIP_LOWLEVEL_INIT) && defined(CONFIG_LL_INIT_NAND_ONLY) 485 513 bl cpu_init_crit … … 490 518 ldr r1, =0xfffff 491 519 1: subs r1, r1, #1 492 @@ - 348,7 +360,7 @@520 @@ -558,7 +571,7 @@ may_resume: 493 521 ldr r0, [ r1 ] 494 522 tst r0, #0x02 /* is this resume from power down */ 495 523 ldrne pc, [r1, #4] /* gstatus3 */ 496 -#endif /* CONFIG_S3C2410 || CONFIG_S3C244 0*/497 +#endif /* CONFIG_S3C2410 || CONFIG_S3C244 0 || CONFIG_S3C2442*/524 -#endif /* CONFIG_S3C2410 || CONFIG_S3C244 */ 525 +#endif /* CONFIG_S3C2410 || CONFIG_S3C244 || CONFIG_S3C2442 */ 498 526 #endif /* CONFIG_SKIP_LOWLEVEL_INIT */ 499 527 500 /* mov r10, lr */ 501 @@ -373,7 +385,7 @@ 502 ldr r2, [r1, #oNFCONF] 503 orr r2, r2, #0x800 @ disable chip 504 str r2, [r1, #oNFCONF] 505 -#elif defined(CONFIG_S3C2440) 506 +#elif defined(CONFIG_S3C2440) || defined(CONFIG_S3C2442) 507 mov r1, #S3C2440_NAND_BASE 508 ldr r2, =0xfff0 @ initial value tacls=3,rph0=7,rph1=7 509 ldr r3, [r1, #oNFCONF] 510 @@ -452,7 +464,8 @@ 511 #endif /* CONFIG_S3C2410_NAND_BOOT */ 512 done_relocate: 513 514 -#if defined(CONFIG_USE_IRQ) && (defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440)) 515 +#if defined(CONFIG_USE_IRQ) && (defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440) || \ 516 + defined(CONFIG_S3C2442)) 517 /* In the case of the S3C2410, if we've somehow magically (JTAG, ...) 518 ended up in RAM, then that ram is mapped to 0x30000000 and not 0. 519 So we need to copy the interrupt vectors, etc. */ 520 Index: u-boot/drivers/usbdcore_s3c2410.c 528 mov pc, r10 529 Index: u-boot/drivers/usb/usbdcore_s3c2410.c 521 530 =================================================================== 522 531 --- u-boot.orig/drivers/usb/usbdcore_s3c2410.c … … 532 541 #include <common.h> 533 542 534 Index: u-boot/drivers/ usbtty.h543 Index: u-boot/drivers/serial/usbtty.h 535 544 =================================================================== 536 545 --- u-boot.orig/drivers/serial/usbtty.h … … 550 559 --- u-boot.orig/include/common.h 551 560 +++ u-boot/include/common.h 552 @@ -4 79,7 +479,9 @@561 @@ -481,7 +481,9 @@ int prt_mpc8220_clks (void); 553 562 ulong get_OPB_freq (void); 554 563 ulong get_PCI_freq (void); … … 565 574 --- u-boot.orig/include/s3c24x0.h 566 575 +++ u-boot/include/s3c24x0.h 567 @@ -82,7 +82,8 @@ 576 @@ -82,7 +82,8 @@ typedef struct { 568 577 S3C24X0_REG32 PRIORITY; 569 578 S3C24X0_REG32 INTPND; … … 575 584 S3C24X0_REG32 INTSUBMSK; 576 585 #endif 577 @@ -92,11 +93,13 @@ 586 @@ -92,11 +93,13 @@ typedef struct { 578 587 /* DMAS (see manual chapter 8) */ 579 588 typedef struct { … … 591 600 #endif 592 601 S3C24X0_REG32 DCON; 593 @@ -107,7 +110,8 @@ 602 @@ -107,7 +110,8 @@ typedef struct { 594 603 #ifdef CONFIG_S3C2400 595 604 S3C24X0_REG32 res[1]; … … 601 610 #endif 602 611 } /*__attribute__((__packed__))*/ S3C24X0_DMA; 603 @@ -126,7 +130,7 @@ 612 @@ -126,7 +130,7 @@ typedef struct { 604 613 S3C24X0_REG32 CLKCON; 605 614 S3C24X0_REG32 CLKSLOW; … … 610 619 #endif 611 620 } /*__attribute__((__packed__))*/ S3C24X0_CLOCK_POWER; 612 @@ -148,7 +152,8 @@ 621 @@ -148,7 +152,8 @@ typedef struct { 613 622 S3C24X0_REG32 res[8]; 614 623 S3C24X0_REG32 DITHMODE; … … 620 629 S3C24X0_REG32 LCDSRCPND; 621 630 S3C24X0_REG32 LCDINTMSK; 622 @@ -160,7 +165,7 @@ 631 @@ -160,7 +165,7 @@ typedef struct { 623 632 /* NAND FLASH (see S3C2410 manual chapter 6) */ 624 633 typedef struct { … … 629 638 #endif 630 639 S3C24X0_REG32 NFCMD; 631 @@ -466,7 +471,7 @@ 640 @@ -466,7 +471,7 @@ typedef struct { 632 641 S3C24X0_REG32 GSTATUS3; 633 642 S3C24X0_REG32 GSTATUS4; … … 638 647 S3C24X0_REG32 GPADAT; 639 648 S3C24X0_REG32 res1[2]; 640 @@ -714,7 +719,7 @@ 649 @@ -714,7 +719,7 @@ typedef struct { 641 650 #if defined(CONFIG_S3C2410) 642 651 S3C24X0_REG32 SDIDAT; … … 664 673 --- u-boot.orig/common/serial.c 665 674 +++ u-boot/common/serial.c 666 @@ - 59,7 +59,8 @@675 @@ -60,7 +60,8 @@ struct serial_device *__default_serial_c 667 676 #else 668 677 return &serial0_device; … … 674 683 return &s3c24xx_serial0_device; 675 684 #elif defined(CONFIG_SERIAL2) 676 @@ -1 29,7 +130,8 @@685 @@ -133,7 +134,8 @@ void serial_initialize (void) 677 686 #if defined (CONFIG_STUART) 678 687 serial_register(&serial_stuart_device); … … 688 697 --- u-boot.orig/include/serial.h 689 698 +++ u-boot/include/serial.h 690 @@ -3 5,7 +35,8 @@699 @@ -36,7 +36,8 @@ extern struct serial_device eserial4_dev 691 700 692 701 #endif -
trunk/src/target/u-boot/patches/uboot-s3c2443.patch
r3564 r4108 12 12 #include <status_led.h> 13 13 14 @@ -1 64,7 +166,7 @@14 @@ -171,7 +173,7 @@ copyex: 15 15 #endif 16 16 … … 21 21 22 22 # if defined(CONFIG_S3C2400) 23 @@ -2 05,6 +207,11 @@23 @@ -212,6 +214,11 @@ copyex: 24 24 # endif 25 25 # define CLKDIVN_val 7 /* FCLK:HCLK:PCLK = 1:3:6 */ … … 33 33 34 34 ldr r0, =pWTCON 35 @@ -2 17,7 +224,8 @@35 @@ -224,7 +231,8 @@ copyex: 36 36 mov r1, #0xffffffff 37 37 ldr r0, =INTMSK … … 43 43 ldr r0, =INTSUBMSK 44 44 str r1, [r0] 45 @@ -2 36,6 +244,43 @@45 @@ -243,6 +251,43 @@ copyex: 46 46 mcr p15, 0, r1, c1, c0, 0 47 47 … … 87 87 #define UPLLCON 0x4c000008 88 88 89 @@ -2 63,6 +308,7 @@89 @@ -270,6 +315,7 @@ copyex: 90 90 ldr r0, =CLKDIVN 91 91 mov r1, #CLKDIVN_val … … 95 95 #if 1 96 96 /* enable uart */ 97 @@ -2 89,7 +335,8 @@97 @@ -296,7 +342,8 @@ copyex: 98 98 str r1, [r0, #0x28] 99 99 #endif … … 105 105 #ifndef CONFIG_SKIP_LOWLEVEL_INIT 106 106 #ifndef CONFIG_LL_INIT_NAND_ONLY 107 @@ - 297,7 +344,8 @@107 @@ -304,7 +351,8 @@ copyex: 108 108 #endif 109 109 … … 137 137 138 138 int timer_load_val = 0; 139 @@ -187,6 +189,7 @@ 139 @@ -187,6 +189,7 @@ ulong get_tbclk (void) 140 140 #elif defined(CONFIG_SBC2410X) || \ 141 141 defined(CONFIG_SMDK2410) || \
Note: See TracChangeset
for help on using the changeset viewer.
