spi-pxa2xx.c (a9c8f68ce2c37ced2f7a8667eda71b7753ede398) spi-pxa2xx.c (8393961c53b31078cfc877bc00eb0f67e1474edd)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Copyright (C) 2005 Stephen Street / StreetFire Sound Labs
4 * Copyright (C) 2013, 2021 Intel Corporation
5 */
6
7#include <linux/acpi.h>
8#include <linux/bitops.h>

--- 1275 unchanged lines hidden (view full) ---

1284
1285 /*
1286 * Protocol drivers may change the chip settings, so...
1287 * if chip_info exists, use it.
1288 */
1289 chip_info = spi->controller_data;
1290
1291 /* chip_info isn't always needed */
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Copyright (C) 2005 Stephen Street / StreetFire Sound Labs
4 * Copyright (C) 2013, 2021 Intel Corporation
5 */
6
7#include <linux/acpi.h>
8#include <linux/bitops.h>

--- 1275 unchanged lines hidden (view full) ---

1284
1285 /*
1286 * Protocol drivers may change the chip settings, so...
1287 * if chip_info exists, use it.
1288 */
1289 chip_info = spi->controller_data;
1290
1291 /* chip_info isn't always needed */
1292 chip->cr1 = 0;
1293 if (chip_info) {
1294 if (chip_info->timeout)
1295 chip->timeout = chip_info->timeout;
1296 if (chip_info->tx_threshold)
1297 tx_thres = chip_info->tx_threshold;
1298 if (chip_info->tx_hi_threshold)
1299 tx_hi_thres = chip_info->tx_hi_threshold;
1300 if (chip_info->rx_threshold)
1301 rx_thres = chip_info->rx_threshold;
1302 chip->dma_threshold = 0;
1292 if (chip_info) {
1293 if (chip_info->timeout)
1294 chip->timeout = chip_info->timeout;
1295 if (chip_info->tx_threshold)
1296 tx_thres = chip_info->tx_threshold;
1297 if (chip_info->tx_hi_threshold)
1298 tx_hi_thres = chip_info->tx_hi_threshold;
1299 if (chip_info->rx_threshold)
1300 rx_thres = chip_info->rx_threshold;
1301 chip->dma_threshold = 0;
1303 if (chip_info->enable_loopback)
1304 chip->cr1 = SSCR1_LBM;
1305 }
1302 }
1303
1304 chip->cr1 = 0;
1306 if (spi_controller_is_slave(drv_data->controller)) {
1307 chip->cr1 |= SSCR1_SCFR;
1308 chip->cr1 |= SSCR1_SCLKDIR;
1309 chip->cr1 |= SSCR1_SFRMDIR;
1310 chip->cr1 |= SSCR1_SPH;
1311 }
1312
1313 if (is_lpss_ssp(drv_data)) {

--- 653 unchanged lines hidden ---
1305 if (spi_controller_is_slave(drv_data->controller)) {
1306 chip->cr1 |= SSCR1_SCFR;
1307 chip->cr1 |= SSCR1_SCLKDIR;
1308 chip->cr1 |= SSCR1_SFRMDIR;
1309 chip->cr1 |= SSCR1_SPH;
1310 }
1311
1312 if (is_lpss_ssp(drv_data)) {

--- 653 unchanged lines hidden ---