libata: make SFF support optional

Now that SFF support is completely separated out from the core layer,
it can be made optional.  Add CONFIG_ATA_SFF and let SFF drivers
depend on it.  If CONFIG_ATA_SFF isn't set, all codes in libata-sff.c
and data structures for SFF support are disabled.  This saves good
number of bytes for small systems.

Signed-off-by: Tejun Heo <htejun@gmail.com>
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 037db18..db77b90 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -445,6 +445,7 @@
 };
 extern struct class_device_attribute class_device_attr_link_power_management_policy;
 
+#ifdef CONFIG_ATA_SFF
 struct ata_ioports {
 	void __iomem		*cmd_addr;
 	void __iomem		*data_addr;
@@ -462,6 +463,7 @@
 	void __iomem		*bmdma_addr;
 	void __iomem		*scr_addr;
 };
+#endif /* CONFIG_ATA_SFF */
 
 struct ata_host {
 	spinlock_t		lock;
@@ -648,7 +650,9 @@
 	struct ata_prd		*prd;	 /* our SG list */
 	dma_addr_t		prd_dma; /* and its DMA mapping */
 
+#ifdef CONFIG_ATA_SFF
 	struct ata_ioports	ioaddr;	/* ATA cmd/ctl/dma register blocks */
+#endif /* CONFIG_ATA_SFF */
 
 	u8			ctl;	/* cache of ATA control register */
 	u8			last_ctl;	/* Cache last written value */
@@ -760,6 +764,7 @@
 	void (*port_stop)(struct ata_port *ap);
 	void (*host_stop)(struct ata_host *host);
 
+#ifdef CONFIG_ATA_SFF
 	/*
 	 * SFF / taskfile oriented ops
 	 */
@@ -779,6 +784,7 @@
 	void (*bmdma_start)(struct ata_queued_cmd *qc);
 	void (*bmdma_stop)(struct ata_queued_cmd *qc);
 	u8   (*bmdma_status)(struct ata_port *ap);
+#endif /* CONFIG_ATA_SFF */
 
 	/*
 	 * Obsolete
@@ -1349,6 +1355,8 @@
 /**************************************************************************
  * SFF - drivers/ata/libata-sff.c
  */
+#ifdef CONFIG_ATA_SFF
+
 extern const struct ata_port_operations ata_sff_port_ops;
 extern const struct ata_port_operations ata_bmdma_port_ops;
 
@@ -1489,5 +1497,6 @@
 
 	return status;
 }
+#endif /* CONFIG_ATA_SFF */
 
 #endif /* __LINUX_LIBATA_H__ */