setup-sdhci-gpio-s3c24xx.c 871 B

12345678910111213141516171819202122232425262728293031
  1. // SPDX-License-Identifier: GPL-2.0
  2. //
  3. // Copyright 2010 Promwad Innovation Company
  4. // Yauhen Kharuzhy <[email protected]>
  5. //
  6. // S3C2416 - Helper functions for setting up SDHCI device(s) GPIO (HSMMC)
  7. //
  8. // Based on mach-s3c64xx/setup-sdhci-gpio.c
  9. #include <linux/kernel.h>
  10. #include <linux/types.h>
  11. #include <linux/interrupt.h>
  12. #include <linux/platform_device.h>
  13. #include <linux/io.h>
  14. #include <linux/gpio.h>
  15. #include "regs-gpio.h"
  16. #include "gpio-samsung.h"
  17. #include "gpio-cfg.h"
  18. #include "sdhci.h"
  19. void s3c2416_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width)
  20. {
  21. s3c_gpio_cfgrange_nopull(S3C2410_GPE(5), 2 + width, S3C_GPIO_SFN(2));
  22. }
  23. void s3c2416_setup_sdhci1_cfg_gpio(struct platform_device *dev, int width)
  24. {
  25. s3c_gpio_cfgrange_nopull(S3C2410_GPL(0), width, S3C_GPIO_SFN(2));
  26. s3c_gpio_cfgrange_nopull(S3C2410_GPL(8), 2, S3C_GPIO_SFN(2));
  27. }