X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=drivers%2Fdma%2Ffsl_dma.c;h=b7eddf0f04c5d377fe47d2d42b92fe396be76144;hb=c882163b09b8a2c52e3dd8acd7d296d6d06d1f2e;hp=09c18c192997d90196b3408f3619b048c3e64808;hpb=2df0e6fc6b71448e1752e4ce1d5577d8977f3e5e;p=oweals%2Fu-boot.git diff --git a/drivers/dma/fsl_dma.c b/drivers/dma/fsl_dma.c index 09c18c1929..b7eddf0f04 100644 --- a/drivers/dma/fsl_dma.c +++ b/drivers/dma/fsl_dma.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * Copyright 2004,2007,2008 Freescale Semiconductor, Inc. * (C) Copyright 2002, 2003 Motorola Inc. @@ -5,24 +6,6 @@ * * (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 */ #include @@ -112,14 +95,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, (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();