fuchsia.hardware.sdio

新增:HEAD

通訊協定

裝置

定義於 fuchsia.hardware.sdio/sdio.fidl

AckInBandIntr

如上所示。用戶端應在開始等待中斷物件後呼叫 AckInBandIntr(),以免這個函式已有待處理的頻內中斷。

要求

<EMPTY>

DisableFn

要求

<EMPTY>

回應

名稱類型
payload Device_DisableFn_Result

DisableFnIntr

要求

<EMPTY>

回應

名稱類型
payload Device_DisableFnIntr_Result

DoRwTxn

用戶端負責執行下列快取作業:

讀取要求後:

  • 在用戶端對應的緩衝區上,使用 ZX_CACHE_FLUSH_DATA | ZX_CACHE_FLUSH_INVALIDATE 呼叫 zx_cache_flush。
  • 在所有其他緩衝區上,使用 ZX_VMO_OP_CACHE_CLEAN_INVALIDATE 呼叫 zx_vmo_op_range。

請注意,在 DoRwTxn 傳回之前寫入緩衝區的任何部分,可能會損毀接收到的資料。

寫入要求前:

  • 在用戶端對應的緩衝區上,使用 ZX_CACHE_FLUSH_DATA 呼叫 zx_cache_flush。
  • 在所有其他緩衝區上,使用 ZX_VMO_OP_CACHE_CLEAN 呼叫 zx_vmo_op_range。

要求

名稱類型
txn SdioRwTxn

回應

名稱類型
payload Device_DoRwTxn_Result

DoVendorControlRwByte

讀取或寫入供應商 CCCR 暫存器。addr 必須介於 [0xF0, 0xFF]。

要求

名稱類型
write bool
addr uint8
write_byte uint8

回應

名稱類型
payload Device_DoVendorControlRwByte_Result

EnableFn

要求

<EMPTY>

回應

名稱類型
payload Device_EnableFn_Result

EnableFnIntr

要求

<EMPTY>

回應

名稱類型
payload Device_EnableFnIntr_Result

GetBlockSize

要求

<EMPTY>

回應

名稱類型
payload Device_GetBlockSize_Result

GetDevHwInfo

要求

<EMPTY>

回應

名稱類型
payload Device_GetDevHwInfo_Result

GetInBandIntr

當卡片發出與此函式對應的中斷訊號時,SDIO 驅動程式會觸發虛擬中斷,並傳回該中斷。在呼叫 AckInBandIntr() 之前,系統不會觸發其他中斷。

要求

<EMPTY>

回應

名稱類型
payload Device_GetInBandIntr_Result

IntrPending

如果函式 fn_idx 有待處理的中斷,則傳回 true,否則傳回 false。

要求

<EMPTY>

回應

名稱類型
payload Device_IntrPending_Result

IoAbort

下列函式會存取函式 0 的卡片通用控制暫存器 (CCCR)。取消指定函式上發生的 I/O 作業。

要求

<EMPTY>

回應

名稱類型
payload Device_IoAbort_Result

IoReady

傳回 CCCR 中這個函式的 I/O Ready 位元值。

要求

<EMPTY>

回應

名稱類型
payload Device_IoReady_Result

PerformTuning

在背景執行調整作業。如果匯流排延遲因溫度或其他因素而改變,用戶端可以使用這個方法更新主機控制器延遲設定。例如,用戶端可以定期呼叫這個方法,或只在發生資料 CRC 錯誤時呼叫。這項呼叫所需的時間 (以及其他要求遭到封鎖的時間) 取決於控制器。

如果對 PerformTuning() 的另一個呼叫已在等待處理,則傳回 ZX_ERR_ALREADY_BOUND。否則,如果 SDMMC 驅動程式庫程式的調整程序失敗,則會傳回 ZX_OK 或錯誤值 (請參閱 SDMMC 通訊協定)。

要求

<EMPTY>

回應

名稱類型
payload Device_PerformTuning_Result

ReadByte

從暫存器讀取一個位元組。如果 suppress_error_messages 為 true,SDMMC 堆疊不會記錄錯誤嚴重程度訊息。

要求

名稱類型
address uint32
suppress_error_messages bool

回應

名稱類型
payload Device_ReadByte_Result

RegisterVmo

