X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=drivers%2Fblock%2Fsystemace.c;h=fdf75b5abfc90ea2b9eb4d6afcc53d880ebd81c1;hb=4fa7613c50069b6821ace02b11a24b46dcbbec5e;hp=247cf060e43ef4695cb4f5e81dd200ba0105c511;hpb=b3873d3f4c424e6563750bb517fac03c2e833cdc;p=oweals%2Fu-boot.git diff --git a/drivers/block/systemace.c b/drivers/block/systemace.c index 247cf060e4..fdf75b5abf 100644 --- a/drivers/block/systemace.c +++ b/drivers/block/systemace.c @@ -2,20 +2,7 @@ * Copyright (c) 2004 Picture Elements, Inc. * Stephen Williams (XXXXXXXXXXXXXXXX) * - * This source code is free software; you can redistribute it - * and/or modify it in source code form 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+ */ /* @@ -65,8 +52,8 @@ static void ace_writew(u16 val, unsigned off) writeb(val, base + off); writeb(val >> 8, base + off + 1); #endif - } - out16(base + off, val); + } else + out16(base + off, val); } static u16 ace_readw(unsigned off) @@ -83,7 +70,7 @@ static u16 ace_readw(unsigned off) } static unsigned long systemace_read(int dev, unsigned long start, - unsigned long blkcnt, void *buffer); + lbaint_t blkcnt, void *buffer); static block_dev_desc_t systemace_dev = { 0 }; @@ -127,6 +114,7 @@ block_dev_desc_t *systemace_get_dev(int dev) systemace_dev.part_type = PART_TYPE_UNKNOWN; systemace_dev.type = DEV_TYPE_HARDDISK; systemace_dev.blksz = 512; + systemace_dev.log2blksz = LOG2(systemace_dev.blksz); systemace_dev.removable = 1; systemace_dev.block_read = systemace_read; @@ -149,7 +137,7 @@ block_dev_desc_t *systemace_get_dev(int dev) * number of blocks read. A zero return indicates an error. */ static unsigned long systemace_read(int dev, unsigned long start, - unsigned long blkcnt, void *buffer) + lbaint_t blkcnt, void *buffer) { int retry; unsigned blk_countdown;