blob: d89f7a8a298ce1328b052b67882f42f092facda2 [file] [log] [blame]
Dave Liuf297b7a2008-03-27 18:51:17 +08001#ifndef __SATA_H__
2#define __SATA_H__
Pavel Herrmanne46a4352012-09-27 23:18:04 +00003#include <part.h>
Dave Liuf297b7a2008-03-27 18:51:17 +08004
Simon Glassf19f1ec2017-07-29 11:35:13 -06005#if !defined(CONFIG_DM_SCSI) && !defined(CONFIG_AHCI)
Dave Liuc7057b52008-03-26 22:49:44 +08006int init_sata(int dev);
Nikita Kiryanov10ee8ec2014-11-21 12:47:23 +02007int reset_sata(int dev);
Dave Liuc7057b52008-03-26 22:49:44 +08008int scan_sata(int dev);
Pavel Herrmanne46a4352012-09-27 23:18:04 +00009ulong sata_read(int dev, ulong blknr, lbaint_t blkcnt, void *buffer);
10ulong sata_write(int dev, ulong blknr, lbaint_t blkcnt, const void *buffer);
Dave Liuc7057b52008-03-26 22:49:44 +080011
12int sata_initialize(void);
Mike Frysingercf7e3992009-01-27 16:12:21 -050013int __sata_initialize(void);
Nikita Kiryanovd957c282014-11-21 12:47:24 +020014int sata_stop(void);
15int __sata_stop(void);
Nikita Kiryanovdc383dd2014-08-20 15:08:53 +030016int sata_port_status(int dev, int port);
Dave Liuf297b7a2008-03-27 18:51:17 +080017
Simon Glass4101f682016-02-29 15:25:34 -070018extern struct blk_desc sata_dev_desc[];
Michal Simeke8a016b2016-09-08 15:06:45 +020019#endif
Pavel Herrmanne46a4352012-09-27 23:18:04 +000020
Simon Glassf19f1ec2017-07-29 11:35:13 -060021int sata_probe(int devnum);
22int sata_remove(int devnum);
23
Dave Liuf297b7a2008-03-27 18:51:17 +080024#endif