Altera HWLIB  16.0
The Altera HW Manager API Reference Manual
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups
alt_address_space.h
Go to the documentation of this file.
1 
5 /******************************************************************************
6 *
7 * Copyright 2013 Altera Corporation. All Rights Reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions are met:
11 *
12 * 1. Redistributions of source code must retain the above copyright notice,
13 * this list of conditions and the following disclaimer.
14 *
15 * 2. Redistributions in binary form must reproduce the above copyright notice,
16 * this list of conditions and the following disclaimer in the documentation
17 * and/or other materials provided with the distribution.
18 *
19 * 3. Neither the name of the copyright holder nor the names of its contributors
20 * may be used to endorse or promote products derived from this software without
21 * specific prior written permission.
22 *
23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
27 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33 * POSSIBILITY OF SUCH DAMAGE.
34 *
35 ******************************************************************************/
36 
37 /*
38  * $Id: //depot/embedded/rel/15.0/ip/hps/altera_hps/hwlib/include/alt_address_space.h#1 $
39  */
40 
41 #ifndef __ALT_ADDRESS_SPACE_H__
42 #define __ALT_ADDRESS_SPACE_H__
43 
44 #include <stdbool.h>
45 #include "hwlib.h"
46 #include "socal/hps.h"
47 #include "alt_l2_p310.h"
48 
49 #ifdef __cplusplus
50 extern "C"
51 {
52 #endif /* __cplusplus */
53 
54 #ifndef __ASSEMBLY__
55 
56 /******************************************************************************/
69 /******************************************************************************/
123 /******************************************************************************/
131 {
150 
151 /******************************************************************************/
160 {
173 
174 /******************************************************************************/
180 {
191 
192 /******************************************************************************/
198 {
209 
210 /******************************************************************************/
234 ALT_STATUS_CODE alt_addr_space_remap(ALT_ADDR_SPACE_MPU_ATTR_t mpu_attr,
235  ALT_ADDR_SPACE_NONMPU_ATTR_t nonmpu_attr,
238 
239 /******************************************************************************/
267 ALT_STATUS_CODE alt_mpu_addr_space_remap_0_to_sdram(void);
268 
271 /******************************************************************************/
294 /******************************************************************************/
315 ALT_STATUS_CODE alt_l2_addr_filter_cfg_get(uint32_t* addr_filt_start,
316  uint32_t* addr_filt_end);
317 
318 /******************************************************************************/
344 ALT_STATUS_CODE alt_l2_addr_filter_cfg_set(uint32_t addr_filt_start,
345  uint32_t addr_filt_end);
346 
349 /******************************************************************************/
437 /******************************************************************************/
449 #define ALT_ACP_ID_MAP_MASTER_ID_MASK 0xfff
450 
452 #define ALT_ACP_ID_MAP_MASTER_ID_L2M0(var) (0x00000002 | (0x000007f8 & (var)))
453 
454 #define ALT_ACP_ID_MAP_MASTER_ID_DMA(var) (0x00000001 | (0x00000078 & (var)))
455 
456 #define ALT_ACP_ID_MAP_MASTER_ID_EMAC0(var) (0x00000801 | (0x00000878 & (var)))
457 
458 #define ALT_ACP_ID_MAP_MASTER_ID_EMAC1(var) (0x00000802 | (0x00000878 & (var)))
459 
460 #define ALT_ACP_ID_MAP_MASTER_ID_USB0 0x00000803
461 
462 #define ALT_ACP_ID_MAP_MASTER_ID_USB1 0x00000806
463 
464 #define ALT_ACP_ID_MAP_MASTER_ID_NAND(var) (0x00000804 | (0x00000ff8 & (var)))
465 
466 #define ALT_ACP_ID_MAP_MASTER_ID_TMC 0x00000800
467 
468 #define ALT_ACP_ID_MAP_MASTER_ID_DAP 0x00000004
469 
470 #define ALT_ACP_ID_MAP_MASTER_ID_SDMMC 0x00000805
471 
472 #define ALT_ACP_ID_MAP_MASTER_ID_F2H(var) (0x00000000 | (0x000007f8 & (var)))
473 
475 /******************************************************************************/
480 {
491 
497 {
503 
504 /******************************************************************************/
539 ALT_STATUS_CODE alt_acp_id_map_fixed_read_set(const uint32_t input_id,
540  const uint32_t output_id,
541  const ALT_ACP_ID_MAP_PAGE_t page,
542  const uint32_t aruser);
543 
544 /******************************************************************************/
579 ALT_STATUS_CODE alt_acp_id_map_fixed_write_set(const uint32_t input_id,
580  const uint32_t output_id,
581  const ALT_ACP_ID_MAP_PAGE_t page,
582  const uint32_t awuser);
583 
584 /******************************************************************************/
605 ALT_STATUS_CODE alt_acp_id_map_dynamic_read_set(const uint32_t output_id);
606 
607 /******************************************************************************/
628 ALT_STATUS_CODE alt_acp_id_map_dynamic_write_set(const uint32_t output_id);
629 
630 /******************************************************************************/
654  const uint32_t aruser);
655 
656 /******************************************************************************/
680  const uint32_t awuser);
681 
682 /******************************************************************************/
726 ALT_STATUS_CODE alt_acp_id_map_read_options_get(const uint32_t output_id,
727  bool* fixed,
728  uint32_t* input_id,
729  ALT_ACP_ID_MAP_PAGE_t* page,
730  uint32_t* aruser);
731 
732 /******************************************************************************/
776 ALT_STATUS_CODE alt_acp_id_map_write_options_get(const uint32_t output_id,
777  bool* fixed,
778  uint32_t* input_id,
779  ALT_ACP_ID_MAP_PAGE_t* page,
780  uint32_t* awuser);
781 
786 #endif /* __ASSEMBLY__ */
787 
788 #ifdef __cplusplus
789 }
790 #endif /* __cplusplus */
791 #endif /* __ALT_ADDRESS_SPACE_H__ */