* [U-Boot] [PATCH] board: ti: ks2_evm: Over ride spl_get_load_buffer function
@ 2018-11-27 12:22 Keerthy
2018-12-04 8:10 ` Keerthy
2018-12-07 20:33 ` [U-Boot] " Tom Rini
0 siblings, 2 replies; 3+ messages in thread
From: Keerthy @ 2018-11-27 12:22 UTC (permalink / raw)
To: u-boot
Currently k2 spi boot is broken as the image header
is getting copied to an invalid memory location
CONFIG_SYS_TEXT_BASE - sizeof (struct image_size)
which maps to 0xc000000 - 0x40 = 0xbffffc0 being a reserved
location.
We cannot change the CONFIG_SYS_TEXT_BASE address as the single
stage boots like UART boot will need the address to be 0xc000000
hence override the spl_get_load_buffer to have image_header
address as CONFIG_SYS_TEXT_BASE aka 0xc000000
Signed-off-by: Keerthy <j-keerthy@ti.com>
---
Boot tetsed on K2G and K2E evms for UART, MMC and SPI modes.
board/ti/ks2_evm/board.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/board/ti/ks2_evm/board.c b/board/ti/ks2_evm/board.c
index 72709c0..3e06800 100644
--- a/board/ti/ks2_evm/board.c
+++ b/board/ti/ks2_evm/board.c
@@ -59,6 +59,11 @@ int dram_init(void)
return 0;
}
+struct image_header *spl_get_load_buffer(ssize_t offset, size_t size)
+{
+ return (struct image_header *)(CONFIG_SYS_TEXT_BASE);
+}
+
int board_init(void)
{
gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] board: ti: ks2_evm: Over ride spl_get_load_buffer function
2018-11-27 12:22 [U-Boot] [PATCH] board: ti: ks2_evm: Over ride spl_get_load_buffer function Keerthy
@ 2018-12-04 8:10 ` Keerthy
2018-12-07 20:33 ` [U-Boot] " Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Keerthy @ 2018-12-04 8:10 UTC (permalink / raw)
To: u-boot
On Tuesday 27 November 2018 05:52 PM, Keerthy wrote:
> Currently k2 spi boot is broken as the image header
> is getting copied to an invalid memory location
>
> CONFIG_SYS_TEXT_BASE - sizeof (struct image_size)
> which maps to 0xc000000 - 0x40 = 0xbffffc0 being a reserved
> location.
>
> We cannot change the CONFIG_SYS_TEXT_BASE address as the single
> stage boots like UART boot will need the address to be 0xc000000
> hence override the spl_get_load_buffer to have image_header
> address as CONFIG_SYS_TEXT_BASE aka 0xc000000
Tom,
Can this be pulled if there are no comments? This fixes SPI boot on k2
platforms which is currently broken.
Thanks,
Keerthy
>
> Signed-off-by: Keerthy <j-keerthy@ti.com>
> ---
>
> Boot tetsed on K2G and K2E evms for UART, MMC and SPI modes.
>
> board/ti/ks2_evm/board.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/board/ti/ks2_evm/board.c b/board/ti/ks2_evm/board.c
> index 72709c0..3e06800 100644
> --- a/board/ti/ks2_evm/board.c
> +++ b/board/ti/ks2_evm/board.c
> @@ -59,6 +59,11 @@ int dram_init(void)
> return 0;
> }
>
> +struct image_header *spl_get_load_buffer(ssize_t offset, size_t size)
> +{
> + return (struct image_header *)(CONFIG_SYS_TEXT_BASE);
> +}
> +
> int board_init(void)
> {
> gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] board: ti: ks2_evm: Over ride spl_get_load_buffer function
2018-11-27 12:22 [U-Boot] [PATCH] board: ti: ks2_evm: Over ride spl_get_load_buffer function Keerthy
2018-12-04 8:10 ` Keerthy
@ 2018-12-07 20:33 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2018-12-07 20:33 UTC (permalink / raw)
To: u-boot
On Tue, Nov 27, 2018 at 05:52:41PM +0530, Keerthy wrote:
> Currently k2 spi boot is broken as the image header
> is getting copied to an invalid memory location
>
> CONFIG_SYS_TEXT_BASE - sizeof (struct image_size)
> which maps to 0xc000000 - 0x40 = 0xbffffc0 being a reserved
> location.
>
> We cannot change the CONFIG_SYS_TEXT_BASE address as the single
> stage boots like UART boot will need the address to be 0xc000000
> hence override the spl_get_load_buffer to have image_header
> address as CONFIG_SYS_TEXT_BASE aka 0xc000000
>
> Signed-off-by: Keerthy <j-keerthy@ti.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181207/86b7068f/attachment.sig>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-12-07 20:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-27 12:22 [U-Boot] [PATCH] board: ti: ks2_evm: Over ride spl_get_load_buffer function Keerthy
2018-12-04 8:10 ` Keerthy
2018-12-07 20:33 ` [U-Boot] " Tom Rini
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.