aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/soc
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2019-08-09 16:40:32 +0200
committerArnd Bergmann <arnd@arndb.de>2019-08-15 21:33:49 +0200
commit9dc03ffd996d4103cc2a11286d61e517bce27440 (patch)
tree468e29c77d448d945d299cb0df25e84a17f39906 /include/linux/soc
parentgpio: lpc32xx: allow building on non-lpc32xx targets (diff)
downloadwireguard-linux-9dc03ffd996d4103cc2a11286d61e517bce27440.tar.xz
wireguard-linux-9dc03ffd996d4103cc2a11286d61e517bce27440.zip
net: lpc-enet: factor out iram access
The lpc_eth driver uses a platform specific method to find the internal sram. This prevents building it on other machines. Rework to only use one function call and keep the other platform internals where they belong. Ideally this would look up the sram location from DT, but as this is a rarely used driver, I want to keep the modifications to a minimum. Link: https://lore.kernel.org/r/20190809144043.476786-7-arnd@arndb.de Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'include/linux/soc')
-rw-r--r--include/linux/soc/nxp/lpc32xx-misc.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/linux/soc/nxp/lpc32xx-misc.h b/include/linux/soc/nxp/lpc32xx-misc.h
new file mode 100644
index 000000000000..f232e1a1bcdc
--- /dev/null
+++ b/include/linux/soc/nxp/lpc32xx-misc.h
@@ -0,0 +1,24 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ * Author: Kevin Wells <kevin.wells@nxp.com>
+ *
+ * Copyright (C) 2010 NXP Semiconductors
+ */
+
+#ifndef __SOC_LPC32XX_MISC_H
+#define __SOC_LPC32XX_MISC_H
+
+#include <linux/types.h>
+
+#ifdef CONFIG_ARCH_LPC32XX
+extern u32 lpc32xx_return_iram(void __iomem **mapbase, dma_addr_t *dmaaddr);
+#else
+static inline u32 lpc32xx_return_iram(void __iomem **mapbase, dma_addr_t *dmaaddr)
+{
+ *mapbase = NULL;
+ *dmaaddr = 0;
+ return 0;
+}
+#endif
+
+#endif /* __SOC_LPC32XX_MISC_H */