Lines Matching full:xp
291 const struct bcm_qspi_parms *xp) in bcm_qspi_calc_spbr() argument
296 if (xp->speed_hz) in bcm_qspi_calc_spbr()
297 spbr = clk_speed_hz / (xp->speed_hz * 2); in bcm_qspi_calc_spbr()
612 const struct bcm_qspi_parms *xp) in bcm_qspi_hw_set_parms() argument
616 if (!bcmspi_parms_did_change(xp, &qspi->last_parms)) in bcm_qspi_hw_set_parms()
632 if (xp->bits_per_word != 16 && xp->bits_per_word != 64) in bcm_qspi_hw_set_parms()
633 spcr |= xp->bits_per_word << MSPI_SPCR0_MSB_BITS_SHIFT; in bcm_qspi_hw_set_parms()
635 spcr |= xp->mode & (MSPI_SPCR0_MSB_CPHA | MSPI_SPCR0_MSB_CPOL); in bcm_qspi_hw_set_parms()
644 if (xp->mode & SPI_3WIRE) in bcm_qspi_hw_set_parms()
649 spbr = bcm_qspi_calc_spbr(MSPI_BASE_FREQ * 4, xp); in bcm_qspi_hw_set_parms()
661 if (xp->bits_per_word > 16) { in bcm_qspi_hw_set_parms()
686 spbr = bcm_qspi_calc_spbr(qspi->base_clk, xp); in bcm_qspi_hw_set_parms()
690 qspi->last_parms = *xp; in bcm_qspi_hw_set_parms()
697 struct bcm_qspi_parms xp; in bcm_qspi_update_parms() local
699 xp.speed_hz = trans->speed_hz; in bcm_qspi_update_parms()
700 xp.bits_per_word = trans->bits_per_word; in bcm_qspi_update_parms()
701 xp.mode = spi->mode; in bcm_qspi_update_parms()
703 bcm_qspi_hw_set_parms(qspi, &xp); in bcm_qspi_update_parms()
708 struct bcm_qspi_parms *xp; in bcm_qspi_setup() local
713 xp = spi_get_ctldata(spi); in bcm_qspi_setup()
714 if (!xp) { in bcm_qspi_setup()
715 xp = kzalloc(sizeof(*xp), GFP_KERNEL); in bcm_qspi_setup()
716 if (!xp) in bcm_qspi_setup()
718 spi_set_ctldata(spi, xp); in bcm_qspi_setup()
720 xp->speed_hz = spi->max_speed_hz; in bcm_qspi_setup()
721 xp->mode = spi->mode; in bcm_qspi_setup()
724 xp->bits_per_word = spi->bits_per_word; in bcm_qspi_setup()
726 xp->bits_per_word = 8; in bcm_qspi_setup()
1240 struct bcm_qspi_parms *xp = spi_get_ctldata(spi); in bcm_qspi_cleanup() local
1242 kfree(xp); in bcm_qspi_cleanup()