Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
u-boot-2015.04
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
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
vesta
u-boot-2015.04
Commits
0809ea2f
Commit
0809ea2f
authored
16 years ago
by
Heiko Schocher
Committed by
Wolfgang Denk
16 years ago
Browse files
Options
Downloads
Patches
Plain Diff
mgcoge: fix Coding Style issues.
Signed-off-by:
Heiko Schocher
<
hs@denx.de
>
parent
e43a27c4
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
board/keymile/mgcoge/mgcoge.c
+38
-41
38 additions, 41 deletions
board/keymile/mgcoge/mgcoge.c
with
38 additions
and
41 deletions
board/keymile/mgcoge/mgcoge.c
+
38
−
41
View file @
0809ea2f
/*
/*
* (C) Copyright 2007
* (C) Copyright 2007
- 2008
* Heiko Schocher, DENX Software Engineering, hs@denx.de.
* Heiko Schocher, DENX Software Engineering, hs@denx.de.
*
*
* See file CREDITS for list of people who contributed to this
* See file CREDITS for list of people who contributed to this
...
@@ -243,13 +243,13 @@ static long int try_init (volatile memctl8260_t * memctl, ulong sdmr,
...
@@ -243,13 +243,13 @@ static long int try_init (volatile memctl8260_t * memctl, ulong sdmr,
*
sdmr_ptr
=
sdmr
|
PSDMR_OP_NORM
|
PSDMR_RFEN
;
*
sdmr_ptr
=
sdmr
|
PSDMR_OP_NORM
|
PSDMR_RFEN
;
*
base
=
c
;
*
base
=
c
;
size
=
get_ram_size
((
long
*
)
base
,
maxsize
);
size
=
get_ram_size
((
long
*
)
base
,
maxsize
);
*
orx_ptr
=
orx
|
~
(
size
-
1
);
*
orx_ptr
=
orx
|
~
(
size
-
1
);
return
(
size
);
return
(
size
);
}
}
phys_size_t
initdram
(
int
board_type
)
phys_size_t
initdram
(
int
board_type
)
{
{
volatile
immap_t
*
immap
=
(
immap_t
*
)
CFG_IMMR
;
volatile
immap_t
*
immap
=
(
immap_t
*
)
CFG_IMMR
;
volatile
memctl8260_t
*
memctl
=
&
immap
->
im_memctl
;
volatile
memctl8260_t
*
memctl
=
&
immap
->
im_memctl
;
...
@@ -273,7 +273,7 @@ phys_size_t initdram(int board_type)
...
@@ -273,7 +273,7 @@ phys_size_t initdram(int board_type)
int
checkboard
(
void
)
int
checkboard
(
void
)
{
{
puts
(
"Board: mgcoge
\n
"
);
puts
(
"Board: mgcoge
\n
"
);
return
0
;
return
0
;
}
}
...
@@ -281,7 +281,7 @@ int checkboard(void)
...
@@ -281,7 +281,7 @@ int checkboard(void)
/*
/*
* Early board initalization.
* Early board initalization.
*/
*/
int
board_early_init_r
(
void
)
int
board_early_init_r
(
void
)
{
{
/* setup the UPIOx */
/* setup the UPIOx */
*
(
char
*
)(
CFG_PIGGY_BASE
+
0x02
)
=
0xc0
;
*
(
char
*
)(
CFG_PIGGY_BASE
+
0x02
)
=
0xc0
;
...
@@ -293,68 +293,65 @@ int board_early_init_r(void)
...
@@ -293,68 +293,65 @@ int board_early_init_r(void)
/*
/*
* update "memory" property in the blob
* update "memory" property in the blob
*/
*/
void
ft_blob_update
(
void
*
blob
,
bd_t
*
bd
)
void
ft_blob_update
(
void
*
blob
,
bd_t
*
bd
)
{
{
int
ret
,
nodeoffset
=
0
;
int
ret
,
nodeoffset
=
0
;
ulong
memory_data
[
2
]
=
{
0
};
ulong
memory_data
[
2
]
=
{
0
};
ulong
flash_data
[
8
]
=
{
0
};
ulong
flash_data
[
8
]
=
{
0
};
memory_data
[
0
]
=
cpu_to_be32
(
bd
->
bi_memstart
);
memory_data
[
0
]
=
cpu_to_be32
(
bd
->
bi_memstart
);
memory_data
[
1
]
=
cpu_to_be32
(
bd
->
bi_memsize
);
memory_data
[
1
]
=
cpu_to_be32
(
bd
->
bi_memsize
);
nodeoffset
=
fdt_path_offset
(
blob
,
"/memory"
);
nodeoffset
=
fdt_path_offset
(
blob
,
"/memory"
);
if
(
nodeoffset
>=
0
)
{
if
(
nodeoffset
>=
0
)
{
ret
=
fdt_setprop
(
blob
,
nodeoffset
,
"reg"
,
memory_data
,
ret
=
fdt_setprop
(
blob
,
nodeoffset
,
"reg"
,
memory_data
,
sizeof
(
memory_data
));
sizeof
(
memory_data
));
if
(
ret
<
0
)
if
(
ret
<
0
)
printf
(
"ft_blob_update(): cannot set /memory/reg "
printf
(
"ft_blob_update(): cannot set /memory/reg "
"property err:%s
\n
"
,
fdt_strerror
(
ret
));
"property err:%s
\n
"
,
fdt_strerror
(
ret
));
}
}
else
{
else
{
/* memory node is required in dts */
/* memory node is required in dts */
printf
(
"ft_blob_update(): cannot find /memory node "
printf
(
"ft_blob_update(): cannot find /memory node "
"err:%s
\n
"
,
fdt_strerror
(
nodeoffset
));
"err:%s
\n
"
,
fdt_strerror
(
nodeoffset
));
}
}
/* update Flash addr, size */
/* update Flash addr, size */
flash_data
[
2
]
=
cpu_to_be32
(
CFG_FLASH_BASE
);
flash_data
[
2
]
=
cpu_to_be32
(
CFG_FLASH_BASE
);
flash_data
[
3
]
=
cpu_to_be32
(
CFG_FLASH_SIZE
);
flash_data
[
3
]
=
cpu_to_be32
(
CFG_FLASH_SIZE
);
flash_data
[
4
]
=
cpu_to_be32
(
1
);
flash_data
[
4
]
=
cpu_to_be32
(
1
);
flash_data
[
5
]
=
cpu_to_be32
(
0
);
flash_data
[
5
]
=
cpu_to_be32
(
0
);
flash_data
[
6
]
=
cpu_to_be32
(
CFG_FLASH_BASE_1
);
flash_data
[
6
]
=
cpu_to_be32
(
CFG_FLASH_BASE_1
);
flash_data
[
7
]
=
cpu_to_be32
(
CFG_FLASH_SIZE_1
);
flash_data
[
7
]
=
cpu_to_be32
(
CFG_FLASH_SIZE_1
);
nodeoffset
=
fdt_path_offset
(
blob
,
"/localbus"
);
nodeoffset
=
fdt_path_offset
(
blob
,
"/localbus"
);
if
(
nodeoffset
>=
0
)
{
if
(
nodeoffset
>=
0
)
{
ret
=
fdt_setprop
(
blob
,
nodeoffset
,
"ranges"
,
flash_data
,
ret
=
fdt_setprop
(
blob
,
nodeoffset
,
"ranges"
,
flash_data
,
sizeof
(
flash_data
));
sizeof
(
flash_data
));
if
(
ret
<
0
)
if
(
ret
<
0
)
printf
(
"ft_blob_update(): cannot set /localbus/ranges "
printf
(
"ft_blob_update(): cannot set /localbus/ranges "
"property err:%s
\n
"
,
fdt_strerror
(
ret
));
"property err:%s
\n
"
,
fdt_strerror
(
ret
));
}
}
else
{
else
{
/* memory node is required in dts */
/* memory node is required in dts */
printf
(
"ft_blob_update(): cannot find /localbus node "
printf
(
"ft_blob_update(): cannot find /localbus node "
"err:%s
\n
"
,
fdt_strerror
(
nodeoffset
));
"err:%s
\n
"
,
fdt_strerror
(
nodeoffset
));
}
}
/* MAC Adresse */
/* MAC Adresse */
nodeoffset
=
fdt_path_offset
(
blob
,
"/soc/cpm/ethernet"
);
nodeoffset
=
fdt_path_offset
(
blob
,
"/soc/cpm/ethernet"
);
if
(
nodeoffset
>=
0
)
{
if
(
nodeoffset
>=
0
)
{
ret
=
fdt_setprop
(
blob
,
nodeoffset
,
"mac-address"
,
bd
->
bi_enetaddr
,
ret
=
fdt_setprop
(
blob
,
nodeoffset
,
"mac-address"
,
bd
->
bi_enetaddr
,
sizeof
(
uchar
)
*
6
);
sizeof
(
uchar
)
*
6
);
if
(
ret
<
0
)
if
(
ret
<
0
)
printf
(
"ft_blob_update(): cannot set /soc/cpm/ethernet/mac-address "
printf
(
"ft_blob_update(): cannot set /soc/cpm/ethernet/mac-address "
"property err:%s
\n
"
,
fdt_strerror
(
ret
));
"property err:%s
\n
"
,
fdt_strerror
(
ret
));
}
}
else
{
else
{
/* memory node is required in dts */
/* memory node is required in dts */
printf
(
"ft_blob_update(): cannot find /soc/cpm/ethernet node "
printf
(
"ft_blob_update(): cannot find /soc/cpm/ethernet node "
"err:%s
\n
"
,
fdt_strerror
(
nodeoffset
));
"err:%s
\n
"
,
fdt_strerror
(
nodeoffset
));
}
}
}
}
void
ft_board_setup
(
void
*
blob
,
bd_t
*
bd
)
void
ft_board_setup
(
void
*
blob
,
bd_t
*
bd
)
{
{
ft_cpu_setup
(
blob
,
bd
);
ft_cpu_setup
(
blob
,
bd
);
ft_blob_update
(
blob
,
bd
);
ft_blob_update
(
blob
,
bd
);
}
}
#endif
/* defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT) */
#endif
/* defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT) */
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