Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CONFIG_SPI_FLASH_W25QXXDV_MAX_DATA_LEN doesn't work in proj.conf #8327

Closed
mazhenke opened this issue Jun 12, 2018 · 3 comments

Comments

Projects
None yet
4 participants
@mazhenke
Copy link

commented Jun 12, 2018

In Kconfig.w25qxxdv file:

config SPI_FLASH_W25QXXDV_MAX_DATA_LEN
	int
	range 1 256
	default 256
	help
	  Maximum transmit or receive data length in one user data frame.

I want to change the CONFIG_SPI_FLASH_W25QXXDV_MAX_DATA_LEN value in my project, so I add
CONFIG_SPI_FLASH_W25QXXDV_MAX_DATA_LEN=32 in my proj.conf
but the CONFIG_SPI_FLASH_W25QXXDV_MAX_DATA_LEN in
zephyr/include/generated/autoconf.h
is still 256, and I got the following cmake warning:

warning: SPI_FLASH_W25QXXDV_MAX_DATA_LEN (defined at drivers/flash/Kconfig.w25qxxdv:77) was assigned the value "32" but got the value "256" -- check dependencies

@nashif nashif added the bug label Jun 12, 2018

@ulfalizer

This comment has been minimized.

Copy link
Collaborator

commented Jun 12, 2018

@mazhenke
SPI_FLASH_W25QXXDV_MAX_DATA_LEN doesn't have a prompt, so it can't be set directly from a prj.conf file.

See http://docs.zephyrproject.org/porting/board_porting.html#setting-configuration-values for an overview of how to set symbols with and without prompts.

Currently a Kconfig.defconfig file would be needed to set the value, but only boards and SoCs can have Kconfig.defconfig, afaik. Maybe SPI_FLASH_W25QXXDV_MAX_DATA_LEN is supposed to be a fixed board setting, or there's a problem with how it is defined.

@tbursztyka touched this code recently. He might have some comments.

@tbursztyka

This comment has been minimized.

Copy link
Collaborator

commented Jun 13, 2018

Perhaps it can be removed (and code modified accordingly).
When I switched that driver to new spi API I got rid of this:
struct spi_flash_data { struct device *spi;
- u8_t buf[CONFIG_SPI_FLASH_W25QXXDV_MAX_DATA_LEN + - W25QXXDV_LEN_CMD_ADDRESS];
`+ struct spi_config spi_cfg;

It looks like this length was only about internal buffer length, which is now useless due to new SPI API.
I'll verify that in the datasheet.

@tbursztyka

This comment has been minimized.

Copy link
Collaborator

commented Jun 14, 2018

yes it's a left-over. I'll remove that

tbursztyka added a commit to tbursztyka/zephyr that referenced this issue Jun 14, 2018

drivers/flash: Remove irrelevant option in w25qxxdv driver
CONFIG_SPI_FLASH_W25QXXDV_MAX_DATA_LEN is a left-over from old SPI API
usage. Now, there is no limit (besides the flash size) in SPI data
transaction.

Fixes zephyrproject-rtos#8327

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>

@tbursztyka tbursztyka self-assigned this Jun 14, 2018

@tbursztyka tbursztyka added this to the v1.13.0 milestone Jun 14, 2018

tbursztyka added a commit to tbursztyka/zephyr that referenced this issue Jun 14, 2018

drivers/flash: Remove irrelevant option in w25qxxdv driver
CONFIG_SPI_FLASH_W25QXXDV_MAX_DATA_LEN is a left-over from old SPI API
usage. Now, there is no limit (besides the flash size) in SPI data
transaction.

Fixes zephyrproject-rtos#8327

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>

@nashif nashif closed this in #8389 Jun 14, 2018

nashif added a commit that referenced this issue Jun 14, 2018

drivers/flash: Remove irrelevant option in w25qxxdv driver
CONFIG_SPI_FLASH_W25QXXDV_MAX_DATA_LEN is a left-over from old SPI API
usage. Now, there is no limit (besides the flash size) in SPI data
transaction.

Fixes #8327

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>

fallrisk added a commit to fallrisk/zephyr that referenced this issue Aug 19, 2018

drivers/flash: Remove irrelevant option in w25qxxdv driver
CONFIG_SPI_FLASH_W25QXXDV_MAX_DATA_LEN is a left-over from old SPI API
usage. Now, there is no limit (besides the flash size) in SPI data
transaction.

Fixes zephyrproject-rtos#8327

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.