mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 17:59:20 -04:00
net/aquantia-atlantic-kmod: fix build on non-x86 by adding missing macros
This commit is contained in:
parent
b484bd3768
commit
1a8019b968
1 changed files with 17 additions and 0 deletions
17
net/aquantia-atlantic-kmod/files/patch-aq__hw.h
Normal file
17
net/aquantia-atlantic-kmod/files/patch-aq__hw.h
Normal file
|
@ -0,0 +1,17 @@
|
|||
--- aq_hw.h.orig 2023-11-07 23:05:23 UTC
|
||||
+++ aq_hw.h
|
||||
@@ -42,6 +42,14 @@
|
||||
#include <sys/endian.h>
|
||||
#include "aq_common.h"
|
||||
|
||||
+#ifndef readl
|
||||
+#define readl(va) (*(volatile uint32_t *) (va))
|
||||
+#endif
|
||||
+
|
||||
+#ifndef writel
|
||||
+#define writel(va, d) (*(volatile uint32_t *) (va) = (d))
|
||||
+#endif
|
||||
+
|
||||
#define AQ_WRITE_REG(hw, reg, value) writel(((hw)->hw_addr + (reg)), htole32(value))
|
||||
|
||||
#define AQ_READ_REG(hw, reg) le32toh(readl((hw)->hw_addr + reg))
|
Loading…
Add table
Reference in a new issue