public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Keerthy <j-keerthy@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] board: ti: ks2_evm: Over ride spl_get_load_buffer function
Date: Tue, 4 Dec 2018 13:40:08 +0530	[thread overview]
Message-ID: <83ceae74-a488-ea58-e07e-8714d4f20c71@ti.com> (raw)
In-Reply-To: <1543321361-15316-1-git-send-email-j-keerthy@ti.com>



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;
> 

  reply	other threads:[~2018-12-04  8:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2018-12-07 20:33 ` [U-Boot] " Tom Rini

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=83ceae74-a488-ea58-e07e-8714d4f20c71@ti.com \
    --to=j-keerthy@ti.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox