summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2016-10-17 03:30:02 -0400
committerTony Lindgren <tony@atomide.com>2016-11-10 11:18:45 -0500
commit0d07c1cba36e58033c502e29ddb65d2c9a51fcab (patch)
treea7d55e672fba4e2e286fd0dbc83d2c258f76c073
parentcb6675d6a868215a778752318668ab98dfd7738c (diff)
ARM: OMAP2+: Remove legacy twl4030 platform init code
This code is no longer used and can be removed as we are using device tree. Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r--arch/arm/mach-omap2/Makefile2
-rw-r--r--arch/arm/mach-omap2/common-board-devices.h1
-rw-r--r--arch/arm/mach-omap2/twl-common.c81
-rw-r--r--arch/arm/mach-omap2/twl-common.h42
4 files changed, 1 insertions, 125 deletions
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index f7a76178dfa7..221ec1dd4814 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -257,4 +257,4 @@ obj-y += $(nand-m) $(nand-y)
257smsc911x-$(CONFIG_SMSC911X) := gpmc-smsc911x.o 257smsc911x-$(CONFIG_SMSC911X) := gpmc-smsc911x.o
258obj-y += $(smsc911x-m) $(smsc911x-y) 258obj-y += $(smsc911x-m) $(smsc911x-y)
259 259
260obj-y += common-board-devices.o twl-common.o dss-common.o 260obj-y += common-board-devices.o dss-common.o
diff --git a/arch/arm/mach-omap2/common-board-devices.h b/arch/arm/mach-omap2/common-board-devices.h
index 07c88ae083fb..a17b1254e82a 100644
--- a/arch/arm/mach-omap2/common-board-devices.h
+++ b/arch/arm/mach-omap2/common-board-devices.h
@@ -3,7 +3,6 @@
3 3
4#include <sound/tlv320aic3x.h> 4#include <sound/tlv320aic3x.h>
5#include <linux/mfd/menelaus.h> 5#include <linux/mfd/menelaus.h>
6#include "twl-common.h"
7 6
8#define NAND_BLOCK_SIZE SZ_128K 7#define NAND_BLOCK_SIZE SZ_128K
9 8
diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c
deleted file mode 100644
index 876772cb1774..000000000000
--- a/arch/arm/mach-omap2/twl-common.c
+++ /dev/null
@@ -1,81 +0,0 @@
1/*
2 * twl-common.c
3 *
4 * Copyright (C) 2011 Texas Instruments, Inc..
5 * Author: Peter Ujfalusi <peter.ujfalusi@ti.com>
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * version 2 as published by the Free Software Foundation.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
19 * 02110-1301 USA
20 *
21 */
22
23#include <linux/i2c.h>
24#include <linux/i2c/twl.h>
25#include <linux/gpio.h>
26#include <linux/string.h>
27#include <linux/phy/phy.h>
28#include <linux/regulator/machine.h>
29#include <linux/regulator/fixed.h>
30
31#include "soc.h"
32#include "twl-common.h"
33#include "pm.h"
34#include "voltage.h"
35#include "mux.h"
36
37static struct i2c_board_info __initdata pmic_i2c_board_info = {
38 .addr = 0x48,
39 .flags = I2C_CLIENT_WAKE,
40};
41
42void __init omap_pmic_late_init(void)
43{
44 /* Init the OMAP TWL parameters (if PMIC has been registerd) */
45 if (!pmic_i2c_board_info.irq)
46 return;
47
48 omap3_twl_init();
49 omap4_twl_init();
50}
51
52#if IS_ENABLED(CONFIG_SND_OMAP_SOC_OMAP_TWL4030)
53#include <linux/platform_data/omap-twl4030.h>
54
55/* Commonly used configuration */
56static struct omap_tw4030_pdata omap_twl4030_audio_data;
57
58static struct platform_device audio_device = {
59 .name = "omap-twl4030",
60 .id = -1,
61};
62
63void omap_twl4030_audio_init(char *card_name,
64 struct omap_tw4030_pdata *pdata)
65{
66 if (!pdata)
67 pdata = &omap_twl4030_audio_data;
68
69 pdata->card_name = card_name;
70
71 audio_device.dev.platform_data = pdata;
72 platform_device_register(&audio_device);
73}
74
75#else /* SOC_OMAP_TWL4030 */
76void omap_twl4030_audio_init(char *card_name,
77 struct omap_tw4030_pdata *pdata)
78{
79 return;
80}
81#endif /* SOC_OMAP_TWL4030 */
diff --git a/arch/arm/mach-omap2/twl-common.h b/arch/arm/mach-omap2/twl-common.h
deleted file mode 100644
index 44713bb99c7d..000000000000
--- a/arch/arm/mach-omap2/twl-common.h
+++ /dev/null
@@ -1,42 +0,0 @@
1#ifndef __OMAP_PMIC_COMMON__
2#define __OMAP_PMIC_COMMON__
3
4#include "common.h"
5
6#define TWL_COMMON_PDATA_USB (1 << 0)
7#define TWL_COMMON_PDATA_BCI (1 << 1)
8#define TWL_COMMON_PDATA_MADC (1 << 2)
9#define TWL_COMMON_PDATA_AUDIO (1 << 3)
10
11/* Common LDO regulators for TWL4030/TWL6030 */
12#define TWL_COMMON_REGULATOR_VDAC (1 << 0)
13#define TWL_COMMON_REGULATOR_VAUX1 (1 << 1)
14#define TWL_COMMON_REGULATOR_VAUX2 (1 << 2)
15#define TWL_COMMON_REGULATOR_VAUX3 (1 << 3)
16
17/* TWL6030 LDO regulators */
18#define TWL_COMMON_REGULATOR_VMMC (1 << 4)
19#define TWL_COMMON_REGULATOR_VPP (1 << 5)
20#define TWL_COMMON_REGULATOR_VUSIM (1 << 6)
21#define TWL_COMMON_REGULATOR_VANA (1 << 7)
22#define TWL_COMMON_REGULATOR_VCXIO (1 << 8)
23#define TWL_COMMON_REGULATOR_VUSB (1 << 9)
24#define TWL_COMMON_REGULATOR_CLK32KG (1 << 10)
25#define TWL_COMMON_REGULATOR_V1V8 (1 << 11)
26#define TWL_COMMON_REGULATOR_V2V1 (1 << 12)
27
28/* TWL4030 LDO regulators */
29#define TWL_COMMON_REGULATOR_VPLL1 (1 << 4)
30#define TWL_COMMON_REGULATOR_VPLL2 (1 << 5)
31
32
33struct twl4030_platform_data;
34struct twl6040_platform_data;
35struct omap_tw4030_pdata;
36struct i2c_board_info;
37
38void omap_pmic_late_init(void);
39
40void omap_twl4030_audio_init(char *card_name, struct omap_tw4030_pdata *pdata);
41
42#endif /* __OMAP_PMIC_COMMON__ */