From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 04/17] powerpc/82xx/km: add testpin detection for mgcoge3ne
Date: Mon, 16 Nov 2015 11:58:14 +0100 [thread overview]
Message-ID: <5649B6C6.4020700@denx.de> (raw)
In-Reply-To: <1447426768-23226-5-git-send-email-valentin.longchamp@keymile.com>
Hello Valentin,
Am 13.11.2015 um 15:59 schrieb Valentin Longchamp:
> From: Holger Brunck <holger.brunck@keymile.com>
>
> On mgcoge3ne we also want to start the test application if the testpin
> is asserted. But we don't have a full POST test support yet. So simply
> add a function to read the testpin value.
>
> Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
> ---
>
> board/keymile/common/common.c | 5 ++++-
> board/keymile/common/common.h | 2 ++
> board/keymile/km82xx/km82xx.c | 9 +++++++++
> 3 files changed, 15 insertions(+), 1 deletion(-)
same here ... gpio support would be great.
Reviewed-by: Heiko Schocher <hs@denx.de>
bye,
Heiko
>
> diff --git a/board/keymile/common/common.c b/board/keymile/common/common.c
> index b9aff1a..8de129d 100644
> --- a/board/keymile/common/common.c
> +++ b/board/keymile/common/common.c
> @@ -354,8 +354,11 @@ static int do_checktestboot(cmd_tbl_t *cmdtp, int flag, int argc,
>
> #if defined(CONFIG_POST)
> testpin = post_hotkeys_pressed();
> - s = getenv("test_bank");
> #endif
> +#if defined(CONFIG_MGCOGE3NE)
> + testpin = get_testpin();
> +#endif
> + s = getenv("test_bank");
> /* when test_bank is not set, act as if testpin is not asserted */
> testboot = (testpin != 0) && (s);
> if (verbose) {
> diff --git a/board/keymile/common/common.h b/board/keymile/common/common.h
> index dcfefc4..c74f569 100644
> --- a/board/keymile/common/common.h
> +++ b/board/keymile/common/common.h
> @@ -134,6 +134,8 @@ int wait_for_fpga_config(void);
> int fpga_reset(void);
> int toggle_eeprom_spi_bus(void);
>
> +int get_testpin(void);
> +
> int set_km_env(void);
> int fdt_set_node_and_value(void *blob,
> char *nodename,
> diff --git a/board/keymile/km82xx/km82xx.c b/board/keymile/km82xx/km82xx.c
> index 03cd10c..cc9a7c9 100644
> --- a/board/keymile/km82xx/km82xx.c
> +++ b/board/keymile/km82xx/km82xx.c
> @@ -473,3 +473,12 @@ int ft_board_setup(void *blob, bd_t *bd)
> return 0;
> }
> #endif /* defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT) */
> +
> +#if defined(CONFIG_MGCOGE3NE)
> +int get_testpin(void)
> +{
> + /* Testpin is Port C pin 29 - enable = low */
> + int testpin = !get_pin(0x00000004, 2);
> + return testpin;
> +}
> +#endif
>
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
next prev parent reply other threads:[~2015-11-16 10:58 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-13 14:59 [U-Boot] [PATCH 00/17] km/powerpc: various bugfixes and support for 3 new boards Valentin Longchamp
2015-11-13 14:59 ` [U-Boot] [PATCH 01/17] powerpc/83xx/km: add support for kmvect1 p1a hw version Valentin Longchamp
2015-11-16 10:01 ` Heiko Schocher
2015-11-13 14:59 ` [U-Boot] [PATCH 02/17] powerpc/83xx: add support for kmtepr2 board Valentin Longchamp
2015-11-16 10:01 ` Heiko Schocher
2015-11-16 12:18 ` Holger Brunck
2015-11-13 14:59 ` [U-Boot] [PATCH 03/17] powerpc/82xx: make set/get_pin for km82xx more flexible Valentin Longchamp
2015-11-16 10:06 ` Heiko Schocher
2015-11-13 14:59 ` [U-Boot] [PATCH 04/17] powerpc/82xx/km: add testpin detection for mgcoge3ne Valentin Longchamp
2015-11-16 10:58 ` Heiko Schocher [this message]
2015-11-13 14:59 ` [U-Boot] [PATCH 05/17] km/powerpc: increase space for kernel imange and FDT blob Valentin Longchamp
2015-11-16 10:58 ` Heiko Schocher
2015-11-13 14:59 ` [U-Boot] [PATCH 06/17] km/powerpc: move open firmware defines to km-powerpc.h Valentin Longchamp
2015-11-16 10:59 ` Heiko Schocher
2015-11-13 14:59 ` [U-Boot] [PATCH 07/17] km/powerpc: remove unneeded defines Valentin Longchamp
2015-11-16 11:00 ` Heiko Schocher
2015-11-13 14:59 ` [U-Boot] [PATCH 08/17] km/powerpc82xx: remove unused function Valentin Longchamp
2015-11-16 11:01 ` Heiko Schocher
2015-11-13 14:59 ` [U-Boot] [PATCH 09/17] powerpc/km8321: define CONFIG_SYS_DDRCDR Valentin Longchamp
2015-11-16 11:02 ` Heiko Schocher
2015-11-13 14:59 ` [U-Boot] [PATCH 10/17] powerpc/km8321: set the DDRCDR impedance settings back to half strength Valentin Longchamp
2015-11-16 11:02 ` Heiko Schocher
2015-11-16 12:26 ` Holger Brunck
2015-11-16 13:34 ` Tom Rini
2015-11-16 15:41 ` Valentin Longchamp
2015-11-13 14:59 ` [U-Boot] [PATCH 11/17] powerpc/km8309: define CONFIG_SYS_DDRCDR Valentin Longchamp
2015-11-16 11:03 ` Heiko Schocher
2015-11-13 14:59 ` [U-Boot] [PATCH 12/17] powerpc/km8360: fix the ODT parameters for CS0 Valentin Longchamp
2015-11-16 11:03 ` Heiko Schocher
2015-11-13 14:59 ` [U-Boot] [PATCH 13/17] board/keymile/km82xx: setting dip_switch 3 and 4 will run bootloader Valentin Longchamp
2015-11-16 11:04 ` Heiko Schocher
2015-11-13 14:59 ` [U-Boot] [PATCH 14/17] km83xx: use CONFIG_ENV_ADDR for the newenv env command Valentin Longchamp
2015-11-16 11:05 ` Heiko Schocher
2015-11-13 14:59 ` [U-Boot] [PATCH 15/17] km8309: change the default QE_FW address Valentin Longchamp
2015-11-16 11:05 ` Heiko Schocher
2015-11-13 14:59 ` [U-Boot] [PATCH 16/17] powerpc/83xx: add support for kmtegr1 board Valentin Longchamp
2015-11-16 11:06 ` Heiko Schocher
2015-11-13 14:59 ` [U-Boot] [PATCH 17/17] km/powerpc: fix ft_board_setup prototype for km82xx & km83xx Valentin Longchamp
2015-11-16 11:07 ` Heiko Schocher
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=5649B6C6.4020700@denx.de \
--to=hs@denx.de \
--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