aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2016-09-15 01:37:30 -0400
committerVinod Koul <vinod.koul@intel.com>2016-09-15 11:43:50 -0400
commit434cec62a6d73b8c8080cd992bc97a564fdd5a5a (patch)
tree1570207b6bd8ecd2a33694e83f2a2a73e083fa09
parent29b4817d4018df78086157ea3a55c1d9424a7cfc (diff)
bus: mvebu-mbus: Provide stub function for mvebu_mbus_get_io_win_info()
This patch provides a stub function for mvebu_mbus_get_io_win_info(), which will be used for all non-Orion (ARM32 MVEBU) platforms for compile test coverage. On such platforms this function will return an error so that drivers might detect a potential problem. Signed-off-by: Stefan Roese <sr@denx.de> Acked-by: Gregory CLEMENT <gregory.clement@free-electrons.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Marcin Wojtas <mw@semihalf.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Andrew Lunn <andrew@lunn.ch> Cc: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r--include/linux/mbus.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/include/linux/mbus.h b/include/linux/mbus.h
index d610232762e3..2931aa43dab1 100644
--- a/include/linux/mbus.h
+++ b/include/linux/mbus.h
@@ -11,6 +11,8 @@
11#ifndef __LINUX_MBUS_H 11#ifndef __LINUX_MBUS_H
12#define __LINUX_MBUS_H 12#define __LINUX_MBUS_H
13 13
14#include <linux/errno.h>
15
14struct resource; 16struct resource;
15 17
16struct mbus_dram_target_info 18struct mbus_dram_target_info
@@ -55,6 +57,8 @@ struct mbus_dram_target_info
55#ifdef CONFIG_PLAT_ORION 57#ifdef CONFIG_PLAT_ORION
56extern const struct mbus_dram_target_info *mv_mbus_dram_info(void); 58extern const struct mbus_dram_target_info *mv_mbus_dram_info(void);
57extern const struct mbus_dram_target_info *mv_mbus_dram_info_nooverlap(void); 59extern const struct mbus_dram_target_info *mv_mbus_dram_info_nooverlap(void);
60int mvebu_mbus_get_io_win_info(phys_addr_t phyaddr, u32 *size, u8 *target,
61 u8 *attr);
58#else 62#else
59static inline const struct mbus_dram_target_info *mv_mbus_dram_info(void) 63static inline const struct mbus_dram_target_info *mv_mbus_dram_info(void)
60{ 64{
@@ -64,14 +68,24 @@ static inline const struct mbus_dram_target_info *mv_mbus_dram_info_nooverlap(vo
64{ 68{
65 return NULL; 69 return NULL;
66} 70}
71static inline int mvebu_mbus_get_io_win_info(phys_addr_t phyaddr, u32 *size,
72 u8 *target, u8 *attr)
73{
74 /*
75 * On all ARM32 MVEBU platforms with MBus support, this stub
76 * function will not get called. The real function from the
77 * MBus driver is called instead. ARM64 MVEBU platforms like
78 * the Armada 3700 could use the mv_xor device driver which calls
79 * into this function
80 */
81 return -EINVAL;
82}
67#endif 83#endif
68 84
69int mvebu_mbus_save_cpu_target(u32 __iomem *store_addr); 85int mvebu_mbus_save_cpu_target(u32 __iomem *store_addr);
70void mvebu_mbus_get_pcie_mem_aperture(struct resource *res); 86void mvebu_mbus_get_pcie_mem_aperture(struct resource *res);
71void mvebu_mbus_get_pcie_io_aperture(struct resource *res); 87void mvebu_mbus_get_pcie_io_aperture(struct resource *res);
72int mvebu_mbus_get_dram_win_info(phys_addr_t phyaddr, u8 *target, u8 *attr); 88int mvebu_mbus_get_dram_win_info(phys_addr_t phyaddr, u8 *target, u8 *attr);
73int mvebu_mbus_get_io_win_info(phys_addr_t phyaddr, u32 *size, u8 *target,
74 u8 *attr);
75int mvebu_mbus_add_window_remap_by_id(unsigned int target, 89int mvebu_mbus_add_window_remap_by_id(unsigned int target,
76 unsigned int attribute, 90 unsigned int attribute,
77 phys_addr_t base, size_t size, 91 phys_addr_t base, size_t size,