Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
KED U-Boot Fork
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
KED Software Projects
Miscellaneous
KED U-Boot Fork
Commits
4a35d607
Commit
4a35d607
authored
10 years ago
by
Masahiro Yamada
Browse files
Options
Downloads
Patches
Plain Diff
ARM: UniPhier: use <linux/sizes.h> for readability
Signed-off-by:
Masahiro Yamada
<
yamada.m@jp.panasonic.com
>
parent
ee94ee34
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
arch/arm/include/asm/arch-uniphier/sg-regs.h
+13
-12
13 additions, 12 deletions
arch/arm/include/asm/arch-uniphier/sg-regs.h
with
13 additions
and
12 deletions
arch/arm/include/asm/arch-uniphier/sg-regs.h
+
13
−
12
View file @
4a35d607
...
...
@@ -101,6 +101,7 @@
#else
#include
<linux/types.h>
#include
<linux/sizes.h>
#include
<asm/io.h>
static
inline
void
sg_set_pinsel
(
int
n
,
int
value
)
...
...
@@ -111,23 +112,23 @@ static inline void sg_set_pinsel(int n, int value)
static
inline
u32
sg_memconf_val_ch0
(
unsigned
long
size
,
int
num
)
{
int
size_mb
=
(
size
>>
20
)
/
num
;
int
size_mb
=
size
/
num
;
u32
ret
;
switch
(
size_mb
)
{
case
64
:
case
SZ_
64
M
:
ret
=
SG_MEMCONF_CH0_SIZE_64MB
;
break
;
case
128
:
case
SZ_
128
M
:
ret
=
SG_MEMCONF_CH0_SIZE_128MB
;
break
;
case
256
:
case
SZ_
256
M
:
ret
=
SG_MEMCONF_CH0_SIZE_256MB
;
break
;
case
512
:
case
SZ_
512
M
:
ret
=
SG_MEMCONF_CH0_SIZE_512MB
;
break
;
case
1024
:
case
SZ_1G
:
ret
=
SG_MEMCONF_CH0_SIZE_1024MB
;
break
;
default:
...
...
@@ -151,23 +152,23 @@ static inline u32 sg_memconf_val_ch0(unsigned long size, int num)
static
inline
u32
sg_memconf_val_ch1
(
unsigned
long
size
,
int
num
)
{
int
size_mb
=
(
size
>>
20
)
/
num
;
int
size_mb
=
size
/
num
;
u32
ret
;
switch
(
size_mb
)
{
case
64
:
case
SZ_
64
M
:
ret
=
SG_MEMCONF_CH1_SIZE_64MB
;
break
;
case
128
:
case
SZ_
128
M
:
ret
=
SG_MEMCONF_CH1_SIZE_128MB
;
break
;
case
256
:
case
SZ_
256
M
:
ret
=
SG_MEMCONF_CH1_SIZE_256MB
;
break
;
case
512
:
case
SZ_
512
M
:
ret
=
SG_MEMCONF_CH1_SIZE_512MB
;
break
;
case
1024
:
case
SZ_1G
:
ret
=
SG_MEMCONF_CH1_SIZE_1024MB
;
break
;
default:
...
...
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