Commit Graph

16053 Commits

Author SHA1 Message Date
Xiang Xiao ae356001cf Change all files come from Xiaomi/Pinecone to Apache License 2.0
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-08-22 17:37:21 -06:00
Gregory Nutt df23fb3713 Fix PIC32MX/MZ typos
The pic32mx_usbpullup() and pic32mz_usbpullup() callbacks were referred to with various incorrect names in comments:  pic32mx_pullup(), pic32mz_pullup(), stm32_pullup().
2020-08-22 18:44:58 +01:00
Xiang Xiao 8617cd94b2 Fix nxstyle warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-08-21 18:09:19 +08:00
Xiang Xiao 8ce0ff5ce4 arch/sim: Make up_internal.h includable in host environment
to avoid the declaration repetition

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-08-21 18:09:19 +08:00
Masayuki Ishikawa 3543950766 arch: cxd56xx: Use spinlock API in cxd56_serial.c
Summary:
- This commit improves cxd56_serial performance in SMP mode.

Impact:
- This commit affects SMP mode only.

Testing:
- Tested with spresense:smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-08-21 12:06:46 +02:00
Dong Heng 39539be149 xtensa/esp32: Improve SPI transmission
Master:
  1. add DMA RX/TX support
  2. add software chip selection
  3. add user defined chip selection
  4. add IOMUX check and IO map

Slave:
  1. add DMA RX/TX support
  2. add IOMUX check and IO map
  3. use full 256 bit SPI TX/RX cache in non-DMA mode
2020-08-21 10:04:27 +01:00
Masayuki Ishikawa 0d971d4673 arch: cxd56xx: Fix IRQ control in cxd56_dmac.c
Summary:
- This commit fixes IRQ control for the following use case
- The gs2200m Wi-Fi driver requests SPI-DMA to receive a packet.
- cxd56_dma.c enables IRQ for the SPI-DMA and start transfer.
- Then LCD driver requests SPI-DMA to display an image.
- These SPI-DMAs use different DMA channels but share the DMA controller.
- Also, they share the same IRQ.
- When the first SPI-DMA finishes the transfer, it disables the IRQ.
- And if the second SPI-DMA finishes the transfer just after the IRQ disabled.
- The second SPI-DMA will be in a deadlock condition.
- To resolve this issue, do not control IRQ during DMA transfer.
- Instead, up_enable_irq() is called in up_dma_initialize()

Impact:
- All use cases which use DMA

Testing:
- Tested with spresense:wifi with LCD

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-08-21 10:38:47 +02:00
Alan C. Assis 69f914adcd Another nxstyle issue fixed 2020-08-20 15:15:07 -06:00
Alan C. Assis 4e3070c542 Fix some right alignment 2020-08-20 15:15:07 -06:00
Alan C. Assis 34c144ad13 Fix many coding styles issues 2020-08-20 15:15:07 -06:00
Alan C. Assis 7d88f1e9cf Fix the introduced long line 2020-08-20 15:15:07 -06:00
Alan C. Assis 5b719daf69 Fix issues reported in the pull request and update defconfig 2020-08-20 15:15:07 -06:00
chenwen 1e9ef469dc xtensa/esp32: Add functions to switch CPU frequency from 80MHz to 240Mhz 2020-08-20 15:15:07 -06:00
leomarradke f5912b5cba arch: samd5e5 : Oneshot, freerun and tickless available support. All support runs on Timer/Counter (TC).
Some fixes in external interrupt controller (EIC) and clockconfig.

Testing:
- Build check only.

Signed-off-by: Leomar Mateus Radke  <leomar@falker.com.br>
2020-08-18 12:42:44 -03:00
leomarradke 171cc38ac2 arch: samd5e5 : Add watchdog timer drivers.
boards: metro-m4  Add support for starting the watchdog timer on the metro-m4.

Testing:
- Build check only

Signed-off-by: Leomar Mateus Radke  <leomar@falker.com.br>
2020-08-18 12:42:44 -03:00
David Sidrane 07ce0deda0 Fix Added options for I-Cache & D-Cache broken on c101076704
The Kconfig names were not updated to reflect FLASH. This
   killed performance on F4 and F2.
2020-08-17 23:32:07 +01:00
Masayuki Ishikawa 2fbb896a4b arch: cxd56xx: Add SMP support to cxd56_farapi.c
Summary:
- This commit adds SMP support to cxd56_farapi.c
- nxplayer now works in SMP mode

Impact:
- Spresense in SMP mode only

