Re: [U-Boot] [PATCH v2 2/4] mmc: omap_hsmmc: compile out write support if not needed

2018-02-25 Thread Jaehoon Chung
On 02/23/2018 09:21 PM, Tom Rini wrote:
> On Fri, Feb 23, 2018 at 10:40:17AM +0100, Jean-Jacques Hiblot wrote:
> 
>> This reduces the size of the binary by about 196 bytes.
>>
>> Signed-off-by: Jean-Jacques Hiblot 
> 
> Reviewed-by: Tom Rini 

Applied to u-boot-mmc. Thanks!

Best Regards,
Jaehoon Chung

> 

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v2 2/4] mmc: omap_hsmmc: compile out write support if not needed

2018-02-23 Thread Tom Rini
On Fri, Feb 23, 2018 at 10:40:17AM +0100, Jean-Jacques Hiblot wrote:

> This reduces the size of the binary by about 196 bytes.
> 
> Signed-off-by: Jean-Jacques Hiblot 

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


[U-Boot] [PATCH v2 2/4] mmc: omap_hsmmc: compile out write support if not needed

2018-02-23 Thread Jean-Jacques Hiblot
This reduces the size of the binary by about 196 bytes.

Signed-off-by: Jean-Jacques Hiblot 
---

Changes in v2: None

 drivers/mmc/omap_hsmmc.c | 11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c
index e0b679a..8b57edc 100644
--- a/drivers/mmc/omap_hsmmc.c
+++ b/drivers/mmc/omap_hsmmc.c
@@ -1181,8 +1181,9 @@ static int mmc_read_data(struct hsmmc *mmc_base, char 
*buf, unsigned int size)
return 0;
 }
 
+#if CONFIG_IS_ENABLED(MMC_WRITE)
 static int mmc_write_data(struct hsmmc *mmc_base, const char *buf,
-   unsigned int size)
+ unsigned int size)
 {
unsigned int *input_buf = (unsigned int *)buf;
unsigned int mmc_stat;
@@ -1235,7 +1236,13 @@ static int mmc_write_data(struct hsmmc *mmc_base, const 
char *buf,
}
return 0;
 }
-
+#else
+static int mmc_write_data(struct hsmmc *mmc_base, const char *buf,
+ unsigned int size)
+{
+   return -ENOTSUPP;
+}
+#endif
 static void omap_hsmmc_stop_clock(struct hsmmc *mmc_base)
 {
writel(readl(_base->sysctl) & ~CEN_ENABLE, _base->sysctl);
-- 
1.9.1

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot