Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib: fix warning message of timer in boot phase #37

Merged
merged 1 commit into from
Dec 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions lib/utils/reset/fdt_reset_sg2042_hwmon_mcu.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
#include <sbi_utils/reset/fdt_reset.h>
#include <sbi_utils/i2c/fdt_i2c.h>

#define MANGO_BOARD_TYPE_MASK 0x80

#define REG_BOARD_TYPE 0x00
#define REG_CMD 0x03

#define CMD_POWEROFF 0x02
Expand Down Expand Up @@ -60,22 +57,6 @@ static struct sbi_system_reset_device sg2042_mcu_reset_device = {
.system_reset = sg2042_mcu_reset
};

static int sg2042_mcu_reset_check_board(struct i2c_adapter *adap, uint32_t reg)
{
static uint8_t val;
int ret;

/* check board type */
ret = i2c_adapter_reg_read(adap, reg, REG_BOARD_TYPE, &val);
if (ret)
return ret;

if (!(val & MANGO_BOARD_TYPE_MASK))
return SBI_ENODEV;

return 0;
}

static int sg2042_mcu_reset_init(const void *fdt, int nodeoff,
const struct fdt_match *match)
{
Expand All @@ -96,8 +77,6 @@ static int sg2042_mcu_reset_init(const void *fdt, int nodeoff,
if (ret)
return ret;

ret = sg2042_mcu_reset_check_board(mcu_adapter, mcu_reg);

sbi_system_reset_add_device(&sg2042_mcu_reset_device);

return 0;
Expand Down
Loading