I not two problems in handling of the return error values in PR #3858:
1. In KERNEL mode, the error return value of _SEM_WAIT() will be a negated errno value; in all other modes, it will be -1 (ERROR) with the errno variable set. This must be handled in the test of the returned value: Don't compare with -1; rather check if < 0
2. Also, conversion of the returned value to a negated errno value must be handled differently. This is handled by replacing -get_errno() with the macro _ERRVAL(ret)
This effects only error handling (it fixes it) and no other impacts are expected.
Summary:
- I thought this cs is needed to avoid data corruption
- For example, while executing uart_xmitchar() in the interrupt
handler on CPU0, an application running on CPU1 can call
uart_putxmitchar() via write()->uart_write().
- In this case, taking xmit.sem in uart_write() will wait for CPU0
to finish uart_xmitchar() because CPU0 has already taken a cs
in uart_xmitchar() then nxsem_wait() on CPU0 takes a new cs
inside (and release the cs when returning but it's OK)
- Then uart_write() on CPU1 disables UART TX, so uart_xmitchar()
on CPU0 will not be called while executing uart_write() on CPU1.
- So this critical section in uart_putxmitchar() can be removed.
Impact:
- None
Testing:
- Tested with spresense:wifi_smp, esp32-devkitc:smp
Reported-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
Summary:
- I noticed that DEBUGASSERTION() happens when executing
an ELF application
- This commit fixes this issue by re-mapping the address
to SYSBUS in up_module_text_free()
Impact:
- None
Testing:
- Tested with spresense (both DEBUG_ASSERTIONS=n and y)
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
Summary:
- I noticed that up_module_text_free() is not called
if CONFIG_ARCH_USE_MODULE_TEXT=y
- This commit fixes this issue
Impact:
- None
Testing:
- Tested with spresense
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
Summary:
- I noticed that make savedefconfig shows warnings regarding
'unmet direct dependencies (ARCH_HAVE_MODULE_TEXT)'
- This commit fixes this issue
Impact:
- None
Testing:
- Tested with spresense:wifi
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
SPI0 is used for the connection of the LCD controller.
Additional SPI and GPIO signals definitions:
SPI0_NPCS1 - SPI Chip Select, PD25
GPIO_LCD_CD - Command/Data, pin PB2
GPIO_LCD_RST - Reset, pin PB3
boards/arm/samv7/samv71-xult/src/sam_st7789.c is
derived from boards/arm/imxrt/teensy-4.x/src/imxrt_st7789.c
Signed-off-by: Jaroslav Beran <jara.beran@gmail.com>
Summary:
- In cxd56xx, ldrex/strex behavior is slightly different from
other Arm architectures. Dummy strex must be issued to release
the exclusive load & store unit.
Impact:
- SMP only
Testing:
- Tested with spresense:smp
- Tested with spresese:wifi_smp, spresense:rndis_smp
- NOTE: CONFIG_CXD56_TESTSET=y must be removed from defconfigs
Signed-off-by: Kazuya Hioki <Kazuya.Hioki@sony.com>
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
Summary:
- This commit converts data to the physical address for DMA transfer.
Impact:
- cxd56_imageproc.c and cxd56_audio_dma.c
Testing:
- Not tested
Signed-off-by: Kazuya Hioki <Kazuya.Hioki@sony.com>
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
Summary:
- This commit converts data to the physical address for DMA transfer.
Impact:
- cxd56.c only
Testing
- Tested with nxplayer and nxrecorder
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
Summary:
- This commit converts data to the physical address for DMA transfer.
Impact:
- cxd56_dmac.c, cxd56_sdhci.c, cxd56_usbdev.c
- cxd56_cisif.c, cxd56_emmc.c, cxd56_ge2d.c, cxd56_udmac.c
Testing:
- Tested with following configurations
- spresense:wifi, spresense:wifi_smp, spresense_rndis, spresense_rndis_smp
- NOTE: additional commits are needed for the test
- NOTE: cxd56_cisif.c, cxd56_emmc.c, cxd56_ge2d.c, cxd56_udmac.c are not tested
Signed-off-by: Kazuya Hioki <Kazuya.Hioki@sony.com>
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>