• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (C) 2022 Beken Corporation
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #pragma once
16 
17 #include <components/log.h>
18 
19 #define SDIO_HOST_TAG "sdio_host"
20 #define SDIO_HOST_LOGI(...) BK_LOGI(SDIO_HOST_TAG, ##__VA_ARGS__)
21 #define SDIO_HOST_LOGW(...) BK_LOGW(SDIO_HOST_TAG, ##__VA_ARGS__)
22 #define SDIO_HOST_LOGE(...) BK_LOGE(SDIO_HOST_TAG, ##__VA_ARGS__)
23 #define SDIO_HOST_LOGD(...) BK_LOGD(SDIO_HOST_TAG, ##__VA_ARGS__)
24 
25 /* standard sd commands */
26 #define GO_IDLE_STATE             0   /* bc                          */
27 #define SEND_OP_COND              1   /* bc                          */
28 #define ALL_SEND_CID              2
29 #define SEND_RELATIVE_ADDR        3   /* ac   [31:16] RCA        R6  */
30 #define IO_SEND_OP_COND           5   /* ac                      R4  */
31 #define SWITCH_FUNC               6
32 #define SELECT_CARD               7   /* ac   [31:16] RCA        R7  */
33 #define SEND_IF_COND              8   /* adtc                    R1  */
34 #define SEND_CSD                  9
35 #define SEND_STATUS               13
36 #define READ_SINGLE_BLOCK         17
37 #define WRITE_BLOCK               24
38 #define SD_APP_OP_COND            41
39 #define IO_RW_DIRECT              52  /* ac   [31:0] See below   R5  */
40 #define IO_RW_EXTENDED            53  /* adtc [31:0] See below   R5  */
41 #define APP_CMD                   55
42 
43