Testing:
- Add the following configs to spresense:wifi
- +CONFIG_SCHED_INSTRUMENTATION=yy
- +CONFIG_SCHED_INSTRUMENTATION_BUFFER=y
- +CONFIG_SMP=y
- +CONFIG_SMP_NCPUS=2
- +CONFIG_SPINLOCK_IRQ=y
- Run nxplayer and play an WAV file on uSD card
- NOTE: http streaming playback would cause deadlocks

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-08-16 00:03:18 +01:00
Gregory Nutt 2af62314d7 Fix build breakage from PR #1565
Fixes:

    ##[error]net/tun.c:837:13: error: conflicting types for 'tun_poll_expiry'
      837 | static void tun_poll_expiry(FAR void *arg)
          |             ^~~~~~~~~~~~~~~
    net/tun.c:196:13: note: previous declaration of 'tun_poll_expiry' was here
      196 | static void tun_poll_expiry(wdparm_t arg);
          |             ^~~~~~~~~~~~~~~

And

    ##[error]net/tun.c:881:57: error: passing argument 4 of 'wd_start' makes integer from pointer without a cast [-Werror=int-conversion]
      881 |   wd_start(&priv->txpoll, TUN_WDDELAY, tun_poll_expiry, priv);
          |                                                         ^~~~
          |                                                         |
          |                                                         struct tun_device_s *
    In file included from /github/workspace/sources/nuttx/include/nuttx/sched.h:41,
                     from /github/workspace/sources/nuttx/include/sched.h:34,
                     from /github/workspace/sources/nuttx/include/nuttx/arch.h:81,
                     from net/tun.c:60:
    /github/workspace/sources/nuttx/include/nuttx/wdog.h:134:42: note: expected 'wdparm_t' {aka 'long unsigned int'} but argument is of type 'struct tun_device_s *'
      134 |              wdentry_t wdentry, wdparm_t arg);
          |                                 ~~~~~~~~~^~~

And

    chip/cxd56_rtc.c: In function 'up_rtc_initialize':
    ##[error]chip/cxd56_rtc.c:358:3: error: too many arguments to function 'cxd56_rtc_initialize'
      358 |   cxd56_rtc_initialize(1, NULL);
          |   ^~~~~~~~~~~~~~~~~~~~
    chip/cxd56_rtc.c:253:13: note: declared here
      253 | static void cxd56_rtc_initialize(wdparm_t arg)
          |             ^~~~~~~~~~~~~~~~~~~~
2020-08-14 14:12:51 -03:00
Xiang Xiao acca9fcc3b sched/wdog: Remove MAX_WDOGPARMS and related stuff
since the variable arguments are error prone and seldom used.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-08-14 08:19:50 -06:00
Yoshinori Sugino 728d5efed6 arch/risc-v/src: Cosmetic change
Replace spaces with a tab
2020-08-14 10:27:23 +01:00
leomarradke 35e0d74f3e arch: samd5e5 : Add USB host support.
Fixes in USB device and i2c.

boards: metro-m4  Add support for:

- vfat auto-mounted on a flash drive;
- i2c inicialization;
- usb-dev cdc;
- sam_usbhost_vbusdrive needs your VBUS implementation.

Testing:
- Build check only.

Signed-off-by: Leomar Mateus Radke  <leomar@falker.com.br>
2020-08-13 14:02:58 -03:00
leomarradke 4e8e21a92a Style fixes 2020-08-13 14:02:58 -03:00
leomarradke af85c7801a arch: samd5e5 : Add watchdog timer drivers.
boards: metro-m4  Add support for starting the watchdog timer on the metro-m4.

Testing:
- Build check only

Signed-off-by: Leomar Mateus Radke  <leomar@falker.com.br>
2020-08-13 14:02:58 -03:00
Fotis Panagiotopoulos c101076704 Added options for I-Cache & D-Cache, in STM32F2 & STM32F4. 2020-08-13 07:29:05 +02:00
David Sidrane 151a9253f4 s32k1xx:flexcan Remove unused variable 2020-08-12 21:38:06 +01:00
David Sidrane ee60a26c7f kinetis:flexcan Remove unused variable 2020-08-12 18:51:48 +01:00
David Sidrane 553dc4a0c9 kinetis: kinetis.h missing-semi 2020-08-12 18:51:48 +01:00
Fotis Panagiotopoulos c046e56b3b Added STM32_HAVE_OVERDRIVE option, and made core over-drive to be enabled only when system frequency is > 168MHz. 2020-08-12 05:05:59 -07:00
Xiang Xiao a0ce81d659 sched/wdog: Don't dynamically allocate wdog_s
to save the preserved space(1KB) and also avoid the heap overhead

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I694073f68e1bd63960cedeea1ddec441437be025
2020-08-11 12:28:55 -06:00
raiden00pl 7879fba9f4 nxstyle fixes 2020-08-11 09:23:51 +01:00
raiden00pl 451a255146 arch/arm/src/stm32f7: IO compensation cell is enabled after clocking to SYSCFG is enabled 2020-08-11 09:23:51 +01:00
raiden00pl 3d91fed868 arch/arm/src/stm32f0l0g: remove reference to IO compensation which is not present in STM32 F0/L0/G0 2020-08-11 09:23:51 +01:00
David Sidrane a10e9615ca stm32f7:serial TXDMA ISR was looping on TX Empty
Interrups were blocked 1*n/baud Seconds. The former comment indicates
   there was an asumption that the TXE would be set at DMA completion.
   In reality this is not true. There can be 1 char in the TX Shift
   register and one in the TX holding register, when DMA completes.
   Waiting on TXE is not needed at all. The DMA will resume on the
   DMA req when the TX holding register is written to the TX Shift
   register.
