Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

risc-v/mpfs: emmcsd: enforce HS SDR mode properly #101

Open
wants to merge 61 commits into
base: master
Choose a base branch
from
Open

Commits on Jan 18, 2023

  1. Configuration menu
    Copy the full SHA
    20bc463 View commit details
    Browse the repository at this point in the history
  2. mm/mempool/mempool_multiple.c: Remove void * arithmetic

    Cast substraction arguments to FAR char *, which gives the same result as the
    gcc extension on the original void * arithmetic.
    
    Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
    jlaitine committed Jan 18, 2023
    Configuration menu
    Copy the full SHA
    c742d5d View commit details
    Browse the repository at this point in the history
  3. boards/riscv/mpfs/icicle/configs/standalone: Add a standalone target

    - boots from eNVM
    - uses lim memory for RAM
    - has console on uart 0
    - has procfs enabled
    - has most of nsh commands enabled
    
    Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
    jlaitine committed Jan 18, 2023
    Configuration menu
    Copy the full SHA
    54d6d07 View commit details
    Browse the repository at this point in the history
  4. mpfs: i2c: Fix reset and interrupt issues

    I2C status register reset value (0xf8) was not handled properly causing unnecessary bus resets.
    Added critical section to mpfs_i2c_reset() and removed unnecessary interrupt disabling elsewhere.
    jpaali authored and jlaitine committed Jan 18, 2023
    Configuration menu
    Copy the full SHA
    95e7b51 View commit details
    Browse the repository at this point in the history
  5. Fix the check workflow for tiiuae repo

    - Change git repository urls to point to our tiiuae repos for nuttx & nuttx apps
    - Remove most of the the build steps, leave just arm-12 and riscv;
    	arm-12 has a build for stm32f7, and riscv for mpfs
    
    Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
    jlaitine committed Jan 18, 2023
    Configuration menu
    Copy the full SHA
    af79b1f View commit details
    Browse the repository at this point in the history
  6. Normalize boards/risc-v/esp32c3/esp32c3-devkit/configs/mcuboot_slot_c…

    …onfirm/defconfig
    
    Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
    jlaitine committed Jan 18, 2023
    Configuration menu
    Copy the full SHA
    4da21c5 View commit details
    Browse the repository at this point in the history
  7. arch/risc-v/src/opensbi/Make.defs: Switch opensbi to the nuttx/size o…

    …ptimized version in tiiuae repo
    
    Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
    jlaitine committed Jan 18, 2023
    Configuration menu
    Copy the full SHA
    bd0646f View commit details
    Browse the repository at this point in the history
  8. [REVERTME] arch/risc-v/src/mpfs/mpfs_ethernet.c: Hack the ethernet dr…

    …iver to re-initialize on rx timeout
    
    If the interface is UP, and no packets are received in 30s, re-initialize the interface by calling the
    already implemented mpfs_txtimeout_expiry.
    
    This is a temporary workaround for a bug where IF might be UP and working but packets can only
    be transmitted. Receive side just doesn't work at all.
    
    The original bug can be re-produced easily by disconnecting and reconnecting the ethernet cable while
    the IF is up.
    
    Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
    jlaitine committed Jan 18, 2023
    Configuration menu
    Copy the full SHA
    31ffe8a View commit details
    Browse the repository at this point in the history
  9. [HACK] Set SD-card speed to 50MHz

    SD-card clock speed is just forced to 50MHz. Note that to be correct, one should first set the SD-card
    into high-speed mode, but currently NuttX doesn't support this.
    
    With our cards, just setting the interface to 50MHz seems to work fine, and it removes the issue with
    25MHZ clock causing disturbance on GPS bands. Typically cards which support high-speed mode just work with
    50MHz interface clock.
    
    This patch should be reverted when the NuttX supports high-speed mode, and we can properly set it.
    
    Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
    jlaitine committed Jan 18, 2023
    Configuration menu
    Copy the full SHA
    7a74ad8 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    257c099 View commit details
    Browse the repository at this point in the history
  11. Fix standalone defconfig for CI

    Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
    jlaitine committed Jan 18, 2023
    Configuration menu
    Copy the full SHA
    b4dde43 View commit details
    Browse the repository at this point in the history
  12. arch/risc-v/src/mpfs/mpfs_clockconfig.c: Flag out code only used in b…

    …ootloader
    
    This removes the need to have all the DDR/clock configuration related
    "LIBERODEFS" flags defined, when not building a standalone/coldboot
    configuration
    
    All of this code is unused when not building with CONFIG_MPFS_BOOTLOADER
    
    Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
    jlaitine committed Jan 18, 2023
    Configuration menu
    Copy the full SHA
    73c62dd View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    b88a9ef View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    e0a0c62 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    dd68f85 View commit details
    Browse the repository at this point in the history
  16. mpfs/emmcsd: [HACK] Set 8-bit data width and DDR HS mode for eMMC

    This is not the correct way to do this, but it gives a nice perf. boost
    pussuw authored and jlaitine committed Jan 18, 2023
    Configuration menu
    Copy the full SHA
    f1e0380 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    8c97579 View commit details
    Browse the repository at this point in the history
  18. Fix build.yml

    Disable macOS builds for now.
    jpaali authored and jlaitine committed Jan 18, 2023
    Configuration menu
    Copy the full SHA
    5539af8 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    8fc7d62 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    df9d0c9 View commit details
    Browse the repository at this point in the history
  21. drivers/net/rpmsgdrv.c: Support only TRANSFER commands

    All other commands are disabled in send_recv().
    
    Signed-off-by: Jani Paalijarvi <jani.paalijarvi@unikie.com>
    jpaali authored and jlaitine committed Jan 18, 2023
    Configuration menu
    Copy the full SHA
    c687b91 View commit details
    Browse the repository at this point in the history
  22. arch/risc-v/src/mpfs/mpfs_ihc.c: Increase RPMSG buffer size

    Signed-off-by: Jani Paalijarvi <jani.paalijarvi@unikie.com>
    jpaali authored and jlaitine committed Jan 18, 2023
    Configuration menu
    Copy the full SHA
    2cdb59d View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    8c104c9 View commit details
    Browse the repository at this point in the history
  24. Revert "openamp: don't depend on pen-amp.zip and libmetal.zip in the …

    …git mode"
    
    This reverts commit fdc1aa6.
    jpaali authored and jlaitine committed Jan 18, 2023
    Configuration menu
    Copy the full SHA
    d865823 View commit details
    Browse the repository at this point in the history
  25. Revert "rptun: fix rptun don't wait issue when get tx patyload"

    This reverts commit 98a9762.
    jpaali authored and jlaitine committed Jan 18, 2023
    Configuration menu
    Copy the full SHA
    88daec5 View commit details
    Browse the repository at this point in the history
  26. Revert "openamp: update openmap lib version to 2022.10.0"

    This reverts commit 7ad4b57.
    jpaali authored and jlaitine committed Jan 18, 2023
    Configuration menu
    Copy the full SHA
    c859823 View commit details
    Browse the repository at this point in the history
  27. arch/arm/src/stm32f7/stm32_i2c.c: Driver cleanup

    Remove unnecessary heap allocation by relocating ops inside priv data
    jnippula authored and jlaitine committed Jan 18, 2023
    Configuration menu
    Copy the full SHA
    30bd331 View commit details
    Browse the repository at this point in the history
  28. Revert "rpmsg_socket: release tx buffer when send_oncopy failed"

    This reverts commit c0735f0.
    
    rpsg_release_tx_buffer only exists in the newer openamp. Revert this when
    taking the new openamp into use
    jlaitine committed Jan 18, 2023
    Configuration menu
    Copy the full SHA
    911724b View commit details
    Browse the repository at this point in the history

