Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
af459864
Commit
af459864
authored
Jun 15, 2011
by
Mike Frysinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Blackfin: debug-mmrs: use new gptimer_group layout to simplify code
Signed-off-by:
Mike Frysinger
<
vapier@gentoo.org
>
parent
94674b15
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
18 deletions
+34
-18
arch/blackfin/kernel/debug-mmrs.c
arch/blackfin/kernel/debug-mmrs.c
+34
-18
No files found.
arch/blackfin/kernel/debug-mmrs.c
View file @
af459864
...
@@ -278,6 +278,32 @@ bfin_debug_mmrs_gptimer(struct dentry *parent, unsigned long base, int num)
...
@@ -278,6 +278,32 @@ bfin_debug_mmrs_gptimer(struct dentry *parent, unsigned long base, int num)
}
}
#define GPTIMER(num) bfin_debug_mmrs_gptimer(parent, TIMER##num##_CONFIG, num)
#define GPTIMER(num) bfin_debug_mmrs_gptimer(parent, TIMER##num##_CONFIG, num)
#define GPTIMER_GROUP_OFF(mmr) REGS_OFF(gptimer_group, mmr)
#define __GPTIMER_GROUP(uname, lname) __REGS(gptimer_group, #uname, lname)
static
void
__init
__maybe_unused
bfin_debug_mmrs_gptimer_group
(
struct
dentry
*
parent
,
unsigned
long
base
,
int
num
)
{
char
buf
[
32
],
*
_buf
;
if
(
num
==
-
1
)
{
_buf
=
buf
+
sprintf
(
buf
,
"TIMER_"
);
__GPTIMER_GROUP
(
ENABLE
,
enable
);
__GPTIMER_GROUP
(
DISABLE
,
disable
);
__GPTIMER_GROUP
(
STATUS
,
status
);
}
else
{
/* These MMRs are a bit odd as the group # is a suffix */
_buf
=
buf
+
sprintf
(
buf
,
"TIMER_ENABLE%i"
,
num
);
d
(
buf
,
16
,
base
+
GPTIMER_GROUP_OFF
(
enable
));
_buf
=
buf
+
sprintf
(
buf
,
"TIMER_DISABLE%i"
,
num
);
d
(
buf
,
16
,
base
+
GPTIMER_GROUP_OFF
(
disable
));
_buf
=
buf
+
sprintf
(
buf
,
"TIMER_STATUS%i"
,
num
);
d
(
buf
,
32
,
base
+
GPTIMER_GROUP_OFF
(
status
));
}
}
#define GPTIMER_GROUP(mmr, num) bfin_debug_mmrs_gptimer_group(parent, mmr, num)
/*
/*
* Handshake MDMA
* Handshake MDMA
*/
*/
...
@@ -1006,29 +1032,19 @@ static int __init bfin_debug_mmrs_init(void)
...
@@ -1006,29 +1032,19 @@ static int __init bfin_debug_mmrs_init(void)
#endif
#endif
parent
=
debugfs_create_dir
(
"gptimer"
,
top
);
parent
=
debugfs_create_dir
(
"gptimer"
,
top
);
#ifdef TIMER_DISABLE
#ifdef TIMER_ENABLE
D16
(
TIMER_DISABLE
);
GPTIMER_GROUP
(
TIMER_ENABLE
,
-
1
);
D16
(
TIMER_ENABLE
);
D32
(
TIMER_STATUS
);
#endif
#endif
#ifdef TIMER_DISABLE0
#ifdef TIMER_ENABLE0
D16
(
TIMER_DISABLE0
);
GPTIMER_GROUP
(
TIMER_ENABLE0
,
0
);
D16
(
TIMER_ENABLE0
);
D32
(
TIMER_STATUS0
);
#endif
#endif
#ifdef TIMER_DISABLE1
#ifdef TIMER_ENABLE1
D16
(
TIMER_DISABLE1
);
GPTIMER_GROUP
(
TIMER_ENABLE1
,
1
);
D16
(
TIMER_ENABLE1
);
D32
(
TIMER_STATUS1
);
#endif
#endif
/* XXX: Should convert BF561 MMR names */
/* XXX: Should convert BF561 MMR names */
#ifdef TMRS4_DISABLE
#ifdef TMRS4_DISABLE
D16
(
TMRS4_DISABLE
);
GPTIMER_GROUP
(
TMRS4_ENABLE
,
0
);
D16
(
TMRS4_ENABLE
);
GPTIMER_GROUP
(
TMRS8_ENABLE
,
1
);
D32
(
TMRS4_STATUS
);
D16
(
TMRS8_DISABLE
);
D16
(
TMRS8_ENABLE
);
D32
(
TMRS8_STATUS
);
#endif
#endif
GPTIMER
(
0
);
GPTIMER
(
0
);
GPTIMER
(
1
);
GPTIMER
(
1
);
...
...
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