aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/common-board-devices.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/common-board-devices.c')
-rw-r--r--arch/arm/mach-omap2/common-board-devices.c27
1 files changed, 2 insertions, 25 deletions
diff --git a/arch/arm/mach-omap2/common-board-devices.c b/arch/arm/mach-omap2/common-board-devices.c
index 94ccf464677b..bcb0c5817167 100644
--- a/arch/arm/mach-omap2/common-board-devices.c
+++ b/arch/arm/mach-omap2/common-board-devices.c
@@ -20,36 +20,15 @@
20 * 20 *
21 */ 21 */
22 22
23#include <linux/i2c.h>
24#include <linux/i2c/twl.h>
25
26#include <linux/gpio.h> 23#include <linux/gpio.h>
27#include <linux/spi/spi.h> 24#include <linux/spi/spi.h>
28#include <linux/spi/ads7846.h> 25#include <linux/spi/ads7846.h>
29 26
30#include <plat/i2c.h>
31#include <plat/mcspi.h> 27#include <plat/mcspi.h>
32#include <plat/nand.h> 28#include <plat/nand.h>
33 29
34#include "common-board-devices.h" 30#include "common-board-devices.h"
35 31
36static struct i2c_board_info __initdata pmic_i2c_board_info = {
37 .addr = 0x48,
38 .flags = I2C_CLIENT_WAKE,
39};
40
41void __init omap_pmic_init(int bus, u32 clkrate,
42 const char *pmic_type, int pmic_irq,
43 struct twl4030_platform_data *pmic_data)
44{
45 strncpy(pmic_i2c_board_info.type, pmic_type,
46 sizeof(pmic_i2c_board_info.type));
47 pmic_i2c_board_info.irq = pmic_irq;
48 pmic_i2c_board_info.platform_data = pmic_data;
49
50 omap_register_i2c_bus(bus, clkrate, &pmic_i2c_board_info, 1);
51}
52
53#if defined(CONFIG_TOUCHSCREEN_ADS7846) || \ 32#if defined(CONFIG_TOUCHSCREEN_ADS7846) || \
54 defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) 33 defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
55static struct omap2_mcspi_device_config ads7846_mcspi_config = { 34static struct omap2_mcspi_device_config ads7846_mcspi_config = {
@@ -115,9 +94,7 @@ void __init omap_ads7846_init(int bus_num, int gpio_pendown, int gpio_debounce,
115#endif 94#endif
116 95
117#if defined(CONFIG_MTD_NAND_OMAP2) || defined(CONFIG_MTD_NAND_OMAP2_MODULE) 96#if defined(CONFIG_MTD_NAND_OMAP2) || defined(CONFIG_MTD_NAND_OMAP2_MODULE)
118static struct omap_nand_platform_data nand_data = { 97static struct omap_nand_platform_data nand_data;
119 .dma_channel = -1, /* disable DMA in OMAP NAND driver */
120};
121 98
122void __init omap_nand_flash_init(int options, struct mtd_partition *parts, 99void __init omap_nand_flash_init(int options, struct mtd_partition *parts,
123 int nr_parts) 100 int nr_parts)
@@ -148,7 +125,7 @@ void __init omap_nand_flash_init(int options, struct mtd_partition *parts,
148 nand_data.cs = nandcs; 125 nand_data.cs = nandcs;
149 nand_data.parts = parts; 126 nand_data.parts = parts;
150 nand_data.nr_parts = nr_parts; 127 nand_data.nr_parts = nr_parts;
151 nand_data.options = options; 128 nand_data.devsize = options;
152 129
153 printk(KERN_INFO "Registering NAND on CS%d\n", nandcs); 130 printk(KERN_INFO "Registering NAND on CS%d\n", nandcs);
154 if (gpmc_nand_init(&nand_data) < 0) 131 if (gpmc_nand_init(&nand_data) < 0)