The user of this invalidation are mmcsd_sdio currently. The mmcsd_sdio driver makes calls for dcache invalidation through the chip specific architecture function SDIO_DMARECVSETUP(). I changed the arch/arm/stm32f7 chips to use arch_invalidate_dcache_by_addr() instead of arch_invalidate_dcache().
This commit includes additional changes to mmcsd_sdio.c. I created SDIO_DMADELYDINVLDT() (DMA delayed invalidate) to invalidate store-into mode dcaches after the DMA transfer. I have been using SDIO_DMADELYDINVLDT() for several weeks now and it has fixed the problems that I previously reported regarding non-cache aligned buffer invalidation errors (for my store-through dcache). However, it does not permit use of unaligned DMA buffers for store-into mode dcaches.
SDIO_DMADELYDINVLDT() is a NoOp unless the chip specific Kconfig file selects CONFIG_ARCH_HAVE_SDIO_DELAYED_INVLDT. I have modified all the stm32f7 chips to select it.
1. open CONFIG_DEBUG_FEATURES CONFIG_SYSTEM_TIME64 CONFIG_CLOCK_MONOTONIC
==> INITIAL_SYSTEM_TIMER_TICKS very big data, not zero
2. close CONFIG_SCHED_TICKLESS
==> use g_system_timer as system clock
3. pm_domain_s.stime init to zero
4. clock_systimer() - pm_domain_s.stime get big data, error
Pullreq FAT improvements
* NuttX: Add CONFIG_FAT_LFN_ALIAS_HASH to speed up creating long filenames.
Long filenames on FAT filesystems have associated 8.3 character alias
short filenames. The traditional form of these is FILENA~1.EXT with
a running count of the number of similar names. However creating this
unique count can take several seconds if there are many similarly named
files in the directory. Enabling FAT_LFN_ALIAS_HASH uses an alternative
format of FI0123~1.TXT where the four digits are a hash of the original
filename. This method is similar to what is used by Windows 2000 and
later.
* NuttX: Add CONFIG_FAT_LFN_ALIAS_TRAILCHARS alternative format for 8.3 filenames.
Traditional format for long filename 8.3 aliases takes first 6
characters of long filename. If this option is set to N > 0,
NuttX will instead take first 6-N and last N characters to form
the short name. This is useful for filenames like "datafile12.txt"
where the first characters would always remain the same.
* NuttX: FAT32: Fix file date corruption in fat_truncate().
* NuttX: if SD card wait seems to be a long one, give time for other threads to run.
Approved-by: GregoryN <gnutt@nuttx.org>
RNDIS composite support
* NuttX usb/composite.h: Forward-declare composite_devdesc_s.
This avoids "error: conflicting types for 'composite_initialize'"
on some versions of GCC. Because of the cross-inclusion between
usbdev.h and composite.h, the full declaration is not always
available.
* NuttX: USB Composite driver: Fix strid comparison
The last string ID used by composite driver is 4, and
the number of IDs used is 5 (0..4). The comparison
strid <= COMPOSITE_NSTRIDS caused composite driver to
reply with -EINVAL for id 5, even though it should be
available for subdevices to use.
* NuttX: RNDIS USB driver: Add support for composite configuration.
Approved-by: GregoryN <gnutt@nuttx.org>
These Microsoft-only descriptors help in loading the correct driver on Windows.
They are especially helpful to give libusb access to a custom device without
having to manually configure/install WinUSB driver.
With this change DFU interface works automatically on
Windows 10 with dfu-util 0.9 and libusb 1.0.22. On Windows 7
it still appears to need driver installation.
Xbee getset txpwr
* drivers/wireless/ieee802154/xbee: Minor improvements to debug facilities.
* drivers/wireless/ieee802154/xbee: Add support for setting/getting tx power.
TODO: The input/output arguments from the MLME primitive are intended to be an int32_t dbm value. However this change simply reports the power level register of the XBee. Need to add look-up table to back calculate the dbm value.
# Conflicts:
# drivers/wireless/ieee802154/xbee/xbee.c
Approved-by: GregoryN <gnutt@nuttx.org>
In addition to the problems that were previously identified there were a few other bits and pieces outstanding;
* Timing was dependent on CPU speed rather than absolute time
* End of transfer handling was a bit mixed up
* It's possible for data to still be in the FIFO (i.e. not have reached
the card) when a next write is requested, so we need to wait for that to
complete
* Interrupt Status could be carried over from one transfer episode to the
next, corrupting progress
* Multi-descriptor DMA writing simply wasn't implemented, but there were no
indications ... it just failed silently
(1) Now the Ethernet is completely re-initialized when an error occurs by means of taking the interface down and back up but the PHY is _not_ renegotiated for that case because that is very time consuming and an error in the Ethernet is no reflection on the state of the PHY anyway.
(2) Explicitly sets the expected PHY address to zero (this could be moved into the config) rather than searching for it which takes ages, and it's zero anyway for this board (that's the broadcast address, and anything that cannot respond on that has multiple PHYs, so that would be a new board).
(3) Allows for the renegotiation of the PHY to be optional when a reset is needed. If a non-renegotiated reset doesn't result in good comms to the PHY then it'll automatically be escalated to a renegotiated one.
(4) Only performs a reset for errors that need it (the CRITICAL_ERROR define). The list of errors that need reset are somewhat arbitrarily chosen based on my prejudices and might need to be revisited, but certainly the jabber errors don't need reset, the partial packet is thrown away by the layer above anyway.
(5) Re-loads the multicast table on reset.
(6) Adds a bit more logging into the imxrt Ethernet module.
Pull request for mtd/progmem refactoring.
* mtd/progmem: change up_progmem_npages to up_progmem_neraseblocks
page is a unit for read/write operation.
eraseblock is a unit for erase operation.
up_progmem_npages is a little bit confusing because it returns number of
erase blocks in flash memory. This patch changes up_progmem_npages to
up_progmem_neraseblocks. There is no logical change.
Signed-off-by: EunBong Song <eunb.song@samsung.com>
* mtd/progmem: up_progmem_erasesize.
Change argument name to be more readable.
Signed-off-by: EunBong Song <eunb.song@samsung.com>
* mtd/progmem: up_progmem_eraseblock
Change up_progmem_erasepage to up_progmem_eraseblock.
eraseblock is more readable name than erasepage.
Signed-off-by: EunBong Song <eunb.song@samsung.com>
* mtd/progmem: change up_progmem_eraseblock's return value.
up_progmem_eraseblock erase a block. so it's better to return the erase block
size than page size.
Signed-off-by: EunBong Song <eunb.song@samsung.com>
* arm/cortex-r : fix wrong cp15_flash_dcache.
change mcrne to mcr for unconditional dcache.
Signed-off-by: sungduk.cho <sungduk.cho@samsung.com>
Approved-by: GregoryN <gnutt@nuttx.org>
drivers/usbdev: Fix buffer overrun check in rndis.c
The rndis driver has been working since 13 Nov 2017.
However, I finally found that it depends on network and buffer
configurations. If a receiving TCP packet is devided into smaller
ones based on USB max packet size, this condition check works
correctly.
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
Approved-by: GregoryN <gnutt@nuttx.org>
many locations: Change occurences of open() followed by file_detach() to file_open(). Change most non-controversion calls to open() to nx_open().
fs/inode/fs_fileopen.c: Flesh out file_open() with some interim, placeholder logic.
fs/inode/fs_fileopen.c: Add a framework for a file_open() implementation (no real logic in place yet).
fs/vfs/fs_open.c: Add nx_open() which is the same as open() except that it does not create a cancellation point nor does it modify the errno variable.
Squashed commit of the following:
Add procfs support to show stopped tasks. Add nxsig_action() to solve a chicken and egg problem: We needed to use sigaction to set default actions, but sigaction() would refuse to set actions if the default actions could not be caught or ignored.
sched/signal: Add configuration option to selectively enabled/disable default signal actions for SIGSTOP/SIGSTP/SIGCONT and SIGKILL/SIGINT. Fix some compilation issues.
sched/sched: Okay.. I figured out a way to handle state changes that may occur while they were stopped. If a task/thread was already blocked when SIGSTOP/SIGSTP was received, it will restart in the running state. I will appear that to the task/thread that the blocked condition was interrupt by a signal and returns the EINTR error.
sched/group and sched/sched: Finish framework for continue/resume logic.
sched/signal: Roughing out basic structure to support task suspend/resume
Pull request for cortex-r4 codes
* arm/armv7-r: Add general interrupt controller.
This is based on armv7-a gic controller code.
Signed-off-by: EunBong Song <eunb.song@samsung.com>
* arm/armv7-r: add invalidate dcache in arm_head.S
Adding invalidate dcache as a comment in arm_head.S.
Signed-off-by: EunBong Song <eunb.song@samsung.com>
* arm/armv7-r: Fix some wrong configuration of program status register.
PSR_E_BIT bit should be set for big endian system.
PSR_A_BIT bis is set automatically as arm cortex-r4 reference manual 3.7.4.
So we don't need to set this bit.
Signed-off-by: EunBong Song <eunb.song@samsung.com>
* arm/armv7-r: Fix some wrong MPU register definition.
Change MPU_RBAR_ADDR_MASK and MPU_RACR_TEX_SHIFT mask as
arm cortex-r4 reference manual.
Region Base Address Register 0-4 bits are reserved.
MPU Region Access control register type 3-5 bits.
Signed-off-by: EunBong Song <eunb.song@samsung.com>
* driver/mtd: fix compilation error.
This commit fixes below compilation errors.
CC: mtd/smart.c
mtd/smart.c:182:22: error: 'gWearBitToLevelMap4' defined but not used [-Werror=unused-const-variable=]
static const uint8_t gWearBitToLevelMap4[] =
^~~~~~~~~~~~~~~~~~~
mtd/smart.c:170:22: error: 'gWearLevelToBitMap4' defined but not used [-Werror=unused-const-variable=]
static const uint8_t gWearLevelToBitMap4[] =
^~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [smart.o] Error 1
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
Approved-by: GregoryN <gnutt@nuttx.org>