diff options
| author | Peter Tyser <ptyser@xes-inc.com> | 2009-06-30 17:15:45 -0500 | 
|---|---|---|
| committer | Kumar Gala <galak@kernel.crashing.org> | 2009-07-01 23:07:47 -0500 | 
| commit | 7892f619d40f4196e41e7114c5dfee9fad0f572f (patch) | |
| tree | 9d8a0e475dc86e8ce331bb4213fb6b3ba42552db /cpu/mpc83xx/spd_sdram.c | |
| parent | 484919cf3351212ebf748b9b13ece1ddaf7e7d1c (diff) | |
| download | olio-uboot-2014.01-7892f619d40f4196e41e7114c5dfee9fad0f572f.tar.xz olio-uboot-2014.01-7892f619d40f4196e41e7114c5dfee9fad0f572f.zip | |
8xxx: Rename dma_xfer() to dmacpy()
Also update dmacpy()'s argument order to match memcpy's and use
phys_addr_t/phy_size_t for address/size arguments
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'cpu/mpc83xx/spd_sdram.c')
| -rw-r--r-- | cpu/mpc83xx/spd_sdram.c | 27 | 
1 files changed, 13 insertions, 14 deletions
| diff --git a/cpu/mpc83xx/spd_sdram.c b/cpu/mpc83xx/spd_sdram.c index 4704d2006..97ca7007f 100644 --- a/cpu/mpc83xx/spd_sdram.c +++ b/cpu/mpc83xx/spd_sdram.c @@ -68,7 +68,7 @@ void board_add_ram_info(int use_default)  #if defined(CONFIG_DDR_ECC) && !defined(CONFIG_ECC_INIT_VIA_DDRC)  extern void dma_init(void);  extern uint dma_check(void); -extern int dma_xfer(void *dest, uint count, void *src); +extern int dmacpy(phys_addr_t dest, phys_addr_t src, phys_size_t n);  #endif  #ifndef	CONFIG_SYS_READ_SPD @@ -898,20 +898,19 @@ void ddr_enable_ecc(unsigned int dram_size)  	/* Initialise DMA for direct transfer */  	dma_init();  	/* Start DMA to transfer */ -	dma_xfer((uint *)0x2000, 0x2000, (uint *)0); /* 8K */ -	dma_xfer((uint *)0x4000, 0x4000, (uint *)0); /* 16K */ -	dma_xfer((uint *)0x8000, 0x8000, (uint *)0); /* 32K */ -	dma_xfer((uint *)0x10000, 0x10000, (uint *)0); /* 64K */ -	dma_xfer((uint *)0x20000, 0x20000, (uint *)0); /* 128K */ -	dma_xfer((uint *)0x40000, 0x40000, (uint *)0); /* 256K */ -	dma_xfer((uint *)0x80000, 0x80000, (uint *)0); /* 512K */ -	dma_xfer((uint *)0x100000, 0x100000, (uint *)0); /* 1M */ -	dma_xfer((uint *)0x200000, 0x200000, (uint *)0); /* 2M */ -	dma_xfer((uint *)0x400000, 0x400000, (uint *)0); /* 4M */ +	dmacpy(0x2000, 0, 0x2000); /* 8K */ +	dmacpy(0x4000, 0, 0x4000); /* 16K */ +	dmacpy(0x8000, 0, 0x8000); /* 32K */ +	dmacpy(0x10000, 0, 0x10000); /* 64K */ +	dmacpy(0x20000, 0, 0x20000); /* 128K */ +	dmacpy(0x40000, 0, 0x40000); /* 256K */ +	dmacpy(0x80000, 0, 0x80000); /* 512K */ +	dmacpy(0x100000, 0, 0x100000); /* 1M */ +	dmacpy(0x200000, 0, 0x200000); /* 2M */ +	dmacpy(0x400000, 0, 0x400000); /* 4M */ -	for (i = 1; i < dram_size / 0x800000; i++) { -		dma_xfer((uint *)(0x800000*i), 0x800000, (uint *)0); -	} +	for (i = 1; i < dram_size / 0x800000; i++) +		dmacpy(0x800000 * i, 0, 0x800000);  #endif  	t_end = get_tbms(); |