@@ -451,7 +451,7 @@ static int nxp_fspi_check_buswidth(struct nxp_fspi *f, u8 width)
451451static bool nxp_fspi_supports_op (struct spi_mem * mem ,
452452 const struct spi_mem_op * op )
453453{
454- struct nxp_fspi * f = spi_controller_get_devdata (mem -> spi -> master );
454+ struct nxp_fspi * f = spi_controller_get_devdata (mem -> spi -> controller );
455455 int ret ;
456456
457457 ret = nxp_fspi_check_buswidth (f , op -> cmd .buswidth );
@@ -520,7 +520,7 @@ static int fspi_readl_poll_tout(struct nxp_fspi *f, void __iomem *base,
520520}
521521
522522/*
523- * If the slave device content being changed by Write/Erase, need to
523+ * If the target device content being changed by Write/Erase, need to
524524 * invalidate the AHB buffer. This can be achieved by doing the reset
525525 * of controller after setting MCR0[SWRESET] bit.
526526 */
@@ -661,7 +661,7 @@ static void nxp_fspi_dll_calibration(struct nxp_fspi *f)
661661
662662/*
663663 * In FlexSPI controller, flash access is based on value of FSPI_FLSHXXCR0
664- * register and start base address of the slave device.
664+ * register and start base address of the target device.
665665 *
666666 * (Higher address)
667667 * -------- <-- FLSHB2CR0
@@ -680,15 +680,15 @@ static void nxp_fspi_dll_calibration(struct nxp_fspi *f)
680680 *
681681 *
682682 * Start base address defines the starting address range for given CS and
683- * FSPI_FLSHXXCR0 defines the size of the slave device connected at given CS.
683+ * FSPI_FLSHXXCR0 defines the size of the target device connected at given CS.
684684 *
685685 * But, different targets are having different combinations of number of CS,
686686 * some targets only have single CS or two CS covering controller's full
687687 * memory mapped space area.
688688 * Thus, implementation is being done as independent of the size and number
689- * of the connected slave device.
689+ * of the connected target device.
690690 * Assign controller memory mapped space size as the size to the connected
691- * slave device.
691+ * target device.
692692 * Mark FLSHxxCR0 as zero initially and then assign value only to the selected
693693 * chip-select Flash configuration register.
694694 *
@@ -704,8 +704,8 @@ static void nxp_fspi_select_mem(struct nxp_fspi *f, struct spi_device *spi)
704704 uint64_t size_kb ;
705705
706706 /*
707- * Return, if previously selected slave device is same as current
708- * requested slave device.
707+ * Return, if previously selected target device is same as current
708+ * requested target device.
709709 */
710710 if (f -> selected == spi_get_chipselect (spi , 0 ))
711711 return ;
@@ -722,7 +722,7 @@ static void nxp_fspi_select_mem(struct nxp_fspi *f, struct spi_device *spi)
722722 fspi_writel (f , size_kb , f -> iobase + FSPI_FLSHA1CR0 +
723723 4 * spi_get_chipselect (spi , 0 ));
724724
725- dev_dbg (f -> dev , "Slave device [CS:%x] selected\n" , spi_get_chipselect (spi , 0 ));
725+ dev_dbg (f -> dev , "Target device [CS:%x] selected\n" , spi_get_chipselect (spi , 0 ));
726726
727727 nxp_fspi_clk_disable_unprep (f );
728728
@@ -912,7 +912,7 @@ static int nxp_fspi_do_op(struct nxp_fspi *f, const struct spi_mem_op *op)
912912
913913static int nxp_fspi_exec_op (struct spi_mem * mem , const struct spi_mem_op * op )
914914{
915- struct nxp_fspi * f = spi_controller_get_devdata (mem -> spi -> master );
915+ struct nxp_fspi * f = spi_controller_get_devdata (mem -> spi -> controller );
916916 int err = 0 ;
917917
918918 mutex_lock (& f -> lock );
@@ -952,7 +952,7 @@ static int nxp_fspi_exec_op(struct spi_mem *mem, const struct spi_mem_op *op)
952952
953953static int nxp_fspi_adjust_op_size (struct spi_mem * mem , struct spi_mem_op * op )
954954{
955- struct nxp_fspi * f = spi_controller_get_devdata (mem -> spi -> master );
955+ struct nxp_fspi * f = spi_controller_get_devdata (mem -> spi -> controller );
956956
957957 if (op -> data .dir == SPI_MEM_DATA_OUT ) {
958958 if (op -> data .nbytes > f -> devtype_data -> txfifo )
@@ -1049,7 +1049,7 @@ static int nxp_fspi_default_setup(struct nxp_fspi *f)
10491049 fspi_writel (f , FSPI_MCR0_MDIS , base + FSPI_MCR0 );
10501050
10511051 /*
1052- * Config the DLL register to default value, enable the slave clock delay
1052+ * Config the DLL register to default value, enable the target clock delay
10531053 * line delay cell override mode, and use 1 fixed delay cell in DLL delay
10541054 * chain, this is the suggested setting when clock rate < 100MHz.
10551055 */
@@ -1062,7 +1062,7 @@ static int nxp_fspi_default_setup(struct nxp_fspi *f)
10621062 base + FSPI_MCR0 );
10631063
10641064 /*
1065- * Disable same device enable bit and configure all slave devices
1065+ * Disable same device enable bit and configure all target devices
10661066 * independently.
10671067 */
10681068 reg = fspi_readl (f , f -> iobase + FSPI_MCR2 );
@@ -1100,7 +1100,7 @@ static int nxp_fspi_default_setup(struct nxp_fspi *f)
11001100
11011101static const char * nxp_fspi_get_name (struct spi_mem * mem )
11021102{
1103- struct nxp_fspi * f = spi_controller_get_devdata (mem -> spi -> master );
1103+ struct nxp_fspi * f = spi_controller_get_devdata (mem -> spi -> controller );
11041104 struct device * dev = & mem -> spi -> dev ;
11051105 const char * name ;
11061106
@@ -1137,7 +1137,7 @@ static int nxp_fspi_probe(struct platform_device *pdev)
11371137 int ret ;
11381138 u32 reg ;
11391139
1140- ctlr = spi_alloc_master (& pdev -> dev , sizeof (* f ));
1140+ ctlr = spi_alloc_host (& pdev -> dev , sizeof (* f ));
11411141 if (!ctlr )
11421142 return - ENOMEM ;
11431143
0 commit comments