Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * arch/arm/plat-orion/include/plat/addr-map.h
0003  *
0004  * Marvell Orion SoC address map handling.
0005  *
0006  * This file is licensed under the terms of the GNU General Public
0007  * License version 2.  This program is licensed "as is" without any
0008  * warranty of any kind, whether express or implied.
0009  */
0010 
0011 #ifndef __PLAT_ADDR_MAP_H
0012 #define __PLAT_ADDR_MAP_H
0013 
0014 extern struct mbus_dram_target_info orion_mbus_dram_info;
0015 
0016 struct orion_addr_map_cfg {
0017     const int num_wins; /* Total number of windows */
0018     const int remappable_wins;
0019     void __iomem *bridge_virt_base;
0020     int hw_io_coherency;
0021 
0022     /* If NULL, the default cpu_win_can_remap will be used, using
0023        the value in remappable_wins */
0024     int (*cpu_win_can_remap) (const struct orion_addr_map_cfg *cfg,
0025                   const int win);
0026     /* If NULL, the default win_cfg_base will be used, using the
0027        value in bridge_virt_base */
0028     void __iomem *(*win_cfg_base) (const struct orion_addr_map_cfg *cfg,
0029                  const int win);
0030 };
0031 
0032 /*
0033  * Information needed to setup one address mapping.
0034  */
0035 struct orion_addr_map_info {
0036     const int win;
0037     const u32 base;
0038     const u32 size;
0039     const u8 target;
0040     const u8 attr;
0041     const int remap;
0042 };
0043 
0044 void __init orion_config_wins(struct orion_addr_map_cfg *cfg,
0045                   const struct orion_addr_map_info *info);
0046 
0047 void __init orion_setup_cpu_win(const struct orion_addr_map_cfg *cfg,
0048                 const int win, const u32 base,
0049                 const u32 size, const u8 target,
0050                 const u8 attr, const int remap);
0051 
0052 void __init orion_setup_cpu_mbus_target(const struct orion_addr_map_cfg *cfg,
0053                     const void __iomem *ddr_window_cpu_base);
0054 #endif