Commits on Jan 19, 2023

  1. arch/risc-v/src/mpfs/mpfs_fpga_canfd.c: Fix CONFIG_DEBUG_CAN_INFO ifd…

    …ef and forward declare devif_loopback
    
    Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
    jlaitine committed Jan 19, 2023
    Configuration menu
    Copy the full SHA
    f2d0dfd View commit details
    Browse the repository at this point in the history
  2. boards/risc-v/mpfs/icicle/configs/canfd/defconfig: Normalize

    Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
    jlaitine committed Jan 19, 2023
    Configuration menu
    Copy the full SHA
    5d0a419 View commit details
    Browse the repository at this point in the history
  3. arch/mpfs: Make selection of SBI boot or direct boot run-time configu…

    …rable
    
    Allow bootloader to select run-time whether the payload binary is booted with
    SBI or directly by jumping to entrypoint address.
    
    - Use just one bitmask to select sbi or direct boot for each hart
    - Add mpfs_set_use_sbi function to allow selecting how to boot
    - Initialize the bitmask by default according to the configuration flags
    - Add a header file for including the function prototypes in bootloader code
    
    Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
    jlaitine committed Jan 19, 2023
    Configuration menu
    Copy the full SHA
    5e44d38 View commit details
    Browse the repository at this point in the history
  4. remove devif_loopback in canfd driver since it is now devif_poll func…

    … that takes care of the need for loopback
    haitomatic committed Jan 19, 2023
    Configuration menu
    Copy the full SHA
    5668467 View commit details
    Browse the repository at this point in the history

