|
@@ -10,6 +10,8 @@
|
|
|
|
|
|
#include <linux/errno.h>
|
|
#include <linux/errno.h>
|
|
#include <linux/percpu.h>
|
|
#include <linux/percpu.h>
|
|
|
|
+#include <linux/of.h>
|
|
|
|
+#include <linux/of_address.h>
|
|
#include <linux/spinlock.h>
|
|
#include <linux/spinlock.h>
|
|
|
|
|
|
#include <asm/mips-cps.h>
|
|
#include <asm/mips-cps.h>
|
|
@@ -22,6 +24,17 @@ static DEFINE_PER_CPU_ALIGNED(unsigned long, cpc_core_lock_flags);
|
|
|
|
|
|
phys_addr_t __weak mips_cpc_default_phys_base(void)
|
|
phys_addr_t __weak mips_cpc_default_phys_base(void)
|
|
{
|
|
{
|
|
|
|
+ struct device_node *cpc_node;
|
|
|
|
+ struct resource res;
|
|
|
|
+ int err;
|
|
|
|
+
|
|
|
|
+ cpc_node = of_find_compatible_node(of_root, NULL, "mti,mips-cpc");
|
|
|
|
+ if (cpc_node) {
|
|
|
|
+ err = of_address_to_resource(cpc_node, 0, &res);
|
|
|
|
+ if (!err)
|
|
|
|
+ return res.start;
|
|
|
|
+ }
|
|
|
|
+
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|