From: Przemyslaw Marczak <p.marczak@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v5 5/5] samsung: misc: remove download mode info screen
Date: Tue, 06 May 2014 10:45:07 +0200 [thread overview]
Message-ID: <5368A113.2010507@samsung.com> (raw)
In-Reply-To: <CALrBrZ02Hi=J7u7WNK+HmkiZ+mm39zpwOrkAFw+bfWzf4vc2FA@mail.gmail.com>
Hello Minkyu,
On 05/05/2014 03:27 PM, Minkyu Kang wrote:
> Dear Przemyslaw Marczak,
>
>
> On 30 April 2014 20:28, Przemyslaw Marczak <p.marczak@samsung.com
> <mailto:p.marczak@samsung.com>> wrote:
>
> This change removes LCD menu download mode info screen.
> Now key press timeout is checked in function download_menu()
> and menu options are displayed directly after PWR + VOLUP keys.
>
> Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com
> <mailto:p.marczak@samsung.com>>
> Cc: Minkyu Kang <mk7.kang at samsung.com <mailto:mk7.kang@samsung.com>>
>
> ---
> Changes v4:
> - new commit
>
> Changes v5:
> - none
>
> ---
> board/samsung/common/misc.c | 73
> +++++++++++++++++++--------------------------
> 1 file changed, 31 insertions(+), 42 deletions(-)
>
> diff --git a/board/samsung/common/misc.c b/board/samsung/common/misc.c
> index 2ea275e..03106fd 100644
> --- a/board/samsung/common/misc.c
> +++ b/board/samsung/common/misc.c
> @@ -261,7 +261,7 @@ static void display_download_menu(int mode)
> selection[mode] = "[=>]";
>
> lcd_clear();
> - lcd_printf("\n\t\tDownload Mode Menu\n");
> + lcd_printf("\n\n\t\tDownload Mode Menu\n\n");
>
> for (i = 0; i <= BOOT_MODE_EXIT; i++)
> lcd_printf("\t%s %s - %s\n\n", selection[i],
> @@ -274,10 +274,38 @@ static void download_menu(void)
> int mode = 0;
> int last_mode = 0;
> int run;
> - int key;
> + int key = 0;
> + int timeout = 15; /* sec */
> + int i;
>
> display_download_menu(mode);
>
> + lcd_puts("\n");
> +
> + /* Start count if no key is pressed */
> + while (check_keys())
> + continue;
> +
> + while (timeout--) {
> + lcd_printf("\r\tNormal boot will start in: %2.d
> seconds.",
> + timeout);
> +
> + /* about 1000 ms in for loop */
> + for (i = 0; i < 10; i++) {
> + mdelay(100);
> + key = check_keys();
> + if (key)
> + break;
> + }
> + if (key)
>
>
> maybe, unnecessary if statement.
>
Please take a notice that there are two loops: "while" and "for",
so the second "if (key)" is necessary for break a "while" loop on "user
event".
> + break;
> + }
> +
> + if (!key) {
> + lcd_clear();
> + return;
> + }
> +
> while (1) {
> run = 0;
>
> @@ -315,45 +343,6 @@ static void download_menu(void)
> lcd_clear();
> }
>
> -static void display_mode_info(void)
> -{
> - lcd_position_cursor(4, 4);
> - lcd_printf("%s\n", U_BOOT_VERSION);
> - lcd_puts("\nDownload Mode Menu\n");
> -#ifdef CONFIG_SYS_BOARD
> - lcd_printf("Board name: %s\n", CONFIG_SYS_BOARD);
> -#endif
> - lcd_printf("Press POWER KEY to display MENU options.");
> -}
> -
> -static int boot_menu(void)
> -{
> - int key = 0;
> - int timeout = 10;
> -
> - display_mode_info();
> -
> - while (timeout--) {
> - lcd_printf("\rNormal boot will start in: %d
> seconds.", timeout);
> - mdelay(1000);
> -
> - key = key_pressed(KEY_POWER);
> - if (key)
> - break;
> - }
> -
> - lcd_clear();
> -
> - /* If PWR pressed - show download menu */
> - if (key) {
> - printf("Power pressed - go to download menu\n");
> - download_menu();
> - printf("Download mode exit.\n");
> - }
> -
> - return 0;
> -}
> -
> void check_boot_mode(void)
> {
> int pwr_key;
> @@ -366,7 +355,7 @@ void check_boot_mode(void)
> power_key_pressed(KEY_PWR_INTERRUPT_REG);
>
> if (key_pressed(KEY_VOLUMEUP))
> - boot_menu();
> + download_menu();
> else if (key_pressed(KEY_VOLUMEDOWN))
> mode_leave_menu(BOOT_MODE_THOR);
> }
> --
> 1.9.1
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de <mailto:U-Boot@lists.denx.de>
> http://lists.denx.de/mailman/listinfo/u-boot
>
>
> Thanks,
> Minkyu Kang.
> --
> from. prom.
> www.promsoft.net <http://www.promsoft.net>
Thank you
--
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.com
next prev parent reply other threads:[~2014-05-06 8:45 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-28 14:30 [U-Boot] [PATCH 0/3] samsung: misc: add new lcd menu options Przemyslaw Marczak
2014-02-28 14:30 ` [U-Boot] [PATCH 1/3] samsung: misc: check_keys(), key_pressed() - remove type static Przemyslaw Marczak
2014-03-06 6:51 ` Minkyu Kang
2014-03-21 9:13 ` Przemyslaw Marczak
2014-02-28 14:30 ` [U-Boot] [PATCH 2/3] samsung: misc: add gpt restore option to lcd menu Przemyslaw Marczak
2014-02-28 14:30 ` [U-Boot] [PATCH 3/3] samsung: misc: add env default " Przemyslaw Marczak
2014-02-28 14:36 ` [U-Boot] [PATCH 0/3] samsung: misc: add new lcd menu options Przemyslaw Marczak
2014-04-02 9:41 ` [U-Boot] [PATCH v2 1/4] samsung: misc: allows using environmental macros as args in menu commands Przemyslaw Marczak
2014-04-02 9:41 ` [U-Boot] [PATCH v2 2/4] samsung: misc: add gpt restore option to lcd menu Przemyslaw Marczak
2014-04-02 9:42 ` [U-Boot] [PATCH v2 3/4] samsung: misc: add env default " Przemyslaw Marczak
2014-04-02 9:42 ` [U-Boot] [PATCH v2 4/4] samsung: misc: keys: fix gpio key debouncing by adding 50 ms delay Przemyslaw Marczak
2014-04-02 17:26 ` Gerhard Sittig
2014-04-03 7:03 ` Przemyslaw Marczak
2014-04-03 8:27 ` [U-Boot] [PATCH v3 1/4] samsung: misc: allows using environmental macros as args in menu commands Przemyslaw Marczak
2014-04-03 8:27 ` [U-Boot] [PATCH v3 2/4] samsung: misc: add gpt restore option to lcd menu Przemyslaw Marczak
2014-04-03 8:27 ` [U-Boot] [PATCH v3 3/4] samsung: misc: add env default " Przemyslaw Marczak
2014-04-03 8:27 ` [U-Boot] [PATCH v3 4/4] samsung: misc: keys: fix gpio key bouncing by adding 50 ms delay Przemyslaw Marczak
2014-04-25 10:20 ` [U-Boot] [PATCH v4 1/5] samsung: misc: allows using environmental macros as args in menu commands Przemyslaw Marczak
2014-04-25 10:20 ` [U-Boot] [PATCH v4 2/5] samsung: misc: add gpt restore option to lcd menu Przemyslaw Marczak
2014-04-25 10:20 ` [U-Boot] [PATCH v4 3/5] samsung: misc: add env default " Przemyslaw Marczak
2014-04-25 10:20 ` [U-Boot] [PATCH v4 4/5] samsung: misc: keys: fix gpio key bouncing by adding 50 ms delay Przemyslaw Marczak
2014-04-28 13:44 ` Gerhard Sittig
2014-04-28 14:03 ` Gerhard Sittig
2014-04-30 10:10 ` Przemyslaw Marczak
2014-04-25 10:20 ` [U-Boot] [PATCH v4 5/5] samsung: misc: remove download mode info screen Przemyslaw Marczak
2014-04-30 11:28 ` [U-Boot] [PATCH v5 1/5] samsung: misc: allows using environmental macros as args in menu commands Przemyslaw Marczak
2014-04-30 11:28 ` [U-Boot] [PATCH v5 2/5] samsung: misc: add gpt restore option to lcd menu Przemyslaw Marczak
2014-05-08 2:36 ` Minkyu Kang
2014-04-30 11:28 ` [U-Boot] [PATCH v5 3/5] samsung: misc: add env default " Przemyslaw Marczak
2014-05-08 2:36 ` Minkyu Kang
2014-04-30 11:28 ` [U-Boot] [PATCH v5 4/5] samsung: misc: menu: increase delay in menu main loop Przemyslaw Marczak
2014-05-05 13:35 ` Gerhard Sittig
2014-05-06 8:32 ` Przemyslaw Marczak
2014-05-08 2:36 ` Minkyu Kang
2014-04-30 11:28 ` [U-Boot] [PATCH v5 5/5] samsung: misc: remove download mode info screen Przemyslaw Marczak
2014-05-05 13:27 ` Minkyu Kang
2014-05-06 8:45 ` Przemyslaw Marczak [this message]
2014-05-07 8:07 ` Minkyu Kang
2014-05-08 2:36 ` Minkyu Kang
2014-05-08 2:36 ` [U-Boot] [PATCH v5 1/5] samsung: misc: allows using environmental macros as args in menu commands Minkyu Kang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5368A113.2010507@samsung.com \
--to=p.marczak@samsung.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox