• Carl-Daniel Hailfinger's avatar
    Allow one to disable programmer debug messages at compile time · 5609fa75
    Carl-Daniel Hailfinger authored
    
    Programmer debug messages during programmer init/shutdown are useful
    because they print hardware settings and desired configuration.
    
    They help in getting a quick overview of hardware and software state on
    startup and shutdown.
    
    Programmer debug messages during flash chip access are mostly a
    distraction in logs and should only be enabled if someone is having
    problems which are suspected to stem from a programmer hardware or
    programmer software bug. Disable those messages by default, they can be
    reenabled by #define COMM_DEBUG in the affected programmer file.
    
    An added benefit is a tremendous size reduction in verbose
    probe/read/write/erase logs because only flash chip driver messages
    remain. In some cases, logs will shrink from 65 MB to 10 kB or less.
    
    The right(tm) fix would be two different debug levels (DEBUG and SPEW)
    and the ability to differentiate between programmer debug messages and
    flash chip debug messages. Until the design for the message printing
    infrastructure is finished, this is the best stop-gap measure we can
    get.
    
    Corresponding to flashrom svn r834.
    Signed-off-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
    Acked-by: default avatarSean Nelson <audioahcked@gmail.com>
    5609fa75
ichspi.c 18.9 KB