Exemple #1
0
static void __init ek_add_device_udc(void)
{
	if (machine_is_tny_a9260() || machine_is_tny_a9g20())
		ek_udc_data.vbus_pin = AT91_PIN_PC5;

	at91_add_device_udc(&ek_udc_data);
}
Exemple #2
0
static int tny_a9260_devices_init(void)
{
	tny_a9260_add_device_nand();
	ek_add_device_macb();
	ek_add_device_udc();

	armlinux_set_bootparams((void *)(AT91_CHIPSELECT_1 + 0x100));
	tny_a9260_set_board_type();

	if (machine_is_tny_a9260() || machine_is_tny_a9g20()) {
		spi_register_board_info(tny_a9g20_spi_devices,
			ARRAY_SIZE(tny_a9g20_spi_devices));
		at91_add_device_spi(0, &spi_pdata);
	}

	devfs_add_partition("nand0", 0x00000, SZ_128K, DEVFS_PARTITION_FIXED, "at91bootstrap_raw");
	dev_add_bb_dev("at91bootstrap_raw", "at91bootstrap");
	devfs_add_partition("nand0", SZ_128K, SZ_256K, DEVFS_PARTITION_FIXED, "self_raw");
	dev_add_bb_dev("self_raw", "self0");
	devfs_add_partition("nand0", SZ_256K + SZ_128K, SZ_128K, DEVFS_PARTITION_FIXED, "env_raw");
	dev_add_bb_dev("env_raw", "env0");
	devfs_add_partition("nand0", SZ_512K, SZ_128K, DEVFS_PARTITION_FIXED, "env_raw1");
	dev_add_bb_dev("env_raw1", "env1");

	return 0;
}
Exemple #3
0
static void tny_a9260_set_board_type(void)
{
	if (machine_is_tny_a9g20())
		armlinux_set_architecture(MACH_TYPE_TNY_A9G20);
	else if (machine_is_tny_a9263())
		armlinux_set_architecture(MACH_TYPE_TNY_A9263);
	else
		armlinux_set_architecture(MACH_TYPE_TNY_A9260);
}
Exemple #4
0
static void tny_a9260_add_device_nand(void)
{
	/* configure chip-select 3 (NAND) */
	if (machine_is_tny_a9g20())
		sam9_smc_configure(0, 3, &tny_a9g20_nand_smc_config);
	else
		sam9_smc_configure(0, 3, &tny_a9260_nand_smc_config);

	if (machine_is_tny_a9263()) {
		nand_pdata.rdy_pin	= AT91_PIN_PA22;
		nand_pdata.enable_pin	= AT91_PIN_PD15;
	}

	at91_add_device_nand(&nand_pdata);
}
Exemple #5
0
static void __init ek_add_device_spi(void)
{
	if (machine_is_tny_a9263()) {
		spi_register_board_info(tny_a9263_spi_devices,
			ARRAY_SIZE(tny_a9263_spi_devices));
		at91_add_device_spi(0, &tny_a9263_spi0_pdata);

	} else if (machine_is_tny_a9g20() && at91sam9260_is_low_power_sdram()) {
		spi_register_board_info(tny_a9g20_lpw_spi_devices,
			ARRAY_SIZE(tny_a9g20_lpw_spi_devices));
		at91_add_device_spi(1, &tny_a9g20_spi1_pdata);
	} else {
		spi_register_board_info(tny_a9g20_spi_devices,
			ARRAY_SIZE(tny_a9g20_spi_devices));
		at91_add_device_spi(0, &tny_a9g20_spi0_pdata);
	}
}
Exemple #6
0
static int tny_a9260_console_init(void)
{
	if (machine_is_tny_a9g20()) {
		barebox_set_model("Calao TNY-A9G20");
		barebox_set_hostname("tny-a9g20");
	} else if (machine_is_tny_a9263()) {
		barebox_set_model("Calao TNY-A9263");
		barebox_set_hostname("tny-a9263");
	} else {
		barebox_set_model("Calao TNY-A9260");
		barebox_set_hostname("tny-a9260");
	}

	at91_register_uart(0, 0);
	if (IS_ENABLED(CONFIG_CALAO_MOB_TNY_MD2))
		at91_register_uart(2, ATMEL_UART_CTS | ATMEL_UART_RTS);
	return 0;
}