Kernel watchdog timeout

Implement kernel watchdog that detects when firmware becomes
unresponsive.

Change-Id: I5c5b58a56a2ce629e1fd7cabae83b61823239ea6
diff --git a/kernel/ethosu_network_info.c b/kernel/ethosu_network_info.c
index 2b1f841..24be677 100644
--- a/kernel/ethosu_network_info.c
+++ b/kernel/ethosu_network_info.c
@@ -47,6 +47,24 @@
 	devm_kfree(info->edev->dev, info);
 }
 
+static int ethosu_network_info_send(struct ethosu_network_info *info)
+{
+	int ret;
+
+	/* Send network info request to firmware */
+	ret = ethosu_mailbox_network_info_request(&info->edev->mailbox,
+						  info,
+						  info->net->buf,
+						  info->net->index);
+	if (ret)
+		return ret;
+
+	/* Increase reference count for the pending network info response */
+	ethosu_network_info_get(info);
+
+	return 0;
+}
+
 struct ethosu_network_info *ethosu_network_info_create(
 	struct ethosu_device *edev,
 	struct ethosu_network *net,
@@ -71,17 +89,10 @@
 	/* Get reference to network */
 	ethosu_network_get(net);
 
-	/* Send network info request to firmware */
-	ret = ethosu_mailbox_network_info_request(&info->edev->mailbox,
-						  info,
-						  info->net->buf,
-						  info->net->index);
+	ret = ethosu_network_info_send(info);
 	if (ret)
 		goto put_info;
 
-	/* Increase reference count for the pending network info response */
-	ethosu_network_info_get(info);
-
 	dev_info(edev->dev, "Network info create. handle=%p\n", info);
 
 	return info;