dwmmc.h 928 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * (C) Copyright 2012 SAMSUNG Electronics
  3. * Jaehoon Chung <jh80.chung@samsung.com>
  4. *
  5. * SPDX-License-Identifier: GPL-2.0+
  6. */
  7. #define DWMCI_CLKSEL 0x09C
  8. #define DWMCI_SET_SAMPLE_CLK(x) (x)
  9. #define DWMCI_SET_DRV_CLK(x) ((x) << 16)
  10. #define DWMCI_SET_DIV_RATIO(x) ((x) << 24)
  11. #define EMMCP_MPSBEGIN0 0x1200
  12. #define EMMCP_SEND0 0x1204
  13. #define EMMCP_CTRL0 0x120C
  14. #define MPSCTRL_SECURE_READ_BIT (0x1<<7)
  15. #define MPSCTRL_SECURE_WRITE_BIT (0x1<<6)
  16. #define MPSCTRL_NON_SECURE_READ_BIT (0x1<<5)
  17. #define MPSCTRL_NON_SECURE_WRITE_BIT (0x1<<4)
  18. #define MPSCTRL_USE_FUSE_KEY (0x1<<3)
  19. #define MPSCTRL_ECB_MODE (0x1<<2)
  20. #define MPSCTRL_ENCRYPTION (0x1<<1)
  21. #define MPSCTRL_VALID (0x1<<0)
  22. /* CLKSEL Register */
  23. #define DWMCI_DIVRATIO_BIT 24
  24. #define DWMCI_DIVRATIO_MASK 0x7
  25. #ifdef CONFIG_OF_CONTROL
  26. int exynos_dwmmc_init(const void *blob);
  27. #endif
  28. int exynos_dwmci_add_port(int index, u32 regbase, int bus_width, u32 clksel);