From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Chou Date: Sun, 25 Apr 2010 06:59:21 +0800 Subject: [U-Boot] [PATCH v2] misc: add gpio based status led driver In-Reply-To: <20100424223245.29B4BEDD5FB@gemini.denx.de> References: <1269665654-2609-1-git-send-email-thomas@wytron.com.tw> <1271810712-16238-1-git-send-email-thomas@wytron.com.tw> <20100424192355.04FCBCCF03F@gemini.denx.de> <4BD36BAE.2060903@wytron.com.tw> <20100424223245.29B4BEDD5FB@gemini.denx.de> Message-ID: <4BD377C9.6010809@wytron.com.tw> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 04/25/2010 06:32 AM, Wolfgang Denk wrote: > > I mean, which board in U-Boot uses this code? I didn't find any. > > The convention is not to add unused code. If there are no real users > for this, the patch should be delayed until a board gets added that > actually uses it. > > Hi Wolfgang, These nios2 boards are now supported with the nios2-generic board approach, like that of microblaze-generic, instead of adding every nios2 board to u-boot mainline. The nios2-generic board patch was applied to Scott's next branch. The gpio led can be enabled with the following added to the board config file. /* * STATUS LED */ #define CONFIG_STATUS_LED /* Enable status driver */ #define CONFIG_GPIO_LED /* Enable gpio led driver */ #define STATUS_LED_BIT 2 /* Bit-2 on GPIO */ #define STATUS_LED_STATE 1 /* Blinking */ #define STATUS_LED_PERIOD (500 / CONFIG_SYS_NIOS_TMRMS) /* 500 msec */ Cheers, Thomas