X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=drivers%2Fdma%2Ffsl_dma.c;h=7ef7f12b0aa606738bda48a8d937022d16539560;hb=257b11f32d0ba451b8b7eba72f0db5e182d425dd;hp=df33e7a3eec7a41a19f8186c5083d643e136ef40;hpb=bec9cab9291bb221714d559a44fe37669a8ca604;p=u-boot diff --git a/drivers/dma/fsl_dma.c b/drivers/dma/fsl_dma.c index df33e7a3ee..7ef7f12b0a 100644 --- a/drivers/dma/fsl_dma.c +++ b/drivers/dma/fsl_dma.c @@ -6,23 +6,7 @@ * (C) Copyright 2000 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA + * SPDX-License-Identifier: GPL-2.0+ */ #include @@ -112,10 +96,16 @@ int dmacpy(phys_addr_t dest, phys_addr_t src, phys_size_t count) { uint xfer_size; while (count) { - xfer_size = MIN(FSL_DMA_MAX_SIZE, count); + xfer_size = min(FSL_DMA_MAX_SIZE, count); - out_dma32(&dma->dar, (uint) dest); - out_dma32(&dma->sar, (uint) src); + out_dma32(&dma->dar, (u32) (dest & 0xFFFFFFFF)); + out_dma32(&dma->sar, (u32) (src & 0xFFFFFFFF)); +#if !defined(CONFIG_MPC83xx) + out_dma32(&dma->satr, + in_dma32(&dma->satr) | (u32)((u64)src >> 32)); + out_dma32(&dma->datr, + in_dma32(&dma->datr) | (u32)((u64)dest >> 32)); +#endif out_dma32(&dma->bcr, xfer_size); dma_sync();