mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-05 10:04:12 +08:00
99c6bcf46d
More multiplatform enablement for ARM platforms. The ones converted in this branch are: - bcm2835 - cns3xxx - sirf - nomadik - msx - spear - tegra - ux500 We're getting close to having most of them converted! One of the larger platforms remaining is Samsung Exynos, and there are a bunch of supporting patches in this merge window for it. There was a patch in this branch to a early version of multiplatform conversion, but it ended up being reverted due to need of more bake time. The revert commit is part of the branch since it would have required rebasing multiple dependent branches and they were stable by then. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAABAgAGBQJRgg99AAoJEIwa5zzehBx3n78P/j0w/8v+F4dM29ba5M/tqbFI e3wpeFykZ/HJH+FFIEYfIablpfHsLB0LEMh0dZmwHESFC6eR0RfGL2jOkpfcH9Ne 7B/JIFN4l1iwqqKCXf+QbYL6e8YFxlJkg6BIB4KhNgliQoO/ASP/8EbcgROYuxmN KPVdw9laUCCvb5Ogh2NWVAkBHhVGAEiqK20r4TQz8alI8RUmMleWM3o+wLBWVhOO d3gtYSfuFSbrJfbpKSdycLizoV/NekdOC1A9Ov9YuOdw8DzNbrThCRQtu0tIUgxN JjfnGlEJLsJS9SESfr8SYWxTuhe/lB2dGqjQPvRtl2HGBhbtTlnWfQ0k2ZHdeJuD J50SLrGA2gN9E5PlHJXjYk8uhhGIq8bNTJ//CtDkfKTq1D7PuHVEpEctsaz3BBbM U+x9zP2v4FB+yrZu8w+gkQY/wDgHsxj08mT6BK0+l8ePdyQV22CvwmM5XlJFI03x 5J0nLYiYfef+ZN9rGgVrQbn+yv+IEkE4DmeiscjeVJE5LVdVrDpYGfx7UA7V0UA7 i3KRVpNKuy1v7GJDnKlEBPkmB+vgXTRXUPDVCuC4n0Hi5PYj4es1gY6AoXGF90wm vtKxGr/2XDLP7Ro+m0OXMttSgQShnmbrbOngfkWcFwUmG7cB3SSUUOGKM+2LNnXM MJTqVhPjkZ2GYBi/J6S/ =4hSo -----END PGP SIGNATURE----- Merge tag 'multiplatform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC multiplatform updates from Olof Johansson: "More multiplatform enablement for ARM platforms. The ones converted in this branch are: - bcm2835 - cns3xxx - sirf - nomadik - msx - spear - tegra - ux500 We're getting close to having most of them converted! One of the larger platforms remaining is Samsung Exynos, and there are a bunch of supporting patches in this merge window for it. There was a patch in this branch to a early version of multiplatform conversion, but it ended up being reverted due to need of more bake time. The revert commit is part of the branch since it would have required rebasing multiple dependent branches and they were stable by then" * tag 'multiplatform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (70 commits) mmc: sdhci-s3c: Fix operation on non-single image Samsung platforms clocksource: nomadik-mtu: fix up clocksource/timer Revert "ARM: exynos: enable multiplatform support" ARM: SPEAr13xx: Fix typo "ARCH_HAVE_CPUFREQ" ARM: exynos: enable multiplatform support rtc: s3c: make header file local mtd: onenand/samsung: make regs-onenand.h file local thermal/exynos: remove unnecessary header inclusions mmc: sdhci-s3c: remove platform dependencies ARM: samsung: move mfc device definition to s5p-dev-mfc.c ARM: exynos: move debug-macro.S to include/debug/ ARM: exynos: prepare for sparse IRQ ARM: exynos: introduce EXYNOS_ATAGS symbol ARM: tegra: build assembly files with -march=armv7-a ARM: Push selects for TWD/SCU into machine entries ARM: ux500: build hotplug.o for ARMv7-a ARM: ux500: move to multiplatform ARM: ux500: make remaining headers local ARM: ux500: make irqs.h local to platform ARM: ux500: get rid of <mach/[hardware|db8500-regs].h> ...
329 lines
9.2 KiB
C
329 lines
9.2 KiB
C
/* linux/arch/arm/plat-samsung/include/plat/sdhci.h
|
|
*
|
|
* Copyright (c) 2011 Samsung Electronics Co., Ltd.
|
|
* http://www.samsung.com
|
|
*
|
|
* Copyright 2008 Openmoko, Inc.
|
|
* Copyright 2008 Simtec Electronics
|
|
* http://armlinux.simtec.co.uk/
|
|
* Ben Dooks <ben@simtec.co.uk>
|
|
*
|
|
* S3C Platform - SDHCI (HSMMC) platform data definitions
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*/
|
|
|
|
#ifndef __PLAT_S3C_SDHCI_H
|
|
#define __PLAT_S3C_SDHCI_H __FILE__
|
|
|
|
#include <linux/platform_data/mmc-sdhci-s3c.h>
|
|
#include <plat/devs.h>
|
|
|
|
/* s3c_sdhci_set_platdata() - common helper for setting SDHCI platform data
|
|
* @pd: The default platform data for this device.
|
|
* @set: Pointer to the platform data to fill in.
|
|
*/
|
|
extern void s3c_sdhci_set_platdata(struct s3c_sdhci_platdata *pd,
|
|
struct s3c_sdhci_platdata *set);
|
|
|
|
/**
|
|
* s3c_sdhci0_set_platdata - Set platform data for S3C SDHCI device.
|
|
* @pd: Platform data to register to device.
|
|
*
|
|
* Register the given platform data for use withe S3C SDHCI device.
|
|
* The call will copy the platform data, so the board definitions can
|
|
* make the structure itself __initdata.
|
|
*/
|
|
extern void s3c_sdhci0_set_platdata(struct s3c_sdhci_platdata *pd);
|
|
extern void s3c_sdhci1_set_platdata(struct s3c_sdhci_platdata *pd);
|
|
extern void s3c_sdhci2_set_platdata(struct s3c_sdhci_platdata *pd);
|
|
extern void s3c_sdhci3_set_platdata(struct s3c_sdhci_platdata *pd);
|
|
|
|
/* Default platform data, exported so that per-cpu initialisation can
|
|
* set the correct one when there are more than one cpu type selected.
|
|
*/
|
|
|
|
extern struct s3c_sdhci_platdata s3c_hsmmc0_def_platdata;
|
|
extern struct s3c_sdhci_platdata s3c_hsmmc1_def_platdata;
|
|
extern struct s3c_sdhci_platdata s3c_hsmmc2_def_platdata;
|
|
extern struct s3c_sdhci_platdata s3c_hsmmc3_def_platdata;
|
|
|
|
/* Helper function availability */
|
|
|
|
extern void s3c2416_setup_sdhci0_cfg_gpio(struct platform_device *, int w);
|
|
extern void s3c2416_setup_sdhci1_cfg_gpio(struct platform_device *, int w);
|
|
extern void s3c64xx_setup_sdhci0_cfg_gpio(struct platform_device *, int w);
|
|
extern void s3c64xx_setup_sdhci1_cfg_gpio(struct platform_device *, int w);
|
|
extern void s5pc100_setup_sdhci0_cfg_gpio(struct platform_device *, int w);
|
|
extern void s5pc100_setup_sdhci1_cfg_gpio(struct platform_device *, int w);
|
|
extern void s5pc100_setup_sdhci2_cfg_gpio(struct platform_device *, int w);
|
|
extern void s3c64xx_setup_sdhci2_cfg_gpio(struct platform_device *, int w);
|
|
extern void s5pv210_setup_sdhci0_cfg_gpio(struct platform_device *, int w);
|
|
extern void s5pv210_setup_sdhci1_cfg_gpio(struct platform_device *, int w);
|
|
extern void s5pv210_setup_sdhci2_cfg_gpio(struct platform_device *, int w);
|
|
extern void s5pv210_setup_sdhci3_cfg_gpio(struct platform_device *, int w);
|
|
extern void exynos4_setup_sdhci0_cfg_gpio(struct platform_device *, int w);
|
|
extern void exynos4_setup_sdhci1_cfg_gpio(struct platform_device *, int w);
|
|
extern void exynos4_setup_sdhci2_cfg_gpio(struct platform_device *, int w);
|
|
extern void exynos4_setup_sdhci3_cfg_gpio(struct platform_device *, int w);
|
|
extern void s5p64x0_setup_sdhci0_cfg_gpio(struct platform_device *, int w);
|
|
extern void s5p64x0_setup_sdhci1_cfg_gpio(struct platform_device *, int w);
|
|
extern void s5p6440_setup_sdhci2_cfg_gpio(struct platform_device *, int w);
|
|
extern void s5p6450_setup_sdhci2_cfg_gpio(struct platform_device *, int w);
|
|
|
|
/* S3C2416 SDHCI setup */
|
|
|
|
#ifdef CONFIG_S3C2416_SETUP_SDHCI
|
|
static inline void s3c2416_default_sdhci0(void)
|
|
{
|
|
#ifdef CONFIG_S3C_DEV_HSMMC
|
|
s3c_hsmmc0_def_platdata.cfg_gpio = s3c2416_setup_sdhci0_cfg_gpio;
|
|
#endif /* CONFIG_S3C_DEV_HSMMC */
|
|
}
|
|
|
|
static inline void s3c2416_default_sdhci1(void)
|
|
{
|
|
#ifdef CONFIG_S3C_DEV_HSMMC1
|
|
s3c_hsmmc1_def_platdata.cfg_gpio = s3c2416_setup_sdhci1_cfg_gpio;
|
|
#endif /* CONFIG_S3C_DEV_HSMMC1 */
|
|
}
|
|
|
|
#else
|
|
static inline void s3c2416_default_sdhci0(void) { }
|
|
static inline void s3c2416_default_sdhci1(void) { }
|
|
|
|
#endif /* CONFIG_S3C2416_SETUP_SDHCI */
|
|
|
|
/* S3C64XX SDHCI setup */
|
|
|
|
#ifdef CONFIG_S3C64XX_SETUP_SDHCI
|
|
static inline void s3c6400_default_sdhci0(void)
|
|
{
|
|
#ifdef CONFIG_S3C_DEV_HSMMC
|
|
s3c_hsmmc0_def_platdata.cfg_gpio = s3c64xx_setup_sdhci0_cfg_gpio;
|
|
#endif
|
|
}
|
|
|
|
static inline void s3c6400_default_sdhci1(void)
|
|
{
|
|
#ifdef CONFIG_S3C_DEV_HSMMC1
|
|
s3c_hsmmc1_def_platdata.cfg_gpio = s3c64xx_setup_sdhci1_cfg_gpio;
|
|
#endif
|
|
}
|
|
|
|
static inline void s3c6400_default_sdhci2(void)
|
|
{
|
|
#ifdef CONFIG_S3C_DEV_HSMMC2
|
|
s3c_hsmmc2_def_platdata.cfg_gpio = s3c64xx_setup_sdhci2_cfg_gpio;
|
|
#endif
|
|
}
|
|
|
|
static inline void s3c6410_default_sdhci0(void)
|
|
{
|
|
#ifdef CONFIG_S3C_DEV_HSMMC
|
|
s3c_hsmmc0_def_platdata.cfg_gpio = s3c64xx_setup_sdhci0_cfg_gpio;
|
|
#endif
|
|
}
|
|
|
|
static inline void s3c6410_default_sdhci1(void)
|
|
{
|
|
#ifdef CONFIG_S3C_DEV_HSMMC1
|
|
s3c_hsmmc1_def_platdata.cfg_gpio = s3c64xx_setup_sdhci1_cfg_gpio;
|
|
#endif
|
|
}
|
|
|
|
static inline void s3c6410_default_sdhci2(void)
|
|
{
|
|
#ifdef CONFIG_S3C_DEV_HSMMC2
|
|
s3c_hsmmc2_def_platdata.cfg_gpio = s3c64xx_setup_sdhci2_cfg_gpio;
|
|
#endif
|
|
}
|
|
|
|
#else
|
|
static inline void s3c6410_default_sdhci0(void) { }
|
|
static inline void s3c6410_default_sdhci1(void) { }
|
|
static inline void s3c6410_default_sdhci2(void) { }
|
|
static inline void s3c6400_default_sdhci0(void) { }
|
|
static inline void s3c6400_default_sdhci1(void) { }
|
|
static inline void s3c6400_default_sdhci2(void) { }
|
|
|
|
#endif /* CONFIG_S3C64XX_SETUP_SDHCI */
|
|
|
|
/* S5P64X0 SDHCI setup */
|
|
|
|
#ifdef CONFIG_S5P64X0_SETUP_SDHCI_GPIO
|
|
static inline void s5p64x0_default_sdhci0(void)
|
|
{
|
|
#ifdef CONFIG_S3C_DEV_HSMMC
|
|
s3c_hsmmc0_def_platdata.cfg_gpio = s5p64x0_setup_sdhci0_cfg_gpio;
|
|
#endif
|
|
}
|
|
|
|
static inline void s5p64x0_default_sdhci1(void)
|
|
{
|
|
#ifdef CONFIG_S3C_DEV_HSMMC1
|
|
s3c_hsmmc1_def_platdata.cfg_gpio = s5p64x0_setup_sdhci1_cfg_gpio;
|
|
#endif
|
|
}
|
|
|
|
static inline void s5p6440_default_sdhci2(void)
|
|
{
|
|
#ifdef CONFIG_S3C_DEV_HSMMC2
|
|
s3c_hsmmc2_def_platdata.cfg_gpio = s5p6440_setup_sdhci2_cfg_gpio;
|
|
#endif
|
|
}
|
|
|
|
static inline void s5p6450_default_sdhci2(void)
|
|
{
|
|
#ifdef CONFIG_S3C_DEV_HSMMC2
|
|
s3c_hsmmc2_def_platdata.cfg_gpio = s5p6450_setup_sdhci2_cfg_gpio;
|
|
#endif
|
|
}
|
|
|
|
#else
|
|
static inline void s5p64x0_default_sdhci0(void) { }
|
|
static inline void s5p64x0_default_sdhci1(void) { }
|
|
static inline void s5p6440_default_sdhci2(void) { }
|
|
static inline void s5p6450_default_sdhci2(void) { }
|
|
|
|
#endif /* CONFIG_S5P64X0_SETUP_SDHCI_GPIO */
|
|
|
|
/* S5PC100 SDHCI setup */
|
|
|
|
#ifdef CONFIG_S5PC100_SETUP_SDHCI
|
|
static inline void s5pc100_default_sdhci0(void)
|
|
{
|
|
#ifdef CONFIG_S3C_DEV_HSMMC
|
|
s3c_hsmmc0_def_platdata.cfg_gpio = s5pc100_setup_sdhci0_cfg_gpio;
|
|
#endif
|
|
}
|
|
|
|
static inline void s5pc100_default_sdhci1(void)
|
|
{
|
|
#ifdef CONFIG_S3C_DEV_HSMMC1
|
|
s3c_hsmmc1_def_platdata.cfg_gpio = s5pc100_setup_sdhci1_cfg_gpio;
|
|
#endif
|
|
}
|
|
|
|
static inline void s5pc100_default_sdhci2(void)
|
|
{
|
|
#ifdef CONFIG_S3C_DEV_HSMMC2
|
|
s3c_hsmmc2_def_platdata.cfg_gpio = s5pc100_setup_sdhci2_cfg_gpio;
|
|
#endif
|
|
}
|
|
|
|
#else
|
|
static inline void s5pc100_default_sdhci0(void) { }
|
|
static inline void s5pc100_default_sdhci1(void) { }
|
|
static inline void s5pc100_default_sdhci2(void) { }
|
|
|
|
#endif /* CONFIG_S5PC100_SETUP_SDHCI */
|
|
|
|
/* S5PV210 SDHCI setup */
|
|
|
|
#ifdef CONFIG_S5PV210_SETUP_SDHCI
|
|
static inline void s5pv210_default_sdhci0(void)
|
|
{
|
|
#ifdef CONFIG_S3C_DEV_HSMMC
|
|
s3c_hsmmc0_def_platdata.cfg_gpio = s5pv210_setup_sdhci0_cfg_gpio;
|
|
#endif
|
|
}
|
|
|
|
static inline void s5pv210_default_sdhci1(void)
|
|
{
|
|
#ifdef CONFIG_S3C_DEV_HSMMC1
|
|
s3c_hsmmc1_def_platdata.cfg_gpio = s5pv210_setup_sdhci1_cfg_gpio;
|
|
#endif
|
|
}
|
|
|
|
static inline void s5pv210_default_sdhci2(void)
|
|
{
|
|
#ifdef CONFIG_S3C_DEV_HSMMC2
|
|
s3c_hsmmc2_def_platdata.cfg_gpio = s5pv210_setup_sdhci2_cfg_gpio;
|
|
#endif
|
|
}
|
|
|
|
static inline void s5pv210_default_sdhci3(void)
|
|
{
|
|
#ifdef CONFIG_S3C_DEV_HSMMC3
|
|
s3c_hsmmc3_def_platdata.cfg_gpio = s5pv210_setup_sdhci3_cfg_gpio;
|
|
#endif
|
|
}
|
|
|
|
#else
|
|
static inline void s5pv210_default_sdhci0(void) { }
|
|
static inline void s5pv210_default_sdhci1(void) { }
|
|
static inline void s5pv210_default_sdhci2(void) { }
|
|
static inline void s5pv210_default_sdhci3(void) { }
|
|
|
|
#endif /* CONFIG_S5PV210_SETUP_SDHCI */
|
|
|
|
/* EXYNOS4 SDHCI setup */
|
|
#ifdef CONFIG_EXYNOS4_SETUP_SDHCI
|
|
static inline void exynos4_default_sdhci0(void)
|
|
{
|
|
#ifdef CONFIG_S3C_DEV_HSMMC
|
|
s3c_hsmmc0_def_platdata.cfg_gpio = exynos4_setup_sdhci0_cfg_gpio;
|
|
#endif
|
|
}
|
|
|
|
static inline void exynos4_default_sdhci1(void)
|
|
{
|
|
#ifdef CONFIG_S3C_DEV_HSMMC1
|
|
s3c_hsmmc1_def_platdata.cfg_gpio = exynos4_setup_sdhci1_cfg_gpio;
|
|
#endif
|
|
}
|
|
|
|
static inline void exynos4_default_sdhci2(void)
|
|
{
|
|
#ifdef CONFIG_S3C_DEV_HSMMC2
|
|
s3c_hsmmc2_def_platdata.cfg_gpio = exynos4_setup_sdhci2_cfg_gpio;
|
|
#endif
|
|
}
|
|
|
|
static inline void exynos4_default_sdhci3(void)
|
|
{
|
|
#ifdef CONFIG_S3C_DEV_HSMMC3
|
|
s3c_hsmmc3_def_platdata.cfg_gpio = exynos4_setup_sdhci3_cfg_gpio;
|
|
#endif
|
|
}
|
|
|
|
#else
|
|
static inline void exynos4_default_sdhci0(void) { }
|
|
static inline void exynos4_default_sdhci1(void) { }
|
|
static inline void exynos4_default_sdhci2(void) { }
|
|
static inline void exynos4_default_sdhci3(void) { }
|
|
|
|
#endif /* CONFIG_EXYNOS4_SETUP_SDHCI */
|
|
|
|
static inline void s3c_sdhci_setname(int id, char *name)
|
|
{
|
|
switch (id) {
|
|
#ifdef CONFIG_S3C_DEV_HSMMC
|
|
case 0:
|
|
s3c_device_hsmmc0.name = name;
|
|
break;
|
|
#endif
|
|
#ifdef CONFIG_S3C_DEV_HSMMC1
|
|
case 1:
|
|
s3c_device_hsmmc1.name = name;
|
|
break;
|
|
#endif
|
|
#ifdef CONFIG_S3C_DEV_HSMMC2
|
|
case 2:
|
|
s3c_device_hsmmc2.name = name;
|
|
break;
|
|
#endif
|
|
#ifdef CONFIG_S3C_DEV_HSMMC3
|
|
case 3:
|
|
s3c_device_hsmmc3.name = name;
|
|
break;
|
|
#endif
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
#endif /* __PLAT_S3C_SDHCI_H */
|