Commit Graph

3923 Commits

Author SHA1 Message Date
Alin Jerpelea
5e6d58dd03 drivers: Alan Carvalho de Assis: update licenses to Apache
Alan Carvalho de Assis has submitted the SGA and we can migrate the licenses
 to Apache.

Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-13 05:56:43 -08:00
David Sidrane
0c57351f78 mmcsd:Stuck in 1-bit mode, Removed CONFIG_ARCH_HAVE_SDIO_DELAYED_INVLDT
mmcsd:Remove CONFIG_ARCH_HAVE_SDIO_DELAYED_INVLDT
   stm32h7:sdmmc remove CONFIG_ARCH_HAVE_SDIO_DELAYED_INVLDT
   stm32f7:sdmmc remove CONFIG_ARCH_HAVE_SDIO_DELAYED_INVLDT
   stm32f7:sdmmc WRITE COMPLETE prevent false triggers
   stm32h7:sdmmc WRITE COMPLETE prevent false triggers

   While testing PR #2989 on the H7 I noticed that the cards
   were staying in 1-bit mode. The root cause was that the
   scr read path was using DMA without an invlidate.

   This was caused by CONFIG_ARCH_HAVE_SDIO_DELAYED_INVLDT,
   but the sdmmc driver, did not use the delayed invalidate
   nor would it work on 8 bytes.

   The driver fully supported dcache mgt on runt buffers, but
   the #ifdef CONFIG_ARCH_HAVE_SDIO_DELAYED_INVLDT blocked it.

   Reviewing the PR that added CONFIG_ARCH_HAVE_SDIO_DELAYED_INVLDT
   it may have been valid at the time. But after the dcache operations
   we fixed. It is not necessary and offers no benefit.
2021-03-12 16:42:16 -03:00
Matias N
cf8521e6de syslog: add option to prefix process name 2021-03-11 19:40:48 -03:00
buyuer
097df2669c drivers/sensor: fakesensor support batch.
Signed-off-by: buyuer <dingddding@163.com>
2021-03-10 14:16:38 +08:00
Gustavo Henrique Nihei
330eff36d7 sourcefiles: Fix relative path in file header 2021-03-09 23:18:28 +08:00
Gustavo Henrique Nihei
47cb41c92f makefiles: Fix relative path in file header 2021-03-09 23:18:28 +08:00
ligd
24cc83e46f serial/serial_dma.c: fix warnnings
serial/serial_dma.c: In function ‘uart_recvchars_done’:
serial/serial_dma.c:407:7: warning: implicit declaration of function ‘nxsig_kill’ [-Wimplicit-function-declaration]
  407 |       nxsig_kill(dev->pid, signo);
      |       ^~~~~~~~~~

Change-Id: I9e1c0341ecce3033889d11fff9ec2b9e3dfe303b
2021-03-07 01:45:51 -08:00
ligd
64708ddc7a drivers/serial/Kconfig: fix configure warnning
user should select the default action by self:
warning: (TTY_SIGINT) selects SIG_SIGKILL_ACTION which has unmet direct dependencies (SIG_DEFAULT)

Change-Id: Ied9899d18156742ce4998b40d53a481262dcd84a
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-03-07 01:45:51 -08:00
Alin Jerpelea
ccff570e6f drivers: nxstyle fixes
nxstyle fixes to pass the CI.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-04 18:32:27 -08:00
Alin Jerpelea
e5b6305f4a drivers: Author Gregory Nutt: update licenses to Apache
Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-04 18:32:27 -08:00
Jiuzhu Dong
48493dac5b telnet: fix crash about telnet client connect
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-03-05 06:55:17 +09:00
ligd
0d24582fe0 syslog_rpmsg: fix system crash when open CONFIG_SCHED_HAVE_PARENT
Reason:
nx_start use syslog at every early time event the idle thread not
full setup, then syslog_rpmsg -> work_queue -> work_signal ->
nxsig_kill -> rtcb is NULL -> crash

Fix:
sched work_queue after is_rpmsg_ept_ready() is true

