From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Schwierzeck Date: Tue, 8 Jan 2019 17:16:19 +0100 Subject: [U-Boot] [PATCH 2/2] mmc: jz_mmc: Compile-out write support if disabled In-Reply-To: <20190107211325.13526-2-ezequiel@collabora.com> References: <20190107211325.13526-1-ezequiel@collabora.com> <20190107211325.13526-2-ezequiel@collabora.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Am 07.01.19 um 22:13 schrieb Ezequiel Garcia: > Do not build write support, unless it's enabled. > > In the SPL case, this change will typically remove > precious bytes (as write support is most often > not needed in SPL). > > This is important on this platform, where the maximum > SPL size is 14 KiB. > > With gcc v7.3, this change saves 144 bytes producing: > > size spl/u-boot-spl > text data bss dec hex filename > 9240 752 712 10704 29d0 spl/u-boot-spl > > To make the code easier to compile-out and more > readable, a pair of read_data/write_data helpers are created. > > Signed-off-by: Ezequiel Garcia > --- > drivers/mmc/jz_mmc.c | 105 +++++++++++++++++++++++++------------------ > 1 file changed, 61 insertions(+), 44 deletions(-) > Reviewed-by: Daniel Schwierzeck -- - Daniel