Skip to content

Commit 39c6d2d

Browse files
Manjunath Hadlinsekhar
Manjunath Hadli
authored andcommitted
ARM: davinci: create new common platform header for davinci
Remove individual platform header files for dm365, dm355, dm644x and dm646x and consolidate it into a single and common header file davinci.h placed in arch/arm/mach-davinci. This reduces the pollution in the include/mach and is consistent with Russell's suggestions as part of his "pet peaves" mail. (See #4 in: http://lists.infradead.org/pipermail/linux-arm-kernel/2011-November/071516.html) While at it, fix the forward declaration of spi_board_info, and include the right header file instead. The further patches in the series take advantage of this consolidation for easy implementation of IO_ADDRESS elimination. Signed-off-by: Manjunath Hadli <[email protected]> [[email protected]: make davinci.h the first local include file, fix forward declaration of spi_board_info and add back Deep Root Systems, LLC copyright] Signed-off-by: Sekhar Nori <[email protected]>
1 parent 3d09140 commit 39c6d2d

16 files changed

+102
-153
lines changed

arch/arm/mach-davinci/board-dm355-evm.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,14 @@
2626
#include <asm/mach-types.h>
2727
#include <asm/mach/arch.h>
2828

29-
#include <mach/dm355.h>
3029
#include <mach/i2c.h>
3130
#include <mach/serial.h>
3231
#include <mach/nand.h>
3332
#include <mach/mmc.h>
3433
#include <mach/usb.h>
3534

35+
#include "davinci.h"
36+
3637
/* NOTE: this is geared for the standard config, with a socketed
3738
* 2 GByte Micron NAND (MT29F16G08FAA) using 128KB sectors. If you
3839
* swap chips, maybe with a different block size, partitioning may

arch/arm/mach-davinci/board-dm355-leopard.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,14 @@
2323
#include <asm/mach-types.h>
2424
#include <asm/mach/arch.h>
2525

26-
#include <mach/dm355.h>
2726
#include <mach/i2c.h>
2827
#include <mach/serial.h>
2928
#include <mach/nand.h>
3029
#include <mach/mmc.h>
3130
#include <mach/usb.h>
3231

32+
#include "davinci.h"
33+
3334
/* NOTE: this is geared for the standard config, with a socketed
3435
* 2 GByte Micron NAND (MT29F16G08FAA) using 128KB sectors. If you
3536
* swap chips, maybe with a different block size, partitioning may

arch/arm/mach-davinci/board-dm365-evm.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
#include <asm/mach/arch.h>
3333

3434
#include <mach/mux.h>
35-
#include <mach/dm365.h>
3635
#include <mach/common.h>
3736
#include <mach/i2c.h>
3837
#include <mach/serial.h>
@@ -42,6 +41,8 @@
4241

4342
#include <media/tvp514x.h>
4443

44+
#include "davinci.h"
45+
4546
static inline int have_imager(void)
4647
{
4748
/* REVISIT when it's supported, trigger via Kconfig */

arch/arm/mach-davinci/board-dm644x-evm.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
#include <asm/mach-types.h>
3131
#include <asm/mach/arch.h>
3232

33-
#include <mach/dm644x.h>
3433
#include <mach/common.h>
3534
#include <mach/i2c.h>
3635
#include <mach/serial.h>
@@ -40,6 +39,8 @@
4039
#include <mach/usb.h>
4140
#include <mach/aemif.h>
4241

42+
#include "davinci.h"
43+
4344
#define DM644X_EVM_PHY_ID "0:01"
4445
#define LXT971_PHY_ID (0x001378e2)
4546
#define LXT971_PHY_MASK (0xfffffff0)

arch/arm/mach-davinci/board-dm646x-evm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
#include <asm/mach-types.h>
3737
#include <asm/mach/arch.h>
3838

39-
#include <mach/dm646x.h>
4039
#include <mach/common.h>
4140
#include <mach/serial.h>
4241
#include <mach/i2c.h>
@@ -45,6 +44,7 @@
4544
#include <mach/cdce949.h>
4645
#include <mach/aemif.h>
4746

