ata: sata_sil: Add DM support for Silicon sata driver
Add DM support for Silicon(SIL3131 / SIL3132 / SIL3124) sata driver as
few of the PowerPC platforms such as P series based boards need to
use SATA_SIL with DM,
Also fix below warning while PowerPC P series boards compilation,
===================== WARNING ======================"
This board does use CONFIG_LIBATA but has CONFIG_AHCI not"
enabled. Please update the storage controller driver to use"
CONFIG_AHCI before the v2019.07 release."
Failure to update by the deadline may result in board removal."
See doc/driver-model/MIGRATION.txt for more info."
===================================================="
Signed-off-by: Peng Ma <peng.ma@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
diff --git a/drivers/ata/sata_sil.h b/drivers/ata/sata_sil.h
index 8b7cbdf..ef41e82 100644
--- a/drivers/ata/sata_sil.h
+++ b/drivers/ata/sata_sil.h
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Copyright (C) 2011 Freescale Semiconductor, Inc.
+ * Copyright 2019 NXP
* Author: Tang Yuantian <b29983@freescale.com>
*/
@@ -24,6 +25,7 @@
int wcache;
int flush;
int flush_ext;
+ int id;
};
/* sata info for each controller */
@@ -210,4 +212,12 @@
CMD_ERR = 0x21,
};
+#if CONFIG_IS_ENABLED(BLK)
+#define ATA_MAX_PORTS 32
+struct sil_sata_priv {
+ int port_num;
+ struct sil_sata *sil_sata_desc[ATA_MAX_PORTS];
+};
+#endif
+
#endif