Change-Id: I225469ff2526e4b810bf3e23473b55d57e64a1ff
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-03-03 19:08:15 -08:00
Jiuzhu Dong
4d5a964f29 net: unify socket into file descriptor
Change-Id: I9bcd21564e6c97d3edbb38aed1748c114160ea36
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-03-03 19:01:41 -08:00
Xiang Xiao
c8d4a4c76a mtd/progmem: Add up_progmem_read callback guarded by ARCH_HAVE_PROGMEM_READ
since sometime platform code need do some special action during memcpy

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Id108ef4232376feab3e37e9b3aee9a7927a03bd4
2021-03-03 13:47:59 -08:00
Xiang Xiao
0aa78ccc81 mtd/progmem: Let MTD_PROGMEM depend on ARCH_HAVE_PROGMEM
and remove the reference of CONFIG_ARCH_HAVE_PROGMEM from code

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I89a73f138d54718ee8bc9345958675d7a2a34ba8
2021-03-03 13:47:59 -08:00
Xiang Xiao
151cf49562 Fix nxstyle warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-03-01 09:23:09 +09:00
Xiang Xiao
9473434587 Ensure the kernel component don't call userspace API
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-03-01 09:23:09 +09:00
Gustavo Henrique Nihei
c76e201ebd drivers/i2s: Fix nxstyle issues 2021-02-25 18:57:18 -08:00
Gustavo Henrique Nihei
55d66f60a3 drivers: Fix typos reported by codespell 2021-02-25 18:57:18 -08:00
Jiuzhu Dong
936ce77d21 driver/sensor: gets the capacity of the hardware fifo
to hold the number of events

Change-Id: I58a9ad07913c7b189e1fd229ab22e91e220e01f6
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-02-24 15:26:15 -03:00
Jiuzhu Dong
46ea549630 driver/sensor: Fetch(with O_NONBLOCK) will directly return.
when sensor is disable.

Change-Id: I02c02aa447ee0b0d681082b4209ecd36e10f2547
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-02-24 15:26:15 -03:00
Jiuzhu Dong
54ea96da6b driver/sensor: replace lower->buffer_size with lower->buffer_number
more efficient

Change-Id: I0823b10248caf75e4dd6a5086ad230ba4a7298f6
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-02-24 15:26:15 -03:00
Alin Jerpelea
26e1f1f249 tools: Author Gregory Nutt: update licenses to Apache
Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-19 08:07:47 -08:00
Byron Ellacott
9a1b726bae fs: change geometry types from size_t to blkcnt_t and blksize_t
This change reflects that the geometry isn't related to the largest
allocatable unit on the platform.

Calls to read and write block devices are also affected and have
been updated.
2021-02-18 20:38:22 -08:00
Masayuki Ishikawa
1dc77c2ec5 drivers: audio: Introduce a driver-specific spinlock to cxd56.c
Summary:
- This commit introduces a driver-specific spinlock to cxd56.c
  to improve performance in SMP mode.

Impact:
- cxd56.c in SMP mode only

Testing:
- Tested with nxplayer and nxrecorder with the following configs
- spresense:wifi, spresense:wifi_smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-02-15 01:54:44 -08:00
buyuer
a2c79bed20 Add fakesensor driver.
This driver can read sensor data from csv file.

Signed-off-by: buyuer <dingddding@163.com>
2021-02-11 09:28:55 -08:00
Masayuki Ishikawa
d87f350831 arch, boards, drivers, include, sched, wireless: Change spinlock APIs.
Summary:
- This commit changes spinlock APIs (spin_lock_irqsave/spin_unlock_irqrestore)
- In the previous implementation, the global spinlock (i.e. g_irq_spin) was used.
- This commit allows to use caller specific spinlock but also supports to use
  g_irq_spin for backword compatibility (In this case, NULL must be specified)

Impact:
- None

Testing:
- Tested with the following configurations
- spresnse:wifi, spresense:wifi_smp
- esp32-devkitc:smp (QEMU), sabre6-quad:smp (QEMU)
- maxi-bit:smp (QEMU), sim:smp
- stm32f4discovery:wifi

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-02-07 21:28:56 -08:00
Alexander Vasiljev
dbec1cf694 drivers:mtd:smart.c: entryname is declared and should be under ifdef 2021-02-04 10:05:59 -08:00
Alexander Vasiljev
9146878dad drivers:mtd:w25qxxxjv.c: use different protect bits and address lengths for different chips 2021-02-04 10:05:59 -08:00
Masayuki Ishikawa
0c68ddb760 drivers: wireless: Change retry condition in gs2200m_hal_write()
Summary:
- During Wi-Fi stress test, I noticed that ASSERT() happened
  in gs2200m_hal_write(). Actually, this happens in 20-40 hours.
- In this case, resp[1] was always 0x0 which is not defined
  in the spec.
- In the previous implementation, retry was only done in case of
  WR_RESP_NOK. (0x13)
- This commit changes this condition and it reties in case of
  0x0 as well

Impact:
- gs2200m driver

Testing:
- Tested with spresense:wifi_smp and stm32f4discovery:wifi

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-02-03 10:29:05 +01:00
Jukka Laitinen
b8dc64ffed drivers/net/encx24j600.c: Correct setting of ifstate
The ifstate is already set in
  enc_ifup -> enc_reset -> enc_linkstatus

