PDK API Guide for J721E
MMCSD_soc.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017-2022, Texas Instruments Incorporated
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * * Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the distribution.
15  *
16  * * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
47 #ifndef MMCSD_SOC__H
48 #define MMCSD_SOC__H
49 
50 #ifdef __cplusplus
51 extern "C" {
52 #endif
53 
54 #include <stdint.h>
55 #include <stdlib.h>
56 #include <string.h>
57 #include <ti/csl/soc.h>
58 #include <ti/osal/osal.h>
59 
60 #if defined(SOC_J721E) || defined(SOC_J7200) || defined(SOC_J721S2) || defined(SOC_J784S4)
61 #include <ti/drv/mmcsd/soc/MMCSD_v2.h>
62 #endif
63 
64 #if defined(SOC_J721E)
65  #define MMCSD_CNT 3
66 #elif defined(SOC_J7200)
67  #define MMCSD_CNT 2
68 #elif defined(SOC_J721S2)
69  #define MMCSD_CNT 2
70 #elif defined(SOC_J784S4)
71  #define MMCSD_CNT 2
72 #endif
73 #ifdef __cplusplus
74 }
75 #endif
76 
77 /*
78 * This function converts the local L2 address to a global address and
79 * will be used for DMA transactions which needs a global address.
80 */
81 uint32_t MMCSD_soc_l2_global_addr (uint32_t addr);
82 
83 /*
84 * This function switches the voltage of the CMD & DAT lines of MMCSD instance (1.8V <-> 3.0V)
85 * during initialization if a UHS-1 card is found. This function is board specific and is implemented
86 * by the Board library.
87 */
88 extern MMCSD_Error Board_mmc_voltageSwitchFxn(uint32_t instance, MMCSD_BusVoltage_e switch_voltage);
89 
90 /* This function will configure the interrupt path to the destination CPU
91 * using DMSC firmware via sciclient. if setIntrPath is set to TRUE,
92 * a path is set, else the interrupt path is released
93 */
94 extern MMCSD_Error MMCSD_configSocIntrPath(const void *hwAttrs_ptr,bool setIntrPath);
95 
96 #endif /* _MMCSD_SOC_H */
OS Abstraction Layer header.
uint64_t addr
Definition: csl_udmap_tr.h:216
MMCSD_Error MMCSD_configSocIntrPath(const void *hwAttrs_ptr, bool setIntrPath)
int32_t MMCSD_Error
Return status of MMCSD.
Definition: MMCSD.h:168
MMCSD_Error Board_mmc_voltageSwitchFxn(uint32_t instance, MMCSD_BusVoltage_e switch_voltage)
uint32_t MMCSD_soc_l2_global_addr(uint32_t addr)