要求

名稱類型
vmo_id uint32
vmo handle<vmo>
offset uint64
size uint64
vmo_rights uint32

回應

名稱類型
payload Device_RegisterVmo_Result

RequestCardReset

要求核心驅動程式強制重設卡片,並再次執行 SDIO 初始化序列。系統會在卡片重新初始化後呼叫回呼,同時,這個用戶端的所有 IO 呼叫都會傳回 ZX_ERR_SHOULD_WAIT。如果初始化期間發生錯誤,所有後續 IO 呼叫都會傳回 ZX_ERR_IO_NOT_PRESENT。如要從這種情況中復原,唯一的方法是再次呼叫 RequestCardReset()。

SDIO 核心驅動程式會等待所有用戶端呼叫這個方法,再執行重設和重新初始化。重設後,用戶端必須再次執行自己的初始化步驟,例如呼叫 EnableFnIntr() 或 UpdateBlockSize()。

無論重設狀態為何,一律可以呼叫 VMO 註冊方法。

硬體重設卡片的具體方法因平台或主機板而異,例如切換重設 GPIO 或重新啟動卡片電源。

要求

<EMPTY>

回應

名稱類型
payload Device_RequestCardReset_Result

UnregisterVmo

要求

名稱類型
vmo_id uint32

回應

名稱類型
payload Device_UnregisterVmo_Result

UpdateBlockSize

要求

名稱類型
blk_sz uint16
deflt bool

回應

名稱類型
payload Device_UpdateBlockSize_Result

WriteByte

將一個位元組寫入暫存器。如果 read_after_write 為 true,系統會在寫入後讀取暫存器並傳回值,否則會傳回原始值。如果 suppress_error_messages 為 true,則預期寫入作業會失敗,且 SDMMC 堆疊不會記錄錯誤嚴重性訊息。

要求

名稱類型
address uint32
byte uint8
read_after_write bool
suppress_error_messages bool

回應

名稱類型
payload Device_WriteByte_Result

DriverDevice

定義於 fuchsia.hardware.sdio/sdio.fidl

Device 通訊協定的驅動程式庫傳輸變化版本。

AckInBandIntr

如上所示。用戶端應在開始等待中斷物件後呼叫 AckInBandIntr(),以免這個函式已有待處理的頻內中斷。

要求

<EMPTY>

DisableFn

要求

<EMPTY>

回應

名稱類型
payload Device_DisableFn_Result

DisableFnIntr

要求

<EMPTY>

回應

名稱類型
payload Device_DisableFnIntr_Result

DoRwTxn

用戶端負責執行下列快取作業:

讀取要求後:

  • 在用戶端對應的緩衝區上,使用 ZX_CACHE_FLUSH_DATA | ZX_CACHE_FLUSH_INVALIDATE 呼叫 zx_cache_flush。
  • 在所有其他緩衝區上,使用 ZX_VMO_OP_CACHE_CLEAN_INVALIDATE 呼叫 zx_vmo_op_range。

請注意,在 DoRwTxn 傳回之前寫入緩衝區的任何部分,可能會損毀接收到的資料。

寫入要求前:

  • 在用戶端對應的緩衝區上,使用 ZX_CACHE_FLUSH_DATA 呼叫 zx_cache_flush。
  • 在所有其他緩衝區上,使用 ZX_VMO_OP_CACHE_CLEAN 呼叫 zx_vmo_op_range。

要求

名稱類型
txn SdioRwTxn

回應

名稱類型
payload Device_DoRwTxn_Result

DoVendorControlRwByte

讀取或寫入供應商 CCCR 暫存器。addr 必須介於 [0xF0, 0xFF]。

要求

名稱類型
write bool
addr uint8
write_byte uint8

回應

名稱類型
payload Device_DoVendorControlRwByte_Result

EnableFn

要求

<EMPTY>

回應

名稱類型
payload Device_EnableFn_Result

EnableFnIntr

要求

<EMPTY>

回應

名稱類型
payload Device_EnableFnIntr_Result

GetBlockSize

要求

<EMPTY>

回應

名稱類型
payload Device_GetBlockSize_Result

GetDevHwInfo

要求

<EMPTY>

回應

名稱類型
payload Device_GetDevHwInfo_Result

