Skip to content
  • Sergei Shtylyov's avatar
    libata: introduce sff_set_devctl() method · 41dec29b
    Sergei Shtylyov authored
    
    
    The set of libata's taskfile access methods is clearly incomplete as
    it lacks a method to write to the device control register -- which
    forces drivers like 'pata_bf54x' and 'pata_scc' to implement more
    "high level" (and more weighty) methods like freeze() and postreset().
    
    So, introduce the optional sff_set_devctl() method which the drivers
    only have to implement if the standard iowrite8() can't be used (just
    like the existing sff_check_altstatus() method) and make use of it
    in the freeze() and postreset() method implementations (I could also
    have used it in softreset() method but it also reads other taskfile
    registers without using tf_read() making that quite pointless);
    this makes freeze() method implementations in the 'pata_bf54x' and
    'pata_scc' methods virtually identical to ata_sff_freeze(), so we
    can get rid of them completely.
    
    Signed-off-by: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
    Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
    41dec29b