diff mbox series

[V2,1/5] imx8mp_evk: spl: drop useless code

Message ID 20200512093901.14831-2-peng.fan@nxp.com
State Superseded
Delegated to: Stefano Babic
Headers show
Series imx8mp: evk: fix boot and update | expand

Commit Message

Peng Fan May 12, 2020, 9:38 a.m. UTC
Drop useless getting ccm device, there is no need to explicted do this
in board code, and we not enable SPL CLK currently.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 board/freescale/imx8mp_evk/spl.c | 14 --------------
 1 file changed, 14 deletions(-)

Comments

Fabio Estevam May 12, 2020, 11:44 a.m. UTC | #1
Hi Peng,

On Tue, May 12, 2020 at 6:16 AM Peng Fan <peng.fan@nxp.com> wrote:
>
> Drop useless getting ccm device, there is no need to explicted do this
> in board code, and we not enable SPL CLK currently.
>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>

I got an error while applying this patch:

patching file board/freescale/imx8mp_evk/spl.c
Hunk #2 FAILED at 39.
1 out of 2 hunks FAILED -- saving rejects to file
board/freescale/imx8mp_evk/spl.c.rej

I fixed it manually and applied the whole series plus this watchdog one:
https://patchwork.ozlabs.org/project/uboot/patch/20200511140031.8862-4-festevam@gmail.com/

I get an "alloc space exhausted" error message though:

U-Boot SPL 2020.07-rc2-dirty (May 12 2020 - 08:29:04 -0300)
Normal Boot
WDT:   Started with servicing (60s timeout)
Trying to boot from BOOTROM
image offset 0x8000, pagesize 0x200, ivt offset 0x0


U-Boot 2020.07-rc2-dirty (May 12 2020 - 08:29:04 -0300)

alloc space exhausted
CPU:   Freescale i.MX8MP rev1.0 at 1000 MHz

Despite the alloc error, the boot completes and the 'reset' command works.

I am still not able to boot a imx_5.4.3_2.0.0 NXP kernel though as it
hangs after the serial driver is probed:
https://pastebin.com/raw/ix5dnGub

Are you able to boot an imx_5.4.3_2.0.0 NXP kernel?

If so, can you please share your ATF and LPDDR4 firmware files?

Thanks
Peng Fan May 12, 2020, 11:59 a.m. UTC | #2
> Subject: Re: [PATCH V2 1/5] imx8mp_evk: spl: drop useless code
> 
> Hi Peng,
> 
> On Tue, May 12, 2020 at 6:16 AM Peng Fan <peng.fan@nxp.com> wrote:
> >
> > Drop useless getting ccm device, there is no need to explicted do this
> > in board code, and we not enable SPL CLK currently.
> >
> > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> 
> I got an error while applying this patch:
> 
> patching file board/freescale/imx8mp_evk/spl.c Hunk #2 FAILED at 39.
> 1 out of 2 hunks FAILED -- saving rejects to file
> board/freescale/imx8mp_evk/spl.c.rej

Ok. I'll rebase and try.

> 
> I fixed it manually and applied the whole series plus this watchdog one:
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatch
> work.ozlabs.org%2Fproject%2Fuboot%2Fpatch%2F20200511140031.8862-4-f
> estevam%40gmail.com%2F&amp;data=02%7C01%7Cpeng.fan%40nxp.com%
> 7Cc16790e08601447b539c08d7f669a3ef%7C686ea1d3bc2b4c6fa92cd99c5c
> 301635%7C0%7C0%7C637248805891280120&amp;sdata=4rvjaQt%2BoWw6
> 45GNynVYVJavcf6XU%2FhS0K3cfqKyRUM%3D&amp;reserved=0
> 
> I get an "alloc space exhausted" error message though:
> 
> U-Boot SPL 2020.07-rc2-dirty (May 12 2020 - 08:29:04 -0300) Normal Boot
> WDT:   Started with servicing (60s timeout)
> Trying to boot from BOOTROM
> image offset 0x8000, pagesize 0x200, ivt offset 0x0
> 
> 
> U-Boot 2020.07-rc2-dirty (May 12 2020 - 08:29:04 -0300)
> 
> alloc space exhausted
> CPU:   Freescale i.MX8MP rev1.0 at 1000 MHz
> 
> Despite the alloc error, the boot completes and the 'reset' command works.

I not met this error. Which commit hash are you using?

> 
> I am still not able to boot a imx_5.4.3_2.0.0 NXP kernel though as it hangs
> after the serial driver is probed:
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpasteb
> in.com%2Fraw%2Fix5dnGub&amp;data=02%7C01%7Cpeng.fan%40nxp.com%
> 7Cc16790e08601447b539c08d7f669a3ef%7C686ea1d3bc2b4c6fa92cd99c5c
> 301635%7C0%7C0%7C637248805891290111&amp;sdata=z4rJdfJsEEeDux%2
> Fs3VGs291EPuwYLjeYH981boDooEo%3D&amp;reserved=0
> 
> Are you able to boot an imx_5.4.3_2.0.0 NXP kernel?
> 
> If so, can you please share your ATF and LPDDR4 firmware files?

I am using local latest 5.4 atf/kernel. I'll send you the link private.

Regards,
Peng.

> 
> Thanks
Fabio Estevam May 12, 2020, 12:07 p.m. UTC | #3
Hi Peng,

On Tue, May 12, 2020 at 8:59 AM Peng Fan <peng.fan@nxp.com> wrote:

> I not met this error. Which commit hash are you using?

I am using top of tree U-Boot master:

commit 2a38d2239d0bb4d128b00886bf097ab247a0b1a7
Author: Tom Rini <trini@konsulko.com>
Date:   Mon May 11 18:28:19 2020 -0400

    Prepare v2020.07-rc2

    Signed-off-by: Tom Rini <trini@konsulko.com>

Plus this watchdog patch:
https://patchwork.ozlabs.org/project/uboot/patch/20200511140031.8862-4-festevam@gmail.com/
diff mbox series

Patch

diff --git a/board/freescale/imx8mp_evk/spl.c b/board/freescale/imx8mp_evk/spl.c
index c5f640dc7b..8151b49d97 100644
--- a/board/freescale/imx8mp_evk/spl.c
+++ b/board/freescale/imx8mp_evk/spl.c
@@ -25,11 +25,6 @@ 
 #include <mmc.h>
 #include <asm/arch/ddr.h>
 
-#include <dm/uclass.h>
-#include <dm/device.h>
-#include <dm/uclass-internal.h>
-#include <dm/device-internal.h>
-
 DECLARE_GLOBAL_DATA_PTR;
 
 int spl_board_boot_device(enum boot_device boot_dev_spl)
@@ -44,16 +39,7 @@  void spl_dram_init(void)
 
 void spl_board_init(void)
 {
-	struct udevice *dev;
-	int ret;
-
 	puts("Normal Boot\n");
-
-	ret = uclass_get_device_by_name(UCLASS_CLK,
-					"clock-controller@30380000",
-					&dev);
-	if (ret < 0)
-		printf("Failed to find clock node. Check device tree\n");
 }
 
 #define I2C_PAD_CTRL (PAD_CTL_DSE6 | PAD_CTL_HYS | PAD_CTL_PUE | PAD_CTL_PE)