Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102842947
D36465.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D36465.diff
View Options
diff --git a/sys/dev/neta/if_mvneta.c b/sys/dev/neta/if_mvneta.c
--- a/sys/dev/neta/if_mvneta.c
+++ b/sys/dev/neta/if_mvneta.c
@@ -65,9 +65,7 @@
#include <sys/rman.h>
#include <machine/resource.h>
-#if defined(__aarch64__)
#include <dev/extres/clk/clk.h>
-#endif
#include <dev/mii/mii.h>
#include <dev/mii/miivar.h>
@@ -532,9 +530,8 @@
#if !defined(__aarch64__)
uint32_t reg;
#endif
-#if defined(__aarch64__)
clk_t clk;
-#endif
+
sc = device_get_softc(self);
sc->dev = self;
@@ -556,14 +553,19 @@
MVNETA_WRITE(sc, MVNETA_PRXINIT, 0x00000001);
MVNETA_WRITE(sc, MVNETA_PTXINIT, 0x00000001);
-#if defined(__aarch64__)
error = clk_get_by_ofw_index(sc->dev, ofw_bus_get_node(sc->dev), 0,
&clk);
if (error != 0) {
+#if defined(__aarch64__)
device_printf(sc->dev,
"Cannot get clock, using default frequency: %d\n",
A3700_TCLK_250MHZ);
sc->clk_freq = A3700_TCLK_250MHZ;
+#else
+ device_printf(sc->dev,
+ "Cannot get clock, using get_tclk()\n");
+ sc->clk_freq = get_tclk();
+#endif
} else {
error = clk_get_freq(clk, &sc->clk_freq);
if (error != 0) {
@@ -573,9 +575,6 @@
return (error);
}
}
-#else
- sc->clk_freq = get_tclk();
-#endif
#if !defined(__aarch64__)
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 18, 9:34 PM (21 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14705066
Default Alt Text
D36465.diff (1 KB)
Attached To
Mode
D36465: mvneta: Use clkgen API in armv7
Attached
Detach File
Event Timeline
Log In to Comment