• David Brownell's avatar
    mmc symbol cleanup · 240a19fd
    David Brownell authored
    Get rid of some needless symbol duplication:
    
     - Use MMCST0_* symbols for both MMCST0 (irq status) and
       MMCIM (irq mask) registers.
    
     - Use MMCST0_* symbols instead of MMCSD_EVENT_* enums; the
       enum names obfuscated code with respect to chip specs.
    
     - Use mmc_resp_type() directly; RSP_TYPE() isn't needed.
    
    Also:
    
     - Switch the MMCST0_* symbols to the more compact BIT() syntax,
       and add matching "what does this do?" comments.
    
     - Use the already-defined MMCCMD_* symbols, not magic numbers.
    
     - Remove obsolete lament about protocol layer not providing
       something which it now provides.
    
    Minor functional changes that shouldn't affect behavior, and
    were suggested by the above changes:
    
     - Don't enable read IRQs when writing data, and vice versa.
    
     - Shrink the PIO loop in the IRQ handler.
    
    Overall, this code should now be easier to cross-check against
    specs and thus more clear in several ways.
    Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
    Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
    240a19fd
davinci_mmc.c 36 KB