diff options
author | Michal Simek <monstr@monstr.eu> | 2007-05-07 17:11:09 +0200 |
---|---|---|
committer | Michal Simek <monstr@monstr.eu> | 2007-05-07 17:11:09 +0200 |
commit | 48fbd3a4cdabbebc1debd7eed73c00c2caf914f6 (patch) | |
tree | 63ba621165566abb6fb48e0fb472c6b4f8183025 /common/cmd_mfsl.c | |
parent | ffc50f9bb194343c6303517a517708457a5eb6b8 (diff) |
new: add writing to msr register
Diffstat (limited to 'common/cmd_mfsl.c')
-rw-r--r-- | common/cmd_mfsl.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/common/cmd_mfsl.c b/common/cmd_mfsl.c index 827b75e6ce2..ca8a8897d57 100644 --- a/common/cmd_mfsl.c +++ b/common/cmd_mfsl.c @@ -238,13 +238,19 @@ int do_fwr (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) int do_rmsr (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) { - int val = 0; + unsigned int val = 0; + val = (unsigned int)simple_strtoul (argv[1], NULL, 16); if (argc < 1) { printf ("Usage:\n%s\n", cmdtp->usage); return 1; } - RMSR (val); + if (argc > 1) { + MTS (val); + MFS (val); + } else { + MFS (val); + } printf ("rmsr: 0x%08lx\n", val); return 0; } @@ -259,7 +265,7 @@ U_BOOT_CMD (fwr, 4, 1, do_fwr, "fwr - write data to FSL\n", "- [fslnum data [0|x]], (0 - non blocking|x - blocking).\n"); -U_BOOT_CMD (rmsr, 1, 1, do_rmsr, +U_BOOT_CMD (rmsr, 3, 1, do_rmsr, "rmsr - read MSR register\n", "- read MSR register.\n"); -#endif /* CONFIG_MICROBLAZE & CFG_CMD_MFSL */ +#endif /* CONFIG_MICROBLAZE & CFG_CMD_MFSL */ |