All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH u-boot-marvell] ddr: marvell: a38x: Add more space for additional info from SPD
@ 2021-02-26 10:56 Marek Behún
  2021-03-03  1:54 ` Chris Packham
  2021-03-12  8:50 ` Stefan Roese
  0 siblings, 2 replies; 3+ messages in thread
From: Marek Behún @ 2021-02-26 10:56 UTC (permalink / raw)
  To: u-boot

From: Sujeet Baranwal <sbaranwal@marvell.com>

commit 258be123226f8f5cd516b7813fe201fb7d7416e9 upstream.

At this moment, only page 0 of SPD is being read but to support
smbios, we need to read page 1 also which has more info. In order
to do that, we need to allocate more space.

Signed-off-by: Sujeet Baranwal <sujeet.baranwal@cavium.com>
Tested-by: sa_ip-sw-jenkins <sa_ip-sw-jenkins@marvell.com>
Reviewed-by: Sujeet Kumar Baranwal <Sujeet.Baranwal@cavium.com>
Reviewed-by: Nadav Haklai <nadavh@marvell.com>
Signed-off-by: Marek Beh?n <marek.behun@nic.cz>
---

Stefan, last time I overlooked this commit. This is also part of
upstream mv-ddr-marvell.

With the previous 18 patch series the SPL binary size for
turris_omnia_defconfig rose 36 bytes. With this change it is 424 bytes
(which makes sense since the change is making some structures bigger).
It is still okay for all boards that did not have "SPL too big" problem
before this series.

---
 drivers/ddr/marvell/a38x/mv_ddr_spd.h | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/ddr/marvell/a38x/mv_ddr_spd.h b/drivers/ddr/marvell/a38x/mv_ddr_spd.h
index b4bfef3103..6043f11b28 100644
--- a/drivers/ddr/marvell/a38x/mv_ddr_spd.h
+++ b/drivers/ddr/marvell/a38x/mv_ddr_spd.h
@@ -40,7 +40,10 @@
  */
 union mv_ddr_spd_data {
 	unsigned char all_bytes[MV_DDR_SPD_DATA_BLOCK0_SIZE +
-				MV_DDR_SPD_DATA_BLOCK1M_SIZE];
+				MV_DDR_SPD_DATA_BLOCK1M_SIZE +
+				MV_DDR_SPD_DATA_BLOCK1H_SIZE +
+				MV_DDR_SPD_DATA_BLOCK2E_SIZE +
+				MV_DDR_SPD_DATA_BLOCK2M_SIZE];
 	struct {
 		/* block 0 */
 		union { /* num of bytes used/num of bytes in spd device/crc coverage */
@@ -271,6 +274,9 @@ union mv_ddr_spd_data {
 			} bit_fields;
 		} byte_131;
 		unsigned char bytes_132_191[60]; /* reserved; all 0s */
+		unsigned char bytes_192_255[MV_DDR_SPD_DATA_BLOCK1H_SIZE];
+		unsigned char bytes_256_319[MV_DDR_SPD_DATA_BLOCK2E_SIZE];
+		unsigned char bytes_320_383[MV_DDR_SPD_DATA_BLOCK2M_SIZE];
 	} byte_fields;
 };
 
-- 
2.26.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH u-boot-marvell] ddr: marvell: a38x: Add more space for additional info from SPD
  2021-02-26 10:56 [PATCH u-boot-marvell] ddr: marvell: a38x: Add more space for additional info from SPD Marek Behún
@ 2021-03-03  1:54 ` Chris Packham
  2021-03-12  8:50 ` Stefan Roese
  1 sibling, 0 replies; 3+ messages in thread
From: Chris Packham @ 2021-03-03  1:54 UTC (permalink / raw)
  To: u-boot

On Fri, Feb 26, 2021 at 11:57 PM Marek Beh?n <marek.behun@nic.cz> wrote:
>
> From: Sujeet Baranwal <sbaranwal@marvell.com>
>
> commit 258be123226f8f5cd516b7813fe201fb7d7416e9 upstream.
>
> At this moment, only page 0 of SPD is being read but to support
> smbios, we need to read page 1 also which has more info. In order
> to do that, we need to allocate more space.
>
> Signed-off-by: Sujeet Baranwal <sujeet.baranwal@cavium.com>
> Tested-by: sa_ip-sw-jenkins <sa_ip-sw-jenkins@marvell.com>
> Reviewed-by: Sujeet Kumar Baranwal <Sujeet.Baranwal@cavium.com>
> Reviewed-by: Nadav Haklai <nadavh@marvell.com>
> Signed-off-by: Marek Beh?n <marek.behun@nic.cz>

Taken for a spin on db-88f6820-amc and x530.

Tested-by: Chris Packham <judge.packham@gmail.com>

