stm32-usart.c (87f1f809c9b90903e6a9ee0a8356a2303fd4270d) | stm32-usart.c (8e5481d98bbf1de0ff06a3e488b668572d578e61) |
---|---|
1/* 2 * Copyright (C) Maxime Coquelin 2015 3 * Authors: Maxime Coquelin <mcoquelin.stm32@gmail.com> 4 * Gerald Baeza <gerald.baeza@st.com> 5 * License terms: GNU General Public License (GPL), version 2 6 * 7 * Inspired by st-asc.c from STMicroelectronics (c) 8 */ --- 729 unchanged lines hidden (view full) --- 738 GFP_KERNEL); 739 if (!stm32port->rx_buf) { 740 ret = -ENOMEM; 741 goto alloc_err; 742 } 743 744 /* Configure DMA channel */ 745 memset(&config, 0, sizeof(config)); | 1/* 2 * Copyright (C) Maxime Coquelin 2015 3 * Authors: Maxime Coquelin <mcoquelin.stm32@gmail.com> 4 * Gerald Baeza <gerald.baeza@st.com> 5 * License terms: GNU General Public License (GPL), version 2 6 * 7 * Inspired by st-asc.c from STMicroelectronics (c) 8 */ --- 729 unchanged lines hidden (view full) --- 738 GFP_KERNEL); 739 if (!stm32port->rx_buf) { 740 ret = -ENOMEM; 741 goto alloc_err; 742 } 743 744 /* Configure DMA channel */ 745 memset(&config, 0, sizeof(config)); |
746 config.src_addr = (dma_addr_t)port->membase + ofs->rdr; | 746 config.src_addr = port->mapbase + ofs->rdr; |
747 config.src_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE; 748 749 ret = dmaengine_slave_config(stm32port->rx_ch, &config); 750 if (ret < 0) { 751 dev_err(dev, "rx dma channel config failed\n"); 752 ret = -ENODEV; 753 goto config_err; 754 } --- 55 unchanged lines hidden (view full) --- 810 GFP_KERNEL); 811 if (!stm32port->tx_buf) { 812 ret = -ENOMEM; 813 goto alloc_err; 814 } 815 816 /* Configure DMA channel */ 817 memset(&config, 0, sizeof(config)); | 747 config.src_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE; 748 749 ret = dmaengine_slave_config(stm32port->rx_ch, &config); 750 if (ret < 0) { 751 dev_err(dev, "rx dma channel config failed\n"); 752 ret = -ENODEV; 753 goto config_err; 754 } --- 55 unchanged lines hidden (view full) --- 810 GFP_KERNEL); 811 if (!stm32port->tx_buf) { 812 ret = -ENOMEM; 813 goto alloc_err; 814 } 815 816 /* Configure DMA channel */ 817 memset(&config, 0, sizeof(config)); |
818 config.dst_addr = (dma_addr_t)port->membase + ofs->tdr; | 818 config.dst_addr = port->mapbase + ofs->tdr; |
819 config.dst_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE; 820 821 ret = dmaengine_slave_config(stm32port->tx_ch, &config); 822 if (ret < 0) { 823 dev_err(dev, "tx dma channel config failed\n"); 824 ret = -ENODEV; 825 goto config_err; 826 } --- 222 unchanged lines hidden --- | 819 config.dst_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE; 820 821 ret = dmaengine_slave_config(stm32port->tx_ch, &config); 822 if (ret < 0) { 823 dev_err(dev, "tx dma channel config failed\n"); 824 ret = -ENODEV; 825 goto config_err; 826 } --- 222 unchanged lines hidden --- |