@@ -180,13 +180,13 @@
};
rstmgr@ffd05000 {
- compatible = "altr,rst-mgr";
- reg = <0xffd05000 0x1000>;
- };
+ compatible = "altr,rst-mgr";
+ reg = <0xffd05000 0x1000>;
+ };
sysmgr@ffd08000 {
- compatible = "altr,sys-mgr";
- reg = <0xffd08000 0x4000>;
- };
+ compatible = "altr,sys-mgr";
+ reg = <0xffd08000 0x4000>;
+ };
};
};
@@ -56,5 +56,9 @@
serial1@ffc03000 {
clock-frequency = <100000000>;
};
+
+ sysmgr@ffd08000 {
+ cpu1-start-addr = <0xffd08010>;
+ };
};
};
@@ -56,5 +56,9 @@
serial1@ffc03000 {
clock-frequency = <7372800>;
};
+
+ sysmgr@ffd08000 {
+ cpu1-start-addr = <0xffd08010>;
+ };
};
};
@@ -56,16 +56,6 @@ static void __init socfpga_scu_map_io(void)
iotable_init(&scu_io_desc, 1);
}
-static void __init init_socfpga_vt(void)
-{
- cpu1start_addr = 0xffd08010;
-}
-
-static void __init init_socfpga(void)
-{
- cpu1start_addr = 0xffd080c4;
-}
-
static void __init socfpga_map_io(void)
{
socfpga_scu_map_io();
@@ -83,6 +73,11 @@ void __init socfpga_sysmgr_init(void)
struct device_node *np;
np = of_find_compatible_node(NULL, NULL, "altr,sys-mgr");
+
+ if (of_property_read_u32(np, "cpu1-start-addr", (u32 *) &cpu1start_addr)) {
+ early_printk("Need cpu1-start-addr in device tree.\n");
+ panic("Need cpu1-start-addr in device tree.\n");
+ }
sys_manager_base_addr = of_iomap(np, 0);
np = of_find_compatible_node(NULL, NULL, "altr,rst-mgr");
@@ -93,11 +88,6 @@ static void __init gic_init_irq(void)
{
of_irq_init(irq_match);
socfpga_sysmgr_init();
-
- if (of_machine_is_compatible("altr,socfpga-vt"))
- init_socfpga_vt();
- else
- init_socfpga();
}
static void socfpga_cyclone5_restart(char mode, const char *cmd)