GetInBandIntr

當卡片發出與此函式對應的中斷訊號時,SDIO 驅動程式會觸發虛擬中斷,並傳回該中斷。在呼叫 AckInBandIntr() 之前,系統不會觸發其他中斷。

要求

<EMPTY>

回應

名稱類型
payload Device_GetInBandIntr_Result

IntrPending

如果函式 fn_idx 有待處理的中斷,則傳回 true,否則傳回 false。

要求

<EMPTY>

回應

名稱類型
payload Device_IntrPending_Result

IoAbort

下列函式會存取函式 0 的卡片通用控制暫存器 (CCCR)。取消指定函式上發生的 I/O 作業。

要求

<EMPTY>

回應

名稱類型
payload Device_IoAbort_Result

IoReady

傳回 CCCR 中這個函式的 I/O Ready 位元值。

要求

<EMPTY>

回應

名稱類型
payload Device_IoReady_Result

PerformTuning

在背景執行調整作業。如果匯流排延遲因溫度或其他因素而改變,用戶端可以使用這個方法更新主機控制器延遲設定。例如,用戶端可以定期呼叫這個方法,或只在發生資料 CRC 錯誤時呼叫。這項呼叫所需的時間 (以及其他要求遭到封鎖的時間) 取決於控制器。

如果對 PerformTuning() 的另一個呼叫已在等待處理,則傳回 ZX_ERR_ALREADY_BOUND。否則,如果 SDMMC 驅動程式庫程式的調整程序失敗,則會傳回 ZX_OK 或錯誤值 (請參閱 SDMMC 通訊協定)。

要求

<EMPTY>

回應

名稱類型
payload Device_PerformTuning_Result

ReadByte

從暫存器讀取一個位元組。如果 suppress_error_messages 為 true,SDMMC 堆疊不會記錄錯誤嚴重程度訊息。

要求

名稱類型
address uint32
suppress_error_messages bool

回應

名稱類型
payload Device_ReadByte_Result

RegisterVmo

要求

名稱類型
vmo_id uint32
vmo handle<vmo>
offset uint64
size uint64
vmo_rights uint32

回應

名稱類型
payload Device_RegisterVmo_Result

RequestCardReset

要求核心驅動程式強制重設卡片,並再次執行 SDIO 初始化序列。系統會在卡片重新初始化後呼叫回呼,同時,這個用戶端的所有 IO 呼叫都會傳回 ZX_ERR_SHOULD_WAIT。如果初始化期間發生錯誤,所有後續 IO 呼叫都會傳回 ZX_ERR_IO_NOT_PRESENT。如要從這種情況中復原,唯一的方法是再次呼叫 RequestCardReset()。

SDIO 核心驅動程式會等待所有用戶端呼叫這個方法,再執行重設和重新初始化。重設後,用戶端必須再次執行自己的初始化步驟,例如呼叫 EnableFnIntr() 或 UpdateBlockSize()。

無論重設狀態為何,一律可以呼叫 VMO 註冊方法。

硬體重設卡片的具體方法因平台或主機板而異,例如切換重設 GPIO 或重新啟動卡片電源。

要求

<EMPTY>

回應

名稱類型
payload Device_RequestCardReset_Result

UnregisterVmo

要求

名稱類型
vmo_id uint32

回應

名稱類型
payload Device_UnregisterVmo_Result

UpdateBlockSize

要求

名稱類型
blk_sz uint16
deflt bool

回應

名稱類型
payload Device_UpdateBlockSize_Result

WriteByte

將一個位元組寫入暫存器。如果 read_after_write 為 true,系統會在寫入後讀取暫存器並傳回值,否則會傳回原始值。如果 suppress_error_messages 為 true,則預期寫入作業會失敗,且 SDMMC 堆疊不會記錄錯誤嚴重性訊息。

要求

名稱類型
address uint32
byte uint8
read_after_write bool
suppress_error_messages bool

回應

名稱類型
payload Device_WriteByte_Result

STRUCTS

Device_DisableFnIntr_Response

定義於 fuchsia.hardware.sdio/sdio.fidl

<EMPTY>

Device_DisableFn_Response

定義於 fuchsia.hardware.sdio/sdio.fidl

<EMPTY>

Device_DoRwTxn_Response

