1. 08 Nov, 2022 3 commits
  2. 23 Aug, 2021 3 commits
  3. 29 Jul, 2021 7 commits
    • Federico Vaga's avatar
      Merge tag 'v1.1.2' into develop · 16b7b936
      Federico Vaga authored
      1.1.2 - 2021-07-29
      ==================
      https://www.ohwr.org/project/general-cores/tags/v1.1.2
      
      Fixed
      -----
      - sw: improve compatibility with newer (> 3.10) Linux kernel versions
      16b7b936
    • Federico Vaga's avatar
      Merge branch 'hotfix/v1.1.2' · 21f2e94e
      Federico Vaga authored
      21f2e94e
    • Federico Vaga's avatar
      update changelog · 0184795d
      Federico Vaga authored
      Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
      0184795d
    • Mathis MARION's avatar
      Kernel 4.4: use fwnode for irq domain · 49dfe034
      Mathis MARION authored
      When creating an IRQ domain, the code used to store a device struct
      pointer in the `of_node` field of the irq_domain struct returned by
      `irq_domain_add_linear`. This was done by casting to a void pointer and
      passing as the first argument of the function.
      
      In the SPEC repository (and supposedly other depending repositories),
      we would then get back the irq_domain struct by calling `irq_find_host`
      with again a device struct pointer casted to a void pointer as the
      argument. The function would compare the addresses of the 2 device
      structs and return the right irq_domain.
      
      This trick was most likely due to the fact that the IRQ domain API was
      conceived around OpenFirmware before version 4.4, and that the project
      should work for ACPI.
      A workaround for kernel 4.7 was written, which involved using a `select`
      function, and passing the address of the device struct as a parameter.
      It was particularly ugly as it would require getting around the
      `irq_find_host` to call immediately `irq_find_matching_fwspec` and pass
      in the address of the wanted device struct as a parameter in a hacky way
      to fit it inside two 32 bit integers.
      
      Kernel version 4.4 introduced fwnodes, which would make easier working
      with ACPI. Instead of repeating the hacky workaround (which would result
      in a kernel error on later kernels when calling irq_domain_add_linear),
      I allocated a fwnode_handle struct before creating a new IRQ domain.
      Then I used the new irq_domain_create_* API to get an irq_domain using
      this fwnode. I also took care of disallocating the fwnode_handle.
      
      On the other end, we can just call `irq_find_matching_fwnode` and pass
      dev.fwnode as a parameter.
      Signed-off-by: 's avatarGwenhael GOAVEC <gwenhael.goavec@femto-st.fr>
      Signed-off-by: 's avatarMathis MARION <mathis.marion@grenoble-inp.org>
      49dfe034
    • Mathis MARION's avatar
      Kernel 5.2 compatibility for i2c_new_device · 30c5b080
      Mathis MARION authored
      `i2c_new_device` disappeared in kernel 5.2 and onwards.
      It is now required to use `i2c_new_client_device`, which
      works the same way except for error checking.
      Signed-off-by: 's avatarMathis MARION <mathis.marion@grenoble-inp.org>
      30c5b080
    • Mathis MARION's avatar
      Kernel 4.4: use fwnode for irq domain · 7152194b
      Mathis MARION authored
      When creating an IRQ domain, the code used to store a device struct
      pointer in the `of_node` field of the irq_domain struct returned by
      `irq_domain_add_linear`. This was done by casting to a void pointer and
      passing as the first argument of the function.
      
      In the SPEC repository (and supposedly other depending repositories),
      we would then get back the irq_domain struct by calling `irq_find_host`
      with again a device struct pointer casted to a void pointer as the
      argument. The function would compare the addresses of the 2 device
      structs and return the right irq_domain.
      
      This trick was most likely due to the fact that the IRQ domain API was
      conceived around OpenFirmware before version 4.4, and that the project
      should work for ACPI.
      A workaround for kernel 4.7 was written, which involved using a `select`
      function, and passing the address of the device struct as a parameter.
      It was particularly ugly as it would require getting around the
      `irq_find_host` to call immediately `irq_find_matching_fwspec` and pass
      in the address of the wanted device struct as a parameter in a hacky way
      to fit it inside two 32 bit integers.
      
      Kernel version 4.4 introduced fwnodes, which would make easier working
      with ACPI. Instead of repeating the hacky workaround (which would result
      in a kernel error on later kernels when calling irq_domain_add_linear),
      I allocated a fwnode_handle struct before creating a new IRQ domain.
      Then I used the new irq_domain_create_* API to get an irq_domain using
      this fwnode. I also took care of disallocating the fwnode_handle.
      
      On the other end, we can just call `irq_find_matching_fwnode` and pass
      dev.fwnode as a parameter.
      Signed-off-by: 's avatarGwenhael GOAVEC <gwenhael.goavec@femto-st.fr>
      Signed-off-by: 's avatarMathis MARION <mathis.marion@grenoble-inp.org>
      7152194b
    • Mathis MARION's avatar
      Kernel 5.2 compatibility for i2c_new_device · 85bfb868
      Mathis MARION authored
      `i2c_new_device` disappeared in kernel 5.2 and onwards.
      It is now required to use `i2c_new_client_device`, which
      works the same way except for error checking.
      Signed-off-by: 's avatarMathis MARION <mathis.marion@grenoble-inp.org>
      85bfb868
  4. 22 Oct, 2020 2 commits
  5. 01 Oct, 2020 1 commit
  6. 30 Sep, 2020 4 commits
  7. 18 Sep, 2020 1 commit
  8. 17 Sep, 2020 1 commit
  9. 15 Sep, 2020 3 commits
  10. 14 Sep, 2020 6 commits
  11. 09 Sep, 2020 9 commits