Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
PPSi
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
50
Issues
50
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
PPSi
Commits
96f4b173
Commit
96f4b173
authored
Jul 21, 2012
by
Aurelio Colosimo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
arch-spec/dev/irq.c copied from wrpc-sw (commit 82fd420e) and compiled
parent
5dd2ab04
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
6 deletions
+40
-6
Makefile
arch-spec/Makefile
+1
-0
irq.c
arch-spec/dev/irq.c
+39
-0
spec-startup.c
arch-spec/spec-startup.c
+0
-6
No files found.
arch-spec/Makefile
View file @
96f4b173
...
...
@@ -23,6 +23,7 @@ OBJ-libarch := $A/spec-startup.o \
$A
/dev/pps_gen.o
\
$A
/dev/minic.o
\
$A
/dev/softpll_ng.o
\
$A
/dev/irq.o
\
lib/div64.o
$(LIBARCH)
:
$(OBJ-libarch)
...
...
arch-spec/dev/irq.c
0 → 100644
View file @
96f4b173
#include "irq.h"
void
disable_irq
()
{
unsigned
int
ie
,
im
;
unsigned
int
Mask
=
~
1
;
/* disable peripheral interrupts in case they were enabled */
asm
volatile
(
"rcsr %0,ie"
:
"=r"
(
ie
));
ie
&=
(
~
0x1
);
asm
volatile
(
"wcsr ie, %0"
::
"r"
(
ie
));
/* disable mask-bit in im */
asm
volatile
(
"rcsr %0, im"
:
"=r"
(
im
));
im
&=
Mask
;
asm
volatile
(
"wcsr im, %0"
::
"r"
(
im
));
}
void
enable_irq
()
{
unsigned
int
ie
,
im
;
unsigned
int
Mask
=
1
;
/* disable peripheral interrupts in-case they were enabled*/
asm
volatile
(
"rcsr %0,ie"
:
"=r"
(
ie
));
ie
&=
(
~
0x1
);
asm
volatile
(
"wcsr ie, %0"
::
"r"
(
ie
));
/* enable mask-bit in im */
asm
volatile
(
"rcsr %0, im"
:
"=r"
(
im
));
im
|=
Mask
;
asm
volatile
(
"wcsr im, %0"
::
"r"
(
im
));
ie
|=
0x1
;
asm
volatile
(
"wcsr ie, %0"
::
"r"
(
ie
));
}
arch-spec/spec-startup.c
View file @
96f4b173
...
...
@@ -64,9 +64,3 @@ void ppsi_main(void)
/* Our crt0.S is unchanged: it wants a "main" function, and "_irq_entry" too" */
int
main
(
void
)
__attribute__
((
alias
(
"ppsi_main"
)));
void
_irq_entry
(
void
)
{
return
;
}
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