diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-06 16:30:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-06 16:30:06 -0400 |
commit | b4b50fd78b1e31989940dfc647e64453d0f7176a (patch) | |
tree | 1a55f110e021c02963b63759f3f18ea7ba3aa228 /drivers/memory | |
parent | dccfd1e439c11422d7aca0d834b0430d24650e85 (diff) | |
parent | f97c43bbdf8a1ea42477b1a804a48e7e368cb13c (diff) |
Merge tag 'soc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC platform changes from Olof Johansson:
"This branch contains mostly additions and changes to platform
enablement and SoC-level drivers. Since there's sometimes a
dependency on device-tree changes, there's also a fair amount of
those in this branch.
Pieces worth mentioning are:
- Mbus driver for Marvell platforms, allowing kernel configuration
and resource allocation of on-chip peripherals.
- Enablement of the mbus infrastructure from Marvell PCI-e drivers.
- Preparation of MSI support for Marvell platforms.
- Addition of new PCI-e host controller driver for Tegra platforms
- Some churn caused by sharing of macro names between i.MX 6Q and 6DL
platforms in the device tree sources and header files.
- Various suspend/PM updates for Tegra, including LP1 support.
- Versatile Express support for MCPM, part of big little support.
- Allwinner platform support for A20 and A31 SoCs (dual and quad
Cortex-A7)
- OMAP2+ support for DRA7, a new Cortex-A15-based SoC.
The code that touches other architectures are patches moving MSI
arch-specific functions over to weak symbols and removal of
ARCH_SUPPORTS_MSI, acked by PCI maintainers"
* tag 'soc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (266 commits)
tegra-cpuidle: provide stub when !CONFIG_CPU_IDLE
PCI: tegra: replace devm_request_and_ioremap by devm_ioremap_resource
ARM: tegra: Drop ARCH_SUPPORTS_MSI and sort list
ARM: dts: vf610-twr: enable i2c0 device
ARM: dts: i.MX51: Add one more I2C2 pinmux entry
ARM: dts: i.MX51: Move pins configuration under "iomuxc" label
ARM: dtsi: imx6qdl-sabresd: Add USB OTG vbus pin to pinctrl_hog
ARM: dtsi: imx6qdl-sabresd: Add USB host 1 VBUS regulator
ARM: dts: imx27-phytec-phycore-som: Enable AUDMUX
ARM: dts: i.MX27: Disable AUDMUX in the template
ARM: dts: wandboard: Add support for SDIO bcm4329
ARM: i.MX5 clocks: Remove optional clock setup (CKIH1) from i.MX51 template
ARM: dts: imx53-qsb: Make USBH1 functional
ARM i.MX6Q: dts: Enable I2C1 with EEPROM and PMIC on Phytec phyFLEX-i.MX6 Ouad module
ARM i.MX6Q: dts: Enable SPI NOR flash on Phytec phyFLEX-i.MX6 Ouad module
ARM: dts: imx6qdl-sabresd: Add touchscreen support
ARM: imx: add ocram clock for imx53
ARM: dts: imx: ocram size is different between imx6q and imx6dl
ARM: dts: imx27-phytec-phycore-som: Fix regulator settings
ARM: dts: i.MX27: Remove clock name from CPU node
...
Diffstat (limited to 'drivers/memory')
-rw-r--r-- | drivers/memory/mvebu-devbus.c | 72 |
1 files changed, 2 insertions, 70 deletions
diff --git a/drivers/memory/mvebu-devbus.c b/drivers/memory/mvebu-devbus.c index 978e8e3abc5c..110c03627051 100644 --- a/drivers/memory/mvebu-devbus.c +++ b/drivers/memory/mvebu-devbus.c | |||
@@ -44,14 +44,6 @@ | |||
44 | #define READ_PARAM_OFFSET 0x0 | 44 | #define READ_PARAM_OFFSET 0x0 |
45 | #define WRITE_PARAM_OFFSET 0x4 | 45 | #define WRITE_PARAM_OFFSET 0x4 |
46 | 46 | ||
47 | static const char * const devbus_wins[] = { | ||
48 | "devbus-boot", | ||
49 | "devbus-cs0", | ||
50 | "devbus-cs1", | ||
51 | "devbus-cs2", | ||
52 | "devbus-cs3", | ||
53 | }; | ||
54 | |||
55 | struct devbus_read_params { | 47 | struct devbus_read_params { |
56 | u32 bus_width; | 48 | u32 bus_width; |
57 | u32 badr_skew; | 49 | u32 badr_skew; |
@@ -208,16 +200,11 @@ static int mvebu_devbus_probe(struct platform_device *pdev) | |||
208 | { | 200 | { |
209 | struct device *dev = &pdev->dev; | 201 | struct device *dev = &pdev->dev; |
210 | struct device_node *node = pdev->dev.of_node; | 202 | struct device_node *node = pdev->dev.of_node; |
211 | struct device_node *parent; | ||
212 | struct devbus *devbus; | 203 | struct devbus *devbus; |
213 | struct resource *res; | 204 | struct resource *res; |
214 | struct clk *clk; | 205 | struct clk *clk; |
215 | unsigned long rate; | 206 | unsigned long rate; |
216 | const __be32 *ranges; | 207 | int err; |
217 | int err, cs; | ||
218 | int addr_cells, p_addr_cells, size_cells; | ||
219 | int ranges_len, tuple_len; | ||
220 | u32 base, size; | ||
221 | 208 | ||
222 | devbus = devm_kzalloc(&pdev->dev, sizeof(struct devbus), GFP_KERNEL); | 209 | devbus = devm_kzalloc(&pdev->dev, sizeof(struct devbus), GFP_KERNEL); |
223 | if (!devbus) | 210 | if (!devbus) |
@@ -248,68 +235,13 @@ static int mvebu_devbus_probe(struct platform_device *pdev) | |||
248 | return err; | 235 | return err; |
249 | 236 | ||
250 | /* | 237 | /* |
251 | * Allocate an address window for this device. | ||
252 | * If the device probing fails, then we won't be able to | ||
253 | * remove the allocated address decoding window. | ||
254 | * | ||
255 | * FIXME: This is only a temporary hack! We need to do this here | ||
256 | * because we still don't have device tree bindings for mbus. | ||
257 | * Once that support is added, we will declare these address windows | ||
258 | * statically in the device tree, and remove the window configuration | ||
259 | * from here. | ||
260 | */ | ||
261 | |||
262 | /* | ||
263 | * Get the CS to choose the window string. | ||
264 | * This is a bit hacky, but it will be removed once the | ||
265 | * address windows are declared in the device tree. | ||
266 | */ | ||
267 | cs = (((unsigned long)devbus->base) % 0x400) / 8; | ||
268 | |||
269 | /* | ||
270 | * Parse 'ranges' property to obtain a (base,size) window tuple. | ||
271 | * This will be removed once the address windows | ||
272 | * are declared in the device tree. | ||
273 | */ | ||
274 | parent = of_get_parent(node); | ||
275 | if (!parent) | ||
276 | return -EINVAL; | ||
277 | |||
278 | p_addr_cells = of_n_addr_cells(parent); | ||
279 | of_node_put(parent); | ||
280 | |||
281 | addr_cells = of_n_addr_cells(node); | ||
282 | size_cells = of_n_size_cells(node); | ||
283 | tuple_len = (p_addr_cells + addr_cells + size_cells) * sizeof(__be32); | ||
284 | |||
285 | ranges = of_get_property(node, "ranges", &ranges_len); | ||
286 | if (ranges == NULL || ranges_len != tuple_len) | ||
287 | return -EINVAL; | ||
288 | |||
289 | base = of_translate_address(node, ranges + addr_cells); | ||
290 | if (base == OF_BAD_ADDR) | ||
291 | return -EINVAL; | ||
292 | size = of_read_number(ranges + addr_cells + p_addr_cells, size_cells); | ||
293 | |||
294 | /* | ||
295 | * Create an mbus address windows. | ||
296 | * FIXME: Remove this, together with the above code, once the | ||
297 | * address windows are declared in the device tree. | ||
298 | */ | ||
299 | err = mvebu_mbus_add_window(devbus_wins[cs], base, size); | ||
300 | if (err < 0) | ||
301 | return err; | ||
302 | |||
303 | /* | ||
304 | * We need to create a child device explicitly from here to | 238 | * We need to create a child device explicitly from here to |
305 | * guarantee that the child will be probed after the timing | 239 | * guarantee that the child will be probed after the timing |
306 | * parameters for the bus are written. | 240 | * parameters for the bus are written. |
307 | */ | 241 | */ |
308 | err = of_platform_populate(node, NULL, NULL, dev); | 242 | err = of_platform_populate(node, NULL, NULL, dev); |
309 | if (err < 0) { | 243 | if (err < 0) |
310 | mvebu_mbus_del_window(base, size); | ||
311 | return err; | 244 | return err; |
312 | } | ||
313 | 245 | ||
314 | return 0; | 246 | return 0; |
315 | } | 247 | } |