Krzysztof Kozlowski | 84b2170 | 2017-12-25 20:54:32 +0100 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | // |
| 3 | // Copyright 2010 Promwad Innovation Company |
| 4 | // Yauhen Kharuzhy <yauhen.kharuzhy@promwad.com> |
| 5 | // |
| 6 | // S3C2416 - Helper functions for setting up SDHCI device(s) GPIO (HSMMC) |
| 7 | // |
| 8 | // Based on mach-s3c64xx/setup-sdhci-gpio.c |
Yauhen Kharuzhy | c29cfa6 | 2010-12-17 14:42:09 +0900 | [diff] [blame] | 9 | |
| 10 | #include <linux/kernel.h> |
| 11 | #include <linux/types.h> |
| 12 | #include <linux/interrupt.h> |
| 13 | #include <linux/platform_device.h> |
| 14 | #include <linux/io.h> |
| 15 | #include <linux/gpio.h> |
Yauhen Kharuzhy | c29cfa6 | 2010-12-17 14:42:09 +0900 | [diff] [blame] | 16 | |
| 17 | #include <mach/regs-gpio.h> |
Linus Walleij | b0161ca | 2014-01-14 14:24:24 +0100 | [diff] [blame] | 18 | #include <mach/gpio-samsung.h> |
Yauhen Kharuzhy | c29cfa6 | 2010-12-17 14:42:09 +0900 | [diff] [blame] | 19 | #include <plat/gpio-cfg.h> |
| 20 | |
| 21 | void s3c2416_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width) |
| 22 | { |
| 23 | s3c_gpio_cfgrange_nopull(S3C2410_GPE(5), 2 + width, S3C_GPIO_SFN(2)); |
| 24 | } |
| 25 | |
| 26 | void s3c2416_setup_sdhci1_cfg_gpio(struct platform_device *dev, int width) |
| 27 | { |
| 28 | s3c_gpio_cfgrange_nopull(S3C2410_GPL(0), width, S3C_GPIO_SFN(2)); |
| 29 | s3c_gpio_cfgrange_nopull(S3C2410_GPL(8), 2, S3C_GPIO_SFN(2)); |
| 30 | } |