int board_early_init_f(void) { board_init_uart_f(); /* Initialize periph GPIOs */ #ifdef CONFIG_SPI_UART_SWITCH gpio_early_init_uart(); #else gpio_config_uart(); #endif return 0; }
/* * Routine: board_init * Description: Early hardware init. */ int board_init(void) { __maybe_unused int err; /* Do clocks and UART first so that printf() works */ clock_init(); clock_verify(); #ifdef CONFIG_SPI_UART_SWITCH gpio_config_uart(); #endif #ifdef CONFIG_TEGRA_SPI pin_mux_spi(); spi_init(); #endif /* boot param addr */ gd->bd->bi_boot_params = (NV_PA_SDRAM_BASE + 0x100); power_det_init(); #ifdef CONFIG_TEGRA_I2C #ifndef CONFIG_SYS_I2C_INIT_BOARD #error "You must define CONFIG_SYS_I2C_INIT_BOARD to use i2c on Nvidia boards" #endif i2c_init_board(); # ifdef CONFIG_TEGRA_PMU if (pmu_set_nominal()) debug("Failed to select nominal voltages\n"); # ifdef CONFIG_TEGRA_CLOCK_SCALING err = board_emc_init(); if (err) debug("Memory controller init failed: %d\n", err); # endif # endif /* CONFIG_TEGRA_PMU */ #endif /* CONFIG_TEGRA_I2C */ #ifdef CONFIG_USB_EHCI_TEGRA pin_mux_usb(); board_usb_init(gd->fdt_blob); #endif #ifdef CONFIG_TEGRA_LP0 /* save Sdram params to PMC 2, 4, and 24 for WB0 */ warmboot_save_sdram_params(); /* prepare the WB code to LP0 location */ warmboot_prepare_code(TEGRA_LP0_ADDR, TEGRA_LP0_SIZE); #endif return 0; }
/* * Routine: board_init * Description: Early hardware init. */ int board_init(void) { /* Do clocks and UART first so that printf() works */ clock_init(); clock_verify(); #ifdef CONFIG_SPI_UART_SWITCH gpio_config_uart(); #endif #ifdef CONFIG_TEGRA2_SPI spi_init(); #endif /* boot param addr */ gd->bd->bi_boot_params = (NV_PA_SDRAM_BASE + 0x100); return 0; }
void board_init_f(ulong dummy) { board_init_uart_f(); /* Initialize periph GPIOs */ #ifdef CONFIG_SPI_UART_SWITCH gpio_early_init_uart(); #else gpio_config_uart(); #endif /* * We call relocate_code() with relocation target same as the * CONFIG_SYS_SPL_TEXT_BASE. This will result in relocation getting * skipped. Instead, only .bss initialization will happen. That's * all we need */ debug(">>board_init_f()\n"); relocate_code(CONFIG_SPL_STACK, &gdata, CONFIG_SPL_TEXT_BASE); }
/* * Routine: gpio_init * Description: Do individual peripheral GPIO configs */ void gpio_init(void) { gpio_config_uart(); }