ARM: OMAP: dma.h and legacy code removal
Subsystems (5)
cover ARM: OMAP: dma.h and legacy code removal
Hi
This set gets rid off arch/arm/mach-omap1/dma.h and arch/arm/mach-omap2/dma.h by removing duplicated definitions, by using numeric values when setting hwmod and platform data and by removing legacy stuff.
Most cleanup is done by the scripts in commit logs and
set has been build tested with omap1_defconfig and omap2plus_defconfig.
Jarkko Nikula (8):
ARM: OMAP2+: Remove AES crypto device DMA channel definitions
ARM: OMAP2+: Remove duplicated DMA channel definitions
ARM: OMAP2+: hwmod: Remove remaining DMA channel definitions
ARM: OMAP2+: Remove dma.h
ARM: OMAP1: Remove McBSP DMA channel definitions
ARM: OMAP1: Remove duplicated DMA channel definitions
ARM: OMAP1: Remove legacy irda.h and irda setup from board files
ARM: OMAP1: Remove dma.h
arch/arm/mach-omap1/board-h2.c | 36 ------------ arch/arm/mach-omap1/board-palmte.c | 31 ---------- arch/arm/mach-omap1/board-palmtt.c | 30 ---------- arch/arm/mach-omap1/board-palmz71.c | 31 ---------- arch/arm/mach-omap1/board-sx1.c | 36 ------------ arch/arm/mach-omap1/devices.c | 9 ++- arch/arm/mach-omap1/dma.c | 2 - arch/arm/mach-omap1/dma.h | 42 -------------- arch/arm/mach-omap1/include/mach/irda.h | 33 ----------- arch/arm/mach-omap1/lcd_dma.c | 2 - arch/arm/mach-omap1/mcbsp.c | 33 +++++------ arch/arm/mach-omap2/devices.c | 1 - arch/arm/mach-omap2/dma.h | 61 -------------------- .../mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c | 21 ++++--- arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 19 +++--- 15 files changed, 39 insertions(+), 348 deletions(-) delete mode 100644 arch/arm/mach-omap1/dma.h delete mode 100644 arch/arm/mach-omap1/include/mach/irda.h delete mode 100644 arch/arm/mach-omap2/dma.h
Signature · 1 line
1.7.10.4
PATCH 1/8 ARM: OMAP2+: Remove AES crypto device DMA channel definitions
These became unused after commit 660ffd6
("ARM: OMAP2xxx: hwmod: Convert AES crypto devcie data to hwmod").
--- arch/arm/mach-omap2/dma.h | 2 -- 1 file changed, 2 deletions(-)
arch/arm/mach-omap2/dma.h +0 -2
@@ -25,8 +25,6 @@#define OMAP24XX_DMA_EXT_DMAREQ0 2/* S_DMA_1 */ #define OMAP24XX_DMA_EXT_DMAREQ1 3/* S_DMA_2 */ #define OMAP24XX_DMA_GPMC 4/* S_DMA_3 */ -#define OMAP24XX_DMA_AES_TX 9/* S_DMA_8 */ -#define OMAP24XX_DMA_AES_RX 10/* S_DMA_9 */ #define OMAP242X_DMA_EXT_DMAREQ2 14/* S_DMA_13 */ #define OMAP242X_DMA_EXT_DMAREQ3 15/* S_DMA_14 */ #define OMAP242X_DMA_EXT_DMAREQ4 16/* S_DMA_15 */
Signature · 1 line
1.7.10.4
PATCH 2/8 ARM: OMAP2+: Remove duplicated DMA channel definitions
In reply to Jarkko NikulaMany DMA channel definitions in arch/arm/mach-omap2/dma.h have been moved or redefined in drivers without removing them from dma.h. Remove those with a script below:
egrep '#define OMAP.*DMA' arch/arm/mach-omap2/dma.h \
|cut -f 1 |cut -d ' ' -f 1-2 | while read -r i; do \
if [ `git grep -c "$i" |wc -l` -gt 1 ]; then \
echo "removing" $i; \
sed -i "/${i}/d" arch/arm/mach-omap2/dma.h; \
fi; \
done--- arch/arm/mach-omap2/dma.h | 12 ------------ 1 file changed, 12 deletions(-)
arch/arm/mach-omap2/dma.h +0 -12
@@ -21,30 +21,18 @@/* DMA channels for 24xx */ -#define OMAP24XX_DMA_NO_DEVICE 0 -#define OMAP24XX_DMA_EXT_DMAREQ0 2/* S_DMA_1 */ -#define OMAP24XX_DMA_EXT_DMAREQ1 3/* S_DMA_2 */ -#define OMAP24XX_DMA_GPMC 4/* S_DMA_3 */ -#define OMAP242X_DMA_EXT_DMAREQ2 14/* S_DMA_13 */ -#define OMAP242X_DMA_EXT_DMAREQ3 15/* S_DMA_14 */ -#define OMAP242X_DMA_EXT_DMAREQ4 16/* S_DMA_15 */ #define OMAP34XX_DMA_I2C3_TX 25/* S_DMA_24 */ #define OMAP34XX_DMA_I2C3_RX 26/* S_DMA_25 */ #define OMAP24XX_DMA_I2C1_TX 27/* S_DMA_26 */ #define OMAP24XX_DMA_I2C1_RX 28/* S_DMA_27 */ #define OMAP24XX_DMA_I2C2_TX 29/* S_DMA_28 */ #define OMAP24XX_DMA_I2C2_RX 30/* S_DMA_29 */ -#define OMAP24XX_DMA_MMC2_TX 47/* S_DMA_46 */ -#define OMAP24XX_DMA_MMC2_RX 48/* S_DMA_47 */ #define OMAP24XX_DMA_UART1_TX 49/* S_DMA_48 */ #define OMAP24XX_DMA_UART1_RX 50/* S_DMA_49 */ #define OMAP24XX_DMA_UART2_TX 51/* S_DMA_50 */ #define OMAP24XX_DMA_UART2_RX 52/* S_DMA_51 */ #define OMAP24XX_DMA_UART3_TX 53/* S_DMA_52 */ #define OMAP24XX_DMA_UART3_RX 54/* S_DMA_53 */ -#define OMAP24XX_DMA_MMC1_TX 61/* S_DMA_60 */ -#define OMAP24XX_DMA_MMC1_RX 62/* S_DMA_61 */ -#define OMAP242X_DMA_EXT_DMAREQ5 64/* S_DMA_63 */ #define OMAP34XX_DMA_AES2_TX 65/* S_DMA_64 */ #define OMAP34XX_DMA_AES2_RX 66/* S_DMA_65 */ #define OMAP34XX_DMA_SHA1MD5_RX 69/* S_DMA_68 */
Signature · 1 line
1.7.10.4
PATCH 3/8 ARM: OMAP2+: hwmod: Remove remaining DMA channel definitions
In reply to Jarkko NikulaLast remaining DMA channel definitions in arch/arm/mach-omap2/dma.h are used only by omap_hwmod_2xxx_3xxx_ipblock_data.c and omap_hwmod_3xxx_data.c. Remove them by using directly DMA channel number in hwmod data and drop definitions with a following script:
egrep '#define [OMAP|AM35XX].*DMA' arch/arm/mach-omap2/dma.h | cut -f 1,3 \
| while read i; do \
DEF=`echo $i |cut -d ' ' -f 2`; \
CH=`echo $i |cut -d ' ' -f 3`; \
echo "removing" $DEF; \
sed -i "s/${DEF}/${CH}/" arch/arm/mach-omap2/omap_hwmod_*.c; \
sed -i "/${DEF}/d" arch/arm/mach-omap2/dma.h; \
done--- arch/arm/mach-omap2/dma.h | 19 ------------------- .../mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c | 20 ++++++++++---------- arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 18 +++++++++--------- 3 files changed, 19 insertions(+), 38 deletions(-)
arch/arm/mach-omap2/dma.h +0 -19
@@ -21,27 +21,8 @@/* DMA channels for 24xx */ -#define OMAP34XX_DMA_I2C3_TX 25/* S_DMA_24 */ -#define OMAP34XX_DMA_I2C3_RX 26/* S_DMA_25 */ -#define OMAP24XX_DMA_I2C1_TX 27/* S_DMA_26 */ -#define OMAP24XX_DMA_I2C1_RX 28/* S_DMA_27 */ -#define OMAP24XX_DMA_I2C2_TX 29/* S_DMA_28 */ -#define OMAP24XX_DMA_I2C2_RX 30/* S_DMA_29 */ -#define OMAP24XX_DMA_UART1_TX 49/* S_DMA_48 */ -#define OMAP24XX_DMA_UART1_RX 50/* S_DMA_49 */ -#define OMAP24XX_DMA_UART2_TX 51/* S_DMA_50 */ -#define OMAP24XX_DMA_UART2_RX 52/* S_DMA_51 */ -#define OMAP24XX_DMA_UART3_TX 53/* S_DMA_52 */ -#define OMAP24XX_DMA_UART3_RX 54/* S_DMA_53 */ -#define OMAP34XX_DMA_AES2_TX 65/* S_DMA_64 */ -#define OMAP34XX_DMA_AES2_RX 66/* S_DMA_65 */ -#define OMAP34XX_DMA_SHA1MD5_RX 69/* S_DMA_68 */ -#define OMAP36XX_DMA_UART4_TX 81/* S_DMA_80 */ -#define OMAP36XX_DMA_UART4_RX 82/* S_DMA_81 */ /* Only for AM35xx */ -#define AM35XX_DMA_UART4_TX 54 -#define AM35XX_DMA_UART4_RX 55#endif /* __OMAP2PLUS_DMA_CHANNEL_H */
arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c +10 -10
@@ -89,32 +89,32 @@ struct omap_hwmod_class omap2_venc_hwmod_class = {/* Common DMA request line data */ struct omap_hwmod_dma_info omap2_uart1_sdma_reqs[] = { - { .name ="rx" , .dma_req =OMAP24XX_DMA_UART1_RX , }, - { .name ="tx" , .dma_req =OMAP24XX_DMA_UART1_TX , }, + { .name ="rx" , .dma_req =50 , }, + { .name ="tx" , .dma_req =49 , }, { .dma_req =-1 } };struct omap_hwmod_dma_info omap2_uart2_sdma_reqs[] = { - { .name ="rx" , .dma_req =OMAP24XX_DMA_UART2_RX , }, - { .name ="tx" , .dma_req =OMAP24XX_DMA_UART2_TX , }, + { .name ="rx" , .dma_req =52 , }, + { .name ="tx" , .dma_req =51 , }, { .dma_req =-1 } };struct omap_hwmod_dma_info omap2_uart3_sdma_reqs[] = { - { .name ="rx" , .dma_req =OMAP24XX_DMA_UART3_RX , }, - { .name ="tx" , .dma_req =OMAP24XX_DMA_UART3_TX , }, + { .name ="rx" , .dma_req =54 , }, + { .name ="tx" , .dma_req =53 , }, { .dma_req =-1 } };struct omap_hwmod_dma_info omap2_i2c1_sdma_reqs[] = { - { .name ="tx" , .dma_req =OMAP24XX_DMA_I2C1_TX }, - { .name ="rx" , .dma_req =OMAP24XX_DMA_I2C1_RX }, + { .name ="tx" , .dma_req =27 }, + { .name ="rx" , .dma_req =28 }, { .dma_req =-1 } };struct omap_hwmod_dma_info omap2_i2c2_sdma_reqs[] = { - { .name ="tx" , .dma_req =OMAP24XX_DMA_I2C2_TX }, - { .name ="rx" , .dma_req =OMAP24XX_DMA_I2C2_RX }, + { .name ="tx" , .dma_req =29 }, + { .name ="rx" , .dma_req =30 }, { .dma_req =-1 } };
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +9 -9
@@ -548,8 +548,8 @@ static struct omap_hwmod_irq_info uart4_mpu_irqs[] = { };static struct omap_hwmod_dma_info uart4_sdma_reqs[] = { - { .name ="rx" , .dma_req =OMAP36XX_DMA_UART4_RX , }, - { .name ="tx" , .dma_req =OMAP36XX_DMA_UART4_TX , }, + { .name ="rx" , .dma_req =82 , }, + { .name ="tx" , .dma_req =81 , }, { .dma_req =-1 } };
@@ -577,8 +577,8 @@ static struct omap_hwmod_irq_info am35xx_uart4_mpu_irqs[] = { };static struct omap_hwmod_dma_info am35xx_uart4_sdma_reqs[] = { - { .name ="rx" , .dma_req =AM35XX_DMA_UART4_RX , }, - { .name ="tx" , .dma_req =AM35XX_DMA_UART4_TX , }, + { .name ="rx" , .dma_req =55 , }, + { .name ="tx" , .dma_req =54 , }, { .dma_req =-1 } };
@@ -857,8 +857,8 @@ static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = { };static struct omap_hwmod_dma_info i2c3_sdma_reqs[] = { - { .name ="tx" , .dma_req =OMAP34XX_DMA_I2C3_TX }, - { .name ="rx" , .dma_req =OMAP34XX_DMA_I2C3_RX }, + { .name ="tx" , .dma_req =25 }, + { .name ="rx" , .dma_req =26 }, { .dma_req =-1 } };
@@ -3581,7 +3581,7 @@ static struct omap_hwmod_irq_info omap3_sham_mpu_irqs[] = { };static struct omap_hwmod_dma_info omap3_sham_sdma_reqs[] = { - { .name ="rx" , .dma_req =OMAP34XX_DMA_SHA1MD5_RX , }, + { .name ="rx" , .dma_req =69 , }, { .dma_req =-1 } };
@@ -3642,8 +3642,8 @@ static struct omap_hwmod_class omap3xxx_aes_class = { };static struct omap_hwmod_dma_info omap3_aes_sdma_reqs[] = { - { .name ="tx" , .dma_req =OMAP34XX_DMA_AES2_TX , }, - { .name ="rx" , .dma_req =OMAP34XX_DMA_AES2_RX , }, + { .name ="tx" , .dma_req =65 , }, + { .name ="rx" , .dma_req =66 , }, { .dma_req =-1 } };
Signature · 1 line
1.7.10.4
PATCH 3/8 ARM: OMAP2+: hwmod: Remove remaining DMA channel definitions
Quoted 27 lines · Jarkko Nikula
Last remaining DMA channel definitions in
arch/arm/mach-omap2/dma.hare used only byomap_hwmod_2xxx_3xxx_ipblock_data.candomap_hwmod_3xxx_data.c. Remove them by using directly DMA channel number in hwmod data and drop definitions with a following script:egrep '#define [OMAP|AM35XX].*DMA' arch/arm/mach-omap2/dma.h | cut -f 1,3 \ | while read i; do \ DEF=`echo $i |cut -d ' ' -f 2`; \ CH=`echo $i |cut -d ' ' -f 3`; \ echo "removing" $DEF; \ sed -i "s/${DEF}/${CH}/" arch/arm/mach-omap2/omap_hwmod_*.c; \ sed -i "/${DEF}/d" arch/arm/mach-omap2/dma.h; \ doneSigned-off-by Jarkko Nikula <[email protected]>Cc Paul Walmsley <[email protected]>--- arch/arm/mach-omap2/dma.h | 19 ------------------- .../mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c | 20 ++++++++++---------- arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 18 +++++++++--------- 3 files changed, 19 insertions(+), 38 deletions(-)arch/arm/mach-omap2/dma.h +0
-0
arch/arm/mach-omap2/dma.h line 23
Quoted 3 lines
arch/arm/mach-omap2/dma.h +0
-0@@ -21,27 +21,8 @@/* DMA channels for 24xx */
could remove the comments too.
Signature · 8 lines
balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130615/688f85ad/attachment-0001.sig>
PATCH 3/8 ARM: OMAP2+: hwmod: Remove remaining DMA channel definitions
Hi Felipe
Quoted 15 lines · Felipe Balbi
Quoted 14 lines · Jarkko Nikula
Last remaining DMA channel definitions in
arch/arm/mach-omap2/dma.hare used only byomap_hwmod_2xxx_3xxx_ipblock_data.candomap_hwmod_3xxx_data.c. Remove them by using directly DMA channel number in hwmod data and drop definitions with a following script:egrep '#define [OMAP|AM35XX].*DMA' arch/arm/mach-omap2/dma.h | cut -f 1,3 \ | while read i; do \ DEF=`echo $i |cut -d ' ' -f 2`; \ CH=`echo $i |cut -d ' ' -f 3`; \ echo "removing" $DEF; \ sed -i "s/${DEF}/${CH}/" arch/arm/mach-omap2/omap_hwmod_*.c; \ sed -i "/${DEF}/d" arch/arm/mach-omap2/dma.h; \ done
Quoted 4 lines
Quoted 1 line
/* DMA channels for 24xx */
could remove the comments too.
You are right. Actually I was thinking that myself too with this and omap1 patches but decided to keep manual work and scripts bare minimum and let final git rm in 4/8 and 8/8 to handle these :-)
Signature · 1 line
Jarkko
Paul Walmsley
maintainerPATCH 3/8 ARM: OMAP2+: hwmod: Remove remaining DMA channel definitions
In reply to Jarkko NikulaQuoted 14 lines · Jarkko Nikula
Last remaining DMA channel definitions in
arch/arm/mach-omap2/dma.hare used only byomap_hwmod_2xxx_3xxx_ipblock_data.candomap_hwmod_3xxx_data.c. Remove them by using directly DMA channel number in hwmod data and drop definitions with a following script:egrep '#define [OMAP|AM35XX].*DMA' arch/arm/mach-omap2/dma.h | cut -f 1,3 \ | while read i; do \ DEF=`echo $i |cut -d ' ' -f 2`; \ CH=`echo $i |cut -d ' ' -f 3`; \ echo "removing" $DEF; \ sed -i "s/${DEF}/${CH}/" arch/arm/mach-omap2/omap_hwmod_*.c; \ sed -i "/${DEF}/d" arch/arm/mach-omap2/dma.h; \ done
Quoted 2 lines
Signed-off-by Jarkko Nikula <[email protected]>Cc Paul Walmsley <[email protected]>
Looks fine to me for v3.12. I guess Tony will take this series.
- Paul
PATCH 4/8 ARM: OMAP2+: Remove dma.h
In reply to Jarkko NikulaAll definitions in arch/arm/mach-omap2/dma.h are removed so it can be removed now.
--- arch/arm/mach-omap2/devices.c | 1 - arch/arm/mach-omap2/dma.h | 28 -------------------- .../mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c | 1 - arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 1 - 4 files changed, 31 deletions(-) delete mode 100644 arch/arm/mach-omap2/dma.h
arch/arm/mach-omap2/devices.c +0 -1
@@ -37,7 +37,6 @@#include "mux.h" #include "control.h" #include "devices.h" -#include "dma.h" #define L3_MODULES_MAX_LEN 12#define L3_MODULES 3
arch/arm/mach-omap2/dma.h deleted +0 -28
@@ -1,28 +0,0 @@ -/* -* OMAP2PLUS DMA channel definitions -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#ifndef __OMAP2PLUS_DMA_CHANNEL_H -#define __OMAP2PLUS_DMA_CHANNEL_H - - -/* DMA channels for 24xx */ - - -/* Only for AM35xx */ - -#endif /* __OMAP2PLUS_DMA_CHANNEL_H */
arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c +0 -1
@@ -17,7 +17,6 @@#include "hdq1w.h" #include "omap_hwmod_common_data.h" -#include "dma.h" /* UART */
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +0 -1
@@ -35,7 +35,6 @@#include "prm-regbits-34xx.h" #include "cm-regbits-34xx.h" -#include "dma.h" #include "i2c.h" #include "mmc.h" #include "wd_timer.h"
Signature · 1 line
1.7.10.4
PATCH 5/8 ARM: OMAP1: Remove McBSP DMA channel definitions
In reply to Jarkko Nikulaarch/arm/mach-omap1/mcbsp.c is only place where OMAP1 McBSP DMA channel definitions are set. We may well use numerical values there and get rid of their definitions in arch/arm/mach-omap1/dma.h.
Remove dma.h include from arch/arm/mach-omap1/mcbsp.c and use following script for replacing definitions with DMA channel number:
egrep '#define OMAP_DMA_MCBSP' arch/arm/mach-omap1/dma.h | cut -f 1,3 \
| while read i; do \
DEF=`echo $i |cut -d ' ' -f 2`; \
CH=`echo $i |cut -d ' ' -f 3`; \
echo "removing" $DEF; \
sed -i "s/${DEF}/${CH}/" arch/arm/mach-omap1/mcbsp.c; \
sed -i "/${DEF}/d" arch/arm/mach-omap1/dma.h; \
done--- arch/arm/mach-omap1/dma.h | 6 ------ arch/arm/mach-omap1/mcbsp.c | 33 ++++++++++++++++----------------- 2 files changed, 16 insertions(+), 23 deletions(-)
arch/arm/mach-omap1/dma.h +0 -6
@@ -21,12 +21,6 @@/* DMA channels for omap1 */ #define OMAP_DMA_NO_DEVICE 0 -#define OMAP_DMA_MCBSP1_TX 8 -#define OMAP_DMA_MCBSP1_RX 9 -#define OMAP_DMA_MCBSP3_TX 10 -#define OMAP_DMA_MCBSP3_RX 11 -#define OMAP_DMA_MCBSP2_TX 16 -#define OMAP_DMA_MCBSP2_RX 17#define OMAP_DMA_UART3_TX 18#define OMAP_DMA_UART3_RX 19#define OMAP_DMA_CAMERA_IF_RX 20
arch/arm/mach-omap1/mcbsp.c +16 -17
@@ -27,7 +27,6 @@#include <mach/irqs.h> #include "iomap.h" -#include "dma.h" #define DPS_RSTCT2_PER_EN (1 << 0)#define DSP_RSTCT2_WD_PER_EN (1 << 1)
@@ -114,12 +113,12 @@ struct resource omap7xx_mcbsp_res[][6] = { }, { .name = "rx", - .start = OMAP_DMA_MCBSP1_RX, + .start = 9, .flags = IORESOURCE_DMA, }, { .name = "tx", - .start = OMAP_DMA_MCBSP1_TX, + .start = 8, .flags = IORESOURCE_DMA, }, },
@@ -141,12 +140,12 @@ struct resource omap7xx_mcbsp_res[][6] = { }, { .name = "rx", - .start = OMAP_DMA_MCBSP3_RX, + .start = 11, .flags = IORESOURCE_DMA, }, { .name = "tx", - .start = OMAP_DMA_MCBSP3_TX, + .start = 10, .flags = IORESOURCE_DMA, }, },
@@ -191,12 +190,12 @@ struct resource omap15xx_mcbsp_res[][6] = { }, { .name = "rx", - .start = OMAP_DMA_MCBSP1_RX, + .start = 9, .flags = IORESOURCE_DMA, }, { .name = "tx", - .start = OMAP_DMA_MCBSP1_TX, + .start = 8, .flags = IORESOURCE_DMA, }, },
@@ -218,12 +217,12 @@ struct resource omap15xx_mcbsp_res[][6] = { }, { .name = "rx", - .start = OMAP_DMA_MCBSP2_RX, + .start = 17, .flags = IORESOURCE_DMA, }, { .name = "tx", - .start = OMAP_DMA_MCBSP2_TX, + .start = 16, .flags = IORESOURCE_DMA, }, },
@@ -245,12 +244,12 @@ struct resource omap15xx_mcbsp_res[][6] = { }, { .name = "rx", - .start = OMAP_DMA_MCBSP3_RX, + .start = 11, .flags = IORESOURCE_DMA, }, { .name = "tx", - .start = OMAP_DMA_MCBSP3_TX, + .start = 10, .flags = IORESOURCE_DMA, }, },
@@ -298,12 +297,12 @@ struct resource omap16xx_mcbsp_res[][6] = { }, { .name = "rx", - .start = OMAP_DMA_MCBSP1_RX, + .start = 9, .flags = IORESOURCE_DMA, }, { .name = "tx", - .start = OMAP_DMA_MCBSP1_TX, + .start = 8, .flags = IORESOURCE_DMA, }, },
@@ -325,12 +324,12 @@ struct resource omap16xx_mcbsp_res[][6] = { }, { .name = "rx", - .start = OMAP_DMA_MCBSP2_RX, + .start = 17, .flags = IORESOURCE_DMA, }, { .name = "tx", - .start = OMAP_DMA_MCBSP2_TX, + .start = 16, .flags = IORESOURCE_DMA, }, },
@@ -352,12 +351,12 @@ struct resource omap16xx_mcbsp_res[][6] = { }, { .name = "rx", - .start = OMAP_DMA_MCBSP3_RX, + .start = 11, .flags = IORESOURCE_DMA, }, { .name = "tx", - .start = OMAP_DMA_MCBSP3_TX, + .start = 10, .flags = IORESOURCE_DMA, }, },
Signature · 1 line
1.7.10.4
PATCH 6/8 ARM: OMAP1: Remove duplicated DMA channel definitions
In reply to Jarkko NikulaSimilarly than with OMAP2 there are many DMA channel definitions that have been moved or redefined in drivers using them and we can remove them from dma.h.
There is exception with MMC that arch/arm/mach-omap1/devices.c is using MMC DMA channel definitions for setting platform data but those can be well replaced with numeric values.
Remove dma.h include from arch/arm/mach-omap1/devices.c and use a script below for dropping duplicated definitions and for replacing definitions with DMA channel numbers.
grep '#define OMAP_DMA' arch/arm/mach-omap1/dma.h | while read -r i; do \
DDEF=`echo $i |cut -d ' ' -f 1-2`; \
DEF=`echo $DDEF |cut -d ' ' -f 2`; \
CH=`echo $i |cut -d ' ' -f 3`; \
if [ `git grep -c "$DDEF" |wc -l` -gt 1 ]; then \
echo "removing" $DEF; \
sed -i "s/${DEF}/${CH}/" arch/arm/mach-omap1/devices.c; \
sed -i "/${DDEF}/d" arch/arm/mach-omap1/dma.h; \
fi; \
done--- arch/arm/mach-omap1/devices.c | 9 ++++----- arch/arm/mach-omap1/dma.h | 8 -------- 2 files changed, 4 insertions(+), 13 deletions(-)
arch/arm/mach-omap1/devices.c +4 -5
@@ -30,7 +30,6 @@#include "common.h" #include "clock.h" -#include "dma.h" #include "mmc.h" #include "sram.h"
@@ -223,16 +222,16 @@ void __init omap1_init_mmc(struct omap_mmc_platform_data **mmc_data,case 0 : base =OMAP1_MMC1_BASE ; irq =INT_MMC ; - rx_req =OMAP_DMA_MMC_RX ; - tx_req =OMAP_DMA_MMC_TX ; + rx_req =22 ; + tx_req =21 ;break ;case 1 :if (!cpu_is_omap16xx ())return ; base =OMAP1_MMC2_BASE ; irq =INT_1610_MMC2 ; - rx_req =OMAP_DMA_MMC2_RX ; - tx_req =OMAP_DMA_MMC2_TX ; + rx_req =55 ; + tx_req =54 ;break ;default :continue ;
arch/arm/mach-omap1/dma.h +0 -8
@@ -20,17 +20,9 @@#define __OMAP1_DMA_CHANNEL_H/* DMA channels for omap1 */ -#define OMAP_DMA_NO_DEVICE 0#define OMAP_DMA_UART3_TX 18#define OMAP_DMA_UART3_RX 19 -#define OMAP_DMA_CAMERA_IF_RX 20 -#define OMAP_DMA_MMC_TX 21 -#define OMAP_DMA_MMC_RX 22 -#define OMAP_DMA_USB_W2FC_RX0 26 -#define OMAP_DMA_USB_W2FC_TX0 29/* These are only for 1610 */ -#define OMAP_DMA_MMC2_TX 54 -#define OMAP_DMA_MMC2_RX 55#endif /* __OMAP1_DMA_CHANNEL_H */
Signature · 1 line
1.7.10.4
PATCH 7/8 ARM: OMAP1: Remove legacy irda.h and irda setup from board files
In reply to Jarkko Nikulaomap-ir.c driver has never been upstream and was also removed from linux-omap.git four years ago (See linux-omap.git commit efd1e3f ("REMOVE OMAP LEGACY CODE: Reset drivers/net/irda to mainline")).
Therefore remove needless device registration from a few board files and delete thus to be unused arch/arm/mach-omap1/include/mach/irda.h and unused OMAP_DMA_UART3_* definitions from dma.h.
--- arch/arm/mach-omap1/board-h2.c | 36 ------------------------------- arch/arm/mach-omap1/board-palmte.c | 31 -------------------------- arch/arm/mach-omap1/board-palmtt.c | 30 -------------------------- arch/arm/mach-omap1/board-palmz71.c | 31 -------------------------- arch/arm/mach-omap1/board-sx1.c | 36 ------------------------------- arch/arm/mach-omap1/dma.h | 2 -- arch/arm/mach-omap1/include/mach/irda.h | 33 ---------------------------- 7 files changed, 199 deletions(-) delete mode 100644 arch/arm/mach-omap1/include/mach/irda.h
arch/arm/mach-omap1/board-h2.c +0 -36
@@ -41,7 +41,6 @@#include <mach/mux.h> #include <linux/omap-dma.h> #include <mach/tc.h> -#include <mach/irda.h> #include <linux/platform_data/keypad-omap.h> #include <mach/flash.h>
@@ -50,7 +49,6 @@#include "common.h" #include "board-h2.h" -#include "dma.h" /* At OMAP1610 Innovator the Ethernet is directly connected to CS1 */ #define OMAP1610_ETHR_START 0x04000300
@@ -276,39 +274,6 @@ static struct platform_device h2_kp_device = { .resource = h2_kp_resources, }; -#define H2_IRDA_FIRSEL_GPIO_PIN 17 - -static struct omap_irda_config h2_irda_data = { - .transceiver_cap =IR_SIRMODE |IR_MIRMODE |IR_FIRMODE , - .rx_channel =OMAP_DMA_UART3_RX , - .tx_channel =OMAP_DMA_UART3_TX , - .dest_start =UART3_THR , - .src_start =UART3_RHR , - .tx_trigger =0 , - .rx_trigger =0 , -}; - -static struct resource h2_irda_resources[] = { - [0 ] = { - .start =INT_UART3 , - .end =INT_UART3 , - .flags =IORESOURCE_IRQ , - }, -}; - -static u64 irda_dmamask =0xffffffff ; - -static struct platform_device h2_irda_device = { - .name ="omapirda" , - .id =0 , - .dev = { - .platform_data = &h2_irda_data, - .dma_mask = &irda_dmamask, - }, - .num_resources =ARRAY_SIZE (h2_irda_resources), - .resource = h2_irda_resources, -}; -static struct gpio_led h2_gpio_led_pins[] = { { .name ="h2:red" ,
@@ -339,7 +304,6 @@ static struct platform_device *h2_devices[] __initdata = { &h2_nor_device, &h2_nand_device, &h2_smc91x_device, - &h2_irda_device, &h2_kp_device, &h2_gpio_leds, };
arch/arm/mach-omap1/board-palmte.c +0 -31
@@ -38,14 +38,12 @@#include <mach/mux.h> #include <mach/tc.h> #include <linux/omap-dma.h> -#include <mach/irda.h> #include <linux/platform_data/keypad-omap.h> #include <mach/hardware.h> #include <mach/usb.h> #include "common.h" -#include "dma.h" #define PALMTE_USBDETECT_GPIO 0#define PALMTE_USB_OR_DC_GPIO 1
@@ -167,40 +165,11 @@ static struct platform_device palmte_backlight_device = { }, }; -static struct omap_irda_config palmte_irda_config = { - .transceiver_cap =IR_SIRMODE , - .rx_channel =OMAP_DMA_UART3_RX , - .tx_channel =OMAP_DMA_UART3_TX , - .dest_start =UART3_THR , - .src_start =UART3_RHR , - .tx_trigger =0 , - .rx_trigger =0 , -}; - -static struct resource palmte_irda_resources[] = { - [0 ] = { - .start =INT_UART3 , - .end =INT_UART3 , - .flags =IORESOURCE_IRQ , - }, -}; - -static struct platform_device palmte_irda_device = { - .name ="omapirda" , - .id =-1 , - .dev = { - .platform_data = &palmte_irda_config, - }, - .num_resources =ARRAY_SIZE (palmte_irda_resources), - .resource = palmte_irda_resources, -}; -static struct platform_device *palmte_devices[]__initdata = { &palmte_rom_device, &palmte_kp_device, &palmte_lcd_device, &palmte_backlight_device, - &palmte_irda_device, };static struct omap_usb_config palmte_usb_config__initdata = {
arch/arm/mach-omap1/board-palmtt.c +0 -30
@@ -38,14 +38,12 @@#include <mach/mux.h> #include <linux/omap-dma.h> #include <mach/tc.h> -#include <mach/irda.h> #include <linux/platform_data/keypad-omap.h> #include <mach/hardware.h> #include <mach/usb.h> #include "common.h" -#include "dma.h" #define PALMTT_USBDETECT_GPIO 0#define PALMTT_CABLE_GPIO 1
@@ -163,33 +161,6 @@ static struct platform_device palmtt_lcd_device = { .name = "lcd_palmtt", .id = -1, }; -static struct omap_irda_config palmtt_irda_config = { - .transceiver_cap =IR_SIRMODE , - .rx_channel =OMAP_DMA_UART3_RX , - .tx_channel =OMAP_DMA_UART3_TX , - .dest_start =UART3_THR , - .src_start =UART3_RHR , - .tx_trigger =0 , - .rx_trigger =0 , -}; - -static struct resource palmtt_irda_resources[] = { - [0 ] = { - .start =INT_UART3 , - .end =INT_UART3 , - .flags =IORESOURCE_IRQ , - }, -}; - -static struct platform_device palmtt_irda_device = { - .name ="omapirda" , - .id =-1 , - .dev = { - .platform_data = &palmtt_irda_config, - }, - .num_resources =ARRAY_SIZE (palmtt_irda_resources), - .resource = palmtt_irda_resources, -};static struct platform_device palmtt_spi_device = { .name ="spi_palmtt" ,
@@ -234,7 +205,6 @@ static struct platform_device *palmtt_devices[] __initdata = { &palmtt_flash_device, &palmtt_kp_device, &palmtt_lcd_device, - &palmtt_irda_device, &palmtt_spi_device, &palmtt_backlight_device, &palmtt_led_device,
arch/arm/mach-omap1/board-palmz71.c +0 -31
@@ -40,14 +40,12 @@#include <mach/mux.h> #include <linux/omap-dma.h> #include <mach/tc.h> -#include <mach/irda.h> #include <linux/platform_data/keypad-omap.h> #include <mach/hardware.h> #include <mach/usb.h> #include "common.h" -#include "dma.h" #define PALMZ71_USBDETECT_GPIO 0#define PALMZ71_PENIRQ_GPIO 6
@@ -153,34 +151,6 @@ static struct platform_device palmz71_lcd_device = { .id = -1, }; -static struct omap_irda_config palmz71_irda_config = { - .transceiver_cap =IR_SIRMODE , - .rx_channel =OMAP_DMA_UART3_RX , - .tx_channel =OMAP_DMA_UART3_TX , - .dest_start =UART3_THR , - .src_start =UART3_RHR , - .tx_trigger =0 , - .rx_trigger =0 , -}; - -static struct resource palmz71_irda_resources[] = { - [0 ] = { - .start =INT_UART3 , - .end =INT_UART3 , - .flags =IORESOURCE_IRQ , - }, -}; - -static struct platform_device palmz71_irda_device = { - .name ="omapirda" , - .id =-1 , - .dev = { - .platform_data = &palmz71_irda_config, - }, - .num_resources =ARRAY_SIZE (palmz71_irda_resources), - .resource = palmz71_irda_resources, -}; -static struct platform_device palmz71_spi_device = { .name ="spi_palmz71" , .id =-1 ,
@@ -202,7 +172,6 @@ static struct platform_device *devices[] __initdata = { &palmz71_rom_device, &palmz71_kp_device, &palmz71_lcd_device, - &palmz71_irda_device, &palmz71_spi_device, &palmz71_backlight_device, };
arch/arm/mach-omap1/board-sx1.c +0 -36
@@ -37,7 +37,6 @@#include <mach/flash.h> #include <mach/mux.h> #include <linux/omap-dma.h> -#include <mach/irda.h> #include <mach/tc.h> #include <mach/board-sx1.h>
@@ -45,7 +44,6 @@#include <mach/usb.h> #include "common.h" -#include "dma.h" /* Write to I2C device */ int sx1_i2c_write_byte (u8 devaddr,u8 regoffset,u8 value)
@@ -228,39 +226,6 @@ static struct platform_device sx1_kp_device = { .resource = sx1_kp_resources, }; -/*----------- IRDA -------------------------*/ - -static struct omap_irda_config sx1_irda_data = { - .transceiver_cap =IR_SIRMODE , - .rx_channel =OMAP_DMA_UART3_RX , - .tx_channel =OMAP_DMA_UART3_TX , - .dest_start =UART3_THR , - .src_start =UART3_RHR , - .tx_trigger =0 , - .rx_trigger =0 , -}; - -static struct resource sx1_irda_resources[] = { - [0 ] = { - .start =INT_UART3 , - .end =INT_UART3 , - .flags =IORESOURCE_IRQ , - }, -}; - -static u64 irda_dmamask =0xffffffff ; - -static struct platform_device sx1_irda_device = { - .name ="omapirda" , - .id =0 , - .dev = { - .platform_data = &sx1_irda_data, - .dma_mask = &irda_dmamask, - }, - .num_resources =ARRAY_SIZE (sx1_irda_resources), - .resource = sx1_irda_resources, -}; -/*----------- MTD -------------------------*/ static struct mtd_partition sx1_partitions[] = {
@@ -366,7 +331,6 @@ static struct omap_lcd_config sx1_lcd_config __initdata = {static struct platform_device *sx1_devices[]__initdata = { &sx1_flash_device, &sx1_kp_device, - &sx1_irda_device, };/*-----------------------------------------*/
arch/arm/mach-omap1/dma.h +0 -2
@@ -20,8 +20,6 @@#define __OMAP1_DMA_CHANNEL_H/* DMA channels for omap1 */ -#define OMAP_DMA_UART3_TX 18 -#define OMAP_DMA_UART3_RX 19/* These are only for 1610 */
arch/arm/mach-omap1/include/mach/irda.h deleted +0 -33
@@ -1,33 +0,0 @@ -/* -* arch/arm/plat-omap/include/mach/irda.h -* -* Copyright (C) 2005-2006 Komal Shah <[email protected]> -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -*/ -#ifndef ASMARM_ARCH_IRDA_H -#define ASMARM_ARCH_IRDA_H - -/* board specific transceiver capabilities */ - -#define IR_SEL 1/* Selects IrDA */ -#define IR_SIRMODE 2 -#define IR_FIRMODE 4 -#define IR_MIRMODE 8 - -struct omap_irda_config { -int transceiver_cap; -int (*transceiver_mode)(struct device *dev,int mode); -int (*select_irda)(struct device *dev,int state); -int rx_channel; -int tx_channel; -unsigned long dest_start; -unsigned long src_start; -int tx_trigger; -int rx_trigger; -int mode; -}; - -#endif
Signature · 1 line
1.7.10.4
PATCH 8/8 ARM: OMAP1: Remove dma.h
In reply to Jarkko NikulaAdd definitions in arch/arm/mach-omap1/dma.h are now removed so remove the file and include statements from dma.c and lcd_dma.c.
--- arch/arm/mach-omap1/dma.c | 2 -- arch/arm/mach-omap1/dma.h | 26 -------------------------- arch/arm/mach-omap1/lcd_dma.c | 2 -- 3 files changed, 30 deletions(-) delete mode 100644 arch/arm/mach-omap1/dma.h
arch/arm/mach-omap1/dma.c +0 -2
@@ -30,8 +30,6 @@#include <mach/irqs.h> -#include "dma.h" -#define OMAP1_DMA_BASE (0xfffed800)#define OMAP1_LOGICAL_DMA_CH_COUNT 17#define OMAP1_DMA_STRIDE 0x40
arch/arm/mach-omap1/dma.h deleted +0 -26
@@ -1,26 +0,0 @@ -/* -* OMAP1 DMA channel definitions -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#ifndef __OMAP1_DMA_CHANNEL_H -#define __OMAP1_DMA_CHANNEL_H - -/* DMA channels for omap1 */ - -/* These are only for 1610 */ - -#endif /* __OMAP1_DMA_CHANNEL_H */
arch/arm/mach-omap1/lcd_dma.c +0 -2
@@ -32,8 +32,6 @@#include <mach/hardware.h> #include <mach/lcdc.h> -#include "dma.h" -int omap_lcd_dma_running (void ) {/*
Signature · 1 line
1.7.10.4
Tony Lindgren
maintainercover ARM: OMAP: dma.h and legacy code removal
In reply to Jarkko NikulaQuoted 9 lines · Jarkko Nikula
Hi
This set gets rid off
arch/arm/mach-omap1/dma.handarch/arm/mach-omap2/dma.hby removing duplicated definitions, by using numeric values when setting hwmod and platform data and by removing legacy stuff.Most cleanup is done by the scripts in commit logs and
set has been build tested withomap1_defconfigandomap2plus_defconfig.
Thanks applying these into omap-for-v3.11/dma.
Regards,
Tony