1. 12 May, 2022 4 commits
    • Claudiu Beznea's avatar
      ARM: at91: pm: add quirks for pm · b7fc72c6
      Claudiu Beznea authored
      SoCs supporting ULP0 or ULP1 modes and variants of Cadence Ethernet IP
      (controlled by macb driver) may behave buggy when Wake-on-Lan (WoL) is
      configured and WoL packet is received while in ULP0/ULP1. On some SoCs
      Ethernet interface is not working after resume. On other SoCs the CPU
      goes to abort on resume path when switching execution from internal SRAM
      to DRAM. For ULP1 + WoL the issue is related a particular restart
      sequence of the internal clocks when resuming. These clocks are
      automatically managed by PMC and may happen that GMAC peripheral clock
      is restarted few clock cycles before internal clocks causing blocking
      of Ethernet's DMA. As a consequence Ethernet TX transactions are stopped
      and RX transactions are partially stopped (packets are received by MAC,
      RX counters incremented but the data is not transferred to DRAM). The
      workaround for this is to disable Ethernet's peripheral clock when
      going to ULP1. Same behavior has been reproduced on ULP0 for some
      platforms (SAMA5D2, SAMA5D3) and the same workaround solves the issue.
      
      The problem has been solved on pm.c as quirk to avoid polluting the
      MACB driver with AT91 specific issues as this driver is generic to
      multiple vendors.
      
      At probe pointers to struct device_node are retrieved and on the
      at91_pm_enter() the quirk specifics are applied: for all Ethernet
      interfaces that were parsed the peripheral clocks are disabled. A
      special handling is done for modes in dns_modes mask as these are
      considered modes that blocks the system if WoL packet are received
      but for which applying quirk will lead to not waking up on WoL
      packets: in situation where Ethernet interface(s) has suspend mode
      in dns_modes mask and Ethernet interface(s) is the only available
      wakeup source the suspend is canceled.
      Signed-off-by: default avatarClaudiu Beznea <claudiu.beznea@microchip.com>
      Signed-off-by: default avatarNicolas Ferre <nicolas.ferre@microchip.com>
      b7fc72c6
    • Claudiu Beznea's avatar
      ARM: at91: pm: use kernel documentation style · 9750d3b4
      Claudiu Beznea authored
      Use kernel documentation style. Along with it fix the naming of
      struct at91_pm_sfrbu_regs in documentation.
      Signed-off-by: default avatarClaudiu Beznea <claudiu.beznea@microchip.com>
      Signed-off-by: default avatarNicolas Ferre <nicolas.ferre@microchip.com>
      9750d3b4
    • Claudiu Beznea's avatar
      ARM: at91: pm: introduce macros for pm mode replacement · b568c71d
      Claudiu Beznea authored
      Introduce macros to replace standby/suspend mode if they depends on
      controllers that failed to map (or other errors). Macros keep track
      of the complementary mode to avoid having set the same AT91 PM mode
      for both suspend and standby.
      Signed-off-by: default avatarClaudiu Beznea <claudiu.beznea@microchip.com>
      Signed-off-by: default avatarNicolas Ferre <nicolas.ferre@microchip.com>
      b568c71d
    • Claudiu Beznea's avatar
      ARM: at91: pm: keep documentation inline with structure members · 22cbf077
      Claudiu Beznea authored
      Move documentation of bu to keep the same order as in the structure
      itself.
      Signed-off-by: default avatarClaudiu Beznea <claudiu.beznea@microchip.com>
      Signed-off-by: default avatarNicolas Ferre <nicolas.ferre@microchip.com>
      22cbf077
  2. 03 Apr, 2022 8 commits
  3. 02 Apr, 2022 28 commits