spi-pxa2xx.c (1bed378c6b9116c51ae59b970cf3d9b4e9e62ced) | spi-pxa2xx.c (42c80cd439a938569a86f6ae135d38c1cda5569b) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * Copyright (C) 2005 Stephen Street / StreetFire Sound Labs 4 * Copyright (C) 2013, Intel Corporation 5 */ 6 7#include <linux/acpi.h> 8#include <linux/bitops.h> --- 719 unchanged lines hidden (view full) --- 728 729 /* We did something */ 730 return IRQ_HANDLED; 731} 732 733static void handle_bad_msg(struct driver_data *drv_data) 734{ 735 pxa2xx_spi_off(drv_data); | 1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * Copyright (C) 2005 Stephen Street / StreetFire Sound Labs 4 * Copyright (C) 2013, Intel Corporation 5 */ 6 7#include <linux/acpi.h> 8#include <linux/bitops.h> --- 719 unchanged lines hidden (view full) --- 728 729 /* We did something */ 730 return IRQ_HANDLED; 731} 732 733static void handle_bad_msg(struct driver_data *drv_data) 734{ 735 pxa2xx_spi_off(drv_data); |
736 pxa2xx_spi_write(drv_data, SSCR1, 737 pxa2xx_spi_read(drv_data, SSCR1) & ~drv_data->int_cr1); | 736 clear_SSCR1_bits(drv_data, drv_data->int_cr1); |
738 if (!pxa25x_ssp_comp(drv_data)) 739 pxa2xx_spi_write(drv_data, SSTO, 0); 740 write_SSSR_CS(drv_data, drv_data->clear_sr); 741 742 dev_err(drv_data->ssp->dev, "bad message state in interrupt handler\n"); 743} 744 745static irqreturn_t ssp_int(int irq, void *dev_id) --- 410 unchanged lines hidden (view full) --- 1156 struct spi_message *msg) 1157{ 1158 struct driver_data *drv_data = spi_controller_get_devdata(controller); 1159 1160 /* Disable the SSP */ 1161 pxa2xx_spi_off(drv_data); 1162 /* Clear and disable interrupts and service requests */ 1163 write_SSSR_CS(drv_data, drv_data->clear_sr); | 737 if (!pxa25x_ssp_comp(drv_data)) 738 pxa2xx_spi_write(drv_data, SSTO, 0); 739 write_SSSR_CS(drv_data, drv_data->clear_sr); 740 741 dev_err(drv_data->ssp->dev, "bad message state in interrupt handler\n"); 742} 743 744static irqreturn_t ssp_int(int irq, void *dev_id) --- 410 unchanged lines hidden (view full) --- 1155 struct spi_message *msg) 1156{ 1157 struct driver_data *drv_data = spi_controller_get_devdata(controller); 1158 1159 /* Disable the SSP */ 1160 pxa2xx_spi_off(drv_data); 1161 /* Clear and disable interrupts and service requests */ 1162 write_SSSR_CS(drv_data, drv_data->clear_sr); |
1164 pxa2xx_spi_write(drv_data, SSCR1, 1165 pxa2xx_spi_read(drv_data, SSCR1) 1166 & ~(drv_data->int_cr1 | drv_data->dma_cr1)); | 1163 clear_SSCR1_bits(drv_data, drv_data->int_cr1 | drv_data->dma_cr1); |
1167 if (!pxa25x_ssp_comp(drv_data)) 1168 pxa2xx_spi_write(drv_data, SSTO, 0); 1169 1170 /* 1171 * Stop the DMA if running. Note DMA callback handler may have unset 1172 * the dma_running already, which is fine as stopping is not needed 1173 * then but we shouldn't rely this flag for anything else than 1174 * stopping. For instance to differentiate between PIO and DMA --- 855 unchanged lines hidden --- | 1164 if (!pxa25x_ssp_comp(drv_data)) 1165 pxa2xx_spi_write(drv_data, SSTO, 0); 1166 1167 /* 1168 * Stop the DMA if running. Note DMA callback handler may have unset 1169 * the dma_running already, which is fine as stopping is not needed 1170 * then but we shouldn't rely this flag for anything else than 1171 * stopping. For instance to differentiate between PIO and DMA --- 855 unchanged lines hidden --- |