static void tx51_leds_init(void) { int i; for (i = 0 ; i < ARRAY_SIZE(tx51_leds) ; i++) led_gpio_register(&tx51_leds[i]); }
static int scb9328_devices_init(void) { int i; imx_gpio_mode(PA23_PF_CS5); imx_gpio_mode(GPIO_PORTB | GPIO_GPIO | GPIO_OUT | 21); imx_gpio_mode(GPIO_PORTB | GPIO_GPIO | GPIO_OUT | 22); imx_gpio_mode(GPIO_PORTB | GPIO_GPIO | GPIO_OUT | 23); imx_gpio_mode(GPIO_PORTB | GPIO_GPIO | GPIO_OUT | 24); for (i = 0; i < ARRAY_SIZE(leds); i++) led_gpio_register(&leds[i]); /* CS3 becomes CS3 by clearing reset default bit 1 in FMCR */ writel(0x1, MX1_SCM_BASE_ADDR + MX1_FMCR); imx1_setup_eimcs(0, 0x000F2000, 0x11110d01); imx1_setup_eimcs(1, 0x000F0a00, 0x11110601); imx1_setup_eimcs(3, 0x000FFFFF, 0x00000303); imx1_setup_eimcs(4, 0x000F0a00, 0x11110301); imx1_setup_eimcs(5, 0x00008400, 0x00000D03); add_cfi_flash_device(DEVICE_ID_DYNAMIC, 0x10000000, 16 * 1024 * 1024, 0); add_dm9000_device(DEVICE_ID_DYNAMIC, 0x16000000, 0x16000004, IORESOURCE_MEM_16BIT, &dm9000_data); devfs_add_partition("nor0", 0x00000, 0x40000, DEVFS_PARTITION_FIXED, "self0"); devfs_add_partition("nor0", 0x40000, 0x20000, DEVFS_PARTITION_FIXED, "env0"); protect_file("/dev/env0", 1); armlinux_set_bootparams((void *)0x08000100); armlinux_set_architecture(MACH_TYPE_SCB9328); return 0; }
static void mini210s_led_init(void){ int i; for (i = 0; i < ARRAY_SIZE(leds); i++) { leds[i].active_low = 1; gpio_direction_output(leds[i].gpio, leds[i].active_low); led_gpio_register(&leds[i]); } }
static void __init ek_add_led(void) { if (machine_is_usb_a9263()) led.active_low = 1; at91_set_gpio_output(led.gpio, led.active_low); led_gpio_register(&led); }
static int pcm043_devices_init(void) { uint32_t reg; char *envstr; unsigned long bbu_nand_flags = 0; /* CS0: Nor Flash */ imx35_setup_weimcs(5, 0x22C0CF00, 0x75000D01, 0x00000900); led_gpio_register(&led0); reg = readl(MX35_CCM_BASE_ADDR + MX35_CCM_RCSR); /* some fuses provide us vital information about connected hardware */ if (reg & 0x20000000) nand_info.width = 2; /* 16 bit */ else nand_info.width = 1; /* 8 bit */ imx35_add_fec(&fec_info); /* * This platform supports NOR and NAND */ imx35_add_nand(&nand_info); /* * Up to 32MiB NOR type flash, connected to * CS line 0, data width is 16 bit */ add_cfi_flash_device(DEVICE_ID_DYNAMIC, MX35_CS0_BASE_ADDR, 32 * 1024 * 1024, 0); switch (bootsource_get()) { case BOOTSOURCE_NAND: devfs_add_partition("nand0", 0x00000, SZ_512K, DEVFS_PARTITION_FIXED, "self_raw"); dev_add_bb_dev("self_raw", "self0"); devfs_add_partition("nand0", SZ_512K, SZ_256K, DEVFS_PARTITION_FIXED, "env_raw"); dev_add_bb_dev("env_raw", "env0"); envstr = "NAND"; bbu_nand_flags = BBU_HANDLER_FLAG_DEFAULT; break; case BOOTSOURCE_NOR: default: devfs_add_partition("nor0", 0x00000, SZ_512K, DEVFS_PARTITION_FIXED, "self0"); /* ourself */ devfs_add_partition("nor0", SZ_512K, SZ_128K, DEVFS_PARTITION_FIXED, "env0"); /* environment */ protect_file("/dev/env0", 1); envstr = "NOR"; break; } pr_info("using environment from %s flash\n", envstr); imx35_add_fb(&ipu_fb_data); armlinux_set_architecture(MACH_TYPE_PCM043); imx_bbu_external_nand_register_handler("nand", "/dev/nand0.barebox", bbu_nand_flags); return 0; }
static void __init ek_add_led(void) { int i; for (i = 0; i < ARRAY_SIZE(leds); i++) { at91_set_gpio_output(leds[i].gpio, leds[i].active_low); led_gpio_register(&leds[i]); } led_set_trigger(LED_TRIGGER_HEARTBEAT, &leds[0].led); }
static void ek_device_add_leds(void) { int i; for (i = 0; i < ARRAY_SIZE(ek_leds); i++) { at91_set_gpio_output(ek_leds[i].gpio, ek_leds[i].active_low); led_gpio_register(&ek_leds[i]); } led_set_trigger(LED_TRIGGER_HEARTBEAT, &ek_leds[1].led); }
static void usb_a9260_device_dab_mmx(void) { int i; usb_a9260_keyboard_device_dab_mmx(); for (i = 0; i < ARRAY_SIZE(dab_mmx_leds); i++) { dab_mmx_leds[i].active_low = 1; at91_set_gpio_output(dab_mmx_leds[i].gpio, dab_mmx_leds[i].active_low); led_gpio_register(&dab_mmx_leds[i]); } }
static int eukrea_cpuimx25_devices_init(void) { mxc_iomux_v3_setup_multiple_pads(eukrea_cpuimx25_pads, ARRAY_SIZE(eukrea_cpuimx25_pads)); led_gpio_register(&led0); imx25_iim_register_fec_ethaddr(); imx25_add_fec(&fec_info); nand_info.width = 1; imx25_add_nand(&nand_info); devfs_add_partition("nand0", 0x00000, 0x40000, DEVFS_PARTITION_FIXED, "self_raw"); dev_add_bb_dev("self_raw", "self0"); devfs_add_partition("nand0", 0x40000, 0x20000, DEVFS_PARTITION_FIXED, "env_raw"); dev_add_bb_dev("env_raw", "env0"); /* enable LCD */ gpio_direction_output(26, 1); gpio_set_value(26, 1); /* LED : default OFF */ gpio_direction_output(2 * 32 + 19, 1); /* Switch : input */ gpio_direction_input(2 * 32 + 18); imx25_add_fb(&eukrea_cpuimx25_fb_data); imx25_add_i2c0(NULL); imx25_add_mmc0(NULL); #ifdef CONFIG_USB imx25_usb_init(); add_generic_usb_ehci_device(DEVICE_ID_DYNAMIC, MX25_USB_OTG_BASE_ADDR + 0x400, NULL); #endif #ifdef CONFIG_USB_GADGET /* Workaround ENGcm09152 */ writel(readl(MX25_USB_OTG_BASE_ADDR + 0x608) | (1 << 23), MX25_USB_OTG_BASE_ADDR + 0x608); add_generic_device("fsl-udc", DEVICE_ID_DYNAMIC, NULL, MX25_USB_OTG_BASE_ADDR, 0x200, IORESOURCE_MEM, &usb_pdata); #endif armlinux_set_bootparams((void *)0x80000100); armlinux_set_architecture(MACH_TYPE_EUKREA_CPUIMX25SD); return 0; }
static void __init ek_add_led(void) { int i; #ifdef CONFIG_AT91_HAVE_2MMC leds[0].gpio = AT91_PIN_PB8; leds[1].gpio = AT91_PIN_PB9; #endif for (i = 0; i < ARRAY_SIZE(leds); i++) { at91_set_gpio_output(leds[i].gpio, leds[i].active_low); led_gpio_register(&leds[i]); } led_set_trigger(LED_TRIGGER_HEARTBEAT, &leds[1].led); }
void rpi_add_led(void) { int i; struct gpio_led *l; for (i = 0; i < ARRAY_SIZE(rpi_leds); i++) { l = &rpi_leds[i]; if (gpio_is_valid(l->gpio)) led_gpio_register(l); } l = &rpi_leds[0]; if (gpio_is_valid(l->gpio)) led_set_trigger(LED_TRIGGER_HEARTBEAT, &l->led); }
static int imx23_olinuxino_devices_init(void) { armlinux_set_architecture(MACH_TYPE_IMX233_OLINUXINO); defaultenv_append_directory(defaultenv_imx233_olinuxino); led_gpio_register(&led1); led_set_trigger(LED_TRIGGER_HEARTBEAT, &led1.led); add_generic_device("mxs_mci", DEVICE_ID_DYNAMIC, NULL, IMX_SSP1_BASE, 0x8000, IORESOURCE_MEM, &mci_pdata); olinuxino_init_usb(); default_environment_path_set("/dev/disk0.1"); return 0; }
static int tiny210_devices_init(void) { int i; for (i = 0; i < ARRAY_SIZE(pin_usage); i++) s3c_gpio_mode(pin_usage[i]); for (i = 0; i < ARRAY_SIZE(leds); i++) { leds[i].active_low = 1; gpio_direction_output(leds[i].gpio, leds[i].active_low); led_gpio_register(&leds[i]); } armlinux_set_bootparams((void*)S3C_SDRAM_BASE + 0x100); armlinux_set_architecture(MACH_TYPE_MINI210); return 0; }
static int tiny210_devices_init(void) { int i; for (i = 0; i < ARRAY_SIZE(pin_usage); i++) s3c_gpio_mode(pin_usage[i]); for (i = 0; i < ARRAY_SIZE(leds); i++) { leds[i].active_low = 1; gpio_direction_output(leds[i].gpio, leds[i].active_low); led_gpio_register(&leds[i]); } led_set_trigger(LED_TRIGGER_HEARTBEAT, &leds[0].led); armlinux_set_architecture(MACH_TYPE_MINI210); return 0; }
static int efikamx_late_init(void) { int i; if (!of_machine_is_compatible("genesi,imx51-sb")) return 0; defaultenv_append_directory(defaultenv_efikasb); for (i = 0; i < ARRAY_SIZE(leds); i++) led_gpio_register(&leds[i]); led_set_trigger(LED_TRIGGER_HEARTBEAT, &leds[0].led); writew(0x0, MX51_WDOG_BASE_ADDR + 0x8); imx51_bbu_internal_mmc_register_handler("mmc", "/dev/mmc1", BBU_HANDLER_FLAG_DEFAULT); armlinux_set_architecture(2370); armlinux_set_revision(0x5100 | imx_silicon_revision()); return 0; }
static void panda_led_init(void) { led_gpio_register(&panda_leds[0]); led_set_trigger(LED_TRIGGER_HEARTBEAT, &panda_leds[0].led); }
static void __init ek_add_led(void) { at91_set_gpio_output(led.gpio, led.active_low); led_gpio_register(&led); }