aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-ux500/cpu-db8500.c17
-rw-r--r--arch/arm/mach-ux500/setup.h1
-rw-r--r--drivers/mfd/ab8500-core.c4
-rw-r--r--drivers/mfd/ab8500-sysctrl.c34
-rw-r--r--drivers/mfd/db8500-prcmu.c10
-rw-r--r--include/linux/mfd/abx500/ab8500-sysctrl.h6
-rw-r--r--include/linux/mfd/dbx500-prcmu.h10
7 files changed, 5 insertions, 77 deletions
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c
index c015ef8dd535..bbd1b4b8d441 100644
--- a/arch/arm/mach-ux500/cpu-db8500.c
+++ b/arch/arm/mach-ux500/cpu-db8500.c
@@ -16,8 +16,6 @@
16#include <linux/irq.h> 16#include <linux/irq.h>
17#include <linux/platform_device.h> 17#include <linux/platform_device.h>
18#include <linux/io.h> 18#include <linux/io.h>
19#include <linux/mfd/abx500/ab8500.h>
20#include <linux/mfd/dbx500-prcmu.h>
21#include <linux/of.h> 19#include <linux/of.h>
22#include <linux/of_platform.h> 20#include <linux/of_platform.h>
23#include <linux/perf/arm_pmu.h> 21#include <linux/perf/arm_pmu.h>
@@ -32,15 +30,6 @@
32#include "db8500-regs.h" 30#include "db8500-regs.h"
33#include "id.h" 31#include "id.h"
34 32
35static struct ab8500_platform_data ab8500_platdata = {
36};
37
38static struct prcmu_pdata db8500_prcmu_pdata = {
39 .ab_platdata = &ab8500_platdata,
40 .version_offset = DB8500_PRCMU_FW_VERSION_OFFSET,
41 .legacy_offset = DB8500_PRCMU_LEGACY_OFFSET,
42};
43
44static void __init u8500_map_io(void) 33static void __init u8500_map_io(void)
45{ 34{
46 debug_ll_io_init(); 35 debug_ll_io_init();
@@ -109,8 +98,7 @@ static struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = {
109 OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80125000, 98 OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80125000,
110 "ux500-msp-i2s.3", &msp3_platform_data), 99 "ux500-msp-i2s.3", &msp3_platform_data),
111 /* Requires non-DT:able platform data. */ 100 /* Requires non-DT:able platform data. */
112 OF_DEV_AUXDATA("stericsson,db8500-prcmu", 0x80157000, "db8500-prcmu", 101 OF_DEV_AUXDATA("stericsson,db8500-prcmu", 0x80157000, "db8500-prcmu", NULL),
113 &db8500_prcmu_pdata),
114 OF_DEV_AUXDATA("stericsson,ux500-cryp", 0xa03cb000, "cryp1", NULL), 102 OF_DEV_AUXDATA("stericsson,ux500-cryp", 0xa03cb000, "cryp1", NULL),
115 OF_DEV_AUXDATA("stericsson,ux500-hash", 0xa03c2000, "hash1", NULL), 103 OF_DEV_AUXDATA("stericsson,ux500-hash", 0xa03c2000, "hash1", NULL),
116 OF_DEV_AUXDATA("stericsson,snd-soc-mop500", 0, "snd-soc-mop500.0", 104 OF_DEV_AUXDATA("stericsson,snd-soc-mop500", 0, "snd-soc-mop500.0",
@@ -119,8 +107,7 @@ static struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = {
119}; 107};
120 108
121static struct of_dev_auxdata u8540_auxdata_lookup[] __initdata = { 109static struct of_dev_auxdata u8540_auxdata_lookup[] __initdata = {
122 OF_DEV_AUXDATA("stericsson,db8500-prcmu", 0x80157000, "db8500-prcmu", 110 OF_DEV_AUXDATA("stericsson,db8500-prcmu", 0x80157000, "db8500-prcmu", NULL),
123 &db8500_prcmu_pdata),
124 {}, 111 {},
125}; 112};
126 113
diff --git a/arch/arm/mach-ux500/setup.h b/arch/arm/mach-ux500/setup.h
index c704254ab67c..e606847c8b58 100644
--- a/arch/arm/mach-ux500/setup.h
+++ b/arch/arm/mach-ux500/setup.h
@@ -13,7 +13,6 @@
13 13
14#include <asm/mach/arch.h> 14#include <asm/mach/arch.h>
15#include <linux/init.h> 15#include <linux/init.h>
16#include <linux/mfd/abx500/ab8500.h>
17 16
18void ux500_restart(enum reboot_mode mode, const char *cmd); 17void ux500_restart(enum reboot_mode mode, const char *cmd);
19 18
diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c
index f3d689176fc2..589eebfc13df 100644
--- a/drivers/mfd/ab8500-core.c
+++ b/drivers/mfd/ab8500-core.c
@@ -1087,7 +1087,6 @@ static int ab8500_probe(struct platform_device *pdev)
1087 "Vbus Detect (USB)", 1087 "Vbus Detect (USB)",
1088 "USB ID Detect", 1088 "USB ID Detect",
1089 "UART Factory Mode Detect"}; 1089 "UART Factory Mode Detect"};
1090 struct ab8500_platform_data *plat = dev_get_platdata(&pdev->dev);
1091 const struct platform_device_id *platid = platform_get_device_id(pdev); 1090 const struct platform_device_id *platid = platform_get_device_id(pdev);
1092 enum ab8500_version version = AB8500_VERSION_UNDEFINED; 1091 enum ab8500_version version = AB8500_VERSION_UNDEFINED;
1093 struct device_node *np = pdev->dev.of_node; 1092 struct device_node *np = pdev->dev.of_node;
@@ -1219,9 +1218,6 @@ static int ab8500_probe(struct platform_device *pdev)
1219 pr_cont("None\n"); 1218 pr_cont("None\n");
1220 } 1219 }
1221 1220
1222 if (plat && plat->init)
1223 plat->init(ab8500);
1224
1225 if (is_ab9540(ab8500)) { 1221 if (is_ab9540(ab8500)) {
1226 ret = get_register_interruptible(ab8500, AB8500_CHARGER, 1222 ret = get_register_interruptible(ab8500, AB8500_CHARGER,
1227 AB8500_CH_USBCH_STAT1_REG, &value); 1223 AB8500_CH_USBCH_STAT1_REG, &value);
diff --git a/drivers/mfd/ab8500-sysctrl.c b/drivers/mfd/ab8500-sysctrl.c
index b9f0010309f9..207cc497958a 100644
--- a/drivers/mfd/ab8500-sysctrl.c
+++ b/drivers/mfd/ab8500-sysctrl.c
@@ -127,45 +127,11 @@ EXPORT_SYMBOL(ab8500_sysctrl_write);
127 127
128static int ab8500_sysctrl_probe(struct platform_device *pdev) 128static int ab8500_sysctrl_probe(struct platform_device *pdev)
129{ 129{
130 struct ab8500 *ab8500 = dev_get_drvdata(pdev->dev.parent);
131 struct ab8500_platform_data *plat;
132 struct ab8500_sysctrl_platform_data *pdata;
133
134 plat = dev_get_platdata(pdev->dev.parent);
135
136 if (!plat)
137 return -EINVAL;
138
139 sysctrl_dev = &pdev->dev; 130 sysctrl_dev = &pdev->dev;
140 131
141 if (!pm_power_off) 132 if (!pm_power_off)
142 pm_power_off = ab8500_power_off; 133 pm_power_off = ab8500_power_off;
143 134
144 pdata = plat->sysctrl;
145 if (pdata) {
146 int last, ret, i, j;
147
148 if (is_ab8505(ab8500))
149 last = AB8500_SYSCLKREQ4RFCLKBUF;
150 else
151 last = AB8500_SYSCLKREQ8RFCLKBUF;
152
153 for (i = AB8500_SYSCLKREQ1RFCLKBUF; i <= last; i++) {
154 j = i - AB8500_SYSCLKREQ1RFCLKBUF;
155 ret = ab8500_sysctrl_write(i, 0xff,
156 pdata->initial_req_buf_config[j]);
157 dev_dbg(&pdev->dev,
158 "Setting SysClkReq%dRfClkBuf 0x%X\n",
159 j + 1,
160 pdata->initial_req_buf_config[j]);
161 if (ret < 0) {
162 dev_err(&pdev->dev,
163 "Can't set sysClkReq%dRfClkBuf: %d\n",
164 j + 1, ret);
165 }
166 }
167 }
168
169 return 0; 135 return 0;
170} 136}
171 137
diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c
index c0a86aeb1733..388e268b9bcf 100644
--- a/drivers/mfd/db8500-prcmu.c
+++ b/drivers/mfd/db8500-prcmu.c
@@ -3094,8 +3094,7 @@ static void db8500_prcmu_update_cpufreq(void)
3094 } 3094 }
3095} 3095}
3096 3096
3097static int db8500_prcmu_register_ab8500(struct device *parent, 3097static int db8500_prcmu_register_ab8500(struct device *parent)
3098 struct ab8500_platform_data *pdata)
3099{ 3098{
3100 struct device_node *np; 3099 struct device_node *np;
3101 struct resource ab8500_resource; 3100 struct resource ab8500_resource;
@@ -3103,8 +3102,6 @@ static int db8500_prcmu_register_ab8500(struct device *parent,
3103 .name = "ab8500-core", 3102 .name = "ab8500-core",
3104 .of_compatible = "stericsson,ab8500", 3103 .of_compatible = "stericsson,ab8500",
3105 .id = AB8500_VERSION_AB8500, 3104 .id = AB8500_VERSION_AB8500,
3106 .platform_data = pdata,
3107 .pdata_size = sizeof(struct ab8500_platform_data),
3108 .resources = &ab8500_resource, 3105 .resources = &ab8500_resource,
3109 .num_resources = 1, 3106 .num_resources = 1,
3110 }; 3107 };
@@ -3133,7 +3130,6 @@ static int db8500_prcmu_register_ab8500(struct device *parent,
3133static int db8500_prcmu_probe(struct platform_device *pdev) 3130static int db8500_prcmu_probe(struct platform_device *pdev)
3134{ 3131{
3135 struct device_node *np = pdev->dev.of_node; 3132 struct device_node *np = pdev->dev.of_node;
3136 struct prcmu_pdata *pdata = dev_get_platdata(&pdev->dev);
3137 int irq = 0, err = 0; 3133 int irq = 0, err = 0;
3138 struct resource *res; 3134 struct resource *res;
3139 3135
@@ -3149,7 +3145,7 @@ static int db8500_prcmu_probe(struct platform_device *pdev)
3149 return -ENOMEM; 3145 return -ENOMEM;
3150 } 3146 }
3151 init_prcm_registers(); 3147 init_prcm_registers();
3152 dbx500_fw_version_init(pdev, pdata->version_offset); 3148 dbx500_fw_version_init(pdev, DB8500_PRCMU_FW_VERSION_OFFSET);
3153 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "prcmu-tcdm"); 3149 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "prcmu-tcdm");
3154 if (!res) { 3150 if (!res) {
3155 dev_err(&pdev->dev, "no prcmu tcdm region provided\n"); 3151 dev_err(&pdev->dev, "no prcmu tcdm region provided\n");
@@ -3204,7 +3200,7 @@ static int db8500_prcmu_probe(struct platform_device *pdev)
3204 } 3200 }
3205 } 3201 }
3206 3202
3207 err = db8500_prcmu_register_ab8500(&pdev->dev, pdata->ab_platdata); 3203 err = db8500_prcmu_register_ab8500(&pdev->dev);
3208 if (err) { 3204 if (err) {
3209 mfd_remove_devices(&pdev->dev); 3205 mfd_remove_devices(&pdev->dev);
3210 pr_err("prcmu: Failed to add ab8500 subdevice\n"); 3206 pr_err("prcmu: Failed to add ab8500 subdevice\n");
diff --git a/include/linux/mfd/abx500/ab8500-sysctrl.h b/include/linux/mfd/abx500/ab8500-sysctrl.h
index 689312745b2f..01024d1aed0e 100644
--- a/include/linux/mfd/abx500/ab8500-sysctrl.h
+++ b/include/linux/mfd/abx500/ab8500-sysctrl.h
@@ -37,12 +37,6 @@ static inline int ab8500_sysctrl_clear(u16 reg, u8 bits)
37 return ab8500_sysctrl_write(reg, bits, 0); 37 return ab8500_sysctrl_write(reg, bits, 0);
38} 38}
39 39
40/* Configuration data for SysClkReq1RfClkBuf - SysClkReq8RfClkBuf */
41struct ab8500_sysctrl_platform_data {
42 u8 initial_req_buf_config[8];
43 u16 (*reboot_reason_code)(const char *cmd);
44};
45
46/* Registers */ 40/* Registers */
47#define AB8500_TURNONSTATUS 0x100 41#define AB8500_TURNONSTATUS 0x100
48#define AB8500_RESETSTATUS 0x101 42#define AB8500_RESETSTATUS 0x101
diff --git a/include/linux/mfd/dbx500-prcmu.h b/include/linux/mfd/dbx500-prcmu.h
index bf5109d38a26..5d374601404c 100644
--- a/include/linux/mfd/dbx500-prcmu.h
+++ b/include/linux/mfd/dbx500-prcmu.h
@@ -178,16 +178,6 @@ enum ddr_pwrst {
178 178
179#define DB8500_PRCMU_LEGACY_OFFSET 0xDD4 179#define DB8500_PRCMU_LEGACY_OFFSET 0xDD4
180 180
181struct prcmu_pdata
182{
183 bool enable_set_ddr_opp;
184 bool enable_ape_opp_100_voltage;
185 struct ab8500_platform_data *ab_platdata;
186 u32 version_offset;
187 u32 legacy_offset;
188 u32 adt_offset;
189};
190
191#define PRCMU_FW_PROJECT_U8500 2 181#define PRCMU_FW_PROJECT_U8500 2
192#define PRCMU_FW_PROJECT_U8400 3 182#define PRCMU_FW_PROJECT_U8400 3
193#define PRCMU_FW_PROJECT_U9500 4 /* Customer specific */ 183#define PRCMU_FW_PROJECT_U9500 4 /* Customer specific */