summaryrefslogtreecommitdiffstats
path: root/drivers/bus
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/bus-probe'Sascha Hauer2024-03-151-6/+0
|\
| * treewide: remove bus probe functions that just call driver probeAhmad Fatoum2024-02-291-6/+0
| | | | | | | | | | | | | | | | | | | | Now that the driver core will call the driver probe function if there is no bus probe function, remove all bus probe functions that do what the core can do instead. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20240228160518.1589193-3-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | efi: payload: suppress EFI payload initcalls when not EFI-loadedAhmad Fatoum2024-03-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | For development, it has proven very useful to be able to load the same barebox binary both as EFI loader and EFI payload and debug the interaction. For this to work, we need to mark all current EFI payload initcalls as such to avoid running them when barebox is not running as EFI payload. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20240304190038.3486881-63-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | efi: don't hide structs, enums or unions behind _tAhmad Fatoum2024-03-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Kernel coding style is to usually not hide the fact that a type is a struct or enum behind a typedef. Follow that in the EFI code. Besides being more descriptive, this also allows forward declarations, so <efi.h> doesn't have to be included everywhere. No functional change. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20240304190038.3486881-53-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | efi: payload: rename CONFIG_EFI_BOOTUP to CONFIG_EFI_PAYLOADAhmad Fatoum2024-03-051-1/+1
|/ | | | | | | | | | The symbol is internal, so we don't break anything by renaming it. CONFIG_EFI_PAYLOAD is clearer in intent, as BOOTUP doesn't clearly indificate whether barebox would act as EFI payload or as EFI loader. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20240304190038.3486881-9-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* drivers: drop simple bus remove in favor of common implementationAhmad Fatoum2024-02-161-7/+0
| | | | | | | | | | | | | | Now that driver core will call dev->driver->remove if dev->bus->remove is NULL, we cann remove all bus_type::remove functions that do the same. This has the welcome side effect that devices that device_remove will return false when called on a device the neither has a bus remove or driver remove function and thus we can skip tracing these calls when CONFIG_DEBUG_PROBES is enabled. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20240215103353.2799723-2-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* efi: acpi: fix printf format specifier mismatchAhmad Fatoum2023-11-101-1/+1
| | | | | | | | | entry_count has type size_t and not long as the format string wrongly suggested. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20231109115954.1423096-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: Print device nodes with %pOFSascha Hauer2023-07-033-12/+8
| | | | | | | We have the %pOF format specifier for printing device nodes. Use it where appropriate. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: add MODULE_DEVICE_TABLE markersAhmad Fatoum2023-06-134-0/+4
| | | | | | | | | | | | | | | | Syncing device trees with Linux upstream can lead to breakage, when the device trees are switched to newer bindings, which are not yet supported in barebox. To make it easier to spot such issues, we want to start applying some heuristics to flag possibly problematic DT changes. One step towards being able to do that is to know what nodes barebox actually consumes. Most of the nodes have a compatible entry, which is matched by an array of of_device_id, so let's have MODULE_DEVICE_TABLE point at it for future extraction. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20230612125908.1087340-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: omap: Move mach header files to include/mach/omapSascha Hauer2023-03-061-2/+2
| | | | | | | | | | Currently arch specific headers can be included with longer possible as there won't be a single mach anymore. Move all omap specific header files to include/mach/omap/ to prepare for multi-arch support. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: mvebu: Move mach header files to include/mach/mvebuSascha Hauer2023-03-061-1/+1
| | | | | | | | | | Currently arch specific headers can be included with possible as there won't be a single mach anymore. Move all mvebu specific header files to include/mach/mvebu/ to prepare for multi-arch support. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Rename struct driver_d to driverSascha Hauer2023-01-104-4/+4
| | | | | | | | | | | The '_d' suffix was originally meant to distinguish barebox struct names from Linux struct names. struct driver doesn't exist in Linux, so we can rename it and remove the meaningless suffix. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20221214123512.189688-4-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Rename struct device_d to deviceSascha Hauer2023-01-104-16/+16
| | | | | | | | | | | | | The '_d' suffix was originally introduced in case we want to import Linux struct device as a separate struct into barebox. Over time it became clear that this won't happen, instead barebox struct device_d is basically the same as Linux struct device. Rename the struct name accordingly to make porting Linux code easier. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20221214123512.189688-3-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Rename device_d::device_node to device_d::of_nodeSascha Hauer2023-01-103-7/+7
| | | | | | | | | | | | | | | | | | | | Linux struct device has the member of_node for the device_node pointer. Rename this in barebox accordingly to minimize the necessary changes when porting Linux code. This was done with the semantic patch: @@ struct device_d E; @@ - E.device_node + E.of_node @@ struct device_d *E; @@ - E->device_node + E->of_node Plus some manual adjustments. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20221214123512.189688-2-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* efi: acpi: add SDT resource before registering deviceAhmad Fatoum2023-01-091-8/+2
| | | | | | | | | | Registering a device may end up probing the device if a driver is readily available. This necessitates the device having its resources assigned before doing the registration. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Link: https://lore.barebox.org/20230109083600.1820078-2-ahmad@a3f.at Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* efi: implement and use for_each_efi_config_tableAhmad Fatoum2022-10-131-4/+2
| | | | | | | | | | Iterating over the system table is something we do at two places, already and the third will soon follow. Use the occasion to factor the loop head into a macro. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20221010060842.2083550-4-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2021-12-157-7/+7
|\
| * drivers: migrate "GPL-2.0" license identifiers to SPDX 2.0Roland Hieber2021-11-227-7/+7
| | | | | | | | | | | | | | | | | | | | "GPL-2.0-only" was introduced in SPDX 2.0, and the old identifier "GPL-2.0" is now considered deprecated; see <https://spdx.org/licenses>. Fixes: 28f4a6a4df76f0f1581d (2021-10-30, "drivers: add missing SPDX-License-Identifier") Signed-off-by: Roland Hieber <rhi@pengutronix.de> Link: https://lore.barebox.org/20211117113851.2022669-2-rhi@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | bus: acpi: register bus even if without ACPI EFI tableAhmad Fatoum2021-12-131-3/+4
| | | | | | | | | | | | | | | | | | | | The ACPI bus must be registered if there are ACPI drivers compiled in. Thus the ACPI bus registration must be decoupled from the existence of the ACPI table. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20211122084732.2597109-30-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | efi: rename <efi/efi.h> to <efi/efi-payload.h>Ahmad Fatoum2021-11-251-1/+2
|/ | | | | | | | | | | The split between <efi.h> and <efi/efi.h> is confusing: The former contains universal definitions, while the latter contains barebox utilities on top. To make the distinction clear, rename <efi/efi.h> to <efi/efi-payload.h> as it's used for EFI payloads. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20211122084732.2597109-14-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* drivers: add missing SPDX-License-IdentifierAhmad Fatoum2021-11-015-8/+5
| | | | | | | | | | | | | | | | | | | | This adds the suitable SPDX-License-Identifier to all files in drivers/ that previously lacked one. To aid manual inspection, following heuristics can be used: * No changes outside of comments/whitespace: git show -U0 HEAD | rg -v '^(@@|diff|index)|[-+]([-+]|//|#|[\s/]\*)' * -or-later come in pairs: git show --inter-hunk-context=19 HEAD | \ perl -0777 -F'/^@/gm' -ne 'for (@F) { @m = /later/g; print if @m & 1 }' Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20211030175632.2276077-4-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: nand: Update to Linux-5.9Sascha Hauer2020-11-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This updates the barebox NAND layer and parts of the mtd layer to Linux-5.9. This patch is huge, but the barebox NAND layer is so far away from the Linux NAND layer that a step by step update would have taken ages. Unlike Linux barebox has functions to mark a block as good. This feature has been preserved. Also barebox used to make NAND write support optional, this feature is lost during the update for the sake of better compatibility to the Linux NAND layer. This patch has been tested: - GPMI aka nand_mxs on i.MX6 - nand_imx on i.MX25 - nand_omap_gpmc on AM335x - atmel_nand on Atmel sama5d3 - nand_denali on SoCFPGA Currently untested: - nand_orion - nand_mrvl_nfc - nand_s3c24xx The nand_denali driver is tested with the update of that driver to Linux-5.9 following in the next patch. I could only test the drivers with the NAND chips found on my boards, so there's still enough room for regressions, especially given that the NAND drivers themselves are mostly not updated. With the NAND layer being up-to-date with Linux it should hopefully be easy to update drivers to their Linux counterpart as well if necessary. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* drivers: mark first batch of compilable drivers for COMPILE_TESTAhmad Fatoum2020-05-081-2/+2
| | | | | | | | | All of these drivers have a runtime dependency on SoC peripherals, but can nevertheless be compile-tested. Add COMPILE_TEST as an alternate dependency. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bus: efi: add basic ACPI bus infrastructureAhmad Fatoum2019-12-093-0/+264
| | | | | | | | | | | | | | | | | | | | It makes sense to support some ACPI tables like the WDAT (Watchdog Action Table) in barebox. To facilitate this add a ACPI bus and the necessary bits to integrate ACPI tables into the barebox device/driver model as devices. These devices are identified by the four byte signature, which drivers can then match against and the system description table (SDT) of the device is then available as a device memory resource. Even without drivers, with this patch, devinfo and md can now be used to view the ACPI system description tables, which can be useful during UEFI payload development. Support for the ACPI Machine Language and ACPI 5.1 _DSD (Device Specific Data) is not implemented. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: nand: gpmc: Add BCH16 supportSascha Hauer2019-08-281-0/+3
| | | | | | | | | | | | | | | | This adds support for BCH16 ECC encoding. The support is mostly taken from Linux-5.3-rc6. One major change is the different wrap mode used. The Kernel uses wrapmode 1, which means "pass all data through the BCH engine". Still the Kernel has to skip the OOB marker which is done by reading all user data, then use NAND_CMD_RNDOUT to position right behind the OOB marker and then read the ECC data. Instead of doing this we use wrap mode 4 which allows us to bypass the OOB marker from the BCH engine automatically. This explains bch_wrapmode = 1, eccsize0 = 0, eccsize1 = 52 vs. bch_wrapmode = 4, eccsize0 = 4, eccsize1 = 52 Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bus: mvebu-mbus: Add missing whitespaceSascha Hauer2019-03-181-1/+1
| | | | | | orion5x_2win_mbus_data__maybe_unused should be two words. Fix it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* drivers: bus: Add ti-sysc bus driverTeresa Remmet2019-02-133-0/+46
| | | | | | | | | Adds minimal support for the sysc interconnect target module found on many TI SoCs. With this device tree includes have been rearagned. We need the driver to probe the child devices of the bus. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bus: omap-gpmc: make locally used function staticSascha Hauer2018-11-191-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mvebu: kirkwood: simplify soc init code flowUwe Kleine-König2017-03-021-0/+4
| | | | | | | | | | | | | | | Similar to the two previous commits, this gets rid of a of-fixup which is strange because the soc init stuff is rerun then when a new dt for booting into Linux is loaded. The initcall must be postponed to post-core to ensure of_machine_is_compatible is working correctly. The call to mvebu_mbus_add_range is moved to drivers/bus/mvebu-mbus.c to ensure it's registered early enough. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mvebu: dove: simplify soc init code flowUwe Kleine-König2017-03-021-0/+9
| | | | | | | | | | | | | | | Similar to the previous commit, this gets rid of a of-fixup which is strange because the soc init stuff is rerun then when a new dt for booting into Linux is loaded. The initcall must be postponed to post-core to ensure of_machine_is_compatible is working correctly. The call to mvebu_mbus_add_range is moved to drivers/bus/mvebu-mbus.c to ensure it's registered early enough. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mvebu: armada-370-xp: simplify soc init code flowUwe Kleine-König2017-03-021-1/+8
| | | | | | | | | | | | | | This gets rid of a of-fixup which is strange because the soc init stuff is rerun then when a new dt for booting into Linux is loaded. The initcall must be postponed to post-core to ensure of_machine_is_compatible is working correctly. The call to mvebu_mbus_add_range is moved to drivers/bus/mvebu-mbus.c to ensure it's registered early enough. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bus: mvebu-mbus: fixup correct device treeUwe Kleine-König2017-01-171-1/+1
| | | | | | | | When booting with an external device tree this external tree must be adapted, not the internal tree again. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: nand: omap_gpmc: Remove BCH4 supportTeresa Remmet2016-04-121-3/+0
| | | | | | | This has no users and seems to be untested. Removed it. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* driver: replace dev_request_mem_region with dev_request_mem_resourceSascha Hauer2016-03-071-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dev_request_mem_region doesn't work properly one some SoCs on which PTR_ERR() values clash with valid return values from dev_request_mem_region. Replace them with dev_request_mem_resource where possible. This patch has been generated with the following semantic patch: // <smpl> @@ expression d; expression n; expression io; identifier func; @@ func(...) { +struct resource *iores; <+... -io = dev_request_mem_region(d, n); -if (IS_ERR(io)) { +iores = dev_request_mem_resource(d, n); +if (IS_ERR(iores)) { ... - return PTR_ERR(io); -} + return PTR_ERR(iores); +} +io = IOMEM(iores->start); ...+> } @@ expression d; expression n; expression io; identifier func; @@ func(...) { +struct resource *iores; <+... -io = dev_request_mem_region(d, n); -if (IS_ERR(io)) { +iores = dev_request_mem_resource(d, n); +if (IS_ERR(iores)) - return PTR_ERR(io); -} + return PTR_ERR(iores); +io = IOMEM(iores->start); ...+> } @@ expression d; expression n; expression io; identifier func; @@ func(...) { +struct resource *iores; <+... -io = dev_request_mem_region(d, n); -if (IS_ERR(io)) { - ret = PTR_ERR(io); +iores = dev_request_mem_resource(d, n); +if (IS_ERR(iores)) { + ret = PTR_ERR(iores); ... } +io = IOMEM(iores->start); ...+> } @@ expression d; expression n; expression io; identifier func; @@ func(...) { +struct resource *iores; <+... -io = dev_request_mem_region(d, n); +iores = dev_request_mem_resource(d, n); +if (IS_ERR(iores)) + return PTR_ERR(iores); +io = IOMEM(iores->start); ...+> } @@ identifier func; @@ func(...) { <+... struct resource *iores; -struct resource *iores; ...+> } // </smpl> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bus: omap-gpmc: Add Generic device supportSascha Hauer2015-07-021-0/+142
| | | | | | | This adds support for generic devices like NOR flash and ethernet to the gpmc bus driver. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bus: omap-gpmc: fix wrong bit settingSascha Hauer2015-07-021-1/+1
| | | | | | | GPMC_CONFIG4_WEEXTRADELAY should be set depending on we_extra_delay, not on oe_extra_delay. This seems to be copy-pasted from two lines above. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/of-device-id'Sascha Hauer2015-05-062-15/+15
|\
| * of: use 'const void *' for struct of_device_id.dataAntony Pavlov2015-04-302-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 2011 barebox' of_device_id struct uses unsigned long type for data field: struct of_device_id { char *compatible; unsigned long data; }; Almost always struct of_device_id.data field are used as pointer and need 'unsigned long' casting. E.g. see 'git grep -A 4 of_device_id drivers/' output: drivers/ata/sata-imx.c:static __maybe_unused struct of_device_id imx_sata_dt_ids[] = { drivers/ata/sata-imx.c- { drivers/ata/sata-imx.c- .compatible = "fsl,imx6q-ahci", drivers/ata/sata-imx.c- .data = (unsigned long)&data_imx6, drivers/ata/sata-imx.c- }, { Here is of_device_id struct in linux kernel v4.0: struct of_device_id { char name[32]; char type[32]; char compatible[128]; const void *data; }; Changing of_device_id.data type to 'const void *data' will increase barebox' linux kernel compatibility and decrease number of 'unsigned long' casts. Part of the patch was done using the 'coccinelle' tool with the following semantic patch: @rule1@ identifier dev; identifier type; identifier func; @@ func(...) { <... - dev_get_drvdata(dev, (unsigned long *)&type) + dev_get_drvdata(dev, (const void **)&type) ...> } @rule2@ identifier dev; identifier type; identifier func; identifier data; @@ func(...) { <... - dev_get_drvdata(dev, (unsigned long *)&type->data) + dev_get_drvdata(dev, (const void **)&type->data) ...> } Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | bus: mvebu-mbus: Convert mbus platform driver to direct driverSebastian Hesselbarth2015-04-271-13/+1
| | | | | | | | | | | | | | | | | | | | Registering mbus driver as platform driver is a little late for some register accesses to work. We have to make sure boot-up mbus windows are disabled early, so call mbus driver directly from SoC init. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | bus: mvebu-mbus: Drop device referenceSebastian Hesselbarth2015-04-271-14/+14
| | | | | | | | | | | | | | | | | | Prior converting mbus driver from a platform device back to directly called SoC driver, drop the device_d reference and covert dev_foo to pr_foo. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | bus: mvebu-mbus: Remove coherency attributeSebastian Hesselbarth2015-04-271-6/+0
|/ | | | | | | | Marvell Armada 370 and XP have some coherency fabric. We are not interested in using it, so remove checking for it in mbus driver. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sizes.h: move include/sizes.h to include/linux/sizes.hMasahiro Yamada2015-01-081-1/+1
| | | | | | | | | | | | | | This file originates in Linux. Linux has it under include/linux/ directory since commit dccd2304cc90. Let's move it to the same place as well in barebox. This commit was generated by the following commands: find -name '*.[chS]' | xargs sed -i -e 's:<sizes.h>:<linux/sizes.h>:' git mv include/sizes.h include/linux/ Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/resource-err-ptr'Sascha Hauer2014-10-022-4/+6
|\
| * resource: Let dev_request_mem_region return an error pointerSascha Hauer2014-09-161-2/+3
| | | | | | | | | | | | For all users fix or add the error check. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * resource: Let dev_get_mem_region return an error pointerSascha Hauer2014-09-161-2/+3
| | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
* | ARM: mvebu: Add machine compatible to mbus rangesSebastian Hesselbarth2014-09-191-1/+5
|/ | | | | | | | | | Multi-SoC support for MVEBU will add mbus ranges for all compiled SoCs. To protect the mbus node of the SoC barebox is executed on from others ranges, pass machine's compatible to mvebu_mbus_add_range and check before applying the fixup. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/marvell'Sascha Hauer2014-08-071-5/+92
|\
| * bus: mvebu: fix ranges fixupEzequiel Garcia2014-08-041-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current fixup code is slightly wrong, and only works when the root address cell number is one. However, Armada XP has a root address cell number of two. In this case we are currently applying the fixup on the child high base address, while it should be applied on the child low base address. Fix it and add some detailed explanation to avoid having to figure this out each time. Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * bus: mvebu: fix resource size handlingSebastian Hesselbarth2014-07-311-4/+4
| | | | | | | | | | | | | | | | | | | | A resource_size is defined as res->end - res->start + 1. Marvell MBUS driver gets some ranges from DT as start and size but mis-calculates end of range. This fixes 4 occurences of those mistakes. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Acked-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: mvebu: allow to fixup mbus rangesSebastian Hesselbarth2014-07-251-1/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Marvell MVEBU SoCs internal registers are usually remapped from reset default. While Dove and Kirkwood always had their registers remapped, some Armada 370 and XP where shipped with bootloaders that did not remap them. On Barebox these registers are remapped early and on all MVEBU SoCs, so provided DTs should always reflect that in their mbus ranges property. This patch registers a fixup for DTBs and allows individual SoCs to add specific remap ranges to the fixup list. The fixup is registered on pure_initcall to even allow to fixup pbl or appended DTBs. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>