All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean-Jacques Hiblot <jjhiblot@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v1 1/4] mmc: omap_hsmmc: do not embed struct mmc in struct omap_hsmmc_plat
Date: Mon, 26 Feb 2018 11:24:19 +0100	[thread overview]
Message-ID: <099d0751-ea3b-4b9d-f73b-b7655a19a5f7@ti.com> (raw)
In-Reply-To: <CAPnjgZ3oo=0F+HpESz4hFC0X8kSBjUWdH+d6yyRq0o_Msazocw@mail.gmail.com>


On 23/02/2018 21:59, Simon Glass wrote:
> Hi Jean-Jacques,
>
> On 22 February 2018 at 03:25, Jean-Jacques Hiblot <jjhiblot@ti.com> 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 Hiblot <jjhiblot@ti.com>
>> ---
>>
>>   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 <sjg@chromium.org>
>
> 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
>

  reply	other threads:[~2018-02-26 10:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-22 10:25 [U-Boot] [PATCH v1 0/4] mmc: omap_hsmmc: Reduce the footprint of the driver and fix am335x clock Jean-Jacques Hiblot
2018-02-22 10:25 ` [U-Boot] [PATCH v1 1/4] mmc: omap_hsmmc: do not embed struct mmc in struct omap_hsmmc_plat Jean-Jacques Hiblot
2018-02-22 15:47   ` Tom Rini
2018-02-23 20:59   ` Simon Glass
2018-02-26 10:24     ` Jean-Jacques Hiblot [this message]
2018-02-22 10:25 ` [U-Boot] [PATCH v1 2/4] mmc: omap_hsmmc: compile out write support if not needed Jean-Jacques Hiblot
2018-02-22 15:47   ` Tom Rini
2018-02-22 10:25 ` [U-Boot] [PATCH v1 3/4] mmc: omap_hsmmc: compile out ADMA support for am33xx and omap34xx Jean-Jacques Hiblot
2018-02-22 15:47   ` Tom Rini
2018-02-23  7:06     ` Jaehoon Chung
2018-02-22 10:25 ` [U-Boot] [PATCH v1 4/4] mmc: omap_hsmmc: use a default 52MHz max clock rate if none is specified Jean-Jacques Hiblot
2018-02-22 15:47   ` Tom Rini
2018-02-22 23:09 ` [U-Boot] [PATCH v1 0/4] mmc: omap_hsmmc: Reduce the footprint of the driver and fix am335x clock Adam Ford

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=099d0751-ea3b-4b9d-f73b-b7655a19a5f7@ti.com \
    --to=jjhiblot@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 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.