47+
#include "davinci.h"
4848
#include "clock.h"
4949

5050
#define NAND_BLOCK_SIZE SZ_128K

arch/arm/mach-davinci/board-neuros-osd2.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
#include <asm/mach-types.h>
3131
#include <asm/mach/arch.h>
3232

33-
#include <mach/dm644x.h>
3433
#include <mach/common.h>
3534
#include <mach/i2c.h>
3635
#include <mach/serial.h>
@@ -39,6 +38,8 @@
3938
#include <mach/mmc.h>
4039
#include <mach/usb.h>
4140

41+
#include "davinci.h"
42+
4243
#define NEUROS_OSD2_PHY_ID "0:01"
4344
#define LXT971_PHY_ID 0x001378e2
4445
#define LXT971_PHY_MASK 0xfffffff0

arch/arm/mach-davinci/board-sffsdr.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,14 @@
3535
#include <asm/mach/arch.h>
3636
#include <asm/mach/flash.h>
3737

38-
#include <mach/dm644x.h>
3938
#include <mach/common.h>
4039
#include <mach/i2c.h>
4140
#include <mach/serial.h>
4241
#include <mach/mux.h>
4342
#include <mach/usb.h>
4443

44+
#include "davinci.h"
45+
4546
#define SFFSDR_PHY_ID "0:01"
4647
static struct mtd_partition davinci_sffsdr_nandflash_partition[] = {
4748
/* U-Boot Environment: Block 0

arch/arm/mach-davinci/davinci.h

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
/*
2+
* This file contains the processor specific definitions
3+
* of the TI DM644x, DM355, DM365, and DM646x.
4+
*
5+
* Copyright (C) 2011 Texas Instruments Incorporated
6+
* Copyright (c) 2007 Deep Root Systems, LLC
7+
*
8+
* This program is free software; you can redistribute it and/or
9+
* modify it under the terms of the GNU General Public License as
10+
* published by the Free Software Foundation version 2.
11+
*
12+
* This program is distributed "as is" WITHOUT ANY WARRANTY of any
13+
* kind, whether express or implied; without even the implied warranty
14+
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU General Public License for more details.
16+
*/
17+
#ifndef __DAVINCI_H
18+
#define __DAVINCI_H
19+
20+
#include <linux/clk.h>
21+
#include <linux/videodev2.h>
22+
#include <linux/davinci_emac.h>
23+
#include <linux/platform_device.h>
24+
#include <linux/spi/spi.h>
25+
26+
#include <mach/asp.h>
27+
#include <mach/keyscan.h>
28+
29+
#include <media/davinci/vpfe_capture.h>
30+
#include <media/davinci/vpif_types.h>
31+
32+
/* DM355 base addresses */
33+
#define DM355_ASYNC_EMIF_CONTROL_BASE 0x01e10000
34+
#define DM355_ASYNC_EMIF_DATA_CE0_BASE 0x02000000
35+
36+
#define ASP1_TX_EVT_EN 1
37+
#define ASP1_RX_EVT_EN 2
38+
39+
/* DM365 base addresses */
40+
#define DM365_ASYNC_EMIF_CONTROL_BASE 0x01d10000
41+
#define DM365_ASYNC_EMIF_DATA_CE0_BASE 0x02000000
42+
#define DM365_ASYNC_EMIF_DATA_CE1_BASE 0x04000000
43+
44+
/* DM644x base addresses */
45+
#define DM644X_ASYNC_EMIF_CONTROL_BASE 0x01e00000
46+
#define DM644X_ASYNC_EMIF_DATA_CE0_BASE 0x02000000
47+
#define DM644X_ASYNC_EMIF_DATA_CE1_BASE 0x04000000
48+
#define DM644X_ASYNC_EMIF_DATA_CE2_BASE 0x06000000
49+
#define DM644X_ASYNC_EMIF_DATA_CE3_BASE 0x08000000
50+
51+
/* DM646x base addresses */
52+
#define DM646X_ASYNC_EMIF_CONTROL_BASE 0x20008000
53+
#define DM646X_ASYNC_EMIF_CS2_SPACE_BASE 0x42000000
54+
55+
/* DM355 function declarations */
56+
void __init dm355_init(void);
57+
void dm355_init_spi0(unsigned chipselect_mask,
58+
struct spi_board_info *info, unsigned len);
59+
void __init dm355_init_asp1(u32 evt_enable, struct snd_platform_data *pdata);
60+
void dm355_set_vpfe_config(struct vpfe_config *cfg);
61+
62+
/* DM365 function declarations */
63+
void __init dm365_init(void);
64+
void __init dm365_init_asp(struct snd_platform_data *pdata);
65+
void __init dm365_init_vc(struct snd_platform_data *pdata);
66+
void __init dm365_init_ks(struct davinci_ks_platform_data *pdata);
67+
void __init dm365_init_rtc(void);
68+
void dm365_init_spi0(unsigned chipselect_mask,
69+
struct spi_board_info *info, unsigned len);
70+
void dm365_set_vpfe_config(struct vpfe_config *cfg);
71+
72+
/* DM644x function declarations */
73+
void __init dm644x_init(void);
74+
void __init dm644x_init_asp(struct snd_platform_data *pdata);
75+
void dm644x_set_vpfe_config(struct vpfe_config *cfg);
76+
77+
/* DM646x function declarations */
78+
void __init dm646x_init(void);
79+
void __init dm646x_init_mcasp0(struct snd_platform_data *pdata);
80+
void __init dm646x_init_mcasp1(struct snd_platform_data *pdata);
81+
int __init dm646x_init_edma(struct edma_rsv_info *rsv);
82+
void dm646x_video_init(void);
83+
void dm646x_setup_vpif(struct vpif_display_config *,
84+
struct vpif_capture_config *);
85+
#endif /*__DAVINCI_H */

arch/arm/mach-davinci/dm355.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
#include <asm/mach/map.h>
2020

21-
#include <mach/dm355.h>
2221
#include <mach/cputype.h>
2322
#include <mach/edma.h>
2423
#include <mach/psc.h>
@@ -31,6 +30,7 @@
3130
#include <mach/spi.h>
3231
#include <mach/gpio-davinci.h>
3332

33+
#include "davinci.h"
3434
#include "clock.h"
3535
#include "mux.h"
3636

arch/arm/mach-davinci/dm365.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
#include <asm/mach/map.h>
2323

24-
#include <mach/dm365.h>
2524
#include <mach/cputype.h>
2625
#include <mach/edma.h>
2726
#include <mach/psc.h>
@@ -35,6 +34,7 @@
3534
#include <mach/spi.h>
3635
#include <mach/gpio-davinci.h>
3736

37+
#include "davinci.h"
3838
#include "clock.h"
3939
#include "mux.h"
4040

arch/arm/mach-davinci/dm644x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
#include <asm/mach/map.h>
1717

18-
#include <mach/dm644x.h>
1918
#include <mach/cputype.h>
2019
#include <mach/edma.h>
2120
#include <mach/irqs.h>
@@ -27,6 +26,7 @@
2726
#include <mach/asp.h>
2827
#include <mach/gpio-davinci.h>
2928

29+
#include "davinci.h"
3030
#include "clock.h"
3131
#include "mux.h"
3232

arch/arm/mach-davinci/dm646x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
#include <asm/mach/map.h>
1818

19-
#include <mach/dm646x.h>
2019
#include <mach/cputype.h>
2120
#include <mach/edma.h>
2221
#include <mach/irqs.h>
@@ -28,6 +27,7 @@
2827
#include <mach/asp.h>
2928
#include <mach/gpio-davinci.h>
3029

30+
#include "davinci.h"
3131
#include "clock.h"
3232
#include "mux.h"
3333

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

Lines changed: 0 additions & 32 deletions
This file was deleted.

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

Lines changed: 0 additions & 36 deletions
This file was deleted.

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

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)