void at91_spl_board_init(void)
{
#ifdef CONFIG_SD_BOOT
	at91_mci_hw_init();
#elif CONFIG_NAND_BOOT
	at91sam9x5ek_nand_hw_init();
#endif
}
Exemple #2
0
void at91_spl_board_init(void)
{
#ifdef CONFIG_SYS_USE_MMC
	at91_mci_hw_init();
#elif CONFIG_SYS_USE_NANDFLASH
	at91sam9x5ek_nand_hw_init();
#endif
}
void at91_spl_board_init(void)
{
#ifdef CONFIG_SYS_USE_MMC
	at91_mci_hw_init();
#elif CONFIG_SYS_USE_NANDFLASH
	at91sam9n12ek_nand_hw_init();
#elif CONFIG_SYS_USE_SPIFLASH
	at91_spi0_hw_init(1 << 4);
#endif
}
Exemple #4
0
/* this is a weak define that we are overriding */
int board_mmc_init(bd_t *bd)
{
	struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;

	/* Enable MCI clock */
	writel(1 << ATMEL_ID_MCI, &pmc->pcer);

	/* Initialize MCI hardware */
	at91_mci_hw_init();

	/* This calls the atmel_mmc_init in gen_atmel_mci.c */
	return atmel_mci_init((void *)ATMEL_BASE_MCI);
}
int board_mmc_init(bd_t *bd)
{
	at91_mci_hw_init();

	return atmel_mci_init((void *)ATMEL_BASE_HSMCI0);
}
Exemple #6
0
void at91_spl_board_init(void)
{
#ifdef CONFIG_SYS_USE_MMC
	at91_mci_hw_init();
#endif
}
Exemple #7
0
static void sama5d3xek_mci_hw_init(void)
{
	at91_mci_hw_init();

	at91_set_pio_output(AT91_PIO_PORTB, 10, 0);	/* MCI0 Power */
}
static void sama5d3_xplained_mci0_hw_init(void)
{
	at91_mci_hw_init();

	at91_set_pio_output(AT91_PIO_PORTE, 2, 0);	/* MCI0 Power */
}
Exemple #9
0
int board_init(void)
{
	const char *rev_str;
#ifdef CONFIG_CMD_NAND
	int ret;
#endif

	at91_periph_clk_enable(ATMEL_ID_PIOA);
	at91_periph_clk_enable(ATMEL_ID_PIOB);
	at91_periph_clk_enable(ATMEL_ID_PIOC);
	at91_periph_clk_enable(ATMEL_ID_PIODE);

	at91sam9g45_slowclock_init();

	/*
	 * Clear the RTC IDR to disable all IRQs. Avoid issues when Linux
	 * boots with spurious IRQs.
	 */
	writel(0xffffffff, AT91_RTC_IDR);

	/* Make sure that the reset signal is attached properly */
	setbits_le32(AT91_ASM_RSTC_MR, AT91_RSTC_KEY | AT91_RSTC_MR_URSTEN);

	gd->bd->bi_arch_number = MACH_TYPE_SNAPPER_9260;

	/* Address of boot parameters */
	gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;

#ifdef CONFIG_CMD_NAND
	ret = gurnard_nand_hw_init();
	if (ret)
		return ret;
#endif
#ifdef CONFIG_ATMEL_SPI
	at91_spi0_hw_init(1 << 4);
#endif

#ifdef CONFIG_MACB
	gurnard_macb_hw_init();
#endif

#ifdef CONFIG_GURNARD_FPGA
	fpga_hw_init();
#endif

#ifdef CONFIG_CMD_USB
	gurnard_usb_init();
#endif

#ifdef CONFIG_CMD_MMC
	at91_set_A_periph(AT91_PIN_PA12, 0);
	at91_set_gpio_output(AT91_PIN_PA8, 1);
	at91_set_gpio_value(AT91_PIN_PA8, 0);
	at91_mci_hw_init();
#endif

#ifdef CONFIG_DM_VIDEO
	at91sam9g45_lcd_hw_init();
	at91_set_A_periph(AT91_PIN_PE6, 1);	/* power up */

	/* Select the second timing index for board rev 2 */
	rev_str = getenv("board_rev");
	if (rev_str && !strncmp(rev_str, "2", 1)) {
		struct udevice *dev;

		uclass_find_first_device(UCLASS_VIDEO, &dev);
		if (dev) {
			struct atmel_lcd_platdata *plat = dev_get_platdata(dev);

			plat->timing_index = 1;
		}
	}
#endif

	return 0;
}