Commits on Jan 28, 2023

  1. arch/arm/src/stm32f7/stm32_i2c.c: Round up stm32_i2c_toticks return v…

    …alue
    
    When sending small number of bytes with larger CONFIG_USEC_PER_TICK
    this function should return at least 1. Solve this by rounding
    up the result.
    
    Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
    jlaitine committed Jan 28, 2023
    Configuration menu
    Copy the full SHA
    fe6f687 View commit details
    Browse the repository at this point in the history

Commits on Jan 30, 2023

  1. Merge pull request #85 from tiiuae/canfd_driver_net_fix

    Remove devif_loopback in canfd driver
    haitomatic authored Jan 30, 2023
    Configuration menu
    Copy the full SHA
    2d76d75 View commit details
    Browse the repository at this point in the history

Commits on Jan 31, 2023

  1. include/nuttx/clock.h: Change ?SEC2TICK macros to round up and fix nx…

    …style errors
    
    Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
    jlaitine committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    6649979 View commit details
    Browse the repository at this point in the history
  2. Revert "arch/arm/src/stm32f7/stm32_i2c.c: Round up stm32_i2c_toticks …

    …return value"
    
    This reverts commit fe6f687.
    jlaitine committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    0eefd7d View commit details
    Browse the repository at this point in the history
  3. arch/arm/src/lc823450/lc823450_i2c.c: Remove extra rounding after MSE…

    …C2TIC change to round up
    
    Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
    jlaitine committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    a39ad65 View commit details
    Browse the repository at this point in the history

Commits on Feb 3, 2023

  1. arch/risc-v/src/mpfs/mpfs_ihc.c: Minor fixes

    Remove unnecessary VQID shifting (16 -> 0).
    Give an error if RPTUN init fails.
    jpaali committed Feb 3, 2023
    Configuration menu
    Copy the full SHA
    2e662df View commit details
    Browse the repository at this point in the history
  2. Remove MPFS_IHC_LINUX_ON_HART4 from default configurations

    Enable LINUX_ON_HART4 in rpmsg-ch2 defconfig of ICICLE board.
    Remove LINUX_ON_HART4 config from rpmsg-ch1 defconfig of ICICLE board.
    jpaali committed Feb 3, 2023
    Configuration menu
    Copy the full SHA
    209536f View commit details
    Browse the repository at this point in the history
  3. arch/arm/src/stm32f7/stm32_ethernet.c: Fix "unused variable" warning

    Fix build warning when CONFIG_STM32F7_AUTONEG is not set
    
    Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
    jlaitine committed Feb 3, 2023
    Configuration menu
    Copy the full SHA
    57ee2a0 View commit details
    Browse the repository at this point in the history

Commits on Feb 9, 2023

  1. arch/risc-v/src/mpfs/mpfs_userspace.c: Map MTIME into userspace reser…

    …ved IO area in protected build
    
    Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
    jlaitine committed Feb 9, 2023
    Configuration menu
    Copy the full SHA
    eadc4fa View commit details
    Browse the repository at this point in the history

Commits on Feb 10, 2023

  1. boards/risc-v/mpfs/icicle: Add USRIO area for userspace IO mappings

    Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
    jlaitine committed Feb 10, 2023
    Configuration menu
    Copy the full SHA
    19b23e1 View commit details
    Browse the repository at this point in the history

Commits on Feb 13, 2023

  1. Add mpfs crypto driver into nuttx build

    Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
    jlaitine committed Feb 13, 2023
    Configuration menu
    Copy the full SHA
    6f9d1f9 View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2023

  1. mpfs/Kconfig: fix typo on config file

    pussuw authored and jlaitine committed Feb 14, 2023
    Configuration menu
    Copy the full SHA
    50840af View commit details
    Browse the repository at this point in the history

Commits on Feb 17, 2023

  1. risc-v/mpfs: add athena irq defines

    Add the Athena cryptographic microprocessor irq defines.
    
    Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
    eenurkka authored and jlaitine committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    a0fea26 View commit details
    Browse the repository at this point in the history
  2. mpfs/mpfs_mm_init: Add the MTIME user mapping for kernel mode as well

    Just a temporary patch, need to implement some kind of scalable solution
    for this. It might be a good idea to map something else for the user
    to avoid using ecall to enter the kernel for simple reads ?
    
    Also, increase the L3 table size
    pussuw committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    b7da916 View commit details
    Browse the repository at this point in the history

