Changeset 12287
- Timestamp:
- 06/12/09 17:23:08 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ar5315_microredboot/microredboot/boot/src/misc_lzma.c
r12281 r12287 186 186 static unsigned int sectorsize = 0x10000; 187 187 static unsigned int linuxaddr = 0xbfc10000; 188 /* 189 * searches for a directory entry named linux* vmlinux* or kernel and returns its flash address (it also initializes entrypoint and load address) 190 */ 188 191 unsigned int getLinux(void) 189 192 { … … 267 270 static int getGPIO(int nr) 268 271 { 269 unsigned int *gpio = (unsigned int *)AR2316_GPIO_DI;272 volatile unsigned int *gpio = (unsigned int *)AR2316_GPIO_DI; 270 273 if ((*gpio & 1 << nr) == (1 << nr)) 271 274 return 1; … … 273 276 } 274 277 278 /* 279 * checks if the reset button is pressed, return 1 if the button is pressed and 0 if not 280 */ 275 281 static int resetTouched(void) 276 282 { 277 /*puts("gpio 5:");278 print_hex(getGPIO(5));279 puts("\r\n");280 puts("gpio 6:");281 print_hex(getGPIO(6));282 puts("\r\n");283 puts("gpio 7:");284 print_hex(getGPIO(7));285 puts("\r\n");286 */287 283 int trigger = getGPIO(RESETBUTTON & 0x0f); 288 284 if (RESETBUTTON & 0xf0) … … 333 329 MACRO_END 334 330 331 /* 332 * 333 */ 335 334 static void delay_us(int us) 336 335 { … … 629 628 break; 630 629 } 631 delay_us(20 );630 delay_us(200000); 632 631 spiflash_sendcmd(STM_OP_WR_ENABLE, 0); 633 632 } while (1); … … 661 660 if (!resetTouched()) // check if reset button is unpressed again 662 661 break; 663 delay_us(1000 );662 delay_us(1000000); 664 663 } 665 664 if (!count) { … … 700 699 regtmp = sysRegRead(AR2316_RESET); 701 700 sysRegWrite(AR2316_RESET, regtmp | mask); 702 delay_us(10 );701 delay_us(10000); 703 702 704 703 regtmp = sysRegRead(AR2316_RESET); 705 704 sysRegWrite(AR2316_RESET, regtmp & ~mask); 706 delay_us(10 );705 delay_us(10000); 707 706 708 707 regtmp = sysRegRead(AR2316_IF_CTL);
Note: See TracChangeset
for help on using the changeset viewer.