The ifstate after this call is either ENCSTATE_RUNNING or ENCSTATE_UP

If ifstate is ENCSTATE_RUNNING, it would be wrong to set it to ENCSTATE_UP;
this would lead to enc_txavail never invoking the driver callback, causing
very long latencies in sending.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-01-29 09:52:04 -08:00
Alexander Vasiljev
96cbd1d8a1 drivers: mtd: w25qxxxjv.c : W25Q256's sector count is 8192 2021-01-29 06:47:03 -08:00
Alin Jerpelea
6d786bedb5 drivers: mtd: mx35.c: mix case identifier fix
nxstyle fix for mix case identifier.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-27 18:40:00 -08:00
Alin Jerpelea
2d8b193df4 drivers: mtd: fix nxstyle errors
Fix nxstyle errors to pass the CI errors.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-27 18:40:00 -08:00
Alin Jerpelea
95adb15824 drivers: mtd: nxstyle errors fix
Fixed to pass the nxstyle CI erros

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-27 18:40:00 -08:00
Alin Jerpelea
822fbe5c10 drivers: mtd: mtd_nandscheme: mix case identifier fix
nxstyle fix for mix case identifier.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-27 18:40:00 -08:00
Alan C. Assis
f63e1e277f Add generic support to LWL Console 2021-01-26 18:21:28 -08:00
Alin Jerpelea
cb5d8b53cb drivers: video: altair: nxstyle fixes
Nxstyle fixes to pass CI

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-26 05:11:58 -08:00
Alin Jerpelea
bdb4b344a8 drivers: sensors: bmi160.c: nxstyle fixes
Nxstyle fixes to pass CI

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-26 05:11:58 -08:00
Alin Jerpelea
baac749d4f drivers: modem: altair: altmdm_spi.h: nxstyle fixes
Nxstyle fixes to pass CI

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-26 05:11:58 -08:00
Alin Jerpelea
f22683a0a6 drivers: replace licenses with Apache 2.0
This change is a license change to Apache 2.0 license.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-26 05:11:58 -08:00
Masayuki Ishikawa
c6ed7dd760 drivers: wireless: Fix _read_data() in gs2200m.c
Summary:
- During reviewing the GS2200M document, I noticed that
   _read_data() implementation is incorrect.
- Actually, we do not use "SPI Byte Stuffing for SPI-NO-DMA"
  but use "SPI Command Response (SPI-DMA)", so the sequence
  should use SPI_RECVBLOCK().

Impact:
- gs2200m.c only

Testing:
- Tested with stm32f4discovery:wifi and spresense:wifi_smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-01-25 19:13:17 -08:00
Masayuki Ishikawa
8a72ab1a50 drivers: wireless: Print error massages with wlerr() in gs2200m.c
Summary:
- I noticed that some error messages are printed with wlinfo()
- This commit prints such error messages with wlerr()

Impact:
- No impact

Testing:
- Tested with spresense:wifi
- NOTE: CONFIG_DEBUG_WIRELESS_ERROR must be enabled

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-01-24 20:03:53 -08:00
Matias N
0fa34a0b64 drivers: add generic i2c bitbang driver 2021-01-24 19:03:56 -08:00
Matias N
76cc5c36e4 bmp280: convert to common sensor interface 2021-01-18 21:08:34 -03:00
Matias N
42b6c665da sensor: change set_interval to use a value, not a pointer to value 2021-01-18 21:08:34 -03:00
Matias N
1b8e9312dc bmp280: minor fixes
Fixed a minor typo, a missing break in switch (gave error while
actually did the right thing) and added settable I2C frequency
2021-01-18 17:36:10 -03:00
Fotis Panagiotopoulos
eabb2fbf38 Re-arranged syslog fields. 2021-01-18 05:37:55 -08:00
Masayuki Ishikawa
11a842333f drivers: wireless: Fix ASSERT() in _read_data_len() in gs2200m.c
Summary:
- During stress test with spresense:wifi (non-SMP), I noticed
  sometimes ASSERT() happened in _read_data_len()
- Actually, up_udelay(50) has been added to avoid the ASSERT
- However, I finally noticed that it should be moved before
  calling dready()
- Also, I cofirmed that we can reduced the time from 50 to 30
- NOTE: we need at least 15us in my experience

Impact:
- gs2200m.c only

Testing:
- Tested with following configurations
- spresense:wifi, spresense:wifi_smp, stm32f4discovery:wifi

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-01-17 21:43:23 -08:00
Xiang Xiao
7df322c6be bluetooth: Move the lower half null check to common place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-01-17 20:49:19 -08:00