1c29cfa6d3e3edbbf4688a9b95a5b193d4f1c2575Yauhen Kharuzhy/* linux/arch/arm/plat-s3c2416/setup-sdhci-gpio.c
2c29cfa6d3e3edbbf4688a9b95a5b193d4f1c2575Yauhen Kharuzhy *
3c29cfa6d3e3edbbf4688a9b95a5b193d4f1c2575Yauhen Kharuzhy * Copyright 2010 Promwad Innovation Company
4c29cfa6d3e3edbbf4688a9b95a5b193d4f1c2575Yauhen Kharuzhy *	Yauhen Kharuzhy <yauhen.kharuzhy@promwad.com>
5c29cfa6d3e3edbbf4688a9b95a5b193d4f1c2575Yauhen Kharuzhy *
6c29cfa6d3e3edbbf4688a9b95a5b193d4f1c2575Yauhen Kharuzhy * S3C2416 - Helper functions for setting up SDHCI device(s) GPIO (HSMMC)
7c29cfa6d3e3edbbf4688a9b95a5b193d4f1c2575Yauhen Kharuzhy *
8c29cfa6d3e3edbbf4688a9b95a5b193d4f1c2575Yauhen Kharuzhy * Based on mach-s3c64xx/setup-sdhci-gpio.c
9c29cfa6d3e3edbbf4688a9b95a5b193d4f1c2575Yauhen Kharuzhy *
10c29cfa6d3e3edbbf4688a9b95a5b193d4f1c2575Yauhen Kharuzhy * This program is free software; you can redistribute it and/or modify
11c29cfa6d3e3edbbf4688a9b95a5b193d4f1c2575Yauhen Kharuzhy * it under the terms of the GNU General Public License version 2 as
12c29cfa6d3e3edbbf4688a9b95a5b193d4f1c2575Yauhen Kharuzhy * published by the Free Software Foundation.
13c29cfa6d3e3edbbf4688a9b95a5b193d4f1c2575Yauhen Kharuzhy*/
14c29cfa6d3e3edbbf4688a9b95a5b193d4f1c2575Yauhen Kharuzhy
15c29cfa6d3e3edbbf4688a9b95a5b193d4f1c2575Yauhen Kharuzhy#include <linux/kernel.h>
16c29cfa6d3e3edbbf4688a9b95a5b193d4f1c2575Yauhen Kharuzhy#include <linux/types.h>
17c29cfa6d3e3edbbf4688a9b95a5b193d4f1c2575Yauhen Kharuzhy#include <linux/interrupt.h>
18c29cfa6d3e3edbbf4688a9b95a5b193d4f1c2575Yauhen Kharuzhy#include <linux/platform_device.h>
19c29cfa6d3e3edbbf4688a9b95a5b193d4f1c2575Yauhen Kharuzhy#include <linux/io.h>
20c29cfa6d3e3edbbf4688a9b95a5b193d4f1c2575Yauhen Kharuzhy#include <linux/gpio.h>
21c29cfa6d3e3edbbf4688a9b95a5b193d4f1c2575Yauhen Kharuzhy
22c29cfa6d3e3edbbf4688a9b95a5b193d4f1c2575Yauhen Kharuzhy#include <mach/regs-gpio.h>
23b0161caa72b6ff60f82f5531b9b728f3b6d19e1bLinus Walleij#include <mach/gpio-samsung.h>
24c29cfa6d3e3edbbf4688a9b95a5b193d4f1c2575Yauhen Kharuzhy#include <plat/gpio-cfg.h>
25c29cfa6d3e3edbbf4688a9b95a5b193d4f1c2575Yauhen Kharuzhy
26c29cfa6d3e3edbbf4688a9b95a5b193d4f1c2575Yauhen Kharuzhyvoid s3c2416_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width)
27c29cfa6d3e3edbbf4688a9b95a5b193d4f1c2575Yauhen Kharuzhy{
28c29cfa6d3e3edbbf4688a9b95a5b193d4f1c2575Yauhen Kharuzhy	s3c_gpio_cfgrange_nopull(S3C2410_GPE(5), 2 + width, S3C_GPIO_SFN(2));
29c29cfa6d3e3edbbf4688a9b95a5b193d4f1c2575Yauhen Kharuzhy}
30c29cfa6d3e3edbbf4688a9b95a5b193d4f1c2575Yauhen Kharuzhy
31c29cfa6d3e3edbbf4688a9b95a5b193d4f1c2575Yauhen Kharuzhyvoid s3c2416_setup_sdhci1_cfg_gpio(struct platform_device *dev, int width)
32c29cfa6d3e3edbbf4688a9b95a5b193d4f1c2575Yauhen Kharuzhy{
33c29cfa6d3e3edbbf4688a9b95a5b193d4f1c2575Yauhen Kharuzhy	s3c_gpio_cfgrange_nopull(S3C2410_GPL(0), width, S3C_GPIO_SFN(2));
34c29cfa6d3e3edbbf4688a9b95a5b193d4f1c2575Yauhen Kharuzhy	s3c_gpio_cfgrange_nopull(S3C2410_GPL(8), 2, S3C_GPIO_SFN(2));
35c29cfa6d3e3edbbf4688a9b95a5b193d4f1c2575Yauhen Kharuzhy}
36