Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Arm Trusted Firmware
Commits
19ea62d3
Commit
19ea62d3
authored
May 16, 2014
by
Andrew Thoelke
Browse files
Merge pull request #68 from jcastillo-arm/jc/tf-issues/137
Change-Id: If8744c38c2d5c50caa7454b055e2ba418cf1e8bf
parents
af0a9618
42a52d89
Changes
1
Show whitespace changes
Inline
Side-by-side
drivers/arm/gic/gic_v2.c
View file @
19ea62d3
...
@@ -214,49 +214,43 @@ void gicd_clr_igroupr(unsigned int base, unsigned int id)
...
@@ -214,49 +214,43 @@ void gicd_clr_igroupr(unsigned int base, unsigned int id)
void
gicd_set_isenabler
(
unsigned
int
base
,
unsigned
int
id
)
void
gicd_set_isenabler
(
unsigned
int
base
,
unsigned
int
id
)
{
{
unsigned
bit_num
=
id
&
((
1
<<
ISENABLER_SHIFT
)
-
1
);
unsigned
bit_num
=
id
&
((
1
<<
ISENABLER_SHIFT
)
-
1
);
unsigned
int
reg_val
=
gicd_read_isenabler
(
base
,
id
);
gicd_write_isenabler
(
base
,
id
,
reg_val
|
(
1
<<
bit_num
));
gicd_write_isenabler
(
base
,
id
,
(
1
<<
bit_num
));
}
}
void
gicd_set_icenabler
(
unsigned
int
base
,
unsigned
int
id
)
void
gicd_set_icenabler
(
unsigned
int
base
,
unsigned
int
id
)
{
{
unsigned
bit_num
=
id
&
((
1
<<
ICENABLER_SHIFT
)
-
1
);
unsigned
bit_num
=
id
&
((
1
<<
ICENABLER_SHIFT
)
-
1
);
unsigned
int
reg_val
=
gicd_read_icenabler
(
base
,
id
);
gicd_write_icenabler
(
base
,
id
,
reg_val
&
~
(
1
<<
bit_num
));
gicd_write_icenabler
(
base
,
id
,
(
1
<<
bit_num
));
}
}
void
gicd_set_ispendr
(
unsigned
int
base
,
unsigned
int
id
)
void
gicd_set_ispendr
(
unsigned
int
base
,
unsigned
int
id
)
{
{
unsigned
bit_num
=
id
&
((
1
<<
ISPENDR_SHIFT
)
-
1
);
unsigned
bit_num
=
id
&
((
1
<<
ISPENDR_SHIFT
)
-
1
);
unsigned
int
reg_val
=
gicd_read_ispendr
(
base
,
id
);
gicd_write_ispendr
(
base
,
id
,
reg_val
|
(
1
<<
bit_num
));
gicd_write_ispendr
(
base
,
id
,
(
1
<<
bit_num
));
}
}
void
gicd_set_icpendr
(
unsigned
int
base
,
unsigned
int
id
)
void
gicd_set_icpendr
(
unsigned
int
base
,
unsigned
int
id
)
{
{
unsigned
bit_num
=
id
&
((
1
<<
ICPENDR_SHIFT
)
-
1
);
unsigned
bit_num
=
id
&
((
1
<<
ICPENDR_SHIFT
)
-
1
);
unsigned
int
reg_val
=
gicd_read_icpendr
(
base
,
id
);
gicd_write_icpendr
(
base
,
id
,
reg_val
&
~
(
1
<<
bit_num
));
gicd_write_icpendr
(
base
,
id
,
(
1
<<
bit_num
));
}
}
void
gicd_set_isactiver
(
unsigned
int
base
,
unsigned
int
id
)
void
gicd_set_isactiver
(
unsigned
int
base
,
unsigned
int
id
)
{
{
unsigned
bit_num
=
id
&
((
1
<<
ISACTIVER_SHIFT
)
-
1
);
unsigned
bit_num
=
id
&
((
1
<<
ISACTIVER_SHIFT
)
-
1
);
unsigned
int
reg_val
=
gicd_read_isactiver
(
base
,
id
);
gicd_write_isactiver
(
base
,
id
,
reg_val
|
(
1
<<
bit_num
));
gicd_write_isactiver
(
base
,
id
,
(
1
<<
bit_num
));
}
}
void
gicd_set_icactiver
(
unsigned
int
base
,
unsigned
int
id
)
void
gicd_set_icactiver
(
unsigned
int
base
,
unsigned
int
id
)
{
{
unsigned
bit_num
=
id
&
((
1
<<
ICACTIVER_SHIFT
)
-
1
);
unsigned
bit_num
=
id
&
((
1
<<
ICACTIVER_SHIFT
)
-
1
);
unsigned
int
reg_val
=
gicd_read_icactiver
(
base
,
id
);
gicd_write_icactiver
(
base
,
id
,
reg_val
&
~
(
1
<<
bit_num
));
gicd_write_icactiver
(
base
,
id
,
(
1
<<
bit_num
));
}
}
/*
/*
...
...
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