• Home
  • Raw
  • Download

Lines Matching refs:host_base

97 static int uniphier_emmc_send_cmd(uintptr_t host_base,  in uniphier_emmc_send_cmd()  argument
104 mmio_write_32(host_base + SDHCI_INT_STATUS, -1); in uniphier_emmc_send_cmd()
105 mmio_write_32(host_base + SDHCI_SIGNAL_ENABLE, 0); in uniphier_emmc_send_cmd()
106 mmio_write_32(host_base + SDHCI_ARGUMENT, cmd->cmdarg); in uniphier_emmc_send_cmd()
113 mmio_write_16(host_base + SDHCI_TRANSFER_MODE, mode); in uniphier_emmc_send_cmd()
136 mmio_write_16(host_base + SDHCI_COMMAND, in uniphier_emmc_send_cmd()
140 stat = mmio_read_32(host_base + SDHCI_INT_STATUS); in uniphier_emmc_send_cmd()
145 mmio_write_32(host_base + SDHCI_INT_STATUS, stat); in uniphier_emmc_send_cmd()
146 dma_addr = mmio_read_32(host_base + SDHCI_DMA_ADDRESS); in uniphier_emmc_send_cmd()
147 mmio_write_32(host_base + SDHCI_DMA_ADDRESS, dma_addr); in uniphier_emmc_send_cmd()
154 static int uniphier_emmc_switch_part(uintptr_t host_base, int part_num) in uniphier_emmc_switch_part() argument
162 return uniphier_emmc_send_cmd(host_base, &cmd); in uniphier_emmc_switch_part()
165 static int uniphier_emmc_check_device_size(uintptr_t host_base, in uniphier_emmc_check_device_size() argument
176 ret = uniphier_emmc_send_cmd(host_base, &cmd); in uniphier_emmc_check_device_size()
180 csd40 = mmio_read_32(host_base + SDHCI_RESPONSE + 4); in uniphier_emmc_check_device_size()
181 csd72 = mmio_read_32(host_base + SDHCI_RESPONSE + 8); in uniphier_emmc_check_device_size()
189 static int uniphier_emmc_load_image(uintptr_t host_base, in uniphier_emmc_load_image() argument
199 mmio_write_32(host_base + SDHCI_DMA_ADDRESS, load_addr); in uniphier_emmc_load_image()
200 mmio_write_16(host_base + SDHCI_BLOCK_SIZE, SDHCI_MAKE_BLKSZ(7, 512)); in uniphier_emmc_load_image()
201 mmio_write_16(host_base + SDHCI_BLOCK_COUNT, block_cnt); in uniphier_emmc_load_image()
203 tmp = mmio_read_8(host_base + SDHCI_HOST_CONTROL); in uniphier_emmc_load_image()
206 mmio_write_8(host_base + SDHCI_HOST_CONTROL, tmp); in uniphier_emmc_load_image()
208 tmp = mmio_read_8(host_base + SDHCI_BLOCK_GAP_CONTROL); in uniphier_emmc_load_image()
210 mmio_write_8(host_base + SDHCI_BLOCK_GAP_CONTROL, tmp); in uniphier_emmc_load_image()
217 return uniphier_emmc_send_cmd(host_base, &cmd); in uniphier_emmc_load_image()
247 uintptr_t host_base = uniphier_emmc_host.base; in uniphier_emmc_hw_init() local
257 uniphier_emmc_send_cmd(host_base, &cmd); /* CMD7 (arg=0) */ in uniphier_emmc_hw_init()
260 mmio_write_8(host_base + SDHCI_SOFTWARE_RESET, in uniphier_emmc_hw_init()
262 while (mmio_read_8(host_base + SDHCI_SOFTWARE_RESET)) in uniphier_emmc_hw_init()
265 ret = uniphier_emmc_check_device_size(host_base, in uniphier_emmc_hw_init()
273 ret = uniphier_emmc_send_cmd(host_base, &cmd); in uniphier_emmc_hw_init()
278 ret = uniphier_emmc_switch_part(host_base, 1); in uniphier_emmc_hw_init()