定義於 fuchsia.hardware.sdio/sdio.fidl

<EMPTY>

Device_DoVendorControlRwByte_Response

定義於 fuchsia.hardware.sdio/sdio.fidl

欄位類型說明預設
read_byte uint8 無預設值

Device_EnableFnIntr_Response

定義於 fuchsia.hardware.sdio/sdio.fidl

<EMPTY>

Device_EnableFn_Response

定義於 fuchsia.hardware.sdio/sdio.fidl

<EMPTY>

Device_GetBlockSize_Response

定義於 fuchsia.hardware.sdio/sdio.fidl

欄位類型說明預設
cur_blk_size uint16 無預設值

Device_GetDevHwInfo_Response

定義於 fuchsia.hardware.sdio/sdio.fidl

欄位類型說明預設
hw_info SdioHwInfo 無預設值

Device_GetInBandIntr_Response 資源

定義於 fuchsia.hardware.sdio/sdio.fidl

欄位類型說明預設
irq handle<interrupt> 無預設值

Device_IntrPending_Response

定義於 fuchsia.hardware.sdio/sdio.fidl

欄位類型說明預設
pending bool 無預設值

Device_IoAbort_Response

定義於 fuchsia.hardware.sdio/sdio.fidl

<EMPTY>

Device_IoReady_Response

定義於 fuchsia.hardware.sdio/sdio.fidl

欄位類型說明預設
ready bool 無預設值

Device_PerformTuning_Response

定義於 fuchsia.hardware.sdio/sdio.fidl

<EMPTY>

Device_ReadByte_Response

定義於 fuchsia.hardware.sdio/sdio.fidl

欄位類型說明預設
byte uint8 無預設值

Device_RegisterVmo_Response

定義於 fuchsia.hardware.sdio/sdio.fidl

<EMPTY>

Device_RequestCardReset_Response

定義於 fuchsia.hardware.sdio/sdio.fidl

<EMPTY>

Device_UnregisterVmo_Response resource

定義於 fuchsia.hardware.sdio/sdio.fidl

欄位類型說明預設
vmo handle<vmo> 無預設值

Device_UpdateBlockSize_Response

定義於 fuchsia.hardware.sdio/sdio.fidl

<EMPTY>

Device_WriteByte_Response

定義於 fuchsia.hardware.sdio/sdio.fidl

欄位類型說明預設
byte uint8 無預設值

SdioDeviceHwInfo

定義於 fuchsia.hardware.sdio/sdio.fidl

欄位類型說明預設
num_funcs uint32

sdio 函式數量 (包括函式 0)

無預設值
sdio_vsn uint32 無預設值
cccr_vsn uint32 無預設值
caps SdioDeviceCapabilities 無預設值
max_tran_speed uint32 無預設值

SdioFuncHwInfo

定義於 fuchsia.hardware.sdio/sdio.fidl

欄位類型說明預設
manufacturer_id uint32 無預設值
product_id uint32 無預設值
max_blk_size uint32 無預設值
fn_intf_code uint8 無預設值

SdioHwInfo

定義於 fuchsia.hardware.sdio/sdio.fidl

欄位類型說明預設
dev_hw_info SdioDeviceHwInfo 無預設值
func_hw_info SdioFuncHwInfo 無預設值
host_max_transfer_size uint32 無預設值

SdioRwTxn 資源

定義於 fuchsia.hardware.sdio/sdio.fidl

欄位類型說明預設
addr uint32 無預設值
incr bool 無預設值
write bool 無預設值
buffers vector<fuchsia.hardware.sdmmc/SdmmcBufferRegion> 無預設值

TABLES

FunctionMetadata

定義於 fuchsia.hardware.sdio/metadata.fidl

描述 SDIO 函式的中繼資料。

序數欄位類型說明
function uint32

SDIO 函式編號 (1-7)。必要。

id uint32

指派給這個函式節點的全域 ID,用於繫結驅動程式庫。(選用)

中繼資料

定義於 fuchsia.hardware.sdio/metadata.fidl

從主機板驅動程式庫傳遞至 SDMMC 驅動程式庫的 SDIO 中繼資料。

序數欄位類型說明
functions vector<FunctionMetadata>:7

SDIO 裝置公開的函式清單。必要。

