Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153077824
D49535.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D49535.diff
View Options
diff --git a/sys/arm/mv/armadaxp/armadaxp_mp.c b/sys/arm/mv/armadaxp/armadaxp_mp.c
--- a/sys/arm/mv/armadaxp/armadaxp_mp.c
+++ b/sys/arm/mv/armadaxp/armadaxp_mp.c
@@ -46,6 +46,7 @@
#include <machine/armreg.h>
#include <arm/mv/mvwin.h>
+#include <arm/mv/mvvar.h>
#include <machine/platformvar.h>
diff --git a/sys/arm/mv/mv_armv7_machdep.c b/sys/arm/mv/mv_armv7_machdep.c
--- a/sys/arm/mv/mv_armv7_machdep.c
+++ b/sys/arm/mv/mv_armv7_machdep.c
@@ -103,6 +103,10 @@
void mv_axp_platform_mp_start_ap(platform_t plate);
#endif
+vm_paddr_t fdt_immr_pa;
+vm_offset_t fdt_immr_va;
+static vm_offset_t fdt_immr_size;
+
#define MPP_PIN_MAX 68
#define MPP_PIN_CELLS 2
#define MPP_PINS_PER_REG 8
@@ -270,9 +274,35 @@
mv_platform_probe_and_attach(platform_t plate)
{
- if (fdt_immr_addr(MV_BASE) != 0)
- while (1);
- return (0);
+ phandle_t node;
+ u_long base, size;
+ int r;
+
+ /*
+ * Try to access the SOC node directly i.e. through /aliases/.
+ */
+ if ((node = OF_finddevice("soc")) != -1)
+ if (ofw_bus_node_is_compatible(node, "simple-bus"))
+ goto moveon;
+ /*
+ * Find the node the long way.
+ */
+ if ((node = OF_finddevice("/")) == -1)
+ goto errout;
+
+ if ((node = fdt_find_compatible(node, "simple-bus", 0)) == 0)
+ goto errout;
+
+moveon:
+ if ((r = fdt_get_range(node, 0, &base, &size)) == 0) {
+ fdt_immr_pa = base;
+ fdt_immr_va = MV_BASE;
+ fdt_immr_size = size;
+ return (0);
+ }
+
+errout:
+ while (1);
}
static void
diff --git a/sys/arm/mv/mvvar.h b/sys/arm/mv/mvvar.h
--- a/sys/arm/mv/mvvar.h
+++ b/sys/arm/mv/mvvar.h
@@ -80,6 +80,9 @@
extern int idma_wins_no;
extern int xor_wins_no;
+extern vm_paddr_t fdt_immr_pa;
+extern vm_offset_t fdt_immr_va;
+
int soc_decode_win(void);
void soc_id(uint32_t *dev, uint32_t *rev);
void soc_dump_decode_win(void);
diff --git a/sys/dev/fdt/fdt_common.h b/sys/dev/fdt/fdt_common.h
--- a/sys/dev/fdt/fdt_common.h
+++ b/sys/dev/fdt/fdt_common.h
@@ -66,10 +66,6 @@
device_t dev;
};
-extern vm_paddr_t fdt_immr_pa;
-extern vm_offset_t fdt_immr_va;
-extern vm_offset_t fdt_immr_size;
-
#if defined(FDT_DTB_STATIC)
extern u_char fdt_static_dtb;
#endif
diff --git a/sys/dev/fdt/fdt_common.c b/sys/dev/fdt/fdt_common.c
--- a/sys/dev/fdt/fdt_common.c
+++ b/sys/dev/fdt/fdt_common.c
@@ -62,10 +62,6 @@
SYSCTL_NODE(_hw, OID_AUTO, fdt, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
"Flattened Device Tree");
-vm_paddr_t fdt_immr_pa;
-vm_offset_t fdt_immr_va;
-vm_offset_t fdt_immr_size;
-
struct fdt_ic_list fdt_ic_list_head = SLIST_HEAD_INITIALIZER(fdt_ic_list_head);
static int
@@ -199,38 +195,6 @@
return (0);
}
-int
-fdt_immr_addr(vm_offset_t immr_va)
-{
- phandle_t node;
- u_long base, size;
- int r;
-
- /*
- * Try to access the SOC node directly i.e. through /aliases/.
- */
- if ((node = OF_finddevice("soc")) != -1)
- if (ofw_bus_node_is_compatible(node, "simple-bus"))
- goto moveon;
- /*
- * Find the node the long way.
- */
- if ((node = OF_finddevice("/")) == -1)
- return (ENXIO);
-
- if ((node = fdt_find_compatible(node, "simple-bus", 0)) == 0)
- return (ENXIO);
-
-moveon:
- if ((r = fdt_get_range(node, 0, &base, &size)) == 0) {
- fdt_immr_pa = base;
- fdt_immr_va = immr_va;
- fdt_immr_size = size;
- }
-
- return (r);
-}
-
int
fdt_is_compatible_strict(phandle_t node, const char *compatible)
{
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 20, 12:00 AM (6 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31809913
Default Alt Text
D49535.diff (3 KB)
Attached To
Mode
D49535: sys: Move Marvell specific fdt code to sys/arm/mv
Attached
Detach File
Event Timeline
Log In to Comment