Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
f06368f7
Commit
f06368f7
authored
Oct 05, 2009
by
Sascha Hauer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mxc_nand: disable sp_en bit only once
Signed-off-by:
Sascha Hauer
<
s.hauer@pengutronix.de
>
parent
9467114e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
12 deletions
+3
-12
drivers/mtd/nand/mxc_nand.c
drivers/mtd/nand/mxc_nand.c
+3
-12
No files found.
drivers/mtd/nand/mxc_nand.c
View file @
f06368f7
...
@@ -274,16 +274,10 @@ static void send_page(struct mtd_info *mtd, unsigned int ops)
...
@@ -274,16 +274,10 @@ static void send_page(struct mtd_info *mtd, unsigned int ops)
static
void
send_read_id
(
struct
mxc_nand_host
*
host
)
static
void
send_read_id
(
struct
mxc_nand_host
*
host
)
{
{
struct
nand_chip
*
this
=
&
host
->
nand
;
struct
nand_chip
*
this
=
&
host
->
nand
;
uint16_t
tmp
;
/* NANDFC buffer 0 is used for device ID output */
/* NANDFC buffer 0 is used for device ID output */
writew
(
0x0
,
host
->
regs
+
NFC_BUF_ADDR
);
writew
(
0x0
,
host
->
regs
+
NFC_BUF_ADDR
);
/* Read ID into main buffer */
tmp
=
readw
(
host
->
regs
+
NFC_CONFIG1
);
tmp
&=
~
NFC_SP_EN
;
writew
(
tmp
,
host
->
regs
+
NFC_CONFIG1
);
writew
(
NFC_ID
,
host
->
regs
+
NFC_CONFIG2
);
writew
(
NFC_ID
,
host
->
regs
+
NFC_CONFIG2
);
/* Wait for operation to complete */
/* Wait for operation to complete */
...
@@ -307,7 +301,7 @@ static uint16_t get_dev_status(struct mxc_nand_host *host)
...
@@ -307,7 +301,7 @@ static uint16_t get_dev_status(struct mxc_nand_host *host)
{
{
void
__iomem
*
main_buf
=
host
->
main_area1
;
void
__iomem
*
main_buf
=
host
->
main_area1
;
uint32_t
store
;
uint32_t
store
;
uint16_t
ret
,
tmp
;
uint16_t
ret
;
/* Issue status request to NAND device */
/* Issue status request to NAND device */
/* store the main area1 first word, later do recovery */
/* store the main area1 first word, later do recovery */
...
@@ -316,11 +310,6 @@ static uint16_t get_dev_status(struct mxc_nand_host *host)
...
@@ -316,11 +310,6 @@ static uint16_t get_dev_status(struct mxc_nand_host *host)
* corruption of read/write buffer on status requests. */
* corruption of read/write buffer on status requests. */
writew
(
1
,
host
->
regs
+
NFC_BUF_ADDR
);
writew
(
1
,
host
->
regs
+
NFC_BUF_ADDR
);
/* Read status into main buffer */
tmp
=
readw
(
host
->
regs
+
NFC_CONFIG1
);
tmp
&=
~
NFC_SP_EN
;
writew
(
tmp
,
host
->
regs
+
NFC_CONFIG1
);
writew
(
NFC_STATUS
,
host
->
regs
+
NFC_CONFIG2
);
writew
(
NFC_STATUS
,
host
->
regs
+
NFC_CONFIG2
);
/* Wait for operation to complete */
/* Wait for operation to complete */
...
@@ -739,8 +728,10 @@ static int __init mxcnd_probe(struct platform_device *pdev)
...
@@ -739,8 +728,10 @@ static int __init mxcnd_probe(struct platform_device *pdev)
}
else
}
else
BUG
();
BUG
();
/* disable interrupt and spare enable */
tmp
=
readw
(
host
->
regs
+
NFC_CONFIG1
);
tmp
=
readw
(
host
->
regs
+
NFC_CONFIG1
);
tmp
|=
NFC_INT_MSK
;
tmp
|=
NFC_INT_MSK
;
tmp
&=
~
NFC_SP_EN
;
writew
(
tmp
,
host
->
regs
+
NFC_CONFIG1
);
writew
(
tmp
,
host
->
regs
+
NFC_CONFIG1
);
init_waitqueue_head
(
&
host
->
irq_waitq
);
init_waitqueue_head
(
&
host
->
irq_waitq
);
...
...
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