UNIONS

Device_DisableFnIntr_Result strict

定義於 fuchsia.hardware.sdio/sdio.fidl

序數Variant類型說明
response Device_DisableFnIntr_Response
err zx/Status

Device_DisableFn_Result strict

定義於 fuchsia.hardware.sdio/sdio.fidl

序數Variant類型說明
response Device_DisableFn_Response
err zx/Status

Device_DoRwTxn_Result strict

定義於 fuchsia.hardware.sdio/sdio.fidl

序數Variant類型說明
response Device_DoRwTxn_Response
err zx/Status

Device_DoVendorControlRwByte_Result strict

定義於 fuchsia.hardware.sdio/sdio.fidl

序數Variant類型說明
response Device_DoVendorControlRwByte_Response
err zx/Status

Device_EnableFnIntr_Result strict

定義於 fuchsia.hardware.sdio/sdio.fidl

序數Variant類型說明
response Device_EnableFnIntr_Response
err zx/Status

Device_EnableFn_Result strict

定義於 fuchsia.hardware.sdio/sdio.fidl

序數Variant類型說明
response Device_EnableFn_Response
err zx/Status

Device_GetBlockSize_Result strict

定義於 fuchsia.hardware.sdio/sdio.fidl

序數Variant類型說明
response Device_GetBlockSize_Response
err zx/Status

Device_GetDevHwInfo_Result strict

定義於 fuchsia.hardware.sdio/sdio.fidl

序數Variant類型說明
response Device_GetDevHwInfo_Response
err zx/Status

Device_GetInBandIntr_Result strict resource

定義於 fuchsia.hardware.sdio/sdio.fidl

序數Variant類型說明
response Device_GetInBandIntr_Response
err zx/Status

Device_IntrPending_Result strict

定義於 fuchsia.hardware.sdio/sdio.fidl

序數Variant類型說明
response Device_IntrPending_Response
err zx/Status

Device_IoAbort_Result strict

定義於 fuchsia.hardware.sdio/sdio.fidl

序數Variant類型說明
response Device_IoAbort_Response
err zx/Status

Device_IoReady_Result strict

定義於 fuchsia.hardware.sdio/sdio.fidl

序數Variant類型說明
response Device_IoReady_Response
err zx/Status

Device_PerformTuning_Result strict

定義於 fuchsia.hardware.sdio/sdio.fidl

序數Variant類型說明
response Device_PerformTuning_Response
err zx/Status

Device_ReadByte_Result strict

定義於 fuchsia.hardware.sdio/sdio.fidl

序數Variant類型說明
response Device_ReadByte_Response
err zx/Status

Device_RegisterVmo_Result strict

定義於 fuchsia.hardware.sdio/sdio.fidl

序數Variant類型說明
response Device_RegisterVmo_Response
err zx/Status

Device_RequestCardReset_Result strict

定義於 fuchsia.hardware.sdio/sdio.fidl

序數Variant類型說明
response Device_RequestCardReset_Response
err zx/Status

Device_UnregisterVmo_Result strict resource

定義於 fuchsia.hardware.sdio/sdio.fidl

序數Variant類型說明
response Device_UnregisterVmo_Response
err zx/Status

Device_UpdateBlockSize_Result strict

定義於 fuchsia.hardware.sdio/sdio.fidl

序數Variant類型說明
response Device_UpdateBlockSize_Response
err zx/Status

Device_WriteByte_Result strict

定義於 fuchsia.hardware.sdio/sdio.fidl

序數Variant類型說明
response Device_WriteByte_Response
err zx/Status

BITS

SdioDeviceCapabilities strict

類型:uint32

定義於 fuchsia.hardware.sdio/sdio.fidl

名稱值說明
1
2
4
8
16
32
64
128
256
512
1024
2048
4096
8192
16384
32768
65536

常數

名稱值類型說明
SDIO_MAX_FUNCS 8 uint8

服務

DriverService

定義於 fuchsia.hardware.sdio/sdio.fidl

名稱類型傳輸
device fuchsia.hardware.sdio/DriverDevice 駕駛

服務

定義於 fuchsia.hardware.sdio/sdio.fidl

名稱類型傳輸
device fuchsia.hardware.sdio/Device 版本