Lines Matching refs:ctl_val
68 u32 ctl_val[ASPEED_SPI_MAX]; member
133 u32 ctl = chip->ctl_val[ASPEED_SPI_BASE]; in aspeed_spi_start_user()
144 u32 ctl = chip->ctl_val[ASPEED_SPI_READ] | in aspeed_spi_stop_user()
150 writel(chip->ctl_val[ASPEED_SPI_READ], chip->ctl); in aspeed_spi_stop_user()
301 u32 ctl_val; in do_aspeed_spi_exec_op() local
314 ctl_val = chip->ctl_val[ASPEED_SPI_BASE]; in do_aspeed_spi_exec_op()
315 ctl_val &= ~CTRL_IO_CMD_MASK; in do_aspeed_spi_exec_op()
317 ctl_val |= op->cmd.opcode << CTRL_COMMAND_SHIFT; in do_aspeed_spi_exec_op()
327 ctl_val |= CTRL_IO_ADDRESS_4B; in do_aspeed_spi_exec_op()
331 ctl_val |= CTRL_IO_DUMMY_SET(op->dummy.nbytes / op->dummy.buswidth); in do_aspeed_spi_exec_op()
334 ctl_val |= aspeed_spi_get_io_mode(op); in do_aspeed_spi_exec_op()
337 ctl_val |= CTRL_IO_MODE_WRITE; in do_aspeed_spi_exec_op()
339 ctl_val |= CTRL_IO_MODE_READ; in do_aspeed_spi_exec_op()
343 writel(ctl_val, chip->ctl); in do_aspeed_spi_exec_op()
361 writel(chip->ctl_val[ASPEED_SPI_READ], chip->ctl); in do_aspeed_spi_exec_op()
559 u32 ctl_val; in aspeed_spi_dirmap_create() local
583 ctl_val = readl(chip->ctl) & ~CTRL_IO_CMD_MASK; in aspeed_spi_dirmap_create()
584 ctl_val |= aspeed_spi_get_io_mode(op) | in aspeed_spi_dirmap_create()
589 ctl_val |= CTRL_IO_DUMMY_SET(op->dummy.nbytes / op->dummy.buswidth); in aspeed_spi_dirmap_create()
605 ctl_val |= CTRL_IO_ADDRESS_4B; in aspeed_spi_dirmap_create()
609 chip->ctl_val[ASPEED_SPI_READ] = ctl_val; in aspeed_spi_dirmap_create()
610 writel(chip->ctl_val[ASPEED_SPI_READ], chip->ctl); in aspeed_spi_dirmap_create()
615 chip->cs, op->data.buswidth, chip->ctl_val[ASPEED_SPI_READ]); in aspeed_spi_dirmap_create()
692 chip->ctl_val[ASPEED_SPI_BASE] = CTRL_CE_STOP_ACTIVE | CTRL_IO_MODE_USER; in aspeed_spi_setup()
978 u32 ctl_val; in aspeed_spi_do_calibration() local
990 ctl_val = chip->ctl_val[ASPEED_SPI_READ] & data->hclk_mask; in aspeed_spi_do_calibration()
991 writel(ctl_val, chip->ctl); in aspeed_spi_do_calibration()
1019 tv = chip->ctl_val[ASPEED_SPI_READ] | ASPEED_SPI_HCLK_DIV(i); in aspeed_spi_do_calibration()
1035 chip->ctl_val[i] = (chip->ctl_val[i] & data->hclk_mask) | in aspeed_spi_do_calibration()
1040 writel(chip->ctl_val[ASPEED_SPI_READ], chip->ctl); in aspeed_spi_do_calibration()