Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 //
0003 // Copyright 2010 Promwad Innovation Company
0004 //  Yauhen Kharuzhy <yauhen.kharuzhy@promwad.com>
0005 //
0006 // S3C2416 - Helper functions for setting up SDHCI device(s) GPIO (HSMMC)
0007 //
0008 // Based on mach-s3c64xx/setup-sdhci-gpio.c
0009 
0010 #include <linux/kernel.h>
0011 #include <linux/types.h>
0012 #include <linux/interrupt.h>
0013 #include <linux/platform_device.h>
0014 #include <linux/io.h>
0015 #include <linux/gpio.h>
0016 
0017 #include "regs-gpio.h"
0018 #include "gpio-samsung.h"
0019 #include "gpio-cfg.h"
0020 #include "sdhci.h"
0021 
0022 void s3c2416_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width)
0023 {
0024     s3c_gpio_cfgrange_nopull(S3C2410_GPE(5), 2 + width, S3C_GPIO_SFN(2));
0025 }
0026 
0027 void s3c2416_setup_sdhci1_cfg_gpio(struct platform_device *dev, int width)
0028 {
0029     s3c_gpio_cfgrange_nopull(S3C2410_GPL(0), width, S3C_GPIO_SFN(2));
0030     s3c_gpio_cfgrange_nopull(S3C2410_GPL(8), 2, S3C_GPIO_SFN(2));
0031 }