> ---
>
> Stefan, last time I overlooked this commit. This is also part of
> upstream mv-ddr-marvell.
>
> With the previous 18 patch series the SPL binary size for
> turris_omnia_defconfig rose 36 bytes. With this change it is 424 bytes
> (which makes sense since the change is making some structures bigger).
> It is still okay for all boards that did not have "SPL too big" problem
> before this series.
>
> ---
>  drivers/ddr/marvell/a38x/mv_ddr_spd.h | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/ddr/marvell/a38x/mv_ddr_spd.h b/drivers/ddr/marvell/a38x/mv_ddr_spd.h
> index b4bfef3103..6043f11b28 100644
> --- a/drivers/ddr/marvell/a38x/mv_ddr_spd.h
> +++ b/drivers/ddr/marvell/a38x/mv_ddr_spd.h
> @@ -40,7 +40,10 @@
>   */
>  union mv_ddr_spd_data {
>         unsigned char all_bytes[MV_DDR_SPD_DATA_BLOCK0_SIZE +
> -                               MV_DDR_SPD_DATA_BLOCK1M_SIZE];
> +                               MV_DDR_SPD_DATA_BLOCK1M_SIZE +
> +                               MV_DDR_SPD_DATA_BLOCK1H_SIZE +
> +                               MV_DDR_SPD_DATA_BLOCK2E_SIZE +
> +                               MV_DDR_SPD_DATA_BLOCK2M_SIZE];
>         struct {
>                 /* block 0 */
>                 union { /* num of bytes used/num of bytes in spd device/crc coverage */
> @@ -271,6 +274,9 @@ union mv_ddr_spd_data {
>                         } bit_fields;
>                 } byte_131;
>                 unsigned char bytes_132_191[60]; /* reserved; all 0s */
> +               unsigned char bytes_192_255[MV_DDR_SPD_DATA_BLOCK1H_SIZE];
> +               unsigned char bytes_256_319[MV_DDR_SPD_DATA_BLOCK2E_SIZE];
> +               unsigned char bytes_320_383[MV_DDR_SPD_DATA_BLOCK2M_SIZE];
>         } byte_fields;
>  };
>
> --
> 2.26.2
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH u-boot-marvell] ddr: marvell: a38x: Add more space for additional info from SPD
  2021-02-26 10:56 [PATCH u-boot-marvell] ddr: marvell: a38x: Add more space for additional info from SPD Marek Behún
  2021-03-03  1:54 ` Chris Packham
@ 2021-03-12  8:50 ` Stefan Roese
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Roese @ 2021-03-12  8:50 UTC (permalink / raw)
  To: u-boot

On 26.02.21 11:56, Marek Beh?n wrote:
> From: Sujeet Baranwal <sbaranwal@marvell.com>
> 
> commit 258be123226f8f5cd516b7813fe201fb7d7416e9 upstream.
> 
> At this moment, only page 0 of SPD is being read but to support
> smbios, we need to read page 1 also which has more info. In order
> to do that, we need to allocate more space.
> 
> Signed-off-by: Sujeet Baranwal <sujeet.baranwal@cavium.com>
> Tested-by: sa_ip-sw-jenkins <sa_ip-sw-jenkins@marvell.com>
> Reviewed-by: Sujeet Kumar Baranwal <Sujeet.Baranwal@cavium.com>
> Reviewed-by: Nadav Haklai <nadavh@marvell.com>
> Signed-off-by: Marek Beh?n <marek.behun@nic.cz>

Applied to u-boot-marvell/master

Thanks,
Stefan

> ---
> 
> Stefan, last time I overlooked this commit. This is also part of
> upstream mv-ddr-marvell.
> With the previous 18 patch series the SPL binary size for
> turris_omnia_defconfig rose 36 bytes. With this change it is 424 bytes
> (which makes sense since the change is making some structures bigger).
> It is still okay for all boards that did not have "SPL too big" problem
> before this series.
> 
> ---
>   drivers/ddr/marvell/a38x/mv_ddr_spd.h | 8 +++++++-
>   1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/ddr/marvell/a38x/mv_ddr_spd.h b/drivers/ddr/marvell/a38x/mv_ddr_spd.h
> index b4bfef3103..6043f11b28 100644
> --- a/drivers/ddr/marvell/a38x/mv_ddr_spd.h
> +++ b/drivers/ddr/marvell/a38x/mv_ddr_spd.h
> @@ -40,7 +40,10 @@
>    */
>   union mv_ddr_spd_data {
>   	unsigned char all_bytes[MV_DDR_SPD_DATA_BLOCK0_SIZE +
> -				MV_DDR_SPD_DATA_BLOCK1M_SIZE];
> +				MV_DDR_SPD_DATA_BLOCK1M_SIZE +
> +				MV_DDR_SPD_DATA_BLOCK1H_SIZE +
> +				MV_DDR_SPD_DATA_BLOCK2E_SIZE +
> +				MV_DDR_SPD_DATA_BLOCK2M_SIZE];
>   	struct {
>   		/* block 0 */
>   		union { /* num of bytes used/num of bytes in spd device/crc coverage */
> @@ -271,6 +274,9 @@ union mv_ddr_spd_data {
>   			} bit_fields;
>   		} byte_131;
>   		unsigned char bytes_132_191[60]; /* reserved; all 0s */
> +		unsigned char bytes_192_255[MV_DDR_SPD_DATA_BLOCK1H_SIZE];
> +		unsigned char bytes_256_319[MV_DDR_SPD_DATA_BLOCK2E_SIZE];
> +		unsigned char bytes_320_383[MV_DDR_SPD_DATA_BLOCK2M_SIZE];
>   	} byte_fields;
>   };
>   
> 


Viele Gr??e,
Stefan

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-12  8:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-26 10:56 [PATCH u-boot-marvell] ddr: marvell: a38x: Add more space for additional info from SPD Marek Behún
2021-03-03  1:54 ` Chris Packham
2021-03-12  8:50 ` Stefan Roese

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.