Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 212546
b: refs/heads/master
c: 203a073
h: refs/heads/master
v: v3
  • Loading branch information
Wolfram Sang authored and Sascha Hauer committed Oct 11, 2010
1 parent 1100cc9 commit 8bd3f90
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 54dc3f4674fbaf362d6e969904bfcece3cfebef1
refs/heads/master: 203a0734709779fa40552cd9bb7c4dd325b5131f
3 changes: 3 additions & 0 deletions trunk/arch/arm/plat-mxc/devices/Kconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
config IMX_HAVE_PLATFORM_ESDHC
bool

config IMX_HAVE_PLATFORM_FLEXCAN
select HAVE_CAN_FLEXCAN
bool
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/plat-mxc/devices/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
obj-$(CONFIG_IMX_HAVE_PLATFORM_ESDHC) += platform-esdhc.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_FLEXCAN) += platform-flexcan.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_I2C) += platform-imx-i2c.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_SSI) += platform-imx-ssi.o
Expand Down
31 changes: 31 additions & 0 deletions trunk/arch/arm/plat-mxc/devices/platform-esdhc.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* Copyright (C) 2010 Pengutronix, Wolfram Sang <w.sang@pengutronix.de>
*
* 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.
*/

#include <mach/devices-common.h>
#include <mach/esdhc.h>

struct platform_device *__init imx_add_esdhc(int id,
resource_size_t iobase, resource_size_t iosize,
resource_size_t irq,
const struct esdhc_platform_data *pdata)
{
struct resource res[] = {
{
.start = iobase,
.end = iobase + iosize - 1,
.flags = IORESOURCE_MEM,
}, {
.start = irq,
.end = irq,
.flags = IORESOURCE_IRQ,
},
};

return imx_add_platform_device("sdhci-esdhc-imx", id, res,
ARRAY_SIZE(res), pdata, sizeof(*pdata));
}
6 changes: 6 additions & 0 deletions trunk/arch/arm/plat-mxc/include/mach/devices-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,9 @@ struct imx_spi_imx_data {
struct platform_device *__init imx_add_spi_imx(
const struct imx_spi_imx_data *data,
const struct spi_imx_master *pdata);

#include <mach/esdhc.h>
struct platform_device *__init imx_add_esdhc(int id,
resource_size_t iobase, resource_size_t iosize,
resource_size_t irq,
const struct esdhc_platform_data *pdata);
16 changes: 16 additions & 0 deletions trunk/arch/arm/plat-mxc/include/mach/esdhc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Copyright 2010 Wolfram Sang <w.sang@pengutronix.de>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; version 2
* of the License.
*/

#ifndef __ASM_ARCH_IMX_ESDHC_H
#define __ASM_ARCH_IMX_ESDHC_H

struct esdhc_platform_data {
unsigned int wp_gpio; /* write protect pin */
};
#endif /* __ASM_ARCH_IMX_ESDHC_H */

0 comments on commit 8bd3f90

Please sign in to comment.