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
91340d8a
Commit
91340d8a
authored
13 years ago
by
Gabor Juhos
Browse files
Options
Downloads
Patches
Plain Diff
ar71xx: add ar71xx_device_reset_rmw helper
SVN-Revision: 28275
parent
9fa51d5c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
target/linux/ar71xx/files/arch/mips/ar71xx/ar71xx.c
+48
-0
48 additions, 0 deletions
target/linux/ar71xx/files/arch/mips/ar71xx/ar71xx.c
target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/ar71xx.h
+1
-0
1 addition, 0 deletions
...x/ar71xx/files/arch/mips/include/asm/mach-ar71xx/ar71xx.h
with
49 additions
and
0 deletions
target/linux/ar71xx/files/arch/mips/ar71xx/ar71xx.c
+
48
−
0
View file @
91340d8a
...
@@ -153,6 +153,54 @@ void ar71xx_device_start(u32 mask)
...
@@ -153,6 +153,54 @@ void ar71xx_device_start(u32 mask)
}
}
EXPORT_SYMBOL_GPL
(
ar71xx_device_start
);
EXPORT_SYMBOL_GPL
(
ar71xx_device_start
);
void
ar71xx_device_reset_rmw
(
u32
clear
,
u32
set
)
{
unsigned
long
flags
;
unsigned
int
reg
;
u32
t
;
switch
(
ar71xx_soc
)
{
case
AR71XX_SOC_AR7130
:
case
AR71XX_SOC_AR7141
:
case
AR71XX_SOC_AR7161
:
reg
=
AR71XX_RESET_REG_RESET_MODULE
;
break
;
case
AR71XX_SOC_AR7240
:
case
AR71XX_SOC_AR7241
:
case
AR71XX_SOC_AR7242
:
reg
=
AR724X_RESET_REG_RESET_MODULE
;
break
;
case
AR71XX_SOC_AR9130
:
case
AR71XX_SOC_AR9132
:
reg
=
AR91XX_RESET_REG_RESET_MODULE
;
break
;
case
AR71XX_SOC_AR9330
:
case
AR71XX_SOC_AR9331
:
reg
=
AR933X_RESET_REG_RESET_MODULE
;
break
;
case
AR71XX_SOC_AR9341
:
case
AR71XX_SOC_AR9342
:
case
AR71XX_SOC_AR9344
:
reg
=
AR934X_RESET_REG_RESET_MODULE
;
break
;
default:
BUG
();
}
spin_lock_irqsave
(
&
ar71xx_device_lock
,
flags
);
t
=
ar71xx_reset_rr
(
reg
);
t
&=
~
clear
;
t
|=
set
;
ar71xx_reset_wr
(
reg
,
t
);
spin_unlock_irqrestore
(
&
ar71xx_device_lock
,
flags
);
}
EXPORT_SYMBOL_GPL
(
ar71xx_device_reset_rmw
);
int
ar71xx_device_stopped
(
u32
mask
)
int
ar71xx_device_stopped
(
u32
mask
)
{
{
unsigned
long
flags
;
unsigned
long
flags
;
...
...
This diff is collapsed.
Click to expand it.
target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/ar71xx.h
+
1
−
0
View file @
91340d8a
...
@@ -724,6 +724,7 @@ static inline u32 ar71xx_reset_rr(unsigned reg)
...
@@ -724,6 +724,7 @@ static inline u32 ar71xx_reset_rr(unsigned reg)
void
ar71xx_device_stop
(
u32
mask
);
void
ar71xx_device_stop
(
u32
mask
);
void
ar71xx_device_start
(
u32
mask
);
void
ar71xx_device_start
(
u32
mask
);
void
ar71xx_device_reset_rmw
(
u32
clear
,
u32
set
);
int
ar71xx_device_stopped
(
u32
mask
);
int
ar71xx_device_stopped
(
u32
mask
);
/*
/*
...
...
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