Esempio n. 1
0
static void __init ek_add_device_buttons(void)
{
	at91_set_gpio_input(AT91_PIN_PC5, 1);
	at91_set_deglitch(AT91_PIN_PC5, 1);
	export_env_ull("dfu_button", AT91_PIN_PC5);
	at91_set_gpio_input(AT91_PIN_PC4, 1);
	at91_set_deglitch(AT91_PIN_PC4, 1);
	export_env_ull("right_click", AT91_PIN_PC4);
}
Esempio n. 2
0
static void __init ek_add_device_buttons(void)
{
	at91_set_gpio_input(AT91_PIN_PA30, 1);	/* btn3 */
	at91_set_deglitch(AT91_PIN_PA30, 1);
	export_env_ull("dfu_button", AT91_PIN_PA30);
	at91_set_gpio_input(AT91_PIN_PA31, 1);	/* btn4 */
	at91_set_deglitch(AT91_PIN_PA31, 1);
	export_env_ull("btn4", AT91_PIN_PA31);
}
Esempio n. 3
0
static void __init ek_add_device_buttons(void)
{
    at91_set_gpio_input(AT91_PIN_PA27, 1);
    at91_set_deglitch(AT91_PIN_PA27, 1);
    export_env_ull("dfu_button", AT91_PIN_PA27);
    ek_add_device_keyboard_buttons();
}
Esempio n. 4
0
static void __init ek_add_device_button(void)
{
	at91_set_GPIO_periph(AT91_PIN_PB10, 1);	/* user push button, pull up enabled */
	at91_set_deglitch(AT91_PIN_PB10, 1);

	export_env_ull("dfu_button", AT91_PIN_PB10);
}
Esempio n. 5
0
static int at91sam9261ek_devices_init(void)
{
    u32 barebox_part_start;
    u32 barebox_part_size;

    ek_add_device_nand();
    ek_add_device_dm9000();
    ek_add_device_udc();
    ek_add_device_buttons();
    ek_device_add_leds();
    ek_add_device_lcdc();
    ek_add_device_spi();

    if (IS_ENABLED(CONFIG_AT91_LOAD_BAREBOX_SRAM)) {
        barebox_part_start = 0;
        barebox_part_size = SZ_256K + SZ_128K;
        export_env_ull("borebox_first_stage", 1);
    } else {
        devfs_add_partition("nand0", 0x00000, SZ_128K, DEVFS_PARTITION_FIXED, "at91bootstrap_raw");
        barebox_part_start = SZ_128K;
        barebox_part_size = SZ_256K;
    }
    devfs_add_partition("nand0", barebox_part_start, barebox_part_size,
                        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");

    if (machine_is_at91sam9g10ek())
        armlinux_set_architecture(MACH_TYPE_AT91SAM9G10EK);
    else
        armlinux_set_architecture(MACH_TYPE_AT91SAM9261EK);

    return 0;
}