[Armadeus-commitlog] armadeus branch, master, updated. release-3.2-16-gf847544
Brought to you by:
sszy
|
From: Fabien M <fa...@us...> - 2009-12-06 14:06:18
|
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 f8475442e84c24370ffc8b3155ca667658cdf070 (commit)
via 62750d3901a6baaadb5bf56472ba91ee8275aa27 (commit)
via c4ffd309591c3314894c2eee586cab83c4427342 (commit)
from d7f8d53e731fbc6dda68f3c9339a4eeb3cc48021 (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 f8475442e84c24370ffc8b3155ca667658cdf070
Author: Fabien Marteau <fab...@ar...>
Date: Sun Dec 6 15:05:38 2009 +0100
[LINUX] Add comment to describe patch 339
commit 62750d3901a6baaadb5bf56472ba91ee8275aa27
Author: Fabien Marteau <fab...@ar...>
Date: Sun Dec 6 15:03:03 2009 +0100
[TOOLS] Suppress old named quilt script
commit c4ffd309591c3314894c2eee586cab83c4427342
Author: Fabien Marteau <fab...@ar...>
Date: Sun Dec 6 15:01:52 2009 +0100
[LINUX] Correct patch bug
-----------------------------------------------------------------------
Summary of changes:
.../linux/kernel-patches/{2.6.29.4 => 2.6.29.6} | 0
.../2.6.29.6/339-apf27-armadeus-spidev.patch | 139 --------------------
.../2.6.29/339-apf27-armadeus-spidev.patch | 2 +
scripts/quilt.sh | 118 -----------------
4 files changed, 2 insertions(+), 257 deletions(-)
copy buildroot/target/device/armadeus/linux/kernel-patches/{2.6.29.4 => 2.6.29.6} (100%)
delete mode 100644 buildroot/target/device/armadeus/linux/kernel-patches/2.6.29.6/339-apf27-armadeus-spidev.patch
delete mode 100755 scripts/quilt.sh
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29.4 b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29.6
similarity index 100%
copy from buildroot/target/device/armadeus/linux/kernel-patches/2.6.29.4
copy to buildroot/target/device/armadeus/linux/kernel-patches/2.6.29.6
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29.6/339-apf27-armadeus-spidev.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29.6/339-apf27-armadeus-spidev.patch
deleted file mode 100644
index c72305b..0000000
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29.6/339-apf27-armadeus-spidev.patch
+++ /dev/null
@@ -1,139 +0,0 @@
-Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c
-===================================================================
---- linux-2.6.29.6.orig/arch/arm/mach-mx2/apf27-dev.c 2009-12-04 11:50:37.000000000 +0100
-+++ linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c 2009-12-04 11:58:32.000000000 +0100
-@@ -24,6 +24,7 @@
- #include <linux/mtd/physmap.h>
- #include <asm/mach/flash.h>
- #include <linux/spi/spi.h>
-+#include <linux/spi/spidev.h>
- #include <linux/i2c.h>
- #include <linux/serial.h>
- #include <linux/delay.h>
-@@ -91,6 +92,9 @@
- #ifdef CONFIG_CAN_MCP251X_MODULE
- #define CONFIG_CAN_MCP251X 1
- #endif
-+#ifdef CONFIG_SPI_SPIDEV_MODULE
-+#define CONFIG_SPI_SPIDEV 1
-+#endif
- #ifdef CONFIG_IMX_BACKLIGHT_MODULE
- #define CONFIG_IMX_BACKLIGHT
- #endif
-@@ -368,7 +372,7 @@
- };
-
- static struct spi_imx_master imx_spi1_master_info = {
-- .num_chipselect = 2,
-+ .num_chipselect = 3,
- .enable_dma = 0,
- .init = gpio_spi1_active,
- .exit = gpio_spi1_inactive,
-@@ -512,6 +516,38 @@
- };
- #endif /* CONFIG_CAN_MCP251X */
-
-+#ifdef CONFIG_SPI_SPIDEV
-+
-+#define SPIDEV_CS (GPIO_PORTB | 17)
-+
-+static int spidev_pins[] = {
-+ (SPIDEV_CS | GPIO_OUT | GPIO_GPIO),
-+};
-+
-+static int spidev_init_gpio(void)
-+{
-+ gpio_set_value(SPIDEV_CS, 1);
-+ return mxc_gpio_setup_multiple_pins(spidev_pins, ARRAY_SIZE(spidev_pins), "spidev");
-+}
-+
-+/* Chip select command for spidev */
-+static void spidev_cs(u32 command)
-+{
-+ if (command == SPI_CS_DEASSERT)
-+ gpio_set_value(SPIDEV_CS, 1);
-+ else
-+ gpio_set_value(SPIDEV_CS, 0);
-+}
-+
-+static struct spi_imx_chip spidev_hw = {
-+ .cs_control = spidev_cs,
-+};
-+
-+static struct spidev_platform_data apf27_spidev_config = {
-+ .init = spidev_init_gpio,
-+};
-+
-+#endif /* CONFIG_SPI_SPIDEV */
-
- static struct spi_board_info spi_board_info[] __initdata = {
- #ifdef CONFIG_ARMADEUS_MAX1027
-@@ -550,6 +586,18 @@
- .platform_data = &apf27_mcp251x_config,
- },
- #endif /* CONFIG_CAN_MCP251X */
-+#ifdef CONFIG_SPI_SPIDEV
-+ {
-+ .modalias = "spidev",
-+ .controller_data = &spidev_hw,
-+ .max_speed_hz = 8000000, /* 8MHz */
-+ .bus_num = 1, /* SPI2 */
-+ .mode = SPI_MODE_1,
-+ .chip_select = 2,
-+ .platform_data = &apf27_spidev_config,
-+ },
-+#endif /* CONFIG_SPI_SPIDEV */
-+
- };
-
-
-@@ -962,7 +1010,7 @@
- /* Reserve "fixed" GPIOs */
- tsc2101_init_fixed_gpio();
- #endif
--#if defined (CONFIG_ARMADEUS_MAX1027) || defined (CONFIG_SPI_TSC2102) || defined (CONFIG_CAN_MCP251X)
-+#if defined (CONFIG_ARMADEUS_MAX1027) || defined (CONFIG_SPI_TSC2102) || defined (CONFIG_CAN_MCP251X) || defined(CONFIG_SPI_SPIDEV)
- spi_register_board_info(spi_board_info,
- ARRAY_SIZE(spi_board_info));
- #endif
-Index: linux-2.6.29.6/drivers/spi/spidev.c
-===================================================================
---- linux-2.6.29.6.orig/drivers/spi/spidev.c 2009-12-04 12:03:08.000000000 +0100
-+++ linux-2.6.29.6/drivers/spi/spidev.c 2009-12-04 12:04:43.000000000 +0100
-@@ -558,8 +558,9 @@
-
- static int spidev_probe(struct spi_device *spi)
- {
-+ struct spidev_platform_data *pdata = spi->dev.platform_data;
- struct spidev_data *spidev;
-- int status;
-+ int status;
- unsigned long minor;
-
- /* Allocate driver data */
-@@ -595,6 +596,10 @@
- set_bit(minor, minors);
- list_add(&spidev->device_entry, &device_list);
- }
-+ /* allocate GPIO / IRQ if necessary */
-+ if (pdata->init)
-+ pdata->init();
-+
- mutex_unlock(&device_list_lock);
-
- if (status == 0)
-Index: linux-2.6.29.6/include/linux/spi/spidev.h
-===================================================================
---- linux-2.6.29.6.orig/include/linux/spi/spidev.h 2009-12-04 12:07:09.000000000 +0100
-+++ linux-2.6.29.6/include/linux/spi/spidev.h 2009-12-04 12:07:34.000000000 +0100
-@@ -101,6 +101,10 @@
- */
- };
-
-+struct spidev_platform_data {
-+ int (*init)(void);
-+};
-+
- /* not all platforms use <asm-generic/ioctl.h> or _IOC_TYPECHECK() ... */
- #define SPI_MSGSIZE(N) \
- ((((N)*(sizeof (struct spi_ioc_transfer))) < (1 << _IOC_SIZEBITS)) \
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/339-apf27-armadeus-spidev.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/339-apf27-armadeus-spidev.patch
index 9531530..b28a1db 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/339-apf27-armadeus-spidev.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/339-apf27-armadeus-spidev.patch
@@ -1,3 +1,5 @@
+Correct some bugs in spidev devices, and adjust number of chipselect for apf27Dev spi1
+
Signed-off-by: Fabien Marteau <fab...@ar...>
Signed-off-by: Gwenhaël Goavec-Merou <gw...@tr...>
---
diff --git a/scripts/quilt.sh b/scripts/quilt.sh
deleted file mode 100755
index f61d9a8..0000000
--- a/scripts/quilt.sh
+++ /dev/null
@@ -1,118 +0,0 @@
-#!/bin/bash
-#
-# "quiltifies" Linux or Buildroot
-#
-
-answer=""
-
-# $1: thing to ask, $* possibilities. Will fill answer variable.
-ask_user()
-{
- echo
- echo -e "--- "$1
- shift
- n=1
- while [ "$1" != "" ]; do
- echo " $n] "$1
- shift
- let n=n+1
- done
- read -p "> " answer
-}
-
-
-# Get useful envt variables
-make shell_env
-. armadeus_env.sh
-
-if [ "$1" != "export" ]; then
- ask_user "What do you want to quiltify today ? ;-)" "Linux (default)" "Buildroot"
-fi
-if [ "$1" == "export" ]; then
- ask_user "What kind of quilt patches do you want to export ?" "Linux (default)" "Buildroot"
-fi
-
-if [ "$answer" == "2" ]; then
- QUILT_TARGET_NAME="Buildroot"
- QUILT_MAKEFILE_TARGET="buildroot-unpacked"
- QUILT_TARGET_DIR=$ARMADEUS_BUILDROOT_DIR
- QUILT_TARGET_PATCH_DIR=$ARMADEUS_BUILDROOT_DIR/../patches/buildroot
-else
- QUILT_TARGET_NAME="Linux kernel"
- QUILT_MAKEFILE_TARGET="linux26-unpacked"
- QUILT_TARGET_DIR=$ARMADEUS_LINUX_DIR
- QUILT_TARGET_PATCH_DIR=$ARMADEUS_LINUX_PATCH_DIR
-fi
-
-if [ "$1" != "export" ]; then
- echo -e "\nThis script is going to rebuilt a quiltified "$QUILT_TARGET_NAME" in the current view..."
-fi
-
-if [ "$1" == "export" ]; then
- echo "Exporting your work (patches) from $QUILT_TARGET_DIR/patches/ to $QUILT_TARGET_PATCH_DIR"
- cp -f $QUILT_TARGET_DIR/patches/*.patch $QUILT_TARGET_PATCH_DIR
- echo -e "\n--- You can now check your work before commiting --> $QUILT_TARGET_PATCH_DIR/ \n"
- exit 0
-fi
-
-
-# else import patches:
-
-# Update repository
-ask_user "Update (pull) your local GIT repository (y/N) ?"
-if [ "$answer" == "y" ] || [ "$answer" == "yes" ]; then
- git pull
-fi
-
-# Move or delete current XXX dir
-if [ "$QUILT_TARGET_NAME" != "Buildroot" ]; then
- ask_user "Rename or delete the current $QUILT_TARGET_NAME directory: $QUILT_TARGET_DIR \n?? (R/d)"
- EXT=`date +%Y_%M_%d_%H%m`
- if [ "$answer" == "d" ]; then
- echo "Deleting current $QUILT_TARGET_NAME dir"
- rm -rf $QUILT_TARGET_DIR
- else
- echo "Renaming $QUILT_TARGET_DIR"
- echo " to " "$QUILT_TARGET_DIR"."$EXT"
- mv $QUILT_TARGET_DIR "$QUILT_TARGET_DIR"."$EXT"
- fi
-else # For Buildroot
- rm $QUILT_TARGET_DIR/.patched
- rm $QUILT_TARGET_DIR/.unpacked
-fi
-
-# Get XXX unpacked sources
-make $QUILT_MAKEFILE_TARGET
-if [ "$?" != 0 ]; then
- echo "Failed to get sources, please check your view !!"
-fi
-
-# Import patches
-pushd $QUILT_TARGET_DIR
-mkdir patches
-PATCHES=`ls -ar $QUILT_TARGET_PATCH_DIR/*.patch`
-for patch in $PATCHES; do
- quilt import $patch
-done
-quilt push -a
-if [ "$?" != 0 ]; then
- echo "Please correct that"
- exit 1
-fi
-quilt series >> .applied_patches_list
-
-touch .unpacked
-touch .patched
-touch .patched.arch
-touch .patched.board
-popd
-
-echo -e "\n--- Your "$QUILT_TARGET_NAME" is \"quiltified\" ! I will now compile it...\n"
-sleep 2
-make
-
-echo -e "\n--- Your can now go to $QUILT_TARGET_DIR\nHappy hacking ! ;-)\n"
-echo -e "__ Don't forget to do a \"$0 export\" after your modifications __\n"
-
-exit 0
-
hooks/post-receive
--
armadeus
|