2020-08-11 00:20:38 -05:00
Fotis Panagiotopoulos d4c770c20d STM32 IO compensation cell is enabled after clocking to SYSCFG is enabled. 2020-08-10 16:47:57 +01:00
Xiang Xiao be10c734b0 arch/sim: Always preserve the heap memory dynamically
so size with nuttx could report the correct bss value:
  text    data     bss     dec     hex filename
 155467    1464    1948  158879   26c9f nuttx

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I7e9ec4d09d14b6f15b235b4b46ebdd98986d9750
2020-08-10 08:20:06 +02:00
Huang Qi fd78f83e02 drivers/video: Refine the update region notification mechanism
1.Expose the notification through fb_vtable_s::updatearea
2.Incorporate old nx_notify_rectangle into the new updatearea callback
3.Migrate the calle of nx_notify_rectangle to fb_vtable_s::updatearea

Change-Id: Ia3d1f73e8757b2d381586d76ec6adc16c810018d
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2020-08-10 08:08:33 +02:00
Xiang Xiao baa4da2d0f Revert "arch/sim/src/sim/up_hostfs.c: hostfs skip '.' and '..' in readdir'"
This reverts commit 9f0502f8ba.
2020-08-09 16:16:34 -06:00
leomarradke ca62cb6b76 Style fixes 2020-08-08 17:33:24 -03:00
leomarradke e7073df8d6 arch: samd5e5 : Add watchdog timer drivers.
boards: metro-m4  Add support for starting the watchdog timer on the metro-m4.

Testing:
- Build check only

Signed-off-by: Leomar Mateus Radke  <leomar@falker.com.br>
2020-08-08 17:33:24 -03:00
Xiang Xiao f618de9c97 Fix nxstyle warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-08-08 17:30:26 -03:00
Xiang Xiao 4c706771c3 sched/wdog: Replace all callback argument from uint32_t to wdparm_t
and alwasy cast the argument of wd_start to wdparm_t

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-08-08 17:30:26 -03:00
Masayuki Ishikawa fead8d2034 arch: cxd56xx: Fix cxd56_rtc.c when compiled with CONFIG_RTC_HIRES=y
Summary:
- This commit fixes compile errors

Impact:
- This commit affects cxd56_rtc.c only

Testing:
- spresense:wifi with CONFIG_RTC_HIRES=y

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-08-07 09:30:52 +01:00
Masayuki Ishikawa b483d0d4eb arch: imxrt: Fix ethernet configuration in Kconfig
Summary:
- Fix typo in Kconfig so that we can configure IMXRT_ENET_NRXBUFFERS.

Impact:
- imxrt family with ethernet configuration

Testing:
- imxrt1060-evk:netnsh

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-08-06 22:18:23 -07:00
Alan C. Assis 6ea7b29088 Add ESP32 Ethernet device driver
This driver was implemented by Dong Heng<dongheng@espressif.com>
and reviewed by Alan Carvalho de Assis
2020-08-06 23:35:16 +01:00
raiden00pl ab6ddb8f99 arch/arm/src/stm32/stm32_adc.c: fix ADC setup logic
Increase the initialization counter after initialization is complete, otherwise the logic in adc_reset() will not execute correctly
2020-08-06 16:38:20 +01:00
David Sidrane deeac10134 stm32l4:serial fix coding standard violation 2020-08-06 01:03:34 -05:00
David Sidrane 68b11c9fed stm32h7:serial fix coding standard violation 2020-08-06 01:03:34 -05:00
David Sidrane acb90ea449 stm32f7:serial fix coding standard violation 2020-08-06 01:03:34 -05:00
David Sidrane 7ef4f53dff stm32f0l0g0:serial_v2 fix coding standard violation 2020-08-06 01:03:34 -05:00
David Sidrane ed51cbee18 stm32f0l0g0:serial_v1 fix coding standard violation 2020-08-06 01:03:34 -05:00