All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Delaunay <patrick.delaunay@st.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 44/48] stm32mp1: ram: add pattern parameter in infinite write test
Date: Tue, 30 Jul 2019 19:16:52 +0200	[thread overview]
Message-ID: <1564507016-16570-45-git-send-email-patrick.delaunay@st.com> (raw)
In-Reply-To: <1564507016-16570-1-git-send-email-patrick.delaunay@st.com>

Add pattern for infinite test_read and test_write, that
allow to change the pattern to test without recompilation;
default pattern is 0xA5A5AA55.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
---

 drivers/ram/stm32mp1/stm32mp1_tests.c | 31 ++++++++++++++++++++-----------
 1 file changed, 20 insertions(+), 11 deletions(-)

diff --git a/drivers/ram/stm32mp1/stm32mp1_tests.c b/drivers/ram/stm32mp1/stm32mp1_tests.c
index f947b5d..581ee48 100644
--- a/drivers/ram/stm32mp1/stm32mp1_tests.c
+++ b/drivers/ram/stm32mp1/stm32mp1_tests.c
@@ -1250,13 +1250,18 @@ static enum test_result test_read(struct stm32mp1_ddrctl *ctl,
 	if (get_addr(string, argc, argv, 0, (u32 *)&addr))
 		return TEST_ERROR;
 
+	if (get_pattern(string, argc, argv, 1, &data, 0xA5A5AA55))
+		return TEST_ERROR;
+
 	if ((u32)addr == ADDR_INVALID) {
-		printf("random ");
+		printf("running random\n");
 		random = true;
+	} else {
+		printf("running at 0x%08x with pattern=0x%08x\n",
+		       (u32)addr, data);
+		writel(data, addr);
 	}
 
-	printf("running at 0x%08x\n", (u32)addr);
-
 	while (1) {
 		for (i = 0; i < size; i++) {
 			if (random)
@@ -1287,7 +1292,7 @@ static enum test_result test_write(struct stm32mp1_ddrctl *ctl,
 				   char *string, int argc, char *argv[])
 {
 	u32 *addr;
-	u32 data = 0xA5A5AA55;
+	u32 data;
 	u32 loop = 0;
 	int i, size = 1024 * 1024;
 	bool random = false;
@@ -1295,13 +1300,17 @@ static enum test_result test_write(struct stm32mp1_ddrctl *ctl,
 	if (get_addr(string, argc, argv, 0, (u32 *)&addr))
 		return TEST_ERROR;
 
+	if (get_pattern(string, argc, argv, 1, &data, 0xA5A5AA55))
+		return TEST_ERROR;
+
 	if ((u32)addr == ADDR_INVALID) {
-		printf("random ");
+		printf("running random\n");
 		random = true;
+	} else {
+		printf("running at 0x%08x with pattern 0x%08x\n",
+		       (u32)addr, data);
 	}
 
-	printf("running@0x%08x\n", (u32)addr);
-
 	while (1) {
 		for (i = 0; i < size; i++) {
 			if (random) {
@@ -1435,10 +1444,10 @@ const struct test_desc test[] = {
 	 3
 	},
 	/* need to the the 2 last one (infinite) : skipped for test all */
-	{test_read, "infinite read", "[addr]",
-	 "basic test : infinite read access", 1},
-	{test_write, "infinite write", "[addr]",
-	 "basic test : infinite write access", 1},
+	{test_read, "infinite read", "[addr] [pattern]",
+	 "basic test : infinite read access (random: addr=0xFFFFFFFF)", 2},
+	{test_write, "infinite write", "[addr] [pattern]",
+	 "basic test : infinite write access (random: addr=0xFFFFFFFF)", 2},
 };
 
 const int test_nb = ARRAY_SIZE(test);
-- 
2.7.4

  parent reply	other threads:[~2019-07-30 17:16 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-30 17:16 [U-Boot] [PATCH 00/48] stm32mp1 patches for v2019.10 Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 01/48] stm32mp1: cosmetic: remove comment Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 02/48] pinctrl: pinctrl_stm32: cosmetic: Reorder include files Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 03/48] pinctrl: stmfx: update pinconf settings Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 04/48] ARM: dts: stm32mp1: sync device tree with v5.3-rc2 Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 05/48] ARM: dts: stm32mp1: DDR config v1.45 Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 06/48] ARM: dts: stm32mp1: Add iwdg2 support for SPL Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 07/48] ARM: dts: stm32mp1: Add PSCI node access before relocation Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 08/48] ARM: dts: stm32mp1: add ldtc pre-reloc proper in SOC file Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 09/48] ARM: dts: stm32mp1: add key support on DK1/DK2 Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 10/48] ARM: dts: stm32mp1: add pull-up on serial rx of console connected to STLINK Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 11/48] dt-bindings: clock: stm32mp1: support disabled fixed clock Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 12/48] stpmic1: program pmic to keep only the debug unit on Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 13/48] stm32mp1: configs: remove CONFIG_SYS_HZ Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 14/48] stm32mp1: configs: activate CONFIG_SILENT_CONSOLE Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 15/48] stm32mp1: configs: activate PRE_CONSOLE_BUFFER Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 16/48] stm32mp1: configs: deactivate ARMV7_VIRT for basic boot Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 17/48] stm32mp1: configs: select CONFIG_STM32_SERIAL Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 18/48] stm32mp1: configs: Activate DISABLE_CONSOLE Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 19/48] stm32mp1: configs: support MTDPARTS only if needed Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 20/48] stm32mp1: configs: imply CONFIG_OF_LIBFDT_OVERLAY Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 21/48] stm32mp1: configs: Deactivate SPI_FLASH_BAR Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 22/48] stm32mp1: configs: add CONFIG_DM_VIDEO Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 23/48] stm32mp1: configs: add BACKLIGHT_GPIO support Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 24/48] stm32mp1: configs: add CONFIG_CMD_BMP Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 25/48] stm32mp1: configs: add condition to activate WATCHDOG in SPL Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 26/48] stm32mp1: configs: add altbootcmd Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 27/48] stm32mp1: configs: Set bootdelay to 1 Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 28/48] stm32mp1: configs: add spi load support in spl Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 29/48] stm32mp1: board: add environment variable for board id and board rev Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 30/48] stm32mp1: board: enable v1v2_hdmi and v3v3_hdmi regulator on dk2 boot Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 31/48] stm32mp1: board: support of error led on ed1/ev1 board Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 32/48] stm32mp1: board: protect the led function calls Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 33/48] stm32mp1: board: check the boot-source to disable bootdelay Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 34/48] stm32mp1: board: Update the way vdd-supply is retrieved from DT Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 35/48] stm32mp1: board: remove board_check_usb_power when ADC is not activated Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 36/48] stm32mp1: board: cosmetic: cleanup file Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 37/48] mmc: stm32_sdmmc2: reload watchdog Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 38/48] serial: stm32: add Framing error support Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 39/48] serial: stm32: remove unused include Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 40/48] stm32mp1: ram: cosmetic: remove unused prototype Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 41/48] stm32mp1: ram: fix address issue in 2 tests Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 42/48] stm32mp1: ram: update loop management in infinite test Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 43/48] stm32mp1: ram: reload watchdog during ddr test Patrick Delaunay
2019-07-30 17:16 ` Patrick Delaunay [this message]
2019-07-30 17:16 ` [U-Boot] [PATCH 45/48] stm32mp1: Makefile cleanup Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 46/48] stm32mp1: clk: remove debug traces Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 47/48] stm32mp1: clk: use gd to store frequency information Patrick Delaunay
2019-07-30 17:16 ` [U-Boot] [PATCH 48/48] MAINTAINERS: update ARM STM STM32MP and STM32MP1 BOARD Patrick Delaunay

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=1564507016-16570-45-git-send-email-patrick.delaunay@st.com \
    --to=patrick.delaunay@st.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.