spi-pxa2xx.c (c78a85a8430e35aecd53e190a2f6b999062b1037) spi-pxa2xx.c (7d1f1bf699efc9b0f0e92c910dc667a4511943f5)
1/*
2 * Copyright (C) 2005 Stephen Street / StreetFire Sound Labs
3 * Copyright (C) 2013, Intel Corporation
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.

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

923 u32 clk_div = 0;
924 u8 bits = 0;
925 u32 speed = 0;
926 u32 cr0;
927 u32 cr1;
928 u32 dma_thresh = drv_data->cur_chip->dma_threshold;
929 u32 dma_burst = drv_data->cur_chip->dma_burst_size;
930 u32 change_mask = pxa2xx_spi_get_ssrc1_change_mask(drv_data);
1/*
2 * Copyright (C) 2005 Stephen Street / StreetFire Sound Labs
3 * Copyright (C) 2013, Intel Corporation
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.

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

923 u32 clk_div = 0;
924 u8 bits = 0;
925 u32 speed = 0;
926 u32 cr0;
927 u32 cr1;
928 u32 dma_thresh = drv_data->cur_chip->dma_threshold;
929 u32 dma_burst = drv_data->cur_chip->dma_burst_size;
930 u32 change_mask = pxa2xx_spi_get_ssrc1_change_mask(drv_data);
931 int err;
931
932 /* Get current state information */
933 message = drv_data->cur_msg;
934 transfer = drv_data->cur_transfer;
935 chip = drv_data->cur_chip;
936
937 /* Handle for abort */
938 if (message->state == ERROR_STATE) {

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

1042 drv_data->dma_mapped = 0;
1043 if (pxa2xx_spi_dma_is_possible(drv_data->len))
1044 drv_data->dma_mapped = pxa2xx_spi_map_dma_buffers(drv_data);
1045 if (drv_data->dma_mapped) {
1046
1047 /* Ensure we have the correct interrupt handler */
1048 drv_data->transfer_handler = pxa2xx_spi_dma_transfer;
1049
932
933 /* Get current state information */
934 message = drv_data->cur_msg;
935 transfer = drv_data->cur_transfer;
936 chip = drv_data->cur_chip;
937
938 /* Handle for abort */
939 if (message->state == ERROR_STATE) {

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

1043 drv_data->dma_mapped = 0;
1044 if (pxa2xx_spi_dma_is_possible(drv_data->len))
1045 drv_data->dma_mapped = pxa2xx_spi_map_dma_buffers(drv_data);
1046 if (drv_data->dma_mapped) {
1047
1048 /* Ensure we have the correct interrupt handler */
1049 drv_data->transfer_handler = pxa2xx_spi_dma_transfer;
1050
1050 pxa2xx_spi_dma_prepare(drv_data, dma_burst);
1051 err = pxa2xx_spi_dma_prepare(drv_data, dma_burst);
1052 if (err) {
1053 message->status = err;
1054 giveback(drv_data);
1055 return;
1056 }
1051
1052 /* Clear status and start DMA engine */
1053 cr1 = chip->cr1 | dma_thresh | drv_data->dma_cr1;
1054 pxa2xx_spi_write(drv_data, SSSR, drv_data->clear_sr);
1055
1056 pxa2xx_spi_dma_start(drv_data);
1057 } else {
1058 /* Ensure we have the correct interrupt handler */

--- 748 unchanged lines hidden ---
1057
1058 /* Clear status and start DMA engine */
1059 cr1 = chip->cr1 | dma_thresh | drv_data->dma_cr1;
1060 pxa2xx_spi_write(drv_data, SSSR, drv_data->clear_sr);
1061
1062 pxa2xx_spi_dma_start(drv_data);
1063 } else {
1064 /* Ensure we have the correct interrupt handler */

--- 748 unchanged lines hidden ---