1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-02 01:02:19 +02:00

sysreset: Tidy up a few comments and logging

Some comments are incorrect or missing pieces. Fix these and use logging
to print the error.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2018-10-01 12:22:45 -06:00
parent 595aac9824
commit eb517315a6
3 changed files with 6 additions and 3 deletions

View File

@@ -4,6 +4,8 @@
* Written by Simon Glass <sjg@chromium.org> * Written by Simon Glass <sjg@chromium.org>
*/ */
#define LOG_CATEGORY UCLASS_SYSRESET
#include <common.h> #include <common.h>
#include <sysreset.h> #include <sysreset.h>
#include <dm.h> #include <dm.h>
@@ -64,7 +66,7 @@ void sysreset_walk_halt(enum sysreset_t type)
mdelay(100); mdelay(100);
/* Still no reset? Give up */ /* Still no reset? Give up */
debug("System reset not supported on this platform\n"); log_err("System reset not supported on this platform\n");
hang(); hang();
} }

View File

@@ -31,6 +31,7 @@ struct sysreset_ops {
/** /**
* get_status() - get printable reset status information * get_status() - get printable reset status information
* *
* @dev: Device to check
* @buf: Buffer to receive the textual reset information * @buf: Buffer to receive the textual reset information
* @size: Size of the passed buffer * @size: Size of the passed buffer
* @return 0 if OK, -ve on error * @return 0 if OK, -ve on error
@@ -49,8 +50,9 @@ struct sysreset_ops {
int sysreset_request(struct udevice *dev, enum sysreset_t type); int sysreset_request(struct udevice *dev, enum sysreset_t type);
/** /**
* get_status() - get printable reset status information * sysreset_get_status() - get printable reset status information
* *
* @dev: Device to check
* @buf: Buffer to receive the textual reset information * @buf: Buffer to receive the textual reset information
* @size: Size of the passed buffer * @size: Size of the passed buffer
* @return 0 if OK, -ve on error * @return 0 if OK, -ve on error

View File

@@ -62,7 +62,6 @@ static int dm_test_sysreset_get_status(struct unit_test_state *uts)
return 0; return 0;
} }
DM_TEST(dm_test_sysreset_get_status, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT); DM_TEST(dm_test_sysreset_get_status, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
/* Test that we can walk through the sysreset devices */ /* Test that we can walk through the sysreset devices */