Esempio n. 1
0
static void __init ek_board_init(void)
{
	/* Serial */
	at91_add_device_serial();
	/* USB Host */
	at91_add_device_usbh(&ek_usbh_data);
	/* USB Device */
	at91_add_device_udc(&ek_udc_data);
	/* I2C */
	at91_add_device_i2c();
	/* NAND */
	at91_add_device_nand(&ek_nand_data);
	/* DM9000 ethernet */
	ek_add_device_dm9000();

	/* spi0 and mmc/sd share the same PIO pins */
#if defined(CONFIG_SPI_ATMEL) || defined(CONFIG_SPI_ATMEL_MODULE)
	/* SPI */
	at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices));
	/* Touchscreen */
	ek_add_device_ts();
#else
	/* MMC */
	at91_add_device_mmc(0, &ek_mmc_data);
#endif
	/* LCD Controller */
	at91_add_device_lcdc(&ek_lcdc_data);
}
static void __init ek_board_init(void)
{
	/* Serial */
	at91_add_device_serial();
	/* USB Host */
	at91_add_device_usbh(&ek_usbh_data);
	/* USB Device */
	at91_add_device_udc(&ek_udc_data);
	/* I2C */
	at91_add_device_i2c(NULL, 0);
	/* NAND */
	ek_add_device_nand();
	/* DM9000 ethernet */
	ek_add_device_dm9000();

	/* spi0 and mmc/sd share the same PIO pins */
#if defined(CONFIG_SPI_ATMEL) || defined(CONFIG_SPI_ATMEL_MODULE)
	/* SPI */
	at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices));
	/* Touchscreen */
	ek_add_device_ts();
	/* SSC (to AT73C213) */
	at73c213_set_clk(&at73c213_data);
	at91_add_device_ssc(AT91SAM9261_ID_SSC1, ATMEL_SSC_TX);
#else
	/* MMC */
	at91_add_device_mmc(0, &ek_mmc_data);
#endif
	/* LCD Controller */
	at91_add_device_lcdc(&ek_lcdc_data);
	/* Push Buttons */
	ek_add_device_buttons();
	/* LEDs */
	at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
}
Esempio n. 3
0
static int at91sam9261ek_devices_init(void)
{

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

	devfs_add_partition("nand0", 0x00000, SZ_128K, DEVFS_PARTITION_FIXED, "at91bootstrap_raw");
	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");

	armlinux_set_bootparams((void *)(AT91_CHIPSELECT_1 + 0x100));
	if (machine_is_at91sam9g10ek())
		armlinux_set_architecture(MACH_TYPE_AT91SAM9G10EK);
	else
		armlinux_set_architecture(MACH_TYPE_AT91SAM9261EK);

	return 0;
}
Esempio n. 4
0
static void __init ek_board_init(void)
{
	
	at91_add_device_serial();
	
	at91_add_device_usbh(&ek_usbh_data);
	
	at91_add_device_udc(&ek_udc_data);
	
	at91_add_device_i2c(NULL, 0);
	
	ek_add_device_nand();
	
	ek_add_device_dm9000();

	
#if defined(CONFIG_SPI_ATMEL) || defined(CONFIG_SPI_ATMEL_MODULE)
	
	at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices));
	
	ek_add_device_ts();
	
	at73c213_set_clk(&at73c213_data);
	at91_add_device_ssc(AT91SAM9261_ID_SSC1, ATMEL_SSC_TX);
#else
	
	at91_add_device_mmc(0, &ek_mmc_data);
#endif
	
	at91_add_device_lcdc(&ek_lcdc_data);
	
	ek_add_device_buttons();
	
	at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
}
/*
static char tft_type = 's';

static int __init ek_tft_setup(char *str)
{
    tft_type = str[0];
    return 1;
}

__setup("tft=", ek_tft_setup);
*/
static void __init ek_board_init(void)
{/*
	int default_display = 0;
	switch (tft_type) {
    case 's': // small or production 
        default_display = 0;
        break;
    case 'm': // middle 
        default_display = 1;
        break;
    case 'b': // big 
    default:
        default_display = 2;
        break;
    }
    ek_fb_set_platdata(default_display);*/
	/* Serial */
	at91_add_device_serial();
	/* USB HS Host */
	at91_add_device_usbh_ohci(&ek_usbh_hs_data);
	at91_add_device_usbh_ehci(&ek_usbh_hs_data);
	/* USB HS Device */
	at91_add_device_usba(&ek_usba_udc_data);	
	/* MMC */
	#if 0
	at91_add_device_mci(0, &mci0_data);
	at91_add_device_mci(1, &mci1_data);
	#endif
	/* Ethernet */
	at91_add_device_eth(&ek_macb_data);
	#if 1
	/* DM9000 ethernet */
	ek_add_device_dm9000();
	#endif
	/* NAND */
	ek_add_device_nand();
	/* SPI */
	at91_add_device_spi(ek_spi0_devices, ARRAY_SIZE(ek_spi0_devices));
	/* I2C */
	at91_add_device_i2c(0, ek_i2c_devices, ARRAY_SIZE(ek_i2c_devices));
	/* LCD Controller */
	//at91_add_device_lcdc(&ek_lcdc_data);
	/* Touch Screen */
	//at91_add_device_tsadcc(&ek_tsadcc_data);
	/* Push Buttons */
	ek_add_device_buttons();
	/* AC97 */
	//at91_add_device_ac97(&ek_ac97_data);
	/* LEDs */
	at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
	at91_pwm_leds(ek_pwm_led, ARRAY_SIZE(ek_pwm_led));
	#if 0
	/* CF */
	at91_add_device_cf(&at91sam9g45ek_cf_data);
	#endif
}
Esempio n. 6
0
static void __init ek_board_init(void)
{
	/* Serial */
	/* DBGU on ttyS0. (Rx & Tx only) */
	at91_register_uart(0, 0, 0);
	at91_add_device_serial();

	if (cpu_is_at91sam9g10())
		ek_lcdc_data.lcd_wiring_mode = ATMEL_LCDC_WIRING_RGB;

	/* USB Host */
	at91_add_device_usbh(&ek_usbh_data);
	/* USB Device */
	at91_add_device_udc(&ek_udc_data);
	/* I2C */
	at91_add_device_i2c(NULL, 0);
	/* NAND */
	ek_add_device_nand();
	/* DM9000 ethernet */
	ek_add_device_dm9000();

	/* spi0 and mmc/sd share the same PIO pins */
#if defined(CONFIG_SPI_ATMEL) || defined(CONFIG_SPI_ATMEL_MODULE)
	/* SPI */
	at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices));
	/* Touchscreen */
	ek_add_device_ts();
	/* SSC (to AT73C213) */
	at73c213_set_clk(&at73c213_data);
	at91_add_device_ssc(AT91SAM9261_ID_SSC1, ATMEL_SSC_TX);
#else
	/* MMC */
	at91_add_device_mci(0, &mci0_data);
#endif
	/* LCD Controller */
	at91_add_device_lcdc(&ek_lcdc_data);
	/* Push Buttons */
	ek_add_device_buttons();
	/* LEDs */
	at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
}
Esempio n. 7
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;
}