X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=drivers%2Fblock%2Fata_piix.c;h=30426842cc40e31be5e0a2ef3e8dac931463eef9;hb=7682a99826a624d3764656b5bb31f88e2f8b235b;hp=0404771ee4c64bef9b7b1519ae21ba6f2a76e90e;hpb=879a57ac0e955e053e21b92c5aba76a0e542b1e4;p=u-boot diff --git a/drivers/block/ata_piix.c b/drivers/block/ata_piix.c index 0404771ee4..30426842cc 100644 --- a/drivers/block/ata_piix.c +++ b/drivers/block/ata_piix.c @@ -3,20 +3,7 @@ * Author: Mushtaq Khan * * - * 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+ * * with the reference to ata_piix driver in kernel 2.4.32 */ @@ -34,9 +21,7 @@ #include #include #include - -extern block_dev_desc_t sata_dev_desc[CONFIG_SYS_SATA_MAX_DEVICE]; -extern int sata_curr_device; +#include #define DEBUG_SATA 0 /* For debug prints set DEBUG_SATA to 1 */ @@ -207,6 +192,11 @@ int init_sata(int dev) return 0; } +int reset_sata(int dev) +{ + return 0; +} + static inline u8 sata_inb(unsigned long ioaddr) { return inb(ioaddr); @@ -408,6 +398,7 @@ void sata_identify(int num, int dev) /* assuming HD */ sata_dev_desc[devno].type = DEV_TYPE_HARDDISK; sata_dev_desc[devno].blksz = ATA_BLOCKSIZE; + sata_dev_desc[devno].log2blksz = LOG2(sata_dev_desc[devno].blksz); sata_dev_desc[devno].lun = 0; /* just to fill something in... */ } @@ -623,7 +614,7 @@ ulong sata_read(int device, ulong blknr, lbaint_t blkcnt, void *buff) return n; } -ulong sata_write(int device, ulong blknr, lbaint_t blkcnt, void *buff) +ulong sata_write(int device, ulong blknr, lbaint_t blkcnt, const void *buff) { ulong n = 0, *buffer = (ulong *)buff; unsigned char status = 0, num = 0, dev = 0, mask = 0;