int board_init(void) { /* address of boot parameters */ gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; #ifdef CONFIG_CMD_NAND corvus_nand_hw_init(); #endif #ifdef CONFIG_ATMEL_SPI at91_spi0_hw_init(1 << 4); #endif #ifdef CONFIG_HAS_DATAFLASH at91_spi0_hw_init(1 << 0); #endif #ifdef CONFIG_MACB corvus_macb_hw_init(); #endif #ifdef CONFIG_CMD_USB taurus_usb_hw_init(); #endif #ifdef CONFIG_USB_GADGET_ATMEL_USBA at91_udp_hw_init(); usba_udc_probe(&pdata); #endif return 0; }
void at91_spl_board_init(void) { /* * For on the sam9m10g45ek board, the chip wm9711 stay in the test * mode, so it need do some action to exit mode. */ at91_set_gpio_output(AT91_PIN_PD7, 0); at91_set_gpio_output(AT91_PIN_PD8, 0); at91_set_pio_pullup(AT91_PIO_PORTD, 7, 1); at91_set_pio_pullup(AT91_PIO_PORTD, 8, 1); at91_set_pio_pullup(AT91_PIO_PORTA, 12, 1); at91_set_pio_pullup(AT91_PIO_PORTA, 13, 1); at91_set_pio_pullup(AT91_PIO_PORTA, 15, 1); corvus_nand_hw_init(); /* Configure recovery button PINs */ at91_set_gpio_input(AT91_PIN_PB7, 1); /* check if button is pressed */ if (at91_get_gpio_value(AT91_PIN_PB7) == 0) { u32 boot_device; debug("Recovery button pressed\n"); boot_device = spl_boot_device(); switch (boot_device) { #ifdef CONFIG_SPL_NAND_SUPPORT case BOOT_DEVICE_NAND: nand_init(); spl_nand_erase_one(0, 0); break; #endif } } }
int board_init(void) { /* address of boot parameters */ gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; /* we have to request the gpios again after relocation */ corvus_request_gpio(); #ifdef CONFIG_CMD_NAND corvus_nand_hw_init(); #endif #ifdef CONFIG_ATMEL_SPI at91_spi0_hw_init(1 << 4); #endif #ifdef CONFIG_MACB corvus_macb_hw_init(); #endif #ifdef CONFIG_CMD_USB taurus_usb_hw_init(); #endif #ifdef CONFIG_USB_GADGET_ATMEL_USBA at91_udp_hw_init(); usba_udc_probe(&pdata); #endif return 0; }