debug.h is a NuttX-specific, non-POSIX header. Placing it in the
top-level include/ directory creates naming conflicts with external
projects that define their own debug.h.
This commit moves the canonical header to include/nuttx/debug.h,
following the NuttX convention for non-POSIX/non-standard headers,
and updates all in-tree references.
A backward-compatibility shim is left at include/debug.h that
emits a deprecation #warning and re-includes <nuttx/debug.h>,
allowing out-of-tree code to continue building while migrating.
Signed-off-by: Piyush Patle <piyushpatle228@gmail.com>
We have added a defconfig configuration to set the page size of the flash.
According to the CFI protocol, the flash supports a single write operation
with a data volume ranging from byte size up to the maximum number of bytes.
However, the MTD device structure requires defining a page size, which serves
as the minimum write unit of the flash. Hence, this configuration is introduced.
Any page size within the range of 1 to the maximum number of bytes is considered
valid.
Signed-off-by: jingfei <jingfei@xiaomi.com>
1. In cfi_write_unalign(): Add additional check to ensure nbytes is
at least bankwidth size before skipping unaligned start handling.
This prevents incorrect behavior when writing small amounts of
data that are less than bankwidth.
2. In cfi_write(): Align down the write size to bankwidth boundary
when the remaining nbytes is less than the buffer write size.
This ensures the buffer write operation always works with properly
aligned data size, preventing write failures.))
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
Realization of cfi-flash driver.
Add the interfaces of intel and amd command sets.
Signed-off-by: zhengyu9 <zhengyu9@xiaomi.com>
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>