diff options
author | Luka Perkov <luka@openwrt.org> | 2014-02-11 02:07:38 +0000 |
---|---|---|
committer | Luka Perkov <luka@openwrt.org> | 2014-02-11 02:07:38 +0000 |
commit | 69d323f23119ce6986c2803f34d95869144a00e6 (patch) | |
tree | 15747b34c6f9a8dfb622f3d61cbffe043f67e573 /target/linux/mvebu/patches-3.10/0038-bus-mvebu-mbus-Add-new-API-for-window-creation.patch | |
parent | 31fb795fd01ac711ff6ca881271fdd4268e34570 (diff) | |
download | upstream-69d323f23119ce6986c2803f34d95869144a00e6.tar.gz upstream-69d323f23119ce6986c2803f34d95869144a00e6.tar.bz2 upstream-69d323f23119ce6986c2803f34d95869144a00e6.zip |
mvebu: backport mainline patches from kernel 3.11
This is a backport of the patches accepted to the Linux mainline related to
mvebu SoC (Armada XP and Armada 370) between Linux v3.10, and Linux v3.11.
This work mainly covers:
* Enabling USB storage, and PCI to mvebu_defconfig.
* Add support for NOR flash.
* Some PCI device tree related updates, and bus parsing.
* Adding Armada XP & 370 PCI driver, and update some clock gating
specifics.
* Introduce Marvell EBU Device Bus driver.
* Enaling USB in the armada*.dts.
* Enabling, and updating the mvebu-mbus.
* Some SATA and Ethernet related fixes.
Signed-off-by: Seif Mazareeb <seif.mazareeb@gmail.com>
CC: Luka Perkov <luka@openwrt.org>
SVN-Revision: 39564
Diffstat (limited to 'target/linux/mvebu/patches-3.10/0038-bus-mvebu-mbus-Add-new-API-for-window-creation.patch')
-rw-r--r-- | target/linux/mvebu/patches-3.10/0038-bus-mvebu-mbus-Add-new-API-for-window-creation.patch | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/target/linux/mvebu/patches-3.10/0038-bus-mvebu-mbus-Add-new-API-for-window-creation.patch b/target/linux/mvebu/patches-3.10/0038-bus-mvebu-mbus-Add-new-API-for-window-creation.patch new file mode 100644 index 0000000000..4ebb3f3216 --- /dev/null +++ b/target/linux/mvebu/patches-3.10/0038-bus-mvebu-mbus-Add-new-API-for-window-creation.patch @@ -0,0 +1,90 @@ +From 93b6bd1bf81cffd3e5739478c4434bf25458ec7d Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> +Date: Fri, 5 Jul 2013 14:54:16 +0200 +Subject: [PATCH 038/203] bus: mvebu-mbus: Add new API for window creation + +We add an API to create MBus address decoding windows from the target +ID and attribute. This function will be used later and deprecate the +current name based scheme. + +Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> +Tested-by: Andrew Lunn <andrew@lunn.ch> +Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> +--- + drivers/bus/mvebu-mbus.c | 33 +++++++++++++++++++++++++-------- + include/linux/mbus.h | 6 ++++++ + 2 files changed, 31 insertions(+), 8 deletions(-) + +--- a/drivers/bus/mvebu-mbus.c ++++ b/drivers/bus/mvebu-mbus.c +@@ -748,6 +748,22 @@ static const struct of_device_id of_mveb + /* + * Public API of the driver + */ ++int mvebu_mbus_add_window_remap_by_id(unsigned int target, ++ unsigned int attribute, ++ phys_addr_t base, size_t size, ++ phys_addr_t remap) ++{ ++ struct mvebu_mbus_state *s = &mbus_state; ++ ++ if (!mvebu_mbus_window_conflicts(s, base, size, target, attribute)) { ++ pr_err("cannot add window '%x:%x', conflicts with another window\n", ++ target, attribute); ++ return -EINVAL; ++ } ++ ++ return mvebu_mbus_alloc_window(s, base, size, remap, target, attribute); ++} ++ + int mvebu_mbus_add_window_remap_flags(const char *devname, phys_addr_t base, + size_t size, phys_addr_t remap, + unsigned int flags) +@@ -776,14 +792,8 @@ int mvebu_mbus_add_window_remap_flags(co + else if (flags == MVEBU_MBUS_PCI_WA) + attr |= 0x28; + +- if (!mvebu_mbus_window_conflicts(s, base, size, target, attr)) { +- pr_err("cannot add window '%s', conflicts with another window\n", +- devname); +- return -EINVAL; +- } +- +- return mvebu_mbus_alloc_window(s, base, size, remap, target, attr); +- ++ return mvebu_mbus_add_window_remap_by_id(target, attr, base, ++ size, remap); + } + + int mvebu_mbus_add_window(const char *devname, phys_addr_t base, size_t size) +@@ -792,6 +802,13 @@ int mvebu_mbus_add_window(const char *de + MVEBU_MBUS_NO_REMAP, 0); + } + ++int mvebu_mbus_add_window_by_id(unsigned int target, unsigned int attribute, ++ phys_addr_t base, size_t size) ++{ ++ return mvebu_mbus_add_window_remap_by_id(target, attribute, base, ++ size, MVEBU_MBUS_NO_REMAP); ++} ++ + int mvebu_mbus_del_window(phys_addr_t base, size_t size) + { + int win; +--- a/include/linux/mbus.h ++++ b/include/linux/mbus.h +@@ -62,8 +62,14 @@ static inline const struct mbus_dram_tar + int mvebu_mbus_add_window_remap_flags(const char *devname, phys_addr_t base, + size_t size, phys_addr_t remap, + unsigned int flags); ++int mvebu_mbus_add_window_remap_by_id(unsigned int target, ++ unsigned int attribute, ++ phys_addr_t base, size_t size, ++ phys_addr_t remap); + int mvebu_mbus_add_window(const char *devname, phys_addr_t base, + size_t size); ++int mvebu_mbus_add_window_by_id(unsigned int target, unsigned int attribute, ++ phys_addr_t base, size_t size); + int mvebu_mbus_del_window(phys_addr_t base, size_t size); + int mvebu_mbus_init(const char *soc, phys_addr_t mbus_phys_base, + size_t mbus_size, phys_addr_t sdram_phys_base, |