]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/mips/cavium-octeon/setup.c
MIPS: Octeon: Use model string from DTB for unknown board type
[karo-tx-linux.git] / arch / mips / cavium-octeon / setup.c
index 09a83cd6bfe81a329a1beacb3e9b7c4a32d21884..37ac229bebb6d0e2bb75d3a55da631dbf8ce67b3 100644 (file)
@@ -469,8 +469,16 @@ static void __init init_octeon_system_type(void)
        char const *board_type;
 
        board_type = cvmx_board_type_to_string(octeon_bootinfo->board_type);
-       if (board_type == NULL)
-               board_type = "Unsupported Board";
+       if (board_type == NULL) {
+               struct device_node *root;
+               int ret;
+
+               root = of_find_node_by_path("/");
+               ret = of_property_read_string(root, "model", &board_type);
+               of_node_put(root);
+               if (ret)
+                       board_type = "Unsupported Board";
+       }
 
        snprintf(octeon_system_type, sizeof(octeon_system_type), "%s (%s)",
                 board_type, octeon_model_get_string(read_c0_prid()));