linux_5.10: weekly rls 2024.05.22
- d3800a, [feat](mtd):support to get size of nand/nor. Change-Id: Ie5ced782898cd3623aa3f75c12a4ab62163dc5c1
This commit is contained in:
committed by
carbon
parent
e94fea1ceb
commit
215b6707eb
@ -668,6 +668,7 @@ static int mtdchar_ioctl(struct file *file, u_int cmd, u_long arg)
|
|||||||
case BLKRRPART:
|
case BLKRRPART:
|
||||||
case OTPREAD:
|
case OTPREAD:
|
||||||
case OTPINFO:
|
case OTPINFO:
|
||||||
|
case GET_ALL_SIZE:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* "dangerous" commands */
|
/* "dangerous" commands */
|
||||||
@ -728,6 +729,14 @@ static int mtdchar_ioctl(struct file *file, u_int cmd, u_long arg)
|
|||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case GET_ALL_SIZE:
|
||||||
|
{
|
||||||
|
u64 size = mtd_get_device_size(mtd);
|
||||||
|
|
||||||
|
if (copy_to_user(argp, &size, sizeof(u64)))
|
||||||
|
return -EFAULT;
|
||||||
|
break;
|
||||||
|
}
|
||||||
case MEMERASE:
|
case MEMERASE:
|
||||||
case MEMERASE64:
|
case MEMERASE64:
|
||||||
{
|
{
|
||||||
|
|||||||
@ -220,8 +220,8 @@ struct otp_message {
|
|||||||
#define OTPWRITE _IOW('M', 25, struct mtd_otp_buf)
|
#define OTPWRITE _IOW('M', 25, struct mtd_otp_buf)
|
||||||
#define OTPREAD _IOR('M', 26, struct mtd_otp_buf)
|
#define OTPREAD _IOR('M', 26, struct mtd_otp_buf)
|
||||||
#define OTPERASE _IOWR('M', 27, struct erase_info_user)
|
#define OTPERASE _IOWR('M', 27, struct erase_info_user)
|
||||||
#define OTPINFO _IOWR('M', 28, struct otp_message)
|
#define OTPINFO _IOWR('M', 28, struct otp_message)
|
||||||
|
#define GET_ALL_SIZE _IOR('M', 29, unsigned long long)
|
||||||
/*
|
/*
|
||||||
* Obsolete legacy interface. Keep it in order not to break userspace
|
* Obsolete legacy interface. Keep it in order not to break userspace
|
||||||
* interfaces
|
* interfaces
|
||||||
|
|||||||
Reference in New Issue
Block a user