aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2013-08-23 04:34:42 -0400
committerLinus Walleij <linus.walleij@linaro.org>2013-09-26 05:08:37 -0400
commit6dd937e8f634dd8de67185d887643ab7f4ec15b9 (patch)
tree2922f00d04431d42c2d7a7fcc26e93be127c39a6
parentf368a0874b314f53d8cd2739731a66c961db6d48 (diff)
ARM: ux500: Delete U8500 UIB support when booting with ATAGs
It's time to remove all ATAG support from ux500 and rely solely on Device Tree booting. This patch is part of that endeavour. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--arch/arm/mach-ux500/Makefile1
-rw-r--r--arch/arm/mach-ux500/board-mop500-u8500uib.c14
-rw-r--r--arch/arm/mach-ux500/board-mop500-uib.c30
-rw-r--r--arch/arm/mach-ux500/board-mop500.h1
4 files changed, 1 insertions, 45 deletions
diff --git a/arch/arm/mach-ux500/Makefile b/arch/arm/mach-ux500/Makefile
index 685f6153aa39..0d2a89394e7b 100644
--- a/arch/arm/mach-ux500/Makefile
+++ b/arch/arm/mach-ux500/Makefile
@@ -9,7 +9,6 @@ obj-$(CONFIG_UX500_SOC_DB8500) += cpu-db8500.o devices-db8500.o
9obj-$(CONFIG_MACH_MOP500) += board-mop500.o board-mop500-sdi.o \ 9obj-$(CONFIG_MACH_MOP500) += board-mop500.o board-mop500-sdi.o \
10 board-mop500-regulators.o \ 10 board-mop500-regulators.o \
11 board-mop500-uib.o board-mop500-stuib.o \ 11 board-mop500-uib.o board-mop500-stuib.o \
12 board-mop500-u8500uib.o \
13 board-mop500-pins.o \ 12 board-mop500-pins.o \
14 board-mop500-audio.o 13 board-mop500-audio.o
15obj-$(CONFIG_SMP) += platsmp.o headsmp.o 14obj-$(CONFIG_SMP) += platsmp.o headsmp.o
diff --git a/arch/arm/mach-ux500/board-mop500-u8500uib.c b/arch/arm/mach-ux500/board-mop500-u8500uib.c
deleted file mode 100644
index 43c9ff109d13..000000000000
--- a/arch/arm/mach-ux500/board-mop500-u8500uib.c
+++ /dev/null
@@ -1,14 +0,0 @@
1/*
2 * Copyright (C) ST-Ericsson SA 2010
3 *
4 * Board data for the U8500 UIB, also known as the New UIB
5 * License terms: GNU General Public License (GPL), version 2
6 */
7#include <linux/kernel.h>
8#include <linux/init.h>
9
10#include "board-mop500.h"
11
12void __init mop500_u8500uib_init(void)
13{
14}
diff --git a/arch/arm/mach-ux500/board-mop500-uib.c b/arch/arm/mach-ux500/board-mop500-uib.c
index bdaa422da028..0e94f1dc7a6f 100644
--- a/arch/arm/mach-ux500/board-mop500-uib.c
+++ b/arch/arm/mach-ux500/board-mop500-uib.c
@@ -16,7 +16,6 @@
16 16
17enum mop500_uib { 17enum mop500_uib {
18 STUIB, 18 STUIB,
19 U8500UIB,
20}; 19};
21 20
22struct uib { 21struct uib {
@@ -31,11 +30,6 @@ static struct uib __initdata mop500_uibs[] = {
31 .option = "stuib", 30 .option = "stuib",
32 .init = mop500_stuib_init, 31 .init = mop500_stuib_init,
33 }, 32 },
34 [U8500UIB] = {
35 .name = "U8500-UIB",
36 .option = "u8500uib",
37 .init = mop500_u8500uib_init,
38 },
39}; 33};
40 34
41static struct uib *mop500_uib; 35static struct uib *mop500_uib;
@@ -93,14 +87,9 @@ static void __init __mop500_uib_init(struct uib *uib, const char *why)
93 uib->init(); 87 uib->init();
94} 88}
95 89
96/*
97 * Detect the UIB attached based on the presence or absence of i2c devices.
98 */
99int __init mop500_uib_init(void) 90int __init mop500_uib_init(void)
100{ 91{
101 struct uib *uib = mop500_uib; 92 struct uib *uib = mop500_uib;
102 struct i2c_adapter *i2c0;
103 int ret;
104 93
105 if (!cpu_is_u8500_family()) 94 if (!cpu_is_u8500_family())
106 return -ENODEV; 95 return -ENODEV;
@@ -110,24 +99,7 @@ int __init mop500_uib_init(void)
110 return 0; 99 return 0;
111 } 100 }
112 101
113 i2c0 = i2c_get_adapter(0); 102 __mop500_uib_init(&mop500_uibs[STUIB], "detected");
114 if (!i2c0) {
115 __mop500_uib_init(&mop500_uibs[STUIB],
116 "fallback, could not get i2c0");
117 return -ENODEV;
118 }
119
120 /* U8500-UIB has the TC35893 at 0x44 on I2C0, the ST-UIB doesn't. */
121 ret = i2c_smbus_xfer(i2c0, 0x44, 0, I2C_SMBUS_WRITE, 0,
122 I2C_SMBUS_QUICK, NULL);
123 i2c_put_adapter(i2c0);
124
125 if (ret == 0)
126 uib = &mop500_uibs[U8500UIB];
127 else
128 uib = &mop500_uibs[STUIB];
129
130 __mop500_uib_init(uib, "detected");
131 103
132 return 0; 104 return 0;
133} 105}
diff --git a/arch/arm/mach-ux500/board-mop500.h b/arch/arm/mach-ux500/board-mop500.h
index cf6b3047d34c..223639b50441 100644
--- a/arch/arm/mach-ux500/board-mop500.h
+++ b/arch/arm/mach-ux500/board-mop500.h
@@ -89,7 +89,6 @@ extern struct msp_i2s_platform_data msp2_platform_data;
89extern struct msp_i2s_platform_data msp3_platform_data; 89extern struct msp_i2s_platform_data msp3_platform_data;
90extern struct pl022_ssp_controller ssp0_plat; 90extern struct pl022_ssp_controller ssp0_plat;
91 91
92void __init mop500_u8500uib_init(void);
93void __init mop500_stuib_init(void); 92void __init mop500_stuib_init(void);
94void __init mop500_pinmaps_init(void); 93void __init mop500_pinmaps_init(void);
95void __init snowball_pinmaps_init(void); 94void __init snowball_pinmaps_init(void);