Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openwrt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Freifunk Luebeck
openwrt
Commits
23a61730
Commit
23a61730
authored
14 years ago
by
Gabor Juhos
Browse files
Options
Downloads
Patches
Plain Diff
ar71xx: use gpio_*_cansleep calls in the rb4xx NAND driver
SVN-Revision: 24944
parent
5641e823
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
target/linux/ar71xx/files/drivers/mtd/nand/rb4xx_nand.c
+8
-5
8 additions, 5 deletions
target/linux/ar71xx/files/drivers/mtd/nand/rb4xx_nand.c
with
8 additions
and
5 deletions
target/linux/ar71xx/files/drivers/mtd/nand/rb4xx_nand.c
+
8
−
5
View file @
23a61730
/*
* NAND flash driver for the MikroTik RouterBoard 4xx series
*
* Copyright (C) 2008-201
0
Gabor Juhos <juhosg@openwrt.org>
* Copyright (C) 2008-201
1
Gabor Juhos <juhosg@openwrt.org>
* Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
*
* This file was based on the driver for Linux 2.6.22 published by
...
...
@@ -71,7 +71,7 @@ static struct mtd_partition rb4xx_nand_partitions[] = {
static
int
rb4xx_nand_dev_ready
(
struct
mtd_info
*
mtd
)
{
return
gpio_get_value
(
RB4XX_NAND_GPIO_READY
);
return
gpio_get_value
_cansleep
(
RB4XX_NAND_GPIO_READY
);
}
static
void
rb4xx_nand_write_cmd
(
unsigned
char
cmd
)
...
...
@@ -88,9 +88,12 @@ static void rb4xx_nand_cmd_ctrl(struct mtd_info *mtd, int cmd,
unsigned
int
ctrl
)
{
if
(
ctrl
&
NAND_CTRL_CHANGE
)
{
gpio_set_value
(
RB4XX_NAND_GPIO_CLE
,
(
ctrl
&
NAND_CLE
)
?
1
:
0
);
gpio_set_value
(
RB4XX_NAND_GPIO_ALE
,
(
ctrl
&
NAND_ALE
)
?
1
:
0
);
gpio_set_value
(
RB4XX_NAND_GPIO_NCE
,
(
ctrl
&
NAND_NCE
)
?
0
:
1
);
gpio_set_value_cansleep
(
RB4XX_NAND_GPIO_CLE
,
(
ctrl
&
NAND_CLE
)
?
1
:
0
);
gpio_set_value_cansleep
(
RB4XX_NAND_GPIO_ALE
,
(
ctrl
&
NAND_ALE
)
?
1
:
0
);
gpio_set_value_cansleep
(
RB4XX_NAND_GPIO_NCE
,
(
ctrl
&
NAND_NCE
)
?
0
:
1
);
}
if
(
cmd
!=
NAND_CMD_NONE
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment