dwmmc.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * (C) Copyright 2012 SAMSUNG Electronics
  3. * Jaehoon Chung <jh80.chung@samsung.com>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  18. *
  19. */
  20. #define DWMCI_CLKSEL 0x09C
  21. #define DWMCI_SHIFT_0 0x0
  22. #define DWMCI_SHIFT_1 0x1
  23. #define DWMCI_SHIFT_2 0x2
  24. #define DWMCI_SHIFT_3 0x3
  25. #define DWMCI_SET_SAMPLE_CLK(x) (x)
  26. #define DWMCI_SET_DRV_CLK(x) ((x) << 16)
  27. #define DWMCI_SET_DIV_RATIO(x) ((x) << 24)
  28. int exynos_dwmci_init(u32 regbase, int bus_width, int index);
  29. static inline unsigned int exynos_dwmmc_init(int index, int bus_width)
  30. {
  31. unsigned int base = samsung_get_base_mmc() + (0x10000 * index);
  32. return exynos_dwmci_init(base, bus_width, index);
  33. }