SceSdif

SceSdif is a kernel module that is primary responsible for communicating with SD devices. This includes onboard eMMC, game card MMC, wi-fi/bluetooth SDIO devices. To communicate with particular device SceSdif module uses device index (sd_ctx_index)

initialize_sd_context_part
this function only initializes devices with sd_ctx_index 0 and 1 returns 0x80320013 on any other sd_ctx_index

wlan_bt_initialize_custom_context2
this function can send these commands: cmd3, cmd52_sdio, cmd0, cmd5_sdio, cmd55, acmd41, cmd7, cmd8

this function uses array of 2 custom contexts.

this function can either set device type index to 3 and use custom context for initialization.

or it can use preinitialization (cmd0, cmd8, cmd5_sdio, cmd55, acmd41) and then check that device type index is 3.

if device type index is not 3 then 0x80320017 error is returned.

wlan_bt_initialize_custom_context1
this function is just a wrapper for wlan_bt_initialize_custom_context2 (aabaa0f0)

sdstor_initialize_sd_context_part2
this function can execute all initialization commands just as initialize_sd_context_part (22c82e79) function.

these commands include: cmd0, cmd2, cmd3, cmd5_sdio, cmd6, cmd55, acmd41, cmd9, cmd7, cmd16, cmd8

there are couple of differences however:


 * it can execute cmd42 lock/unlock command.
 * it does not check sd_ctx_index argument.
 * it uses array of 3 custom contexts instead of sd_context_part structures.
 * it checks device type index after preinitialization (cmd0, cmd8, cmd5_sdio, cmd55, acmd41)
 * it only initializes device with device type index 2. otherwice 0x80320017 error is returned.