Skip to content
  • David Brownell's avatar
    ft2232 init mess cleanup · c2f714bd
    David Brownell authored
    
    
    In the ft2232 driver, initialization for many layouts punts to a routine
    called usbjtag_init(), instead of a routine specific to each layout.
    
    That routine is  a mess  built around a "what type layout am I" core.
    That's a bad design ... in this case, especially so, since it bypasses
    the layout-specific dispatch which was just done, and obfuscates the
    initialization which is at least somewhat generic, instead of being
    specific to the "usbjtag" layout.
    
    Split and document out the generic parts of usbjtag_init(), and make
    the rest of those layouts have layout-specific init methods.  Also,
    rename usbjtag_reset() ... that also was not specific to the "usbjtag"
    layout, and thus contributed to the previous code structure confusion.
    
    (Eventually, all layout-specific code (and method tables) should probably
    live in files specific to each layout.  These changes will facilitate
    those and other cleanups to this driver.)
    
    Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
    c2f714bd