From 10ee8ecafbb4405ac77f6df081325630617aa7cd Mon Sep 17 00:00:00 2001 From: Nikita Kiryanov Date: Fri, 21 Nov 2014 12:47:23 +0200 Subject: sata: implement reset_sata for dwc_ahsata Add reset_sata() to the sata driver interface and implement it for dwc_ahsata. This function cleans up after sata_init(), and therefore accepts a device number like sata_init() does. A dummy implementation is provided for the rest of the drivers. Signed-off-by: Nikita Kiryanov Cc: Simon Glass Cc: Stefano Babic --- include/sata.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/sata.h') diff --git a/include/sata.h b/include/sata.h index 38f4b4a..c2bbe1a 100644 --- a/include/sata.h +++ b/include/sata.h @@ -3,6 +3,7 @@ #include int init_sata(int dev); +int reset_sata(int dev); int scan_sata(int dev); ulong sata_read(int dev, ulong blknr, lbaint_t blkcnt, void *buffer); ulong sata_write(int dev, ulong blknr, lbaint_t blkcnt, const void *buffer); -- cgit v1.1 From d957c28a7eb0e5a28e9541a64ab3536831d63ec5 Mon Sep 17 00:00:00 2001 From: Nikita Kiryanov Date: Fri, 21 Nov 2014 12:47:24 +0200 Subject: cmd_sata: implement sata stop command Implement sata stop command. This introduces the __sata_stop() weak function, which mirrors the weak __sata_initialize() function, giving users the option of undoing the custom steps performed in overrides of sata_initialize(). Signed-off-by: Nikita Kiryanov Cc: Marek Vasut Cc: Tom Rini --- include/sata.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/sata.h') diff --git a/include/sata.h b/include/sata.h index c2bbe1a..fa61da8 100644 --- a/include/sata.h +++ b/include/sata.h @@ -10,6 +10,8 @@ ulong sata_write(int dev, ulong blknr, lbaint_t blkcnt, const void *buffer); int sata_initialize(void); int __sata_initialize(void); +int sata_stop(void); +int __sata_stop(void); int sata_port_status(int dev, int port); extern block_dev_desc_t sata_dev_desc[]; -- cgit v1.1