• Bartlomiej Zolnierkiewicz's avatar
    ata: separate PATA timings code from libata-core.c · a9b2c120
    Bartlomiej Zolnierkiewicz authored
    Separate PATA timings code from libata-core.c:
    
    * add PATA_TIMINGS config option and make corresponding PATA
      host drivers (and ATA ACPI code) select it
    
    * move following PATA timings code to libata-pata-timings.c:
      - ata_timing_quantize()
      - ata_timing_merge()
      - ata_timing_find_mode()
      - ata_timing_compute()
    
    * group above functions together in <linux/libata.h>
    
    * include libata-pata-timings.c in the build when PATA_TIMINGS
      config option is enabled
    
    * cover ata_timing_cycle2mode() with CONFIG_ATA_ACPI ifdef (it
      depends on code from libata-core.c and libata-pata-timings.c
      while its only user is ATA ACPI)
    
    Code size savings on m68k arch using (modified) atari_defconfig:
    
       text    data     bss     dec     hex filename
    before:
      39688     573      40   40301    9d6d drivers/ata/libata-core.o
    after:
      37820     572      40   38432    9620 drivers/ata/libata-core.o
    Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
    Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    a9b2c120
libata-pata-timings.c 5.83 KB