From: Patrice CHOTARD Date: Thu, 2 Jul 2020 07:38:03 +0000 Subject: [PATCH 3/4] ram: stm32mp1: use the DDR size by default in the test addressBus In-Reply-To: <20200612083504.20746-1-patrick.delaunay@st.com> References: <20200612103440.1.I29f1f31d4312a6029cc38e3f4fe9aa0baedece7d@changeid> <20200612083504.20746-1-patrick.delaunay@st.com> Message-ID: <3eb664fa-5155-2503-270b-b84956882f3f@st.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Patrick one typo below On 6/12/20 10:34 AM, Patrick Delaunay wrote: > The test 4 = "AddressBus [size] [addr]" without parameter > detects alias for any address bit only when: > - size = real size of DDR > - addr = start of DDR = 0xC0000000 > > These value must by the default value when parameters are absent. s/by the /be the > > This patch sets bufsize to STM32_DDR_SIZE and get_bufsize() selects > the correct value for bufsize when this parameter is absent = > full size of the DDDR > > On EV1 board : > DDR> test 4 > running at 0xC0000000 length 0x40000000 > > On DK2 board > DDR> test 4 > running at 0xC0000000 length 0x20000000 > > Signed-off-by: Patrick Delaunay > --- > > drivers/ram/stm32mp1/stm32mp1_tests.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/ram/stm32mp1/stm32mp1_tests.c b/drivers/ram/stm32mp1/stm32mp1_tests.c > index fec9fd010e..a2a69da9a3 100644 > --- a/drivers/ram/stm32mp1/stm32mp1_tests.c > +++ b/drivers/ram/stm32mp1/stm32mp1_tests.c > @@ -442,7 +442,7 @@ static enum test_result test_addressbus(struct stm32mp1_ddrctl *ctl, > u32 bufsize; > u32 error; > > - if (get_bufsize(string, argc, argv, 0, &bufsize, 4 * 1024, 4)) > + if (get_bufsize(string, argc, argv, 0, &bufsize, STM32_DDR_SIZE, 4)) > return TEST_ERROR; > if (!is_power_of_2(bufsize)) { > sprintf(string, "size 0x%x is not a power of 2", > @@ -452,6 +452,7 @@ static enum test_result test_addressbus(struct stm32mp1_ddrctl *ctl, > if (get_addr(string, argc, argv, 1, &addr)) > return TEST_ERROR; > > + printf("running at 0x%08x length 0x%x\n", addr, bufsize); > error = (u32)addressbus((u32 *)addr, bufsize); > if (error) { > sprintf(string, "0x%x: error for address 0x%x", You can add my reviewed-by when typo will be fixed Thanks