Commits on Feb 20, 2023

  1. arch/risc-v/src/mpfs/Kconfig: Fix sourcing crypto/Kconfig

    The path was wrong, also enable the "if MPFS_CRYPTO" flag
    
    Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
    jlaitine committed Feb 20, 2023
    Configuration menu
    Copy the full SHA
    1a6a106 View commit details
    Browse the repository at this point in the history

Commits on Feb 23, 2023

  1. Configuration menu
    Copy the full SHA
    765bb98 View commit details
    Browse the repository at this point in the history
  2. arch/risc-v/src/mpfs/Kconfig: Don't source crypto/Kconfig

    There is no make step executed for this directory before the Kconfigure,
    so all Kconfig's just need to be in-tree
    
    Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
    jlaitine committed Feb 23, 2023
    Configuration menu
    Copy the full SHA
    8c6ecf3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3164886 View commit details
    Browse the repository at this point in the history

Commits on Mar 1, 2023

  1. clear spi int before the transfer starts

    In spi_irq handler the data is written into txfifo and transfer
    is started before the TXDONE interrupt is cleared. If the bus/memory
    access is in some cases delayed, the spi transfer may have been
    finished already before the interrupt register is cleaned for the
    transfer. This leads the early arrived interrupt to be just removed
    and never handled, which would cause a timeout error.
    This patch moves the clearing of the interrupt to the place before
    the tx is started, so the interrupt is not missed in above cases.
    jnippula committed Mar 1, 2023
    Configuration menu
    Copy the full SHA
    21f75b9 View commit details
    Browse the repository at this point in the history

Commits on Mar 2, 2023

  1. clear i2c ints before the transfer starts

    If transfer is restarted in irq handler the interrupts shall be
    cleared before the start bit is set in control register. This is
    to avoid ints being accidentally cleared before they are handled leading
    to timeout error.
    jnippula committed Mar 2, 2023
    Configuration menu
    Copy the full SHA
    4230525 View commit details
    Browse the repository at this point in the history

Commits on Mar 6, 2023

  1. Configuration menu
    Copy the full SHA
    b4e94fb View commit details
    Browse the repository at this point in the history

Commits on Mar 9, 2023

  1. Revert "Revert "rpmsg_socket: release tx buffer when send_oncopy fail…

    …ed""
    
    This reverts commit 911724b.
    jpaali committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    1c71686 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4ad6d42 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2e57589 View commit details
    Browse the repository at this point in the history
  4. Revert "Revert "openamp: don't depend on pen-amp.zip and libmetal.zip…

    … in the git mode""
    
    This reverts commit d865823.
    jpaali committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    4bb7c69 View commit details
    Browse the repository at this point in the history

Commits on Mar 10, 2023

  1. arch/riscv/src/mpfs/mpfs_ethernet.c: discard err rxframe in int work

    Workaround to avoid deadlock situation: The RX shall not try to wait for complete
    frame in case there is RX errors detected.
    
    In case mpfs_receive is called, it keeps waiting for complete frame and
    also keeps the net_lock locked. In the mean while, the TX may run out of free
    descriptors, but can not get net_lock mutex lock to be able to release used
    descriptors. If there are no free TX descs it disables RX interrupts because
    it may require to send response to the received frame.
    So, TX side keeps RX interrupts disabled due to lack of free descriptors and
    RX blocks TX to release those descs by stubbornly waiting for complete frame.
    jnippula committed Mar 10, 2023
    Configuration menu
    Copy the full SHA
    eb088b6 View commit details
    Browse the repository at this point in the history

Commits on Mar 17, 2023

  1. arch/risc-v/src/mpfs/crypto.defs: Update to include mpfs_systemservice.c

    Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
    jlaitine committed Mar 17, 2023
    Configuration menu
    Copy the full SHA
    52b3d8d View commit details
    Browse the repository at this point in the history

Commits on Apr 3, 2023

  1. arch/risc-v/src/mpfs: Generate an unique locally administrated MAC ad…

    …dress
    
    Add a function to read PolarFire's serial number from system controller, and use the first five digits as device's mac address
    
    Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
    jlaitine committed Apr 3, 2023
    Configuration menu
    Copy the full SHA
    add02c2 View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2023

  1. risc-v/mpfs: emmcsd: enforce HS SDR mode properly

    Previously, address 0x03b70000u was written with shift bits
    that only changed the bit width, not the mode. Enforce HS
    SDR mode (50 MHz) for now.
    
    Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
    eenurkka authored and jpaali committed Apr 14, 2023
    Configuration menu
    Copy the full SHA
    6ac72a7 View commit details
    Browse the repository at this point in the history