[Armadeus-commitlog] armadeus branch, master, updated. armadeus-4.1-353-g3157f75
Brought to you by:
sszy
|
From: jorasse <jo...@us...> - 2012-06-08 12:36:46
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 3157f7505ade837f99af5bf2c834a8086797403c (commit)
from ff39fcb4d6d3762a42bfd1fb3e347ff6f89146db (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 3157f7505ade837f99af5bf2c834a8086797403c
Author: Eric Jarrige <eri...@ar...>
Date: Fri Jun 8 14:37:58 2012 +0200
[LINUX] apf28: rework SD/MMC plateform interface
-----------------------------------------------------------------------
Summary of changes:
...1-armadeus-add_apf28dev_baseboard_support.patch | 204 ++++++++++++++------
1 files changed, 146 insertions(+), 58 deletions(-)
diff --git a/patches/linux/2.6.35/451-armadeus-add_apf28dev_baseboard_support.patch b/patches/linux/2.6.35/451-armadeus-add_apf28dev_baseboard_support.patch
index 5c1ea39..7bb35b9 100644
--- a/patches/linux/2.6.35/451-armadeus-add_apf28dev_baseboard_support.patch
+++ b/patches/linux/2.6.35/451-armadeus-add_apf28dev_baseboard_support.patch
@@ -45,7 +45,7 @@ Index: linux-2.6.35.3/arch/arm/mach-mx28/apf28dev.c
===================================================================
--- /dev/null
+++ linux-2.6.35.3/arch/arm/mach-mx28/apf28dev.c
-@@ -0,0 +1,755 @@
+@@ -0,0 +1,843 @@
+/*
+ * Copyright (C) 2012 Armadeus systems
+ *
@@ -77,6 +77,7 @@ Index: linux-2.6.35.3/arch/arm/mach-mx28/apf28dev.c
+#include <linux/gpio_keys.h>
+#include <linux/input.h>
+#include <linux/leds.h>
++#include <linux/mmc/host.h>
+#include <linux/platform_device.h>
+#include <linux/i2c.h>
+
@@ -85,8 +86,9 @@ Index: linux-2.6.35.3/arch/arm/mach-mx28/apf28dev.c
+#include <asm/mach/arch.h>
+
+#include <mach/apf28.h>
-+#include <mach/hardware.h>
+#include <mach/device.h>
++#include <mach/dma.h>
++#include <mach/hardware.h>
+#include <mach/pinctrl.h>
+
+#include <linux/spi/spi.h>
@@ -283,77 +285,79 @@ Index: linux-2.6.35.3/arch/arm/mach-mx28/apf28dev.c
+ },
+
+#endif
++#if defined(CONFIG_MMC_MXS) || defined(CONFIG_MMC_MXS_MODULE)
+ /* SSP0 SD/MMC port pins */
+ {
-+ .name = "SSP0_DATA0",
-+ .id = PINID_SSP0_DATA0,
-+ .fun = PIN_FUN1,
-+ .strength = PAD_4MA,
-+ .voltage = PAD_3_3V,
-+ .pullup = 1,
-+ .drive = 1,
-+ .pull = 1,
++ .name = "SSP0_DATA0",
++ .id = PINID_SSP0_DATA0,
++ .fun = PIN_FUN1,
++ .strength = PAD_8MA,
++ .voltage = PAD_3_3V,
++ .pullup = 1,
++ .drive = 1,
++ .pull = 1,
+ },
+ {
-+ .name = "SSP0_DATA1",
-+ .id = PINID_SSP0_DATA1,
-+ .fun = PIN_FUN1,
-+ .strength = PAD_4MA,
-+ .voltage = PAD_3_3V,
-+ .pullup = 1,
-+ .drive = 1,
-+ .pull = 1,
++ .name = "SSP0_DATA1",
++ .id = PINID_SSP0_DATA1,
++ .fun = PIN_FUN1,
++ .strength = PAD_8MA,
++ .voltage = PAD_3_3V,
++ .pullup = 1,
++ .drive = 1,
++ .pull = 1,
+ },
+ {
-+ .name = "SSP0_DATA2",
-+ .id = PINID_SSP0_DATA2,
-+ .fun = PIN_FUN1,
-+ .strength = PAD_4MA,
-+ .voltage = PAD_3_3V,
-+ .pullup = 1,
-+ .drive = 1,
-+ .pull = 1,
++ .name = "SSP0_DATA2",
++ .id = PINID_SSP0_DATA2,
++ .fun = PIN_FUN1,
++ .strength = PAD_8MA,
++ .voltage = PAD_3_3V,
++ .pullup = 1,
++ .drive = 1,
++ .pull = 1,
+ },
+ {
-+ .name = "SSP0_DATA3",
-+ .id = PINID_SSP0_DATA3,
-+ .fun = PIN_FUN1,
-+ .strength = PAD_4MA,
-+ .voltage = PAD_3_3V,
-+ .pullup = 1,
-+ .drive = 1,
-+ .pull = 1,
++ .name = "SSP0_DATA3",
++ .id = PINID_SSP0_DATA3,
++ .fun = PIN_FUN1,
++ .strength = PAD_8MA,
++ .voltage = PAD_3_3V,
++ .pullup = 1,
++ .drive = 1,
++ .pull = 1,
+ },
+ {
-+ .name = "SSP0_CMD",
-+ .id = PINID_SSP0_CMD,
-+ .fun = PIN_FUN1,
-+ .strength = PAD_4MA,
-+ .voltage = PAD_3_3V,
-+ .pullup = 1,
-+ .drive = 1,
-+ .pull = 1,
++ .name = "SSP0_CMD",
++ .id = PINID_SSP0_CMD,
++ .fun = PIN_FUN1,
++ .strength = PAD_8MA,
++ .voltage = PAD_3_3V,
++ .pullup = 1,
++ .drive = 1,
++ .pull = 1,
+ },
+ {
-+ .name = "SSP0_SCK",
-+ .id = PINID_SSP0_SCK,
-+ .fun = PIN_FUN1,
-+ .strength = PAD_4MA,
-+ .voltage = PAD_3_3V,
-+ .pullup = 0,
-+ .drive = 1,
-+ .pull = 0,
++ .name = "SSP0_SCK",
++ .id = PINID_SSP0_SCK,
++ .fun = PIN_FUN1,
++ .strength = PAD_8MA,
++ .voltage = PAD_3_3V,
++ .pullup = 0,
++ .drive = 1,
++ .pull = 0,
+ },
+ {
-+ .name = "SSP0_DETECT",
-+ .id = PINID_SSP0_DETECT,
-+ .fun = PIN_FUN1,
-+ .strength = PAD_4MA,
-+ .voltage = PAD_3_3V,
-+ .pullup = 0,
-+ .drive = 1,
-+ .pull = 0,
++ .name = "SSP0_DETECT",
++ .id = PINID_SSP0_DETECT,
++ .fun = PIN_FUN1,
++ .strength = PAD_8MA,
++ .voltage = PAD_3_3V,
++ .pullup = 0,
++ .drive = 1,
++ .pull = 0,
+ },
++#endif /* defined(CONFIG_MMC_MXS) || defined(CONFIG_MMC_MXS_MODULE) */
+#ifdef CONFIG_MXS_AUART0_DEVICE_ENABLE
+ {
+ .name = "AUART0.RX",
@@ -772,6 +776,87 @@ Index: linux-2.6.35.3/arch/arm/mach-mx28/apf28dev.c
+}
+#endif /* defined(CONFIG_FEC) || defined(CONFIG_FEC_MODULE) */
+
++#if defined(CONFIG_MMC_MXS) || defined(CONFIG_MMC_MXS_MODULE)
++static void mxs_mmc_cmd_pullup_ssp0(int enable)
++{
++ mxs_set_pullup(PINID_SSP0_CMD, enable, "mmc0_cmd");
++}
++
++static unsigned long mxs_mmc_setclock_ssp0(unsigned long hz)
++{
++ struct clk *ssp = clk_get(NULL, "ssp.0"), *parent;
++
++ if (hz > 1000000)
++ parent = clk_get(NULL, "ref_io.0");
++ else
++ parent = clk_get(NULL, "xtal.0");
++
++ clk_set_parent(ssp, parent);
++ clk_set_rate(ssp, 2 * hz);
++ clk_put(parent);
++ clk_put(ssp);
++
++ return hz;
++}
++
++static struct mxs_mmc_platform_data mmc0_data = {
++ .cmd_pullup = mxs_mmc_cmd_pullup_ssp0,
++ .setclock = mxs_mmc_setclock_ssp0,
++ .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA
++ | MMC_CAP_DATA_DDR,
++ .min_clk = 400000,
++ .max_clk = 48000000,
++ .read_uA = 50000,
++ .write_uA = 70000,
++ .clock_mmc = "ssp.0",
++ .power_mmc = NULL,
++ .fastpath_sz = 1024,
++};
++
++static struct resource mmc0_resource[] = {
++ {
++ .flags = IORESOURCE_MEM,
++ .start = SSP0_PHYS_ADDR,
++ .end = SSP0_PHYS_ADDR + 0x2000 - 1,
++ },
++ {
++ .flags = IORESOURCE_DMA,
++ .start = MXS_DMA_CHANNEL_AHB_APBH_SSP0,
++ .end = MXS_DMA_CHANNEL_AHB_APBH_SSP0,
++ },
++ {
++ .flags = IORESOURCE_IRQ,
++ .start = IRQ_SSP0_DMA,
++ .end = IRQ_SSP0_DMA,
++ },
++ {
++ .flags = IORESOURCE_IRQ,
++ .start = IRQ_SSP0,
++ .end = IRQ_SSP0,
++ },
++};
++
++static void __init apf28dev_init_mmc(void)
++{
++ struct platform_device *pdev;
++
++ if (mxs_get_type(PINID_SSP0_CMD) == PIN_FUN1) {
++ pdev = mxs_get_device("mxs-mmc", 0);
++ if (pdev == NULL || IS_ERR(pdev))
++ return;
++ pdev->resource = mmc0_resource;
++ pdev->num_resources = ARRAY_SIZE(mmc0_resource);
++ pdev->dev.platform_data = &mmc0_data;
++ mxs_add_device(pdev, 2);
++ mxs_get_devices("mxs-mmc"); /* reserve the mxs-mmx ressource */
++ }
++}
++#else
++static void apf28dev_init_mmc(void)
++{
++}
++#endif /* defined(CONFIG_MMC_MXS) || defined(CONFIG_MMC_MXS_MODULE) */
++
+#if defined(CONFIG_SPI_MXS) || defined(CONFIG_SPI_MXS_MODULE)
+static struct spi_board_info spi_board_info[] __initdata = {
+ {
@@ -788,6 +873,9 @@ Index: linux-2.6.35.3/arch/arm/mach-mx28/apf28dev.c
+ printk("--- apf28_baseboard_init %d\n", MXS_PIN_TO_GPIO(PINID_PWM3));
+
+ apf28_init_pin_group(apf28dev_fixed_pins, ARRAY_SIZE(apf28dev_fixed_pins));
++
++ /* some init code that should be done before mx28_device_init() */
++ apf28dev_init_mmc();
+}
+
+void __init apf28_baseboard_devices_init(void)
hooks/post-receive
--
armadeus
|