From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 03/16] [POWERPC] mgcoge: fix Codingstyle issues.
Date: Wed, 15 Oct 2008 09:34:05 +0200 [thread overview]
Message-ID: <48F59CED.3090704@denx.de> (raw)
Signed-off-by: Heiko Schocher <hs@denx.de>
---
board/keymile/mgcoge/mgcoge.c | 79 +++++++++++++++++++---------------------
1 files changed, 38 insertions(+), 41 deletions(-)
diff --git a/board/keymile/mgcoge/mgcoge.c b/board/keymile/mgcoge/mgcoge.c
index 51b6dc6..a6bf9bc 100644
--- a/board/keymile/mgcoge/mgcoge.c
+++ b/board/keymile/mgcoge/mgcoge.c
@@ -1,5 +1,5 @@
/*
- * (C) Copyright 2007
+ * (C) Copyright 2007 - 2008
* Heiko Schocher, DENX Software Engineering, hs at denx.de.
*
* 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,
*sdmr_ptr = sdmr | PSDMR_OP_NORM | PSDMR_RFEN;
*base = c;
- size = get_ram_size((long *)base, maxsize);
+ size = get_ram_size ((long *)base, maxsize);
*orx_ptr = orx | ~(size - 1);
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 memctl8260_t *memctl = &immap->im_memctl;
@@ -273,7 +273,7 @@ phys_size_t initdram(int board_type)
int checkboard(void)
{
- puts("Board: mgcoge\n");
+ puts ("Board: mgcoge\n");
return 0;
}
@@ -281,7 +281,7 @@ int checkboard(void)
/*
* Early board initalization.
*/
-int board_early_init_r(void)
+int board_early_init_r (void)
{
/* setup the UPIOx */
*(char *)(CFG_PIGGY_BASE + 0x02) = 0xc0;
@@ -293,68 +293,65 @@ int board_early_init_r(void)
/*
* 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;
ulong memory_data[2] = {0};
ulong flash_data[8] = {0};
- memory_data[0] = cpu_to_be32(bd->bi_memstart);
- memory_data[1] = cpu_to_be32(bd->bi_memsize);
+ memory_data[0] = cpu_to_be32 (bd->bi_memstart);
+ memory_data[1] = cpu_to_be32 (bd->bi_memsize);
nodeoffset = fdt_path_offset (blob, "/memory");
if (nodeoffset >= 0) {
- ret = fdt_setprop(blob, nodeoffset, "reg", memory_data,
- sizeof(memory_data));
+ ret = fdt_setprop (blob, nodeoffset, "reg", memory_data,
+ sizeof (memory_data));
if (ret < 0)
- printf("ft_blob_update(): cannot set /memory/reg "
- "property err:%s\n", fdt_strerror(ret));
- }
- else {
+ printf ("ft_blob_update(): cannot set /memory/reg "
+ "property err:%s\n", fdt_strerror (ret));
+ } else {
/* memory node is required in dts */
- printf("ft_blob_update(): cannot find /memory node "
- "err:%s\n", fdt_strerror(nodeoffset));
+ printf ("ft_blob_update(): cannot find /memory node "
+ "err:%s\n", fdt_strerror (nodeoffset));
}
/* update Flash addr, size */
- flash_data[2] = cpu_to_be32(CFG_FLASH_BASE);
- flash_data[3] = cpu_to_be32(CFG_FLASH_SIZE);
- flash_data[4] = cpu_to_be32(1);
- flash_data[5] = cpu_to_be32(0);
- flash_data[6] = cpu_to_be32(CFG_FLASH_BASE_1);
- flash_data[7] = cpu_to_be32(CFG_FLASH_SIZE_1);
+ flash_data[2] = cpu_to_be32 (CFG_FLASH_BASE);
+ flash_data[3] = cpu_to_be32 (CFG_FLASH_SIZE);
+ flash_data[4] = cpu_to_be32 (1);
+ flash_data[5] = cpu_to_be32 (0);
+ flash_data[6] = cpu_to_be32 (CFG_FLASH_BASE_1);
+ flash_data[7] = cpu_to_be32 (CFG_FLASH_SIZE_1);
nodeoffset = fdt_path_offset (blob, "/localbus");
if (nodeoffset >= 0) {
- ret = fdt_setprop(blob, nodeoffset, "ranges", flash_data,
- sizeof(flash_data));
+ ret = fdt_setprop (blob, nodeoffset, "ranges", flash_data,
+ sizeof (flash_data));
if (ret < 0)
- printf("ft_blob_update(): cannot set /localbus/ranges "
- "property err:%s\n", fdt_strerror(ret));
- }
- else {
+ printf ("ft_blob_update(): cannot set /localbus/ranges "
+ "property err:%s\n", fdt_strerror (ret));
+ } else {
/* memory node is required in dts */
- printf("ft_blob_update(): cannot find /localbus node "
- "err:%s\n", fdt_strerror(nodeoffset));
+ printf ("ft_blob_update(): cannot find /localbus node "
+ "err:%s\n", fdt_strerror (nodeoffset));
}
/* MAC Adresse */
nodeoffset = fdt_path_offset (blob, "/soc/cpm/ethernet");
if (nodeoffset >= 0) {
- ret = fdt_setprop(blob, nodeoffset, "mac-address", bd->bi_enetaddr,
- sizeof(uchar) * 6);
+ ret = fdt_setprop (blob, nodeoffset, "mac-address", bd->bi_enetaddr,
+ sizeof (uchar) * 6);
if (ret < 0)
- printf("ft_blob_update(): cannot set /soc/cpm/ethernet/mac-address "
- "property err:%s\n", fdt_strerror(ret));
- }
- else {
+ printf ("ft_blob_update(): cannot set /soc/cpm/ethernet/mac-address "
+ "property err:%s\n", fdt_strerror (ret));
+ } else {
/* memory node is required in dts */
- printf("ft_blob_update(): cannot find /soc/cpm/ethernet node "
- "err:%s\n", fdt_strerror(nodeoffset));
+ printf ("ft_blob_update(): cannot find /soc/cpm/ethernet node "
+ "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_blob_update(blob, bd);
+ ft_cpu_setup (blob, bd);
+ ft_blob_update (blob, bd);
}
#endif /* defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT) */
--
1.5.6.1
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
reply other threads:[~2008-10-15 7:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48F59CED.3090704@denx.de \
--to=hs@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox