Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
lede-mikrotik
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
Johannes Rudolph
lede-mikrotik
Commits
af9cf4a7
Commit
af9cf4a7
authored
17 years ago
by
Matteo Croce
Browse files
Options
Downloads
Patches
Plain Diff
gpio: revert it back, wrong and useless
SVN-Revision: 10181
parent
5d249c89
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
target/linux/ar7/files/include/asm-mips/ar7/gpio.h
+5
-13
5 additions, 13 deletions
target/linux/ar7/files/include/asm-mips/ar7/gpio.h
with
5 additions
and
13 deletions
target/linux/ar7/files/include/asm-mips/ar7/gpio.h
+
5
−
13
View file @
af9cf4a7
...
@@ -28,26 +28,18 @@ extern void gpio_free(unsigned gpio);
...
@@ -28,26 +28,18 @@ extern void gpio_free(unsigned gpio);
/* Common GPIO layer */
/* Common GPIO layer */
static
inline
int
gpio_get_value
(
unsigned
gpio
)
static
inline
int
gpio_get_value
(
unsigned
gpio
)
{
{
static
unsigned
addr
;
void
__iomem
*
gpio_in
=
(
void
__iomem
*
)
KSEG1ADDR
(
AR7_REGS_GPIO
+
AR7_GPIO_INPUT
);
if
(
!
addr
)
{
return
readl
(
gpio_in
)
&
(
1
<<
gpio
);
void
__iomem
*
gpio_in
=
(
void
__iomem
*
)
KSEG1ADDR
(
AR7_REGS_GPIO
+
AR7_GPIO_INPUT
);
addr
=
readl
(
gpio_in
);
}
return
addr
&
(
1
<<
gpio
);
}
}
static
inline
void
gpio_set_value
(
unsigned
gpio
,
int
value
)
static
inline
void
gpio_set_value
(
unsigned
gpio
,
int
value
)
{
{
static
void
__iomem
*
gpio_out
;
void
__iomem
*
gpio_out
=
(
void
__iomem
*
)
KSEG1ADDR
(
AR7_REGS_GPIO
+
AR7_GPIO_OUTPUT
);
unsigned
tmp
;
unsigned
tmp
;
if
(
!
gpio_out
)
gpio_out
=
(
void
__iomem
*
)
KSEG1ADDR
(
AR7_REGS_GPIO
+
AR7_GPIO_OUTPUT
);
tmp
=
readl
(
gpio_out
)
&
~
(
1
<<
gpio
);
tmp
=
readl
(
gpio_out
)
&
~
(
1
<<
gpio
);
if
(
value
)
if
(
value
)
tmp
|=
1
<<
gpio
;
tmp
|=
1
<<
gpio
;
...
...
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