Message ID | 1441458242-2754-1-git-send-email-thomas@wytron.com.tw |
---|---|
State | Accepted, archived |
Delegated to: | Thomas Chou |
Headers | show |
On Saturday, September 05, 2015 at 03:04:02 PM, Thomas Chou wrote: > Define STATUS_LED_BOOT. So the boot LED will be initialized > in board_init_r(), and show the boot progress. > > Though the boot LED is set to blinking in board_init_r(), > only the powerpc and nios2 really support blinking. All other > archs just turn the LED on and can not blink. > > After the commit "nios2: Switch to generic timer", with the > removal of call to status_led_tick(), nios2 can not blink LED. > But it doesn't really matter, because U-Boot usually runs a very > short time. It should be enough to turn boot LED on and off > during boot process. > > Signed-off-by: Thomas Chou <thomas@wytron.com.tw> > --- > include/configs/nios2-generic.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/include/configs/nios2-generic.h > b/include/configs/nios2-generic.h index 10f9a34..66ad2f0 100644 > --- a/include/configs/nios2-generic.h > +++ b/include/configs/nios2-generic.h > @@ -58,8 +58,9 @@ > #define LED_PIO_RSTVAL 0xff > > #define STATUS_LED_BIT 0 /* Bit-0 on GPIO */ > -#define STATUS_LED_STATE 1 /* Blinking */ > +#define STATUS_LED_STATE STATUS_LED_ON > #define STATUS_LED_PERIOD (CONFIG_SYS_HZ / 2) /* 500 msec */ > +#define STATUS_LED_BOOT STATUS_LED_BIT > > /* > * BOOTP options Idea: Maybe you can add a __weak hook into the generic timer code to blink the LED ? Best regards, Marek Vasut
Hi Marek, On 09/05/2015 09:11 PM, Marek Vasut wrote: > Idea: Maybe you can add a __weak hook into the generic timer code to > blink the LED ? Thanks for the idea. I will look into it later. Cheers, Thomas Chou
On Sunday, September 06, 2015 at 01:35:25 PM, Thomas Chou wrote: > Hi Marek, > > On 09/05/2015 09:11 PM, Marek Vasut wrote: > > Idea: Maybe you can add a __weak hook into the generic timer code to > > blink the LED ? > > Thanks for the idea. I will look into it later. Sure, thanks :) Best regards, Marek Vasut
On 09/05/2015 09:04 PM, Thomas Chou wrote: > Define STATUS_LED_BOOT. So the boot LED will be initialized > in board_init_r(), and show the boot progress. > > Though the boot LED is set to blinking in board_init_r(), > only the powerpc and nios2 really support blinking. All other > archs just turn the LED on and can not blink. > > After the commit "nios2: Switch to generic timer", with the > removal of call to status_led_tick(), nios2 can not blink LED. > But it doesn't really matter, because U-Boot usually runs a very > short time. It should be enough to turn boot LED on and off > during boot process. > > Signed-off-by: Thomas Chou <thomas@wytron.com.tw> > --- > include/configs/nios2-generic.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Applied to u-boot-nios.
diff --git a/include/configs/nios2-generic.h b/include/configs/nios2-generic.h index 10f9a34..66ad2f0 100644 --- a/include/configs/nios2-generic.h +++ b/include/configs/nios2-generic.h @@ -58,8 +58,9 @@ #define LED_PIO_RSTVAL 0xff #define STATUS_LED_BIT 0 /* Bit-0 on GPIO */ -#define STATUS_LED_STATE 1 /* Blinking */ +#define STATUS_LED_STATE STATUS_LED_ON #define STATUS_LED_PERIOD (CONFIG_SYS_HZ / 2) /* 500 msec */ +#define STATUS_LED_BOOT STATUS_LED_BIT /* * BOOTP options
Define STATUS_LED_BOOT. So the boot LED will be initialized in board_init_r(), and show the boot progress. Though the boot LED is set to blinking in board_init_r(), only the powerpc and nios2 really support blinking. All other archs just turn the LED on and can not blink. After the commit "nios2: Switch to generic timer", with the removal of call to status_led_tick(), nios2 can not blink LED. But it doesn't really matter, because U-Boot usually runs a very short time. It should be enough to turn boot LED on and off during boot process. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> --- include/configs/nios2-generic.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)