Skip to contentSkip to conversation

arm: am33xx: Make pin multiplexing functions optional

PATCH New Felix Brack 2 participants 3 messages Sep 14, 2017 – Sep 22, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 arm: am33xx: Make pin multiplexing functions optional

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.

---

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(+)
arch/arm/mach-omap2/am33xx/mux.c +14 -0
index 2ded472..aad3ec8 100644
@@ -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)
+{
+}
Signature · 1 line
2.7.4
#1 lore raw

PATCH v2 1/1 arm: am33xx: Make pin multiplexing functions optional

Quoted 5 lines · Felix Brack

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.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170914/49dcb3be/attachment.sig>
#2 lore raw

PATCH v2 1/1 arm: am33xx: Make pin multiplexing functions optional

In reply to Felix Brack
Quoted 6 lines · Felix Brack

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.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170922/283473de/attachment.sig>