From owner-p4-projects@FreeBSD.ORG Fri Jul 13 15:18:33 2012 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4D9491065677; Fri, 13 Jul 2012 15:18:32 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E949F1065673 for ; Fri, 13 Jul 2012 15:18:31 +0000 (UTC) (envelope-from brooks@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id D1ED58FC0A for ; Fri, 13 Jul 2012 15:18:31 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id q6DFIVic012947 for ; Fri, 13 Jul 2012 15:18:31 GMT (envelope-from brooks@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id q6DFIV8i012944 for perforce@freebsd.org; Fri, 13 Jul 2012 15:18:31 GMT (envelope-from brooks@freebsd.org) Date: Fri, 13 Jul 2012 15:18:31 GMT Message-Id: <201207131518.q6DFIV8i012944@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to brooks@freebsd.org using -f From: Brooks Davis To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 214336 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jul 2012 15:18:33 -0000 http://p4web.freebsd.org/@@214336?ac=10 Change 214336 by brooks@brooks_ecr_current on 2012/07/13 15:17:55 Allow a LED command to be specified by a hint so we can start an heart beat LED early. Affected files ... .. //depot/projects/ctsrd/beribsd/src/sys/dev/terasic/de4led/terasic_de4led.c#4 edit Differences ... ==== //depot/projects/ctsrd/beribsd/src/sys/dev/terasic/de4led/terasic_de4led.c#4 (text+ko) ==== @@ -121,6 +121,7 @@ void terasic_de4led_attach(struct terasic_de4led_softc *sc) { + const char *cmd; TERASIC_DE4LED_LOCK_INIT(sc); @@ -143,6 +144,31 @@ sc->tdl_leds[5] = led_create(led_5, sc, "de4led_5"); sc->tdl_leds[6] = led_create(led_6, sc, "de4led_6"); sc->tdl_leds[7] = led_create(led_7, sc, "de4led_7"); + + if (resource_string_value(device_get_name(sc->tdl_dev), + sc->tdl_unit, "de4led_0_cmd", &cmd) == 0) + led_set("de4led_0", cmd); + if (resource_string_value(device_get_name(sc->tdl_dev), + sc->tdl_unit, "de4led_1_cmd", &cmd) == 0) + led_set("de4led_1", cmd); + if (resource_string_value(device_get_name(sc->tdl_dev), + sc->tdl_unit, "de4led_2_cmd", &cmd) == 0) + led_set("de4led_2", cmd); + if (resource_string_value(device_get_name(sc->tdl_dev), + sc->tdl_unit, "de4led_3_cmd", &cmd) == 0) + led_set("de4led_3", cmd); + if (resource_string_value(device_get_name(sc->tdl_dev), + sc->tdl_unit, "de4led_4_cmd", &cmd) == 0) + led_set("de4led_4", cmd); + if (resource_string_value(device_get_name(sc->tdl_dev), + sc->tdl_unit, "de4led_5_cmd", &cmd) == 0) + led_set("de4led_5", cmd); + if (resource_string_value(device_get_name(sc->tdl_dev), + sc->tdl_unit, "de4led_6_cmd", &cmd) == 0) + led_set("de4led_6", cmd); + if (resource_string_value(device_get_name(sc->tdl_dev), + sc->tdl_unit, "de4led_7_cmd", &cmd) == 0) + led_set("de4led_7", cmd); } void