44 * SPDX-License-Identifier: Apache-2.0
55 */
66
7- #define DT_DRV_COMPAT nxp_imx_flexspi_hyperram
7+ #define DT_DRV_COMPAT nxp_imx_flexspi_s27ks0641
88
99#include <zephyr/logging/log.h>
1010#include <zephyr/sys/util.h>
2323 read-while-write hazards. This configuration is not recommended."
2424#endif
2525
26- LOG_MODULE_REGISTER (memc_flexspi_hyperram , CONFIG_MEMC_LOG_LEVEL );
26+ LOG_MODULE_REGISTER (memc_flexspi_s27ks0641 , CONFIG_MEMC_LOG_LEVEL );
2727
2828enum {
2929 READ_DATA ,
@@ -32,17 +32,17 @@ enum {
3232 WRITE_REG ,
3333};
3434
35- struct memc_flexspi_hyperram_config {
35+ struct memc_flexspi_s27ks0641_config {
3636 flexspi_port_t port ;
3737 flexspi_device_config_t config ;
3838};
3939
4040/* Device variables used in critical sections should be in this structure */
41- struct memc_flexspi_hyperram_data {
41+ struct memc_flexspi_s27ks0641_data {
4242 const struct device * controller ;
4343};
4444
45- static const uint32_t memc_flexspi_hyperram_lut [][4 ] = {
45+ static const uint32_t memc_flexspi_s27ks0641_lut [][4 ] = {
4646 /* Read Data */
4747 [READ_DATA ] = {
4848 FLEXSPI_LUT_SEQ (kFLEXSPI_Command_DDR , kFLEXSPI_8PAD , 0xA0 ,
@@ -84,11 +84,11 @@ static const uint32_t memc_flexspi_hyperram_lut[][4] = {
8484 },
8585};
8686
87- static int memc_flexspi_hyperram_get_vendor_id (const struct device * dev ,
87+ static int memc_flexspi_s27ks0641_get_vendor_id (const struct device * dev ,
8888 uint16_t * vendor_id )
8989{
90- const struct memc_flexspi_hyperram_config * config = dev -> config ;
91- struct memc_flexspi_hyperram_data * data = dev -> data ;
90+ const struct memc_flexspi_s27ks0641_config * config = dev -> config ;
91+ struct memc_flexspi_s27ks0641_data * data = dev -> data ;
9292 uint32_t buffer = 0 ;
9393 int ret ;
9494
@@ -110,10 +110,10 @@ static int memc_flexspi_hyperram_get_vendor_id(const struct device *dev,
110110 return ret ;
111111}
112112
113- static int memc_flexspi_hyperram_init (const struct device * dev )
113+ static int memc_flexspi_s27ks0641_init (const struct device * dev )
114114{
115- const struct memc_flexspi_hyperram_config * config = dev -> config ;
116- struct memc_flexspi_hyperram_data * data = dev -> data ;
115+ const struct memc_flexspi_s27ks0641_config * config = dev -> config ;
116+ struct memc_flexspi_s27ks0641_data * data = dev -> data ;
117117 uint16_t vendor_id ;
118118
119119 if (!device_is_ready (data -> controller )) {
@@ -128,15 +128,15 @@ static int memc_flexspi_hyperram_init(const struct device *dev)
128128 }
129129
130130 if (memc_flexspi_update_lut (data -> controller , 0 ,
131- (const uint32_t * ) memc_flexspi_hyperram_lut ,
132- sizeof (memc_flexspi_hyperram_lut ) / 4 )) {
131+ (const uint32_t * ) memc_flexspi_s27ks0641_lut ,
132+ sizeof (memc_flexspi_s27ks0641_lut ) / 4 )) {
133133 LOG_ERR ("Could not update lut" );
134134 return - EINVAL ;
135135 }
136136
137137 memc_flexspi_reset (data -> controller );
138138
139- if (memc_flexspi_hyperram_get_vendor_id (dev , & vendor_id )) {
139+ if (memc_flexspi_s27ks0641_get_vendor_id (dev , & vendor_id )) {
140140 LOG_ERR ("Could not read vendor id" );
141141 return - EIO ;
142142 }
@@ -179,25 +179,25 @@ static int memc_flexspi_hyperram_init(const struct device *dev)
179179 .enableWriteMask = true, \
180180 } \
181181
182- #define MEMC_FLEXSPI_HYPERRAM (n ) \
183- static const struct memc_flexspi_hyperram_config \
184- memc_flexspi_hyperram_config_ ##n = { \
182+ #define MEMC_FLEXSPI_S27KS0641 (n ) \
183+ static const struct memc_flexspi_s27ks0641_config \
184+ memc_flexspi_s27ks0641_config_ ##n = { \
185185 .port = DT_INST_REG_ADDR(n), \
186186 .config = MEMC_FLEXSPI_DEVICE_CONFIG(n), \
187187 }; \
188188 \
189- static struct memc_flexspi_hyperram_data \
190- memc_flexspi_hyperram_data_ ##n = { \
189+ static struct memc_flexspi_s27ks0641_data \
190+ memc_flexspi_s27ks0641_data_ ##n = { \
191191 .controller = DEVICE_DT_GET(DT_INST_BUS(n)), \
192192 }; \
193193 \
194194 DEVICE_DT_INST_DEFINE(n, \
195- memc_flexspi_hyperram_init , \
195+ memc_flexspi_s27ks0641_init , \
196196 NULL, \
197- &memc_flexspi_hyperram_data_ ##n, \
198- &memc_flexspi_hyperram_config_ ##n, \
197+ &memc_flexspi_s27ks0641_data_ ##n, \
198+ &memc_flexspi_s27ks0641_config_ ##n, \
199199 POST_KERNEL, \
200200 CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
201201 NULL);
202202
203- DT_INST_FOREACH_STATUS_OKAY (MEMC_FLEXSPI_HYPERRAM )
203+ DT_INST_FOREACH_STATUS_OKAY (MEMC_FLEXSPI_S27KS0641 )
0 commit comments