* [U-Boot] [PATCH V2] arm: omap3: Manually initialize GPIO if OF_CONTROL doesn't
@ 2019-05-29 20:42 Adam Ford
2019-06-05 19:51 ` Tom Rini
0 siblings, 1 reply; 2+ messages in thread
From: Adam Ford @ 2019-05-29 20:42 UTC (permalink / raw)
To: u-boot
The commong initialization code manually initializes the GPIO
even when OF_CONTROL does it, so we can reduce the code size a
bit by not doing it manually when we have device tree support.
Using the omap3_logic board (dm3730), the sizes shrunk:
Before:
text data bss dec hex filename
561066 28596 116880 706542 ac7ee u-boot
55245 1605 1888 58738 e572 spl/u-boot-spl
After
text data bss dec hex filename
560898 28548 116872 706318 ac70e u-boot
55121 1557 1888 58566 e4c6 spl/u-boot-spl
Signed-off-by: Adam Ford <aford173@gmail.com>
---
V2: Fix accidentally checked in #if 1 instead of what I wanted
diff --git a/arch/arm/mach-omap2/omap3/board.c b/arch/arm/mach-omap2/omap3/board.c
index 2d25fc60a0..658ef8c1f1 100644
--- a/arch/arm/mach-omap2/omap3/board.c
+++ b/arch/arm/mach-omap2/omap3/board.c
@@ -34,6 +34,8 @@ static void omap3_invalidate_l2_cache_secure(void);
#endif
#ifdef CONFIG_DM_GPIO
+#if !CONFIG_IS_ENABLED(OF_CONTROL)
+/* Manually initialize GPIO banks when OF_CONTROL doesn't */
static const struct omap_gpio_platdata omap34xx_gpio[] = {
{ 0, OMAP34XX_GPIO1_BASE },
{ 1, OMAP34XX_GPIO2_BASE },
@@ -51,7 +53,7 @@ U_BOOT_DEVICES(omap34xx_gpios) = {
{ "gpio_omap", &omap34xx_gpio[4] },
{ "gpio_omap", &omap34xx_gpio[5] },
};
-
+#endif
#else
static const struct gpio_bank gpio_bank_34xx[6] = {
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH V2] arm: omap3: Manually initialize GPIO if OF_CONTROL doesn't
2019-05-29 20:42 [U-Boot] [PATCH V2] arm: omap3: Manually initialize GPIO if OF_CONTROL doesn't Adam Ford
@ 2019-06-05 19:51 ` Tom Rini
0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2019-06-05 19:51 UTC (permalink / raw)
To: u-boot
On Wed, May 29, 2019 at 03:42:53PM -0500, Adam Ford wrote:
> The commong initialization code manually initializes the GPIO
> even when OF_CONTROL does it, so we can reduce the code size a
> bit by not doing it manually when we have device tree support.
>
> Using the omap3_logic board (dm3730), the sizes shrunk:
>
> Before:
>
> text data bss dec hex filename
> 561066 28596 116880 706542 ac7ee u-boot
> 55245 1605 1888 58738 e572 spl/u-boot-spl
>
> After
> text data bss dec hex filename
> 560898 28548 116872 706318 ac70e u-boot
> 55121 1557 1888 58566 e4c6 spl/u-boot-spl
>
> Signed-off-by: Adam Ford <aford173@gmail.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190605/91132331/attachment.sig>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-06-05 19:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-29 20:42 [U-Boot] [PATCH V2] arm: omap3: Manually initialize GPIO if OF_CONTROL doesn't Adam Ford
2019-06-05 19:51 ` Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox