From: Bartlomiej Zolnierkiewicz<bzolnier@xxxxxxxxx>
Subject: [PATCH v3] ata: add CONFIG_SATA_HOST config option
Add CONFIG_SATA_HOST config option (for selecting SATA Host
support) to make setup easier on PATA-only systems.
Additionally move SATA-specific code to libata-sata.c which
allows us to save ~11.5k of the output code size (x86-64) on
PATA-only systems for CONFIG_SATA_HOST=n:
CONFIG_SATA_HOST=y:
text data bss dec hex filename
44283 6576 57 50916 c6e4 drivers/ata/libata-core.o
29054 16 2 29072 7190 drivers/ata/libata-eh.o
20085 0 19 20104 4e88 drivers/ata/libata-sff.o
8699 0 0 8699 21fb drivers/ata/libata-sata.o
CONFIG_SATA_HOST=n:
text data bss dec hex filename
43754 6576 57 50387 c4d3 drivers/ata/libata-core.o
26775 16 2 26793 68a9 drivers/ata/libata-eh.o
20144 0 19 20163 4ec3 drivers/ata/libata-sff.o
Signed-off-by: Bartlomiej Zolnierkiewicz<bzolnier@xxxxxxxxx>
---
v2:
- Kconfig fixups per Sergei's comments
- add non-SATA version of ata_std_postreset()
- drop non-SATA versions of sata_link_[debounce,hardreset,resume](),
sata_set_spd(), sata_print_link_status() and ata_tf_from_fis()
- move SATA-specific code to libata-sata.c
v3:
- require SATA_HOST for ata_piix for now
earlier references:
https://lkml.org/lkml/2011/2/9/149
https://lkml.org/lkml/2011/2/11/103
drivers/ata/Kconfig | 19
drivers/ata/Makefile | 1
drivers/ata/libata-core.c | 814 ------------------------------
drivers/ata/libata-eh.c | 412 ---------------
drivers/ata/libata-sata.c | 1243 ++++++++++++++++++++++++++++++++++++++++++++++
drivers/ata/libata-sff.c | 32 -
drivers/ata/libata.h | 52 +
include/linux/libata.h | 32 -
8 files changed, 1365 insertions(+), 1240 deletions(-)