Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-elphel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
linux-elphel
Commits
aa4f59d9
Commit
aa4f59d9
authored
Nov 22, 2017
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update micron driver
parent
fb001670
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
nandchip-micron.c
src/drivers/mtd/nand/nandchip-micron.c
+7
-3
No files found.
src/drivers/mtd/nand/nandchip-micron.c
View file @
aa4f59d9
...
@@ -14,11 +14,15 @@
...
@@ -14,11 +14,15 @@
#define MICRON_NUM_OTP_FIRSTPAGE 2
#define MICRON_NUM_OTP_FIRSTPAGE 2
#define MICRON_NUM_OTP_PAGES 30
#define MICRON_NUM_OTP_PAGES 30
static
int
mt29f_get_user_prot_info
(
struct
mtd_info
*
mtd
,
struct
otp_info
*
buf
,
// Elphel, Rocko
size_t
len
)
//static int mt29f_get_user_prot_info(struct mtd_info *mtd, struct otp_info *buf, size_t len)
static
int
mt29f_get_user_prot_info
(
struct
mtd_info
*
mtd
,
size_t
len
,
size_t
*
retlen
,
struct
otp_info
*
buf
)
{
{
int
i
;
int
i
;
// Elphel, Rocko
*
retlen
=
0
;
if
(
len
<
MICRON_NUM_OTP_PAGES
*
sizeof
(
*
buf
))
if
(
len
<
MICRON_NUM_OTP_PAGES
*
sizeof
(
*
buf
))
return
-
ENOSPC
;
return
-
ENOSPC
;
...
@@ -44,7 +48,7 @@ static int mt29f_read_user_prot_reg(struct mtd_info *mtd, loff_t from,
...
@@ -44,7 +48,7 @@ static int mt29f_read_user_prot_reg(struct mtd_info *mtd, loff_t from,
struct
nand_chip
*
chip
=
mtd
->
priv
;
struct
nand_chip
*
chip
=
mtd
->
priv
;
struct
mtd_oob_ops
ops
;
struct
mtd_oob_ops
ops
;
int
ret
;
int
ret
;
u8
get_feature
,
i
;
u8
get_feature
;
/* Valid pages in otp are 02h-1Fh. */
/* Valid pages in otp are 02h-1Fh. */
if
(
from
>
MICRON_NUM_OTP_PAGES
<<
chip
->
page_shift
)
if
(
from
>
MICRON_NUM_OTP_PAGES
<<
chip
->
page_shift
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment