Skip to contentSkip to conversation

davinci: re-arrange definitions to have a common davinci header

PATCH Superseded Manjunath Hadli 2 participants 12 messages Nov 14, 2011 – Nov 15, 2011

Subsystems (4)

v2 of 8 Superseded Latest is v8 →

lore
Share & tools
lore
#0 lore raw

v2 cover davinci: re-arrange definitions to have a common davinci header

Re-arrange definitions and remove unnecessary code so that we can have a common header for all davinci platforms. This will enable us to share defines and enable common routines to be used without polluting hardware.h.
This patch set forms the base for a later set of patches for having
a common system module base address (DAVINCI_SYSTEM_MODULE_BASE).

Manjunath Hadli (5):
davinci: dm644x: remove the macros from the header to move to c file
davinci: dm365: remove the macros from the header to move to c file
davinci: dm646x: remove the macros from the header to move to c file
davinci: create new common platform header for davinci
davinci: delete individual platform header files and use a common
header

 arch/arm/mach-davinci/board-dm355-evm.c            |    2 +-
 arch/arm/mach-davinci/board-dm355-leopard.c        |    2 +-
 arch/arm/mach-davinci/board-dm365-evm.c            |    2 +-
 arch/arm/mach-davinci/board-dm644x-evm.c           |    2 +-
 arch/arm/mach-davinci/board-dm646x-evm.c           |    2 +-
 arch/arm/mach-davinci/board-neuros-osd2.c          |    2 +-
 arch/arm/mach-davinci/board-sffsdr.c               |    2 +-
 arch/arm/mach-davinci/dm355.c                      |    2 +-
 arch/arm/mach-davinci/dm365.c                      |   18 ++++-
 arch/arm/mach-davinci/dm644x.c                     |    8 ++-
 arch/arm/mach-davinci/dm646x.c                     |    9 ++-
 arch/arm/mach-davinci/include/mach/dm355.h         |   32 -------
 arch/arm/mach-davinci/include/mach/dm365.h         |   52 ------------
 arch/arm/mach-davinci/include/mach/dm644x.h        |   47 -----------
 arch/arm/mach-davinci/include/mach/dm646x.h        |   41 ---------
 drivers/media/video/davinci/vpif.h                 |    3 +-
 drivers/media/video/davinci/vpif_capture.h         |    1 +
 drivers/media/video/davinci/vpif_display.c         |    2 +-
 19 files changed, 131 insertions(+), 186 deletions(-)
 create mode 100644 arch/arm/mach-davinci/include/mach/davinci_common.h
 delete mode 100644 arch/arm/mach-davinci/include/mach/dm355.h
 delete mode 100644 arch/arm/mach-davinci/include/mach/dm365.h
 delete mode 100644 arch/arm/mach-davinci/include/mach/dm644x.h
 delete mode 100644 arch/arm/mach-davinci/include/mach/dm646x.h
#1 lore raw

PATCH v2 1/5 davinci: dm644x: remove the macros from the header to move to c file

move the register base addresses and offsets used only by dm644x platform file from platform header dm644x.h to dm644x.c as they are used only in the c file.

---
 arch/arm/mach-davinci/dm644x.c              |    6 ++++++
 arch/arm/mach-davinci/include/mach/dm644x.h |    7 -------
 2 files changed, 6 insertions(+), 7 deletions(-)
arch/arm/mach-davinci/dm644x.c +6 -0
index 3470983..1b4b911 100644
@@ -34,6 +34,12 @@
  * Device specific clocks
  */
 #define DM644X_REF_FREQ		27000000
+#define DM644X_EMAC_BASE		0x01c80000
+#define DM644X_EMAC_MDIO_BASE		(DM644X_EMAC_BASE + 0x4000)
+#define DM644X_EMAC_CNTRL_OFFSET	0x0000
+#define DM644X_EMAC_CNTRL_MOD_OFFSET	0x1000
+#define DM644X_EMAC_CNTRL_RAM_OFFSET	0x2000
+#define DM644X_EMAC_CNTRL_RAM_SIZE	0x2000
 
 static struct pll_data pll1_data = {
 	.num       = 1,
arch/arm/mach-davinci/include/mach/dm644x.h +0 -7
index 5a1b26d..724377f 100644
@@ -27,13 +27,6 @@
 #include <mach/asp.h>
 #include <media/davinci/vpfe_capture.h>
 
-#define DM644X_EMAC_BASE		(0x01C80000)
-#define DM644X_EMAC_MDIO_BASE		(DM644X_EMAC_BASE + 0x4000)
-#define DM644X_EMAC_CNTRL_OFFSET	(0x0000)
-#define DM644X_EMAC_CNTRL_MOD_OFFSET	(0x1000)
-#define DM644X_EMAC_CNTRL_RAM_OFFSET	(0x2000)
-#define DM644X_EMAC_CNTRL_RAM_SIZE	(0x2000)
-
 #define DM644X_ASYNC_EMIF_CONTROL_BASE	0x01E00000
 #define DM644X_ASYNC_EMIF_DATA_CE0_BASE 0x02000000
 #define DM644X_ASYNC_EMIF_DATA_CE1_BASE 0x04000000
Signature · 1 line
1.6.2.4
#2 lore raw

PATCH v2 1/5 davinci: dm644x: remove the macros from the header to move to c file

Hello.

Quoted 15 lines · Manjunath Hadli

move the register base addresses and offsets used only by dm644x platform file from platform header dm644x.h to dm644x.c as they are used only in the c file.

---
  arch/arm/mach-davinci/dm644x.c              |    6 ++++++
  arch/arm/mach-davinci/include/mach/dm644x.h |    7 -------
  2 files changed, 6 insertions(+), 7 deletions(-)
arch/arm/mach-davinci/dm644x.c +0 -0
index 3470983..1b4b911 100644

arch/arm/mach-davinci/dm644x.c line 36

Quoted 3 lines
arch/arm/mach-davinci/dm644x.c +0 -0
@@ -34,6 +34,12 @@
   * Device specific clocks
   */
  #define DM644X_REF_FREQ		27000000

Add an empty line here please.

arch/arm/mach-davinci/dm644x.c line 45

Quoted 9 lines
arch/arm/mach-davinci/dm644x.c +6 -0
+#define DM644X_EMAC_BASE		0x01c80000
+#define DM644X_EMAC_MDIO_BASE		(DM644X_EMAC_BASE + 0x4000)
+#define DM644X_EMAC_CNTRL_OFFSET	0x0000
+#define DM644X_EMAC_CNTRL_MOD_OFFSET	0x1000
+#define DM644X_EMAC_CNTRL_RAM_OFFSET	0x2000
+#define DM644X_EMAC_CNTRL_RAM_SIZE	0x2000
 
  static struct pll_data pll1_data = {
  	.num       = 1,

WBR, Sergei

#3 lore raw

PATCH v2 1/5 davinci: dm644x: remove the macros from the header to move to c file

Sergei,

Quoted 14 lines · Sergei Shtylyov

Hello.

Quoted 9 lines · Manjunath Hadli

move the register base addresses and offsets used only by dm644x platform file from platform header dm644x.h to dm644x.c as they are used only in the c file.

---
  arch/arm/mach-davinci/dm644x.c              |    6 ++++++
  arch/arm/mach-davinci/include/mach/dm644x.h |    7 -------
  2 files changed, 6 insertions(+), 7 deletions(-)
Quoted 10 lines

arch/arm/mach-davinci/dm644x.c line 36

Quoted 8 lines
(quoted diff) +0 -0

b/arch/arm/mach-davinci/dm644x.c index 3470983..1b4b911 100644

arch/arm/mach-davinci/dm644x.c +0 -0
@@ -34,6 +34,12 @@
   * Device specific clocks
   */
  #define DM644X_REF_FREQ		27000000

Add an empty line here please.

Ok.

Regards,
--Manju

Quoted 14 lines

arch/arm/mach-davinci/dm644x.c line 45

Quoted 10 lines
arch/arm/mach-davinci/dm644x.c +6 -0
+#define DM644X_EMAC_BASE		0x01c80000
+#define DM644X_EMAC_MDIO_BASE		(DM644X_EMAC_BASE + 0x4000)
+#define DM644X_EMAC_CNTRL_OFFSET	0x0000
+#define DM644X_EMAC_CNTRL_MOD_OFFSET	0x1000
+#define DM644X_EMAC_CNTRL_RAM_OFFSET	0x2000
+#define DM644X_EMAC_CNTRL_RAM_SIZE	0x2000
 
  static struct pll_data pll1_data = {
  	.num       = 1,

WBR, Sergei

#4 lore raw

PATCH v2 2/5 davinci: dm365: remove the macros from the header to move to c file

In reply to Manjunath Hadli

move the register base addresses and offsets used only by dm365 platform file from platform header dm365.h to dm365.c as they are used only in the c file.

---
 arch/arm/mach-davinci/dm365.c              |   16 ++++++++++++++++
 arch/arm/mach-davinci/include/mach/dm365.h |   16 ----------------
 2 files changed, 16 insertions(+), 16 deletions(-)
arch/arm/mach-davinci/dm365.c +16 -0
index 679e168..77edee8 100644
@@ -40,6 +40,22 @@
 
 #define DM365_REF_FREQ		24000000	/* 24 MHz on the DM365 EVM */
 
+/* Base of key scan register bank */
+#define DM365_KEYSCAN_BASE		0x01c69400
+
+#define DM365_RTC_BASE			0x01c69000
+
+#define DAVINCI_DM365_VC_BASE		0x01d0c000
+#define DAVINCI_DMA_VC_TX		2
+#define DAVINCI_DMA_VC_RX		3
+
+#define DM365_EMAC_BASE			0x01d07000
+#define DM365_EMAC_MDIO_BASE		(DM365_EMAC_BASE + 0x4000)
+#define DM365_EMAC_CNTRL_OFFSET		0x0000
+#define DM365_EMAC_CNTRL_MOD_OFFSET	0x3000
+#define DM365_EMAC_CNTRL_RAM_OFFSET	0x1000
+#define DM365_EMAC_CNTRL_RAM_SIZE	0x2000
+
 static struct pll_data pll1_data = {
 	.num		= 1,
 	.phys_base	= DAVINCI_PLL1_BASE,
arch/arm/mach-davinci/include/mach/dm365.h +0 -16
index 2563bf4..51924de 100644
@@ -20,22 +20,6 @@
 #include <mach/keyscan.h>
 #include <media/davinci/vpfe_capture.h>
 
-#define DM365_EMAC_BASE			(0x01D07000)
-#define DM365_EMAC_MDIO_BASE		(DM365_EMAC_BASE + 0x4000)
-#define DM365_EMAC_CNTRL_OFFSET		(0x0000)
-#define DM365_EMAC_CNTRL_MOD_OFFSET	(0x3000)
-#define DM365_EMAC_CNTRL_RAM_OFFSET	(0x1000)
-#define DM365_EMAC_CNTRL_RAM_SIZE	(0x2000)
-
-/* Base of key scan register bank */
-#define DM365_KEYSCAN_BASE		(0x01C69400)
-
-#define DM365_RTC_BASE			(0x01C69000)
-
-#define DAVINCI_DM365_VC_BASE		(0x01D0C000)
-#define DAVINCI_DMA_VC_TX		2
-#define DAVINCI_DMA_VC_RX		3
-
 #define DM365_ASYNC_EMIF_CONTROL_BASE	0x01D10000
 #define DM365_ASYNC_EMIF_DATA_CE0_BASE	0x02000000
 #define DM365_ASYNC_EMIF_DATA_CE1_BASE	0x04000000
Signature · 1 line
1.6.2.4
#5 lore raw

PATCH v2 3/5 davinci: dm646x: remove the macros from the header to move to c file

In reply to Manjunath Hadli

move the register base addresses and offsets used only by dm646x platform file from platform header dm646x.h to dm646x.c as they are used only in the c file.

---
 arch/arm/mach-davinci/dm646x.c              |    7 +++++++
 arch/arm/mach-davinci/include/mach/dm646x.h |    7 -------
 2 files changed, 7 insertions(+), 7 deletions(-)
arch/arm/mach-davinci/dm646x.c +7 -0
index 0b68ed5..0560e82 100644
@@ -46,6 +46,13 @@
 #define DM646X_REF_FREQ		27000000
 #define DM646X_AUX_FREQ		24000000
 
+#define DM646X_EMAC_BASE		0x01c80000
+#define DM646X_EMAC_MDIO_BASE		(DM646X_EMAC_BASE + 0x4000)
+#define DM646X_EMAC_CNTRL_OFFSET	0x0000
+#define DM646X_EMAC_CNTRL_MOD_OFFSET	0x1000
+#define DM646X_EMAC_CNTRL_RAM_OFFSET	0x2000
+#define DM646X_EMAC_CNTRL_RAM_SIZE	0x2000
+
 static struct pll_data pll1_data = {
 	.num       = 1,
 	.phys_base = DAVINCI_PLL1_BASE,
arch/arm/mach-davinci/include/mach/dm646x.h +0 -7
index a8ee6c9..eb95864 100644
@@ -18,13 +18,6 @@
 #include <linux/davinci_emac.h>
 #include <media/davinci/vpif_types.h>
 
-#define DM646X_EMAC_BASE		(0x01C80000)
-#define DM646X_EMAC_MDIO_BASE		(DM646X_EMAC_BASE + 0x4000)
-#define DM646X_EMAC_CNTRL_OFFSET	(0x0000)
-#define DM646X_EMAC_CNTRL_MOD_OFFSET	(0x1000)
-#define DM646X_EMAC_CNTRL_RAM_OFFSET	(0x2000)
-#define DM646X_EMAC_CNTRL_RAM_SIZE	(0x2000)
-
 #define DM646X_ASYNC_EMIF_CONTROL_BASE	0x20008000
 #define DM646X_ASYNC_EMIF_CS2_SPACE_BASE 0x42000000
 
Signature · 1 line
1.6.2.4
#6 lore raw

PATCH v2 4/5 davinci: create new common platform header for davinci

In reply to Manjunath Hadli

remove the code from individual platform header files for dm365, dm355, dm644x and dm646x and consolidate it into a single and common header file davinci_common.h. Include the new header file in individual platform header files as a pre-cursor for deleting these headers in follow up patches.

---
 .../arm/mach-davinci/include/mach/davinci_common.h |   88 ++++++++++++++++++++
 arch/arm/mach-davinci/include/mach/dm355.h         |   18 +----
 arch/arm/mach-davinci/include/mach/dm365.h         |   20 +----
 arch/arm/mach-davinci/include/mach/dm644x.h        |   15 +---
 arch/arm/mach-davinci/include/mach/dm646x.h        |   20 +----
 5 files changed, 92 insertions(+), 69 deletions(-)
 create mode 100644 arch/arm/mach-davinci/include/mach/davinci_common.h
arch/arm/mach-davinci/include/mach/davinci_common.h new file +88 -0
new file mode 100644
index 0000000..a859318
@@ -0,0 +1,88 @@
+/*
+ * This file contains the processor specific definitions
+ * of the TI DM644x, DM355, DM365, and DM646X.
+ *
+ * Copyright (C) 2011 Texas Instruments Incorporated
+ *
+ * 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 version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+#ifndef __DAVINCI_COMMON_H
+#define __DAVINCI_COMMON_H
+
+#include <mach/asp.h>
+#include <linux/clk.h>
+#include <linux/i2c.h>
+#include <mach/keyscan.h>
+#include <linux/videodev2.h>
+#include <linux/davinci_emac.h>
+#include <linux/platform_device.h>
+#include <media/davinci/vpfe_capture.h>
+#include <media/davinci/vpif_types.h>
+
+/* DM355 base addresses */
+#define DM355_ASYNC_EMIF_CONTROL_BASE	0x01e10000
+#define DM355_ASYNC_EMIF_DATA_CE0_BASE	0x02000000
+
+#define ASP1_TX_EVT_EN	1
+#define ASP1_RX_EVT_EN	2
+
+/* DM365 base addresses */
+#define DM365_ASYNC_EMIF_CONTROL_BASE	0x01d10000
+#define DM365_ASYNC_EMIF_DATA_CE0_BASE	0x02000000
+#define DM365_ASYNC_EMIF_DATA_CE1_BASE	0x04000000
+
+/* DM644x base addresses */
+#define DM644X_ASYNC_EMIF_CONTROL_BASE	0x01e00000
+#define DM644X_ASYNC_EMIF_DATA_CE0_BASE 0x02000000
+#define DM644X_ASYNC_EMIF_DATA_CE1_BASE 0x04000000
+#define DM644X_ASYNC_EMIF_DATA_CE2_BASE 0x06000000
+#define DM644X_ASYNC_EMIF_DATA_CE3_BASE 0x08000000
+
+/* DM646x base addresses */
+#define DM646X_ASYNC_EMIF_CONTROL_BASE	0x20008000
+#define DM646X_ASYNC_EMIF_CS2_SPACE_BASE 0x42000000
+
+/* DM355 function declarations */
+struct spi_board_info;
+
+void __init dm355_init(void);
+void dm355_init_spi0(unsigned chipselect_mask,
+		struct spi_board_info *info, unsigned len);
+void __init dm355_init_asp1(u32 evt_enable, struct snd_platform_data *pdata);
+void dm355_set_vpfe_config(struct vpfe_config *cfg);
+
+/* DM365 function declarations */
+void __init dm365_init(void);
+void __init dm365_init_asp(struct snd_platform_data *pdata);
+void __init dm365_init_vc(struct snd_platform_data *pdata);
+void __init dm365_init_ks(struct davinci_ks_platform_data *pdata);
+void __init dm365_init_rtc(void);
+void dm365_init_spi0(unsigned chipselect_mask,
+			struct spi_board_info *info, unsigned len);
+
+void dm365_set_vpfe_config(struct vpfe_config *cfg);
+
+/* DM644X function declarations */
+void __init dm644x_init(void);
+void __init dm644x_init_asp(struct snd_platform_data *pdata);
+void dm644x_set_vpfe_config(struct vpfe_config *cfg);
+
+/* DM646X function declarations */
+void __init dm646x_init(void);
+void __init dm646x_init_mcasp0(struct snd_platform_data *pdata);
+void __init dm646x_init_mcasp1(struct snd_platform_data *pdata);
+void __init dm646x_board_setup_refclk(struct clk *clk);
+int __init dm646x_init_edma(struct edma_rsv_info *rsv);
+
+void dm646x_video_init(void);
+
+void dm646x_setup_vpif(struct vpif_display_config *,
+		       struct vpif_capture_config *);
+#endif /*__DAVINCI_COMMON_H */
arch/arm/mach-davinci/include/mach/dm355.h +1 -17
index 36dff4a..40c298b 100644
@@ -11,22 +11,6 @@
 #ifndef __ASM_ARCH_DM355_H
 #define __ASM_ARCH_DM355_H
 
-#include <mach/hardware.h>
-#include <mach/asp.h>
-#include <media/davinci/vpfe_capture.h>
-
-#define DM355_ASYNC_EMIF_CONTROL_BASE	0x01E10000
-#define DM355_ASYNC_EMIF_DATA_CE0_BASE	0x02000000
-
-#define ASP1_TX_EVT_EN	1
-#define ASP1_RX_EVT_EN	2
-
-struct spi_board_info;
-
-void __init dm355_init(void);
-void dm355_init_spi0(unsigned chipselect_mask,
-		struct spi_board_info *info, unsigned len);
-void __init dm355_init_asp1(u32 evt_enable, struct snd_platform_data *pdata);
-void dm355_set_vpfe_config(struct vpfe_config *cfg);
+#include <mach/davinci_common.h>
 
 #endif /* __ASM_ARCH_DM355_H */
arch/arm/mach-davinci/include/mach/dm365.h +1 -19
index 51924de..3c30934 100644
@@ -13,24 +13,6 @@
 #ifndef __ASM_ARCH_DM365_H
 #define __ASM_ARCH_DM665_H
 
-#include <linux/platform_device.h>
-#include <linux/davinci_emac.h>
-#include <mach/hardware.h>
-#include <mach/asp.h>
-#include <mach/keyscan.h>
-#include <media/davinci/vpfe_capture.h>
+#include <mach/davinci_common.h>
 
-#define DM365_ASYNC_EMIF_CONTROL_BASE	0x01D10000
-#define DM365_ASYNC_EMIF_DATA_CE0_BASE	0x02000000
-#define DM365_ASYNC_EMIF_DATA_CE1_BASE	0x04000000
-
-void __init dm365_init(void);
-void __init dm365_init_asp(struct snd_platform_data *pdata);
-void __init dm365_init_vc(struct snd_platform_data *pdata);
-void __init dm365_init_ks(struct davinci_ks_platform_data *pdata);
-void __init dm365_init_rtc(void);
-void dm365_init_spi0(unsigned chipselect_mask,
-			struct spi_board_info *info, unsigned len);
-
-void dm365_set_vpfe_config(struct vpfe_config *cfg);
 #endif /* __ASM_ARCH_DM365_H */
arch/arm/mach-davinci/include/mach/dm644x.h +1 -14
index 724377f..186fabb 100644
@@ -22,19 +22,6 @@
 #ifndef __ASM_ARCH_DM644X_H
 #define __ASM_ARCH_DM644X_H
 
-#include <linux/davinci_emac.h>
-#include <mach/hardware.h>
-#include <mach/asp.h>
-#include <media/davinci/vpfe_capture.h>
-
-#define DM644X_ASYNC_EMIF_CONTROL_BASE	0x01E00000
-#define DM644X_ASYNC_EMIF_DATA_CE0_BASE 0x02000000
-#define DM644X_ASYNC_EMIF_DATA_CE1_BASE 0x04000000
-#define DM644X_ASYNC_EMIF_DATA_CE2_BASE 0x06000000
-#define DM644X_ASYNC_EMIF_DATA_CE3_BASE 0x08000000
-
-void __init dm644x_init(void);
-void __init dm644x_init_asp(struct snd_platform_data *pdata);
-void dm644x_set_vpfe_config(struct vpfe_config *cfg);
+#include <mach/davinci_common.h>
 
 #endif /* __ASM_ARCH_DM644X_H */
arch/arm/mach-davinci/include/mach/dm646x.h +1 -19
index eb95864..216e7c5 100644
@@ -11,24 +11,6 @@
 #ifndef __ASM_ARCH_DM646X_H
 #define __ASM_ARCH_DM646X_H
 
-#include <mach/hardware.h>
-#include <mach/asp.h>
-#include <linux/i2c.h>
-#include <linux/videodev2.h>
-#include <linux/davinci_emac.h>
-#include <media/davinci/vpif_types.h>
-
-#define DM646X_ASYNC_EMIF_CONTROL_BASE	0x20008000
-#define DM646X_ASYNC_EMIF_CS2_SPACE_BASE 0x42000000
-
-void __init dm646x_init(void);
-void __init dm646x_init_mcasp0(struct snd_platform_data *pdata);
-void __init dm646x_init_mcasp1(struct snd_platform_data *pdata);
-int __init dm646x_init_edma(struct edma_rsv_info *rsv);
-
-void dm646x_video_init(void);
-
-void dm646x_setup_vpif(struct vpif_display_config *,
-		       struct vpif_capture_config *);
+#include <mach/davinci_common.h>
 
 #endif /* __ASM_ARCH_DM646X_H */
Signature · 1 line
1.6.2.4
#7 lore raw

PATCH v2 4/5 davinci: create new common platform header for davinci

Hello.

arch/arm/mach-davinci/include/mach/davinci_common.h

Quoted 22 lines · Manjunath Hadli

remove the code from individual platform header files for dm365, dm355, dm644x and dm646x and consolidate it into a single and common header file davinci_common.h. Include the new header file in individual platform header files as a pre-cursor for deleting these headers in follow up patches.

---
  .../arm/mach-davinci/include/mach/davinci_common.h |   88 ++++++++++++++++++++
  arch/arm/mach-davinci/include/mach/dm355.h         |   18 +----
  arch/arm/mach-davinci/include/mach/dm365.h         |   20 +----
  arch/arm/mach-davinci/include/mach/dm644x.h        |   15 +---
  arch/arm/mach-davinci/include/mach/dm646x.h        |   20 +----
  5 files changed, 92 insertions(+), 69 deletions(-)

create mode 100644 arch/arm/mach-davinci/include/mach/davinci_common.h

arch/arm/mach-davinci/include/mach/davinci_common.h new file +0 -0
new file mode 100644
index 0000000..a859318

Why not call it just davinci.h?

WBR, Sergei

#8 lore raw

PATCH v2 4/5 davinci: create new common platform header for davinci

Sergei,

Quoted 21 lines · Sergei Shtylyov

Hello.

Quoted 16 lines · Manjunath Hadli

remove the code from individual platform header files for dm365, dm355, dm644x and dm646x and consolidate it into a single and common header file davinci_common.h.
Include the new header file in individual platform header files as a pre-cursor for deleting these headers in follow up patches.

---
  .../arm/mach-davinci/include/mach/davinci_common.h |   88 ++++++++++++++++++++
  arch/arm/mach-davinci/include/mach/dm355.h         |   18 +----
  arch/arm/mach-davinci/include/mach/dm365.h         |   20 +----
  arch/arm/mach-davinci/include/mach/dm644x.h        |   15 +---
  arch/arm/mach-davinci/include/mach/dm646x.h        |   20 +----
  5 files changed, 92 insertions(+), 69 deletions(-)

create mode 100644
arch/arm/mach-davinci/include/mach/davinci_common.h

Quoted 8 lines

arch/arm/mach-davinci/include/mach/davinci_common.h

Quoted 6 lines
arch/arm/mach-davinci/include/mach/davinci_common.h new file +0 -0
new file mode 100644
index 0000000..a859318

Why not call it just davinci.h?

Ok.

Regards,
--Manju

Quoted 3 lines

WBR, Sergei

#9 lore raw

PATCH v2 5/5 davinci: delete individual platform header files and use a common header

In reply to Manjunath Hadli

include davinci_common.h file in files using the platform header file for dm355, dm365, dm644x and dm646x and delete the individual platform header files.

---
 arch/arm/mach-davinci/board-dm355-evm.c     |    2 +-
 arch/arm/mach-davinci/board-dm355-leopard.c |    2 +-
 arch/arm/mach-davinci/board-dm365-evm.c     |    2 +-
 arch/arm/mach-davinci/board-dm644x-evm.c    |    2 +-
 arch/arm/mach-davinci/board-dm646x-evm.c    |    2 +-
 arch/arm/mach-davinci/board-neuros-osd2.c   |    2 +-
 arch/arm/mach-davinci/board-sffsdr.c        |    2 +-
 arch/arm/mach-davinci/dm355.c               |    2 +-
 arch/arm/mach-davinci/dm365.c               |    2 +-
 arch/arm/mach-davinci/dm644x.c              |    2 +-
 arch/arm/mach-davinci/dm646x.c              |    2 +-
 arch/arm/mach-davinci/include/mach/dm355.h  |   16 ----------------
 arch/arm/mach-davinci/include/mach/dm365.h  |   18 ------------------
 arch/arm/mach-davinci/include/mach/dm644x.h |   27 ---------------------------
 arch/arm/mach-davinci/include/mach/dm646x.h |   16 ----------------
 drivers/media/video/davinci/vpif.h          |    3 +--
 drivers/media/video/davinci/vpif_capture.h  |    1 +
 drivers/media/video/davinci/vpif_display.c  |    2 +-
 18 files changed, 14 insertions(+), 91 deletions(-)
 delete mode 100644 arch/arm/mach-davinci/include/mach/dm355.h
 delete mode 100644 arch/arm/mach-davinci/include/mach/dm365.h
 delete mode 100644 arch/arm/mach-davinci/include/mach/dm644x.h
 delete mode 100644 arch/arm/mach-davinci/include/mach/dm646x.h
arch/arm/mach-davinci/board-dm355-evm.c +1 -1
index 4e0e707..ab20bd7 100644
@@ -26,7 +26,7 @@
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 
-#include <mach/dm355.h>
+#include <mach/davinci_common.h>
 #include <mach/i2c.h>
 #include <mach/serial.h>
 #include <mach/nand.h>
arch/arm/mach-davinci/board-dm355-leopard.c +1 -1
index ff2d241..f2cffa1 100644
@@ -23,7 +23,7 @@
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 
-#include <mach/dm355.h>
+#include <mach/davinci_common.h>
 #include <mach/i2c.h>
 #include <mach/serial.h>
 #include <mach/nand.h>
arch/arm/mach-davinci/board-dm365-evm.c +1 -1
index 1918ae7..f338b64 100644
@@ -32,7 +32,7 @@
 #include <asm/mach/arch.h>
 
 #include <mach/mux.h>
-#include <mach/dm365.h>
+#include <mach/davinci_common.h>
 #include <mach/common.h>
 #include <mach/i2c.h>
 #include <mach/serial.h>
arch/arm/mach-davinci/board-dm644x-evm.c +1 -1
index 0cf8abf..c12a02e 100644
@@ -30,7 +30,7 @@
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 
-#include <mach/dm644x.h>
+#include <mach/davinci_common.h>
 #include <mach/common.h>
 #include <mach/i2c.h>
 #include <mach/serial.h>
arch/arm/mach-davinci/board-dm646x-evm.c +1 -1
index e574d7f..d7bfc63 100644
@@ -36,7 +36,7 @@
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 
-#include <mach/dm646x.h>
+#include <mach/davinci_common.h>
 #include <mach/common.h>
 #include <mach/serial.h>
 #include <mach/i2c.h>
arch/arm/mach-davinci/board-neuros-osd2.c +1 -1
index e5f231a..be73ed5 100644
@@ -30,7 +30,7 @@
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 
-#include <mach/dm644x.h>
+#include <mach/davinci_common.h>
 #include <mach/common.h>
 #include <mach/i2c.h>
 #include <mach/serial.h>
arch/arm/mach-davinci/board-sffsdr.c +1 -1
index 5dd4da9..330c9f9 100644
@@ -35,7 +35,7 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/flash.h>
 
-#include <mach/dm644x.h>
+#include <mach/davinci_common.h>
 #include <mach/common.h>
 #include <mach/i2c.h>
 #include <mach/serial.h>
arch/arm/mach-davinci/dm355.c +1 -1
index fe520d4..0929e0f 100644
@@ -18,7 +18,7 @@
 
 #include <asm/mach/map.h>
 
-#include <mach/dm355.h>
+#include <mach/davinci_common.h>
 #include <mach/cputype.h>
 #include <mach/edma.h>
 #include <mach/psc.h>
arch/arm/mach-davinci/dm365.c +1 -1
index 77edee8..34aac1b 100644
@@ -21,7 +21,7 @@
 
 #include <asm/mach/map.h>
 
-#include <mach/dm365.h>
+#include <mach/davinci_common.h>
 #include <mach/cputype.h>
 #include <mach/edma.h>
 #include <mach/psc.h>
arch/arm/mach-davinci/dm644x.c +1 -1
index 1b4b911..c4ebee2 100644
@@ -15,7 +15,7 @@
 
 #include <asm/mach/map.h>
 
-#include <mach/dm644x.h>
+#include <mach/davinci_common.h>
 #include <mach/cputype.h>
 #include <mach/edma.h>
 #include <mach/irqs.h>
arch/arm/mach-davinci/dm646x.c +1 -1
index 0560e82..f543be3 100644
@@ -16,7 +16,7 @@
 
 #include <asm/mach/map.h>
 
-#include <mach/dm646x.h>
+#include <mach/davinci_common.h>
 #include <mach/cputype.h>
 #include <mach/edma.h>
 #include <mach/irqs.h>
arch/arm/mach-davinci/include/mach/dm355.h deleted +0 -16
deleted file mode 100644
index 40c298b..0000000
@@ -1,16 +0,0 @@
-/*
- * Chip specific defines for DM355 SoC
- *
- * Author: Kevin Hilman, Deep Root Systems, LLC
- *
- * 2007 (c) Deep Root Systems, LLC. This file is licensed under
- * the terms of the GNU General Public License version 2. This program
- * is licensed "as is" without any warranty of any kind, whether express
- * or implied.
- */
-#ifndef __ASM_ARCH_DM355_H
-#define __ASM_ARCH_DM355_H
-
-#include <mach/davinci_common.h>
-
-#endif /* __ASM_ARCH_DM355_H */
arch/arm/mach-davinci/include/mach/dm365.h deleted +0 -18
deleted file mode 100644
index 3c30934..0000000
@@ -1,18 +0,0 @@
-/*
- * Copyright (C) 2009 Texas Instruments Incorporated
- *
- * 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 version 2.
- *
- * This program is distributed "as is" WITHOUT ANY WARRANTY of any
- * kind, whether express or implied; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- */
-#ifndef __ASM_ARCH_DM365_H
-#define __ASM_ARCH_DM665_H
-
-#include <mach/davinci_common.h>
-
-#endif /* __ASM_ARCH_DM365_H */
arch/arm/mach-davinci/include/mach/dm644x.h deleted +0 -27
deleted file mode 100644
index 186fabb..0000000
@@ -1,27 +0,0 @@
-/*
- * This file contains the processor specific definitions
- * of the TI DM644x.
- *
- * Copyright (C) 2008 Texas Instruments.
- *
- * 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 __ASM_ARCH_DM644X_H
-#define __ASM_ARCH_DM644X_H
-
-#include <mach/davinci_common.h>
-
-#endif /* __ASM_ARCH_DM644X_H */
arch/arm/mach-davinci/include/mach/dm646x.h deleted +0 -16
deleted file mode 100644
index 216e7c5..0000000
@@ -1,16 +0,0 @@
-/*
- * Chip specific defines for DM646x SoC
- *
- * Author: Kevin Hilman, Deep Root Systems, LLC
- *
- * 2007 (c) Deep Root Systems, LLC. This file is licensed under
- * the terms of the GNU General Public License version 2. This program
- * is licensed "as is" without any warranty of any kind, whether express
- * or implied.
- */
-#ifndef __ASM_ARCH_DM646X_H
-#define __ASM_ARCH_DM646X_H
-
-#include <mach/davinci_common.h>
-
-#endif /* __ASM_ARCH_DM646X_H */
drivers/media/video/davinci/vpif.h +1 -2
index 25036cb..73b00bd 100644
@@ -18,8 +18,7 @@
 
 #include <linux/io.h>
 #include <linux/videodev2.h>
-#include <mach/hardware.h>
-#include <mach/dm646x.h>
+#include <mach/davinci_common.h>
 #include <media/davinci/vpif_types.h>
 
 /* Maximum channel allowed */
drivers/media/video/davinci/vpif_capture.h +1 -0
index a693d4e..c019d26 100644
@@ -27,6 +27,7 @@
 #include <media/v4l2-device.h>
 #include <media/videobuf-core.h>
 #include <media/videobuf-dma-contig.h>
+#include <mach/davinci_common.h>
 #include <media/davinci/vpif_types.h>
 
 #include "vpif.h"
drivers/media/video/davinci/vpif_display.c +1 -1
index 286f029..8921871 100644
@@ -39,7 +39,7 @@
 #include <media/v4l2-ioctl.h>
 #include <media/v4l2-chip-ident.h>
 
-#include <mach/dm646x.h>
+#include <mach/davinci_common.h>
 
 #include "vpif_display.h"
 #include "vpif.h"
Signature · 1 line
1.6.2.4
#10 lore raw

PATCH v2 5/5 davinci: delete individual platform header files and use a common header

Hello.

Quoted 5 lines · Manjunath Hadli

include davinci_common.h file in files using the platform header file for dm355, dm365, dm644x and dm646x and delete the individual platform header files.

[...]

drivers/media/video/davinci/vpif.h line 21

Quoted 9 lines
drivers/media/video/davinci/vpif.h +0 -1
index 25036cb..73b00bd 100644
@@ -18,8 +18,7 @@
 
  #include<linux/io.h>
  #include<linux/videodev2.h>
-#include<mach/hardware.h>

Why are you removing this?

Quoted 10 lines
drivers/media/video/davinci/vpif.h +1 -1
-#include<mach/dm646x.h>
+#include<mach/davinci_common.h>
  #include<media/davinci/vpif_types.h>
 
  /* Maximum channel allowed */
drivers/media/video/davinci/vpif_capture.h +0 -0
index a693d4e..c019d26 100644

drivers/media/video/davinci/vpif_capture.h line 30

Quoted 4 lines
drivers/media/video/davinci/vpif_capture.h +1 -0
@@ -27,6 +27,7 @@
  #include<media/v4l2-device.h>
  #include<media/videobuf-core.h>
  #include<media/videobuf-dma-contig.h>
+#include<mach/davinci_common.h>

Not clear why are you adding this when no platform header was included before.

WBR, Sergei

#11 lore raw

PATCH v2 5/5 davinci: delete individual platform header files and use a common header

Sergei,

Quoted 18 lines · Sergei Shtylyov

Hello.

Quoted 5 lines · Manjunath Hadli

include davinci_common.h file in files using the platform header file for dm355, dm365, dm644x and dm646x and delete the individual platform header files.

[...]

Quoted 7 lines
drivers/media/video/davinci/vpif.h +0 -0
index 25036cb..73b00bd 100644
@@ -18,8 +18,7 @@
 
Quoted 5 lines

drivers/media/video/davinci/vpif.h line 21

Quoted 3 lines
drivers/media/video/davinci/vpif.h +0 -1
  #include<linux/io.h>
  #include<linux/videodev2.h>
-#include<mach/hardware.h>

Why are you removing this?

It currently builds without the hardware.h. Perhaps it is not using any of the defines.

Quoted 5 lines
Quoted 5 lines
drivers/media/video/davinci/vpif.h +1 -1
-#include<mach/dm646x.h>
+#include<mach/davinci_common.h>
  #include<media/davinci/vpif_types.h>
 
Quoted 13 lines

drivers/media/video/davinci/vpif_capture.h line 30

Quoted 11 lines
drivers/media/video/davinci/vpif.h +0 -0
  /* Maximum channel allowed */
drivers/media/video/davinci/vpif_capture.h +1 -0
index a693d4e..c019d26 100644
@@ -27,6 +27,7 @@
  #include<media/v4l2-device.h>
  #include<media/videobuf-core.h>
  #include<media/videobuf-dma-contig.h>
+#include<mach/davinci_common.h>

Not clear why are you adding this when no platform header was included before.

There was an inner inclusion of i2c.h. Will correct it for i2c.h only and remove davinci_common.h

Quoted 4 lines

WBR, Sergei

Thx,
-Manju