diff mbox series

[U-Boot,v2] arm: am33xx: Make pin multiplexing functions optional

Message ID 1505392628-2471-1-git-send-email-fb@ltec.ch
State Accepted
Commit 7cc238f2eea471471c0204777063b1ee622ec939
Delegated to: Tom Rini
Headers show
Series [U-Boot,v2] arm: am33xx: Make pin multiplexing functions optional | expand

Commit Message

Felix Brack Sept. 14, 2017, 12:37 p.m. UTC
This patch provides default implementations of the two functions
set_uart_mux_conf and set_mux_conf_regs. Hence boards not using
them do not need to provide their distinct empty definitions.

Signed-off-by: Felix Brack <fb@ltec.ch>
---

Changes in v2:
 - removed weak attribute from function declarations
 - added weak function definitions

 arch/arm/mach-omap2/am33xx/mux.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

Comments

Tom Rini Sept. 15, 2017, 12:47 a.m. UTC | #1
On Thu, Sep 14, 2017 at 02:37:08PM +0200, Felix Brack wrote:

> This patch provides default implementations of the two functions
> set_uart_mux_conf and set_mux_conf_regs. Hence boards not using
> them do not need to provide their distinct empty definitions.
> 
> Signed-off-by: Felix Brack <fb@ltec.ch>

Reviewed-by: Tom Rini <trini@konsulko.com>
Tom Rini Sept. 22, 2017, 2:19 p.m. UTC | #2
On Thu, Sep 14, 2017 at 02:37:08PM +0200, Felix Brack wrote:

> This patch provides default implementations of the two functions
> set_uart_mux_conf and set_mux_conf_regs. Hence boards not using
> them do not need to provide their distinct empty definitions.
> 
> Signed-off-by: Felix Brack <fb@ltec.ch>
> Reviewed-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/arch/arm/mach-omap2/am33xx/mux.c b/arch/arm/mach-omap2/am33xx/mux.c
index 2ded472..aad3ec8 100644
--- a/arch/arm/mach-omap2/am33xx/mux.c
+++ b/arch/arm/mach-omap2/am33xx/mux.c
@@ -31,3 +31,17 @@  void configure_module_pin_mux(struct module_pin_mux *mod_pin_mux)
 	for (i = 0; mod_pin_mux[i].reg_offset != -1; i++)
 		MUX_CFG(mod_pin_mux[i].val, mod_pin_mux[i].reg_offset);
 }
+
+/*
+ * provide a default over-writable definition
+*/
+void __weak set_uart_mux_conf(void)
+{
+}
+
+/*
+* provide a default over-writable definition
+*/
+void __weak set_mux_conf_regs(void)
+{
+}