From: Jon Loeliger <jdl@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [RFC/PATCH] fix initdram / use of phys_addr_t
Date: Wed, 12 Mar 2008 18:18:15 -0500 [thread overview]
Message-ID: <47D864B7.5040505@freescale.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0803121811580.17362@blarg.am.freescale.net>
Kumar Gala wrote:
> So is this acceptable?
>
> - k
>
> diff --git a/board/freescale/mpc8544ds/mpc8544ds.c b/board/freescale/mpc8544ds/mpc8544ds.c
> index 8107016..24eea6f 100644
> --- a/board/freescale/mpc8544ds/mpc8544ds.c
> +++ b/board/freescale/mpc8544ds/mpc8544ds.c
> @@ -64,10 +64,9 @@ int checkboard (void)
> return 0;
> }
>
> -long int
> -initdram(int board_type)
> +phys_size_t initdram(int board_type)
> {
> - long dram_size = 0;
> + phys_size_t dram_size = 0;
>
> puts("Initializing\n");
>
> diff --git a/cpu/mpc85xx/spd_sdram.c b/cpu/mpc85xx/spd_sdram.c
> index abc63c4..b2b1911 100644
> --- a/cpu/mpc85xx/spd_sdram.c
> +++ b/cpu/mpc85xx/spd_sdram.c
> @@ -169,8 +169,7 @@ unsigned int determine_refresh_rate(unsigned int spd_refresh)
> }
>
>
> -long int
> -spd_sdram(void)
> +phys_size_t spd_sdram(void)
> {
> volatile ccsr_ddr_t *ddr = (void *)(CFG_MPC85xx_DDR_ADDR);
> spd_eeprom_t spd;
> diff --git a/include/asm-ppc/types.h b/include/asm-ppc/types.h
> index 7adf145..a797a00 100644
> --- a/include/asm-ppc/types.h
> +++ b/include/asm-ppc/types.h
> @@ -44,6 +44,8 @@ typedef unsigned long long u64;
> /* DMA addresses are 32-bits wide */
> typedef u32 dma_addr_t;
>
> +typedef unsigned long phys_size_t;
> +
> #endif /* __KERNEL__ */
> #endif /* __ASSEMBLY__ */
>
> diff --git a/include/common.h b/include/common.h
> index cd8aad0..97e8e5a 100644
> --- a/include/common.h
> +++ b/include/common.h
> @@ -107,6 +107,8 @@ typedef volatile unsigned char vu_char;
> #include <asm/blackfin.h>
> #endif
>
> +#include <asm/types.h>
> +
> #include <part.h>
> #include <flash.h>
> #include <image.h>
> @@ -191,7 +193,7 @@ int serial_buffered_tstc (void);
> void hang (void) __attribute__ ((noreturn));
>
> /* */
> -long int initdram (int);
> +phys_size_t initdram (int);
> int display_options (void);
> void print_size (ulong, const char *);
> int print_buffer (ulong addr, void* data, uint width, uint count, uint linelen);
> diff --git a/include/spd_sdram.h b/include/spd_sdram.h
> index a2be96c..4909e41 100644
> --- a/include/spd_sdram.h
> +++ b/include/spd_sdram.h
> @@ -1,6 +1,6 @@
> #ifndef _SPD_SDRAM_H_
> #define _SPD_SDRAM_H_
>
> -long int spd_sdram(void);
> +phys_size_t spd_sdram(void);
>
> #endif
Looks good to me.
Is this the right patch to change the type of
the parameter to print_size() too?
jdl
next prev parent reply other threads:[~2008-03-12 23:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-12 15:38 [U-Boot-Users] [RFC/PATCH] fix initdram / use of phys_addr_t Kumar Gala
2008-03-12 17:02 ` Jon Loeliger
2008-03-12 18:40 ` Wolfgang Denk
2008-03-12 19:09 ` Kumar Gala
2008-03-12 19:23 ` Jerry Van Baren
2008-03-12 20:52 ` Wolfgang Denk
2008-03-12 20:50 ` Wolfgang Denk
2008-03-12 22:25 ` Jean-Christophe PLAGNIOL-VILLARD
2008-03-12 23:12 ` Kumar Gala
2008-03-12 23:18 ` Jon Loeliger [this message]
2008-03-13 0:06 ` Wolfgang Denk
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=47D864B7.5040505@freescale.com \
--to=jdl@freescale.com \
--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