misc: rockchip efuse & otp: remove the cmd code from driver file
Change-Id: I3c1f89a92770d69234cf0fdc6811b05fa275f262 Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
This commit is contained in:
parent
fb09b07158
commit
95e4d4078e
|
|
@ -105,47 +105,6 @@ struct rockchip_efuse_platdata {
|
|||
struct clk *clk;
|
||||
};
|
||||
|
||||
#if defined(DEBUG)
|
||||
static int dump_efuses(cmd_tbl_t *cmdtp, int flag,
|
||||
int argc, char * const argv[])
|
||||
{
|
||||
/*
|
||||
* N.B.: This function is tailored towards the RK3399 and assumes that
|
||||
* there's always 32 fuses x 32 bits (i.e. 128 bytes of data) to
|
||||
* be read.
|
||||
*/
|
||||
|
||||
struct udevice *dev;
|
||||
u8 fuses[128] = {0};
|
||||
int ret;
|
||||
|
||||
/* retrieve the device */
|
||||
ret = uclass_get_device_by_driver(UCLASS_MISC,
|
||||
DM_GET_DRIVER(rockchip_efuse), &dev);
|
||||
if (ret) {
|
||||
printf("%s: no misc-device found\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
ret = misc_read(dev, 0, &fuses, sizeof(fuses));
|
||||
if (ret) {
|
||||
printf("%s: misc_read failed\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
printf("efuse-contents:\n");
|
||||
print_buffer(0, fuses, 1, 128, 16);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
U_BOOT_CMD(
|
||||
rockchip_dump_efuses, 1, 1, dump_efuses,
|
||||
"Dump the content of the efuses",
|
||||
""
|
||||
);
|
||||
#endif
|
||||
|
||||
static void rk1808_efuse_timing_init(void __iomem *base)
|
||||
{
|
||||
static bool init;
|
||||
|
|
|
|||
|
|
@ -52,41 +52,6 @@ struct rockchip_otp_platdata {
|
|||
void __iomem *base;
|
||||
};
|
||||
|
||||
#if defined(DEBUG)
|
||||
static int dump_otps(cmd_tbl_t *cmdtp, int flag,
|
||||
int argc, char * const argv[])
|
||||
{
|
||||
struct udevice *dev;
|
||||
u8 otps[64] = {0};
|
||||
int ret;
|
||||
|
||||
/* retrieve the device */
|
||||
ret = uclass_get_device_by_driver(UCLASS_MISC,
|
||||
DM_GET_DRIVER(rockchip_otp), &dev);
|
||||
if (ret) {
|
||||
printf("%s: no misc-device found\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
ret = misc_read(dev, 0, &otps, sizeof(otps));
|
||||
if (ret) {
|
||||
printf("%s: misc_read failed\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
printf("otp-contents:\n");
|
||||
print_buffer(0, otps, 1, 64, 16);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
U_BOOT_CMD(
|
||||
rockchip_dump_otps, 1, 1, dump_otps,
|
||||
"Dump the content of the otps",
|
||||
""
|
||||
);
|
||||
#endif
|
||||
|
||||
static int rockchip_otp_wait_status(struct rockchip_otp_platdata *otp,
|
||||
u32 flag)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue