• Patrick McHardy's avatar
    [HIFN]: Improve PLL initialization · 37a8023c
    Patrick McHardy authored
    The current PLL initalization has a number of deficiencies:
    
    - uses fixed multiplier of 8, which overclocks the chip when using a
      reference clock that operates at frequencies above 33MHz. According
      to a comment in the BSD source, this is true for the external clock
      on almost all every board.
    
    - writes to a reserved bit
    
    - doesn't follow the initialization procedure specified in chapter
      6.11.1 of the HIFN hardware users guide
    
    - doesn't allow to use the PCI clock
    
    This patch adds a module parameter to specify the reference clock
    (pci or external) and its frequency and uses that to calculate the
    optimum multiplier to reach the maximal speed. By default it uses
    the external clock and assumes a speed of 66MHz, which effectively
    halfs the frequency currently used.
    Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
    Acked-by: default avatarEvgeniy Polyakov <johnpol@2ka.mipt.ru>
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    37a8023c
hifn_795x.c 76.1 KB