Re: [U-Boot] [PATCH v1 1/4] mmc: omap_hsmmc: do not embed struct mmc in struct omap_hsmmc_plat
On 23/02/2018 21:59, Simon Glass wrote: Hi Jean-Jacques, On 22 February 2018 at 03:25, Jean-Jacques Hiblotwrote: The area for struct mmc can be allocated dynamically. It greatly reduces the size of struct omap_hsmmc_plat. This is useful in cases where the board level code declares one or two struct omap_hsmmc_plat because it doesn't use the Driver Model. This saves around 740 bytes for the am335x_evm SPL. Signed-off-by: Jean-Jacques Hiblot --- arch/arm/include/asm/omap_mmc.h | 2 +- drivers/mmc/omap_hsmmc.c| 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) Reviewed-by: Simon Glass I would like to understand why this saves memory though. Presumably the pointer has to point to a real struct anyway, which uses memory. So how does this help? struct omap_hsmmc_plat are initialized variables so they are part of the binary. With this patch the memory is dynamically allocated so that it's not taking space in the binary. JJ - Simon ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v1 1/4] mmc: omap_hsmmc: do not embed struct mmc in struct omap_hsmmc_plat
Hi Jean-Jacques, On 22 February 2018 at 03:25, Jean-Jacques Hiblotwrote: > The area for struct mmc can be allocated dynamically. It greatly reduces > the size of struct omap_hsmmc_plat. This is useful in cases where the board > level code declares one or two struct omap_hsmmc_plat because it doesn't > use the Driver Model. > > This saves around 740 bytes for the am335x_evm SPL. > > Signed-off-by: Jean-Jacques Hiblot > --- > > arch/arm/include/asm/omap_mmc.h | 2 +- > drivers/mmc/omap_hsmmc.c| 6 +++--- > 2 files changed, 4 insertions(+), 4 deletions(-) > Reviewed-by: Simon Glass I would like to understand why this saves memory though. Presumably the pointer has to point to a real struct anyway, which uses memory. So how does this help? - Simon ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v1 1/4] mmc: omap_hsmmc: do not embed struct mmc in struct omap_hsmmc_plat
On Thu, Feb 22, 2018 at 11:25:45AM +0100, Jean-Jacques Hiblot wrote: > The area for struct mmc can be allocated dynamically. It greatly reduces > the size of struct omap_hsmmc_plat. This is useful in cases where the board > level code declares one or two struct omap_hsmmc_plat because it doesn't > use the Driver Model. > > This saves around 740 bytes for the am335x_evm SPL. > > Signed-off-by: Jean-Jacques HiblotReviewed-by: Tom Rini -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot