armadeus-commitlog Mailing List for armadeus (Page 70)
Brought to you by:
sszy
You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(43) |
Feb
(8) |
Mar
(7) |
Apr
(8) |
May
(14) |
Jun
(6) |
Jul
(4) |
Aug
(17) |
Sep
(18) |
Oct
(19) |
Nov
(52) |
Dec
(30) |
| 2008 |
Jan
(6) |
Feb
(6) |
Mar
(15) |
Apr
(22) |
May
(13) |
Jun
(11) |
Jul
(41) |
Aug
(10) |
Sep
(14) |
Oct
(21) |
Nov
(4) |
Dec
(66) |
| 2009 |
Jan
(67) |
Feb
(57) |
Mar
(90) |
Apr
(54) |
May
(64) |
Jun
(76) |
Jul
(14) |
Aug
(18) |
Sep
(18) |
Oct
(20) |
Nov
(15) |
Dec
(36) |
| 2010 |
Jan
(28) |
Feb
(25) |
Mar
(32) |
Apr
(23) |
May
(22) |
Jun
(62) |
Jul
(36) |
Aug
(16) |
Sep
(12) |
Oct
(20) |
Nov
(44) |
Dec
(25) |
| 2011 |
Jan
(36) |
Feb
(49) |
Mar
(28) |
Apr
(38) |
May
(26) |
Jun
(52) |
Jul
(33) |
Aug
(32) |
Sep
(19) |
Oct
(26) |
Nov
(13) |
Dec
(32) |
| 2012 |
Jan
(38) |
Feb
(34) |
Mar
(91) |
Apr
(35) |
May
(31) |
Jun
(72) |
Jul
(23) |
Aug
(13) |
Sep
(33) |
Oct
(47) |
Nov
(18) |
Dec
(22) |
| 2013 |
Jan
(31) |
Feb
(22) |
Mar
(26) |
Apr
(11) |
May
(38) |
Jun
(15) |
Jul
(37) |
Aug
(68) |
Sep
(34) |
Oct
(11) |
Nov
(26) |
Dec
(31) |
| 2014 |
Jan
(60) |
Feb
(55) |
Mar
(21) |
Apr
(31) |
May
(17) |
Jun
(35) |
Jul
(24) |
Aug
(17) |
Sep
(11) |
Oct
(23) |
Nov
(10) |
Dec
(23) |
| 2015 |
Jan
(15) |
Feb
(34) |
Mar
(46) |
Apr
(23) |
May
(12) |
Jun
(14) |
Jul
(18) |
Aug
(22) |
Sep
(6) |
Oct
(2) |
Nov
(1) |
Dec
(6) |
| 2016 |
Jan
(5) |
Feb
(7) |
Mar
(10) |
Apr
(10) |
May
(17) |
Jun
(6) |
Jul
(4) |
Aug
(6) |
Sep
(22) |
Oct
(8) |
Nov
(9) |
Dec
(5) |
| 2017 |
Jan
(11) |
Feb
(12) |
Mar
(27) |
Apr
(9) |
May
(1) |
Jun
(5) |
Jul
(11) |
Aug
(10) |
Sep
(6) |
Oct
(10) |
Nov
(4) |
Dec
(6) |
| 2018 |
Jan
(6) |
Feb
(13) |
Mar
(9) |
Apr
(7) |
May
(10) |
Jun
(9) |
Jul
(21) |
Aug
(13) |
Sep
(10) |
Oct
(4) |
Nov
(6) |
Dec
(1) |
| 2019 |
Jan
(6) |
Feb
(2) |
Mar
(5) |
Apr
(6) |
May
(19) |
Jun
(14) |
Jul
(18) |
Aug
(3) |
Sep
(5) |
Oct
(7) |
Nov
(8) |
Dec
(4) |
| 2020 |
Jan
(10) |
Feb
(3) |
Mar
(9) |
Apr
(7) |
May
(2) |
Jun
(18) |
Jul
(3) |
Aug
|
Sep
|
Oct
(7) |
Nov
|
Dec
(1) |
| 2021 |
Jan
(9) |
Feb
(6) |
Mar
(4) |
Apr
(11) |
May
(7) |
Jun
(5) |
Jul
(2) |
Aug
(4) |
Sep
(10) |
Oct
(9) |
Nov
(5) |
Dec
|
| 2022 |
Jan
(2) |
Feb
(12) |
Mar
(3) |
Apr
(5) |
May
(1) |
Jun
(3) |
Jul
(2) |
Aug
(1) |
Sep
(4) |
Oct
(4) |
Nov
(1) |
Dec
(3) |
| 2023 |
Jan
(5) |
Feb
(3) |
Mar
(3) |
Apr
(2) |
May
(1) |
Jun
(3) |
Jul
(3) |
Aug
(2) |
Sep
(1) |
Oct
(1) |
Nov
|
Dec
(4) |
| 2024 |
Jan
(2) |
Feb
(3) |
Mar
(8) |
Apr
(4) |
May
(1) |
Jun
(13) |
Jul
(7) |
Aug
(1) |
Sep
(6) |
Oct
(5) |
Nov
(11) |
Dec
(7) |
| 2025 |
Jan
(3) |
Feb
(1) |
Mar
(6) |
Apr
(4) |
May
(4) |
Jun
(1) |
Jul
(1) |
Aug
(7) |
Sep
(4) |
Oct
(4) |
Nov
(4) |
Dec
(1) |
| 2026 |
Jan
(3) |
Feb
(7) |
Mar
(3) |
Apr
(1) |
May
(6) |
Jun
(3) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Julien B a. A. <ar...@us...> - 2012-09-29 21:10:38
|
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 70a083a7bda60246429edf4b607c1ff13854b7bf (commit)
from a4081835c09d1913c189a8f87fb430a3e75a6af0 (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 70a083a7bda60246429edf4b607c1ff13854b7bf
Author: Julien Boibessot <jul...@ar...>
Date: Sat Sep 29 23:07:55 2012 +0200
[LINUX] Removes useless 3.5 patches
-----------------------------------------------------------------------
Summary of changes:
...406-armadeus-mx28-add_SPI_support_kconfig.patch | 12 -
...P_register_definitions_into_separate_file.patch | 254 ----------
...x28-mmc_spi_Rename_IMX2x_MMC_to_IMX2x_SSP.patch | 116 -----
...mmc_spi_Add_necessary_bits_into_mxs-spi-h.patch | 95 ----
...Pull_out_parts_shared_between_MMC_and_SPI.patch | 381 ---------------
..._out_the_SSP_clock_configuration_function.patch | 179 -------
...ix-mx28-spi_Add_SPI_driver_for_mx233_mx28.patch | 503 --------------------
...pi_Pull_out_common_DMA_parts_from_MXS_MMC.patch | 318 ------------
...-mx28-spi_Add_DMA_support_into_SPI_driver.patch | 345 --------------
...spi_Add_SSP_SPI_device_tree_documentation.patch | 49 --
...ronix-mx28_Add_SPI_pinmux_into_imx28_dtsi.patch | 72 ---
.../0417-pengutronix-mx28-Add_SPI_ressources.patch | 154 ------
12 files changed, 0 insertions(+), 2478 deletions(-)
delete mode 100644 patches/linux/3.5/0406-armadeus-mx28-add_SPI_support_kconfig.patch
delete mode 100644 patches/linux/3.5/0407-pengutronix-mx28-Move_SSP_register_definitions_into_separate_file.patch
delete mode 100644 patches/linux/3.5/0408-pengutronix-mx28-mmc_spi_Rename_IMX2x_MMC_to_IMX2x_SSP.patch
delete mode 100644 patches/linux/3.5/0409-pengutronix-mx28-mmc_spi_Add_necessary_bits_into_mxs-spi-h.patch
delete mode 100644 patches/linux/3.5/0410-pengutronix-mx28-mmc_spi_Pull_out_parts_shared_between_MMC_and_SPI.patch
delete mode 100644 patches/linux/3.5/0411-pengutronix-mx28-mmc_spi_Pull_out_the_SSP_clock_configuration_function.patch
delete mode 100644 patches/linux/3.5/0412-pengutronix-mx28-spi_Add_SPI_driver_for_mx233_mx28.patch
delete mode 100644 patches/linux/3.5/0413-pengutronix-mx28-mmc_spi_Pull_out_common_DMA_parts_from_MXS_MMC.patch
delete mode 100644 patches/linux/3.5/0414-pengutronix-mx28-spi_Add_DMA_support_into_SPI_driver.patch
delete mode 100644 patches/linux/3.5/0415-pengutronix-mx28-spi_Add_SSP_SPI_device_tree_documentation.patch
delete mode 100644 patches/linux/3.5/0416-pengutronix-mx28_Add_SPI_pinmux_into_imx28_dtsi.patch
delete mode 100644 patches/linux/3.5/0417-pengutronix-mx28-Add_SPI_ressources.patch
diff --git a/patches/linux/3.5/0406-armadeus-mx28-add_SPI_support_kconfig.patch b/patches/linux/3.5/0406-armadeus-mx28-add_SPI_support_kconfig.patch
deleted file mode 100644
index 70ba0f7..0000000
--- a/patches/linux/3.5/0406-armadeus-mx28-add_SPI_support_kconfig.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: linux-3.5/arch/arm/mach-mxs/Kconfig
-===================================================================
---- linux-3.5.orig/arch/arm/mach-mxs/Kconfig
-+++ linux-3.5/arch/arm/mach-mxs/Kconfig
-@@ -10,6 +10,7 @@ config SOC_IMX23
- select ARM_AMBA
- select CPU_ARM926T
- select HAVE_PWM
-+ select MXS_HAVE_PLATFORM_MXS_SPI
- select PINCTRL_IMX23
-
- config SOC_IMX28
diff --git a/patches/linux/3.5/0407-pengutronix-mx28-Move_SSP_register_definitions_into_separate_file.patch b/patches/linux/3.5/0407-pengutronix-mx28-Move_SSP_register_definitions_into_separate_file.patch
deleted file mode 100644
index b4c1676..0000000
--- a/patches/linux/3.5/0407-pengutronix-mx28-Move_SSP_register_definitions_into_separate_file.patch
+++ /dev/null
@@ -1,254 +0,0 @@
-Move the definitions into separate file so separate SPI driver can be
-implemented. The SSP controller in MXS can act both as a MMC host and
-as a SPI host.
-
-Based on previous attempt by:
-Fabio Estevam <fab...@fr...>
-
-Signed-off-by: Fabio Estevam <fab...@fr...>
-Signed-off-by: Marek Vasut <ma...@de...>
-Cc: Attila Kinali <at...@ki...>
-Cc: Chris Ball <cj...@la...>
-CC: Dong Aisheng <b2...@fr...>
-Cc: Grant Likely <gra...@se...>
-Cc: Linux ARM kernel <lin...@li...>
-Cc: Mark Brown <br...@op...>
-CC: Shawn Guo <sha...@li...>
----
- drivers/mmc/host/mxs-mmc.c | 87 ++--------------------------------
- include/linux/spi/mxs-spi.h | 109 +++++++++++++++++++++++++++++++++++++++++++
- 2 files changed, 112 insertions(+), 84 deletions(-)
- create mode 100644 include/linux/spi/mxs-spi.h
-
-diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
-index a51f930..26c95dc 100644
---- a/drivers/mmc/host/mxs-mmc.c
-+++ b/drivers/mmc/host/mxs-mmc.c
-@@ -45,87 +45,10 @@
- #include <linux/pinctrl/consumer.h>
- #include <linux/stmp_device.h>
- #include <linux/mmc/mxs-mmc.h>
-+#include <linux/spi/mxs-spi.h>
-
- #define DRIVER_NAME "mxs-mmc"
-
--/* card detect polling timeout */
--#define MXS_MMC_DETECT_TIMEOUT (HZ/2)
--
--#define ssp_is_old(host) ((host)->devid == IMX23_MMC)
--
--/* SSP registers */
--#define HW_SSP_CTRL0 0x000
--#define BM_SSP_CTRL0_RUN (1 << 29)
--#define BM_SSP_CTRL0_SDIO_IRQ_CHECK (1 << 28)
--#define BM_SSP_CTRL0_IGNORE_CRC (1 << 26)
--#define BM_SSP_CTRL0_READ (1 << 25)
--#define BM_SSP_CTRL0_DATA_XFER (1 << 24)
--#define BP_SSP_CTRL0_BUS_WIDTH (22)
--#define BM_SSP_CTRL0_BUS_WIDTH (0x3 << 22)
--#define BM_SSP_CTRL0_WAIT_FOR_IRQ (1 << 21)
--#define BM_SSP_CTRL0_LONG_RESP (1 << 19)
--#define BM_SSP_CTRL0_GET_RESP (1 << 17)
--#define BM_SSP_CTRL0_ENABLE (1 << 16)
--#define BP_SSP_CTRL0_XFER_COUNT (0)
--#define BM_SSP_CTRL0_XFER_COUNT (0xffff)
--#define HW_SSP_CMD0 0x010
--#define BM_SSP_CMD0_DBL_DATA_RATE_EN (1 << 25)
--#define BM_SSP_CMD0_SLOW_CLKING_EN (1 << 22)
--#define BM_SSP_CMD0_CONT_CLKING_EN (1 << 21)
--#define BM_SSP_CMD0_APPEND_8CYC (1 << 20)
--#define BP_SSP_CMD0_BLOCK_SIZE (16)
--#define BM_SSP_CMD0_BLOCK_SIZE (0xf << 16)
--#define BP_SSP_CMD0_BLOCK_COUNT (8)
--#define BM_SSP_CMD0_BLOCK_COUNT (0xff << 8)
--#define BP_SSP_CMD0_CMD (0)
--#define BM_SSP_CMD0_CMD (0xff)
--#define HW_SSP_CMD1 0x020
--#define HW_SSP_XFER_SIZE 0x030
--#define HW_SSP_BLOCK_SIZE 0x040
--#define BP_SSP_BLOCK_SIZE_BLOCK_COUNT (4)
--#define BM_SSP_BLOCK_SIZE_BLOCK_COUNT (0xffffff << 4)
--#define BP_SSP_BLOCK_SIZE_BLOCK_SIZE (0)
--#define BM_SSP_BLOCK_SIZE_BLOCK_SIZE (0xf)
--#define HW_SSP_TIMING(h) (ssp_is_old(h) ? 0x050 : 0x070)
--#define BP_SSP_TIMING_TIMEOUT (16)
--#define BM_SSP_TIMING_TIMEOUT (0xffff << 16)
--#define BP_SSP_TIMING_CLOCK_DIVIDE (8)
--#define BM_SSP_TIMING_CLOCK_DIVIDE (0xff << 8)
--#define BP_SSP_TIMING_CLOCK_RATE (0)
--#define BM_SSP_TIMING_CLOCK_RATE (0xff)
--#define HW_SSP_CTRL1(h) (ssp_is_old(h) ? 0x060 : 0x080)
--#define BM_SSP_CTRL1_SDIO_IRQ (1 << 31)
--#define BM_SSP_CTRL1_SDIO_IRQ_EN (1 << 30)
--#define BM_SSP_CTRL1_RESP_ERR_IRQ (1 << 29)
--#define BM_SSP_CTRL1_RESP_ERR_IRQ_EN (1 << 28)
--#define BM_SSP_CTRL1_RESP_TIMEOUT_IRQ (1 << 27)
--#define BM_SSP_CTRL1_RESP_TIMEOUT_IRQ_EN (1 << 26)
--#define BM_SSP_CTRL1_DATA_TIMEOUT_IRQ (1 << 25)
--#define BM_SSP_CTRL1_DATA_TIMEOUT_IRQ_EN (1 << 24)
--#define BM_SSP_CTRL1_DATA_CRC_IRQ (1 << 23)
--#define BM_SSP_CTRL1_DATA_CRC_IRQ_EN (1 << 22)
--#define BM_SSP_CTRL1_FIFO_UNDERRUN_IRQ (1 << 21)
--#define BM_SSP_CTRL1_FIFO_UNDERRUN_IRQ_EN (1 << 20)
--#define BM_SSP_CTRL1_RECV_TIMEOUT_IRQ (1 << 17)
--#define BM_SSP_CTRL1_RECV_TIMEOUT_IRQ_EN (1 << 16)
--#define BM_SSP_CTRL1_FIFO_OVERRUN_IRQ (1 << 15)
--#define BM_SSP_CTRL1_FIFO_OVERRUN_IRQ_EN (1 << 14)
--#define BM_SSP_CTRL1_DMA_ENABLE (1 << 13)
--#define BM_SSP_CTRL1_POLARITY (1 << 9)
--#define BP_SSP_CTRL1_WORD_LENGTH (4)
--#define BM_SSP_CTRL1_WORD_LENGTH (0xf << 4)
--#define BP_SSP_CTRL1_SSP_MODE (0)
--#define BM_SSP_CTRL1_SSP_MODE (0xf)
--#define HW_SSP_SDRESP0(h) (ssp_is_old(h) ? 0x080 : 0x0a0)
--#define HW_SSP_SDRESP1(h) (ssp_is_old(h) ? 0x090 : 0x0b0)
--#define HW_SSP_SDRESP2(h) (ssp_is_old(h) ? 0x0a0 : 0x0c0)
--#define HW_SSP_SDRESP3(h) (ssp_is_old(h) ? 0x0b0 : 0x0d0)
--#define HW_SSP_STATUS(h) (ssp_is_old(h) ? 0x0c0 : 0x100)
--#define BM_SSP_STATUS_CARD_DETECT (1 << 28)
--#define BM_SSP_STATUS_SDIO_IRQ (1 << 17)
--
--#define BF_SSP(value, field) (((value) << BP_SSP_##field) & BM_SSP_##field)
--
- #define MXS_MMC_IRQ_BITS (BM_SSP_CTRL1_SDIO_IRQ | \
- BM_SSP_CTRL1_RESP_ERR_IRQ | \
- BM_SSP_CTRL1_RESP_TIMEOUT_IRQ | \
-@@ -135,12 +58,8 @@
- BM_SSP_CTRL1_RECV_TIMEOUT_IRQ | \
- BM_SSP_CTRL1_FIFO_OVERRUN_IRQ)
-
--#define SSP_PIO_NUM 3
--
--enum mxs_mmc_id {
-- IMX23_MMC,
-- IMX28_MMC,
--};
-+/* card detect polling timeout */
-+#define MXS_MMC_DETECT_TIMEOUT (HZ/2)
-
- struct mxs_mmc_host {
- struct mmc_host *mmc;
-diff --git a/include/linux/spi/mxs-spi.h b/include/linux/spi/mxs-spi.h
-new file mode 100644
-index 0000000..b7ccd57
---- /dev/null
-+++ b/include/linux/spi/mxs-spi.h
-@@ -0,0 +1,109 @@
-+/*
-+ * include/linux/spi/mxs-spi.h
-+ *
-+ * Freescale i.MX233/i.MX28 SPI controller register definition
-+ *
-+ * Copyright 2008 Embedded Alley Solutions, Inc.
-+ * Copyright 2009-2011 Freescale Semiconductor, Inc.
-+ *
-+ * 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; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License along
-+ * with this program; if not, write to the Free Software Foundation, Inc.,
-+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-+ */
-+
-+#ifndef __LINUX_SPI_MXS_SPI_H__
-+#define __LINUX_SPI_MXS_SPI_H__
-+
-+#define ssp_is_old(host) ((host)->devid == IMX23_MMC)
-+
-+/* SSP registers */
-+#define HW_SSP_CTRL0 0x000
-+#define BM_SSP_CTRL0_RUN (1 << 29)
-+#define BM_SSP_CTRL0_SDIO_IRQ_CHECK (1 << 28)
-+#define BM_SSP_CTRL0_IGNORE_CRC (1 << 26)
-+#define BM_SSP_CTRL0_READ (1 << 25)
-+#define BM_SSP_CTRL0_DATA_XFER (1 << 24)
-+#define BP_SSP_CTRL0_BUS_WIDTH 22
-+#define BM_SSP_CTRL0_BUS_WIDTH (0x3 << 22)
-+#define BM_SSP_CTRL0_WAIT_FOR_IRQ (1 << 21)
-+#define BM_SSP_CTRL0_LONG_RESP (1 << 19)
-+#define BM_SSP_CTRL0_GET_RESP (1 << 17)
-+#define BM_SSP_CTRL0_ENABLE (1 << 16)
-+#define BP_SSP_CTRL0_XFER_COUNT 0
-+#define BM_SSP_CTRL0_XFER_COUNT 0xffff
-+#define HW_SSP_CMD0 0x010
-+#define BM_SSP_CMD0_DBL_DATA_RATE_EN (1 << 25)
-+#define BM_SSP_CMD0_SLOW_CLKING_EN (1 << 22)
-+#define BM_SSP_CMD0_CONT_CLKING_EN (1 << 21)
-+#define BM_SSP_CMD0_APPEND_8CYC (1 << 20)
-+#define BP_SSP_CMD0_BLOCK_SIZE 16
-+#define BM_SSP_CMD0_BLOCK_SIZE (0xf << 16)
-+#define BP_SSP_CMD0_BLOCK_COUNT 8
-+#define BM_SSP_CMD0_BLOCK_COUNT (0xff << 8)
-+#define BP_SSP_CMD0_CMD 0
-+#define BM_SSP_CMD0_CMD 0xff
-+#define HW_SSP_CMD1 0x020
-+#define HW_SSP_XFER_SIZE 0x030
-+#define HW_SSP_BLOCK_SIZE 0x040
-+#define BP_SSP_BLOCK_SIZE_BLOCK_COUNT 4
-+#define BM_SSP_BLOCK_SIZE_BLOCK_COUNT (0xffffff << 4)
-+#define BP_SSP_BLOCK_SIZE_BLOCK_SIZE 0
-+#define BM_SSP_BLOCK_SIZE_BLOCK_SIZE 0xf
-+#define HW_SSP_TIMING(h) (ssp_is_old(h) ? 0x050 : 0x070)
-+#define BP_SSP_TIMING_TIMEOUT 16
-+#define BM_SSP_TIMING_TIMEOUT (0xffff << 16)
-+#define BP_SSP_TIMING_CLOCK_DIVIDE 8
-+#define BM_SSP_TIMING_CLOCK_DIVIDE (0xff << 8)
-+#define BP_SSP_TIMING_CLOCK_RATE 0
-+#define BM_SSP_TIMING_CLOCK_RATE 0xff
-+#define HW_SSP_CTRL1(h) (ssp_is_old(h) ? 0x060 : 0x080)
-+#define BM_SSP_CTRL1_SDIO_IRQ (1 << 31)
-+#define BM_SSP_CTRL1_SDIO_IRQ_EN (1 << 30)
-+#define BM_SSP_CTRL1_RESP_ERR_IRQ (1 << 29)
-+#define BM_SSP_CTRL1_RESP_ERR_IRQ_EN (1 << 28)
-+#define BM_SSP_CTRL1_RESP_TIMEOUT_IRQ (1 << 27)
-+#define BM_SSP_CTRL1_RESP_TIMEOUT_IRQ_EN (1 << 26)
-+#define BM_SSP_CTRL1_DATA_TIMEOUT_IRQ (1 << 25)
-+#define BM_SSP_CTRL1_DATA_TIMEOUT_IRQ_EN (1 << 24)
-+#define BM_SSP_CTRL1_DATA_CRC_IRQ (1 << 23)
-+#define BM_SSP_CTRL1_DATA_CRC_IRQ_EN (1 << 22)
-+#define BM_SSP_CTRL1_FIFO_UNDERRUN_IRQ (1 << 21)
-+#define BM_SSP_CTRL1_FIFO_UNDERRUN_IRQ_EN (1 << 20)
-+#define BM_SSP_CTRL1_RECV_TIMEOUT_IRQ (1 << 17)
-+#define BM_SSP_CTRL1_RECV_TIMEOUT_IRQ_EN (1 << 16)
-+#define BM_SSP_CTRL1_FIFO_OVERRUN_IRQ (1 << 15)
-+#define BM_SSP_CTRL1_FIFO_OVERRUN_IRQ_EN (1 << 14)
-+#define BM_SSP_CTRL1_DMA_ENABLE (1 << 13)
-+#define BM_SSP_CTRL1_POLARITY (1 << 9)
-+#define BP_SSP_CTRL1_WORD_LENGTH 4
-+#define BM_SSP_CTRL1_WORD_LENGTH (0xf << 4)
-+#define BP_SSP_CTRL1_SSP_MODE 0
-+#define BM_SSP_CTRL1_SSP_MODE 0xf
-+#define HW_SSP_SDRESP0(h) (ssp_is_old(h) ? 0x080 : 0x0a0)
-+#define HW_SSP_SDRESP1(h) (ssp_is_old(h) ? 0x090 : 0x0b0)
-+#define HW_SSP_SDRESP2(h) (ssp_is_old(h) ? 0x0a0 : 0x0c0)
-+#define HW_SSP_SDRESP3(h) (ssp_is_old(h) ? 0x0b0 : 0x0d0)
-+#define HW_SSP_STATUS(h) (ssp_is_old(h) ? 0x0c0 : 0x100)
-+#define BM_SSP_STATUS_CARD_DETECT (1 << 28)
-+#define BM_SSP_STATUS_SDIO_IRQ (1 << 17)
-+
-+#define BF_SSP(value, field) (((value) << BP_SSP_##field) & BM_SSP_##field)
-+
-+#define SSP_PIO_NUM 3
-+
-+enum mxs_mmc_id {
-+ IMX23_MMC,
-+ IMX28_MMC,
-+};
-+
-+#endif /* __LINUX_SPI_MXS_SPI_H__ */
---
-1.7.10.4
-
-
-_______________________________________________
-linux-arm-kernel mailing list
-lin...@li...
-http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
-
diff --git a/patches/linux/3.5/0408-pengutronix-mx28-mmc_spi_Rename_IMX2x_MMC_to_IMX2x_SSP.patch b/patches/linux/3.5/0408-pengutronix-mx28-mmc_spi_Rename_IMX2x_MMC_to_IMX2x_SSP.patch
deleted file mode 100644
index 1ecabac..0000000
--- a/patches/linux/3.5/0408-pengutronix-mx28-mmc_spi_Rename_IMX2x_MMC_to_IMX2x_SSP.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-Since the SSP controller can act as both SPI and MMC host,
-renaming the enum to properly reflect the naming seems
-appropriate.
-
-Based on previous attempt by:
-Fabio Estevam <fab...@fr...>
-
-Signed-off-by: Fabio Estevam <fab...@fr...>
-Signed-off-by: Marek Vasut <ma...@de...>
-Cc: Attila Kinali <at...@ki...>
-Cc: Chris Ball <cj...@la...>
-CC: Dong Aisheng <b2...@fr...>
-Cc: Grant Likely <gra...@se...>
-Cc: Linux ARM kernel <lin...@li...>
-Cc: Mark Brown <br...@op...>
-CC: Shawn Guo <sha...@li...>
----
- drivers/mmc/host/mxs-mmc.c | 18 +++++++++---------
- include/linux/spi/mxs-spi.h | 8 ++++----
- 2 files changed, 13 insertions(+), 13 deletions(-)
-
-diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
-index 26c95dc..e80c2b6 100644
---- a/drivers/mmc/host/mxs-mmc.c
-+++ b/drivers/mmc/host/mxs-mmc.c
-@@ -78,7 +78,7 @@ struct mxs_mmc_host {
- enum dma_transfer_direction slave_dirn;
- u32 ssp_pio_words[SSP_PIO_NUM];
-
-- enum mxs_mmc_id devid;
-+ enum mxs_ssp_id devid;
- unsigned char bus_width;
- spinlock_t lock;
- int sdio_irq_en;
-@@ -601,22 +601,22 @@ static bool mxs_mmc_dma_filter(struct dma_chan *chan, void *param)
- return true;
- }
-
--static struct platform_device_id mxs_mmc_ids[] = {
-+static struct platform_device_id mxs_ssp_ids[] = {
- {
- .name = "imx23-mmc",
-- .driver_data = IMX23_MMC,
-+ .driver_data = IMX23_SSP,
- }, {
- .name = "imx28-mmc",
-- .driver_data = IMX28_MMC,
-+ .driver_data = IMX28_SSP,
- }, {
- /* sentinel */
- }
- };
--MODULE_DEVICE_TABLE(platform, mxs_mmc_ids);
-+MODULE_DEVICE_TABLE(platform, mxs_ssp_ids);
-
- static const struct of_device_id mxs_mmc_dt_ids[] = {
-- { .compatible = "fsl,imx23-mmc", .data = (void *) IMX23_MMC, },
-- { .compatible = "fsl,imx28-mmc", .data = (void *) IMX28_MMC, },
-+ { .compatible = "fsl,imx23-mmc", .data = (void *) IMX23_SSP, },
-+ { .compatible = "fsl,imx28-mmc", .data = (void *) IMX28_SSP, },
- { /* sentinel */ }
- };
- MODULE_DEVICE_TABLE(of, mxs_mmc_dt_ids);
-@@ -655,7 +655,7 @@ static int mxs_mmc_probe(struct platform_device *pdev)
- }
-
- if (np) {
-- host->devid = (enum mxs_mmc_id) of_id->data;
-+ host->devid = (enum mxs_ssp_id) of_id->data;
- /*
- * TODO: This is a temporary solution and should be changed
- * to use generic DMA binding later when the helpers get in.
-@@ -829,7 +829,7 @@ static const struct dev_pm_ops mxs_mmc_pm_ops = {
- static struct platform_driver mxs_mmc_driver = {
- .probe = mxs_mmc_probe,
- .remove = mxs_mmc_remove,
-- .id_table = mxs_mmc_ids,
-+ .id_table = mxs_ssp_ids,
- .driver = {
- .name = DRIVER_NAME,
- .owner = THIS_MODULE,
-diff --git a/include/linux/spi/mxs-spi.h b/include/linux/spi/mxs-spi.h
-index b7ccd57..c08aef5 100644
---- a/include/linux/spi/mxs-spi.h
-+++ b/include/linux/spi/mxs-spi.h
-@@ -24,7 +24,7 @@
- #ifndef __LINUX_SPI_MXS_SPI_H__
- #define __LINUX_SPI_MXS_SPI_H__
-
--#define ssp_is_old(host) ((host)->devid == IMX23_MMC)
-+#define ssp_is_old(host) ((host)->devid == IMX23_SSP)
-
- /* SSP registers */
- #define HW_SSP_CTRL0 0x000
-@@ -101,9 +101,9 @@
-
- #define SSP_PIO_NUM 3
-
--enum mxs_mmc_id {
-- IMX23_MMC,
-- IMX28_MMC,
-+enum mxs_ssp_id {
-+ IMX23_SSP,
-+ IMX28_SSP,
- };
-
- #endif /* __LINUX_SPI_MXS_SPI_H__ */
---
-1.7.10.4
-
-
-_______________________________________________
-linux-arm-kernel mailing list
-lin...@li...
-http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
-
diff --git a/patches/linux/3.5/0409-pengutronix-mx28-mmc_spi_Add_necessary_bits_into_mxs-spi-h.patch b/patches/linux/3.5/0409-pengutronix-mx28-mmc_spi_Add_necessary_bits_into_mxs-spi-h.patch
deleted file mode 100644
index 2b42796..0000000
--- a/patches/linux/3.5/0409-pengutronix-mx28-mmc_spi_Add_necessary_bits_into_mxs-spi-h.patch
+++ /dev/null
@@ -1,95 +0,0 @@
-Add missing register bits and registers into mxs-spi.h .
-These will be used by the SPI driver.
-
-Based on previous attempt by:
-Fabio Estevam <fab...@fr...>
-
-Signed-off-by: Fabio Estevam <fab...@fr...>
-Signed-off-by: Marek Vasut <ma...@de...>
-Cc: Attila Kinali <at...@ki...>
-Cc: Chris Ball <cj...@la...>
-CC: Dong Aisheng <b2...@fr...>
-Cc: Grant Likely <gra...@se...>
-Cc: Linux ARM kernel <lin...@li...>
-Cc: Mark Brown <br...@op...>
-CC: Shawn Guo <sha...@li...>
----
- include/linux/spi/mxs-spi.h | 22 ++++++++++++++++++++++
- 1 file changed, 22 insertions(+)
-
-diff --git a/include/linux/spi/mxs-spi.h b/include/linux/spi/mxs-spi.h
-index c08aef5..7dfa1d7 100644
---- a/include/linux/spi/mxs-spi.h
-+++ b/include/linux/spi/mxs-spi.h
-@@ -30,12 +30,14 @@
- #define HW_SSP_CTRL0 0x000
- #define BM_SSP_CTRL0_RUN (1 << 29)
- #define BM_SSP_CTRL0_SDIO_IRQ_CHECK (1 << 28)
-+#define BM_SSP_CTRL0_LOCK_CS (1 << 27)
- #define BM_SSP_CTRL0_IGNORE_CRC (1 << 26)
- #define BM_SSP_CTRL0_READ (1 << 25)
- #define BM_SSP_CTRL0_DATA_XFER (1 << 24)
- #define BP_SSP_CTRL0_BUS_WIDTH 22
- #define BM_SSP_CTRL0_BUS_WIDTH (0x3 << 22)
- #define BM_SSP_CTRL0_WAIT_FOR_IRQ (1 << 21)
-+#define BM_SSP_CTRL0_WAIT_FOR_CMD (1 << 20)
- #define BM_SSP_CTRL0_LONG_RESP (1 << 19)
- #define BM_SSP_CTRL0_GET_RESP (1 << 17)
- #define BM_SSP_CTRL0_ENABLE (1 << 16)
-@@ -64,8 +66,12 @@
- #define BM_SSP_TIMING_TIMEOUT (0xffff << 16)
- #define BP_SSP_TIMING_CLOCK_DIVIDE 8
- #define BM_SSP_TIMING_CLOCK_DIVIDE (0xff << 8)
-+#define BF_SSP_TIMING_CLOCK_DIVIDE(v) \
-+ (((v) << 8) & BM_SSP_TIMING_CLOCK_DIVIDE)
- #define BP_SSP_TIMING_CLOCK_RATE 0
- #define BM_SSP_TIMING_CLOCK_RATE 0xff
-+#define BF_SSP_TIMING_CLOCK_RATE(v) \
-+ (((v) << 0) & BM_SSP_TIMING_CLOCK_RATE)
- #define HW_SSP_CTRL1(h) (ssp_is_old(h) ? 0x060 : 0x080)
- #define BM_SSP_CTRL1_SDIO_IRQ (1 << 31)
- #define BM_SSP_CTRL1_SDIO_IRQ_EN (1 << 30)
-@@ -84,11 +90,26 @@
- #define BM_SSP_CTRL1_FIFO_OVERRUN_IRQ (1 << 15)
- #define BM_SSP_CTRL1_FIFO_OVERRUN_IRQ_EN (1 << 14)
- #define BM_SSP_CTRL1_DMA_ENABLE (1 << 13)
-+#define BM_SSP_CTRL1_PHASE (1 << 10)
- #define BM_SSP_CTRL1_POLARITY (1 << 9)
- #define BP_SSP_CTRL1_WORD_LENGTH 4
- #define BM_SSP_CTRL1_WORD_LENGTH (0xf << 4)
-+#define BF_SSP_CTRL1_WORD_LENGTH(v) \
-+ (((v) << 4) & BM_SSP_CTRL1_WORD_LENGTH)
-+#define BV_SSP_CTRL1_WORD_LENGTH__FOUR_BITS 0x3
-+#define BV_SSP_CTRL1_WORD_LENGTH__EIGHT_BITS 0x7
-+#define BV_SSP_CTRL1_WORD_LENGTH__SIXTEEN_BITS 0xF
- #define BP_SSP_CTRL1_SSP_MODE 0
- #define BM_SSP_CTRL1_SSP_MODE 0xf
-+#define BF_SSP_CTRL1_SSP_MODE(v) \
-+ (((v) << 0) & BM_SSP_CTRL1_SSP_MODE)
-+#define BV_SSP_CTRL1_SSP_MODE__SPI 0x0
-+#define BV_SSP_CTRL1_SSP_MODE__SSI 0x1
-+#define BV_SSP_CTRL1_SSP_MODE__SD_MMC 0x3
-+#define BV_SSP_CTRL1_SSP_MODE__MS 0x4
-+
-+#define HW_SSP_DATA(h) (ssp_is_old(h) ? 0x070 : 0x090)
-+
- #define HW_SSP_SDRESP0(h) (ssp_is_old(h) ? 0x080 : 0x0a0)
- #define HW_SSP_SDRESP1(h) (ssp_is_old(h) ? 0x090 : 0x0b0)
- #define HW_SSP_SDRESP2(h) (ssp_is_old(h) ? 0x0a0 : 0x0c0)
-@@ -96,6 +117,7 @@
- #define HW_SSP_STATUS(h) (ssp_is_old(h) ? 0x0c0 : 0x100)
- #define BM_SSP_STATUS_CARD_DETECT (1 << 28)
- #define BM_SSP_STATUS_SDIO_IRQ (1 << 17)
-+#define BM_SSP_STATUS_FIFO_EMPTY (1 << 5)
-
- #define BF_SSP(value, field) (((value) << BP_SSP_##field) & BM_SSP_##field)
-
---
-1.7.10.4
-
-
-_______________________________________________
-linux-arm-kernel mailing list
-lin...@li...
-http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
-
diff --git a/patches/linux/3.5/0410-pengutronix-mx28-mmc_spi_Pull_out_parts_shared_between_MMC_and_SPI.patch b/patches/linux/3.5/0410-pengutronix-mx28-mmc_spi_Pull_out_parts_shared_between_MMC_and_SPI.patch
deleted file mode 100644
index 0ce2f71..0000000
--- a/patches/linux/3.5/0410-pengutronix-mx28-mmc_spi_Pull_out_parts_shared_between_MMC_and_SPI.patch
+++ /dev/null
@@ -1,381 +0,0 @@
-Abstract out the common part of private data shared between MMC
-and SPI. These shall later allow to use common clock configuration
-function.
-
-Signed-off-by: Marek Vasut <ma...@de...>
-Cc: Attila Kinali <at...@ki...>
-Cc: Chris Ball <cj...@la...>
-CC: Dong Aisheng <b2...@fr...>
-Cc: Fabio Estevam <fab...@fr...>
-Cc: Grant Likely <gra...@se...>
-Cc: Linux ARM kernel <lin...@li...>
-Cc: Mark Brown <br...@op...>
-CC: Shawn Guo <sha...@li...>
----
- drivers/mmc/host/mxs-mmc.c | 107 ++++++++++++++++++++++++-------------------
- include/linux/spi/mxs-spi.h | 8 ++++
- 2 files changed, 67 insertions(+), 48 deletions(-)
-
-diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
-index e80c2b6..7b85e03 100644
---- a/drivers/mmc/host/mxs-mmc.c
-+++ b/drivers/mmc/host/mxs-mmc.c
-@@ -62,23 +62,20 @@
- #define MXS_MMC_DETECT_TIMEOUT (HZ/2)
-
- struct mxs_mmc_host {
-+ struct mxs_ssp ssp;
-+
- struct mmc_host *mmc;
- struct mmc_request *mrq;
- struct mmc_command *cmd;
- struct mmc_data *data;
-
-- void __iomem *base;
- int dma_channel;
-- struct clk *clk;
-- unsigned int clk_rate;
--
- struct dma_chan *dmach;
- struct mxs_dma_data dma_data;
- unsigned int dma_dir;
- enum dma_transfer_direction slave_dirn;
- u32 ssp_pio_words[SSP_PIO_NUM];
-
-- enum mxs_ssp_id devid;
- unsigned char bus_width;
- spinlock_t lock;
- int sdio_irq_en;
-@@ -98,16 +95,18 @@ static int mxs_mmc_get_ro(struct mmc_host *mmc)
- static int mxs_mmc_get_cd(struct mmc_host *mmc)
- {
- struct mxs_mmc_host *host = mmc_priv(mmc);
-+ struct mxs_ssp *ssp = &host->ssp;
-
-- return !(readl(host->base + HW_SSP_STATUS(host)) &
-+ return !(readl(ssp->base + HW_SSP_STATUS(ssp)) &
- BM_SSP_STATUS_CARD_DETECT);
- }
-
- static void mxs_mmc_reset(struct mxs_mmc_host *host)
- {
-+ struct mxs_ssp *ssp = &host->ssp;
- u32 ctrl0, ctrl1;
-
-- stmp_reset_block(host->base);
-+ stmp_reset_block(ssp->base);
-
- ctrl0 = BM_SSP_CTRL0_IGNORE_CRC;
- ctrl1 = BF_SSP(0x3, CTRL1_SSP_MODE) |
-@@ -123,15 +122,15 @@ static void mxs_mmc_reset(struct mxs_mmc_host *host)
- writel(BF_SSP(0xffff, TIMING_TIMEOUT) |
- BF_SSP(2, TIMING_CLOCK_DIVIDE) |
- BF_SSP(0, TIMING_CLOCK_RATE),
-- host->base + HW_SSP_TIMING(host));
-+ ssp->base + HW_SSP_TIMING(ssp));
-
- if (host->sdio_irq_en) {
- ctrl0 |= BM_SSP_CTRL0_SDIO_IRQ_CHECK;
- ctrl1 |= BM_SSP_CTRL1_SDIO_IRQ_EN;
- }
-
-- writel(ctrl0, host->base + HW_SSP_CTRL0);
-- writel(ctrl1, host->base + HW_SSP_CTRL1(host));
-+ writel(ctrl0, ssp->base + HW_SSP_CTRL0);
-+ writel(ctrl1, ssp->base + HW_SSP_CTRL1(ssp));
- }
-
- static void mxs_mmc_start_cmd(struct mxs_mmc_host *host,
-@@ -142,15 +141,16 @@ static void mxs_mmc_request_done(struct mxs_mmc_host *host)
- struct mmc_command *cmd = host->cmd;
- struct mmc_data *data = host->data;
- struct mmc_request *mrq = host->mrq;
-+ struct mxs_ssp *ssp = &host->ssp;
-
- if (mmc_resp_type(cmd) & MMC_RSP_PRESENT) {
- if (mmc_resp_type(cmd) & MMC_RSP_136) {
-- cmd->resp[3] = readl(host->base + HW_SSP_SDRESP0(host));
-- cmd->resp[2] = readl(host->base + HW_SSP_SDRESP1(host));
-- cmd->resp[1] = readl(host->base + HW_SSP_SDRESP2(host));
-- cmd->resp[0] = readl(host->base + HW_SSP_SDRESP3(host));
-+ cmd->resp[3] = readl(ssp->base + HW_SSP_SDRESP0(ssp));
-+ cmd->resp[2] = readl(ssp->base + HW_SSP_SDRESP1(ssp));
-+ cmd->resp[1] = readl(ssp->base + HW_SSP_SDRESP2(ssp));
-+ cmd->resp[0] = readl(ssp->base + HW_SSP_SDRESP3(ssp));
- } else {
-- cmd->resp[0] = readl(host->base + HW_SSP_SDRESP0(host));
-+ cmd->resp[0] = readl(ssp->base + HW_SSP_SDRESP0(ssp));
- }
- }
-
-@@ -189,13 +189,14 @@ static irqreturn_t mxs_mmc_irq_handler(int irq, void *dev_id)
- struct mxs_mmc_host *host = dev_id;
- struct mmc_command *cmd = host->cmd;
- struct mmc_data *data = host->data;
-+ struct mxs_ssp *ssp = &host->ssp;
- u32 stat;
-
- spin_lock(&host->lock);
-
-- stat = readl(host->base + HW_SSP_CTRL1(host));
-+ stat = readl(ssp->base + HW_SSP_CTRL1(ssp));
- writel(stat & MXS_MMC_IRQ_BITS,
-- host->base + HW_SSP_CTRL1(host) + STMP_OFFSET_REG_CLR);
-+ ssp->base + HW_SSP_CTRL1(ssp) + STMP_OFFSET_REG_CLR);
-
- if ((stat & BM_SSP_CTRL1_SDIO_IRQ) && (stat & BM_SSP_CTRL1_SDIO_IRQ_EN))
- mmc_signal_sdio_irq(host->mmc);
-@@ -359,6 +360,8 @@ static void mxs_mmc_adtc(struct mxs_mmc_host *host)
- unsigned int data_size = 0, log2_blksz;
- unsigned int blocks = data->blocks;
-
-+ struct mxs_ssp *ssp = &host->ssp;
-+
- u32 ignore_crc, get_resp, long_resp, read;
- u32 ctrl0, cmd0, cmd1, val;
-
-@@ -401,15 +404,15 @@ static void mxs_mmc_adtc(struct mxs_mmc_host *host)
- blocks = 1;
-
- /* xfer count, block size and count need to be set differently */
-- if (ssp_is_old(host)) {
-+ if (ssp_is_old(ssp)) {
- ctrl0 |= BF_SSP(data_size, CTRL0_XFER_COUNT);
- cmd0 |= BF_SSP(log2_blksz, CMD0_BLOCK_SIZE) |
- BF_SSP(blocks - 1, CMD0_BLOCK_COUNT);
- } else {
-- writel(data_size, host->base + HW_SSP_XFER_SIZE);
-+ writel(data_size, ssp->base + HW_SSP_XFER_SIZE);
- writel(BF_SSP(log2_blksz, BLOCK_SIZE_BLOCK_SIZE) |
- BF_SSP(blocks - 1, BLOCK_SIZE_BLOCK_COUNT),
-- host->base + HW_SSP_BLOCK_SIZE);
-+ ssp->base + HW_SSP_BLOCK_SIZE);
- }
-
- if ((cmd->opcode == MMC_STOP_TRANSMISSION) ||
-@@ -424,11 +427,11 @@ static void mxs_mmc_adtc(struct mxs_mmc_host *host)
- }
-
- /* set the timeout count */
-- timeout = mxs_ns_to_ssp_ticks(host->clk_rate, data->timeout_ns);
-- val = readl(host->base + HW_SSP_TIMING(host));
-+ timeout = mxs_ns_to_ssp_ticks(ssp->clk_rate, data->timeout_ns);
-+ val = readl(ssp->base + HW_SSP_TIMING(ssp));
- val &= ~(BM_SSP_TIMING_TIMEOUT);
- val |= BF_SSP(timeout, TIMING_TIMEOUT);
-- writel(val, host->base + HW_SSP_TIMING(host));
-+ writel(val, ssp->base + HW_SSP_TIMING(ssp));
-
- /* pio */
- host->ssp_pio_words[0] = ctrl0;
-@@ -493,11 +496,12 @@ static void mxs_mmc_request(struct mmc_host *mmc, struct mmc_request *mrq)
-
- static void mxs_mmc_set_clk_rate(struct mxs_mmc_host *host, unsigned int rate)
- {
-+ struct mxs_ssp *ssp = &host->ssp;
- unsigned int ssp_clk, ssp_sck;
- u32 clock_divide, clock_rate;
- u32 val;
-
-- ssp_clk = clk_get_rate(host->clk);
-+ ssp_clk = clk_get_rate(ssp->clk);
-
- for (clock_divide = 2; clock_divide <= 254; clock_divide += 2) {
- clock_rate = DIV_ROUND_UP(ssp_clk, rate * clock_divide);
-@@ -514,13 +518,13 @@ static void mxs_mmc_set_clk_rate(struct mxs_mmc_host *host, unsigned int rate)
-
- ssp_sck = ssp_clk / clock_divide / (1 + clock_rate);
-
-- val = readl(host->base + HW_SSP_TIMING(host));
-+ val = readl(ssp->base + HW_SSP_TIMING(ssp));
- val &= ~(BM_SSP_TIMING_CLOCK_DIVIDE | BM_SSP_TIMING_CLOCK_RATE);
- val |= BF_SSP(clock_divide, TIMING_CLOCK_DIVIDE);
- val |= BF_SSP(clock_rate, TIMING_CLOCK_RATE);
-- writel(val, host->base + HW_SSP_TIMING(host));
-+ writel(val, ssp->base + HW_SSP_TIMING(ssp));
-
-- host->clk_rate = ssp_sck;
-+ ssp->clk_rate = ssp_sck;
-
- dev_dbg(mmc_dev(host->mmc),
- "%s: clock_divide %d, clock_rate %d, ssp_clk %d, rate_actual %d, rate_requested %d\n",
-@@ -545,6 +549,7 @@ static void mxs_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
- static void mxs_mmc_enable_sdio_irq(struct mmc_host *mmc, int enable)
- {
- struct mxs_mmc_host *host = mmc_priv(mmc);
-+ struct mxs_ssp *ssp = &host->ssp;
- unsigned long flags;
-
- spin_lock_irqsave(&host->lock, flags);
-@@ -553,19 +558,19 @@ static void mxs_mmc_enable_sdio_irq(struct mmc_host *mmc, int enable)
-
- if (enable) {
- writel(BM_SSP_CTRL0_SDIO_IRQ_CHECK,
-- host->base + HW_SSP_CTRL0 + STMP_OFFSET_REG_SET);
-+ ssp->base + HW_SSP_CTRL0 + STMP_OFFSET_REG_SET);
- writel(BM_SSP_CTRL1_SDIO_IRQ_EN,
-- host->base + HW_SSP_CTRL1(host) + STMP_OFFSET_REG_SET);
-+ ssp->base + HW_SSP_CTRL1(ssp) + STMP_OFFSET_REG_SET);
-
-- if (readl(host->base + HW_SSP_STATUS(host)) &
-+ if (readl(ssp->base + HW_SSP_STATUS(ssp)) &
- BM_SSP_STATUS_SDIO_IRQ)
- mmc_signal_sdio_irq(host->mmc);
-
- } else {
- writel(BM_SSP_CTRL0_SDIO_IRQ_CHECK,
-- host->base + HW_SSP_CTRL0 + STMP_OFFSET_REG_CLR);
-+ ssp->base + HW_SSP_CTRL0 + STMP_OFFSET_REG_CLR);
- writel(BM_SSP_CTRL1_SDIO_IRQ_EN,
-- host->base + HW_SSP_CTRL1(host) + STMP_OFFSET_REG_CLR);
-+ ssp->base + HW_SSP_CTRL1(ssp) + STMP_OFFSET_REG_CLR);
- }
-
- spin_unlock_irqrestore(&host->lock, flags);
-@@ -626,6 +631,7 @@ static int mxs_mmc_probe(struct platform_device *pdev)
- struct pinctrl *pinctrl;
- int ret = 0, irq_err, irq_dma;
- dma_cap_mask_t mask;
-+ struct mxs_ssp *ssp;
-
- iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- dmares = platform_get_resource(pdev, IORESOURCE_DMA, 0);
-@@ -639,14 +645,16 @@ static int mxs_mmc_probe(struct platform_device *pdev)
- return -ENOMEM;
-
- host = mmc_priv(mmc);
-- host->base = devm_request_and_ioremap(&pdev->dev, iores);
-- if (!host->base) {
-+ ssp = &host->ssp;
-+ ssp->dev = &pdev->dev;
-+ ssp->base = devm_request_and_ioremap(&pdev->dev, iores);
-+ if (!ssp->base) {
- ret = -EADDRNOTAVAIL;
- goto out_mmc_free;
- }
-
- if (np) {
-- host->devid = (enum mxs_ssp_id) of_id->data;
-+ ssp->devid = (enum mxs_ssp_id) of_id->data;
- /*
- * TODO: This is a temporary solution and should be changed
- * to use generic DMA binding later when the helpers get in.
-@@ -659,7 +667,7 @@ static int mxs_mmc_probe(struct platform_device *pdev)
- goto out_mmc_free;
- }
- } else {
-- host->devid = pdev->id_entry->driver_data;
-+ ssp->devid = pdev->id_entry->driver_data;
- host->dma_channel = dmares->start;
- }
-
-@@ -672,12 +680,12 @@ static int mxs_mmc_probe(struct platform_device *pdev)
- goto out_mmc_free;
- }
-
-- host->clk = clk_get(&pdev->dev, NULL);
-- if (IS_ERR(host->clk)) {
-- ret = PTR_ERR(host->clk);
-+ ssp->clk = clk_get(&pdev->dev, NULL);
-+ if (IS_ERR(ssp->clk)) {
-+ ret = PTR_ERR(ssp->clk);
- goto out_mmc_free;
- }
-- clk_prepare_enable(host->clk);
-+ clk_prepare_enable(ssp->clk);
-
- mxs_mmc_reset(host);
-
-@@ -719,8 +727,8 @@ static int mxs_mmc_probe(struct platform_device *pdev)
-
- mmc->max_segs = 52;
- mmc->max_blk_size = 1 << 0xf;
-- mmc->max_blk_count = (ssp_is_old(host)) ? 0xff : 0xffffff;
-- mmc->max_req_size = (ssp_is_old(host)) ? 0xffff : 0xffffffff;
-+ mmc->max_blk_count = (ssp_is_old(ssp)) ? 0xff : 0xffffff;
-+ mmc->max_req_size = (ssp_is_old(ssp)) ? 0xffff : 0xffffffff;
- mmc->max_seg_size = dma_get_max_seg_size(host->dmach->device->dev);
-
- platform_set_drvdata(pdev, mmc);
-@@ -744,8 +752,8 @@ out_free_dma:
- if (host->dmach)
- dma_release_channel(host->dmach);
- out_clk_put:
-- clk_disable_unprepare(host->clk);
-- clk_put(host->clk);
-+ clk_disable_unprepare(ssp->clk);
-+ clk_put(ssp->clk);
- out_mmc_free:
- mmc_free_host(mmc);
- return ret;
-@@ -755,6 +763,7 @@ static int mxs_mmc_remove(struct platform_device *pdev)
- {
- struct mmc_host *mmc = platform_get_drvdata(pdev);
- struct mxs_mmc_host *host = mmc_priv(mmc);
-+ struct mxs_ssp *ssp = &host->ssp;
-
- mmc_remove_host(mmc);
-
-@@ -763,8 +772,8 @@ static int mxs_mmc_remove(struct platform_device *pdev)
- if (host->dmach)
- dma_release_channel(host->dmach);
-
-- clk_disable_unprepare(host->clk);
-- clk_put(host->clk);
-+ clk_disable_unprepare(ssp->clk);
-+ clk_put(ssp->clk);
-
- mmc_free_host(mmc);
-
-@@ -776,11 +785,12 @@ static int mxs_mmc_suspend(struct device *dev)
- {
- struct mmc_host *mmc = dev_get_drvdata(dev);
- struct mxs_mmc_host *host = mmc_priv(mmc);
-+ struct mxs_ssp *ssp = &host->ssp;
- int ret = 0;
-
- ret = mmc_suspend_host(mmc);
-
-- clk_disable_unprepare(host->clk);
-+ clk_disable_unprepare(ssp->clk);
-
- return ret;
- }
-@@ -789,9 +799,10 @@ static int mxs_mmc_resume(struct device *dev)
- {
- struct mmc_host *mmc = dev_get_drvdata(dev);
- struct mxs_mmc_host *host = mmc_priv(mmc);
-+ struct mxs_ssp *ssp = &host->ssp;
- int ret = 0;
-
-- clk_prepare_enable(host->clk);
-+ clk_prepare_enable(ssp->clk);
-
- ret = mmc_resume_host(mmc);
-
-diff --git a/include/linux/spi/mxs-spi.h b/include/linux/spi/mxs-spi.h
-index 7dfa1d7..475f69f 100644
---- a/include/linux/spi/mxs-spi.h
-+++ b/include/linux/spi/mxs-spi.h
-@@ -128,4 +128,12 @@ enum mxs_ssp_id {
- IMX28_SSP,
- };
-
-+struct mxs_ssp {
-+ struct device *dev;
-+ void __iomem *base;
-+ struct clk *clk;
-+ unsigned int clk_rate;
-+ enum mxs_ssp_id devid;
-+};
-+
- #endif /* __LINUX_SPI_MXS_SPI_H__ */
---
-1.7.10.4
-
-
-_______________________________________________
-linux-arm-kernel mailing list
-lin...@li...
-http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
-
diff --git a/patches/linux/3.5/0411-pengutronix-mx28-mmc_spi_Pull_out_the_SSP_clock_configuration_function.patch b/patches/linux/3.5/0411-pengutronix-mx28-mmc_spi_Pull_out_the_SSP_clock_configuration_function.patch
deleted file mode 100644
index f167901..0000000
--- a/patches/linux/3.5/0411-pengutronix-mx28-mmc_spi_Pull_out_the_SSP_clock_configuration_function.patch
+++ /dev/null
@@ -1,179 +0,0 @@
-Pull out the MMC clock configuration function and make it
-into SSP clock configuration function, so it can be used by
-the SPI driver too.
-
-Signed-off-by: Marek Vasut <ma...@de...>
-Cc: Attila Kinali <at...@ki...>
-Cc: Chris Ball <cj...@la...>
-CC: Dong Aisheng <b2...@fr...>
-Cc: Fabio Estevam <fab...@fr...>
-Cc: Grant Likely <gra...@se...>
-Cc: Linux ARM kernel <lin...@li...>
-Cc: Mark Brown <br...@op...>
-CC: Shawn Guo <sha...@li...>
----
- drivers/clk/mxs/Makefile | 2 +-
- drivers/clk/mxs/clk-ssp.c | 62 +++++++++++++++++++++++++++++++++++++++++++
- drivers/mmc/host/mxs-mmc.c | 39 +--------------------------
- include/linux/spi/mxs-spi.h | 2 ++
- 4 files changed, 66 insertions(+), 39 deletions(-)
- create mode 100644 drivers/clk/mxs/clk-ssp.c
-
-diff --git a/drivers/clk/mxs/Makefile b/drivers/clk/mxs/Makefile
-index 7bedeec..a6a2223 100644
---- a/drivers/clk/mxs/Makefile
-+++ b/drivers/clk/mxs/Makefile
-@@ -2,7 +2,7 @@
- # Makefile for mxs specific clk
- #
-
--obj-y += clk.o clk-pll.o clk-ref.o clk-div.o clk-frac.o
-+obj-y += clk.o clk-pll.o clk-ref.o clk-div.o clk-frac.o clk-ssp.o
-
- obj-$(CONFIG_SOC_IMX23) += clk-imx23.o
- obj-$(CONFIG_SOC_IMX28) += clk-imx28.o
-diff --git a/drivers/clk/mxs/clk-ssp.c b/drivers/clk/mxs/clk-ssp.c
-new file mode 100644
-index 0000000..af7bdbf
---- /dev/null
-+++ b/drivers/clk/mxs/clk-ssp.c
-@@ -0,0 +1,62 @@
-+/*
-+ * Copyright 2012 DENX Software Engineering, GmbH
-+ *
-+ * Pulled from code:
-+ * Portions copyright (C) 2003 Russell King, PXA MMCI Driver
-+ * Portions copyright (C) 2004-2005 Pierre Ossman, W83L51xD SD/MMC driver
-+ *
-+ * Copyright 2008 Embedded Alley Solutions, Inc.
-+ * Copyright 2009-2011 Freescale Semiconductor, Inc.
-+ *
-+ * The code contained herein is licensed under the GNU General Public
-+ * License. You may obtain a copy of the GNU General Public License
-+ * Version 2 or later at the following locations:
-+ *
-+ * http://www.opensource.org/licenses/gpl-license.html
-+ * http://www.gnu.org/copyleft/gpl.html
-+ */
-+
-+#include <linux/kernel.h>
-+#include <linux/init.h>
-+#include <linux/clk.h>
-+#include <linux/module.h>
-+#include <linux/device.h>
-+#include <linux/io.h>
-+#include <linux/spi/mxs-spi.h>
-+
-+void mxs_ssp_set_clk_rate(struct mxs_ssp *ssp, unsigned int rate)
-+{
-+ unsigned int ssp_clk, ssp_sck;
-+ u32 clock_divide, clock_rate;
-+ u32 val;
-+
-+ ssp_clk = clk_get_rate(ssp->clk);
-+
-+ for (clock_divide = 2; clock_divide <= 254; clock_divide += 2) {
-+ clock_rate = DIV_ROUND_UP(ssp_clk, rate * clock_divide);
-+ clock_rate = (clock_rate > 0) ? clock_rate - 1 : 0;
-+ if (clock_rate <= 255)
-+ break;
-+ }
-+
-+ if (clock_divide > 254) {
-+ dev_err(ssp->dev,
-+ "%s: cannot set clock to %d\n", __func__, rate);
-+ return;
-+ }
-+
-+ ssp_sck = ssp_clk / clock_divide / (1 + clock_rate);
-+
-+ val = readl(ssp->base + HW_SSP_TIMING(ssp));
-+ val &= ~(BM_SSP_TIMING_CLOCK_DIVIDE | BM_SSP_TIMING_CLOCK_RATE);
-+ val |= BF_SSP(clock_divide, TIMING_CLOCK_DIVIDE);
-+ val |= BF_SSP(clock_rate, TIMING_CLOCK_RATE);
-+ writel(val, ssp->base + HW_SSP_TIMING(ssp));
-+
-+ ssp->clk_rate = ssp_sck;
-+
-+ dev_dbg(ssp->dev,
-+ "%s: clock_divide %d, clock_rate %d, ssp_clk %d, rate_actual %d, rate_requested %d\n",
-+ __func__, clock_divide, clock_rate, ssp_clk, ssp_sck, rate);
-+}
-+EXPORT_SYMBOL_GPL(mxs_ssp_set_clk_rate);
-diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
-index 7b85e03..0813340 100644
---- a/drivers/mmc/host/mxs-mmc.c
-+++ b/drivers/mmc/host/mxs-mmc.c
-@@ -501,43 +501,6 @@ static void mxs_mmc_request(struct mmc_host *mmc, struct mmc_request *mrq)
- mxs_mmc_start_cmd(host, mrq->cmd);
- }
-
--static void mxs_mmc_set_clk_rate(struct mxs_mmc_host *host, unsigned int rate)
--{
-- struct mxs_ssp *ssp = &host->ssp;
-- unsigned int ssp_clk, ssp_sck;
-- u32 clock_divide, clock_rate;
-- u32 val;
--
-- ssp_clk = clk_get_rate(ssp->clk);
--
-- for (clock_divide = 2; clock_divide <= 254; clock_divide += 2) {
-- clock_rate = DIV_ROUND_UP(ssp_clk, rate * clock_divide);
-- clock_rate = (clock_rate > 0) ? clock_rate - 1 : 0;
-- if (clock_rate <= 255)
-- break;
-- }
--
-- if (clock_divide > 254) {
-- dev_err(mmc_dev(host->mmc),
-- "%s: cannot set clock to %d\n", __func__, rate);
-- return;
-- }
--
-- ssp_sck = ssp_clk / clock_divide / (1 + clock_rate);
--
-- val = readl(ssp->base + HW_SSP_TIMING(ssp));
-- val &= ~(BM_SSP_TIMING_CLOCK_DIVIDE | BM_SSP_TIMING_CLOCK_RATE);
-- val |= BF_SSP(clock_divide, TIMING_CLOCK_DIVIDE);
-- val |= BF_SSP(clock_rate, TIMING_CLOCK_RATE);
-- writel(val, ssp->base + HW_SSP_TIMING(ssp));
--
-- ssp->clk_rate = ssp_sck;
--
-- dev_dbg(mmc_dev(host->mmc),
-- "%s: clock_divide %d, clock_rate %d, ssp_clk %d, rate_actual %d, rate_requested %d\n",
-- __func__, clock_divide, clock_rate, ssp_clk, ssp_sck, rate);
--}
--
- static void mxs_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
- {
- struct mxs_mmc_host *host = mmc_priv(mmc);
-@@ -550,7 +513,7 @@ static void mxs_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
- host->bus_width = 0;
-
- if (ios->clock)
-- mxs_mmc_set_clk_rate(host, ios->clock);
-+ mxs_ssp_set_clk_rate(&host->ssp, ios->clock);
- }
-
- static void mxs_mmc_enable_sdio_irq(struct mmc_host *mmc, int enable)
-diff --git a/include/linux/spi/mxs-spi.h b/include/linux/spi/mxs-spi.h
-index 475f69f..d07f8dc 100644
---- a/include/linux/spi/mxs-spi.h
-+++ b/include/linux/spi/mxs-spi.h
-@@ -136,4 +136,6 @@ struct mxs_ssp {
- enum mxs_ssp_id devid;
- };
-
-+void mxs_ssp_set_clk_rate(struct mxs_ssp *ssp, unsigned int rate);
-+
- #endif /* __LINUX_SPI_MXS_SPI_H__ */
---
-1.7.10.4
-
-
-_______________________________________________
-linux-arm-kernel mailing list
-lin...@li...
-http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
-
diff --git a/patches/linux/3.5/0412-pengutronix-mx28-spi_Add_SPI_driver_for_mx233_mx28.patch b/patches/linux/3.5/0412-pengutronix-mx28-spi_Add_SPI_driver_for_mx233_mx28.patch
deleted file mode 100644
index fc35acc..0000000
--- a/patches/linux/3.5/0412-pengutronix-mx28-spi_Add_SPI_driver_for_mx233_mx28.patch
+++ /dev/null
@@ -1,503 +0,0 @@
-This is slightly reworked version of the SPI driver.
-Support for DT has been added and it's been converted
-to queued API.
-
-Based on previous attempt by:
-Fabio Estevam <fab...@fr...>
-
-Signed-off-by: Fabio Estevam <fab...@fr...>
-Signed-off-by: Marek Vasut <ma...@de...>
-Cc: Attila Kinali <at...@ki...>
-Cc: Chris Ball <cj...@la...>
-CC: Dong Aisheng <b2...@fr...>
-Cc: Grant Likely <gra...@se...>
-Cc: Linux ARM kernel <lin...@li...>
-Cc: Mark Brown <br...@op...>
-CC: Shawn Guo <sha...@li...>
----
- drivers/spi/Kconfig | 7 +
- drivers/spi/Makefile | 1 +
- drivers/spi/spi-mxs.c | 431 +++++++++++++++++++++++++++++++++++++++++++++++++
- 3 files changed, 439 insertions(+)
- create mode 100644 drivers/spi/spi-mxs.c
-
-V3: Drop mxs_spi_cleanup()
- Set "hz" unconditionally to dev->max_speed_hz and then trim it down.
- Add comment about how Freescale is recycling random bits in CTRL0 register.
-
-diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
-index 5f84b55..6992b30 100644
---- a/drivers/spi/Kconfig
-+++ b/drivers/spi/Kconfig
-@@ -364,6 +364,13 @@ config SPI_STMP3XXX
- help
- SPI driver for Freescale STMP37xx/378x SoC SSP interface
-
-+config SPI_MXS
-+ tristate "Freescale MXS SPI controller"
-+ depends on ARCH_MXS
-+ select STMP_DEVICE
-+ help
-+ SPI driver for Freescale MXS devices.
-+
- config SPI_TEGRA
- tristate "Nvidia Tegra SPI controller"
- depends on ARCH_TEGRA && (TEGRA_SYSTEM_DMA || TEGRA20_APB_DMA)
-diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile
-index 3920dcf..3b72d87 100644
---- a/drivers/spi/Makefile
-+++ b/drivers/spi/Makefile
-@@ -36,6 +36,7 @@ obj-$(CONFIG_SPI_LM70_LLP) += spi-lm70llp.o
- obj-$(CONFIG_SPI_MPC512x_PSC) += spi-mpc512x-psc.o
- obj-$(CONFIG_SPI_MPC52xx_PSC) += spi-mpc52xx-psc.o
- obj-$(CONFIG_SPI_MPC52xx) += spi-mpc52xx.o
-+obj-$(CONFIG_SPI_MXS) += spi-mxs.o
- obj-$(CONFIG_SPI_NUC900) += spi-nuc900.o
- obj-$(CONFIG_SPI_OC_TINY) += spi-oc-tiny.o
- obj-$(CONFIG_SPI_OMAP_UWIRE) += spi-omap-uwire.o
-diff --git a/drivers/spi/spi-mxs.c b/drivers/spi/spi-mxs.c
-new file mode 100644
-index 0000000..7bf826f
---- /dev/null
-+++ b/drivers/spi/spi-mxs.c
-@@ -0,0 +1,431 @@
-+/*
-+ * Freescale MXS SPI master driver
-+ *
-+ * Copyright 2012 DENX Software Engineering, GmbH.
-+ * Copyright 2012 Freescale Semiconductor, Inc.
-+ * Copyright 2008 Embedded Alley Solutions, Inc All Rights Reserved.
-+ *
-+ * Rework and transition to new API by:
-+ * Marek Vasut <ma...@de...>
-+ *
-+ * Based on previous attempt by:
-+ * Fabio Estevam <fab...@fr...>
-+ *
-+ * Based on code from U-Boot bootloader by:
-+ * Marek Vasut <ma...@de...>
-+ *
-+ * Based on spi-stmp.c, which is:
-+ * Author: Dmitry Pervushin <di...@em...>
-+ *
-+ * 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; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ */
-+
-+#include <linux/kernel.h>
-+#include <linux/init.h>
-+#include <linux/ioport.h>
-+#include <linux/of.h>
-+#include <linux/of_device.h>
-+#include <linux/of_gpio.h>
-+#include <linux/platform_device.h>
-+#include <linux/delay.h>
-+#include <linux/interrupt.h>
-+#include <linux/dma-mapping.h>
-+#include <linux/dmaengine.h>
-+#include <linux/highmem.h>
-+#include <linux/clk.h>
-+#include <linux/err.h>
-+#include <linux/completion.h>
-+#include <linux/gpio.h>
-+#include <linux/regulator/consumer.h>
-+#include <linux/module.h>
-+#include <linux/fsl/mxs-dma.h>
-+#include <linux/pinctrl/consumer.h>
-+#include <linux/stmp_device.h>
-+#include <linux/spi/spi.h>
-+#include <linux/spi/mxs-spi.h>
-+
-+#define DRIVER_NAME "mxs-spi"
-+
-+#define SSP_TIMEOUT 1000 /* 1000 ms */
-+
-+struct mxs_spi {
-+ struct mxs_ssp ssp;
-+};
-+
-+static int mxs_spi_setup_transfer(struct spi_device *dev,
-+ struct spi_transfer *t)
-+{
-+ struct mxs_spi *spi = spi_master_get_devdata(dev->master);
-+ struct mxs_ssp *ssp = &spi->ssp;
-+ uint8_t bits_per_word;
-+ uint32_t hz = 0;
-+
-+ bits_per_word = dev->bits_per_word;
-+ if (t && t->bits_per_word)
-+ bits_per_word = t->bits_per_word;
-+
-+ if (bits_per_word != 8) {
-+ dev_err(&dev->dev, "%s, unsupported bits_per_word=%d\n",
-+ __func__, bits_per_word);
-+ return -EINVAL;
-+ }
-+
-+ hz = dev->max_speed_hz;
-+ if (t && t->speed_hz)
-+ hz = min(hz, t->speed_hz);
-+ if (hz == 0) {
-+ dev_err(&dev->dev, "Cannot continue with zero clock\n");
-+ return -EINVAL;
-+ }
-+
-+ mxs_ssp_set_clk_rate(ssp, hz);
-+
-+ writel(BF_SSP_CTRL1_SSP_MODE(BV_SSP_CTRL1_SSP_MODE__SPI) |
-+ BF_SSP_CTRL1_WORD_LENGTH
-+ (BV_SSP_CTRL1_WORD_LENGTH__EIGHT_BITS) |
-+ ((dev->mode & SPI_CPOL) ? BM_SSP_CTRL1_POLARITY : 0) |
-+ ((dev->mode & SPI_CPHA) ? BM_SSP_CTRL1_PHASE : 0),
-+ ssp->base + HW_SSP_CTRL1(ssp));
-+
-+ writel(0x0, ssp->base + HW_SSP_CMD0);
-+ writel(0x0, ssp->base + HW_SSP_CMD1);
-+
-+ return 0;
-+}
-+
-+static int mxs_spi_setup(struct spi_device *dev)
-+{
-+ int err = 0;
-+
-+ if (!dev->bits_per_word)
-+ dev->bits_per_word = 8;
-+
-+ if (dev->mode & ~(SPI_CPOL | SPI_CPHA))
-+ return -EINVAL;
-+
-+ err = mxs_spi_setup_transfer(dev, NULL);
-+ if (err) {
-+ dev_err(&dev->dev,
-+ "Failed to setup transfer, error = %d\n", err);
-+ }
-+
-+ return err;
-+}
-+
-+static uint32_t mxs_spi_cs_to_reg(unsigned cs)
-+{
-+ uint32_t select = 0;
-+
-+ /*
-+ * i.MX28 Datasheet: 17.10.1: HW_SSP_CTRL0
-+ *
-+ * The bits BM_SSP_CTRL0_WAIT_FOR_CMD and BM_SSP_CTRL0_WAIT_FOR_IRQ
-+ * in HW_SSP_CTRL0 register do have multiple usage, please refer to
-+ * the datasheet for further details. In SPI mode, they are used to
-+ * toggle the chip-select lines (nCS pins).
-+ */
-+ if (cs & 1)
-+ select |= BM_SSP_CTRL0_WAIT_FOR_CMD;
-+ if (cs & 2)
-+ select |= BM_SSP_CTRL0_WAIT_FOR_IRQ;
-+
-+ return select;
-+}
-+
-+static void mxs_spi_set_cs(struct mxs_spi *spi, unsigned cs)
-+{
-+ const uint32_t mask =
-+ BM_SSP_CTRL0_WAIT_FOR_CMD | BM_SSP_CTRL0_WAIT_FOR_IRQ;
-+ uint32_t select;
-+ struct mxs_ssp *ssp = &spi->ssp;
-+
-+ writel(mask, ssp->base + HW_SSP_CTRL0 + STMP_OFFSET_REG_CLR);
-+ select = mxs_spi_cs_to_reg(cs);
-+ writel(select, ssp->base + HW_SSP_CTRL0 + STMP_OFFSET_REG_SET);
-+}
-+
-+static inline void mxs_spi_enable(struct mxs_spi *spi)
-+{
-+ struct mxs_ssp *ssp = &spi->ssp;
-+
-+ writel(BM_SSP_CTRL0_LOCK_CS,
-+ ssp->base + HW_SSP_CTRL0 + STMP_OFFSET_REG_SET);
-+ writel(BM_SSP_CTRL0_IGNORE_CRC,
-+ ssp->base + HW_SSP_CTRL0 + STMP_OFFSET_REG_CLR);
-+}
-+
-+static inline void mxs_spi_disable(struct mxs_spi *spi)
-+{
-+ struct mxs_ssp *ssp = &spi->ssp;
-+
-+ writel(BM_SSP_CTRL0_LOCK_CS,
-+ ssp->base + HW_SSP_CTRL0 + STMP_OFFSET_REG_CLR);
-+ writel(BM_SSP_CTRL0_IGNORE_CRC,
-+ ssp->base + HW_SSP_CTRL0 + STMP_OFFSET_REG_SET);
-+}
-+
-+static int mxs_ssp_wait(struct mxs_spi *spi, int offset, int mask, bool set)
-+{
-+ unsigned long timeout = jiffies + msecs_to_jiffies(SSP_TIMEOUT);
-+ struct mxs_ssp *ssp = &spi->ssp;
-+ uint32_t reg;
-+
-+ while (1) {
-+ reg = readl_relaxed(ssp->base + offset);
-+
-+ if (set && ((reg & mask) == mask))
-+ break;
-+
-+ if (!set && ((~reg & mask) == mask))
-+ break;
-+
-+ udelay(1);
-+
-+ if (time_after(jiffies, timeout))
-+ return -ETIMEDOUT;
-+ }
-+ return 0;
-+}
-+
-+static int mxs_spi_txrx_pio(struct mxs_spi *spi, int cs,
-+ unsigned char *buf, int len,
-+ int *first, int *last, int write)
-+{
-+ struct mxs_ssp *ssp = &spi->ssp;
-+
-+ if (*first)
-+ mxs_spi_enable(spi);
-+
-+ mxs_spi_set_cs(spi, cs);
-+
-+ while (len--) {
-+ if (*last && len == 0)
-+ mxs_spi_disable(spi);
-+
-+ if (ssp->devid == IMX23_SSP) {
-+ writel(BM_SSP_CTRL0_XFER_COUNT,
-+ ssp->base + HW_SSP_CTRL0 + STMP_OFFSET_REG_CLR);
-+ writel(1,
-+ ssp->base + HW_SSP_CTRL0 + STMP_OFFSET_REG_SET);
-+ } else {
-+ writel(1, ssp->base + HW_SSP_XFER_SIZE);
-+ }
-+
-+ if (write)
-+ writel(BM_SSP_CTRL0_READ,
-+ ssp->base + HW_SSP_CTRL0 + STMP_OFFSET_REG_CLR);
-+ else
-+ writel(BM_SSP_CTRL0_READ,
-+ ssp->base + HW_SSP_CTRL0 + STMP_OFFSET_REG_SET);
-+
-+ writel(BM_SSP_CTRL0_RUN,
-+ ssp->base + HW_SSP_CTRL0 + STMP_OFFSET_REG_SET);
-+
-+ if (mxs_ssp_wait(spi, HW_SSP_CTRL0, BM_SSP_CTRL0_RUN, 1))
-+ return -ETIMEDOUT;
-+
-+ if (write)
-+ writel(*buf, ssp->base + HW_SSP_DATA(ssp));
-+
-+ writel(BM_SSP_CTRL0_DATA_XFER,
-+ ssp->base + HW_SSP_CTRL0 + STMP_OFFSET_REG_SET);
-+
-+ if (!write) {
-+ if (mxs_ssp_wait(spi, HW_SSP_STATUS(ssp),
-+ BM_SSP_STATUS_FIFO_EMPTY, 0))
-+ return -ETIMEDOUT;
-+
-+ *buf = (readl(ssp->base + HW_SSP_DATA(ssp)) & 0xff);
-+ }
-+
-+ if (mxs_ssp_wait(spi, HW_SSP_CTRL0, BM_SSP_CTRL0_RUN, 0))
-+ return -ETIMEDOUT;
-+
-+ buf++;
-+ }
-+
-+ if (len <= 0)
-+ return 0;
-+
-+ return -ETIMEDOUT;
-+}
-+
-+static int mxs_spi_transfer_one(struct spi_master *master,
-+ struct spi_message *m)
-+{
-+ struct mxs_spi *spi = spi_master_get_devdata(master);
-+ struct mxs_ssp *ssp = &spi->ssp;
-+ int first, last;
-+ struct spi_transfer *t, *tmp_t;
-+ int status = 0;
-+ int cs;
-+
-+ first = last = 0;
-+
-+ cs = m->spi->chip_select;
-+
-+ list_for_each_entry_safe(t, tmp_t, &m->transfers, transfer_list) {
-+
-+ status = mxs_spi_setup_transfer(m->spi, t);
-+ if (status)
-+ break;
-+
-+ if (&t->transfer_list == m->transfers.next)
-+ first = 1;
-+ if (&t->transfer_list == m->transfers.prev)
-+ last = 1;
-+ if (t->rx_buf && t->tx_buf) {
-+ dev_err(ssp->dev,
-+ "Cannot send and receive simultaneously\n");
-+ status = -EINVAL;
-+ break;
-+ }
-+
-+ if (t->tx_buf)
-+ status = mxs_spi_txrx_pio(spi, cs, (void *)t->tx_buf,
-+ t->len, &first, &last, 1);
-+ if (t->rx_buf)
-+ status = mxs_spi_txrx_pio(spi, cs, t->rx_buf,
-+ t->len, &first, &last, 0);
-+
-+ m->actual_length += t->len;
-+ if (status)
-+ break;
-+
-+ first = last = 0;
-+ }
-+
-+ m->status = 0;
-+ spi_finalize_current_message(master);
-+
-+ return status;
-+}
-+
-+static const struct of_device_id mxs_spi_dt_ids[] = {
-+ { .compatible = "fsl,imx23-spi", .data = (void *) IMX23_SSP, },
-+ { .compatible = "fsl,imx28-spi", .data = (void *) IMX28_SSP, },
-+ { /* sentinel */ }
-+};
-+MODULE_DEVICE_TABLE(of, mxs_spi_dt_ids);
-+
-+static int __devinit mxs_spi_probe(struct platform_device *pdev)
-+{
-+ const struct of_device_id *of_id =
-+ of_match_device(mxs_spi_dt_ids, &pdev->dev);
-+ struct device_node *np = pdev->dev.of_node;
-+ struct spi_master *master;
-+ struct mxs_spi *spi;
-+ struct mxs_ssp *ssp;
-+ struct resource *iores;
-+ struct pinctrl *pinctrl;
-+ struct clk *clk;
-+ void __iomem *base;
-+ int devid;
-+ int ret = 0;
-+
-+ iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-+ if (!iores)
-+ return -EINVAL;
-+
-+ base = devm_request_and_ioremap(&pdev->dev, iores);
-+ if (!base)
-+ return -EADDRNOTAVAIL;
-+
-+ pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
-+ if (IS_ERR(pinctrl))
-+ return PTR_ERR(pinctrl);
-+
-+ clk = devm_clk_get(&pdev->dev, NULL);
-+ if (IS_ERR(clk))
-+ return PTR_ERR(clk);
-+
-+ if (np)
-+ devid = (enum mxs_ssp_id) of_id->data;
-+ else
-+ devid = pdev->id_entry->driver_data;
-+
-+ master = spi_alloc_master(&pdev->dev, sizeof(*spi));
-+ if (!master)
-+ return -ENOMEM;
-+
-+ master->transfer_one_message = mxs_spi_transfer_one;
-+ master->setup = mxs_spi_setup;
-+ master->mode_bits = SPI_CPOL | SPI_CPHA;
-+ master->num_chipselect = 3;
-+ master->dev.of_node = np;
-+ master->flags = SPI_MASTER_HALF_DUPLEX;
-+
-+ spi = spi_master_get_devdata(master);
-+ ssp = &spi->ssp;
-+ ssp->dev = &pdev->dev;
-+ ssp->clk = clk;
-+ ssp->base = base;
-+ ssp->devid = devid;
-+
-+ clk_prepare_enable(ssp->clk);
-+ ssp->clk_rate = clk_get_rate(ssp->clk) / 1000;
-+
-+ stmp_reset_block(ssp->base);
-+
-+ platform_set_drvdata(pdev, master);
-+
-+ ret = spi_register_master(master);
-+ if (ret) {
-+ dev_err(&pdev->dev, "Cannot register SPI master, %d\n", ret);
-+ goto out_master_free;
-+ }
-+
-+ return 0;
-+
-+out_master_free:
-+ platform_set_drvdata(pdev, NULL);
-+ clk_disable_unprepare(ssp->clk);
-+ spi_master_put(master);
-+ return ret;
-+}
-+
-+static int __devexit mxs_spi_remove(struct platform_device *pdev)
-+{
-+ struct spi_master *master;
-+ struct mxs_spi *spi;
-+ struct mxs_ssp *ssp;
-+
-+ master = platform_get_drvdata(pdev);
-+ spi = spi_master_get_devdata(master);
-+ ssp = &spi->ssp;
-+
-+ spi_unregister_master(master);
-+
-+ platform_set_drvdata(pdev, NULL);
-+
-+ clk_disable_unprepare(ssp->clk);
-+
-+ spi_master_put(master);
-+
-+ return 0;
-+}
-+
-+static struct platform_driver mxs_spi_driver = {
-+ .probe = mxs_spi_probe,
-+ .remove = __devexit_p(mxs_spi_remove),
-+ .driver = {
-+ .name = DRIVER_NAME,
-+ .owner = THIS_MODULE,
-+ .of_match_table = mxs_spi_dt_ids,
-+ },
-+};
-+
-+module_platform_driver(mxs_spi_driver);
-+
-+MODULE_AUTHOR("Marek Vasut <ma...@de...>");
-+MODULE_DESCRIPTION("MXS SPI master driver");
-+MODULE_LICENSE("GPL");
-+MODULE_ALIAS("platform:mxs-spi");
---
-1.7.10.4
-
-
-_______________________________________________
-linux-arm-kernel mailing list
-lin...@li...
-http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
-
diff --git a/patches/linux/3.5/0413-pengutronix-mx28-mmc_spi_Pull_out_common_DMA_parts_from_MXS_MMC.patch b/patches/linux/3.5/0413-pengutronix-mx28-mmc_spi_Pull_out_common_DMA_parts_from_MXS_MMC.patch
deleted file mode 100644
index a8add37..0000000
--- a/patches/linux/3.5/0413-pengutronix-mx28-mmc_spi_Pull_out_common_DMA_parts_from_MXS_MMC.patch
+++ /dev/null
@@ -1,318 +0,0 @@
-
-These parts will be used by the MXS SPI driver too.
-
-Signed-off-by: Marek Vasut <ma...@de...>
-Cc: Attila Kinali <at...@ki...>
-Cc: Chris Ball <cj...@la...>
-CC: Dong Aisheng <b2...@fr...>
-Cc: Fabio Estevam <fab...@fr...>
-Cc: Grant Likely <gra...@se...>
-Cc: Linux ARM kernel <lin...@li...>
-Cc: Mark Brown <br...@op...>
-CC: Shawn Guo <sha...@li...>
----
- drivers/mmc/host/mxs-mmc.c | 88 +++++++++++++++++++++----------------------
- drivers/spi/spi-mxs.c | 1 -
- include/linux/spi/mxs-spi.h | 9 +++++
- 3 files changed, 51 insertions(+), 47 deletions(-)
-
-diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
-index 0813340..4da9966 100644
---- a/drivers/mmc/host/mxs-mmc.c
-+++ b/drivers/mmc/host/mxs-mmc.c
-@@ -41,7 +41,6 @@
- #include <linux/gpio.h>
- #include <linux/regulator/consumer.h>
- #include <linux/module.h>
--#include <linux/fsl/mxs-dma.h>
- #include <linux/pinctrl/consumer.h>
- #include <linux/stmp_device.h>
- #include <linux/mmc/mxs-mmc.h>
-@@ -69,13 +68,6 @@ struct mxs_mmc_host {
- struct mmc_command *cmd;
- struct mmc_data *data;
-
-- int dma_channel;
-- struct dma_chan *dmach;
-- struct mxs_dma_data dma_data;
-- unsigned int dma_dir;
-- enum dma_transfer_direction slave_dirn;
-- u32 ssp_pio_words[SSP_PIO_NUM];
--
- unsigned char bus_width;
- spinlock_t lock;
- int sdio_irq_en;
-@@ -163,7 +155,7 @@ static void mxs_mmc_request_done(struct mxs_mmc_host *host)
-
- if (data) {
- dma_unmap_sg(mmc_dev(host->mmc), data->sg,
-- data->sg_len, host->dma_dir);
-+ data->sg_len, ssp->dma_dir);
- /*
- * If there was an error on any block, we mark all
- * data blocks as being in error.
-@@ -232,6 +224,7 @@ static irqreturn_t mxs_mmc_irq_handler(int irq, void *dev_id)
- static struct dma_async_tx_descriptor *mxs_mmc_prep_dma(
- struct mxs_mmc_host *host, unsigned long flags)
- {
-+ struct mxs_ssp *ssp = &host->ssp;
- struct dma_async_tx_descriptor *desc;
- struct mmc_data *data = host->data;
- struct scatterlist * sgl;
-@@ -240,24 +233,24 @@ static struct dma_async_tx_descriptor *mxs_mmc_prep_dma(
- if (data) {
- /* data */
- dma_map_sg(mmc_dev(host->mmc), data->sg,
-- data->sg_len, host->dma_dir);
-+ data->sg_len, ssp->dma_dir);
- sgl = data->sg;
- sg_len = data->sg_len;
- } else {
- /* pio */
-- sgl = (struct scatterlist *) host->ssp_pio_words;
-+ sgl = (struct scatterlist *) ssp->ssp_pio_words;
- sg_len = SSP_PIO_NUM;
- }
-
-- desc = dmaengine_prep_slave_sg(host->dmach,
-- sgl, sg_len, host->slave_dirn, flags);
-+ desc = dmaengine_prep_slave_sg(ssp->dmach,
-+ sgl, sg_len, ssp->slave_dirn, flags);
- if (desc) {
- desc->callback = mxs_mmc_dma_irq_callback;
- desc->callback_param = host;
- } else {
- if (data)
- dma_unmap_sg(mmc_dev(host->mmc), data->sg,
-- data->sg_len, host->dma_dir);
-+ data->sg_len, ssp->dma_dir);
- }
-
- return desc;
-@@ -265,6 +258,7 @@ static struct dma_async_tx_descriptor *mxs_mmc_prep_dma(
-
- static void mxs_mmc_bc(struct mxs_mmc_host *host)
- {
-+ struct mxs_ssp *ssp = &host->ssp;
- struct mmc_command *cmd = host->cmd;
- struct dma_async_tx_descriptor *desc;
- u32 ctrl0, cmd0, cmd1;
-@@ -278,17 +272,17 @@ static void mxs_mmc_bc(struct mxs_mmc_host *host)
- cmd0 |= BM_SSP_CMD0_CONT_CLKING_EN | BM_SSP_CMD0_SLOW_CLKING_EN;
- }
-
-- host->ssp_pio_words[0] = ctrl0;
-- host->ssp_pio_words[1] = cmd0;
-- host->ssp_pio_words[2] = cmd1;
-- host->dma_dir = DMA_NONE;
-- host->slave_dirn = DMA_TRANS_NONE;
-+ ssp->ssp_pio_words[0] = ctrl0;
-+ ssp->ssp_pio_words[1] = cmd0;
-+ ssp->ssp_pio_words[2] = cmd1;
-+ ssp->dma_dir = DMA_NONE;
-+ ssp->slave_dirn = DMA_TRANS_NONE;
- desc = mxs_mmc_prep_dma(host, DMA_CTRL_ACK);
- if (!desc)
- goto out;
-
- dmaengine_submit(desc);
-- dma_async_issue_pending(host->dmach);
-+ dma_async_issue_pending(ssp->dmach);
- return;
-
- out:
-@@ -298,6 +292,7 @@ out:
-
- static void mxs_mmc_ac(struct mxs_mmc_host *host)
- {
-+ struct mxs_ssp *ssp = &host->ssp;
- struct mmc_command *cmd = host->cmd;
- struct dma_async_tx_descriptor *desc;
- u32 ignore_crc, get_resp, long_resp;
-@@ -319,17 +314,17 @@ static void mxs_mmc_ac(struct mxs_mmc_host *host)
- cmd0 |= BM_SSP_CMD0_CONT_CLKING_EN | BM_SSP_CMD0_SLOW_CLKING_EN;
- }
-
-- host->ssp_pio_words[0] = ctrl0;
-- host->ssp_pio_words[1] = cmd0;
-- host->ssp_pio_words[2] = cmd1;
-- host->dma_dir = DMA_NONE;
-- ...
[truncated message content] |
|
From: Julien B a. A. <ar...@us...> - 2012-09-29 18:36:22
|
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 a4081835c09d1913c189a8f87fb430a3e75a6af0 (commit)
via 9fa9cfa6eb2e0bd36f56ac5e8ef23a656a528d4b (commit)
from f5cfcb8a60c12c42825c53c7c7ba5f45d3b10fe2 (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 a4081835c09d1913c189a8f87fb430a3e75a6af0
Merge: 9fa9cfa f5cfcb8
Author: Julien Boibessot <jul...@ar...>
Date: Sat Sep 29 19:02:03 2012 +0200
Merge branch 'master' of ssh://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
Conflicts:
patches/linux/3.6/0420-armadeus-Add-apf28dev-dts.patch
commit 9fa9cfa6eb2e0bd36f56ac5e8ef23a656a528d4b
Author: Julien Boibessot <jul...@ar...>
Date: Sat Sep 29 18:52:48 2012 +0200
[LINUX] 3.6 APF28Dev DT: Fixes MMC declaration and do not put SPI2 in spidev mode by default
-----------------------------------------------------------------------
Summary of changes:
.../linux/3.6/0420-armadeus-Add-apf28dev-dts.patch | 19 +++++++++----------
1 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/patches/linux/3.6/0420-armadeus-Add-apf28dev-dts.patch b/patches/linux/3.6/0420-armadeus-Add-apf28dev-dts.patch
index cbb8ddb..c13f03c 100644
--- a/patches/linux/3.6/0420-armadeus-Add-apf28dev-dts.patch
+++ b/patches/linux/3.6/0420-armadeus-Add-apf28dev-dts.patch
@@ -29,14 +29,14 @@ Index: linux-3.6-rc6/arch/arm/boot/dts/imx28-apf28dev.dts
+ ssp0: ssp@80010000 {
+ compatible = "fsl,imx28-mmc";
+ pinctrl-names = "default";
-+ pinctrl-0 = <&mmc0_8bit_pins_a
++ pinctrl-0 = <&mmc0_4bit_pins_a
+ &mmc0_cd_cfg &mmc0_sck_cfg>;
-+ bus-width = <8>;
-+ wp-gpios = <&gpio2 12 0>;
++ bus-width = <4>;
+ vmmc-supply = <®_vddio_sd0>;
+ status = "okay";
+ };
+
++/* Uncomment to have spidev on SPI2 (ChipSelect 0):
+ ssp2: ssp@80014000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
@@ -48,11 +48,11 @@ Index: linux-3.6-rc6/arch/arm/boot/dts/imx28-apf28dev.dts
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "spidev";
-+ reg = <0>; //Chip select 0
++ reg = <0>;
+ spi-max-frequency = <3125000>;
+ };
+ };
-+
++*/
+ pinctrl@80018000 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&hog_pins_apf28dev>;
@@ -177,9 +177,9 @@ Index: linux-3.6-rc6/arch/arm/boot/dts/imx28-apf28dev.dts
+};
Index: linux-3.6-rc6/arch/arm/mach-mxs/mach-mxs.c
===================================================================
---- linux-3.6-rc6.orig/arch/arm/mach-mxs/mach-mxs.c
-+++ linux-3.6-rc6/arch/arm/mach-mxs/mach-mxs.c
-@@ -97,6 +97,25 @@ static struct fb_videomode apx4devkit_vi
+--- linux-3.6-rc6.orig/arch/arm/mach-mxs/mach-mxs.c 2012-09-28 16:58:54.000000000 +0200
++++ linux-3.6-rc6/arch/arm/mach-mxs/mach-mxs.c 2012-09-28 16:58:54.000000000 +0200
+@@ -97,6 +97,25 @@
},
};
@@ -205,11 +205,10 @@ Index: linux-3.6-rc6/arch/arm/mach-mxs/mach-mxs.c
static struct mxsfb_platform_data mxsfb_pdata __initdata;
static struct of_dev_auxdata mxs_auxdata_lookup[] __initdata = {
-@@ -280,6 +299,12 @@ static void __init apf28_init(void)
+@@ -280,6 +299,11 @@
{
enable_clk_enet_out();
/*update_fec_mac_prop(OUI_ARMADEUS);TBDL*/
-+ printk("--------############\n");
+
+ mxsfb_pdata.mode_list = apf28dev_video_modes;
+ mxsfb_pdata.mode_count = ARRAY_SIZE(apf28dev_video_modes);
hooks/post-receive
--
armadeus
|
|
From: Gwenhael Goavec-M. <gwe...@us...> - 2012-09-29 09:33:42
|
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 f5cfcb8a60c12c42825c53c7c7ba5f45d3b10fe2 (commit)
via d96b8a2e2835171a988a29248f9e15849e29cdf7 (commit)
via dbfdfa33b1d20596b388470bfbe6491cbeec1092 (commit)
from 2e10489645e8b8e04f953ef6d140a0da2cf2b387 (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 f5cfcb8a60c12c42825c53c7c7ba5f45d3b10fe2
Author: Gwenhael Goavec-Merou <gw...@tr...>
Date: Sat Sep 29 11:32:45 2012 +0200
[LINUX][3.6] apf28 config: Select IIO, staging and LRADC by default
commit d96b8a2e2835171a988a29248f9e15849e29cdf7
Author: Gwenhael Goavec-Merou <gw...@tr...>
Date: Sat Sep 29 11:31:59 2012 +0200
[LINUX][3.6] apf28-dev dts: Add support for LRADC
commit dbfdfa33b1d20596b388470bfbe6491cbeec1092
Author: Gwenhael Goavec-Merou <gw...@tr...>
Date: Sat Sep 29 11:31:20 2012 +0200
[LINUX][3.6] mx28: Backport patches for LRADC integration
-----------------------------------------------------------------------
Summary of changes:
.../device/armadeus/apf28/apf28-linux-3.6.config | 3 +
.../linux/3.6/0420-armadeus-Add-apf28dev-dts.patch | 18 +-
...tronix-mxs-IIO-Add_basic_MXS_LRADC_driver.patch | 678 ++++++++++++++++++++
...ts-Add_compatible_and_interrupt_for_LRADC.patch | 33 +
4 files changed, 725 insertions(+), 7 deletions(-)
create mode 100644 patches/linux/3.6/421-pengutronix-mxs-IIO-Add_basic_MXS_LRADC_driver.patch
create mode 100644 patches/linux/3.6/422-pengutronix-mx28-dts-Add_compatible_and_interrupt_for_LRADC.patch
diff --git a/buildroot/target/device/armadeus/apf28/apf28-linux-3.6.config b/buildroot/target/device/armadeus/apf28/apf28-linux-3.6.config
index 4e75dc9..edb8bee 100644
--- a/buildroot/target/device/armadeus/apf28/apf28-linux-3.6.config
+++ b/buildroot/target/device/armadeus/apf28/apf28-linux-3.6.config
@@ -150,6 +150,9 @@ CONFIG_RTC_CLASS=y
CONFIG_RTC_DRV_STMP=y
CONFIG_DMADEVICES=y
CONFIG_MXS_DMA=y
+CONFIG_STAGING=y
+CONFIG_MXS_LRADC=y
+CONFIG_IIO=y
CONFIG_PWM=y
CONFIG_PWM_MXS=y
CONFIG_EXT2_FS=y
diff --git a/patches/linux/3.6/0420-armadeus-Add-apf28dev-dts.patch b/patches/linux/3.6/0420-armadeus-Add-apf28dev-dts.patch
index 6da70f2..cbb8ddb 100644
--- a/patches/linux/3.6/0420-armadeus-Add-apf28dev-dts.patch
+++ b/patches/linux/3.6/0420-armadeus-Add-apf28dev-dts.patch
@@ -3,9 +3,9 @@ Signed-off-by: Julien Boibessot <jul...@ar...>
Index: linux-3.6-rc6/arch/arm/boot/dts/imx28-apf28dev.dts
===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-3.6-rc6/arch/arm/boot/dts/imx28-apf28dev.dts 2012-09-25 21:23:27.000000000 +0200
-@@ -0,0 +1,165 @@
+--- /dev/null
++++ linux-3.6-rc6/arch/arm/boot/dts/imx28-apf28dev.dts
+@@ -0,0 +1,169 @@
+/*
+ * Copyright 2012 Armadeus Systems - <su...@ar...>
+ *
@@ -98,6 +98,10 @@ Index: linux-3.6-rc6/arch/arm/boot/dts/imx28-apf28dev.dts
+ };
+
+ apbx@80040000 {
++ lradc@80050000 {
++ status = "okay";
++ };
++
+ pwm: pwm@80064000 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pwm3_pins_a &pwm4_pins_a>;
@@ -173,9 +177,9 @@ Index: linux-3.6-rc6/arch/arm/boot/dts/imx28-apf28dev.dts
+};
Index: linux-3.6-rc6/arch/arm/mach-mxs/mach-mxs.c
===================================================================
---- linux-3.6-rc6.orig/arch/arm/mach-mxs/mach-mxs.c 2012-09-25 20:36:06.000000000 +0200
-+++ linux-3.6-rc6/arch/arm/mach-mxs/mach-mxs.c 2012-09-25 20:38:49.000000000 +0200
-@@ -97,6 +97,25 @@
+--- linux-3.6-rc6.orig/arch/arm/mach-mxs/mach-mxs.c
++++ linux-3.6-rc6/arch/arm/mach-mxs/mach-mxs.c
+@@ -97,6 +97,25 @@ static struct fb_videomode apx4devkit_vi
},
};
@@ -201,7 +205,7 @@ Index: linux-3.6-rc6/arch/arm/mach-mxs/mach-mxs.c
static struct mxsfb_platform_data mxsfb_pdata __initdata;
static struct of_dev_auxdata mxs_auxdata_lookup[] __initdata = {
-@@ -280,6 +299,12 @@
+@@ -280,6 +299,12 @@ static void __init apf28_init(void)
{
enable_clk_enet_out();
/*update_fec_mac_prop(OUI_ARMADEUS);TBDL*/
diff --git a/patches/linux/3.6/421-pengutronix-mxs-IIO-Add_basic_MXS_LRADC_driver.patch b/patches/linux/3.6/421-pengutronix-mxs-IIO-Add_basic_MXS_LRADC_driver.patch
new file mode 100644
index 0000000..84a25bb
--- /dev/null
+++ b/patches/linux/3.6/421-pengutronix-mxs-IIO-Add_basic_MXS_LRADC_driver.patch
@@ -0,0 +1,678 @@
+From bc2c90c974a0ed390327bbd94f49269e9f24e280 Mon Sep 17 00:00:00 2001
+From: Marek Vasut <ma...@de...>
+Date: Sun, 12 Aug 2012 16:21:00 +0100
+Subject: [PATCH] IIO: Add basic MXS LRADC driver
+
+This driver is very basic. It supports userland trigger, buffer and
+raw access to channels. The support for delay channels is missing
+altogether.
+
+Signed-off-by: Marek Vasut <ma...@de...>
+Signed-off-by: Jonathan Cameron <ji...@ke...>
+Cc: Jonathan Cameron <ji...@ke...>
+Cc: Juergen Beisert <jb...@pe...>
+Cc: Lars-Peter Clausen <la...@me...>
+Cc: Shawn Guo <sha...@li...>
+Cc: Wolfgang Denk <wd...@de...>
+---
+ .../bindings/staging/iio/adc/mxs-lradc.txt | 15 +
+ drivers/staging/iio/adc/Kconfig | 12 +
+ drivers/staging/iio/adc/Makefile | 1 +
+ drivers/staging/iio/adc/mxs-lradc.c | 590 ++++++++++++++++++++
+ 4 files changed, 618 insertions(+), 0 deletions(-)
+ create mode 100644 Documentation/devicetree/bindings/staging/iio/adc/mxs-lradc.txt
+ create mode 100644 drivers/staging/iio/adc/mxs-lradc.c
+
+diff --git a/Documentation/devicetree/bindings/staging/iio/adc/mxs-lradc.txt b/Documentation/devicetree/bindings/staging/iio/adc/mxs-lradc.txt
+new file mode 100644
+index 0000000..801d58c
+--- /dev/null
++++ b/Documentation/devicetree/bindings/staging/iio/adc/mxs-lradc.txt
+@@ -0,0 +1,15 @@
++* Freescale i.MX28 LRADC device driver
++
++Required properties:
++- compatible: Should be "fsl,imx28-lradc"
++- reg: Address and length of the register set for the device
++- interrupts: Should contain the LRADC interrupts
++
++Examples:
++
++ lradc@80050000 {
++ compatible = "fsl,imx28-lradc";
++ reg = <0x80050000 0x2000>;
++ interrupts = <10 14 15 16 17 18 19
++ 20 21 22 23 24 25>;
++ };
+diff --git a/drivers/staging/iio/adc/Kconfig b/drivers/staging/iio/adc/Kconfig
+index 67711b7..845fb6c 100644
+--- a/drivers/staging/iio/adc/Kconfig
++++ b/drivers/staging/iio/adc/Kconfig
+@@ -200,6 +200,18 @@ config LPC32XX_ADC
+ activate only one via device tree selection. Provides direct access
+ via sysfs.
+
++config MXS_LRADC
++ tristate "Freescale i.MX28 LRADC"
++ depends on ARCH_MXS
++ select IIO_BUFFER
++ select IIO_TRIGGERED_BUFFER
++ help
++ Say yes here to build support for i.MX28 LRADC convertor
++ built into these chips.
++
++ To compile this driver as a module, choose M here: the
++ module will be called mxs-lradc.
++
+ config SPEAR_ADC
+ tristate "ST SPEAr ADC"
+ depends on PLAT_SPEAR
+diff --git a/drivers/staging/iio/adc/Makefile b/drivers/staging/iio/adc/Makefile
+index 14e98b6..ecac9a0 100644
+--- a/drivers/staging/iio/adc/Makefile
++++ b/drivers/staging/iio/adc/Makefile
+@@ -38,4 +38,5 @@ obj-$(CONFIG_ADT7310) += adt7310.o
+ obj-$(CONFIG_ADT7410) += adt7410.o
+ obj-$(CONFIG_AD7280) += ad7280a.o
+ obj-$(CONFIG_LPC32XX_ADC) += lpc32xx_adc.o
++obj-$(CONFIG_MXS_LRADC) += mxs-lradc.o
+ obj-$(CONFIG_SPEAR_ADC) += spear_adc.o
+diff --git a/drivers/staging/iio/adc/mxs-lradc.c b/drivers/staging/iio/adc/mxs-lradc.c
+new file mode 100644
+index 0000000..ae549e5
+--- /dev/null
++++ b/drivers/staging/iio/adc/mxs-lradc.c
+@@ -0,0 +1,590 @@
++/*
++ * Freescale i.MX28 LRADC driver
++ *
++ * Copyright (c) 2012 DENX Software Engineering, GmbH.
++ * Marek Vasut <ma...@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; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ */
++
++#include <linux/interrupt.h>
++#include <linux/device.h>
++#include <linux/kernel.h>
++#include <linux/slab.h>
++#include <linux/of.h>
++#include <linux/of_device.h>
++#include <linux/sysfs.h>
++#include <linux/list.h>
++#include <linux/io.h>
++#include <linux/module.h>
++#include <linux/platform_device.h>
++#include <linux/spinlock.h>
++#include <linux/wait.h>
++#include <linux/sched.h>
++#include <linux/stmp_device.h>
++#include <linux/bitops.h>
++#include <linux/completion.h>
++
++#include <mach/mxs.h>
++#include <mach/common.h>
++
++#include <linux/iio/iio.h>
++#include <linux/iio/buffer.h>
++#include <linux/iio/trigger.h>
++#include <linux/iio/trigger_consumer.h>
++#include <linux/iio/triggered_buffer.h>
++
++#define DRIVER_NAME "mxs-lradc"
++
++#define LRADC_MAX_DELAY_CHANS 4
++#define LRADC_MAX_MAPPED_CHANS 8
++#define LRADC_MAX_TOTAL_CHANS 16
++
++#define LRADC_DELAY_TIMER_HZ 2000
++
++/*
++ * Make this runtime configurable if necessary. Currently, if the buffered mode
++ * is enabled, the LRADC takes LRADC_DELAY_TIMER_LOOP samples of data before
++ * triggering IRQ. The sampling happens every (LRADC_DELAY_TIMER_PER / 2000)
++ * seconds. The result is that the samples arrive every 500mS.
++ */
++#define LRADC_DELAY_TIMER_PER 200
++#define LRADC_DELAY_TIMER_LOOP 5
++
++static const char * const mxs_lradc_irq_name[] = {
++ "mxs-lradc-touchscreen",
++ "mxs-lradc-thresh0",
++ "mxs-lradc-thresh1",
++ "mxs-lradc-channel0",
++ "mxs-lradc-channel1",
++ "mxs-lradc-channel2",
++ "mxs-lradc-channel3",
++ "mxs-lradc-channel4",
++ "mxs-lradc-channel5",
++ "mxs-lradc-channel6",
++ "mxs-lradc-channel7",
++ "mxs-lradc-button0",
++ "mxs-lradc-button1",
++};
++
++struct mxs_lradc_chan {
++ uint8_t slot;
++ uint8_t flags;
++};
++
++struct mxs_lradc {
++ struct device *dev;
++ void __iomem *base;
++ int irq[13];
++
++ uint32_t *buffer;
++ struct iio_trigger *trig;
++
++ struct mutex lock;
++
++ uint8_t enable;
++
++ struct completion completion;
++};
++
++#define LRADC_CTRL0 0x00
++#define LRADC_CTRL0_TOUCH_DETECT_ENABLE (1 << 23)
++#define LRADC_CTRL0_TOUCH_SCREEN_TYPE (1 << 22)
++
++#define LRADC_CTRL1 0x10
++#define LRADC_CTRL1_LRADC_IRQ(n) (1 << (n))
++#define LRADC_CTRL1_LRADC_IRQ_MASK 0x1fff
++#define LRADC_CTRL1_LRADC_IRQ_EN(n) (1 << ((n) + 16))
++#define LRADC_CTRL1_LRADC_IRQ_EN_MASK (0x1fff << 16)
++
++#define LRADC_CTRL2 0x20
++#define LRADC_CTRL2_TEMPSENSE_PWD (1 << 15)
++
++#define LRADC_CH(n) (0x50 + (0x10 * (n)))
++#define LRADC_CH_ACCUMULATE (1 << 29)
++#define LRADC_CH_NUM_SAMPLES_MASK (0x1f << 24)
++#define LRADC_CH_NUM_SAMPLES_OFFSET 24
++#define LRADC_CH_VALUE_MASK 0x3ffff
++#define LRADC_CH_VALUE_OFFSET 0
++
++#define LRADC_DELAY(n) (0xd0 + (0x10 * (n)))
++#define LRADC_DELAY_TRIGGER_LRADCS_MASK (0xff << 24)
++#define LRADC_DELAY_TRIGGER_LRADCS_OFFSET 24
++#define LRADC_DELAY_KICK (1 << 20)
++#define LRADC_DELAY_TRIGGER_DELAYS_MASK (0xf << 16)
++#define LRADC_DELAY_TRIGGER_DELAYS_OFFSET 16
++#define LRADC_DELAY_LOOP_COUNT_MASK (0x1f << 11)
++#define LRADC_DELAY_LOOP_COUNT_OFFSET 11
++#define LRADC_DELAY_DELAY_MASK 0x7ff
++#define LRADC_DELAY_DELAY_OFFSET 0
++
++#define LRADC_CTRL4 0x140
++#define LRADC_CTRL4_LRADCSELECT_MASK(n) (0xf << ((n) * 4))
++#define LRADC_CTRL4_LRADCSELECT_OFFSET(n) ((n) * 4)
++
++/*
++ * Raw I/O operations
++ */
++static int mxs_lradc_read_raw(struct iio_dev *iio_dev,
++ const struct iio_chan_spec *chan,
++ int *val, int *val2, long m)
++{
++ struct mxs_lradc *lradc = iio_priv(iio_dev);
++ int ret;
++
++ if (m != IIO_CHAN_INFO_RAW)
++ return -EINVAL;
++
++ /* Check for invalid channel */
++ if (chan->channel > LRADC_MAX_TOTAL_CHANS)
++ return -EINVAL;
++
++ /*
++ * See if there is no buffered operation in progess. If there is, simply
++ * bail out. This can be improved to support both buffered and raw IO at
++ * the same time, yet the code becomes horribly complicated. Therefore I
++ * applied KISS principle here.
++ */
++ ret = mutex_trylock(&lradc->lock);
++ if (!ret)
++ return -EBUSY;
++
++ INIT_COMPLETION(lradc->completion);
++
++ /*
++ * No buffered operation in progress, map the channel and trigger it.
++ * Virtual channel 0 is always used here as the others are always not
++ * used if doing raw sampling.
++ */
++ writel(LRADC_CTRL1_LRADC_IRQ_EN_MASK,
++ lradc->base + LRADC_CTRL1 + STMP_OFFSET_REG_CLR);
++ writel(0xff, lradc->base + LRADC_CTRL0 + STMP_OFFSET_REG_CLR);
++
++ writel(chan->channel, lradc->base + LRADC_CTRL4);
++ writel(0, lradc->base + LRADC_CH(0));
++
++ /* Enable the IRQ and start sampling the channel. */
++ writel(LRADC_CTRL1_LRADC_IRQ_EN(0),
++ lradc->base + LRADC_CTRL1 + STMP_OFFSET_REG_SET);
++ writel(1 << 0, lradc->base + LRADC_CTRL0 + STMP_OFFSET_REG_SET);
++
++ /* Wait for completion on the channel, 1 second max. */
++ ret = wait_for_completion_killable_timeout(&lradc->completion, HZ);
++ if (!ret)
++ ret = -ETIMEDOUT;
++ if (ret < 0)
++ goto err;
++
++ /* Read the data. */
++ *val = readl(lradc->base + LRADC_CH(0)) & LRADC_CH_VALUE_MASK;
++ ret = IIO_VAL_INT;
++
++err:
++ writel(LRADC_CTRL1_LRADC_IRQ_EN(0),
++ lradc->base + LRADC_CTRL1 + STMP_OFFSET_REG_CLR);
++
++ mutex_unlock(&lradc->lock);
++
++ return ret;
++}
++
++static const struct iio_info mxs_lradc_iio_info = {
++ .driver_module = THIS_MODULE,
++ .read_raw = mxs_lradc_read_raw,
++};
++
++/*
++ * IRQ Handling
++ */
++static irqreturn_t mxs_lradc_handle_irq(int irq, void *data)
++{
++ struct iio_dev *iio = data;
++ struct mxs_lradc *lradc = iio_priv(iio);
++ unsigned long reg = readl(lradc->base + LRADC_CTRL1);
++
++ if (!(reg & LRADC_CTRL1_LRADC_IRQ_MASK))
++ return IRQ_NONE;
++
++ /*
++ * Touchscreen IRQ handling code shall probably have priority
++ * and therefore shall be placed here.
++ */
++
++ if (iio_buffer_enabled(iio))
++ iio_trigger_poll(iio->trig, iio_get_time_ns());
++ else if (reg & LRADC_CTRL1_LRADC_IRQ(0))
++ complete(&lradc->completion);
++
++ writel(reg & LRADC_CTRL1_LRADC_IRQ_MASK,
++ lradc->base + LRADC_CTRL1 + STMP_OFFSET_REG_CLR);
++
++ return IRQ_HANDLED;
++}
++
++/*
++ * Trigger handling
++ */
++static irqreturn_t mxs_lradc_trigger_handler(int irq, void *p)
++{
++ struct iio_poll_func *pf = p;
++ struct iio_dev *iio = pf->indio_dev;
++ struct mxs_lradc *lradc = iio_priv(iio);
++ struct iio_buffer *buffer = iio->buffer;
++ const uint32_t chan_value = LRADC_CH_ACCUMULATE |
++ ((LRADC_DELAY_TIMER_LOOP - 1) << LRADC_CH_NUM_SAMPLES_OFFSET);
++ int i, j = 0;
++
++ for_each_set_bit(i, iio->active_scan_mask, iio->masklength) {
++ lradc->buffer[j] = readl(lradc->base + LRADC_CH(j));
++ writel(chan_value, lradc->base + LRADC_CH(j));
++ lradc->buffer[j] &= LRADC_CH_VALUE_MASK;
++ lradc->buffer[j] /= LRADC_DELAY_TIMER_LOOP;
++ j++;
++ }
++
++ if (iio->scan_timestamp) {
++ s64 *timestamp = (s64 *)((u8 *)lradc->buffer +
++ ALIGN(j, sizeof(s64)));
++ *timestamp = pf->timestamp;
++ }
++
++ iio_push_to_buffer(buffer, (u8 *)lradc->buffer, pf->timestamp);
++
++ iio_trigger_notify_done(iio->trig);
++
++ return IRQ_HANDLED;
++}
++
++static int mxs_lradc_configure_trigger(struct iio_trigger *trig, bool state)
++{
++ struct iio_dev *iio = trig->private_data;
++ struct mxs_lradc *lradc = iio_priv(iio);
++ const uint32_t st = state ? STMP_OFFSET_REG_SET : STMP_OFFSET_REG_CLR;
++
++ writel(LRADC_DELAY_KICK, lradc->base + LRADC_DELAY(0) + st);
++
++ return 0;
++}
++
++static const struct iio_trigger_ops mxs_lradc_trigger_ops = {
++ .owner = THIS_MODULE,
++ .set_trigger_state = &mxs_lradc_configure_trigger,
++};
++
++static int mxs_lradc_trigger_init(struct iio_dev *iio)
++{
++ int ret;
++ struct iio_trigger *trig;
++
++ trig = iio_trigger_alloc("%s-dev%i", iio->name, iio->id);
++ if (trig == NULL)
++ return -ENOMEM;
++
++ trig->dev.parent = iio->dev.parent;
++ trig->private_data = iio;
++ trig->ops = &mxs_lradc_trigger_ops;
++
++ ret = iio_trigger_register(trig);
++ if (ret) {
++ iio_trigger_free(trig);
++ return ret;
++ }
++
++ iio->trig = trig;
++
++ return 0;
++}
++
++static void mxs_lradc_trigger_remove(struct iio_dev *iio)
++{
++ iio_trigger_unregister(iio->trig);
++ iio_trigger_free(iio->trig);
++}
++
++static int mxs_lradc_buffer_preenable(struct iio_dev *iio)
++{
++ struct mxs_lradc *lradc = iio_priv(iio);
++ struct iio_buffer *buffer = iio->buffer;
++ int ret = 0, chan, ofs = 0, enable = 0;
++ uint32_t ctrl4 = 0;
++ uint32_t ctrl1_irq = 0;
++ const uint32_t chan_value = LRADC_CH_ACCUMULATE |
++ ((LRADC_DELAY_TIMER_LOOP - 1) << LRADC_CH_NUM_SAMPLES_OFFSET);
++ const int len = bitmap_weight(buffer->scan_mask, LRADC_MAX_TOTAL_CHANS);
++
++ if (!len)
++ return -EINVAL;
++
++ /*
++ * Lock the driver so raw access can not be done during buffered
++ * operation. This simplifies the code a lot.
++ */
++ ret = mutex_trylock(&lradc->lock);
++ if (!ret)
++ return -EBUSY;
++
++ lradc->buffer = kmalloc(len * sizeof(*lradc->buffer), GFP_KERNEL);
++ if (!lradc->buffer) {
++ ret = -ENOMEM;
++ goto err_mem;
++ }
++
++ ret = iio_sw_buffer_preenable(iio);
++ if (ret < 0)
++ goto err_buf;
++
++ writel(LRADC_CTRL1_LRADC_IRQ_EN_MASK,
++ lradc->base + LRADC_CTRL1 + STMP_OFFSET_REG_CLR);
++ writel(0xff, lradc->base + LRADC_CTRL0 + STMP_OFFSET_REG_CLR);
++
++ for_each_set_bit(chan, buffer->scan_mask, LRADC_MAX_TOTAL_CHANS) {
++ ctrl4 |= chan << LRADC_CTRL4_LRADCSELECT_OFFSET(ofs);
++ ctrl1_irq |= LRADC_CTRL1_LRADC_IRQ_EN(ofs);
++ writel(chan_value, lradc->base + LRADC_CH(ofs));
++ enable |= 1 << ofs;
++ ofs++;
++ };
++
++ writel(LRADC_DELAY_TRIGGER_LRADCS_MASK | LRADC_DELAY_KICK,
++ lradc->base + LRADC_DELAY(0) + STMP_OFFSET_REG_CLR);
++
++ writel(ctrl4, lradc->base + LRADC_CTRL4);
++ writel(ctrl1_irq, lradc->base + LRADC_CTRL1 + STMP_OFFSET_REG_SET);
++
++ writel(enable << LRADC_DELAY_TRIGGER_LRADCS_OFFSET,
++ lradc->base + LRADC_DELAY(0) + STMP_OFFSET_REG_SET);
++
++ return 0;
++
++err_buf:
++ kfree(lradc->buffer);
++err_mem:
++ mutex_unlock(&lradc->lock);
++ return ret;
++}
++
++static int mxs_lradc_buffer_postdisable(struct iio_dev *iio)
++{
++ struct mxs_lradc *lradc = iio_priv(iio);
++
++ writel(LRADC_DELAY_TRIGGER_LRADCS_MASK | LRADC_DELAY_KICK,
++ lradc->base + LRADC_DELAY(0) + STMP_OFFSET_REG_CLR);
++
++ writel(0xff, lradc->base + LRADC_CTRL0 + STMP_OFFSET_REG_CLR);
++ writel(LRADC_CTRL1_LRADC_IRQ_EN_MASK,
++ lradc->base + LRADC_CTRL1 + STMP_OFFSET_REG_CLR);
++
++ kfree(lradc->buffer);
++ mutex_unlock(&lradc->lock);
++
++ return 0;
++}
++
++static bool mxs_lradc_validate_scan_mask(struct iio_dev *iio,
++ const unsigned long *mask)
++{
++ const int mw = bitmap_weight(mask, iio->masklength);
++
++ return mw <= LRADC_MAX_MAPPED_CHANS;
++}
++
++static const struct iio_buffer_setup_ops mxs_lradc_buffer_ops = {
++ .preenable = &mxs_lradc_buffer_preenable,
++ .postenable = &iio_triggered_buffer_postenable,
++ .predisable = &iio_triggered_buffer_predisable,
++ .postdisable = &mxs_lradc_buffer_postdisable,
++ .validate_scan_mask = &mxs_lradc_validate_scan_mask,
++};
++
++/*
++ * Driver initialization
++ */
++
++#define MXS_ADC_CHAN(idx, chan_type) { \
++ .type = (chan_type), \
++ .indexed = 1, \
++ .scan_index = (idx), \
++ .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, \
++ .channel = (idx), \
++ .scan_type = { \
++ .sign = 'u', \
++ .realbits = 18, \
++ .storagebits = 32, \
++ }, \
++}
++
++static const struct iio_chan_spec mxs_lradc_chan_spec[] = {
++ MXS_ADC_CHAN(0, IIO_VOLTAGE),
++ MXS_ADC_CHAN(1, IIO_VOLTAGE),
++ MXS_ADC_CHAN(2, IIO_VOLTAGE),
++ MXS_ADC_CHAN(3, IIO_VOLTAGE),
++ MXS_ADC_CHAN(4, IIO_VOLTAGE),
++ MXS_ADC_CHAN(5, IIO_VOLTAGE),
++ MXS_ADC_CHAN(6, IIO_VOLTAGE),
++ MXS_ADC_CHAN(7, IIO_VOLTAGE), /* VBATT */
++ MXS_ADC_CHAN(8, IIO_TEMP), /* Temp sense 0 */
++ MXS_ADC_CHAN(9, IIO_TEMP), /* Temp sense 1 */
++ MXS_ADC_CHAN(10, IIO_VOLTAGE), /* VDDIO */
++ MXS_ADC_CHAN(11, IIO_VOLTAGE), /* VTH */
++ MXS_ADC_CHAN(12, IIO_VOLTAGE), /* VDDA */
++ MXS_ADC_CHAN(13, IIO_VOLTAGE), /* VDDD */
++ MXS_ADC_CHAN(14, IIO_VOLTAGE), /* VBG */
++ MXS_ADC_CHAN(15, IIO_VOLTAGE), /* VDD5V */
++};
++
++static void mxs_lradc_hw_init(struct mxs_lradc *lradc)
++{
++ int i;
++ const uint32_t cfg =
++ (LRADC_DELAY_TIMER_PER << LRADC_DELAY_DELAY_OFFSET);
++
++ stmp_reset_block(lradc->base);
++
++ for (i = 0; i < LRADC_MAX_DELAY_CHANS; i++)
++ writel(cfg | (1 << (LRADC_DELAY_TRIGGER_DELAYS_OFFSET + i)),
++ lradc->base + LRADC_DELAY(i));
++
++ /* Start internal temperature sensing. */
++ writel(0, lradc->base + LRADC_CTRL2);
++}
++
++static void mxs_lradc_hw_stop(struct mxs_lradc *lradc)
++{
++ int i;
++
++ writel(LRADC_CTRL1_LRADC_IRQ_EN_MASK,
++ lradc->base + LRADC_CTRL1 + STMP_OFFSET_REG_CLR);
++
++ for (i = 0; i < LRADC_MAX_DELAY_CHANS; i++)
++ writel(0, lradc->base + LRADC_DELAY(i));
++}
++
++static int __devinit mxs_lradc_probe(struct platform_device *pdev)
++{
++ struct device *dev = &pdev->dev;
++ struct mxs_lradc *lradc;
++ struct iio_dev *iio;
++ struct resource *iores;
++ int ret = 0;
++ int i;
++
++ /* Allocate the IIO device. */
++ iio = iio_device_alloc(sizeof(*lradc));
++ if (!iio) {
++ dev_err(dev, "Failed to allocate IIO device\n");
++ return -ENOMEM;
++ }
++
++ lradc = iio_priv(iio);
++
++ /* Grab the memory area */
++ iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++ lradc->dev = &pdev->dev;
++ lradc->base = devm_request_and_ioremap(dev, iores);
++ if (!lradc->base) {
++ ret = -EADDRNOTAVAIL;
++ goto err_addr;
++ }
++
++ /* Grab all IRQ sources */
++ for (i = 0; i < 13; i++) {
++ lradc->irq[i] = platform_get_irq(pdev, i);
++ if (lradc->irq[i] < 0) {
++ ret = -EINVAL;
++ goto err_addr;
++ }
++
++ ret = devm_request_irq(dev, lradc->irq[i],
++ mxs_lradc_handle_irq, 0,
++ mxs_lradc_irq_name[i], iio);
++ if (ret)
++ goto err_addr;
++ }
++
++ platform_set_drvdata(pdev, iio);
++
++ init_completion(&lradc->completion);
++ mutex_init(&lradc->lock);
++
++ iio->name = pdev->name;
++ iio->dev.parent = &pdev->dev;
++ iio->info = &mxs_lradc_iio_info;
++ iio->modes = INDIO_DIRECT_MODE;
++ iio->channels = mxs_lradc_chan_spec;
++ iio->num_channels = ARRAY_SIZE(mxs_lradc_chan_spec);
++
++ ret = iio_triggered_buffer_setup(iio, &iio_pollfunc_store_time,
++ &mxs_lradc_trigger_handler,
++ &mxs_lradc_buffer_ops);
++ if (ret)
++ goto err_addr;
++
++ ret = mxs_lradc_trigger_init(iio);
++ if (ret)
++ goto err_trig;
++
++ /* Register IIO device. */
++ ret = iio_device_register(iio);
++ if (ret) {
++ dev_err(dev, "Failed to register IIO device\n");
++ goto err_dev;
++ }
++
++ /* Configure the hardware. */
++ mxs_lradc_hw_init(lradc);
++
++ return 0;
++
++err_dev:
++ mxs_lradc_trigger_remove(iio);
++err_trig:
++ iio_triggered_buffer_cleanup(iio);
++err_addr:
++ iio_device_free(iio);
++ return ret;
++}
++
++static int __devexit mxs_lradc_remove(struct platform_device *pdev)
++{
++ struct iio_dev *iio = platform_get_drvdata(pdev);
++ struct mxs_lradc *lradc = iio_priv(iio);
++
++ mxs_lradc_hw_stop(lradc);
++
++ iio_device_unregister(iio);
++ iio_triggered_buffer_cleanup(iio);
++ mxs_lradc_trigger_remove(iio);
++ iio_device_free(iio);
++
++ return 0;
++}
++
++static const struct of_device_id mxs_lradc_dt_ids[] = {
++ { .compatible = "fsl,imx28-lradc", },
++ { /* sentinel */ }
++};
++MODULE_DEVICE_TABLE(of, mxs_lradc_dt_ids);
++
++static struct platform_driver mxs_lradc_driver = {
++ .driver = {
++ .name = DRIVER_NAME,
++ .owner = THIS_MODULE,
++ .of_match_table = mxs_lradc_dt_ids,
++ },
++ .probe = mxs_lradc_probe,
++ .remove = __devexit_p(mxs_lradc_remove),
++};
++
++module_platform_driver(mxs_lradc_driver);
++
++MODULE_AUTHOR("Marek Vasut <ma...@de...>");
++MODULE_DESCRIPTION("Freescale i.MX28 LRADC driver");
++MODULE_LICENSE("GPL v2");
+--
+1.7.2.5
+
diff --git a/patches/linux/3.6/422-pengutronix-mx28-dts-Add_compatible_and_interrupt_for_LRADC.patch b/patches/linux/3.6/422-pengutronix-mx28-dts-Add_compatible_and_interrupt_for_LRADC.patch
new file mode 100644
index 0000000..4f86297
--- /dev/null
+++ b/patches/linux/3.6/422-pengutronix-mx28-dts-Add_compatible_and_interrupt_for_LRADC.patch
@@ -0,0 +1,33 @@
+From aef35104a9e5b8555cdaeebd4563df9921f6d605 Mon Sep 17 00:00:00 2001
+From: Marek Vasut <ma...@de...>
+Date: Fri, 17 Aug 2012 10:42:52 +0800
+Subject: [PATCH] ARM: dts: imx28: Add compatible and interrupt for LRADC
+
+Signed-off-by: Marek Vasut <ma...@de...>
+Cc: Jonathan Cameron <ji...@ke...>
+Cc: Juergen Beisert <jb...@pe...>
+Cc: Lars-Peter Clausen <la...@me...>
+Cc: Wolfgang Denk <wd...@de...>
+Signed-off-by: Shawn Guo <sha...@li...>
+---
+ arch/arm/boot/dts/imx28.dtsi | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi
+index 3fa6d19..e2240da 100644
+--- a/arch/arm/boot/dts/imx28.dtsi
++++ b/arch/arm/boot/dts/imx28.dtsi
+@@ -638,7 +638,10 @@
+ };
+
+ lradc@80050000 {
++ compatible = "fsl,imx28-lradc";
+ reg = <0x80050000 0x2000>;
++ interrupts = <10 14 15 16 17 18 19
++ 20 21 22 23 24 25>;
+ status = "disabled";
+ };
+
+--
+1.7.2.5
+
hooks/post-receive
--
armadeus
|
|
From: jorasse <jo...@us...> - 2012-09-28 10:02:33
|
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 2e10489645e8b8e04f953ef6d140a0da2cf2b387 (commit)
from c601363e37816655222f1b25faa6e4c1b451846a (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 2e10489645e8b8e04f953ef6d140a0da2cf2b387
Author: Eric Jarrige <eri...@ar...>
Date: Fri Sep 28 12:06:06 2012 +0200
[TOOLS] apf9328: update uboot_recover with uboot 2012.04.01 patch 5.7
-----------------------------------------------------------------------
Summary of changes:
software/uboot_recover/apf9328-u-boot.bin | Bin 180128 -> 217180 bytes
1 files changed, 0 insertions(+), 0 deletions(-)
diff --git a/software/uboot_recover/apf9328-u-boot.bin b/software/uboot_recover/apf9328-u-boot.bin
index abdde01..c8342f6 100644
Binary files a/software/uboot_recover/apf9328-u-boot.bin and b/software/uboot_recover/apf9328-u-boot.bin differ
hooks/post-receive
--
armadeus
|
|
From: jorasse <jo...@us...> - 2012-09-28 09:45:00
|
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 c601363e37816655222f1b25faa6e4c1b451846a (commit)
from fdfaf0b57fe18d548febf3a8d6151f262669205e (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 c601363e37816655222f1b25faa6e4c1b451846a
Author: Eric Jarrige <eri...@ar...>
Date: Fri Sep 28 11:48:16 2012 +0200
[TOOLS] apf51: update uboot_recover with uboot 2012.04.01 patch 1.7
-----------------------------------------------------------------------
Summary of changes:
.../device/armadeus/apf51/apf51-u-boot-2012.04.h | 3 ++-
software/uboot_recover/apf51-u-boot-nand.bin | Bin 0 -> 261224 bytes
software/uboot_recover/apf51-u-boot.bin | Bin 237920 -> 0 bytes
software/uboot_recover/apf51_recover.py | 2 +-
4 files changed, 3 insertions(+), 2 deletions(-)
create mode 100644 software/uboot_recover/apf51-u-boot-nand.bin
delete mode 100644 software/uboot_recover/apf51-u-boot.bin
diff --git a/buildroot/target/device/armadeus/apf51/apf51-u-boot-2012.04.h b/buildroot/target/device/armadeus/apf51/apf51-u-boot-2012.04.h
index 76442ac..0c251a7 100644
--- a/buildroot/target/device/armadeus/apf51/apf51-u-boot-2012.04.h
+++ b/buildroot/target/device/armadeus/apf51/apf51-u-boot-2012.04.h
@@ -86,8 +86,9 @@
*/
#include <config_cmd_default.h>
+#undef CONFIG_CMD_LOADS
#define CONFIG_CMD_ASKENV /* ask for env variable */
-#define CONFIG_CMD_BSP /* Board Specific functions */
+/*#define CONFIG_CMD_BSP*/ /* Board Specific functions */
#define CONFIG_CMD_CACHE /* icache, dcache */
#define CONFIG_CMD_DHCP /* DHCP Support */
/*#define CONFIG_CMD_DNS*/
diff --git a/software/uboot_recover/apf51-u-boot-nand.bin b/software/uboot_recover/apf51-u-boot-nand.bin
new file mode 100644
index 0000000..2f0aa35
Binary files /dev/null and b/software/uboot_recover/apf51-u-boot-nand.bin differ
diff --git a/software/uboot_recover/apf51-u-boot.bin b/software/uboot_recover/apf51-u-boot.bin
deleted file mode 100644
index 6f5b307..0000000
Binary files a/software/uboot_recover/apf51-u-boot.bin and /dev/null differ
diff --git a/software/uboot_recover/apf51_recover.py b/software/uboot_recover/apf51_recover.py
index efb96b4..f56430d 100644
--- a/software/uboot_recover/apf51_recover.py
+++ b/software/uboot_recover/apf51_recover.py
@@ -525,7 +525,7 @@ if __name__ == "__main__":
SPEED = 115200
- BINARY = "apf51-u-boot.bin"
+ BINARY = "apf51-u-boot-nand.bin"
print "\n--- APF51 Bootstrap Tool ---\n"
print "Procedure to follow:"
hooks/post-receive
--
armadeus
|
|
From: jorasse <jo...@us...> - 2012-09-28 08:51:57
|
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 fdfaf0b57fe18d548febf3a8d6151f262669205e (commit)
via 8a81444efde2fdc602e7af5841ecb41252e90e2e (commit)
from 089ac03e18be6e72e70e73385c8c4f98be8ef440 (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 fdfaf0b57fe18d548febf3a8d6151f262669205e
Merge: 8a81444 089ac03
Author: Eric Jarrige <eri...@ar...>
Date: Fri Sep 28 10:55:35 2012 +0200
Merge branch 'master' of ssh://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit 8a81444efde2fdc602e7af5841ecb41252e90e2e
Author: Eric Jarrige <eri...@ar...>
Date: Fri Sep 28 10:55:04 2012 +0200
[TOOLS] apf27: update uboot_recover with uboot 2012.04.01 patch 3.7
-----------------------------------------------------------------------
Summary of changes:
software/uboot_recover/apf27-u-boot-nand.bin | Bin 414012 -> 413976 bytes
1 files changed, 0 insertions(+), 0 deletions(-)
diff --git a/software/uboot_recover/apf27-u-boot-nand.bin b/software/uboot_recover/apf27-u-boot-nand.bin
index 7933184..c417df6 100644
Binary files a/software/uboot_recover/apf27-u-boot-nand.bin and b/software/uboot_recover/apf27-u-boot-nand.bin differ
hooks/post-receive
--
armadeus
|
|
From: jorasse <jo...@us...> - 2012-09-28 08:34:00
|
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 089ac03e18be6e72e70e73385c8c4f98be8ef440 (commit)
from e234208166da276abf33a404371540d484724560 (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 089ac03e18be6e72e70e73385c8c4f98be8ef440
Author: Eric Jarrige <eri...@ar...>
Date: Fri Sep 28 10:37:12 2012 +0200
[TOOLS] apf28: update uboot_recover with uboot 2012.04.01 patch 1.7
-----------------------------------------------------------------------
Summary of changes:
software/uboot_recover/apf28-u-boot-spl | Bin 201517 -> 231539 bytes
software/uboot_recover/apf28-u-boot.sb | Bin 405424 -> 445024 bytes
2 files changed, 0 insertions(+), 0 deletions(-)
diff --git a/software/uboot_recover/apf28-u-boot-spl b/software/uboot_recover/apf28-u-boot-spl
index ed916ba..926c959 100755
Binary files a/software/uboot_recover/apf28-u-boot-spl and b/software/uboot_recover/apf28-u-boot-spl differ
diff --git a/software/uboot_recover/apf28-u-boot.sb b/software/uboot_recover/apf28-u-boot.sb
index 54a712f..e2f8ab7 100644
Binary files a/software/uboot_recover/apf28-u-boot.sb and b/software/uboot_recover/apf28-u-boot.sb differ
hooks/post-receive
--
armadeus
|
|
From: jorasse <jo...@us...> - 2012-09-27 10:50:58
|
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 e234208166da276abf33a404371540d484724560 (commit)
from d3dce819b710e63185e8c9782c80add1bdcb2247 (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 e234208166da276abf33a404371540d484724560
Author: Eric Jarrige <eri...@ar...>
Date: Thu Sep 27 12:53:19 2012 +0200
[DEBUG] imxregs: add imx28 USB registers
-----------------------------------------------------------------------
Summary of changes:
buildroot/package/armadeus/imxregs/imxregs.mk | 2 +-
target/linux/debug/imxregs/imx28regs.h | 93 +++++++++++++++++++++++++
2 files changed, 94 insertions(+), 1 deletions(-)
diff --git a/buildroot/package/armadeus/imxregs/imxregs.mk b/buildroot/package/armadeus/imxregs/imxregs.mk
index 2711674..28909bf 100644
--- a/buildroot/package/armadeus/imxregs/imxregs.mk
+++ b/buildroot/package/armadeus/imxregs/imxregs.mk
@@ -4,7 +4,7 @@
#
#############################################################
-IMXREGS_VERSION = 1.2
+IMXREGS_VERSION = 1.3
IMXREGS_SITE = $(TOPDIR)/../target/linux/debug/imxregs/
IMXREGS_SITE_METHOD = copy
diff --git a/target/linux/debug/imxregs/imx28regs.h b/target/linux/debug/imxregs/imx28regs.h
index 251bf43..c5947da 100644
--- a/target/linux/debug/imxregs/imx28regs.h
+++ b/target/linux/debug/imxregs/imx28regs.h
@@ -117,4 +117,97 @@ static struct reg_info regs[] =
{ "HW_LRADC_THRESHOLD0", 0x80050150, 0, 0xffffffff, 'x', "LRADC Theshold0 Register" },
{ "HW_LRADC_THRESHOLD1", 0x80050160, 0, 0xffffffff, 'x', "LRADC Theshold1 Register" },
{ "HW_LRADC_VERSION", 0x80050170, 0, 0xffffffff, 'x', "LRADC Version Register" },
+/* USBCTRL0 */
+{ "HW_USBCTRL0_ID", 0x80080000, 0, 0xffffffff, 'x', "USBCTRL0 Host ID" },
+{ "HW_USBCTRL0_HWGENERAL", 0x80080004, 0, 0xffffffff, 'x', "USBCTRL0 Host General" },
+{ "HW_USBCTRL0_HWHOST", 0x80080008, 0, 0xffffffff, 'x', "USBCTRL0 Host h/w params" },
+{ "HW_USBCTRL0_HWTXBUF", 0x80080010, 0, 0xffffffff, 'x', "USBCTRL0 TX buffer h/w params" },
+{ "HW_USBCTRL0_HWRXBUF", 0x80080014, 0, 0xffffffff, 'x', "USBCTRL0 RX buffer h/w params" },
+{ "HW_USBCTRL0_CAPLENGTH", 0x80080100, 0, 0xffffffff, 'x', "USBCTRL0 Capability register length" },
+{ "HW_USBCTRL0_HCIVERSION", 0x80080102, 0, 0xffffffff, 'x', "USBCTRL0 Host Interface version" },
+{ "HW_USBCTRL0_HCSPARAMS", 0x80080104, 0, 0xffffffff, 'x', "USBCTRL0 Host control structural params" },
+{ "HW_USBCTRL0_HCCPARAMS", 0x80080108, 0, 0xffffffff, 'x', "USBCTRL0 control capability params" },
+{ "HW_USBCTRL0_DCIVERSION", 0x80080120, 0, 0xffffffff, 'x', "USBCTRL0 device interface version" },
+/* start EHCI registers: */
+{ "HW_USBCTRL0_USBCMD", 0x80080140, 0, 0xffffffff, 'x', "USBCTRL0 USB command register" },
+{ "HW_USBCTRL0_USBSTS", 0x80080144, 0, 0xffffffff, 'x', "USBCTRL0 USB status register" },
+{ "HW_USBCTRL0_USBINTR", 0x80080148, 0, 0xffffffff, 'x', "USBCTRL0 interrupt enable register" },
+{ "HW_USBCTRL0_FRINDEX", 0x8008014c, 0, 0xffffffff, 'x', "USBCTRL0 USB frame index" },
+/* segment 0x80080150) addr bits 63:32 if needed */
+{ "HW_USBCTRL0_PERIODICLISTBASE", 0x80080154, 0, 0xffffffff, 'x', "USBCTRL0 host crtlr frame list base addr" },
+{ "HW_USBCTRL0_DEVICEADDR", 0x80080154, 0, 0xffffffff, 'x', "USBCTRL0 device crtlr device address" },
+{ "HW_USBCTRL0_ASYNCLISTADDR", 0x80080158, 0, 0xffffffff, 'x', "USBCTRL0 host ctrlr next async addr" },
+{ "HW_USBCTRL0_EPLISTADDR", 0x80080158, 0, 0xffffffff, 'x', "USBCTRL0 device ctrlr endpoint list addr" },
+{ "HW_USBCTRL0_BURSTSIZE", 0x80080160, 0, 0xffffffff, 'x', "USBCTRL0 host ctrlr burst size register" },
+{ "HW_USBCTRL0_TXFILLTUNING", 0x80080164, 0, 0xffffffff, 'x', "USBCTRL0 TX FIFO fill tuning" },
+{ "HW_USBCTRL0_ULPIVIEW", 0x80080170, 0, 0xffffffff, 'x', "USBCTRL0 ULPI viewport" },
+{ "HW_USBCTRL0_CFGFLAG", 0x80080180, 0, 0xffffffff, 'x', "USBCTRL0 configflag (supports HS)" },
+{ "HW_USBCTRL0_PORTSC1", 0x80080184, 0, 0xffffffff, 'x', "USBCTRL0 port status and control" },
+/* end EHCI registers: */
+{ "HW_USBCTRL0_OTGSC", 0x800801a4, 0, 0xffffffff, 'x', "USBCTRL0 OTG status and control" },
+{ "HW_USBCTRL0_USBMODE", 0x800801a8, 0, 0xffffffff, 'x', "USBCTRL0 USB device mode" },
+{ "HW_USBCTRL0_ENDPTSETUPSTAT", 0x800801ac, 0, 0xffffffff, 'x', "USBCTRL0 endpoint setup status" },
+{ "HW_USBCTRL0_ENDPTPRIME", 0x800801b0, 0, 0xffffffff, 'x', "USBCTRL0 endpoint initialization" },
+{ "HW_USBCTRL0_ENDPTFLUSH", 0x800801b4, 0, 0xffffffff, 'x', "USBCTRL0 endpoint de-initialize" },
+{ "HW_USBCTRL0_ENDPTSTAT", 0x800801b8, 0, 0xffffffff, 'x', "USBCTRL0 endpoint status" },
+{ "HW_USBCTRL0_ENDPTCOMPLETE", 0x800801bc, 0, 0xffffffff, 'x', "USBCTRL0 endpoint complete" },
+{ "HW_USBCTRL0_EPCTRL0", 0x800801c0, 0, 0xffffffff, 'x', "USBCTRL0 endpoint control0" },
+/* USBCTRL1 */
+{ "HW_USBCTRL1_ID", 0x80090000, 0, 0xffffffff, 'x', "USBCTRL1 Host ID" },
+{ "HW_USBCTRL1_HWGENERAL", 0x80090004, 0, 0xffffffff, 'x', "USBCTRL1 Host General" },
+{ "HW_USBCTRL1_HWHOST", 0x80090008, 0, 0xffffffff, 'x', "USBCTRL1 Host h/w params" },
+{ "HW_USBCTRL1_HWTXBUF", 0x80090010, 0, 0xffffffff, 'x', "USBCTRL1 TX buffer h/w params" },
+{ "HW_USBCTRL1_HWRXBUF", 0x80090014, 0, 0xffffffff, 'x', "USBCTRL1 RX buffer h/w params" },
+{ "HW_USBCTRL1_CAPLENGTH", 0x80090100, 0, 0xffffffff, 'x', "USBCTRL1 Capability register length" },
+{ "HW_USBCTRL1_HCIVERSION", 0x80090102, 0, 0xffffffff, 'x', "USBCTRL1 Host Interface version" },
+{ "HW_USBCTRL1_HCSPARAMS", 0x80090104, 0, 0xffffffff, 'x', "USBCTRL1 Host control structural params" },
+{ "HW_USBCTRL1_HCCPARAMS", 0x80090108, 0, 0xffffffff, 'x', "USBCTRL1 control capability params" },
+{ "HW_USBCTRL1_DCIVERSION", 0x80090120, 0, 0xffffffff, 'x', "USBCTRL1 device interface version" },
+/* start EHCI registers: */
+{ "HW_USBCTRL1_USBCMD", 0x80090140, 0, 0xffffffff, 'x', "USBCTRL1 USB command register" },
+{ "HW_USBCTRL1_USBSTS", 0x80090144, 0, 0xffffffff, 'x', "USBCTRL1 USB status register" },
+{ "HW_USBCTRL1_USBINTR", 0x80090148, 0, 0xffffffff, 'x', "USBCTRL1 interrupt enable register" },
+{ "HW_USBCTRL1_FRINDEX", 0x8009014c, 0, 0xffffffff, 'x', "USBCTRL1 USB frame index" },
+/* segment 0x80090150) addr bits 63:32 if needed */
+{ "HW_USBCTRL1_PERIODICLISTBASE", 0x80090154, 0, 0xffffffff, 'x', "USBCTRL1 host crtlr frame list base addr" },
+{ "HW_USBCTRL1_DEVICEADDR", 0x80090154, 0, 0xffffffff, 'x', "USBCTRL1 device crtlr device address" },
+{ "HW_USBCTRL1_ASYNCLISTADDR", 0x80090158, 0, 0xffffffff, 'x', "USBCTRL1 host ctrlr next async addr" },
+{ "HW_USBCTRL1_EPLISTADDR", 0x80090158, 0, 0xffffffff, 'x', "USBCTRL1 device ctrlr endpoint list addr" },
+{ "HW_USBCTRL1_BURSTSIZE", 0x80090160, 0, 0xffffffff, 'x', "USBCTRL1 host ctrlr burst size register" },
+{ "HW_USBCTRL1_TXFILLTUNING", 0x80090164, 0, 0xffffffff, 'x', "USBCTRL1 TX FIFO fill tuning" },
+{ "HW_USBCTRL1_ULPIVIEW", 0x80090170, 0, 0xffffffff, 'x', "USBCTRL1 ULPI viewport" },
+{ "HW_USBCTRL1_CFGFLAG", 0x80090180, 0, 0xffffffff, 'x', "USBCTRL1 configflag (supports HS)" },
+{ "HW_USBCTRL1_PORTSC1", 0x80090184, 0, 0xffffffff, 'x', "USBCTRL1 port status and control" },
+/* end EHCI registers: */
+{ "HW_USBCTRL1_OTGSC", 0x800901a4, 0, 0xffffffff, 'x', "USBCTRL1 OTG status and control" },
+{ "HW_USBCTRL1_USBMODE", 0x800901a8, 0, 0xffffffff, 'x', "USBCTRL1 USB device mode" },
+{ "HW_USBCTRL1_ENDPTSETUPSTAT", 0x800901ac, 0, 0xffffffff, 'x', "USBCTRL1 endpoint setup status" },
+{ "HW_USBCTRL1_ENDPTPRIME", 0x800901b0, 0, 0xffffffff, 'x', "USBCTRL1 endpoint initialization" },
+{ "HW_USBCTRL1_ENDPTFLUSH", 0x800901b4, 0, 0xffffffff, 'x', "USBCTRL1 endpoint de-initialize" },
+{ "HW_USBCTRL1_ENDPTSTAT", 0x800901b8, 0, 0xffffffff, 'x', "USBCTRL1 endpoint status" },
+{ "HW_USBCTRL1_ENDPTCOMPLETE", 0x800901bc, 0, 0xffffffff, 'x', "USBCTRL1 endpoint complete" },
+{ "HW_USBCTRL1_EPCTRL0", 0x800901c0, 0, 0xffffffff, 'x', "USBCTRL1 endpoint control0" },
+/* USBPHY0 */
+{ "HW_USBPHY0_PWD", 0x8007c000, 0, 0xffffffff, 'x', "USBPHY0 power down register" },
+{ "HW_USBPHY0_TX", 0x8007c010, 0, 0xffffffff, 'x', "USBPHY0 transmitter control register" },
+{ "HW_USBPHY0_RX", 0x8007c020, 0, 0xffffffff, 'x', "USBPHY0 receiver control register" },
+{ "HW_USBPHY0_CTRL", 0x8007c030, 0, 0xffffffff, 'x', "USBPHY0 general control register" },
+{ "HW_USBPHY0_STATUS", 0x8007c040, 0, 0xffffffff, 'x', "USBPHY0 status register" },
+{ "HW_USBPHY0_DEBUG", 0x8007c050, 0, 0xffffffff, 'x', "USBPHY0 debug register" },
+{ "HW_USBPHY0_DEBUG0_STATUS", 0x8007c060, 0, 0xffffffff, 'x', "USBPHY0 debug status register 0" },
+{ "HW_USBPHY0_DEBUG1", 0x8007c070, 0, 0xffffffff, 'x', "USBPHY0 debug status register 1" },
+{ "HW_USBPHY0_VERSION", 0x8007c080, 0, 0xffffffff, 'x', "USBPHY0 RTL version" },
+{ "HW_USBPHY0_IP", 0x8007c090, 0, 0xffffffff, 'x', "USBPHY0 IP block register" },
+/* USBPHY1 */
+{ "HW_USBPHY1_PWD", 0x8007e000, 0, 0xffffffff, 'x', "USBPHY1 power down register" },
+{ "HW_USBPHY1_TX", 0x8007e010, 0, 0xffffffff, 'x', "USBPHY1 transmitter control register" },
+{ "HW_USBPHY1_RX", 0x8007e020, 0, 0xffffffff, 'x', "USBPHY1 receiver control register" },
+{ "HW_USBPHY1_CTRL", 0x8007e030, 0, 0xffffffff, 'x', "USBPHY1 general control register" },
+{ "HW_USBPHY1_STATUS", 0x8007e040, 0, 0xffffffff, 'x', "USBPHY1 status register" },
+{ "HW_USBPHY1_DEBUG", 0x8007e050, 0, 0xffffffff, 'x', "USBPHY1 debug register" },
+{ "HW_USBPHY1_DEBUG0_STATUS", 0x8007e060, 0, 0xffffffff, 'x', "USBPHY1 debug status register 0" },
+{ "HW_USBPHY1_DEBUG1", 0x8007e070, 0, 0xffffffff, 'x', "USBPHY1 debug status register 1" },
+{ "HW_USBPHY1_VERSION", 0x8007e080, 0, 0xffffffff, 'x', "USBPHY1 RTL version" },
+{ "HW_USBPHY1_IP", 0x8007e090, 0, 0xffffffff, 'x', "USBPHY1 IP block register" },
+
};
hooks/post-receive
--
armadeus
|
|
From: jorasse <jo...@us...> - 2012-09-27 10:30:03
|
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 d3dce819b710e63185e8c9782c80add1bdcb2247 (commit)
from f89143c73d4c0addeee69af48ed637eff06c31c9 (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 d3dce819b710e63185e8c9782c80add1bdcb2247
Author: Eric Jarrige <eri...@ar...>
Date: Thu Sep 27 12:33:10 2012 +0200
[LINUX] apf28: 2.6.35: add armadeus project tux logo
-----------------------------------------------------------------------
Summary of changes:
.../armadeus/apf28/apf28-linux-2.6.35.config | 5 +++--
...15-armadeus-logo-add_armadeus-project_tux.patch | 0
2 files changed, 3 insertions(+), 2 deletions(-)
copy patches/linux/{2.6.38 => 2.6.35}/015-armadeus-logo-add_armadeus-project_tux.patch (100%)
diff --git a/buildroot/target/device/armadeus/apf28/apf28-linux-2.6.35.config b/buildroot/target/device/armadeus/apf28/apf28-linux-2.6.35.config
index 74395c0..b425914 100644
--- a/buildroot/target/device/armadeus/apf28/apf28-linux-2.6.35.config
+++ b/buildroot/target/device/armadeus/apf28/apf28-linux-2.6.35.config
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.35.3
-# Thu Sep 20 19:14:34 2012
+# Thu Sep 27 12:25:11 2012
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -1581,7 +1581,8 @@ CONFIG_FONT_8x16=y
CONFIG_LOGO=y
# CONFIG_LOGO_LINUX_MONO is not set
# CONFIG_LOGO_LINUX_VGA16 is not set
-CONFIG_LOGO_LINUX_CLUT224=y
+# CONFIG_LOGO_LINUX_CLUT224 is not set
+CONFIG_LOGO_ARMADEUS_CLUT224=y
CONFIG_SOUND=y
CONFIG_SOUND_OSS_CORE=y
CONFIG_SOUND_OSS_CORE_PRECLAIM=y
diff --git a/patches/linux/2.6.38/015-armadeus-logo-add_armadeus-project_tux.patch b/patches/linux/2.6.35/015-armadeus-logo-add_armadeus-project_tux.patch
similarity index 100%
copy from patches/linux/2.6.38/015-armadeus-logo-add_armadeus-project_tux.patch
copy to patches/linux/2.6.35/015-armadeus-logo-add_armadeus-project_tux.patch
hooks/post-receive
--
armadeus
|
|
From: jorasse <jo...@us...> - 2012-09-27 10:28:21
|
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 f89143c73d4c0addeee69af48ed637eff06c31c9 (commit)
from 2a968308b1c5f0b05e09e5092a1dfc7405ee5e3a (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 f89143c73d4c0addeee69af48ed637eff06c31c9
Author: Eric Jarrige <eri...@ar...>
Date: Thu Sep 27 12:31:31 2012 +0200
[LINUX] apf28: 2.6.35: fix USB connection hang after system supsend/resume
-----------------------------------------------------------------------
Summary of changes:
.../452-armadeus-mxs-fixes_USB_freescale_bsp.patch | 28 +++++++++++++++++---
1 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/patches/linux/2.6.35/452-armadeus-mxs-fixes_USB_freescale_bsp.patch b/patches/linux/2.6.35/452-armadeus-mxs-fixes_USB_freescale_bsp.patch
index d8ea709..63de12b 100644
--- a/patches/linux/2.6.35/452-armadeus-mxs-fixes_USB_freescale_bsp.patch
+++ b/patches/linux/2.6.35/452-armadeus-mxs-fixes_USB_freescale_bsp.patch
@@ -7,7 +7,7 @@ Index: linux-2.6.35.3/arch/arm/mach-mx28/usb_dr.c
===================================================================
--- linux-2.6.35.3/arch/arm/mach-mx28/usb_dr.c
+++ linux-2.6.35.3/arch/arm/mach-mx28/usb_dr.c
-@@ -58,11 +58,11 @@ void fsl_phy_usb_utmi_uninit(struct fsl_
+@@ -60,17 +60,17 @@ void fsl_phy_usb_utmi_uninit(struct fsl_
void fsl_phy_set_power(struct fsl_xcvr_ops *this,
struct fsl_usb2_platform_data *pdata, int on)
{
@@ -23,7 +23,14 @@ Index: linux-2.6.35.3/arch/arm/mach-mx28/usb_dr.c
}
}
-@@ -363,6 +363,7 @@ static struct fsl_usb2_platform_data __m
+ static void usb_host_phy_resume(struct fsl_usb2_platform_data *plat)
+ {
+- fsl_platform_set_usb_phy_dis(plat, 0);
++ /* fsl_platform_set_usb_phy_dis(plat, 0); -- Removed to fix USB connect hang after resume */
+ }
+
+ static int internal_phy_clk_already_on;
+@@ -408,6 +408,7 @@ static struct fsl_usb2_platform_data __m
.platform_resume = usb_host_phy_resume,
.transceiver = "utmi",
.phy_regs = USBPHY0_PHYS_ADDR,
@@ -31,8 +38,8 @@ Index: linux-2.6.35.3/arch/arm/mach-mx28/usb_dr.c
};
/*
-@@ -457,6 +458,11 @@ static struct fsl_usb2_wakeup_platform_d
- .usb_clock_for_pm = usbotg_clock_gate,
+@@ -503,6 +504,11 @@ static struct fsl_usb2_wakeup_platform_d
+ .usb_wakeup_exhandle = usbotg_wakeup_event_clear,
};
+struct fsl_usb2_platform_data * __init usb_dr_get_plateform_data(void)
@@ -56,6 +63,19 @@ Index: linux-2.6.35.3/arch/arm/mach-mx28/usb.h
/*
* Determine which platform_data struct to use for the DR controller,
* based on which transceiver is configured.
+Index: linux-2.6.35.3/arch/arm/mach-mx28/usb_h1.c
+===================================================================
+--- linux-2.6.35.3/arch/arm/mach-mx28/usb_h1.c
++++ linux-2.6.35.3/arch/arm/mach-mx28/usb_h1.c
+@@ -37,7 +37,7 @@ static struct platform_device *h1_pdev;
+
+ static void usb_host_phy_resume(struct fsl_usb2_platform_data *plat)
+ {
+- fsl_platform_set_usb_phy_dis(plat, 0);
++ /*fsl_platform_set_usb_phy_dis(plat, 0); -- Removed to fix USB connect hang after resume */
+ }
+
+ static int internal_phy_clk_already_on;
Index: linux-2.6.35.3/include/linux/fsl_devices.h
===================================================================
--- linux-2.6.35.3/include/linux/fsl_devices.h
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2012-09-26 17:33:17
|
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 2a968308b1c5f0b05e09e5092a1dfc7405ee5e3a (commit)
from e2d9a61cff4c51b9ca01eb78568f8469355d6584 (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 2a968308b1c5f0b05e09e5092a1dfc7405ee5e3a
Author: Julien Boibessot <jul...@ar...>
Date: Wed Sep 26 19:30:53 2012 +0200
[LINUX] 3.6: add apf28dev support (LCD, backlight & USB host working). APF28 & APF28Dev now have disctincts DTS
-----------------------------------------------------------------------
Summary of changes:
.../device/armadeus/apf28/apf28-linux-3.6.config | 45 ++---
.../3.6/0403-armadeus-Add-apf28-dts-files.patch | 124 -----------
.../3.6/0403-armadeus-Add-apf28-support-dts.patch | 144 +++++++++++++
...04-armadeus-mx28_Initialize_fec_phy_clock.patch | 30 ---
...rmadeus-mx28-Add-pwm-pinmux-to-imx28-dtsi.patch | 35 ++++
...eus-mx28-Add-lcdif16-pinmux-to-imx28-dtsi.patch | 39 ++++
.../linux/3.6/0420-armadeus-Add-apf28dev-dts.patch | 216 ++++++++++++++++++++
7 files changed, 452 insertions(+), 181 deletions(-)
delete mode 100644 patches/linux/3.6/0403-armadeus-Add-apf28-dts-files.patch
create mode 100644 patches/linux/3.6/0403-armadeus-Add-apf28-support-dts.patch
delete mode 100644 patches/linux/3.6/0404-armadeus-mx28_Initialize_fec_phy_clock.patch
create mode 100644 patches/linux/3.6/0418-armadeus-mx28-Add-pwm-pinmux-to-imx28-dtsi.patch
create mode 100644 patches/linux/3.6/0419-armadeus-mx28-Add-lcdif16-pinmux-to-imx28-dtsi.patch
create mode 100644 patches/linux/3.6/0420-armadeus-Add-apf28dev-dts.patch
diff --git a/buildroot/target/device/armadeus/apf28/apf28-linux-3.6.config b/buildroot/target/device/armadeus/apf28/apf28-linux-3.6.config
index 54c5792..4e75dc9 100644
--- a/buildroot/target/device/armadeus/apf28/apf28-linux-3.6.config
+++ b/buildroot/target/device/armadeus/apf28/apf28-linux-3.6.config
@@ -85,6 +85,7 @@ CONFIG_RT73USB=m
CONFIG_ZD1211RW=m
CONFIG_INPUT_JOYDEV=y
CONFIG_INPUT_EVDEV=y
+CONFIG_KEYBOARD_GPIO=y
CONFIG_INPUT_TOUCHSCREEN=y
CONFIG_INPUT_MISC=y
CONFIG_INPUT_UINPUT=m
@@ -104,36 +105,14 @@ CONFIG_GPIO_SYSFS=y
CONFIG_HWMON=m
CONFIG_WATCHDOG=y
CONFIG_MEDIA_SUPPORT=m
-CONFIG_VIDEO_DEV=m
-# CONFIG_RC_CORE is not set
-# CONFIG_MEDIA_TUNER_SIMPLE is not set
-# CONFIG_MEDIA_TUNER_TDA8290 is not set
-# CONFIG_MEDIA_TUNER_TDA827X is not set
-# CONFIG_MEDIA_TUNER_TDA18271 is not set
-# CONFIG_MEDIA_TUNER_TDA9887 is not set
-# CONFIG_MEDIA_TUNER_TEA5761 is not set
-# CONFIG_MEDIA_TUNER_TEA5767 is not set
-# CONFIG_MEDIA_TUNER_MT20XX is not set
-# CONFIG_MEDIA_TUNER_MT2060 is not set
-# CONFIG_MEDIA_TUNER_MT2266 is not set
-# CONFIG_MEDIA_TUNER_MT2131 is not set
-# CONFIG_MEDIA_TUNER_QT1010 is not set
-# CONFIG_MEDIA_TUNER_XC2028 is not set
-# CONFIG_MEDIA_TUNER_XC5000 is not set
-# CONFIG_MEDIA_TUNER_XC4000 is not set
-# CONFIG_MEDIA_TUNER_MXL5005S is not set
-# CONFIG_MEDIA_TUNER_MXL5007T is not set
-# CONFIG_MEDIA_TUNER_MC44S803 is not set
-# CONFIG_MEDIA_TUNER_MAX2165 is not set
-# CONFIG_MEDIA_TUNER_TDA18218 is not set
-# CONFIG_MEDIA_TUNER_TDA18212 is not set
+CONFIG_MEDIA_CAMERA_SUPPORT=y
CONFIG_VIDEO_VIVI=m
-# CONFIG_RADIO_ADAPTERS is not set
CONFIG_FB=y
CONFIG_FB_MXS=y
CONFIG_BACKLIGHT_LCD_SUPPORT=y
CONFIG_BACKLIGHT_CLASS_DEVICE=y
# CONFIG_BACKLIGHT_GENERIC is not set
+CONFIG_BACKLIGHT_PWM=y
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FONTS=y
CONFIG_FONT_8x8=y
@@ -143,9 +122,9 @@ CONFIG_LOGO=y
CONFIG_USB=y
CONFIG_USB_DEBUG=y
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
-CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_DEVICE_CLASS is not set
CONFIG_USB_MON=y
+CONFIG_USB_CHIPIDEA=y
+CONFIG_USB_CHIPIDEA_HOST=y
CONFIG_USB_ACM=y
CONFIG_USB_PRINTER=y
CONFIG_USB_WDM=y
@@ -154,12 +133,25 @@ CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_DEBUG_FILES=y
CONFIG_USB_ETH=m
CONFIG_USB_ULPI=y
+CONFIG_USB_MXS_PHY=y
CONFIG_MMC=y
CONFIG_MMC_MXS=y
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+CONFIG_LEDS_GPIO=y
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_ONESHOT=y
+CONFIG_LEDS_TRIGGER_HEARTBEAT=y
+CONFIG_LEDS_TRIGGER_BACKLIGHT=y
+CONFIG_LEDS_TRIGGER_GPIO=y
+CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_DRV_STMP=y
CONFIG_DMADEVICES=y
CONFIG_MXS_DMA=y
+CONFIG_PWM=y
+CONFIG_PWM_MXS=y
CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT2_FS_POSIX_ACL=y
@@ -181,7 +173,6 @@ CONFIG_JFFS2_LZO=y
CONFIG_JFFS2_CMODE_NONE=y
CONFIG_UBIFS_FS=y
CONFIG_NFS_FS=y
-CONFIG_NFS_V3=y
CONFIG_NFS_V4=y
CONFIG_ROOT_NFS=y
CONFIG_NLS_CODEPAGE_437=y
diff --git a/patches/linux/3.6/0403-armadeus-Add-apf28-dts-files.patch b/patches/linux/3.6/0403-armadeus-Add-apf28-dts-files.patch
deleted file mode 100644
index 681522f..0000000
--- a/patches/linux/3.6/0403-armadeus-Add-apf28-dts-files.patch
+++ /dev/null
@@ -1,124 +0,0 @@
-Index: linux-3.5/arch/arm/boot/dts/imx28-apf28.dts
-===================================================================
---- /dev/null
-+++ linux-3.5/arch/arm/boot/dts/imx28-apf28.dts
-@@ -0,0 +1,119 @@
-+/*
-+ * Copyright 2012 Armadeus Systems - <su...@ar...>
-+ *
-+ * Based on code which is:
-+ * Copyright 2012 Freescale Semiconductor, Inc.
-+ *
-+ * The code contained herein is licensed under the GNU General Public
-+ * License. You may obtain a copy of the GNU General Public License
-+ * Version 2 or later at the following locations:
-+ *
-+ * http://www.opensource.org/licenses/gpl-license.html
-+ * http://www.gnu.org/copyleft/gpl.html
-+ */
-+
-+/dts-v1/;
-+/include/ "imx28.dtsi"
-+
-+/ {
-+ model = "Armadeus Systems APF28 module";
-+ compatible = "armadeus,imx28-apf28", "fsl,imx28";
-+
-+ memory {
-+ reg = <0x40000000 0x08000000>;
-+ };
-+
-+ apb@80000000 {
-+ apbh@80000000 {
-+ gpmi-nand@8000c000 {
-+ pinctrl-names = "default";
-+ pinctrl-0 = <&gpmi_pins_a &gpmi_status_cfg>;
-+ status = "okay";
-+
-+ partition@0 {
-+ label = "u-boot";
-+ reg = <0x0 0x300000>;
-+ };
-+ partition@1 {
-+ label = "env";
-+ reg = <0x300000 0x80000>;
-+ };
-+ partition@2 {
-+ label = "env2";
-+ reg = <0x380000 0x20000>;
-+ };
-+ partition@3 {
-+ label = "dtb";
-+ reg = <0x400000 0x80000>;
-+ };
-+ partition@4 {
-+ label = "splash";
-+ reg = <0x480000 0x20000>;
-+ };
-+ partition@5 {
-+ label = "kernel";
-+ reg = <0x500000 0x800000>;
-+ };
-+ partition@6 {
-+ label = "rootfs";
-+ reg = <0xd00000 0xf300000>;
-+ };
-+ };
-+
-+ ssp0: ssp@80010000 {
-+ compatible = "fsl,imx28-mmc";
-+ pinctrl-names = "default";
-+ pinctrl-0 = <&mmc0_8bit_pins_a
-+ &mmc0_cd_cfg &mmc0_sck_cfg>;
-+ bus-width = <8>;
-+ wp-gpios = <&gpio2 12 0>;
-+ vmmc-supply = <®_vddio_sd0>;
-+ status = "okay";
-+ };
-+
-+ ssp2: ssp@80014000 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "fsl,imx28-spi";
-+ pinctrl-names = "default";
-+ pinctrl-0 = <&spi2_pins_a>;
-+ status = "okay";
-+ device@0 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "spidev";
-+ reg = <0>; //Chip select 0
-+ spi-max-frequency = <3125000>;
-+ };
-+ };
-+ };
-+
-+ apbx@80040000 {
-+ duart: serial@80074000 {
-+ pinctrl-names = "default";
-+ pinctrl-0 = <&duart_pins_a>;
-+ status = "okay";
-+ };
-+ };
-+ };
-+
-+ ahb@80080000 {
-+ mac0: ethernet@800f0000 {
-+ phy-mode = "rmii";
-+ pinctrl-names = "default";
-+ pinctrl-0 = <&mac0_pins_a>;
-+ phy-reset-gpios = <&gpio4 13 0>;
-+ status = "okay";
-+ };
-+ };
-+ regulators {
-+ compatible = "simple-bus";
-+ reg_vddio_sd0: vddio-sd0 {
-+ compatible = "regulator-fixed";
-+ regulator-name = "vddio-sd0";
-+ regulator-min-microvolt = <3300000>;
-+ regulator-max-microvolt = <3300000>;
-+ gpio = <&gpio3 28 0>;
-+ };
-+ };
-+};
diff --git a/patches/linux/3.6/0403-armadeus-Add-apf28-support-dts.patch b/patches/linux/3.6/0403-armadeus-Add-apf28-support-dts.patch
new file mode 100644
index 0000000..2b028c0
--- /dev/null
+++ b/patches/linux/3.6/0403-armadeus-Add-apf28-support-dts.patch
@@ -0,0 +1,144 @@
+Add APF28 module support (device tree based).
+
+Signed-off-by: Julien Boibessot <jul...@ar...>
+Signed-off-by: Gwenhael Goavec-Merou <gwe...@ar...>
+---
+
+Index: linux-3.6-rc6/arch/arm/boot/dts/imx28-apf28.dts
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-3.6-rc6/arch/arm/boot/dts/imx28-apf28.dts 2012-09-24 17:38:15.000000000 +0200
+@@ -0,0 +1,79 @@
++/*
++ * Copyright 2012 Armadeus Systems - <su...@ar...>
++ *
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++/dts-v1/;
++/include/ "imx28.dtsi"
++
++/ {
++ model = "Armadeus Systems APF28 module";
++ compatible = "armadeus,imx28-apf28", "fsl,imx28";
++
++ memory {
++ reg = <0x40000000 0x08000000>;
++ };
++
++ apb@80000000 {
++ apbh@80000000 {
++ gpmi-nand@8000c000 {
++ pinctrl-names = "default";
++ pinctrl-0 = <&gpmi_pins_a &gpmi_status_cfg>;
++ status = "okay";
++
++ partition@0 {
++ label = "u-boot";
++ reg = <0x0 0x300000>;
++ };
++ partition@1 {
++ label = "env";
++ reg = <0x300000 0x80000>;
++ };
++ partition@2 {
++ label = "env2";
++ reg = <0x380000 0x20000>;
++ };
++ partition@3 {
++ label = "dtb";
++ reg = <0x400000 0x80000>;
++ };
++ partition@4 {
++ label = "splash";
++ reg = <0x480000 0x20000>;
++ };
++ partition@5 {
++ label = "kernel";
++ reg = <0x500000 0x800000>;
++ };
++ partition@6 {
++ label = "rootfs";
++ reg = <0xd00000 0xf300000>;
++ };
++ };
++ };
++
++ apbx@80040000 {
++ duart: serial@80074000 {
++ pinctrl-names = "default";
++ pinctrl-0 = <&duart_pins_a>;
++ status = "okay";
++ };
++ };
++ };
++
++ ahb@80080000 {
++ mac0: ethernet@800f0000 {
++ phy-mode = "rmii";
++ pinctrl-names = "default";
++ pinctrl-0 = <&mac0_pins_a>;
++ phy-reset-gpios = <&gpio4 13 0>;
++ status = "okay";
++ };
++ };
++};
+Index: linux-3.6-rc6/arch/arm/mach-mxs/mach-mxs.c
+===================================================================
+--- linux-3.6-rc6.orig/arch/arm/mach-mxs/mach-mxs.c 2012-09-16 23:58:51.000000000 +0200
++++ linux-3.6-rc6/arch/arm/mach-mxs/mach-mxs.c 2012-09-25 19:30:47.000000000 +0200
+@@ -157,6 +157,7 @@
+ enum mac_oui {
+ OUI_FSL,
+ OUI_DENX,
++ /*OUI_ARMADEUS,*/
+ };
+
+ static void __init update_fec_mac_prop(enum mac_oui oui)
+@@ -202,6 +203,11 @@
+ macaddr[1] = 0xe5;
+ macaddr[2] = 0x4e;
+ break;
++ /*case OUI_ARMADEUS:
++ macaddr[0] = 0x??;
++ macaddr[1] = 0x??;
++ macaddr[2] = 0x??;
++ break;*/
+ }
+ val = ocotp[i];
+ macaddr[3] = (val >> 16) & 0xff;
+@@ -270,6 +276,12 @@
+ mxsfb_pdata.ld_intf_width = STMLCDIF_24BIT;
+ }
+
++static void __init apf28_init(void)
++{
++ enable_clk_enet_out();
++ /*update_fec_mac_prop(OUI_ARMADEUS);TBDL*/
++}
++
+ static void __init mxs_machine_init(void)
+ {
+ if (of_machine_is_compatible("fsl,imx28-evk"))
+@@ -280,6 +292,8 @@
+ m28evk_init();
+ else if (of_machine_is_compatible("bluegiga,apx4devkit"))
+ apx4devkit_init();
++ else if (of_machine_is_compatible("armadeus,imx28-apf28"))
++ apf28_init();
+
+ of_platform_populate(NULL, of_default_bus_match_table,
+ mxs_auxdata_lookup, NULL);
+@@ -299,6 +313,7 @@
+ "denx,m28evk",
+ "fsl,imx28-evk",
+ "karo,tx28",
++ "armadeus,apf28",
+ "fsl,imx28",
+ NULL,
+ };
diff --git a/patches/linux/3.6/0404-armadeus-mx28_Initialize_fec_phy_clock.patch b/patches/linux/3.6/0404-armadeus-mx28_Initialize_fec_phy_clock.patch
deleted file mode 100644
index 735e99d..0000000
--- a/patches/linux/3.6/0404-armadeus-mx28_Initialize_fec_phy_clock.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Fec phy clock needs to be enabled to have the interface working.
-
-Signed-off-by: Gwenhael Goavec-Merou <gwe...@ar...>
----
-
-Index: linux-3.6-rc6/arch/arm/mach-mxs/mach-mxs.c
-===================================================================
---- linux-3.6-rc6.orig/arch/arm/mach-mxs/mach-mxs.c
-+++ linux-3.6-rc6/arch/arm/mach-mxs/mach-mxs.c
-@@ -270,6 +270,11 @@ static void __init apx4devkit_init(void)
- mxsfb_pdata.ld_intf_width = STMLCDIF_24BIT;
- }
-
-+static void __init apf28_init(void)
-+{
-+ enable_clk_enet_out();
-+}
-+
- static void __init mxs_machine_init(void)
- {
- if (of_machine_is_compatible("fsl,imx28-evk"))
-@@ -280,6 +285,8 @@ static void __init mxs_machine_init(void
- m28evk_init();
- else if (of_machine_is_compatible("bluegiga,apx4devkit"))
- apx4devkit_init();
-+ else if (of_machine_is_compatible("armadeus,imx28-apf28"))
-+ apf28_init();
-
- of_platform_populate(NULL, of_default_bus_match_table,
- mxs_auxdata_lookup, NULL);
diff --git a/patches/linux/3.6/0418-armadeus-mx28-Add-pwm-pinmux-to-imx28-dtsi.patch b/patches/linux/3.6/0418-armadeus-mx28-Add-pwm-pinmux-to-imx28-dtsi.patch
new file mode 100644
index 0000000..c669cd0
--- /dev/null
+++ b/patches/linux/3.6/0418-armadeus-mx28-Add-pwm-pinmux-to-imx28-dtsi.patch
@@ -0,0 +1,35 @@
+
+Signed-off-by: Gwenhaël Goavec-Merou <gw...@tr...>
+Signed-off-by: Julien Boibessot <jul...@ar...>
+
+Index: linux-3.6-rc6/arch/arm/boot/dts/imx28.dtsi
+===================================================================
+--- linux-3.6-rc6.orig/arch/arm/boot/dts/imx28.dtsi 2012-09-25 19:10:09.000000000 +0200
++++ linux-3.6-rc6/arch/arm/boot/dts/imx28.dtsi 2012-09-25 19:12:38.000000000 +0200
+@@ -453,6 +453,26 @@
+ fsl,pull-up = <0>;
+ };
+
++ pwm3_pins_a: pwm3@0 {
++ reg = <0>;
++ fsl,pinmux-ids = <
++ 0x31C0 /* MX28_PAD_PWM3__PWM_3 */
++ >;
++ fsl,drive-strength = <0>;
++ fsl,voltage = <1>;
++ fsl,pull-up = <0>;
++ };
++
++ pwm4_pins_a: pwm4@0 {
++ reg = <0>;
++ fsl,pinmux-ids = <
++ 0x31d0 /* MX28_PAD_PWM4__PWM_4 */
++ >;
++ fsl,drive-strength = <0>;
++ fsl,voltage = <1>;
++ fsl,pull-up = <0>;
++ };
++
+ lcdif_24bit_pins_a: lcdif-24bit@0 {
+ reg = <0>;
+ fsl,pinmux-ids = <
diff --git a/patches/linux/3.6/0419-armadeus-mx28-Add-lcdif16-pinmux-to-imx28-dtsi.patch b/patches/linux/3.6/0419-armadeus-mx28-Add-lcdif16-pinmux-to-imx28-dtsi.patch
new file mode 100644
index 0000000..506f88d
--- /dev/null
+++ b/patches/linux/3.6/0419-armadeus-mx28-Add-lcdif16-pinmux-to-imx28-dtsi.patch
@@ -0,0 +1,39 @@
+
+Signed-off-by: Julien Boibessot <jul...@ar...>
+
+Index: linux-3.6-rc6/arch/arm/boot/dts/imx28.dtsi
+===================================================================
+--- linux-3.6-rc6.orig/arch/arm/boot/dts/imx28.dtsi 2012-09-25 20:36:57.000000000 +0200
++++ linux-3.6-rc6/arch/arm/boot/dts/imx28.dtsi 2012-09-25 20:38:38.000000000 +0200
+@@ -506,6 +506,31 @@
+ fsl,pull-up = <0>;
+ };
+
++ lcdif_16bit_pins_a: lcdif-16bit@0 {
++ reg = <0>;
++ fsl,pinmux-ids = <
++ 0x1000 /* MX28_PAD_LCD_D00__LCD_D0 */
++ 0x1010 /* MX28_PAD_LCD_D01__LCD_D1 */
++ 0x1020 /* MX28_PAD_LCD_D02__LCD_D2 */
++ 0x1030 /* MX28_PAD_LCD_D03__LCD_D3 */
++ 0x1040 /* MX28_PAD_LCD_D04__LCD_D4 */
++ 0x1050 /* MX28_PAD_LCD_D05__LCD_D5 */
++ 0x1060 /* MX28_PAD_LCD_D06__LCD_D6 */
++ 0x1070 /* MX28_PAD_LCD_D07__LCD_D7 */
++ 0x1080 /* MX28_PAD_LCD_D08__LCD_D8 */
++ 0x1090 /* MX28_PAD_LCD_D09__LCD_D9 */
++ 0x10a0 /* MX28_PAD_LCD_D10__LCD_D10 */
++ 0x10b0 /* MX28_PAD_LCD_D11__LCD_D11 */
++ 0x10c0 /* MX28_PAD_LCD_D12__LCD_D12 */
++ 0x10d0 /* MX28_PAD_LCD_D13__LCD_D13 */
++ 0x10e0 /* MX28_PAD_LCD_D14__LCD_D14 */
++ 0x10f0 /* MX28_PAD_LCD_D15__LCD_D15 */
++ >;
++ fsl,drive-strength = <0>;
++ fsl,voltage = <1>;
++ fsl,pull-up = <0>;
++ };
++
+ can0_pins_a: can0@0 {
+ reg = <0>;
+ fsl,pinmux-ids = <
diff --git a/patches/linux/3.6/0420-armadeus-Add-apf28dev-dts.patch b/patches/linux/3.6/0420-armadeus-Add-apf28dev-dts.patch
new file mode 100644
index 0000000..6da70f2
--- /dev/null
+++ b/patches/linux/3.6/0420-armadeus-Add-apf28dev-dts.patch
@@ -0,0 +1,216 @@
+
+Signed-off-by: Julien Boibessot <jul...@ar...>
+
+Index: linux-3.6-rc6/arch/arm/boot/dts/imx28-apf28dev.dts
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-3.6-rc6/arch/arm/boot/dts/imx28-apf28dev.dts 2012-09-25 21:23:27.000000000 +0200
+@@ -0,0 +1,165 @@
++/*
++ * Copyright 2012 Armadeus Systems - <su...@ar...>
++ *
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++/* APF28Dev is a docking board for the APF28 SOM */
++/include/ "imx28-apf28.dts"
++
++/ {
++ model = "Armadeus Systems APF28Dev docking/development board";
++ compatible = "armadeus,imx28-apf28dev", "armadeus,imx28-apf28", "fsl,imx28";
++
++ apb@80000000 {
++ apbh@80000000 {
++ ssp0: ssp@80010000 {
++ compatible = "fsl,imx28-mmc";
++ pinctrl-names = "default";
++ pinctrl-0 = <&mmc0_8bit_pins_a
++ &mmc0_cd_cfg &mmc0_sck_cfg>;
++ bus-width = <8>;
++ wp-gpios = <&gpio2 12 0>;
++ vmmc-supply = <®_vddio_sd0>;
++ status = "okay";
++ };
++
++ ssp2: ssp@80014000 {
++ #address-cells = <1>;
++ #size-cells = <0>;
++ compatible = "fsl,imx28-spi";
++ pinctrl-names = "default";
++ pinctrl-0 = <&spi2_pins_a>;
++ status = "okay";
++ device@0 {
++ #address-cells = <1>;
++ #size-cells = <0>;
++ compatible = "spidev";
++ reg = <0>; //Chip select 0
++ spi-max-frequency = <3125000>;
++ };
++ };
++
++ pinctrl@80018000 {
++ pinctrl-names = "default";
++ pinctrl-0 = <&hog_pins_apf28dev>;
++
++ hog_pins_apf28dev: hog-gpios@0 {
++ reg = <0>;
++ fsl,pinmux-ids = <
++ 0x1103 /* MX28_PAD_LCD_D16__GPIO_1_16 */
++ 0x1113 /* MX28_PAD_LCD_D17__GPIO_1_17 */
++ 0x1123 /* MX28_PAD_LCD_D18__GPIO_1_18 */
++ 0x1133 /* MX28_PAD_LCD_D19__GPIO_1_19 */
++ 0x1143 /* MX28_PAD_LCD_D20__GPIO_1_20 */
++ 0x1153 /* MX28_PAD_LCD_D21__GPIO_1_21 */
++ 0x1163 /* MX28_PAD_LCD_D22__GPIO_1_22 */
++ 0x1173 /* MX28_PAD_LCD_D23__GPIO_1_23 */
++ >;
++ fsl,drive-strength = <0>;
++ fsl,voltage = <1>;
++ fsl,pull-up = <0>;
++ };
++
++ lcdif_pins_apf28dev: lcdif-gpios@0 {
++ reg = <0>;
++ fsl,pinmux-ids = <
++ 0x1181 /* MX28_PAD_LCD_RD_E__LCD_VSYNC */
++ 0x1191 /* MX28_PAD_LCD_WR_RWN__LCD_HSYNC */
++ 0x11a1 /* MX28_PAD_LCD_RS__LCD_DOTCLK */
++ 0x11b1 /* MX28_PAD_LCD_CS__LCD_ENABLE */
++ >;
++ fsl,drive-strength = <0>;
++ fsl,voltage = <1>;
++ fsl,pull-up = <0>;
++ };
++ };
++
++ lcdif@80030000 {
++ pinctrl-names = "default";
++ pinctrl-0 = <&lcdif_16bit_pins_a
++ &lcdif_pins_apf28dev>;
++ /* panel-enable-gpios = <&gpio3 30 0>; */
++ status = "okay";
++ };
++ };
++
++ apbx@80040000 {
++ pwm: pwm@80064000 {
++ pinctrl-names = "default";
++ pinctrl-0 = <&pwm3_pins_a &pwm4_pins_a>;
++ status = "okay";
++ };
++
++ usbphy0: usbphy@8007c000 {
++ status = "okay";
++ };
++
++ usbphy1: usbphy@8007e000 {
++ status = "okay";
++ };
++ };
++ };
++
++ ahb@80080000 {
++ usb0: usb@80080000 {
++ vbus-supply = <®_usb0_vbus>;
++ status = "okay";
++ };
++
++ usb1: usb@80090000 {
++ status = "okay";
++ };
++
++ mac1: ethernet@800f4000 {
++ phy-mode = "rmii";
++ pinctrl-names = "default";
++ pinctrl-0 = <&mac1_pins_a>;
++ phy-reset-gpios = <&gpio0 23 0>;
++ status = "okay";
++ };
++ };
++
++ regulators {
++ compatible = "simple-bus";
++
++ reg_vddio_sd0: vddio-sd0 {
++ compatible = "regulator-fixed";
++ regulator-name = "vddio-sd0";
++ regulator-min-microvolt = <3300000>;
++ regulator-max-microvolt = <3300000>;
++ gpio = <&gpio3 28 0>;
++ };
++
++ reg_usb0_vbus: usb0_vbus {
++ compatible = "regulator-fixed";
++ regulator-name = "usb0_vbus";
++ regulator-min-microvolt = <5000000>;
++ regulator-max-microvolt = <5000000>;
++ gpio = <&gpio1 23 1>;
++ };
++ };
++
++ leds {
++ compatible = "gpio-leds";
++
++ user {
++ label = "Heartbeat";
++ gpios = <&gpio0 21 0>;
++ linux,default-trigger = "heartbeat";
++ };
++ };
++
++ backlight {
++ compatible = "pwm-backlight";
++
++ pwms = <&pwm 3 5000000>;
++ brightness-levels = <0 4 8 16 32 64 128 255>;
++ default-brightness-level = <6>;
++ };
++};
+Index: linux-3.6-rc6/arch/arm/mach-mxs/mach-mxs.c
+===================================================================
+--- linux-3.6-rc6.orig/arch/arm/mach-mxs/mach-mxs.c 2012-09-25 20:36:06.000000000 +0200
++++ linux-3.6-rc6/arch/arm/mach-mxs/mach-mxs.c 2012-09-25 20:38:49.000000000 +0200
+@@ -97,6 +97,25 @@
+ },
+ };
+
++static struct fb_videomode apf28dev_video_modes[] = {
++ {
++ .name = "LW700",
++ .refresh = 60,
++ .xres = 800,
++ .yres = 480,
++ .pixclock = 30303, /* picosecond */
++ .left_margin = 96,
++ .right_margin = 96, /* at least 3 & 1 */
++ .upper_margin = 0x14,
++ .lower_margin = 0x15,
++ .hsync_len = 64,
++ .vsync_len = 4,
++ .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT |
++ FB_SYNC_DATA_ENABLE_HIGH_ACT |
++ FB_SYNC_DOTCLK_FAILING_ACT,
++ },
++};
++
+ static struct mxsfb_platform_data mxsfb_pdata __initdata;
+
+ static struct of_dev_auxdata mxs_auxdata_lookup[] __initdata = {
+@@ -280,6 +299,12 @@
+ {
+ enable_clk_enet_out();
+ /*update_fec_mac_prop(OUI_ARMADEUS);TBDL*/
++ printk("--------############\n");
++
++ mxsfb_pdata.mode_list = apf28dev_video_modes;
++ mxsfb_pdata.mode_count = ARRAY_SIZE(apf28dev_video_modes);
++ mxsfb_pdata.default_bpp = 16;
++ mxsfb_pdata.ld_intf_width = STMLCDIF_16BIT;
+ }
+
+ static void __init mxs_machine_init(void)
hooks/post-receive
--
armadeus
|
|
From: Gwenhael Goavec-M. <gwe...@us...> - 2012-09-22 17:28:14
|
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 e2d9a61cff4c51b9ca01eb78568f8469355d6584 (commit)
via 4fe96b6fa49ff1a2e5c9b398fb89c7b8fa0d38d1 (commit)
via 632342ee272ab39db05fb49bfa394f51af3087c7 (commit)
via 5ee5c5bf6ec8b64aeaddb883f63a309d9418c41b (commit)
from b0632bf57d4774fbc6a7d642cb0fa6616d5fc96f (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 e2d9a61cff4c51b9ca01eb78568f8469355d6584
Author: Gwenhael Goavec-Merou <gw...@tr...>
Date: Sat Sep 22 19:27:32 2012 +0200
[LINUX][3.6] adapt patches 0410, 0411, 0413 from 3.5
commit 4fe96b6fa49ff1a2e5c9b398fb89c7b8fa0d38d1
Author: Gwenhael Goavec-Merou <gw...@tr...>
Date: Sat Sep 22 19:26:49 2012 +0200
[LINUX][3.6] import patches 0406, 0407, 0408, 0409, 0412, 0414, 0415, 0416, 0417 from 3.5
commit 632342ee272ab39db05fb49bfa394f51af3087c7
Author: Gwenhael Goavec-Merou <gw...@tr...>
Date: Sat Sep 22 19:24:41 2012 +0200
[LINUX][3.6] suppress useless patch 0405
commit 5ee5c5bf6ec8b64aeaddb883f63a309d9418c41b
Author: Gwenhael Goavec-Merou <gw...@tr...>
Date: Sat Sep 22 19:24:09 2012 +0200
[LINUX][3.6] 0404 source cleanup
-----------------------------------------------------------------------
Summary of changes:
...04-armadeus-mx28_Initialize_fec_phy_clock.patch | 30 +++----
...0405-armadeus-mx28_rename_gpmi_nand_clock.patch | 18 ----
...406-armadeus-mx28-add_SPI_support_kconfig.patch | 0
...P_register_definitions_into_separate_file.patch | 0
...x28-mmc_spi_Rename_IMX2x_MMC_to_IMX2x_SSP.patch | 0
...mmc_spi_Add_necessary_bits_into_mxs-spi-h.patch | 0
...Pull_out_parts_shared_between_MMC_and_SPI.patch | 87 +++++++++-----------
..._out_the_SSP_clock_configuration_function.patch | 35 ++++----
...ix-mx28-spi_Add_SPI_driver_for_mx233_mx28.patch | 0
...pi_Pull_out_common_DMA_parts_from_MXS_MMC.patch | 54 ++++++------
...-mx28-spi_Add_DMA_support_into_SPI_driver.patch | 0
...spi_Add_SSP_SPI_device_tree_documentation.patch | 0
...ronix-mx28_Add_SPI_pinmux_into_imx28_dtsi.patch | 0
.../0417-pengutronix-mx28-Add_SPI_ressources.patch | 0
14 files changed, 96 insertions(+), 128 deletions(-)
delete mode 100644 patches/linux/3.6/0405-armadeus-mx28_rename_gpmi_nand_clock.patch
copy patches/linux/{3.5 => 3.6}/0406-armadeus-mx28-add_SPI_support_kconfig.patch (100%)
copy patches/linux/{3.5 => 3.6}/0407-pengutronix-mx28-Move_SSP_register_definitions_into_separate_file.patch (100%)
copy patches/linux/{3.5 => 3.6}/0408-pengutronix-mx28-mmc_spi_Rename_IMX2x_MMC_to_IMX2x_SSP.patch (100%)
copy patches/linux/{3.5 => 3.6}/0409-pengutronix-mx28-mmc_spi_Add_necessary_bits_into_mxs-spi-h.patch (100%)
copy patches/linux/{3.5 => 3.6}/0410-pengutronix-mx28-mmc_spi_Pull_out_parts_shared_between_MMC_and_SPI.patch (80%)
copy patches/linux/{3.5 => 3.6}/0411-pengutronix-mx28-mmc_spi_Pull_out_the_SSP_clock_configuration_function.patch (84%)
copy patches/linux/{3.5 => 3.6}/0412-pengutronix-mx28-spi_Add_SPI_driver_for_mx233_mx28.patch (100%)
copy patches/linux/{3.5 => 3.6}/0413-pengutronix-mx28-mmc_spi_Pull_out_common_DMA_parts_from_MXS_MMC.patch (83%)
copy patches/linux/{3.5 => 3.6}/0414-pengutronix-mx28-spi_Add_DMA_support_into_SPI_driver.patch (100%)
copy patches/linux/{3.5 => 3.6}/0415-pengutronix-mx28-spi_Add_SSP_SPI_device_tree_documentation.patch (100%)
copy patches/linux/{3.5 => 3.6}/0416-pengutronix-mx28_Add_SPI_pinmux_into_imx28_dtsi.patch (100%)
copy patches/linux/{3.5 => 3.6}/0417-pengutronix-mx28-Add_SPI_ressources.patch (100%)
diff --git a/patches/linux/3.6/0404-armadeus-mx28_Initialize_fec_phy_clock.patch b/patches/linux/3.6/0404-armadeus-mx28_Initialize_fec_phy_clock.patch
index 3958f4e..735e99d 100644
--- a/patches/linux/3.6/0404-armadeus-mx28_Initialize_fec_phy_clock.patch
+++ b/patches/linux/3.6/0404-armadeus-mx28_Initialize_fec_phy_clock.patch
@@ -3,32 +3,28 @@ Fec phy clock needs to be enabled to have the interface working.
Signed-off-by: Gwenhael Goavec-Merou <gwe...@ar...>
---
-Index: linux-3.5/arch/arm/mach-mxs/mach-mxs.c
+Index: linux-3.6-rc6/arch/arm/mach-mxs/mach-mxs.c
===================================================================
---- linux-3.5.orig/arch/arm/mach-mxs/mach-mxs.c
-+++ linux-3.5/arch/arm/mach-mxs/mach-mxs.c
-@@ -81,11 +81,24 @@ static void __init imx28_evk_init(void)
- clk_prepare_enable(clk);
+--- linux-3.6-rc6.orig/arch/arm/mach-mxs/mach-mxs.c
++++ linux-3.6-rc6/arch/arm/mach-mxs/mach-mxs.c
+@@ -270,6 +270,11 @@ static void __init apx4devkit_init(void)
+ mxsfb_pdata.ld_intf_width = STMLCDIF_24BIT;
}
+static void __init apf28_init(void)
+{
-+ struct clk *clk;
-+
-+ /* Enable fec phy clock */
-+ clk = clk_get_sys("enet_out", NULL);
-+ if (!IS_ERR(clk))
-+ clk_prepare_enable(clk);
++ enable_clk_enet_out();
+}
+
static void __init mxs_machine_init(void)
{
if (of_machine_is_compatible("fsl,imx28-evk"))
- imx28_evk_init();
-
-+ if (of_machine_is_compatible("armadeus,imx28-apf28"))
+@@ -280,6 +285,8 @@ static void __init mxs_machine_init(void
+ m28evk_init();
+ else if (of_machine_is_compatible("bluegiga,apx4devkit"))
+ apx4devkit_init();
++ else if (of_machine_is_compatible("armadeus,imx28-apf28"))
+ apf28_init();
-+
+
of_platform_populate(NULL, of_default_bus_match_table,
- NULL, NULL);
- }
+ mxs_auxdata_lookup, NULL);
diff --git a/patches/linux/3.6/0405-armadeus-mx28_rename_gpmi_nand_clock.patch b/patches/linux/3.6/0405-armadeus-mx28_rename_gpmi_nand_clock.patch
deleted file mode 100644
index d3220aa..0000000
--- a/patches/linux/3.6/0405-armadeus-mx28_rename_gpmi_nand_clock.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Renames gpmi-nand clock dev_id according to the driver.
-
-Signed-off-by: Gwenhael Goavec-Merou <gwe...@ar...>
----
-
-Index: linux-3.5/drivers/clk/mxs/clk-imx28.c
-===================================================================
---- linux-3.5.orig/drivers/clk/mxs/clk-imx28.c
-+++ linux-3.5/drivers/clk/mxs/clk-imx28.c
-@@ -174,7 +174,7 @@ static struct clk_lookup lcdif_lookups[]
-
- static struct clk_lookup gpmi_lookups[] = {
- { .dev_id = "imx28-gpmi-nand", },
-- { .dev_id = "8000c000.gpmi", },
-+ { .dev_id = "8000c000.gpmi-nand", },
- };
-
- static struct clk_lookup fec_lookups[] = {
diff --git a/patches/linux/3.5/0406-armadeus-mx28-add_SPI_support_kconfig.patch b/patches/linux/3.6/0406-armadeus-mx28-add_SPI_support_kconfig.patch
similarity index 100%
copy from patches/linux/3.5/0406-armadeus-mx28-add_SPI_support_kconfig.patch
copy to patches/linux/3.6/0406-armadeus-mx28-add_SPI_support_kconfig.patch
diff --git a/patches/linux/3.5/0407-pengutronix-mx28-Move_SSP_register_definitions_into_separate_file.patch b/patches/linux/3.6/0407-pengutronix-mx28-Move_SSP_register_definitions_into_separate_file.patch
similarity index 100%
copy from patches/linux/3.5/0407-pengutronix-mx28-Move_SSP_register_definitions_into_separate_file.patch
copy to patches/linux/3.6/0407-pengutronix-mx28-Move_SSP_register_definitions_into_separate_file.patch
diff --git a/patches/linux/3.5/0408-pengutronix-mx28-mmc_spi_Rename_IMX2x_MMC_to_IMX2x_SSP.patch b/patches/linux/3.6/0408-pengutronix-mx28-mmc_spi_Rename_IMX2x_MMC_to_IMX2x_SSP.patch
similarity index 100%
copy from patches/linux/3.5/0408-pengutronix-mx28-mmc_spi_Rename_IMX2x_MMC_to_IMX2x_SSP.patch
copy to patches/linux/3.6/0408-pengutronix-mx28-mmc_spi_Rename_IMX2x_MMC_to_IMX2x_SSP.patch
diff --git a/patches/linux/3.5/0409-pengutronix-mx28-mmc_spi_Add_necessary_bits_into_mxs-spi-h.patch b/patches/linux/3.6/0409-pengutronix-mx28-mmc_spi_Add_necessary_bits_into_mxs-spi-h.patch
similarity index 100%
copy from patches/linux/3.5/0409-pengutronix-mx28-mmc_spi_Add_necessary_bits_into_mxs-spi-h.patch
copy to patches/linux/3.6/0409-pengutronix-mx28-mmc_spi_Add_necessary_bits_into_mxs-spi-h.patch
diff --git a/patches/linux/3.5/0410-pengutronix-mx28-mmc_spi_Pull_out_parts_shared_between_MMC_and_SPI.patch b/patches/linux/3.6/0410-pengutronix-mx28-mmc_spi_Pull_out_parts_shared_between_MMC_and_SPI.patch
similarity index 80%
copy from patches/linux/3.5/0410-pengutronix-mx28-mmc_spi_Pull_out_parts_shared_between_MMC_and_SPI.patch
copy to patches/linux/3.6/0410-pengutronix-mx28-mmc_spi_Pull_out_parts_shared_between_MMC_and_SPI.patch
index 0ce2f71..6d0bf4e 100644
--- a/patches/linux/3.5/0410-pengutronix-mx28-mmc_spi_Pull_out_parts_shared_between_MMC_and_SPI.patch
+++ b/patches/linux/3.6/0410-pengutronix-mx28-mmc_spi_Pull_out_parts_shared_between_MMC_and_SPI.patch
@@ -16,10 +16,10 @@ CC: Shawn Guo <sha...@li...>
include/linux/spi/mxs-spi.h | 8 ++++
2 files changed, 67 insertions(+), 48 deletions(-)
-diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
-index e80c2b6..7b85e03 100644
---- a/drivers/mmc/host/mxs-mmc.c
-+++ b/drivers/mmc/host/mxs-mmc.c
+Index: linux-3.6-rc6/drivers/mmc/host/mxs-mmc.c
+===================================================================
+--- linux-3.6-rc6.orig/drivers/mmc/host/mxs-mmc.c
++++ linux-3.6-rc6/drivers/mmc/host/mxs-mmc.c
@@ -62,23 +62,20 @@
#define MXS_MMC_DETECT_TIMEOUT (HZ/2)
@@ -46,7 +46,7 @@ index e80c2b6..7b85e03 100644
unsigned char bus_width;
spinlock_t lock;
int sdio_irq_en;
-@@ -98,16 +95,18 @@ static int mxs_mmc_get_ro(struct mmc_host *mmc)
+@@ -105,16 +102,18 @@ static int mxs_mmc_get_ro(struct mmc_hos
static int mxs_mmc_get_cd(struct mmc_host *mmc)
{
struct mxs_mmc_host *host = mmc_priv(mmc);
@@ -67,7 +67,7 @@ index e80c2b6..7b85e03 100644
ctrl0 = BM_SSP_CTRL0_IGNORE_CRC;
ctrl1 = BF_SSP(0x3, CTRL1_SSP_MODE) |
-@@ -123,15 +122,15 @@ static void mxs_mmc_reset(struct mxs_mmc_host *host)
+@@ -130,15 +129,15 @@ static void mxs_mmc_reset(struct mxs_mmc
writel(BF_SSP(0xffff, TIMING_TIMEOUT) |
BF_SSP(2, TIMING_CLOCK_DIVIDE) |
BF_SSP(0, TIMING_CLOCK_RATE),
@@ -86,7 +86,7 @@ index e80c2b6..7b85e03 100644
}
static void mxs_mmc_start_cmd(struct mxs_mmc_host *host,
-@@ -142,15 +141,16 @@ static void mxs_mmc_request_done(struct mxs_mmc_host *host)
+@@ -149,15 +148,16 @@ static void mxs_mmc_request_done(struct
struct mmc_command *cmd = host->cmd;
struct mmc_data *data = host->data;
struct mmc_request *mrq = host->mrq;
@@ -108,7 +108,7 @@ index e80c2b6..7b85e03 100644
}
}
-@@ -189,13 +189,14 @@ static irqreturn_t mxs_mmc_irq_handler(int irq, void *dev_id)
+@@ -196,13 +196,14 @@ static irqreturn_t mxs_mmc_irq_handler(i
struct mxs_mmc_host *host = dev_id;
struct mmc_command *cmd = host->cmd;
struct mmc_data *data = host->data;
@@ -123,9 +123,9 @@ index e80c2b6..7b85e03 100644
- host->base + HW_SSP_CTRL1(host) + STMP_OFFSET_REG_CLR);
+ ssp->base + HW_SSP_CTRL1(ssp) + STMP_OFFSET_REG_CLR);
- if ((stat & BM_SSP_CTRL1_SDIO_IRQ) && (stat & BM_SSP_CTRL1_SDIO_IRQ_EN))
- mmc_signal_sdio_irq(host->mmc);
-@@ -359,6 +360,8 @@ static void mxs_mmc_adtc(struct mxs_mmc_host *host)
+ spin_unlock(&host->lock);
+
+@@ -366,6 +367,8 @@ static void mxs_mmc_adtc(struct mxs_mmc_
unsigned int data_size = 0, log2_blksz;
unsigned int blocks = data->blocks;
@@ -134,7 +134,7 @@ index e80c2b6..7b85e03 100644
u32 ignore_crc, get_resp, long_resp, read;
u32 ctrl0, cmd0, cmd1, val;
-@@ -401,15 +404,15 @@ static void mxs_mmc_adtc(struct mxs_mmc_host *host)
+@@ -408,15 +411,15 @@ static void mxs_mmc_adtc(struct mxs_mmc_
blocks = 1;
/* xfer count, block size and count need to be set differently */
@@ -153,7 +153,7 @@ index e80c2b6..7b85e03 100644
}
if ((cmd->opcode == MMC_STOP_TRANSMISSION) ||
-@@ -424,11 +427,11 @@ static void mxs_mmc_adtc(struct mxs_mmc_host *host)
+@@ -431,11 +434,11 @@ static void mxs_mmc_adtc(struct mxs_mmc_
}
/* set the timeout count */
@@ -168,7 +168,7 @@ index e80c2b6..7b85e03 100644
/* pio */
host->ssp_pio_words[0] = ctrl0;
-@@ -493,11 +496,12 @@ static void mxs_mmc_request(struct mmc_host *mmc, struct mmc_request *mrq)
+@@ -500,11 +503,12 @@ static void mxs_mmc_request(struct mmc_h
static void mxs_mmc_set_clk_rate(struct mxs_mmc_host *host, unsigned int rate)
{
@@ -182,7 +182,7 @@ index e80c2b6..7b85e03 100644
for (clock_divide = 2; clock_divide <= 254; clock_divide += 2) {
clock_rate = DIV_ROUND_UP(ssp_clk, rate * clock_divide);
-@@ -514,13 +518,13 @@ static void mxs_mmc_set_clk_rate(struct mxs_mmc_host *host, unsigned int rate)
+@@ -521,13 +525,13 @@ static void mxs_mmc_set_clk_rate(struct
ssp_sck = ssp_clk / clock_divide / (1 + clock_rate);
@@ -199,7 +199,7 @@ index e80c2b6..7b85e03 100644
dev_dbg(mmc_dev(host->mmc),
"%s: clock_divide %d, clock_rate %d, ssp_clk %d, rate_actual %d, rate_requested %d\n",
-@@ -545,6 +549,7 @@ static void mxs_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
+@@ -552,6 +556,7 @@ static void mxs_mmc_set_ios(struct mmc_h
static void mxs_mmc_enable_sdio_irq(struct mmc_host *mmc, int enable)
{
struct mxs_mmc_host *host = mmc_priv(mmc);
@@ -207,7 +207,7 @@ index e80c2b6..7b85e03 100644
unsigned long flags;
spin_lock_irqsave(&host->lock, flags);
-@@ -553,19 +558,19 @@ static void mxs_mmc_enable_sdio_irq(struct mmc_host *mmc, int enable)
+@@ -560,19 +565,19 @@ static void mxs_mmc_enable_sdio_irq(stru
if (enable) {
writel(BM_SSP_CTRL0_SDIO_IRQ_CHECK,
@@ -216,12 +216,6 @@ index e80c2b6..7b85e03 100644
writel(BM_SSP_CTRL1_SDIO_IRQ_EN,
- host->base + HW_SSP_CTRL1(host) + STMP_OFFSET_REG_SET);
+ ssp->base + HW_SSP_CTRL1(ssp) + STMP_OFFSET_REG_SET);
-
-- if (readl(host->base + HW_SSP_STATUS(host)) &
-+ if (readl(ssp->base + HW_SSP_STATUS(ssp)) &
- BM_SSP_STATUS_SDIO_IRQ)
- mmc_signal_sdio_irq(host->mmc);
-
} else {
writel(BM_SSP_CTRL0_SDIO_IRQ_CHECK,
- host->base + HW_SSP_CTRL0 + STMP_OFFSET_REG_CLR);
@@ -232,15 +226,21 @@ index e80c2b6..7b85e03 100644
}
spin_unlock_irqrestore(&host->lock, flags);
-@@ -626,6 +631,7 @@ static int mxs_mmc_probe(struct platform_device *pdev)
+
+- if (enable && readl(host->base + HW_SSP_STATUS(host)) &
++ if (enable && readl(ssp->base + HW_SSP_STATUS(ssp)) &
+ BM_SSP_STATUS_SDIO_IRQ)
+ mmc_signal_sdio_irq(host->mmc);
+
+@@ -633,6 +638,7 @@ static int mxs_mmc_probe(struct platform
struct pinctrl *pinctrl;
int ret = 0, irq_err, irq_dma;
dma_cap_mask_t mask;
+ struct mxs_ssp *ssp;
+ struct regulator *reg_vmmc;
+ enum of_gpio_flags flags;
- iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- dmares = platform_get_resource(pdev, IORESOURCE_DMA, 0);
-@@ -639,14 +645,16 @@ static int mxs_mmc_probe(struct platform_device *pdev)
+@@ -648,14 +654,16 @@ static int mxs_mmc_probe(struct platform
return -ENOMEM;
host = mmc_priv(mmc);
@@ -260,7 +260,7 @@ index e80c2b6..7b85e03 100644
/*
* TODO: This is a temporary solution and should be changed
* to use generic DMA binding later when the helpers get in.
-@@ -659,7 +667,7 @@ static int mxs_mmc_probe(struct platform_device *pdev)
+@@ -668,7 +676,7 @@ static int mxs_mmc_probe(struct platform
goto out_mmc_free;
}
} else {
@@ -269,7 +269,7 @@ index e80c2b6..7b85e03 100644
host->dma_channel = dmares->start;
}
-@@ -672,12 +680,12 @@ static int mxs_mmc_probe(struct platform_device *pdev)
+@@ -691,12 +699,12 @@ static int mxs_mmc_probe(struct platform
goto out_mmc_free;
}
@@ -286,7 +286,7 @@ index e80c2b6..7b85e03 100644
mxs_mmc_reset(host);
-@@ -719,8 +727,8 @@ static int mxs_mmc_probe(struct platform_device *pdev)
+@@ -741,8 +749,8 @@ static int mxs_mmc_probe(struct platform
mmc->max_segs = 52;
mmc->max_blk_size = 1 << 0xf;
@@ -297,7 +297,7 @@ index e80c2b6..7b85e03 100644
mmc->max_seg_size = dma_get_max_seg_size(host->dmach->device->dev);
platform_set_drvdata(pdev, mmc);
-@@ -744,8 +752,8 @@ out_free_dma:
+@@ -766,8 +774,8 @@ out_free_dma:
if (host->dmach)
dma_release_channel(host->dmach);
out_clk_put:
@@ -308,7 +308,7 @@ index e80c2b6..7b85e03 100644
out_mmc_free:
mmc_free_host(mmc);
return ret;
-@@ -755,6 +763,7 @@ static int mxs_mmc_remove(struct platform_device *pdev)
+@@ -777,6 +785,7 @@ static int mxs_mmc_remove(struct platfor
{
struct mmc_host *mmc = platform_get_drvdata(pdev);
struct mxs_mmc_host *host = mmc_priv(mmc);
@@ -316,7 +316,7 @@ index e80c2b6..7b85e03 100644
mmc_remove_host(mmc);
-@@ -763,8 +772,8 @@ static int mxs_mmc_remove(struct platform_device *pdev)
+@@ -785,8 +794,8 @@ static int mxs_mmc_remove(struct platfor
if (host->dmach)
dma_release_channel(host->dmach);
@@ -327,7 +327,7 @@ index e80c2b6..7b85e03 100644
mmc_free_host(mmc);
-@@ -776,11 +785,12 @@ static int mxs_mmc_suspend(struct device *dev)
+@@ -798,11 +807,12 @@ static int mxs_mmc_suspend(struct device
{
struct mmc_host *mmc = dev_get_drvdata(dev);
struct mxs_mmc_host *host = mmc_priv(mmc);
@@ -341,7 +341,7 @@ index e80c2b6..7b85e03 100644
return ret;
}
-@@ -789,9 +799,10 @@ static int mxs_mmc_resume(struct device *dev)
+@@ -811,9 +821,10 @@ static int mxs_mmc_resume(struct device
{
struct mmc_host *mmc = dev_get_drvdata(dev);
struct mxs_mmc_host *host = mmc_priv(mmc);
@@ -353,10 +353,10 @@ index e80c2b6..7b85e03 100644
ret = mmc_resume_host(mmc);
-diff --git a/include/linux/spi/mxs-spi.h b/include/linux/spi/mxs-spi.h
-index 7dfa1d7..475f69f 100644
---- a/include/linux/spi/mxs-spi.h
-+++ b/include/linux/spi/mxs-spi.h
+Index: linux-3.6-rc6/include/linux/spi/mxs-spi.h
+===================================================================
+--- linux-3.6-rc6.orig/include/linux/spi/mxs-spi.h
++++ linux-3.6-rc6/include/linux/spi/mxs-spi.h
@@ -128,4 +128,12 @@ enum mxs_ssp_id {
IMX28_SSP,
};
@@ -370,12 +370,3 @@ index 7dfa1d7..475f69f 100644
+};
+
#endif /* __LINUX_SPI_MXS_SPI_H__ */
---
-1.7.10.4
-
-
-_______________________________________________
-linux-arm-kernel mailing list
-lin...@li...
-http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
-
diff --git a/patches/linux/3.5/0411-pengutronix-mx28-mmc_spi_Pull_out_the_SSP_clock_configuration_function.patch b/patches/linux/3.6/0411-pengutronix-mx28-mmc_spi_Pull_out_the_SSP_clock_configuration_function.patch
similarity index 84%
copy from patches/linux/3.5/0411-pengutronix-mx28-mmc_spi_Pull_out_the_SSP_clock_configuration_function.patch
copy to patches/linux/3.6/0411-pengutronix-mx28-mmc_spi_Pull_out_the_SSP_clock_configuration_function.patch
index f167901..7b21984 100644
--- a/patches/linux/3.5/0411-pengutronix-mx28-mmc_spi_Pull_out_the_SSP_clock_configuration_function.patch
+++ b/patches/linux/3.6/0411-pengutronix-mx28-mmc_spi_Pull_out_the_SSP_clock_configuration_function.patch
@@ -19,10 +19,10 @@ CC: Shawn Guo <sha...@li...>
4 files changed, 66 insertions(+), 39 deletions(-)
create mode 100644 drivers/clk/mxs/clk-ssp.c
-diff --git a/drivers/clk/mxs/Makefile b/drivers/clk/mxs/Makefile
-index 7bedeec..a6a2223 100644
---- a/drivers/clk/mxs/Makefile
-+++ b/drivers/clk/mxs/Makefile
+Index: linux-3.6-rc6/drivers/clk/mxs/Makefile
+===================================================================
+--- linux-3.6-rc6.orig/drivers/clk/mxs/Makefile
++++ linux-3.6-rc6/drivers/clk/mxs/Makefile
@@ -2,7 +2,7 @@
# Makefile for mxs specific clk
#
@@ -32,11 +32,10 @@ index 7bedeec..a6a2223 100644
obj-$(CONFIG_SOC_IMX23) += clk-imx23.o
obj-$(CONFIG_SOC_IMX28) += clk-imx28.o
-diff --git a/drivers/clk/mxs/clk-ssp.c b/drivers/clk/mxs/clk-ssp.c
-new file mode 100644
-index 0000000..af7bdbf
+Index: linux-3.6-rc6/drivers/clk/mxs/clk-ssp.c
+===================================================================
--- /dev/null
-+++ b/drivers/clk/mxs/clk-ssp.c
++++ linux-3.6-rc6/drivers/clk/mxs/clk-ssp.c
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2012 DENX Software Engineering, GmbH
@@ -100,11 +99,11 @@ index 0000000..af7bdbf
+ __func__, clock_divide, clock_rate, ssp_clk, ssp_sck, rate);
+}
+EXPORT_SYMBOL_GPL(mxs_ssp_set_clk_rate);
-diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
-index 7b85e03..0813340 100644
---- a/drivers/mmc/host/mxs-mmc.c
-+++ b/drivers/mmc/host/mxs-mmc.c
-@@ -501,43 +501,6 @@ static void mxs_mmc_request(struct mmc_host *mmc, struct mmc_request *mrq)
+Index: linux-3.6-rc6/drivers/mmc/host/mxs-mmc.c
+===================================================================
+--- linux-3.6-rc6.orig/drivers/mmc/host/mxs-mmc.c
++++ linux-3.6-rc6/drivers/mmc/host/mxs-mmc.c
+@@ -501,43 +501,6 @@ static void mxs_mmc_request(struct mmc_h
mxs_mmc_start_cmd(host, mrq->cmd);
}
@@ -148,7 +147,7 @@ index 7b85e03..0813340 100644
static void mxs_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
{
struct mxs_mmc_host *host = mmc_priv(mmc);
-@@ -550,7 +513,7 @@ static void mxs_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
+@@ -550,7 +513,7 @@ static void mxs_mmc_set_ios(struct mmc_h
host->bus_width = 0;
if (ios->clock)
@@ -157,10 +156,10 @@ index 7b85e03..0813340 100644
}
static void mxs_mmc_enable_sdio_irq(struct mmc_host *mmc, int enable)
-diff --git a/include/linux/spi/mxs-spi.h b/include/linux/spi/mxs-spi.h
-index 475f69f..d07f8dc 100644
---- a/include/linux/spi/mxs-spi.h
-+++ b/include/linux/spi/mxs-spi.h
+Index: linux-3.6-rc6/include/linux/spi/mxs-spi.h
+===================================================================
+--- linux-3.6-rc6.orig/include/linux/spi/mxs-spi.h
++++ linux-3.6-rc6/include/linux/spi/mxs-spi.h
@@ -136,4 +136,6 @@ struct mxs_ssp {
enum mxs_ssp_id devid;
};
diff --git a/patches/linux/3.5/0412-pengutronix-mx28-spi_Add_SPI_driver_for_mx233_mx28.patch b/patches/linux/3.6/0412-pengutronix-mx28-spi_Add_SPI_driver_for_mx233_mx28.patch
similarity index 100%
copy from patches/linux/3.5/0412-pengutronix-mx28-spi_Add_SPI_driver_for_mx233_mx28.patch
copy to patches/linux/3.6/0412-pengutronix-mx28-spi_Add_SPI_driver_for_mx233_mx28.patch
diff --git a/patches/linux/3.5/0413-pengutronix-mx28-mmc_spi_Pull_out_common_DMA_parts_from_MXS_MMC.patch b/patches/linux/3.6/0413-pengutronix-mx28-mmc_spi_Pull_out_common_DMA_parts_from_MXS_MMC.patch
similarity index 83%
copy from patches/linux/3.5/0413-pengutronix-mx28-mmc_spi_Pull_out_common_DMA_parts_from_MXS_MMC.patch
copy to patches/linux/3.6/0413-pengutronix-mx28-mmc_spi_Pull_out_common_DMA_parts_from_MXS_MMC.patch
index a8add37..2995e90 100644
--- a/patches/linux/3.5/0413-pengutronix-mx28-mmc_spi_Pull_out_common_DMA_parts_from_MXS_MMC.patch
+++ b/patches/linux/3.6/0413-pengutronix-mx28-mmc_spi_Pull_out_common_DMA_parts_from_MXS_MMC.patch
@@ -16,10 +16,10 @@ CC: Shawn Guo <sha...@li...>
include/linux/spi/mxs-spi.h | 9 +++++
3 files changed, 51 insertions(+), 47 deletions(-)
-diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
-index 0813340..4da9966 100644
---- a/drivers/mmc/host/mxs-mmc.c
-+++ b/drivers/mmc/host/mxs-mmc.c
+Index: linux-3.6-rc6/drivers/mmc/host/mxs-mmc.c
+===================================================================
+--- linux-3.6-rc6.orig/drivers/mmc/host/mxs-mmc.c
++++ linux-3.6-rc6/drivers/mmc/host/mxs-mmc.c
@@ -41,7 +41,6 @@
#include <linux/gpio.h>
#include <linux/regulator/consumer.h>
@@ -42,7 +42,7 @@ index 0813340..4da9966 100644
unsigned char bus_width;
spinlock_t lock;
int sdio_irq_en;
-@@ -163,7 +155,7 @@ static void mxs_mmc_request_done(struct mxs_mmc_host *host)
+@@ -163,7 +155,7 @@ static void mxs_mmc_request_done(struct
if (data) {
dma_unmap_sg(mmc_dev(host->mmc), data->sg,
@@ -51,7 +51,7 @@ index 0813340..4da9966 100644
/*
* If there was an error on any block, we mark all
* data blocks as being in error.
-@@ -232,6 +224,7 @@ static irqreturn_t mxs_mmc_irq_handler(int irq, void *dev_id)
+@@ -232,6 +224,7 @@ static irqreturn_t mxs_mmc_irq_handler(i
static struct dma_async_tx_descriptor *mxs_mmc_prep_dma(
struct mxs_mmc_host *host, unsigned long flags)
{
@@ -59,7 +59,7 @@ index 0813340..4da9966 100644
struct dma_async_tx_descriptor *desc;
struct mmc_data *data = host->data;
struct scatterlist * sgl;
-@@ -240,24 +233,24 @@ static struct dma_async_tx_descriptor *mxs_mmc_prep_dma(
+@@ -240,24 +233,24 @@ static struct dma_async_tx_descriptor *m
if (data) {
/* data */
dma_map_sg(mmc_dev(host->mmc), data->sg,
@@ -89,7 +89,7 @@ index 0813340..4da9966 100644
}
return desc;
-@@ -265,6 +258,7 @@ static struct dma_async_tx_descriptor *mxs_mmc_prep_dma(
+@@ -265,6 +258,7 @@ static struct dma_async_tx_descriptor *m
static void mxs_mmc_bc(struct mxs_mmc_host *host)
{
@@ -97,7 +97,7 @@ index 0813340..4da9966 100644
struct mmc_command *cmd = host->cmd;
struct dma_async_tx_descriptor *desc;
u32 ctrl0, cmd0, cmd1;
-@@ -278,17 +272,17 @@ static void mxs_mmc_bc(struct mxs_mmc_host *host)
+@@ -278,17 +272,17 @@ static void mxs_mmc_bc(struct mxs_mmc_ho
cmd0 |= BM_SSP_CMD0_CONT_CLKING_EN | BM_SSP_CMD0_SLOW_CLKING_EN;
}
@@ -129,7 +129,7 @@ index 0813340..4da9966 100644
struct mmc_command *cmd = host->cmd;
struct dma_async_tx_descriptor *desc;
u32 ignore_crc, get_resp, long_resp;
-@@ -319,17 +314,17 @@ static void mxs_mmc_ac(struct mxs_mmc_host *host)
+@@ -319,17 +314,17 @@ static void mxs_mmc_ac(struct mxs_mmc_ho
cmd0 |= BM_SSP_CMD0_CONT_CLKING_EN | BM_SSP_CMD0_SLOW_CLKING_EN;
}
@@ -153,7 +153,7 @@ index 0813340..4da9966 100644
return;
out:
-@@ -441,11 +436,11 @@ static void mxs_mmc_adtc(struct mxs_mmc_host *host)
+@@ -441,11 +436,11 @@ static void mxs_mmc_adtc(struct mxs_mmc_
writel(val, ssp->base + HW_SSP_TIMING(ssp));
/* pio */
@@ -170,7 +170,7 @@ index 0813340..4da9966 100644
desc = mxs_mmc_prep_dma(host, 0);
if (!desc)
goto out;
-@@ -453,14 +448,14 @@ static void mxs_mmc_adtc(struct mxs_mmc_host *host)
+@@ -453,14 +448,14 @@ static void mxs_mmc_adtc(struct mxs_mmc_
/* append data sg */
WARN_ON(host->data != NULL);
host->data = data;
@@ -188,7 +188,7 @@ index 0813340..4da9966 100644
return;
out:
dev_warn(mmc_dev(host->mmc),
-@@ -557,14 +552,15 @@ static const struct mmc_host_ops mxs_mmc_ops = {
+@@ -557,14 +552,15 @@ static const struct mmc_host_ops mxs_mmc
static bool mxs_mmc_dma_filter(struct dma_chan *chan, void *param)
{
struct mxs_mmc_host *host = param;
@@ -206,7 +206,7 @@ index 0813340..4da9966 100644
return true;
}
-@@ -632,7 +628,7 @@ static int mxs_mmc_probe(struct platform_device *pdev)
+@@ -632,7 +628,7 @@ static int mxs_mmc_probe(struct platform
* to use generic DMA binding later when the helpers get in.
*/
ret = of_property_read_u32(np, "fsl,ssp-dma-channel",
@@ -215,7 +215,7 @@ index 0813340..4da9966 100644
if (ret) {
dev_err(mmc_dev(host->mmc),
"failed to get dma channel\n");
-@@ -640,7 +636,7 @@ static int mxs_mmc_probe(struct platform_device *pdev)
+@@ -640,7 +636,7 @@ static int mxs_mmc_probe(struct platform
}
} else {
ssp->devid = pdev->id_entry->driver_data;
@@ -224,7 +224,7 @@ index 0813340..4da9966 100644
}
host->mmc = mmc;
-@@ -673,9 +669,9 @@ static int mxs_mmc_probe(struct platform_device *pdev)
+@@ -673,9 +669,9 @@ static int mxs_mmc_probe(struct platform
dma_cap_zero(mask);
dma_cap_set(DMA_SLAVE, mask);
@@ -237,7 +237,7 @@ index 0813340..4da9966 100644
dev_err(mmc_dev(host->mmc),
"%s: failed to request dma\n", __func__);
goto out_clk_put;
-@@ -714,7 +710,7 @@ static int mxs_mmc_probe(struct platform_device *pdev)
+@@ -714,7 +710,7 @@ static int mxs_mmc_probe(struct platform
mmc->max_blk_size = 1 << 0xf;
mmc->max_blk_count = (ssp_is_old(ssp)) ? 0xff : 0xffffff;
mmc->max_req_size = (ssp_is_old(ssp)) ? 0xffff : 0xffffffff;
@@ -246,7 +246,7 @@ index 0813340..4da9966 100644
platform_set_drvdata(pdev, mmc);
-@@ -734,8 +730,8 @@ static int mxs_mmc_probe(struct platform_device *pdev)
+@@ -734,8 +730,8 @@ static int mxs_mmc_probe(struct platform
return 0;
out_free_dma:
@@ -257,7 +257,7 @@ index 0813340..4da9966 100644
out_clk_put:
clk_disable_unprepare(ssp->clk);
clk_put(ssp->clk);
-@@ -754,8 +750,8 @@ static int mxs_mmc_remove(struct platform_device *pdev)
+@@ -754,8 +750,8 @@ static int mxs_mmc_remove(struct platfor
platform_set_drvdata(pdev, NULL);
@@ -268,10 +268,10 @@ index 0813340..4da9966 100644
clk_disable_unprepare(ssp->clk);
clk_put(ssp->clk);
-diff --git a/drivers/spi/spi-mxs.c b/drivers/spi/spi-mxs.c
-index 7bf826f..0f28afb 100644
---- a/drivers/spi/spi-mxs.c
-+++ b/drivers/spi/spi-mxs.c
+Index: linux-3.6-rc6/drivers/spi/spi-mxs.c
+===================================================================
+--- linux-3.6-rc6.orig/drivers/spi/spi-mxs.c
++++ linux-3.6-rc6/drivers/spi/spi-mxs.c
@@ -46,7 +46,6 @@
#include <linux/gpio.h>
#include <linux/regulator/consumer.h>
@@ -280,10 +280,10 @@ index 7bf826f..0f28afb 100644
#include <linux/pinctrl/consumer.h>
#include <linux/stmp_device.h>
#include <linux/spi/spi.h>
-diff --git a/include/linux/spi/mxs-spi.h b/include/linux/spi/mxs-spi.h
-index d07f8dc..61ae130 100644
---- a/include/linux/spi/mxs-spi.h
-+++ b/include/linux/spi/mxs-spi.h
+Index: linux-3.6-rc6/include/linux/spi/mxs-spi.h
+===================================================================
+--- linux-3.6-rc6.orig/include/linux/spi/mxs-spi.h
++++ linux-3.6-rc6/include/linux/spi/mxs-spi.h
@@ -24,6 +24,8 @@
#ifndef __LINUX_SPI_MXS_SPI_H__
#define __LINUX_SPI_MXS_SPI_H__
diff --git a/patches/linux/3.5/0414-pengutronix-mx28-spi_Add_DMA_support_into_SPI_driver.patch b/patches/linux/3.6/0414-pengutronix-mx28-spi_Add_DMA_support_into_SPI_driver.patch
similarity index 100%
copy from patches/linux/3.5/0414-pengutronix-mx28-spi_Add_DMA_support_into_SPI_driver.patch
copy to patches/linux/3.6/0414-pengutronix-mx28-spi_Add_DMA_support_into_SPI_driver.patch
diff --git a/patches/linux/3.5/0415-pengutronix-mx28-spi_Add_SSP_SPI_device_tree_documentation.patch b/patches/linux/3.6/0415-pengutronix-mx28-spi_Add_SSP_SPI_device_tree_documentation.patch
similarity index 100%
copy from patches/linux/3.5/0415-pengutronix-mx28-spi_Add_SSP_SPI_device_tree_documentation.patch
copy to patches/linux/3.6/0415-pengutronix-mx28-spi_Add_SSP_SPI_device_tree_documentation.patch
diff --git a/patches/linux/3.5/0416-pengutronix-mx28_Add_SPI_pinmux_into_imx28_dtsi.patch b/patches/linux/3.6/0416-pengutronix-mx28_Add_SPI_pinmux_into_imx28_dtsi.patch
similarity index 100%
copy from patches/linux/3.5/0416-pengutronix-mx28_Add_SPI_pinmux_into_imx28_dtsi.patch
copy to patches/linux/3.6/0416-pengutronix-mx28_Add_SPI_pinmux_into_imx28_dtsi.patch
diff --git a/patches/linux/3.5/0417-pengutronix-mx28-Add_SPI_ressources.patch b/patches/linux/3.6/0417-pengutronix-mx28-Add_SPI_ressources.patch
similarity index 100%
copy from patches/linux/3.5/0417-pengutronix-mx28-Add_SPI_ressources.patch
copy to patches/linux/3.6/0417-pengutronix-mx28-Add_SPI_ressources.patch
hooks/post-receive
--
armadeus
|
|
From: Julien B a. A. <ar...@us...> - 2012-09-22 16:57:36
|
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 b0632bf57d4774fbc6a7d642cb0fa6616d5fc96f (commit)
via ed73c9c214a49e0e5e38b2a784481b6427d74138 (commit)
via 82460a11c6ab78ed6759bfdb4e73a006fe99d594 (commit)
from ea1a5ff76b8d8da7845c6cf541d51ee6a78e00d9 (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 b0632bf57d4774fbc6a7d642cb0fa6616d5fc96f
Merge: ed73c9c ea1a5ff
Author: Julien Boibessot <jul...@ar...>
Date: Sat Sep 22 18:54:34 2012 +0200
Merge branch 'master' of ssh://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit ed73c9c214a49e0e5e38b2a784481b6427d74138
Author: Julien Boibessot <jul...@ar...>
Date: Sat Sep 22 18:53:00 2012 +0200
[LINUX] Move 3.x support to 3.6-rc6 (part 2)
commit 82460a11c6ab78ed6759bfdb4e73a006fe99d594
Author: Julien Boibessot <jul...@ar...>
Date: Fri Sep 21 22:22:33 2012 +0200
[LINUX] Move 3.x support to 3.6-rc6 (part 1)
-----------------------------------------------------------------------
Summary of changes:
.../armadeus/apf28/apf28-linux-3.5-rc5.config | 1 -
.../armadeus/apf28/apf28-linux-3.6-rc6.config | 1 +
...f28-linux-3.5.config => apf28-linux-3.6.config} | 0
patches/linux/3.5-rc4 | 1 -
patches/linux/3.5-rc5 | 1 -
...0400-freescale-mx28_add_gpmi-nand_support.patch | 90 ---------------
...dts-mx28evk-Add-auart0-and-auart3-support.patch | 116 --------------------
...-additionnal-muxing-options-to-iMX28-DTSI.patch | 51 ---------
patches/linux/3.6-rc6 | 1 +
...002-Add-nand-platform-on-imx27-devicetree.patch | 4 +-
...d-device-tree-file-for-the-armadeus-apf27.patch | 0
.../0403-armadeus-Add-apf28-dts-files.patch | 0
...04-armadeus-mx28_Initialize_fec_phy_clock.patch | 0
...0405-armadeus-mx28_rename_gpmi_nand_clock.patch | 0
14 files changed, 4 insertions(+), 262 deletions(-)
delete mode 120000 buildroot/target/device/armadeus/apf28/apf28-linux-3.5-rc5.config
create mode 120000 buildroot/target/device/armadeus/apf28/apf28-linux-3.6-rc6.config
rename buildroot/target/device/armadeus/apf28/{apf28-linux-3.5.config => apf28-linux-3.6.config} (100%)
delete mode 120000 patches/linux/3.5-rc4
delete mode 120000 patches/linux/3.5-rc5
delete mode 100644 patches/linux/3.5/0400-freescale-mx28_add_gpmi-nand_support.patch
delete mode 100644 patches/linux/3.5/0401-freescale-ARM-dts-mx28evk-Add-auart0-and-auart3-support.patch
delete mode 100644 patches/linux/3.5/0402-free-electrons-ARM-dts-imx28-Add-additionnal-muxing-options-to-iMX28-DTSI.patch
create mode 120000 patches/linux/3.6-rc6
rename patches/linux/{3.5 => 3.6}/0002-Add-nand-platform-on-imx27-devicetree.patch (92%)
rename patches/linux/{3.5 => 3.6}/0003-Add-device-tree-file-for-the-armadeus-apf27.patch (100%)
rename patches/linux/{3.5 => 3.6}/0403-armadeus-Add-apf28-dts-files.patch (100%)
rename patches/linux/{3.5 => 3.6}/0404-armadeus-mx28_Initialize_fec_phy_clock.patch (100%)
rename patches/linux/{3.5 => 3.6}/0405-armadeus-mx28_rename_gpmi_nand_clock.patch (100%)
diff --git a/buildroot/target/device/armadeus/apf28/apf28-linux-3.5-rc5.config b/buildroot/target/device/armadeus/apf28/apf28-linux-3.5-rc5.config
deleted file mode 120000
index d95fa64..0000000
--- a/buildroot/target/device/armadeus/apf28/apf28-linux-3.5-rc5.config
+++ /dev/null
@@ -1 +0,0 @@
-apf28-linux-3.5.config
\ No newline at end of file
diff --git a/buildroot/target/device/armadeus/apf28/apf28-linux-3.6-rc6.config b/buildroot/target/device/armadeus/apf28/apf28-linux-3.6-rc6.config
new file mode 120000
index 0000000..84bcecd
--- /dev/null
+++ b/buildroot/target/device/armadeus/apf28/apf28-linux-3.6-rc6.config
@@ -0,0 +1 @@
+apf28-linux-3.6.config
\ No newline at end of file
diff --git a/buildroot/target/device/armadeus/apf28/apf28-linux-3.5.config b/buildroot/target/device/armadeus/apf28/apf28-linux-3.6.config
similarity index 100%
rename from buildroot/target/device/armadeus/apf28/apf28-linux-3.5.config
rename to buildroot/target/device/armadeus/apf28/apf28-linux-3.6.config
diff --git a/patches/linux/3.5-rc4 b/patches/linux/3.5-rc4
deleted file mode 120000
index 56e972a..0000000
--- a/patches/linux/3.5-rc4
+++ /dev/null
@@ -1 +0,0 @@
-3.5
\ No newline at end of file
diff --git a/patches/linux/3.5-rc5 b/patches/linux/3.5-rc5
deleted file mode 120000
index 56e972a..0000000
--- a/patches/linux/3.5-rc5
+++ /dev/null
@@ -1 +0,0 @@
-3.5
\ No newline at end of file
diff --git a/patches/linux/3.5/0400-freescale-mx28_add_gpmi-nand_support.patch b/patches/linux/3.5/0400-freescale-mx28_add_gpmi-nand_support.patch
deleted file mode 100644
index 3361c3f..0000000
--- a/patches/linux/3.5/0400-freescale-mx28_add_gpmi-nand_support.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-From 5ed18fcf1309b9c62f56993371c63ba462d422d6 Mon Sep 17 00:00:00 2001
-From: Huang Shijie <b3...@fr...>
-Date: Fri, 25 May 2012 17:25:35 +0800
-Subject: [PATCH] ARM: mx28: add gpmi-nand support
-
-add gpmi-nand device tree support.
-add gpmi-nand pinctrl support.
-
-Also enable the gpmi support for mx28-evk board.
-
-Signed-off-by: Huang Shijie <b3...@fr...>
-Signed-off-by: Shawn Guo <sha...@li...>
----
- arch/arm/boot/dts/imx28-evk.dts | 6 ++++++
- arch/arm/boot/dts/imx28.dtsi | 35 ++++++++++++++++++++++++++---------
- 2 files changed, 32 insertions(+), 9 deletions(-)
-
-diff --git a/arch/arm/boot/dts/imx28-evk.dts b/arch/arm/boot/dts/imx28-evk.dts
-index ee520a5..e53cf67 100644
---- a/arch/arm/boot/dts/imx28-evk.dts
-+++ b/arch/arm/boot/dts/imx28-evk.dts
-@@ -22,6 +22,12 @@
-
- apb@80000000 {
- apbh@80000000 {
-+ gpmi-nand@8000c000 {
-+ pinctrl-names = "default";
-+ pinctrl-0 = <&gpmi_pins_a &gpmi_status_cfg>;
-+ status = "okay";
-+ };
-+
- ssp0: ssp@80010000 {
- compatible = "fsl,imx28-mmc";
- pinctrl-names = "default";
-diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi
-index 4634cb8..a89da5a 100644
---- a/arch/arm/boot/dts/imx28.dtsi
-+++ b/arch/arm/boot/dts/imx28.dtsi
-@@ -68,15 +68,15 @@
- status = "disabled";
- };
-
-- bch@8000a000 {
-- reg = <0x8000a000 2000>;
-- interrupts = <41>;
-- status = "disabled";
-- };
--
-- gpmi@8000c000 {
-- reg = <0x8000c000 2000>;
-- interrupts = <42 88>;
-+ gpmi-nand@8000c000 {
-+ compatible = "fsl,imx28-gpmi-nand";
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ reg = <0x8000c000 2000>, <0x8000a000 2000>;
-+ reg-names = "gpmi-nand", "bch";
-+ interrupts = <88>, <41>;
-+ interrupt-names = "gpmi-dma", "bch";
-+ fsl,gpmi-dma-channel = <4>;
- status = "disabled";
- };
-
-@@ -167,6 +167,23 @@
- fsl,pull-up = <0>;
- };
-
-+ gpmi_pins_a: gpmi-nand@0 {
-+ reg = <0>;
-+ fsl,pinmux-ids = <0x0000 0x0010 0x0020
-+ 0x0030 0x0040 0x0050 0x0060
-+ 0x0070 0x0100 0x0110 0x0140
-+ 0x0150 0x0180 0x0190 0x01a0
-+ 0x01b0 0x01c0>;
-+ fsl,drive-strength = <0>;
-+ fsl,voltage = <1>;
-+ fsl,pull-up = <0>;
-+ };
-+
-+ gpmi_status_cfg: gpmi-status-cfg {
-+ fsl,pinmux-ids = <0x0180 0x0190 0x01c0>;
-+ fsl,drive-strength = <2>;
-+ };
-+
- mac0_pins_a: mac0@0 {
- reg = <0>;
- fsl,pinmux-ids = <0x4000 0x4010 0x4020
---
-1.7.0.4
-
diff --git a/patches/linux/3.5/0401-freescale-ARM-dts-mx28evk-Add-auart0-and-auart3-support.patch b/patches/linux/3.5/0401-freescale-ARM-dts-mx28evk-Add-auart0-and-auart3-support.patch
deleted file mode 100644
index dde4267..0000000
--- a/patches/linux/3.5/0401-freescale-ARM-dts-mx28evk-Add-auart0-and-auart3-support.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-From 65513dde63e0c7633aefd30d8fa69fd571b84d5b Mon Sep 17 00:00:00 2001
-From: Fabio Estevam <fab...@fr...>
-Date: Fri, 15 Jun 2012 12:35:56 -0300
-Subject: [PATCH] ARM: dts: mx28evk: Add auart0 and auart3 support
-
-Add auart0 and auart3 support.
-
-Signed-off-by: Fabio Estevam <fab...@fr...>
-Reviewed-by: Marek Vasut <ma...@de...>
-Signed-off-by: Shawn Guo <sha...@li...>
----
- arch/arm/boot/dts/imx28-evk.dts | 12 ++++++++++++
- arch/arm/boot/dts/imx28.dtsi | 26 ++++++++++++++++++++++++++
- 2 files changed, 38 insertions(+), 0 deletions(-)
-
-diff --git a/arch/arm/boot/dts/imx28-evk.dts b/arch/arm/boot/dts/imx28-evk.dts
-index e53cf67..319c75a 100644
---- a/arch/arm/boot/dts/imx28-evk.dts
-+++ b/arch/arm/boot/dts/imx28-evk.dts
-@@ -79,6 +79,18 @@
- pinctrl-0 = <&duart_pins_a>;
- status = "okay";
- };
-+
-+ auart0: serial@8006a000 {
-+ pinctrl-names = "default";
-+ pinctrl-0 = <&auart0_pins_a>;
-+ status = "okay";
-+ };
-+
-+ auart3: serial@80070000 {
-+ pinctrl-names = "default";
-+ pinctrl-0 = <&auart3_pins_a>;
-+ status = "okay";
-+ };
- };
- };
-
-diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi
-index a89da5a..ee3778a 100644
---- a/arch/arm/boot/dts/imx28.dtsi
-+++ b/arch/arm/boot/dts/imx28.dtsi
-@@ -22,6 +22,11 @@
- gpio4 = &gpio4;
- saif0 = &saif0;
- saif1 = &saif1;
-+ serial0 = &auart0;
-+ serial1 = &auart1;
-+ serial2 = &auart2;
-+ serial3 = &auart3;
-+ serial4 = &auart |
|
From: Gwenhael Goavec-M. <gwe...@us...> - 2012-09-22 08:02:22
|
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 ea1a5ff76b8d8da7845c6cf541d51ee6a78e00d9 (commit)
via 712d3f8229f4d23e0ec3e9d804a58ec176987b1c (commit)
via 96625d16bc3c9be56e6d51590d305d73c81a765f (commit)
via 67dfad106be58c15769ecdd68d5d1723d6caf5df (commit)
from a5415a08cf0de85b3ca448ac577c79b304a81ba7 (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 ea1a5ff76b8d8da7845c6cf541d51ee6a78e00d9
Author: Gwenhael Goavec-Merou <gw...@tr...>
Date: Sat Sep 22 10:01:23 2012 +0200
[LINUX][3.5] apf28 config: Select SPI by default
commit 712d3f8229f4d23e0ec3e9d804a58ec176987b1c
Author: Gwenhael Goavec-Merou <gw...@tr...>
Date: Sat Sep 22 10:00:34 2012 +0200
[LINUX][3.5] apf28 dts: Add support for ssp0 as MMC and ssp2 as SPI
commit 96625d16bc3c9be56e6d51590d305d73c81a765f
Author: Gwenhael Goavec-Merou <gw...@tr...>
Date: Sat Sep 22 09:58:51 2012 +0200
[LINUX][3.5] mx28: Select MXS_HAVE_PLATFORM_MXS_SPI for SOC_IMX28
commit 67dfad106be58c15769ecdd68d5d1723d6caf5df
Author: Gwenhael Goavec-Merou <gw...@tr...>
Date: Sat Sep 22 09:57:03 2012 +0200
[LINUX][3.5] APF28: Backport patches for SPI drivers integration
-----------------------------------------------------------------------
Summary of changes:
.../device/armadeus/apf28/apf28-linux-3.5.config | 1 +
.../3.5/0403-armadeus-Add-apf28-dts-files.patch | 39 ++-
...406-armadeus-mx28-add_SPI_support_kconfig.patch | 12 +
...P_register_definitions_into_separate_file.patch | 254 ++++++++++
...x28-mmc_spi_Rename_IMX2x_MMC_to_IMX2x_SSP.patch | 116 +++++
...mmc_spi_Add_necessary_bits_into_mxs-spi-h.patch | 95 ++++
...Pull_out_parts_shared_between_MMC_and_SPI.patch | 381 +++++++++++++++
..._out_the_SSP_clock_configuration_function.patch | 179 +++++++
...ix-mx28-spi_Add_SPI_driver_for_mx233_mx28.patch | 503 ++++++++++++++++++++
...pi_Pull_out_common_DMA_parts_from_MXS_MMC.patch | 318 ++++++++++++
...-mx28-spi_Add_DMA_support_into_SPI_driver.patch | 345 ++++++++++++++
...spi_Add_SSP_SPI_device_tree_documentation.patch | 49 ++
...ronix-mx28_Add_SPI_pinmux_into_imx28_dtsi.patch | 72 +++
.../0417-pengutronix-mx28-Add_SPI_ressources.patch | 154 ++++++
14 files changed, 2517 insertions(+), 1 deletions(-)
create mode 100644 patches/linux/3.5/0406-armadeus-mx28-add_SPI_support_kconfig.patch
create mode 100644 patches/linux/3.5/0407-pengutronix-mx28-Move_SSP_register_definitions_into_separate_file.patch
create mode 100644 patches/linux/3.5/0408-pengutronix-mx28-mmc_spi_Rename_IMX2x_MMC_to_IMX2x_SSP.patch
create mode 100644 patches/linux/3.5/0409-pengutronix-mx28-mmc_spi_Add_necessary_bits_into_mxs-spi-h.patch
create mode 100644 patches/linux/3.5/0410-pengutronix-mx28-mmc_spi_Pull_out_parts_shared_between_MMC_and_SPI.patch
create mode 100644 patches/linux/3.5/0411-pengutronix-mx28-mmc_spi_Pull_out_the_SSP_clock_configuration_function.patch
create mode 100644 patches/linux/3.5/0412-pengutronix-mx28-spi_Add_SPI_driver_for_mx233_mx28.patch
create mode 100644 patches/linux/3.5/0413-pengutronix-mx28-mmc_spi_Pull_out_common_DMA_parts_from_MXS_MMC.patch
create mode 100644 patches/linux/3.5/0414-pengutronix-mx28-spi_Add_DMA_support_into_SPI_driver.patch
create mode 100644 patches/linux/3.5/0415-pengutronix-mx28-spi_Add_SSP_SPI_device_tree_documentation.patch
create mode 100644 patches/linux/3.5/0416-pengutronix-mx28_Add_SPI_pinmux_into_imx28_dtsi.patch
create mode 100644 patches/linux/3.5/0417-pengutronix-mx28-Add_SPI_ressources.patch
diff --git a/buildroot/target/device/armadeus/apf28/apf28-linux-3.5.config b/buildroot/target/device/armadeus/apf28/apf28-linux-3.5.config
index 15f272c..54c5792 100644
--- a/buildroot/target/device/armadeus/apf28/apf28-linux-3.5.config
+++ b/buildroot/target/device/armadeus/apf28/apf28-linux-3.5.config
@@ -98,6 +98,7 @@ CONFIG_I2C_CHARDEV=y
CONFIG_I2C_MXS=y
CONFIG_SPI=y
CONFIG_SPI_BITBANG=m
+CONFIG_SPI_MXS=y
CONFIG_SPI_SPIDEV=m
CONFIG_GPIO_SYSFS=y
CONFIG_HWMON=m
diff --git a/patches/linux/3.5/0403-armadeus-Add-apf28-dts-files.patch b/patches/linux/3.5/0403-armadeus-Add-apf28-dts-files.patch
index 92a36bb..681522f 100644
--- a/patches/linux/3.5/0403-armadeus-Add-apf28-dts-files.patch
+++ b/patches/linux/3.5/0403-armadeus-Add-apf28-dts-files.patch
@@ -2,7 +2,7 @@ Index: linux-3.5/arch/arm/boot/dts/imx28-apf28.dts
===================================================================
--- /dev/null
+++ linux-3.5/arch/arm/boot/dts/imx28-apf28.dts
-@@ -0,0 +1,82 @@
+@@ -0,0 +1,119 @@
+/*
+ * Copyright 2012 Armadeus Systems - <su...@ar...>
+ *
@@ -64,6 +64,33 @@ Index: linux-3.5/arch/arm/boot/dts/imx28-apf28.dts
+ reg = <0xd00000 0xf300000>;
+ };
+ };
++
++ ssp0: ssp@80010000 {
++ compatible = "fsl,imx28-mmc";
++ pinctrl-names = "default";
++ pinctrl-0 = <&mmc0_8bit_pins_a
++ &mmc0_cd_cfg &mmc0_sck_cfg>;
++ bus-width = <8>;
++ wp-gpios = <&gpio2 12 0>;
++ vmmc-supply = <®_vddio_sd0>;
++ status = "okay";
++ };
++
++ ssp2: ssp@80014000 {
++ #address-cells = <1>;
++ #size-cells = <0>;
++ compatible = "fsl,imx28-spi";
++ pinctrl-names = "default";
++ pinctrl-0 = <&spi2_pins_a>;
++ status = "okay";
++ device@0 {
++ #address-cells = <1>;
++ #size-cells = <0>;
++ compatible = "spidev";
++ reg = <0>; //Chip select 0
++ spi-max-frequency = <3125000>;
++ };
++ };
+ };
+
+ apbx@80040000 {
@@ -84,4 +111,14 @@ Index: linux-3.5/arch/arm/boot/dts/imx28-apf28.dts
+ status = "okay";
+ };
+ };
++ regulators {
++ compatible = "simple-bus";
++ reg_vddio_sd0: vddio-sd0 {
++ compatible = "regulator-fixed";
++ regulator-name = "vddio-sd0";
++ regulator-min-microvolt = <3300000>;
++ regulator-max-microvolt = <3300000>;
++ gpio = <&gpio3 28 0>;
++ };
++ };
+};
diff --git a/patches/linux/3.5/0406-armadeus-mx28-add_SPI_support_kconfig.patch b/patches/linux/3.5/0406-armadeus-mx28-add_SPI_support_kconfig.patch
new file mode 100644
index 0000000..70ba0f7
--- /dev/null
+++ b/patches/linux/3.5/0406-armadeus-mx28-add_SPI_support_kconfig.patch
@@ -0,0 +1,12 @@
+Index: linux-3.5/arch/arm/mach-mxs/Kconfig
+===================================================================
+--- linux-3.5.orig/arch/arm/mach-mxs/Kconfig
++++ linux-3.5/arch/arm/mach-mxs/Kconfig
+@@ -10,6 +10,7 @@ config SOC_IMX23
+ select ARM_AMBA
+ select CPU_ARM926T
+ select HAVE_PWM
++ select MXS_HAVE_PLATFORM_MXS_SPI
+ select PINCTRL_IMX23
+
+ config SOC_IMX28
diff --git a/patches/linux/3.5/0407-pengutronix-mx28-Move_SSP_register_definitions_into_separate_file.patch b/patches/linux/3.5/0407-pengutronix-mx28-Move_SSP_register_definitions_into_separate_file.patch
new file mode 100644
index 0000000..b4c1676
--- /dev/null
+++ b/patches/linux/3.5/0407-pengutronix-mx28-Move_SSP_register_definitions_into_separate_file.patch
@@ -0,0 +1,254 @@
+Move the definitions into separate file so separate SPI driver can be
+implemented. The SSP controller in MXS can act both as a MMC host and
+as a SPI host.
+
+Based on previous attempt by:
+Fabio Estevam <fab...@fr...>
+
+Signed-off-by: Fabio Estevam <fab...@fr...>
+Signed-off-by: Marek Vasut <ma...@de...>
+Cc: Attila Kinali <at...@ki...>
+Cc: Chris Ball <cj...@la...>
+CC: Dong Aisheng <b2...@fr...>
+Cc: Grant Likely <gra...@se...>
+Cc: Linux ARM kernel <lin...@li...>
+Cc: Mark Brown <br...@op...>
+CC: Shawn Guo <sha...@li...>
+---
+ drivers/mmc/host/mxs-mmc.c | 87 ++--------------------------------
+ include/linux/spi/mxs-spi.h | 109 +++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 112 insertions(+), 84 deletions(-)
+ create mode 100644 include/linux/spi/mxs-spi.h
+
+diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
+index a51f930..26c95dc 100644
+--- a/drivers/mmc/host/mxs-mmc.c
++++ b/drivers/mmc/host/mxs-mmc.c
+@@ -45,87 +45,10 @@
+ #include <linux/pinctrl/consumer.h>
+ #include <linux/stmp_device.h>
+ #include <linux/mmc/mxs-mmc.h>
++#include <linux/spi/mxs-spi.h>
+
+ #define DRIVER_NAME "mxs-mmc"
+
+-/* card detect polling timeout */
+-#define MXS_MMC_DETECT_TIMEOUT (HZ/2)
+-
+-#define ssp_is_old(host) ((host)->devid == IMX23_MMC)
+-
+-/* SSP registers */
+-#define HW_SSP_CTRL0 0x000
+-#define BM_SSP_CTRL0_RUN (1 << 29)
+-#define BM_SSP_CTRL0_SDIO_IRQ_CHECK (1 << 28)
+-#define BM_SSP_CTRL0_IGNORE_CRC (1 << 26)
+-#define BM_SSP_CTRL0_READ (1 << 25)
+-#define BM_SSP_CTRL0_DATA_XFER (1 << 24)
+-#define BP_SSP_CTRL0_BUS_WIDTH (22)
+-#define BM_SSP_CTRL0_BUS_WIDTH (0x3 << 22)
+-#define BM_SSP_CTRL0_WAIT_FOR_IRQ (1 << 21)
+-#define BM_SSP_CTRL0_LONG_RESP (1 << 19)
+-#define BM_SSP_CTRL0_GET_RESP (1 << 17)
+-#define BM_SSP_CTRL0_ENABLE (1 << 16)
+-#define BP_SSP_CTRL0_XFER_COUNT (0)
+-#define BM_SSP_CTRL0_XFER_COUNT (0xffff)
+-#define HW_SSP_CMD0 0x010
+-#define BM_SSP_CMD0_DBL_DATA_RATE_EN (1 << 25)
+-#define BM_SSP_CMD0_SLOW_CLKING_EN (1 << 22)
+-#define BM_SSP_CMD0_CONT_CLKING_EN (1 << 21)
+-#define BM_SSP_CMD0_APPEND_8CYC (1 << 20)
+-#define BP_SSP_CMD0_BLOCK_SIZE (16)
+-#define BM_SSP_CMD0_BLOCK_SIZE (0xf << 16)
+-#define BP_SSP_CMD0_BLOCK_COUNT (8)
+-#define BM_SSP_CMD0_BLOCK_COUNT (0xff << 8)
+-#define BP_SSP_CMD0_CMD (0)
+-#define BM_SSP_CMD0_CMD (0xff)
+-#define HW_SSP_CMD1 0x020
+-#define HW_SSP_XFER_SIZE 0x030
+-#define HW_SSP_BLOCK_SIZE 0x040
+-#define BP_SSP_BLOCK_SIZE_BLOCK_COUNT (4)
+-#define BM_SSP_BLOCK_SIZE_BLOCK_COUNT (0xffffff << 4)
+-#define BP_SSP_BLOCK_SIZE_BLOCK_SIZE (0)
+-#define BM_SSP_BLOCK_SIZE_BLOCK_SIZE (0xf)
+-#define HW_SSP_TIMING(h) (ssp_is_old(h) ? 0x050 : 0x070)
+-#define BP_SSP_TIMING_TIMEOUT (16)
+-#define BM_SSP_TIMING_TIMEOUT (0xffff << 16)
+-#define BP_SSP_TIMING_CLOCK_DIVIDE (8)
+-#define BM_SSP_TIMING_CLOCK_DIVIDE (0xff << 8)
+-#define BP_SSP_TIMING_CLOCK_RATE (0)
+-#define BM_SSP_TIMING_CLOCK_RATE (0xff)
+-#define HW_SSP_CTRL1(h) (ssp_is_old(h) ? 0x060 : 0x080)
+-#define BM_SSP_CTRL1_SDIO_IRQ (1 << 31)
+-#define BM_SSP_CTRL1_SDIO_IRQ_EN (1 << 30)
+-#define BM_SSP_CTRL1_RESP_ERR_IRQ (1 << 29)
+-#define BM_SSP_CTRL1_RESP_ERR_IRQ_EN (1 << 28)
+-#define BM_SSP_CTRL1_RESP_TIMEOUT_IRQ (1 << 27)
+-#define BM_SSP_CTRL1_RESP_TIMEOUT_IRQ_EN (1 << 26)
+-#define BM_SSP_CTRL1_DATA_TIMEOUT_IRQ (1 << 25)
+-#define BM_SSP_CTRL1_DATA_TIMEOUT_IRQ_EN (1 << 24)
+-#define BM_SSP_CTRL1_DATA_CRC_IRQ (1 << 23)
+-#define BM_SSP_CTRL1_DATA_CRC_IRQ_EN (1 << 22)
+-#define BM_SSP_CTRL1_FIFO_UNDERRUN_IRQ (1 << 21)
+-#define BM_SSP_CTRL1_FIFO_UNDERRUN_IRQ_EN (1 << 20)
+-#define BM_SSP_CTRL1_RECV_TIMEOUT_IRQ (1 << 17)
+-#define BM_SSP_CTRL1_RECV_TIMEOUT_IRQ_EN (1 << 16)
+-#define BM_SSP_CTRL1_FIFO_OVERRUN_IRQ (1 << 15)
+-#define BM_SSP_CTRL1_FIFO_OVERRUN_IRQ_EN (1 << 14)
+-#define BM_SSP_CTRL1_DMA_ENABLE (1 << 13)
+-#define BM_SSP_CTRL1_POLARITY (1 << 9)
+-#define BP_SSP_CTRL1_WORD_LENGTH (4)
+-#define BM_SSP_CTRL1_WORD_LENGTH (0xf << 4)
+-#define BP_SSP_CTRL1_SSP_MODE (0)
+-#define BM_SSP_CTRL1_SSP_MODE (0xf)
+-#define HW_SSP_SDRESP0(h) (ssp_is_old(h) ? 0x080 : 0x0a0)
+-#define HW_SSP_SDRESP1(h) (ssp_is_old(h) ? 0x090 : 0x0b0)
+-#define HW_SSP_SDRESP2(h) (ssp_is_old(h) ? 0x0a0 : 0x0c0)
+-#define HW_SSP_SDRESP3(h) (ssp_is_old(h) ? 0x0b0 : 0x0d0)
+-#define HW_SSP_STATUS(h) (ssp_is_old(h) ? 0x0c0 : 0x100)
+-#define BM_SSP_STATUS_CARD_DETECT (1 << 28)
+-#define BM_SSP_STATUS_SDIO_IRQ (1 << 17)
+-
+-#define BF_SSP(value, field) (((value) << BP_SSP_##field) & BM_SSP_##field)
+-
+ #define MXS_MMC_IRQ_BITS (BM_SSP_CTRL1_SDIO_IRQ | \
+ BM_SSP_CTRL1_RESP_ERR_IRQ | \
+ BM_SSP_CTRL1_RESP_TIMEOUT_IRQ | \
+@@ -135,12 +58,8 @@
+ BM_SSP_CTRL1_RECV_TIMEOUT_IRQ | \
+ BM_SSP_CTRL1_FIFO_OVERRUN_IRQ)
+
+-#define SSP_PIO_NUM 3
+-
+-enum mxs_mmc_id {
+- IMX23_MMC,
+- IMX28_MMC,
+-};
++/* card detect polling timeout */
++#define MXS_MMC_DETECT_TIMEOUT (HZ/2)
+
+ struct mxs_mmc_host {
+ struct mmc_host *mmc;
+diff --git a/include/linux/spi/mxs-spi.h b/include/linux/spi/mxs-spi.h
+new file mode 100644
+index 0000000..b7ccd57
+--- /dev/null
++++ b/include/linux/spi/mxs-spi.h
+@@ -0,0 +1,109 @@
++/*
++ * include/linux/spi/mxs-spi.h
++ *
++ * Freescale i.MX233/i.MX28 SPI controller register definition
++ *
++ * Copyright 2008 Embedded Alley Solutions, Inc.
++ * Copyright 2009-2011 Freescale Semiconductor, Inc.
++ *
++ * 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; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License along
++ * with this program; if not, write to the Free Software Foundation, Inc.,
++ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
++ */
++
++#ifndef __LINUX_SPI_MXS_SPI_H__
++#define __LINUX_SPI_MXS_SPI_H__
++
++#define ssp_is_old(host) ((host)->devid == IMX23_MMC)
++
++/* SSP registers */
++#define HW_SSP_CTRL0 0x000
++#define BM_SSP_CTRL0_RUN (1 << 29)
++#define BM_SSP_CTRL0_SDIO_IRQ_CHECK (1 << 28)
++#define BM_SSP_CTRL0_IGNORE_CRC (1 << 26)
++#define BM_SSP_CTRL0_READ (1 << 25)
++#define BM_SSP_CTRL0_DATA_XFER (1 << 24)
++#define BP_SSP_CTRL0_BUS_WIDTH 22
++#define BM_SSP_CTRL0_BUS_WIDTH (0x3 << 22)
++#define BM_SSP_CTRL0_WAIT_FOR_IRQ (1 << 21)
++#define BM_SSP_CTRL0_LONG_RESP (1 << 19)
++#define BM_SSP_CTRL0_GET_RESP (1 << 17)
++#define BM_SSP_CTRL0_ENABLE (1 << 16)
++#define BP_SSP_CTRL0_XFER_COUNT 0
++#define BM_SSP_CTRL0_XFER_COUNT 0xffff
++#define HW_SSP_CMD0 0x010
++#define BM_SSP_CMD0_DBL_DATA_RATE_EN (1 << 25)
++#define BM_SSP_CMD0_SLOW_CLKING_EN (1 << 22)
++#define BM_SSP_CMD0_CONT_CLKING_EN (1 << 21)
++#define BM_SSP_CMD0_APPEND_8CYC (1 << 20)
++#define BP_SSP_CMD0_BLOCK_SIZE 16
++#define BM_SSP_CMD0_BLOCK_SIZE (0xf << 16)
++#define BP_SSP_CMD0_BLOCK_COUNT 8
++#define BM_SSP_CMD0_BLOCK_COUNT (0xff << 8)
++#define BP_SSP_CMD0_CMD 0
++#define BM_SSP_CMD0_CMD 0xff
++#define HW_SSP_CMD1 0x020
++#define HW_SSP_XFER_SIZE 0x030
++#define HW_SSP_BLOCK_SIZE 0x040
++#define BP_SSP_BLOCK_SIZE_BLOCK_COUNT 4
++#define BM_SSP_BLOCK_SIZE_BLOCK_COUNT (0xffffff << 4)
++#define BP_SSP_BLOCK_SIZE_BLOCK_SIZE 0
++#define BM_SSP_BLOCK_SIZE_BLOCK_SIZE 0xf
++#define HW_SSP_TIMING(h) (ssp_is_old(h) ? 0x050 : 0x070)
++#define BP_SSP_TIMING_TIMEOUT 16
++#define BM_SSP_TIMING_TIMEOUT (0xffff << 16)
++#define BP_SSP_TIMING_CLOCK_DIVIDE 8
++#define BM_SSP_TIMING_CLOCK_DIVIDE (0xff << 8)
++#define BP_SSP_TIMING_CLOCK_RATE 0
++#define BM_SSP_TIMING_CLOCK_RATE 0xff
++#define HW_SSP_CTRL1(h) (ssp_is_old(h) ? 0x060 : 0x080)
++#define BM_SSP_CTRL1_SDIO_IRQ (1 << 31)
++#define BM_SSP_CTRL1_SDIO_IRQ_EN (1 << 30)
++#define BM_SSP_CTRL1_RESP_ERR_IRQ (1 << 29)
++#define BM_SSP_CTRL1_RESP_ERR_IRQ_EN (1 << 28)
++#define BM_SSP_CTRL1_RESP_TIMEOUT_IRQ (1 << 27)
++#define BM_SSP_CTRL1_RESP_TIMEOUT_IRQ_EN (1 << 26)
++#define BM_SSP_CTRL1_DATA_TIMEOUT_IRQ (1 << 25)
++#define BM_SSP_CTRL1_DATA_TIMEOUT_IRQ_EN (1 << 24)
++#define BM_SSP_CTRL1_DATA_CRC_IRQ (1 << 23)
++#define BM_SSP_CTRL1_DATA_CRC_IRQ_EN (1 << 22)
++#define BM_SSP_CTRL1_FIFO_UNDERRUN_IRQ (1 << 21)
++#define BM_SSP_CTRL1_FIFO_UNDERRUN_IRQ_EN (1 << 20)
++#define BM_SSP_CTRL1_RECV_TIMEOUT_IRQ (1 << 17)
++#define BM_SSP_CTRL1_RECV_TIMEOUT_IRQ_EN (1 << 16)
++#define BM_SSP_CTRL1_FIFO_OVERRUN_IRQ (1 << 15)
++#define BM_SSP_CTRL1_FIFO_OVERRUN_IRQ_EN (1 << 14)
++#define BM_SSP_CTRL1_DMA_ENABLE (1 << 13)
++#define BM_SSP_CTRL1_POLARITY (1 << 9)
++#define BP_SSP_CTRL1_WORD_LENGTH 4
++#define BM_SSP_CTRL1_WORD_LENGTH (0xf << 4)
++#define BP_SSP_CTRL1_SSP_MODE 0
++#define BM_SSP_CTRL1_SSP_MODE 0xf
++#define HW_SSP_SDRESP0(h) (ssp_is_old(h) ? 0x080 : 0x0a0)
++#define HW_SSP_SDRESP1(h) (ssp_is_old(h) ? 0x090 : 0x0b0)
++#define HW_SSP_SDRESP2(h) (ssp_is_old(h) ? 0x0a0 : 0x0c0)
++#define HW_SSP_SDRESP3(h) (ssp_is_old(h) ? 0x0b0 : 0x0d0)
++#define HW_SSP_STATUS(h) (ssp_is_old(h) ? 0x0c0 : 0x100)
++#define BM_SSP_STATUS_CARD_DETECT (1 << 28)
++#define BM_SSP_STATUS_SDIO_IRQ (1 << 17)
++
++#define BF_SSP(value, field) (((value) << BP_SSP_##field) & BM_SSP_##field)
++
++#define SSP_PIO_NUM 3
++
++enum mxs_mmc_id {
++ IMX23_MMC,
++ IMX28_MMC,
++};
++
++#endif /* __LINUX_SPI_MXS_SPI_H__ */
+--
+1.7.10.4
+
+
+_______________________________________________
+linux-arm-kernel mailing list
+lin...@li...
+http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
+
diff --git a/patches/linux/3.5/0408-pengutronix-mx28-mmc_spi_Rename_IMX2x_MMC_to_IMX2x_SSP.patch b/patches/linux/3.5/0408-pengutronix-mx28-mmc_spi_Rename_IMX2x_MMC_to_IMX2x_SSP.patch
new file mode 100644
index 0000000..1ecabac
--- /dev/null
+++ b/patches/linux/3.5/0408-pengutronix-mx28-mmc_spi_Rename_IMX2x_MMC_to_IMX2x_SSP.patch
@@ -0,0 +1,116 @@
+Since the SSP controller can act as both SPI and MMC host,
+renaming the enum to properly reflect the naming seems
+appropriate.
+
+Based on previous attempt by:
+Fabio Estevam <fab...@fr...>
+
+Signed-off-by: Fabio Estevam <fab...@fr...>
+Signed-off-by: Marek Vasut <ma...@de...>
+Cc: Attila Kinali <at...@ki...>
+Cc: Chris Ball <cj...@la...>
+CC: Dong Aisheng <b2...@fr...>
+Cc: Grant Likely <gra...@se...>
+Cc: Linux ARM kernel <lin...@li...>
+Cc: Mark Brown <br...@op...>
+CC: Shawn Guo <sha...@li...>
+---
+ drivers/mmc/host/mxs-mmc.c | 18 +++++++++---------
+ include/linux/spi/mxs-spi.h | 8 ++++----
+ 2 files changed, 13 insertions(+), 13 deletions(-)
+
+diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
+index 26c95dc..e80c2b6 100644
+--- a/drivers/mmc/host/mxs-mmc.c
++++ b/drivers/mmc/host/mxs-mmc.c
+@@ -78,7 +78,7 @@ struct mxs_mmc_host {
+ enum dma_transfer_direction slave_dirn;
+ u32 ssp_pio_words[SSP_PIO_NUM];
+
+- enum mxs_mmc_id devid;
++ enum mxs_ssp_id devid;
+ unsigned char bus_width;
+ spinlock_t lock;
+ int sdio_irq_en;
+@@ -601,22 +601,22 @@ static bool mxs_mmc_dma_filter(struct dma_chan *chan, void *param)
+ return true;
+ }
+
+-static struct platform_device_id mxs_mmc_ids[] = {
++static struct platform_device_id mxs_ssp_ids[] = {
+ {
+ .name = "imx23-mmc",
+- .driver_data = IMX23_MMC,
++ .driver_data = IMX23_SSP,
+ }, {
+ .name = "imx28-mmc",
+- .driver_data = IMX28_MMC,
++ .driver_data = IMX28_SSP,
+ }, {
+ /* sentinel */
+ }
+ };
+-MODULE_DEVICE_TABLE(platform, mxs_mmc_ids);
++MODULE_DEVICE_TABLE(platform, mxs_ssp_ids);
+
+ static const struct of_device_id mxs_mmc_dt_ids[] = {
+- { .compatible = "fsl,imx23-mmc", .data = (void *) IMX23_MMC, },
+- { .compatible = "fsl,imx28-mmc", .data = (void *) IMX28_MMC, },
++ { .compatible = "fsl,imx23-mmc", .data = (void *) IMX23_SSP, },
++ { .compatible = "fsl,imx28-mmc", .data = (void *) IMX28_SSP, },
+ { /* sentinel */ }
+ };
+ MODULE_DEVICE_TABLE(of, mxs_mmc_dt_ids);
+@@ -655,7 +655,7 @@ static int mxs_mmc_probe(struct platform_device *pdev)
+ }
+
+ if (np) {
+- host->devid = (enum mxs_mmc_id) of_id->data;
++ host->devid = (enum mxs_ssp_id) of_id->data;
+ /*
+ * TODO: This is a temporary solution and should be changed
+ * to use generic DMA binding later when the helpers get in.
+@@ -829,7 +829,7 @@ static const struct dev_pm_ops mxs_mmc_pm_ops = {
+ static struct platform_driver mxs_mmc_driver = {
+ .probe = mxs_mmc_probe,
+ .remove = mxs_mmc_remove,
+- .id_table = mxs_mmc_ids,
++ .id_table = mxs_ssp_ids,
+ .driver = {
+ .name = DRIVER_NAME,
+ .owner = THIS_MODULE,
+diff --git a/include/linux/spi/mxs-spi.h b/include/linux/spi/mxs-spi.h
+index b7ccd57..c08aef5 100644
+--- a/include/linux/spi/mxs-spi.h
++++ b/include/linux/spi/mxs-spi.h
+@@ -24,7 +24,7 @@
+ #ifndef __LINUX_SPI_MXS_SPI_H__
+ #define __LINUX_SPI_MXS_SPI_H__
+
+-#define ssp_is_old(host) ((host)->devid == IMX23_MMC)
++#define ssp_is_old(host) ((host)->devid == IMX23_SSP)
+
+ /* SSP registers */
+ #define HW_SSP_CTRL0 0x000
+@@ -101,9 +101,9 @@
+
+ #define SSP_PIO_NUM 3
+
+-enum mxs_mmc_id {
+- IMX23_MMC,
+- IMX28_MMC,
++enum mxs_ssp_id {
++ IMX23_SSP,
++ IMX28_SSP,
+ };
+
+ #endif /* __LINUX_SPI_MXS_SPI_H__ */
+--
+1.7.10.4
+
+
+_______________________________________________
+linux-arm-kernel mailing list
+lin...@li...
+http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
+
diff --git a/patches/linux/3.5/0409-pengutronix-mx28-mmc_spi_Add_necessary_bits_into_mxs-spi-h.patch b/patches/linux/3.5/0409-pengutronix-mx28-mmc_spi_Add_necessary_bits_into_mxs-spi-h.patch
new file mode 100644
index 0000000..2b42796
--- /dev/null
+++ b/patches/linux/3.5/0409-pengutronix-mx28-mmc_spi_Add_necessary_bits_into_mxs-spi-h.patch
@@ -0,0 +1,95 @@
+Add missing register bits and registers into mxs-spi.h .
+These will be used by the SPI driver.
+
+Based on previous attempt by:
+Fabio Estevam <fab...@fr...>
+
+Signed-off-by: Fabio Estevam <fab...@fr...>
+Signed-off-by: Marek Vasut <ma...@de...>
+Cc: Attila Kinali <at...@ki...>
+Cc: Chris Ball <cj...@la...>
+CC: Dong Aisheng <b2...@fr...>
+Cc: Grant Likely <gra...@se...>
+Cc: Linux ARM kernel <lin...@li...>
+Cc: Mark Brown <br...@op...>
+CC: Shawn Guo <sha...@li...>
+---
+ include/linux/spi/mxs-spi.h | 22 ++++++++++++++++++++++
+ 1 file changed, 22 insertions(+)
+
+diff --git a/include/linux/spi/mxs-spi.h b/include/linux/spi/mxs-spi.h
+index c08aef5..7dfa1d7 100644
+--- a/include/linux/spi/mxs-spi.h
++++ b/include/linux/spi/mxs-spi.h
+@@ -30,12 +30,14 @@
+ #define HW_SSP_CTRL0 0x000
+ #define BM_SSP_CTRL0_RUN (1 << 29)
+ #define BM_SSP_CTRL0_SDIO_IRQ_CHECK (1 << 28)
++#define BM_SSP_CTRL0_LOCK_CS (1 << 27)
+ #define BM_SSP_CTRL0_IGNORE_CRC (1 << 26)
+ #define BM_SSP_CTRL0_READ (1 << 25)
+ #define BM_SSP_CTRL0_DATA_XFER (1 << 24)
+ #define BP_SSP_CTRL0_BUS_WIDTH 22
+ #define BM_SSP_CTRL0_BUS_WIDTH (0x3 << 22)
+ #define BM_SSP_CTRL0_WAIT_FOR_IRQ (1 << 21)
++#define BM_SSP_CTRL0_WAIT_FOR_CMD (1 << 20)
+ #define BM_SSP_CTRL0_LONG_RESP (1 << 19)
+ #define BM_SSP_CTRL0_GET_RESP (1 << 17)
+ #define BM_SSP_CTRL0_ENABLE (1 << 16)
+@@ -64,8 +66,12 @@
+ #define BM_SSP_TIMING_TIMEOUT (0xffff << 16)
+ #define BP_SSP_TIMING_CLOCK_DIVIDE 8
+ #define BM_SSP_TIMING_CLOCK_DIVIDE (0xff << 8)
++#define BF_SSP_TIMING_CLOCK_DIVIDE(v) \
++ (((v) << 8) & BM_SSP_TIMING_CLOCK_DIVIDE)
+ #define BP_SSP_TIMING_CLOCK_RATE 0
+ #define BM_SSP_TIMING_CLOCK_RATE 0xff
++#define BF_SSP_TIMING_CLOCK_RATE(v) \
++ (((v) << 0) & BM_SSP_TIMING_CLOCK_RATE)
+ #define HW_SSP_CTRL1(h) (ssp_is_old(h) ? 0x060 : 0x080)
+ #define BM_SSP_CTRL1_SDIO_IRQ (1 << 31)
+ #define BM_SSP_CTRL1_SDIO_IRQ_EN (1 << 30)
+@@ -84,11 +90,26 @@
+ #define BM_SSP_CTRL1_FIFO_OVERRUN_IRQ (1 << 15)
+ #define BM_SSP_CTRL1_FIFO_OVERRUN_IRQ_EN (1 << 14)
+ #define BM_SSP_CTRL1_DMA_ENABLE (1 << 13)
++#define BM_SSP_CTRL1_PHASE (1 << 10)
+ #define BM_SSP_CTRL1_POLARITY (1 << 9)
+ #define BP_SSP_CTRL1_WORD_LENGTH 4
+ #define BM_SSP_CTRL1_WORD_LENGTH (0xf << 4)
++#define BF_SSP_CTRL1_WORD_LENGTH(v) \
++ (((v) << 4) & BM_SSP_CTRL1_WORD_LENGTH)
++#define BV_SSP_CTRL1_WORD_LENGTH__FOUR_BITS 0x3
++#define BV_SSP_CTRL1_WORD_LENGTH__EIGHT_BITS 0x7
++#define BV_SSP_CTRL1_WORD_LENGTH__SIXTEEN_BITS 0xF
+ #define BP_SSP_CTRL1_SSP_MODE 0
+ #define BM_SSP_CTRL1_SSP_MODE 0xf
++#define BF_SSP_CTRL1_SSP_MODE(v) \
++ (((v) << 0) & BM_SSP_CTRL1_SSP_MODE)
++#define BV_SSP_CTRL1_SSP_MODE__SPI 0x0
++#define BV_SSP_CTRL1_SSP_MODE__SSI 0x1
++#define BV_SSP_CTRL1_SSP_MODE__SD_MMC 0x3
++#define BV_SSP_CTRL1_SSP_MODE__MS 0x4
++
++#define HW_SSP_DATA(h) (ssp_is_old(h) ? 0x070 : 0x090)
++
+ #define HW_SSP_SDRESP0(h) (ssp_is_old(h) ? 0x080 : 0x0a0)
+ #define HW_SSP_SDRESP1(h) (ssp_is_old(h) ? 0x090 : 0x0b0)
+ #define HW_SSP_SDRESP2(h) (ssp_is_old(h) ? 0x0a0 : 0x0c0)
+@@ -96,6 +117,7 @@
+ #define HW_SSP_STATUS(h) (ssp_is_old(h) ? 0x0c0 : 0x100)
+ #define BM_SSP_STATUS_CARD_DETECT (1 << 28)
+ #define BM_SSP_STATUS_SDIO_IRQ (1 << 17)
++#define BM_SSP_STATUS_FIFO_EMPTY (1 << 5)
+
+ #define BF_SSP(value, field) (((value) << BP_SSP_##field) & BM_SSP_##field)
+
+--
+1.7.10.4
+
+
+_______________________________________________
+linux-arm-kernel mailing list
+lin...@li...
+http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
+
diff --git a/patches/linux/3.5/0410-pengutronix-mx28-mmc_spi_Pull_out_parts_shared_between_MMC_and_SPI.patch b/patches/linux/3.5/0410-pengutronix-mx28-mmc_spi_Pull_out_parts_shared_between_MMC_and_SPI.patch
new file mode 100644
index 0000000..0ce2f71
--- /dev/null
+++ b/patches/linux/3.5/0410-pengutronix-mx28-mmc_spi_Pull_out_parts_shared_between_MMC_and_SPI.patch
@@ -0,0 +1,381 @@
+Abstract out the common part of private data shared between MMC
+and SPI. These shall later allow to use common clock configuration
+function.
+
+Signed-off-by: Marek Vasut <ma...@de...>
+Cc: Attila Kinali <at...@ki...>
+Cc: Chris Ball <cj...@la...>
+CC: Dong Aisheng <b2...@fr...>
+Cc: Fabio Estevam <fab...@fr...>
+Cc: Grant Likely <gra...@se...>
+Cc: Linux ARM kernel <lin...@li...>
+Cc: Mark Brown <br...@op...>
+CC: Shawn Guo <sha...@li...>
+---
+ drivers/mmc/host/mxs-mmc.c | 107 ++++++++++++++++++++++++-------------------
+ include/linux/spi/mxs-spi.h | 8 ++++
+ 2 files changed, 67 insertions(+), 48 deletions(-)
+
+diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
+index e80c2b6..7b85e03 100644
+--- a/drivers/mmc/host/mxs-mmc.c
++++ b/drivers/mmc/host/mxs-mmc.c
+@@ -62,23 +62,20 @@
+ #define MXS_MMC_DETECT_TIMEOUT (HZ/2)
+
+ struct mxs_mmc_host {
++ struct mxs_ssp ssp;
++
+ struct mmc_host *mmc;
+ struct mmc_request *mrq;
+ struct mmc_command *cmd;
+ struct mmc_data *data;
+
+- void __iomem *base;
+ int dma_channel;
+- struct clk *clk;
+- unsigned int clk_rate;
+-
+ struct dma_chan *dmach;
+ struct mxs_dma_data dma_data;
+ unsigned int dma_dir;
+ enum dma_transfer_direction slave_dirn;
+ u32 ssp_pio_words[SSP_PIO_NUM];
+
+- enum mxs_ssp_id devid;
+ unsigned char bus_width;
+ spinlock_t lock;
+ int sdio_irq_en;
+@@ -98,16 +95,18 @@ static int mxs_mmc_get_ro(struct mmc_host *mmc)
+ static int mxs_mmc_get_cd(struct mmc_host *mmc)
+ {
+ struct mxs_mmc_host *host = mmc_priv(mmc);
++ struct mxs_ssp *ssp = &host->ssp;
+
+- return !(readl(host->base + HW_SSP_STATUS(host)) &
++ return !(readl(ssp->base + HW_SSP_STATUS(ssp)) &
+ BM_SSP_STATUS_CARD_DETECT);
+ }
+
+ static void mxs_mmc_reset(struct mxs_mmc_host *host)
+ {
++ struct mxs_ssp *ssp = &host->ssp;
+ u32 ctrl0, ctrl1;
+
+- stmp_reset_block(host->base);
++ stmp_reset_block(ssp->base);
+
+ ctrl0 = BM_SSP_CTRL0_IGNORE_CRC;
+ ctrl1 = BF_SSP(0x3, CTRL1_SSP_MODE) |
+@@ -123,15 +122,15 @@ static void mxs_mmc_reset(struct mxs_mmc_host *host)
+ writel(BF_SSP(0xffff, TIMING_TIMEOUT) |
+ BF_SSP(2, TIMING_CLOCK_DIVIDE) |
+ BF_SSP(0, TIMING_CLOCK_RATE),
+- host->base + HW_SSP_TIMING(host));
++ ssp->base + HW_SSP_TIMING(ssp));
+
+ if (host->sdio_irq_en) {
+ ctrl0 |= BM_SSP_CTRL0_SDIO_IRQ_CHECK;
+ ctrl1 |= BM_SSP_CTRL1_SDIO_IRQ_EN;
+ }
+
+- writel(ctrl0, host->base + HW_SSP_CTRL0);
+- writel(ctrl1, host->base + HW_SSP_CTRL1(host));
++ writel(ctrl0, ssp->base + HW_SSP_CTRL0);
++ writel(ctrl1, ssp->base + HW_SSP_CTRL1(ssp));
+ }
+
+ static void mxs_mmc_start_cmd(struct mxs_mmc_host *host,
+@@ -142,15 +141,16 @@ static void mxs_mmc_request_done(struct mxs_mmc_host *host)
+ struct mmc_command *cmd = host->cmd;
+ struct mmc_data *data = host->data;
+ struct mmc_request *mrq = host->mrq;
++ struct mxs_ssp *ssp = &host->ssp;
+
+ if (mmc_resp_type(cmd) & MMC_RSP_PRESENT) {
+ if (mmc_resp_type(cmd) & MMC_RSP_136) {
+- cmd->resp[3] = readl(host->base + HW_SSP_SDRESP0(host));
+- cmd->resp[2] = readl(host->base + HW_SSP_SDRESP1(host));
+- cmd->resp[1] = readl(host->base + HW_SSP_SDRESP2(host));
+- cmd->resp[0] = readl(host->base + HW_SSP_SDRESP3(host));
++ cmd->resp[3] = readl(ssp->base + HW_SSP_SDRESP0(ssp));
++ cmd->resp[2] = readl(ssp->base + HW_SSP_SDRESP1(ssp));
++ cmd->resp[1] = readl(ssp->base + HW_SSP_SDRESP2(ssp));
++ cmd->resp[0] = readl(ssp->base + HW_SSP_SDRESP3(ssp));
+ } else {
+- cmd->resp[0] = readl(host->base + HW_SSP_SDRESP0(host));
++ cmd->resp[0] = readl(ssp->base + HW_SSP_SDRESP0(ssp));
+ }
+ }
+
+@@ -189,13 +189,14 @@ static irqreturn_t mxs_mmc_irq_handler(int irq, void *dev_id)
+ struct mxs_mmc_host *host = dev_id;
+ struct mmc_command *cmd = host->cmd;
+ struct mmc_data *data = host->data;
++ struct mxs_ssp *ssp = &host->ssp;
+ u32 stat;
+
+ spin_lock(&host->lock);
+
+- stat = readl(host->base + HW_SSP_CTRL1(host));
++ stat = readl(ssp->base + HW_SSP_CTRL1(ssp));
+ writel(stat & MXS_MMC_IRQ_BITS,
+- host->base + HW_SSP_CTRL1(host) + STMP_OFFSET_REG_CLR);
++ ssp->base + HW_SSP_CTRL1(ssp) + STMP_OFFSET_REG_CLR);
+
+ if ((stat & BM_SSP_CTRL1_SDIO_IRQ) && (stat & BM_SSP_CTRL1_SDIO_IRQ_EN))
+ mmc_signal_sdio_irq(host->mmc);
+@@ -359,6 +360,8 @@ static void mxs_mmc_adtc(struct mxs_mmc_host *host)
+ unsigned int data_size = 0, log2_blksz;
+ unsigned int blocks = data->blocks;
+
++ struct mxs_ssp *ssp = &host->ssp;
++
+ u32 ignore_crc, get_resp, long_resp, read;
+ u32 ctrl0, cmd0, cmd1, val;
+
+@@ -401,15 +404,15 @@ static void mxs_mmc_adtc(struct mxs_mmc_host *host)
+ blocks = 1;
+
+ /* xfer count, block size and count need to be set differently */
+- if (ssp_is_old(host)) {
++ if (ssp_is_old(ssp)) {
+ ctrl0 |= BF_SSP(data_size, CTRL0_XFER_COUNT);
+ cmd0 |= BF_SSP(log2_blksz, CMD0_BLOCK_SIZE) |
+ BF_SSP(blocks - 1, CMD0_BLOCK_COUNT);
+ } else {
+- writel(data_size, host->base + HW_SSP_XFER_SIZE);
++ writel(data_size, ssp->base + HW_SSP_XFER_SIZE);
+ writel(BF_SSP(log2_blksz, BLOCK_SIZE_BLOCK_SIZE) |
+ BF_SSP(blocks - 1, BLOCK_SIZE_BLOCK_COUNT),
+- host->base + HW_SSP_BLOCK_SIZE);
++ ssp->base + HW_SSP_BLOCK_SIZE);
+ }
+
+ if ((cmd->opcode == MMC_STOP_TRANSMISSION) ||
+@@ -424,11 +427,11 @@ static void mxs_mmc_adtc(struct mxs_mmc_host *host)
+ }
+
+ /* set the timeout count */
+- timeout = mxs_ns_to_ssp_ticks(host->clk_rate, data->timeout_ns);
+- val = readl(host->base + HW_SSP_TIMING(host));
++ timeout = mxs_ns_to_ssp_ticks(ssp->clk_rate, data->timeout_ns);
++ val = readl(ssp->base + HW_SSP_TIMING(ssp));
+ val &= ~(BM_SSP_TIMING_TIMEOUT);
+ val |= BF_SSP(timeout, TIMING_TIMEOUT);
+- writel(val, host->base + HW_SSP_TIMING(host));
++ writel(val, ssp->base + HW_SSP_TIMING(ssp));
+
+ /* pio */
+ host->ssp_pio_words[0] = ctrl0;
+@@ -493,11 +496,12 @@ static void mxs_mmc_request(struct mmc_host *mmc, struct mmc_request *mrq)
+
+ static void mxs_mmc_set_clk_rate(struct mxs_mmc_host *host, unsigned int rate)
+ {
++ struct mxs_ssp *ssp = &host->ssp;
+ unsigned int ssp_clk, ssp_sck;
+ u32 clock_divide, clock_rate;
+ u32 val;
+
+- ssp_clk = clk_get_rate(host->clk);
++ ssp_clk = clk_get_rate(ssp->clk);
+
+ for (clock_divide = 2; clock_divide <= 254; clock_divide += 2) {
+ clock_rate = DIV_ROUND_UP(ssp_clk, rate * clock_divide);
+@@ -514,13 +518,13 @@ static void mxs_mmc_set_clk_rate(struct mxs_mmc_host *host, unsigned int rate)
+
+ ssp_sck = ssp_clk / clock_divide / (1 + clock_rate);
+
+- val = readl(host->base + HW_SSP_TIMING(host));
++ val = readl(ssp->base + HW_SSP_TIMING(ssp));
+ val &= ~(BM_SSP_TIMING_CLOCK_DIVIDE | BM_SSP_TIMING_CLOCK_RATE);
+ val |= BF_SSP(clock_divide, TIMING_CLOCK_DIVIDE);
+ val |= BF_SSP(clock_rate, TIMING_CLOCK_RATE);
+- writel(val, host->base + HW_SSP_TIMING(host));
++ writel(val, ssp->base + HW_SSP_TIMING(ssp));
+
+- host->clk_rate = ssp_sck;
++ ssp->clk_rate = ssp_sck;
+
+ dev_dbg(mmc_dev(host->mmc),
+ "%s: clock_divide %d, clock_rate %d, ssp_clk %d, rate_actual %d, rate_requested %d\n",
+@@ -545,6 +549,7 @@ static void mxs_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
+ static void mxs_mmc_enable_sdio_irq(struct mmc_host *mmc, int enable)
+ {
+ struct mxs_mmc_host *host = mmc_priv(mmc);
++ struct mxs_ssp *ssp = &host->ssp;
+ unsigned long flags;
+
+ spin_lock_irqsave(&host->lock, flags);
+@@ -553,19 +558,19 @@ static void mxs_mmc_enable_sdio_irq(struct mmc_host *mmc, int enable)
+
+ if (enable) {
+ writel(BM_SSP_CTRL0_SDIO_IRQ_CHECK,
+- host->base + HW_SSP_CTRL0 + STMP_OFFSET_REG_SET);
++ ssp->base + HW_SSP_CTRL0 + STMP_OFFSET_REG_SET);
+ writel(BM_SSP_CTRL1_SDIO_IRQ_EN,
+- host->base + HW_SSP_CTRL1(host) + STMP_OFFSET_REG_SET);
++ ssp->base + HW_SSP_CTRL1(ssp) + STMP_OFFSET_REG_SET);
+
+- if (readl(host->base + HW_SSP_STATUS(host)) &
++ if (readl(ssp->base + HW_SSP_STATUS(ssp)) &
+ BM_SSP_STATUS_SDIO_IRQ)
+ mmc_signal_sdio_irq(host->mmc);
+
+ } else {
+ writel(BM_SSP_CTRL0_SDIO_IRQ_CHECK,
+- host->base + HW_SSP_CTRL0 + STMP_OFFSET_REG_CLR);
++ ssp->base + HW_SSP_CTRL0 + STMP_OFFSET_REG_CLR);
+ writel(BM_SSP_CTRL1_SDIO_IRQ_EN,
+- host->base + HW_SSP_CTRL1(host) + STMP_OFFSET_REG_CLR);
++ ssp->base + HW_SSP_CTRL1(ssp) + STMP_OFFSET_REG_CLR);
+ }
+
+ spin_unlock_irqrestore(&host->lock, flags);
+@@ -626,6 +631,7 @@ static int mxs_mmc_probe(struct platform_device *pdev)
+ struct pinctrl *pinctrl;
+ int ret = 0, irq_err, irq_dma;
+ dma_cap_mask_t mask;
++ struct mxs_ssp *ssp;
+
+ iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ dmares = platform_get_resource(pdev, IORESOURCE_DMA, 0);
+@@ -639,14 +645,16 @@ static int mxs_mmc_probe(struct platform_device *pdev)
+ return -ENOMEM;
+
+ host = mmc_priv(mmc);
+- host->base = devm_request_and_ioremap(&pdev->dev, iores);
+- if (!host->base) {
++ ssp = &host->ssp;
++ ssp->dev = &pdev->dev;
++ ssp->base = devm_request_and_ioremap(&pdev->dev, iores);
++ if (!ssp->base) {
+ ret = -EADDRNOTAVAIL;
+ goto out_mmc_free;
+ }
+
+ if (np) {
+- host->devid = (enum mxs_ssp_id) of_id->data;
++ ssp->devid = (enum mxs_ssp_id) of_id->data;
+ /*
+ * TODO: This is a temporary solution and should be changed
+ * to use generic DMA binding later when the helpers get in.
+@@ -659,7 +667,7 @@ static int mxs_mmc_probe(struct platform_device *pdev)
+ goto out_mmc_free;
+ }
+ } else {
+- host->devid = pdev->id_entry->driver_data;
++ ssp->devid = pdev->id_entry->driver_data;
+ host->dma_channel = dmares->start;
+ }
+
+@@ -672,12 +680,12 @@ static int mxs_mmc_probe(struct platform_device *pdev)
+ goto out_mmc_free;
+ }
+
+- host->clk = clk_get(&pdev->dev, NULL);
+- if (IS_ERR(host->clk)) {
+- ret = PTR_ERR(host->clk);
++ ssp->clk = clk_get(&pdev->dev, NULL);
++ if (IS_ERR(ssp->clk)) {
++ ret = PTR_ERR(ssp->clk);
+ goto out_mmc_free;
+ }
+- clk_prepare_enable(host->clk);
++ clk_prepare_enable(ssp->clk);
+
+ mxs_mmc_reset(host);
+
+@@ -719,8 +727,8 @@ static int mxs_mmc_probe(struct platform_device *pdev)
+
+ mmc->max_segs = 52;
+ mmc->max_blk_size = 1 << 0xf;
+- mmc->max_blk_count = (ssp_is_old(host)) ? 0xff : 0xffffff;
+- mmc->max_req_size = (ssp_is_old(host)) ? 0xffff : 0xffffffff;
++ mmc->max_blk_count = (ssp_is_old(ssp)) ? 0xff : 0xffffff;
++ mmc->max_req_size = (ssp_is_old(ssp)) ? 0xffff : 0xffffffff;
+ mmc->max_seg_size = dma_get_max_seg_size(host->dmach->device->dev);
+
+ platform_set_drvdata(pdev, mmc);
+@@ -744,8 +752,8 @@ out_free_dma:
+ if (host->dmach)
+ dma_release_channel(host->dmach);
+ out_clk_put:
+- clk_disable_unprepare(host->clk);
+- clk_put(host->clk);
++ clk_disable_unprepare(ssp->clk);
++ clk_put(ssp->clk);
+ out_mmc_free:
+ mmc_free_host(mmc);
+ return ret;
+@@ -755,6 +763,7 @@ static int mxs_mmc_remove(struct platform_device *pdev)
+ {
+ struct mmc_host *mmc = platform_get_drvdata(pdev);
+ struct mxs_mmc_host *host = mmc_priv(mmc);
++ struct mxs_ssp *ssp = &host->ssp;
+
+ mmc_remove_host(mmc);
+
+@@ -763,8 +772,8 @@ static int mxs_mmc_remove(struct platform_device *pdev)
+ if (host->dmach)
+ dma_release_channel(host->dmach);
+
+- clk_disable_unprepare(host->clk);
+- clk_put(host->clk);
++ clk_disable_unprepare(ssp->clk);
++ clk_put(ssp->clk);
+
+ mmc_free_host(mmc);
+
+@@ -776,11 +785,12 @@ static int mxs_mmc_suspend(struct device *dev)
+ {
+ struct mmc_host *mmc = dev_get_drvdata(dev);
+ struct mxs_mmc_host *host = mmc_priv(mmc);
++ struct mxs_ssp *ssp = &host->ssp;
+ int ret = 0;
+
+ ret = mmc_suspend_host(mmc);
+
+- clk_disable_unprepare(host->clk);
++ clk_disable_unprepare(ssp->clk);
+
+ return ret;
+ }
+@@ -789,9 +799,10 @@ static int mxs_mmc_resume(struct device *dev)
+ {
+ struct mmc_host *mmc = dev_get_drvdata(dev);
+ struct mxs_mmc_host *host = mmc_priv(mmc);
++ struct mxs_ssp *ssp = &host->ssp;
+ int ret = 0;
+
+- clk_prepare_enable(host->clk);
++ clk_prepare_enable(ssp->clk);
+
+ ret = mmc_resume_host(mmc);
+
+diff --git a/include/linux/spi/mxs-spi.h b/include/linux/spi/mxs-spi.h
+index 7dfa1d7..475f69f 100644
+--- a/include/linux/spi/mxs-spi.h
++++ b/include/linux/spi/mxs-spi.h
+@@ -128,4 +128,12 @@ enum mxs_ssp_id {
+ IMX28_SSP,
+ };
+
++struct mxs_ssp {
++ struct device *dev;
++ void __iomem *base;
++ struct clk *clk;
++ unsigned int clk_rate;
++ enum mxs_ssp_id devid;
++};
++
+ #endif /* __LINUX_SPI_MXS_SPI_H__ */
+--
+1.7.10.4
+
+
+_______________________________________________
+linux-arm-kernel mailing list
+lin...@li...
+http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
+
diff --git a/patches/linux/3.5/0411-pengutronix-mx28-mmc_spi_Pull_out_the_SSP_clock_configuration_function.patch b/patches/linux/3.5/0411-pengutronix-mx28-mmc_spi_Pull_out_the_SSP_clock_configuration_function.patch
new file mode 100644
index 0000000..f167901
--- /dev/null
+++ b/patches/linux/3.5/0411-pengutronix-mx28-mmc_spi_Pull_out_the_SSP_clock_configuration_function.patch
@@ -0,0 +1,179 @@
+Pull out the MMC clock configuration function and make it
+into SSP clock configuration function, so it can be used by
+the SPI driver too.
+
+Signed-off-by: Marek Vasut <ma...@de...>
+Cc: Attila Kinali <at...@ki...>
+Cc: Chris Ball <cj...@la...>
+CC: Dong Aisheng <b2...@fr...>
+Cc: Fabio Estevam <fab...@fr...>
+Cc: Grant Likely <gra...@se...>
+Cc: Linux ARM kernel <lin...@li...>
+Cc: Mark Brown <br...@op...>
+CC: Shawn Guo <sha...@li...>
+---
+ drivers/clk/mxs/Makefile | 2 +-
+ drivers/clk/mxs/clk-ssp.c | 62 +++++++++++++++++++++++++++++++++++++++++++
+ drivers/mmc/host/mxs-mmc.c | 39 +--------------------------
+ include/linux/spi/mxs-spi.h | 2 ++
+ 4 files changed, 66 insertions(+), 39 deletions(-)
+ create mode 100644 drivers/clk/mxs/clk-ssp.c
+
+diff --git a/drivers/clk/mxs/Makefile b/drivers/clk/mxs/Makefile
+index 7bedeec..a6a2223 100644
+--- a/drivers/clk/mxs/Makefile
++++ b/drivers/clk/mxs/Makefile
+@@ -2,7 +2,7 @@
+ # Makefile for mxs specific clk
+ #
+
+-obj-y += clk.o clk-pll.o clk-ref.o clk-div.o clk-frac.o
++obj-y += clk.o clk-pll.o clk-ref.o clk-div.o clk-frac.o clk-ssp.o
+
+ obj-$(CONFIG_SOC_IMX23) += clk-imx23.o
+ obj-$(CONFIG_SOC_IMX28) += clk-imx28.o
+diff --git a/drivers/clk/mxs/clk-ssp.c b/drivers/clk/mxs/clk-ssp.c
+new file mode 100644
+index 0000000..af7bdbf
+--- /dev/null
++++ b/drivers/clk/mxs/clk-ssp.c
+@@ -0,0 +1,62 @@
++/*
++ * Copyright 2012 DENX Software Engineering, GmbH
++ *
++ * Pulled from code:
++ * Portions copyright (C) 2003 Russell King, PXA MMCI Driver
++ * Portions copyright (C) 2004-2005 Pierre Ossman, W83L51xD SD/MMC driver
++ *
++ * Copyright 2008 Embedded Alley Solutions, Inc.
++ * Copyright 2009-2011 Freescale Semiconductor, Inc.
++ *
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++#include <linux/kernel.h>
++#include <linux/init.h>
++#include <linux/clk.h>
++#include <linux/module.h>
++#include <linux/device.h>
++#include <linux/io.h>
++#include <linux/spi/mxs-spi.h>
++
++void mxs_ssp_set_clk_rate(struct mxs_ssp *ssp, unsigned int rate)
++{
++ unsigned int ssp_clk, ssp_sck;
++ u32 clock_divide, clock_rate;
++ u32 val;
++
++ ssp_clk = clk_get_rate(ssp->clk);
++
++ for (clock_divide = 2; clock_divide <= 254; clock_divide += 2) {
++ clock_rate = DIV_ROUND_UP(ssp_clk, rate * clock_divide);
++ clock_rate = (clock_rate > 0) ? clock_rate - 1 : 0;
++ if (clock_rate <= 255)
++ break;
++ }
++
++ if (clock_divide > 254) {
++ dev_err(ssp->dev,
++ "%s: cannot set clock to %d\n", __func__, rate);
++ return;
++ }
++
++ ssp_sck = ssp_clk / clock_divide / (1 + clock_rate);
++
++ val = readl(ssp->base + HW_SSP_TIMING(ssp));
++ val &= ~(BM_SSP_TIMING_CLOCK_DIVIDE | BM_SSP_TIMING_CLOCK_RATE);
++ val |= BF_SSP(clock_divide, TIMING_CLOCK_DIVIDE);
++ val |= BF_SSP(clock_rate, TIMING_CLOCK_RATE);
++ writel(val, ssp->base + HW_SSP_TIMING(ssp));
++
++ ssp->clk_rate = ssp_sck;
++
++ dev_dbg(ssp->dev,
++ "%s: clock_divide %d, clock_rate %d, ssp_clk %d, rate_actual %d, rate_requested %d\n",
++ __func__, clock_divide, clock_rate, ssp_clk, ssp_sck, rate);
++}
++EXPORT_SYMBOL_GPL(mxs_ssp_set_clk_rate);
+diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
+index 7b85e03..0813340 100644
+--- a/drivers/mmc/host/mxs-mmc.c
++++ b/drivers/mmc/host/mxs-mmc.c
+@@ -501,43 +501,6 @@ static void mxs_mmc_request(struct mmc_host *mmc, struct mmc_request *mrq)
+ mxs_mmc_start_cmd(host, mrq->cmd);
+ }
+
+-static void mxs_mmc_set_clk_rate(struct mxs_mmc_host *host, unsigned int rate)
+-{
+- struct mxs_ssp *ssp = &host->ssp;
+- unsigned int ssp_clk, ssp_sck;
+- u32 clock_divide, clock_rate;
+- u32 val;
+-
+- ssp_clk = clk_get_rate(ssp->clk);
+-
+- for (clock_divide = 2; clock_divide <= 254; clock_divide += 2) {
+- clock_rate = DIV_ROUND_UP(ssp_clk, rate * clock_divide);
+- clock_rate = (clock_rate > 0) ? clock_rate - 1 : 0;
+- if (clock_rate <= 255)
+- break;
+- }
+-
+- if (clock_divide > 254) {
+- dev_err(mmc_dev(host->mmc),
+- "%s: cannot set clock to %d\n", __func__, rate);
+- return;
+- }
+-
+- ssp_sck = ssp_clk / clock_divide / (1 + clock_rate);
+-
+- val = readl(ssp->base + HW_SSP_TIMING(ssp));
+- val &= ~(BM_SSP_TIMING_CLOCK_DIVIDE | BM_SSP_TIMING_CLOCK_RATE);
+- val |= BF_SSP(clock_divide, TIMING_CLOCK_DIVIDE);
+- val |= BF_SSP(clock_rate, TIMING_CLOCK_RATE);
+- writel(val, ssp->base + HW_SSP_TIMING(ssp));
+-
+- ssp->clk_rate = ssp_sck;
+-
+- dev_dbg(mmc_dev(host->mmc),
+- "%s: clock_divide %d, clock_rate %d, ssp_clk %d, rate_actual %d, rate_requested %d\n",
+- __func__, clock_divide, clock_rate, ssp_clk, ssp_sck, rate);
+-}
+-
+ static void mxs_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
+ {
+ struct mxs_mmc_host *host = mmc_priv(mmc);
+@@ -550,7 +513,7 @@ static void mxs_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
+ host->bus_width = 0;
+
+ if (ios->clock)
+- mxs_mmc_set_clk_rate(host, ios->clock);
++ mxs_ssp_set_clk_rate(&host->ssp, ios->clock);
+ }
+
+ static void mxs_mmc_enable_sdio_irq(struct mmc_host *mmc, int enable)
+diff --git a/include/linux/spi/mxs-spi.h b/include/linux/spi/mxs-spi.h
+index 475f69f..d07f8dc 100644
+--- a/include/linux/spi/mxs-spi.h
++++ b/include/linux/spi/mxs-spi.h
+@@ -136,4 +136,6 @@ struct mxs_ssp {
+ enum mxs_ssp_id devid;
+ };
+
++void mxs_ssp_set_clk_rate(struct mxs_ssp *ssp, unsigned int rate);
++
+ #endif /* __LINUX_SPI_MXS_SPI_H__ */
+--
+1.7.10.4
+
+
+_______________________________________________
+linux-arm-kernel mailing list
+lin...@li...
+http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
+
diff --git a/patches/linux/3.5/0412-pengutronix-mx28-spi_Add_SPI_driver_for_mx233_mx28.patch b/patches/linux/3.5/0412-pengutronix-mx28-spi_Add_SPI_driver_for_mx233_mx28.patch
new file mode 100644
index 0000000..fc35acc
--- /dev/null
+++ b/patches/linux/3.5/0412-pengutronix-mx28-spi_Add_SPI_driver_for_mx233_mx28.patch
@@ -0,0 +1,503 @@
+This is slightly reworked version of the SPI driver.
+Support for DT has been added and it's been converted
+to queued API.
+
+Based on previous attempt by:
+Fabio Estevam <fab...@fr...>
+
+Signed-off-by: Fabio Estevam <fab...@fr...>
+Signed-off-by: Marek Vasut <ma...@de...>
+Cc: Attila Kinali <at...@ki...>
+Cc: Chris Ball <cj...@la...>
+CC: Dong Aisheng <b2...@fr...>
+Cc: Grant Likely <gra...@se...>
+Cc: Linux ARM kernel <lin...@li...>
+Cc: Mark Brown <br...@op...>
+CC: Shawn Guo <sha...@li...>
+---
+ drivers/spi/Kconfig | 7 +
+ drivers/spi/Makefile | 1 +
+ drivers/spi/spi-mxs.c | 431 +++++++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 439 insertions(+)
+ create mode 100644 drivers/spi/spi-mxs.c
+
+V3: Drop mxs_spi_cleanup()
+ Set "hz" unconditionally to dev->max_speed_hz and then trim it down.
+ Add comment about how Freescale is recycling random bits in CTRL0 register.
+
+diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
+index 5f84b55..6992b30 100644
+--- a/drivers/spi/Kconfig
++++ b/drivers/spi/Kconfig
+@@ -364,6 +364,13 @@ config SPI_STMP3XXX
+ help
+ SPI driver for Freescale STMP37xx/378x SoC SSP interface
+
++config SPI_MXS
++ tristate "Freescale MXS SPI controller"
++ depends on ARCH_MXS
++ select STMP_DEVICE
++ help
++ SPI driver for Freescale MXS devices.
++
+ config SPI_TEGRA
+ tristate "Nvidia Tegra SPI controller"
+ depends on ARCH_TEGRA && (TEGRA_SYSTEM_DMA || TEGRA20_APB_DMA)
+diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile
+index 3920dcf..3b72d87 100644
+--- a/drivers/spi/Makefile
++++ b/drivers/spi/Makefile
+@@ -36,6 +36,7 @@ obj-$(CONFIG_SPI_LM70_LLP) += spi-lm70llp.o
+ obj-$(CONFIG_SPI_MPC512x_PSC) += spi-mpc512x-psc.o
+ obj-$(CONFIG_SPI_MPC52xx_PSC) += spi-mpc52xx-psc.o
+ obj-$(CONFIG_SPI_MPC52xx) += spi-mpc52xx.o
++obj-$(CONFIG_SPI_MXS) += spi-mxs.o
+ obj-$(CONFIG_SPI_NUC900) += spi-nuc900.o
+ obj-$(CONFIG_SPI_OC_TINY) += spi-oc-tiny.o
+ obj-$(CONFIG_SPI_OMAP_UWIRE) += spi-omap-uwire.o
+diff --git a/drivers/spi/spi-mxs.c b/drivers/spi/spi-mxs.c
+new file mode 100644
+index 0000000..7bf826f
+--- /dev/null
++++ b/drivers/spi/spi-mxs.c
+@@ -0,0 +1,431 @@
++/*
++ * Freescale MXS SPI master driver
++ *
++ * Copyright 2012 DENX Software Engineering, GmbH.
++ * Copyright 2012 Freescale Semiconductor, Inc.
++ * Copyright 2008 Embedded Alley Solutions, Inc All Rights Reserved.
++ *
++ * Rework and transition to new API by:
++ * Marek Vasut <ma...@de...>
++ *
++ * Based on previous attempt by:
++ * Fabio Estevam <fab...@fr...>
++ *
++ * Based on code from U-Boot bootloader by:
++ * Marek Vasut <ma...@de...>
++ *
++ * Based on spi-stmp.c, which is:
++ * Author: Dmitry Pervushin <di...@em...>
++ *
++ * 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; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ */
++
++#include <linux/kernel.h>
++#include <linux/init.h>
++#include <linux/ioport.h>
++#include <linux/of.h>
++#include <linux/of_device.h>
++#include <linux/of_gpio.h>
++#include <linux/platform_device.h>
++#include <linux/delay.h>
++#include <linux/interrupt.h>
++#include <linux/dma-mapping.h>
++#include <linux/dmaengine.h>
++#include <linux/highmem.h>
++#include <linux/clk.h>
++#include <linux/err.h>
++#include <linux/completion.h>
++#include <linux/gpio.h>
++#include <linux/regulator/consumer.h>
++#include <linux/module.h>
++#include <linux/fsl/mxs-dma.h>
++#include <linux/pinctrl/consumer.h>
++#include <linux/stmp_device.h>
++#include <linux/spi/spi.h>
++#include <linux/spi/mxs-spi.h>
++
++#define DRIVER_NAME "mxs-spi"
++
++#define SSP_TIMEOUT 1000 /* 1000 ms */
++
++struct mxs_spi {
++ struct mxs_ssp ssp;
++};
++
++static int mxs_spi_setup_transfer(struct spi_device *dev,
++ struct spi_transfer *t)
++{
++ struct mxs_spi *spi = spi_master_get_devdata(dev->master);
++ struct mxs_ssp *ssp = &spi->ssp;
++ uint8_t bits_per_word;
++ uint32_t hz = 0;
++
++ bits_per_word = dev->bits_per_word;
++ if (t && t->bits_per_word)
++ bits_per_word = t->bits_per_word;
++
++ if (bits_per_word != 8) {
++ dev_err(&dev->dev, "%s, unsupported bits_per_word=%d\n",
++ __func__, bits_per_word);
++ return -EINVAL;
++ }
++
++ hz = dev->max_speed_hz;
++ if (t && t->speed_hz)
++ hz = min(hz, t->speed_hz);
++ if (hz == 0) {
++ dev_err(&dev->dev, "Cannot continue with zero clock\n");
++ return -EINVAL;
++ }
++
++ mxs_ssp_set_clk_rate(ssp, hz);
++
++ writel(BF_SSP_CTRL1_SSP_MODE(BV_SSP_CTRL1_SSP_MODE__SPI) |
++ BF_SSP_CTRL1_WORD_LENGTH
++ (BV_SSP_CTRL1_WORD_LENGTH__EIGHT_BITS) |
++ ((dev->mode & SPI_CPOL) ? BM_SSP_CTRL1_POLARITY : 0) |
++ ((dev->mode & SPI_CPHA) ? BM_SSP_CTRL1_PHASE : 0),
++ ssp->base + HW_SSP_CTRL1(ssp));
++
++ writel(0x0, ssp->base + HW_SSP_CMD0);
++ writel(0x0, ssp->base + HW_SSP_CMD1);
++
++ return 0;
++}
++
++static int mxs_spi_setup(struct spi_device *dev)
++{
++ int err = 0;
++
++ if (!dev->bits_per_word)
++ dev->bits_per_word = 8;
++
++ if (dev->mode & ~(SPI_CPOL | SPI_CPHA))
++ return -EINVAL;
++
++ err = mxs_spi_setup_transfer(dev, NULL);
++ if (err) {
++ dev_err(&dev->dev,
++ "Failed to setup transfer, error = %d\n", err);
++ }
++
++ return err;
++}
++
++static uint32_t mxs_spi_cs_to_reg(unsigned cs)
++{
++ uint32_t select = 0;
++
++ /*
++ * i.MX28 Datasheet: 17.10.1: HW_SSP_CTRL0
++ *
++ * The bits BM_SSP_CTRL0_WAIT_FOR_CMD and BM_SSP_CTRL0_WAIT_FOR_IRQ
++ * in HW_SSP_CTRL0 register do have multiple usage, please refer to
++ * the datasheet for further details. In SPI mode, they are used to
++ * toggle the chip-select lines (nCS pins).
++ */
++ if (cs & 1)
++ select |= BM_SSP_CTRL0_WAIT_FOR_CMD;
++ if (cs & 2)
++ select |= BM_SSP_CTRL0_WAIT_FOR_IRQ;
++
++ return select;
++}
++
++static void mxs_spi_set_cs(struct mxs_spi *spi, unsigned cs)
++{
++ const uint32_t mask =
++ BM_SSP_CTRL0_WAIT_FOR_CMD | BM_SSP_CTRL0_WAIT_FOR_IRQ;
++ uint32_t select;
++ struct mxs_ssp *ssp = &spi->ssp;
++
++ writel(mask, ssp->base + HW_SSP_CTRL0 + STMP_OFFSET_REG_CLR);
++ select = mxs_spi_cs_to_reg(cs);
++ writel(select, ssp->base + HW_SSP_CTRL0 + STMP_OFFSET_REG_SET);
++}
++
++static inline void mxs_spi_enable(struct mxs_spi *spi)
++{
++ struct mxs_ssp *ssp = &spi->ssp;
++
++ writel(BM_SSP_CTRL0_LOCK_CS,
++ ssp->base + HW_SSP_CTRL0 + STMP_OFFSET_REG_SET);
++ writel(BM_SSP_CTRL0_IGNORE_CRC,
++ ssp->base + HW_SSP_CTRL0 + STMP_OFFSET_REG_CLR);
++}
++
++static inline void mxs_spi_disable(struct mxs_spi *spi)
++{
++ struct mxs_ssp *ssp = &spi->ssp;
++
++ writel(BM_SSP_CTRL0_LOCK_CS,
++ ssp->base + HW_SSP_CTRL0 + STMP_OFFSET_REG_CLR);
++ writel(BM_SSP_CTRL0_IGNORE_CRC,
++ ssp->base + HW_SSP_CTRL0 + STMP_OFFSET_REG_SET);
++}
++
++static int mxs_ssp_wait(struct mxs_spi *spi, int offset, int mask, bool set)
++{
++ unsigned long timeout = jiffies + msecs_to_jiffies(SSP_TIMEOUT);
++ struct mxs_ssp *ssp = &spi->ssp;
++ uint32_t reg;
++
++ while (1) {
++ reg = readl_relaxed(ssp->base + offset);
++
++ if (set && ((reg & mask) == mask))
++ break;
++
++ if (!set && ((~reg & mask) == mask))
++ break;
++
++ udelay(1);
++
++ if (time_after(jiffies, timeout))
++ return -ETIMEDOUT;
++ }
++ return 0;
++}
++
++static int mxs_spi_txrx_pio(struct mxs_spi *spi, int cs,
++ unsigned char *buf, int len,
++ int *first, int *last, int write)
++{
++ struct mxs_ssp *ssp = &spi->ssp;
++
++ if (*first)
++ mxs_spi_enable(spi);
++
++ mxs_spi_set_cs(spi, cs);
++
++ while (len--) {
++ if (*last && len == 0)
++ mxs_spi_disable(spi);
++
++ if (ssp->devid == IMX23_SSP) {
++ writel(BM_SSP_CTRL0_XFER_COUNT,
++ ssp->base + HW_SSP_CTRL0 + STMP_OFFSET_REG_CLR);
++ writel(1,
++ ssp->base + HW_SSP_CTRL0 + STMP_OFFSET_REG_SET);
++ } else {
++ writel(1, ssp->base + HW_SSP_XFER_SIZE);
++ }
++
++ if (write)
++ writel(BM_SSP_CTRL0_READ,
++ ssp->base + HW_SSP_CTRL0 + STMP_OFFSET_REG_CLR);
++ else
++ writel(BM_SSP_CTRL0_READ,
++ ssp->base + HW_SSP_CTRL0 + STMP_OFFSET_REG_SET);
++
++ writel(BM_SSP_CTRL0_RUN,
++ ssp->base + HW_SSP_CTRL0 + STMP_OFFSET_REG_SET);
++
++ if (mxs_ssp_wait(spi, HW_SSP_CTRL0, BM_SSP_CTRL0_RUN, 1))
++ return -ETIMEDOUT;
++
++ if (write)
++ writel(*buf, ssp->base + HW_SSP_DATA(ssp));
++
++ writel(BM_SSP_CTRL0_DATA_XFER,
++ ssp->base + HW_SSP_CTRL0 + STMP_OFFSET_REG_SET);
++
++ if (!write) {
++ if (mxs_ssp_wait(spi, HW_SSP_STATUS(ssp),
++ BM_SSP_STATUS_FIFO_EMPTY, 0))
++ return -ETIMEDOUT;
++
++ *buf = (readl(ssp->base + HW_SSP_DATA(ssp)) & 0xff);
++ }
++
++ if (mxs_ssp_wait(spi, HW_SSP_CTRL0, BM_SSP_CTRL0_RUN, 0))
++ return -ETIMEDOUT;
++
++ buf++;
++ }
++
++ if (len <= 0)
++ return 0;
++
++ return -ETIMEDOUT;
++}
++
++static int mxs_spi_transfer_one(struct spi_master *master,
++ struct spi_message *m)
++{
++ struct mxs_spi *spi = spi_master_get_devdata(master);
++ struct mxs_ssp *ssp = &spi->ssp;
++ int first, last;
++ struct spi_transfer *t, *tmp_t;
++ int status = 0;
++ int cs;
++
++ first = last = 0;
++
++ cs = m->spi->chip_select;
++
++ list_for_each_entry_safe(t, tmp_t, &m->transfers, transfer_list) {
++
++ status = mxs_spi_setup_transfer(m->spi, t);
++ if (status)
++ break;
++
++ if (&t->transfer_list == m->transfers.next)
++ first = 1;
++ if (&t->transfer_list == m->transfers.prev)
++ last = 1;
++ if (t->rx_buf && t->tx_buf) {
++ dev_err(ssp->dev,
++ "Cannot send and receive simultaneously\n");
++ status = -EINVAL;
++ break;
++ }
++
++ if (t->tx_buf)
++ status = mxs_spi_txrx_pio(spi, cs, (void *)t->tx_buf,
++ t->len, &first, &last, 1);
++ if (t->rx_buf)
++ status = mxs_spi_txrx_pio(spi, cs, t->rx_buf,
++ t->len, &first, &last, 0);
++
++ m->actual_length += t->len;
++ if (status)
++ break;
++
++ first = last = 0;
++ }
++
++ m->status = 0;
++ spi_finalize_current_message(master);
++
++ return status;
++}
++
++static const struct of_device_id mxs_spi_dt_ids[] = {
++ { .compatible = "fsl,imx23-spi", .data = (void *) IMX23_SSP, },
++ { .compatible = "fsl,imx28-spi", .data = (void *) IMX28_SSP, },
++ { /* sentinel */ }
++};
++MODULE_DEVICE_TABLE(of, mxs_spi_dt_ids);
++
++static int __devinit mxs_spi_probe(struct platform_device *pdev)
++{
++ const struct of_device_id *of_id =
++ of_match_device(mxs_spi_dt_ids, &pdev->dev);
++ struct device_node *np = pdev->dev.of_node;
++ struct spi_master *master;
++ struct mxs_spi *spi;
++ struct mxs_ssp *ssp;
++ struct resource *iores;
++ struct pinctrl *pinctrl;
++ struct clk *clk;
++ void __iomem *base;
++ int devid;
++ int ret = 0;
++
++ iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++ if (!iores)
++ return -EINVAL;
++
++ base = devm_request_and_ioremap(&pdev->dev, iores);
++ if (!base)
++ return -EADDRNOTAVAIL;
++
++ pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
++ if (IS_ERR(pinctrl))
++ return PTR_ERR(pinctrl);
++
++ clk = devm_clk_get(&pdev->dev, NULL);
++ if (IS_ERR(clk))
++ return PTR_ERR(clk);
++
++ if (np)
++ devid = (enum mxs_ssp_id) of_id->data;
++ else
++ devid = pdev->id_entry->driver_data;
++
++ master = spi_alloc_master(&pdev->dev, sizeof(*spi));
++ if (!master)
++ return -ENOMEM;
++
++ master->transfer_one_message = mxs_spi_transfer_one;
++ master->setup = mxs_spi_setup;
++ master->mode_bits = SPI_CPOL | SPI_CPHA;
++ master->num_chipselect = 3;
++ master->dev.of_node = np;
++ master->flags = SPI_MASTER_HALF_DUPLEX;
++
++ spi = spi_master_get_devdata(master);
++ ssp = &spi->ssp;
++ ssp->dev = &pdev->dev;
++ ssp->clk = clk;
++ ssp->base = base;
++ ssp->devid = devid;
++
++ clk_prepare_enable(ssp->clk);
++ ssp->clk_rate = clk_get_rate(ssp->clk) / 1000;
++
++ stmp_reset_block(ssp->base);
++
++ platform_set_drvdata(pdev, master);
++
++ ret = spi_register_master(master);
++ if (ret) {
++ dev_err(&pdev->dev, "Cannot register SPI master, %d\n", ret);
++ goto out_master_free;
++ }
++
++ return 0;
++
++out_master_free:
++ platform_set_drvdata(pdev, NULL);
++ clk_disable_unprepare(ssp->clk);
++ spi_master_put(master);
++ return ret;
++}
++
++static int __devexit mxs_spi_remove(struct platform_device *pdev)
++{
++ struct spi_master *master;
++ struct mxs_spi *spi;
++ struct mxs_ssp *ssp;
++
++ master = platform_get_drvdata(pdev);
++ spi = spi_master_get_devdata(master);
++ ssp = &spi->ssp;
++
++ spi_unregister_master(master);
++
++ platform_set_drvdata(pdev, NULL);
++
++ clk_disable_unprepare(ssp->clk);
++
++ spi_master_put(master);
++
++ return 0;
++}
++
++static struct platform_driver mxs_spi_driver = {
++ .probe = mxs_spi_probe,
++ .remove = __devexit_p(mxs_spi_remove),
++ .driver = {
++ .name = DRIVER_NAME,
++ .owner = THIS_MODULE,
++ .of_match_table = mxs_spi_dt_ids,
++ },
++};
++
++module_platform_driver(mxs_spi_driver);
++
++MODULE_AUTHOR("Marek Vasut <ma...@de...>");
++MODULE_DESCRIPTION("MXS SPI master driver");
++MODULE_LICENSE("GPL");
++MODULE_ALIAS("platform:mxs-spi");
+--
+1.7.10.4
+
+
+_______________________________________________
+linux-arm-kernel mailing list
+lin...@li...
+http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
+
diff --git a/patches/linux/3.5/0413-pengutronix-mx28-mmc_spi_Pull_out_common_DMA_parts_from_MXS_MMC.patch b/patches/linux/3.5/0413-pengutronix-mx28-mmc_spi_Pull_out_common_DMA_parts_from_MXS_MMC.patch
new file mode 100644
index 0000000..a8add37
--- /dev/null
+++ b/patches/linux/3.5/0413-pengutronix-mx28-mmc_spi_Pull_out_common_DMA_parts_from_MXS_MMC.patch
@@ -0,0 +1,318 @@
+
+These parts will be used by the MXS SPI driver too.
+
+Signed-off-by: Marek Vasut <ma...@de...>
+Cc: Attila Kinali <at...@ki...>
+Cc: Chris Ball <cj...@la...>
+CC: Dong Aisheng <b2...@fr...>
+Cc: Fabio Estevam <fab...@fr...>
+Cc: Grant Likely <gra...@se...>
+Cc: Linux ARM kernel <lin...@li...>
+Cc: Mark Brown <br...@op...>
+CC: Shawn Guo <sha...@li...>
+---
+ drivers/mmc/host/mxs-mmc.c | 88 +++++++++++++++++++++----------------------
+ drivers/spi/spi-mxs.c | 1 -
+ include/linux/spi/mxs-spi.h | 9 +++++
+ 3 files changed, 51 insertions(+), 47 deletions(-)
+
+diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
+index 0813340..4da9966 100644
+--- a/drivers/mmc/host/mxs-mmc.c
++++ b/drivers/mmc/host/mxs-mmc.c
+@@ -41,7 +41,6 @@
+ #include <linux/gpio.h>
+ #include <linux/regulator/consumer.h>
+ #include <linux/module.h>
+-#include <linux/fsl/mxs-dma.h>
+ #include <linux/pinctrl/consumer.h>
+ #include <linux/stmp_device.h>
+ #include <linux/mmc/mxs-mmc.h>
+@@ -69,13 +68,6 @@ struct mxs_mmc_host {
+ struct mmc_command *cmd;
+ struct mmc_data *data;
+
+- int dma_channel;
+- struct dma_chan *dmach;
+- struct mxs_dma_data dma_data;
+- unsigned int dma_dir;
+- enum dm...
[truncated message content] |
|
From: jorasse <jo...@us...> - 2012-09-20 17:26:04
|
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 a5415a08cf0de85b3ca448ac577c79b304a81ba7 (commit)
via ceb47362e3e6c2c6dc772aeee20b8114cb39cb3c (commit)
from 091d281114391be74fd0e297a119ba525b7be05b (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 a5415a08cf0de85b3ca448ac577c79b304a81ba7
Author: Eric Jarrige <eri...@ar...>
Date: Thu Sep 20 19:28:59 2012 +0200
[LINUX] apf28: 2.6.35.3: enable ADC feature on pins LRADC0 and LRADC1
commit ceb47362e3e6c2c6dc772aeee20b8114cb39cb3c
Author: Eric Jarrige <eri...@ar...>
Date: Thu Sep 20 19:24:45 2012 +0200
[LINUX] apf28: add MXS lradc hwmon driver for kernel 2.6.35
-----------------------------------------------------------------------
Summary of changes:
.../armadeus/apf28/apf28-linux-2.6.35.config | 3 +-
...1-armadeus-add_apf28dev_baseboard_support.patch | 54 ++++-
target/linux/modules/Kconfig | 2 +
target/linux/modules/Makefile | 2 +-
target/linux/modules/mxs_lradc/Kconfig | 10 +
.../modules/{imx_counter => mxs_lradc}/Makefile | 4 +-
target/linux/modules/mxs_lradc/mxs_lradc.c | 267 ++++++++++++++++++++
.../mxs_lradc/mxs_lradc.h} | 36 ++--
target/linux/modules/pwm/Kconfig | 2 +-
9 files changed, 353 insertions(+), 27 deletions(-)
create mode 100644 target/linux/modules/mxs_lradc/Kconfig
copy target/linux/modules/{imx_counter => mxs_lradc}/Makefile (82%)
create mode 100644 target/linux/modules/mxs_lradc/mxs_lradc.c
copy target/linux/{debug/imxregs/definitions.h => modules/mxs_lradc/mxs_lradc.h} (54%)
diff --git a/buildroot/target/device/armadeus/apf28/apf28-linux-2.6.35.config b/buildroot/target/device/armadeus/apf28/apf28-linux-2.6.35.config
index 173a236..74395c0 100644
--- a/buildroot/target/device/armadeus/apf28/apf28-linux-2.6.35.config
+++ b/buildroot/target/device/armadeus/apf28/apf28-linux-2.6.35.config
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.35.3
-# Mon Sep 17 00:59:29 2012
+# Thu Sep 20 19:14:34 2012
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -1869,6 +1869,7 @@ CONFIG_ARMADEUS_DRIVERS=y
#
# CONFIG_ARMADEUS_GENERIC_DRIVER is not set
# CONFIG_ARMADEUS_AS1531_PLAT is not set
+CONFIG_ARMADEUS_SENSOR_MXS_LRADC=y
# CONFIG_ARMADEUS_GPIO_DRIVER is not set
# CONFIG_ARMADEUS_KEYPAD_DRIVER is not set
# CONFIG_ARMADEUS_MAX1027 is not set
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 4010c97..3083e19 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
@@ -46,7 +46,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,1037 @@
+@@ -0,0 +1,1085 @@
+/*
+ * Copyright (C) 2012 Armadeus systems
+ *
@@ -100,6 +100,7 @@ Index: linux-2.6.35.3/arch/arm/mach-mx28/apf28dev.c
+#include "device.h"
+#include "usb.h"
+#include "../../../drivers/armadeus/pwm/mxs-pwm.h"
++#include "../../../drivers/armadeus/mxs_lradc/mxs_lradc.h"
+
+#define USB_POWER_ENABLE MXS_PIN_TO_GPIO(PINID_LCD_D23)
+
@@ -915,7 +916,7 @@ Index: linux-2.6.35.3/arch/arm/mach-mx28/apf28dev.c
+
+#if defined(CONFIG_ARMADEUS_MXS_PWM_DRIVER) || \
+ defined(CONFIG_ARMADEUS_MXS_PWM_DRIVER_MODULE)
-+static struct resource apf28_pwm_res = {
++static struct resource mx28_pwm_res = {
+ .flags = IORESOURCE_MEM,
+ .start = PWM_PHYS_ADDR,
+ .end = PWM_PHYS_ADDR + 0x2000,
@@ -924,12 +925,54 @@ Index: linux-2.6.35.3/arch/arm/mach-mx28/apf28dev.c
+static struct platform_device apf28dev_pwm_dev = {
+ .name = "mxs_pwm",
+ .id = 4,
-+ .resource = &apf28_pwm_res,
++ .resource = &mx28_pwm_res,
+ .num_resources = 1,
+};
+#endif /* defined(CONFIG_ARMADEUS_MXS_PWM_DRIVER) ||
+ defined(CONFIG_ARMADEUS_MXS_PWM_DRIVER_MODULE) */
+
++#if defined(CONFIG_ARMADEUS_SENSOR_MXS_LRADC) || \
++ defined(CONFIG_ARMADEUS_SENSOR_MXS_LRADC_MODULE)
++static struct resource mx28_lradc_res = {
++ .flags = IORESOURCE_MEM,
++ .start = LRADC_PHYS_ADDR,
++ .end = LRADC_PHYS_ADDR + 0x2000 - 1,
++};
++
++static struct mxs_lradc_info apf28dev_lradc[] = {
++ {
++ .name = "lradc0",
++ .channel = 0, /* LRADC channel */
++ .mux_pad = 0, /* LRADC muxed pad */
++ .enable_div2 = 1, /* enable for signal up to VDDIO -50mV*/
++ .samples = 7, /* oversampling factor */
++ },
++ {
++ .name = "lradc1",
++ .channel = 1, /* LRADC channel */
++ .mux_pad = 1, /* LRADC muxed pad */
++ .enable_div2 = 1, /* enable for signal up to VDDIO -50mV*/
++ .samples = 7, /* oversampling factor */
++ },
++};
++
++static struct mxs_lradc_platform_data apf28dev_lradc_data = {
++ .num_lradc = ARRAY_SIZE(apf28dev_lradc),
++ .lradc = apf28dev_lradc
++};
++
++static struct platform_device apf28dev_lradc_dev = {
++ .name = "mxs_lradc",
++ .id = 0,
++ .resource = &mx28_lradc_res,
++ .num_resources = 1,
++ .dev = {
++ .platform_data = &apf28dev_lradc_data,
++ },
++};
++#endif /* defined(CONFIG_ARMADEUS_SENSOR_MXS_LRADC) ||
++ defined(CONFIG_ARMADEUS_SENSOR_MXS_LRADC_MODULE) */
++
+static struct platform_device *apf28dev_platform_devices[] __initdata = {
+#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
+ &apf28dev_gpio_keys_device,
@@ -942,6 +985,11 @@ Index: linux-2.6.35.3/arch/arm/mach-mx28/apf28dev.c
+ &apf28dev_pwm_dev,
+
+#endif
++#if defined(CONFIG_ARMADEUS_SENSOR_MXS_LRADC) || \
++ defined(CONFIG_ARMADEUS_SENSOR_MXS_LRADC_MODULE)
++ &apf28dev_lradc_dev,
++
++#endif
+};
+
+#if defined(CONFIG_FEC2) || defined(CONFIG_FEC2_MODULE)\
diff --git a/target/linux/modules/Kconfig b/target/linux/modules/Kconfig
index 82abbe5..298ea6a 100644
--- a/target/linux/modules/Kconfig
+++ b/target/linux/modules/Kconfig
@@ -17,6 +17,8 @@ source "drivers/armadeus/generic/Kconfig"
source "drivers/armadeus/as1531_platform/Kconfig"
+source "drivers/armadeus/mxs_lradc/Kconfig"
+
source "drivers/armadeus/gpio/Kconfig"
source "drivers/armadeus/imxlkeypad/Kconfig"
diff --git a/target/linux/modules/Makefile b/target/linux/modules/Makefile
index 245ea86..f83dc54 100755
--- a/target/linux/modules/Makefile
+++ b/target/linux/modules/Makefile
@@ -9,7 +9,7 @@ ifneq ($(KERNELRELEASE),)
obj-$(CONFIG_ARMADEUS_DRIVERS) += gpio/ pwm/ backlight/ isp1761/ \
imxlkeypad/ fpga/ max1027/ max9768/ display/ as1531_platform/ \
- imx_counter/
+ mxs_lradc/ imx_counter/
else
# Part executed when called from standard make in this directory:
diff --git a/target/linux/modules/mxs_lradc/Kconfig b/target/linux/modules/mxs_lradc/Kconfig
new file mode 100644
index 0000000..b768c83
--- /dev/null
+++ b/target/linux/modules/mxs_lradc/Kconfig
@@ -0,0 +1,10 @@
+#
+#
+
+config ARMADEUS_SENSOR_MXS_LRADC
+ tristate "MXS LRADC"
+ default n
+ depends on ARMADEUS_DRIVERS && MXS_LRADC && HWMON
+ ---help---
+ Use MXS LRADC as generic hardware monitor device.
+
diff --git a/target/linux/modules/imx_counter/Makefile b/target/linux/modules/mxs_lradc/Makefile
similarity index 82%
copy from target/linux/modules/imx_counter/Makefile
copy to target/linux/modules/mxs_lradc/Makefile
index a9c0ef6..24fd8aa 100755
--- a/target/linux/modules/imx_counter/Makefile
+++ b/target/linux/modules/mxs_lradc/Makefile
@@ -1,11 +1,11 @@
#
-# Makefile for the ...
+# Makefile for the MXS LRADC module
#
# Part executed when called from kernel build system:
ifneq ($(KERNELRELEASE),)
-obj-$(CONFIG_APF27_GPT2) += gpt2_plat.o
+obj-$(CONFIG_ARMADEUS_SENSOR_MXS_LRADC) += mxs_lradc.o
# Part executed when called from standard make in this directory:
# (preferably use Makefile in parent directory)
diff --git a/target/linux/modules/mxs_lradc/mxs_lradc.c b/target/linux/modules/mxs_lradc/mxs_lradc.c
new file mode 100644
index 0000000..1e334b1
--- /dev/null
+++ b/target/linux/modules/mxs_lradc/mxs_lradc.c
@@ -0,0 +1,267 @@
+/*
+ * mxs_lradc.c - driver for the MXS LRADC module
+ *
+ * Copyright (c) 2012 Eric Jarrige <eri...@ar...>
+ *
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/device.h>
+#include <linux/err.h>
+#include <linux/sysfs.h>
+#include <linux/hwmon.h>
+#include <linux/hwmon-sysfs.h>
+#include <linux/mutex.h>
+#include <linux/platform_device.h>
+#include <linux/slab.h>
+
+#include <mach/hardware.h>
+#include <mach/lradc.h>
+#include <mach/device.h>
+#include <mach/regs-lradc.h>
+
+#include "mxs_lradc.h"
+
+#define MXS_MAX_VALUE 3700 /* mV */
+
+struct mxs_lradc {
+ struct device *hwmon_dev;
+ struct mutex lock;
+ unsigned int base;
+};
+
+static ssize_t mxs_lradc_read(struct device *dev,
+ struct device_attribute *devattr, char *buf)
+{
+ struct mxs_lradc *adc = dev_get_drvdata(dev);
+ struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+ int status = 0;
+ int ret_value;
+
+ if (mutex_lock_interruptible(&adc->lock))
+ return -ERESTARTSYS;
+
+ /* Clear the Soft Reset and Clock Gate for normal operation */
+ __raw_writel(BM_LRADC_CTRL0_SFTRST | BM_LRADC_CTRL0_CLKGATE,
+ adc->base + HW_LRADC_CTRL0_CLR);
+
+ /* Clear the accumulator & NUM_SAMPLES */
+ __raw_writel(0xFFFFFFFF,
+ adc->base + HW_LRADC_CHn_CLR(attr->index));
+
+ /* Clear the interrupt flag */
+ __raw_writel(BM_LRADC_CTRL1_LRADC0_IRQ_EN << attr->index,
+ adc->base + HW_LRADC_CTRL1_CLR);
+
+ /*
+ * Get value; this is the max scale value schedule the channel:
+ */
+ __raw_writel(BF_LRADC_CTRL0_SCHEDULE(1 << attr->index),
+ adc->base + HW_LRADC_CTRL0_SET);
+
+ /* wait for completion */
+ while ((__raw_readl(adc->base + HW_LRADC_CTRL1)
+ & (BM_LRADC_CTRL1_LRADC0_IRQ << attr->index)) !=
+ (BM_LRADC_CTRL1_LRADC0_IRQ << attr->index))
+ cpu_relax();
+
+ /* Clear the interrupt flag */
+ __raw_writel((BM_LRADC_CTRL1_LRADC0_IRQ << attr->index),
+ adc->base + HW_LRADC_CTRL1_CLR);
+
+ /* read channel value. */
+ ret_value = __raw_readl(adc->base + HW_LRADC_CHn(attr->index));
+ ret_value = (ret_value & BM_LRADC_CHn_VALUE) /
+ ((ret_value & BM_LRADC_CHn_NUM_SAMPLES) + 1);
+
+ /* Adjust scaling factor */
+ if (!(__raw_readl(adc->base + HW_LRADC_CTRL2)
+ & BF_LRADC_CTRL2_DIVIDE_BY_TWO(1 << attr->index)))
+ ret_value /= 2;
+
+ status = sprintf(buf, "%d\n", ret_value * MXS_MAX_VALUE / 4096);
+
+ mutex_unlock(&adc->lock);
+ return status;
+}
+
+static ssize_t mxs_lradc_show_min(struct device *dev,
+ struct device_attribute *devattr, char *buf)
+{
+ return sprintf(buf, "0\n");
+}
+
+static ssize_t mxs_lradc_show_max(struct device *dev,
+ struct device_attribute *devattr, char *buf)
+{
+ return sprintf(buf, "%d\n", MXS_MAX_VALUE);
+}
+
+static ssize_t mxs_lradc_show_name(struct device *dev, struct device_attribute
+ *devattr, char *buf)
+{
+ return sprintf(buf, "mxs_lradc\n");
+}
+
+static struct sensor_device_attribute mxs_lradc_attr[] = {
+ SENSOR_ATTR(name, S_IRUGO, mxs_lradc_show_name, NULL, 0),
+ SENSOR_ATTR(in_min, S_IRUGO, mxs_lradc_show_min, NULL, 0),
+ SENSOR_ATTR(in_max, S_IRUGO, mxs_lradc_show_max, NULL, 0),
+};
+
+static struct sensor_device_attribute mxs_lradc_input[] = {
+ SENSOR_ATTR(in0_input, S_IRUGO, mxs_lradc_read, NULL, 0),
+ SENSOR_ATTR(in1_input, S_IRUGO, mxs_lradc_read, NULL, 1),
+ SENSOR_ATTR(in2_input, S_IRUGO, mxs_lradc_read, NULL, 2),
+ SENSOR_ATTR(in3_input, S_IRUGO, mxs_lradc_read, NULL, 3),
+ SENSOR_ATTR(in4_input, S_IRUGO, mxs_lradc_read, NULL, 4),
+ SENSOR_ATTR(in5_input, S_IRUGO, mxs_lradc_read, NULL, 5),
+ SENSOR_ATTR(in6_input, S_IRUGO, mxs_lradc_read, NULL, 6),
+ SENSOR_ATTR(in7_input, S_IRUGO, mxs_lradc_read, NULL, 7),
+};
+/*----------------------------------------------------------------------*/
+
+static int __devinit mxs_lradc_probe(struct platform_device *pdev)
+{
+ struct mxs_lradc *adc;
+ struct resource *res;
+ struct mxs_lradc_platform_data *pdata = pdev->dev.platform_data;
+ int status;
+ int i;
+
+ adc = kzalloc(sizeof(struct mxs_lradc), GFP_KERNEL);
+ if (adc == NULL)
+ return -ENOMEM;
+
+ mutex_init(&adc->lock);
+ mutex_lock(&adc->lock);
+
+ platform_set_drvdata(pdev, adc);
+
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (!res) {
+ dev_err(&pdev->dev, "%s: couldn't get MEM resource\n", __func__);
+ status = -ENODEV;
+ goto exit_free;
+ }
+ adc->base = (unsigned int)IO_ADDRESS(res->start);
+
+ if (pdata) {
+ for (i = 0; i < pdata->num_lradc; i++) {
+ hw_lradc_use_channel(pdata->lradc[i].channel);
+ hw_lradc_configure_channel(pdata->lradc[i].channel,
+ pdata->lradc[i].enable_div2,
+ pdata->lradc[i].samples,
+ pdata->lradc[i].samples);
+ __raw_writel(0x0F << (4 * pdata->lradc[i].channel),
+ adc->base + HW_LRADC_CTRL4_CLR);
+ __raw_writel( pdata->lradc[i].mux_pad <<
+ (4 * pdata->lradc[i].channel),
+ adc->base + HW_LRADC_CTRL4_SET);
+ status = device_create_file(&pdev->dev,
+ &mxs_lradc_input[pdata->lradc[i].channel].dev_attr);
+ if (status) {
+ dev_err(&pdev->dev, "device_create_file failed.\n");
+ goto exit_free;
+ }
+ }
+ }
+
+ /* Register sysfs hooks */
+ for (i = 0; i < ARRAY_SIZE(mxs_lradc_attr); i++) {
+ status = device_create_file(&pdev->dev,
+ &mxs_lradc_attr[i].dev_attr);
+ if (status) {
+ dev_err(&pdev->dev, "device_create_file failed.\n");
+ goto exit_free;
+ }
+ }
+
+ adc->hwmon_dev = hwmon_device_register(&pdev->dev);
+ if (IS_ERR(adc->hwmon_dev)) {
+ dev_err(&pdev->dev, "hwmon_device_register failed.\n");
+ status = PTR_ERR(adc->hwmon_dev);
+ goto exit_remove;
+ }
+
+ mutex_unlock(&adc->lock);
+ return 0;
+
+exit_remove:
+ for (i--; i >= 0; i--)
+ device_remove_file(&pdev->dev, &mxs_lradc_attr[i].dev_attr);
+exit_free:
+ dev_set_drvdata(&pdev->dev, NULL);
+ mutex_unlock(&adc->lock);
+ kfree(adc);
+ return status;
+}
+
+static int __devexit mxs_lradc_remove(struct platform_device *pdev)
+{
+ struct mxs_lradc *adc = dev_get_drvdata(&pdev->dev);
+ struct mxs_lradc_platform_data *pdata = pdev->dev.platform_data;
+ int i;
+
+ mutex_lock(&adc->lock);
+ hwmon_device_unregister(adc->hwmon_dev);
+ for (i = 0; i < ARRAY_SIZE(mxs_lradc_attr); i++)
+ device_remove_file(&pdev->dev, &mxs_lradc_attr[i].dev_attr);
+
+ if (pdata) {
+ for (i = 0; i < pdata->num_lradc; i++) {
+ hw_lradc_unuse_channel(pdata->lradc[i].channel);
+ device_remove_file(&pdev->dev,
+ &mxs_lradc_input[pdata->lradc[i].channel].dev_attr);
+ }
+ }
+
+ dev_set_drvdata(&pdev->dev, NULL);
+ mutex_unlock(&adc->lock);
+ kfree(adc);
+
+ return 0;
+}
+
+static struct platform_driver mxs_lradc_driver = {
+ .probe = mxs_lradc_probe,
+ .remove = mxs_lradc_remove,
+ .driver = {
+ .name = "mxs_lradc",
+ .owner = THIS_MODULE,
+ },
+};
+
+/* Init module */
+
+static int __init init_mxs_lradc(void)
+{
+ return platform_driver_register(&mxs_lradc_driver);
+}
+
+static void __exit exit_mxs_lradc(void)
+{
+ platform_driver_unregister(&mxs_lradc_driver);
+}
+
+module_init(init_mxs_lradc);
+module_exit(exit_mxs_lradc);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Eric Jarrige <eri...@ar...>");
+MODULE_DESCRIPTION("MXC LRADC driver");
diff --git a/target/linux/debug/imxregs/definitions.h b/target/linux/modules/mxs_lradc/mxs_lradc.h
similarity index 54%
copy from target/linux/debug/imxregs/definitions.h
copy to target/linux/modules/mxs_lradc/mxs_lradc.h
index ee71db3..26f0076 100644
--- a/target/linux/debug/imxregs/definitions.h
+++ b/target/linux/modules/mxs_lradc/mxs_lradc.h
@@ -1,13 +1,8 @@
/*
- * definitions.h - imxregs common definitions
- *
- * Copyright (C) 2008 armadeus systems
- * Author: Julien Boibessot
- *
* 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; either version 2, or (at your option)
- * any later version.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -17,20 +12,23 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
*/
-typedef unsigned int u32;
+#ifndef _ADC_DEF_H_
+#define _ADC_DEF_H_
+
+/* For the leds-gpio driver */
+struct mxs_lradc_info {
+ const char *name;
+ int channel; /* LRADC channel */
+ int mux_pad; /* LRADC muxed pad */
+ int enable_div2; /* enable for signal up to VDDIO -50mV*/
+ int samples; /* oversampling factor */
+};
-struct reg_info {
- char *name;
- u32 addr;
- int shift;
- u32 mask;
- char type;
- char *desc;
+struct mxs_lradc_platform_data {
+ int num_lradc;
+ struct mxs_lradc_info *lradc;
};
-// Size of mmapping:
-#define MAP_SIZE 4096
-#define MAP_MASK ( MAP_SIZE - 1 )
+#endif /* _ADC_DEF_H_*/
diff --git a/target/linux/modules/pwm/Kconfig b/target/linux/modules/pwm/Kconfig
index 7786335..2a2d47c 100644
--- a/target/linux/modules/pwm/Kconfig
+++ b/target/linux/modules/pwm/Kconfig
@@ -10,7 +10,7 @@ config ARMADEUS_PWM_DRIVER
PWM is useful to play sound or control motors
config ARMADEUS_MXS_PWM_DRIVER
- tristate "Armadeus MXS PWM driver"
+ tristate "MXS PWM driver"
default n
depends on ARMADEUS_DRIVERS
---help---
hooks/post-receive
--
armadeus
|
|
From: Fabien M <fa...@us...> - 2012-09-20 06:58:43
|
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 091d281114391be74fd0e297a119ba525b7be05b (commit)
via 58d121dc8fdd0e50e8ce12a323d6f5947b0458b5 (commit)
from c563adbbaa563e9c67e30ce2e1309b8f971e362b (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 091d281114391be74fd0e297a119ba525b7be05b
Merge: 58d121d c563adb
Author: Fabien Marteau <fab...@ar...>
Date: Thu Sep 20 08:58:28 2012 +0200
Merge branch 'master' of ssh://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit 58d121dc8fdd0e50e8ce12a323d6f5947b0458b5
Author: Fabien Marteau <fab...@ar...>
Date: Thu Sep 20 08:57:53 2012 +0200
[kernel][fpga][virtual_component] delete useless temporarly file
-----------------------------------------------------------------------
Summary of changes:
.../fpga/virtual_components/pod_pwm/.test.c.swp | Bin 12288 -> 0 bytes
1 files changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 target/linux/modules/fpga/virtual_components/pod_pwm/.test.c.swp
diff --git a/target/linux/modules/fpga/virtual_components/pod_pwm/.test.c.swp b/target/linux/modules/fpga/virtual_components/pod_pwm/.test.c.swp
deleted file mode 100644
index d7f225b..0000000
Binary files a/target/linux/modules/fpga/virtual_components/pod_pwm/.test.c.swp and /dev/null differ
hooks/post-receive
--
armadeus
|
|
From: jorasse <jo...@us...> - 2012-09-19 15:52:12
|
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 c563adbbaa563e9c67e30ce2e1309b8f971e362b (commit)
from b092fc2509114028405cf860bcf3738725083e5e (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 c563adbbaa563e9c67e30ce2e1309b8f971e362b
Author: Eric Jarrige <eri...@ar...>
Date: Wed Sep 19 17:55:50 2012 +0200
[UBOOT] 2012.04: fix bug when programming huge files (>32MiB) to NAND
-----------------------------------------------------------------------
Summary of changes:
.../device/armadeus/apf27/apf27-u-boot-2012.04.h | 2 +-
.../device/armadeus/apf28/apf28-u-boot-2012.04.h | 2 +-
.../device/armadeus/apf51/apf51-u-boot-2012.04.h | 2 +-
.../armadeus/apf9328/apf9328-u-boot-2012.04.h | 2 +-
.../device/armadeus/pps/pps-u-boot-2012.04.h | 2 +-
.../2012.04/350-nand_large_file_download.patch | 39 ++++++++++++++------
6 files changed, 32 insertions(+), 17 deletions(-)
diff --git a/buildroot/target/device/armadeus/apf27/apf27-u-boot-2012.04.h b/buildroot/target/device/armadeus/apf27/apf27-u-boot-2012.04.h
index fe53929..315e5fc 100644
--- a/buildroot/target/device/armadeus/apf27/apf27-u-boot-2012.04.h
+++ b/buildroot/target/device/armadeus/apf27/apf27-u-boot-2012.04.h
@@ -25,7 +25,7 @@
#define CONFIG_VERSION_VARIABLE
#define CONFIG_ENV_VERSION "3.2"
-#define CONFIG_IDENT_STRING " apf27 patch 3.6"
+#define CONFIG_IDENT_STRING " apf27 patch 3.7"
#define CONFIG_BOARD_NAME apf27
/*
diff --git a/buildroot/target/device/armadeus/apf28/apf28-u-boot-2012.04.h b/buildroot/target/device/armadeus/apf28/apf28-u-boot-2012.04.h
index 0b9257a..09977ca 100644
--- a/buildroot/target/device/armadeus/apf28/apf28-u-boot-2012.04.h
+++ b/buildroot/target/device/armadeus/apf28/apf28-u-boot-2012.04.h
@@ -26,7 +26,7 @@
#define CONFIG_VERSION_VARIABLE
#define CONFIG_ENV_VERSION "1.2"
-#define CONFIG_IDENT_STRING " apf28 patch 1.5"
+#define CONFIG_IDENT_STRING " apf28 patch 1.7"
#define CONFIG_BOARD_NAME apf28
/*
diff --git a/buildroot/target/device/armadeus/apf51/apf51-u-boot-2012.04.h b/buildroot/target/device/armadeus/apf51/apf51-u-boot-2012.04.h
index 5fe195a..76442ac 100644
--- a/buildroot/target/device/armadeus/apf51/apf51-u-boot-2012.04.h
+++ b/buildroot/target/device/armadeus/apf51/apf51-u-boot-2012.04.h
@@ -25,7 +25,7 @@
#define CONFIG_VERSION_VARIABLE
#define CONFIG_ENV_VERSION "1.2"
-#define CONFIG_IDENT_STRING " apf51 patch 1.5"
+#define CONFIG_IDENT_STRING " apf51 patch 1.7"
#define CONFIG_BOARD_NAME apf51
/*
diff --git a/buildroot/target/device/armadeus/apf9328/apf9328-u-boot-2012.04.h b/buildroot/target/device/armadeus/apf9328/apf9328-u-boot-2012.04.h
index ca95091..b5efe18 100644
--- a/buildroot/target/device/armadeus/apf9328/apf9328-u-boot-2012.04.h
+++ b/buildroot/target/device/armadeus/apf9328/apf9328-u-boot-2012.04.h
@@ -24,7 +24,7 @@
#define CONFIG_VERSION_VARIABLE
#define CONFIG_ENV_VERSION "5.3"
-#define CONFIG_IDENT_STRING " apf9328 patch 5.5"
+#define CONFIG_IDENT_STRING " apf9328 patch 5.7"
#define CONFIG_BOARD_NAME apf9328
/*
diff --git a/buildroot/target/device/armadeus/pps/pps-u-boot-2012.04.h b/buildroot/target/device/armadeus/pps/pps-u-boot-2012.04.h
index d399c3a..2a6b3a5 100644
--- a/buildroot/target/device/armadeus/pps/pps-u-boot-2012.04.h
+++ b/buildroot/target/device/armadeus/pps/pps-u-boot-2012.04.h
@@ -25,7 +25,7 @@
#define CONFIG_VERSION_VARIABLE
#define CONFIG_ENV_VERSION "3.2"
-#define CONFIG_IDENT_STRING " pps patch 3.5"
+#define CONFIG_IDENT_STRING " pps patch 3.7"
#define CONFIG_BOARD_NAME pps
/*
diff --git a/patches/u-boot/2012.04/350-nand_large_file_download.patch b/patches/u-boot/2012.04/350-nand_large_file_download.patch
index 2bbf217..1f1fc09 100644
--- a/patches/u-boot/2012.04/350-nand_large_file_download.patch
+++ b/patches/u-boot/2012.04/350-nand_large_file_download.patch
@@ -88,7 +88,19 @@ index 7aa3e23..c3635c0 100644
/* Well known TFTP port # */
#define WELL_KNOWN_PORT 69
/* Millisecs to timeout for lost pkt */
-@@ -113,8 +118,10 @@ static char default_filename[DEFAULT_NAME_LEN];
+@@ -38,6 +43,11 @@
+ static ulong TftpTimeoutMSecs = TIMEOUT;
+ static int TftpTimeoutCountMax = TIMEOUT_COUNT;
+
++#if defined(CONFIG_CMD_NAND) && defined(CONFIG_SYS_DIRECT_FLASH_TFTP)
++static int temp_buf_offset = 0;
++unsigned long nand_offset = 0;
++#endif
++
+ /*
+ * These globals govern the timeout behavior when attempting a connection to a
+ * TFTP server. TftpRRQTimeoutMSecs specifies the number of milliseconds to
+@@ -113,8 +123,10 @@ static char default_filename[DEFAULT_NAM
static char tftp_filename[MAX_LEN];
#ifdef CONFIG_SYS_DIRECT_FLASH_TFTP
@@ -99,7 +111,7 @@ index 7aa3e23..c3635c0 100644
/* 512 is poor choice for ethernet, MTU is typically 1500.
* Minus eth.hdrs thats 1468. Can get 2x better throughput with
-@@ -157,12 +164,104 @@ mcast_cleanup(void)
+@@ -157,12 +169,96 @@ mcast_cleanup(void)
#endif /* CONFIG_MCAST_TFTP */
@@ -150,8 +162,6 @@ index 7aa3e23..c3635c0 100644
+static void tftp_2_nand(uchar * src, unsigned len)
+{
+ #define TFTP2NAND_BUFFER_SIZE 4096
-+ static int temp_buf_offset;
-+ static unsigned long nand_offset;
+ static u_char temp_buf[TFTP2NAND_BUFFER_SIZE];
+ size_t nand_page_size;
+ /* retrieve current nand infos */
@@ -171,12 +181,6 @@ index 7aa3e23..c3635c0 100644
+ return;
+ }
+
-+
-+ if (TftpBlock == 1) { /* reset local nand buffer */
-+ temp_buf_offset = 0;
-+ nand_offset = load_addr;
-+ }
-+
+ if (len)
+ (void)memcpy((void *)(temp_buf + temp_buf_offset), src, len);
+ temp_buf_offset += len;
@@ -204,7 +208,7 @@ index 7aa3e23..c3635c0 100644
int i, rc = 0;
for (i = 0; i < CONFIG_SYS_MAX_FLASH_BANKS; i++) {
-@@ -184,6 +283,13 @@ store_block(unsigned block, uchar *src, unsigned len)
+@@ -184,6 +280,13 @@ store_block(unsigned block, uchar *src,
}
}
else
@@ -218,7 +222,18 @@ index 7aa3e23..c3635c0 100644
#endif /* CONFIG_SYS_DIRECT_FLASH_TFTP */
{
(void)memcpy((void *)(load_addr + offset), src, len);
-@@ -295,6 +401,13 @@ static void update_block_number(void)
+@@ -206,6 +309,10 @@ static void new_transfer(void)
+ #ifdef CONFIG_CMD_TFTPPUT
+ TftpFinalBlock = 0;
+ #endif
++#if defined(CONFIG_CMD_NAND) && defined(CONFIG_SYS_DIRECT_FLASH_TFTP)
++ temp_buf_offset = 0;
++ nand_offset = load_addr;
++#endif
+ }
+
+ #ifdef CONFIG_CMD_TFTPPUT
+@@ -295,6 +402,13 @@ static void update_block_number(void)
/* The TFTP get or put is complete */
static void tftp_complete(void)
{
hooks/post-receive
--
armadeus
|
|
From: jorasse <jo...@us...> - 2012-09-19 14:01:45
|
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 b092fc2509114028405cf860bcf3738725083e5e (commit)
via 7ffbed6bd0b4e26848af5708dc824b9c9feb1637 (commit)
from 34865f3932d2ec985e5f66e91717221dc655f2db (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 b092fc2509114028405cf860bcf3738725083e5e
Merge: 7ffbed6 34865f3
Author: Eric Jarrige <eri...@ar...>
Date: Wed Sep 19 16:05:27 2012 +0200
Merge branch 'master' of ssh://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit 7ffbed6bd0b4e26848af5708dc824b9c9feb1637
Author: Eric Jarrige <eri...@ar...>
Date: Wed Sep 19 16:04:14 2012 +0200
[linux] apf27 default config for kernel 2.6.29
-----------------------------------------------------------------------
Summary of changes:
.../armadeus/apf27/apf27-linux-2.6.29.config | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/buildroot/target/device/armadeus/apf27/apf27-linux-2.6.29.config b/buildroot/target/device/armadeus/apf27/apf27-linux-2.6.29.config
index 0394033..983338f 100644
--- a/buildroot/target/device/armadeus/apf27/apf27-linux-2.6.29.config
+++ b/buildroot/target/device/armadeus/apf27/apf27-linux-2.6.29.config
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.29.6
-# Wed Jun 13 13:46:15 2012
+# Wed Sep 19 15:58:55 2012
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -1470,6 +1470,7 @@ CONFIG_ARMADEUS_FPGA_LOADER_DRIVER=m
# Handheld related
#
CONFIG_ARMADEUS_PWM_DRIVER=m
+# CONFIG_ARMADEUS_MXS_PWM_DRIVER is not set
CONFIG_IMX_BACKLIGHT=m
# CONFIG_HX5116_DISPLAY is not set
hooks/post-receive
--
armadeus
|
|
From: Fabien M <fa...@us...> - 2012-09-19 12:19:11
|
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 34865f3932d2ec985e5f66e91717221dc655f2db (commit)
from 948aef1e66036d068c1a9956000592bf4c2ca1aa (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 34865f3932d2ec985e5f66e91717221dc655f2db
Author: Fabien Marteau <fab...@ar...>
Date: Wed Sep 19 14:18:38 2012 +0200
[as_devices] fix blockingGetPinValue parameters in ms
-----------------------------------------------------------------------
Summary of changes:
target/packages/as_devices/c/as_gpio.h | 2 +-
.../packages/as_devices/python/AsDevices/AsGpio.py | 15 +++++++--------
.../packages/as_devices/python/src/AsGpio_wrap.c | 6 +++++-
3 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/target/packages/as_devices/c/as_gpio.h b/target/packages/as_devices/c/as_gpio.h
index 35e1a10..e6d251f 100644
--- a/target/packages/as_devices/c/as_gpio.h
+++ b/target/packages/as_devices/c/as_gpio.h
@@ -101,7 +101,7 @@ int32_t as_gpio_wait_event(struct as_gpio_device *aDev, int aDelay_ms);
/** @brief Set pin irq mode
*
* @param gpio_dev as_gpio_device pointer structure
- * @param mode irq mode (rising/falling/both/none)
+ * @param mode irq mode ("rising"/"falling"/"both"/"none")
*
* @return error if negative
*/
diff --git a/target/packages/as_devices/python/AsDevices/AsGpio.py b/target/packages/as_devices/python/AsDevices/AsGpio.py
index 7160f61..6b61efc 100644
--- a/target/packages/as_devices/python/AsDevices/AsGpio.py
+++ b/target/packages/as_devices/python/AsDevices/AsGpio.py
@@ -22,6 +22,10 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
+# TODO:
+# - Change name of function "blockingGetPinValue" to "WaitEvent" as named
+# under C library
+#
#-----------------------------------------------------------------------------
__doc__ = "This class drive ARMadeus board GPIO"
@@ -88,24 +92,19 @@ class AsGpio:
except Exception, e:
raise AsGpioError(str(e))
- def blockingGetPinValue(self, aDelay_s, aDelay_us=0):
+ def blockingGetPinValue(self, aDelay_ms):
""" Get pin value (blocking mode)
\param return pin value
"""
try:
return wrapper.blockingGetPinValue(self.__device,
- aDelay_s,
- aDelay_us)
+ aDelay_ms);
except Exception, e:
raise AsGpioError(str(e))
def setIrqMode(self, aMode):
""" Set irq Mode
- \param aMode.
- 1:MODE_NOINT
- 2:MODE_RISING
- 3:MODE_FALLING
- 4:MODE_BOTH
+ \param aMode. "none" "rising" "falling" "both"
"""
try:
return wrapper.setIrqMode(self.__device, aMode)
diff --git a/target/packages/as_devices/python/src/AsGpio_wrap.c b/target/packages/as_devices/python/src/AsGpio_wrap.c
index 7b594a8..1b11fe1 100644
--- a/target/packages/as_devices/python/src/AsGpio_wrap.c
+++ b/target/packages/as_devices/python/src/AsGpio_wrap.c
@@ -17,6 +17,10 @@
** You should have received a copy of the GNU Lesser General Public
** License along with this library; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+**
+** TODO:
+** - Change name of function "blockingGetPinValue" to "WaitEvent" as named
+** under C library
*/
#include "AsGpio_wrap.h"
#include "as_gpio.h"
@@ -235,7 +239,7 @@ static PyObject * blockingGetPinValue(PyObject *self, PyObject *args)
}
ret = as_gpio_wait_event(aFdev, aDelay_ms);
- if (ret == -10)
+ if (ret == -ETIMEDOUT)
{
PyErr_SetString(PyExc_IOError, "TIMEOUT");
return NULL;
hooks/post-receive
--
armadeus
|
|
From: jorasse <jo...@us...> - 2012-09-17 15:05:06
|
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 948aef1e66036d068c1a9956000592bf4c2ca1aa (commit)
from bbfee3d147e08029defab26e752a2fcc1f6a04cb (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 948aef1e66036d068c1a9956000592bf4c2ca1aa
Author: Eric Jarrige <eri...@ar...>
Date: Mon Sep 17 17:08:29 2012 +0200
[LINUX] apf27: linux 2.6.38: Apply patch 344 from kernel 2.6.29 - fix potential UART hang up on shutdown (Thx Gael)
-----------------------------------------------------------------------
Summary of changes:
.../344-armadeus-uart_hang_up.patch | 21 ++++++++++---------
1 files changed, 11 insertions(+), 10 deletions(-)
copy patches/linux/{2.6.29 => 2.6.38}/344-armadeus-uart_hang_up.patch (60%)
diff --git a/patches/linux/2.6.29/344-armadeus-uart_hang_up.patch b/patches/linux/2.6.38/344-armadeus-uart_hang_up.patch
similarity index 60%
copy from patches/linux/2.6.29/344-armadeus-uart_hang_up.patch
copy to patches/linux/2.6.38/344-armadeus-uart_hang_up.patch
index 9d1b1e9..248a134 100644
--- a/patches/linux/2.6.29/344-armadeus-uart_hang_up.patch
+++ b/patches/linux/2.6.38/344-armadeus-uart_hang_up.patch
@@ -2,25 +2,26 @@ UART receive may hang up after a shutdown while receiving data
Perform a complete uart reset instead of a simple uart disable
Signed-off-by: Nicolas Colombain <nic...@ar...>
+Signed-off-by: Eric Jarrige <eri...@ar...>
Index: linux-2.6.29/drivers/serial/imx.c
===================================================================
---- linux-2.6.29.orig/drivers/serial/imx.c 2012-02-06 10:24:51.000000000 +0100
-+++ linux-2.6.29/drivers/serial/imx.c 2012-02-06 10:25:28.000000000 +0100
-@@ -652,12 +652,12 @@ static void imx_shutdown(struct uart_por
- free_irq(sport->port.irq, sport);
-
- /*
-- * Disable all interrupts, port and break condition.
-+ * reset uart
+--- linux-2.6.38.8/drivers/tty/serial/imx.c
++++ linux-2.6.38.8/drivers/tty/serial/imx.c
+@@ -778,12 +778,10 @@ static void imx_shutdown(struct uart_por
+ * Disable all interrupts, port and break condition.
*/
- temp = readl(sport->port.membase + UCR1);
- temp &= ~(UCR1_TXMPTYEN | UCR1_RRDYEN | UCR1_RTSDEN | UCR1_UARTEN);
-- writel(temp, sport->port.membase + UCR1);
+- if (USE_IRDA(sport))
+- temp &= ~(UCR1_IREN);
+ temp = readl(sport->port.membase + UCR2);
+ temp &= ~(UCR2_SRST);
+
+- writel(temp, sport->port.membase + UCR1);
+ writel(temp, sport->port.membase + UCR2);
}
- static void imx_serial_dump_registers(struct imx_port *sport)
+ static void
+
hooks/post-receive
--
armadeus
|
|
From: jorasse <jo...@us...> - 2012-09-16 23:02:17
|
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 bbfee3d147e08029defab26e752a2fcc1f6a04cb (commit)
from cc49ce1081ffa1f8c82b69ee52280ff628db42e1 (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 bbfee3d147e08029defab26e752a2fcc1f6a04cb
Author: Eric Jarrige <eri...@ar...>
Date: Mon Sep 17 01:05:57 2012 +0200
[LINUX] apf28: enable PWM 4 on connector J10 pin 26
-----------------------------------------------------------------------
Summary of changes:
.../armadeus/apf28/apf28-linux-2.6.35.config | 39 +++++++++++++++++++-
...1-armadeus-add_apf28dev_baseboard_support.patch | 35 +++++++++++++++++-
2 files changed, 71 insertions(+), 3 deletions(-)
diff --git a/buildroot/target/device/armadeus/apf28/apf28-linux-2.6.35.config b/buildroot/target/device/armadeus/apf28/apf28-linux-2.6.35.config
index 612ffa8..173a236 100644
--- a/buildroot/target/device/armadeus/apf28/apf28-linux-2.6.35.config
+++ b/buildroot/target/device/armadeus/apf28/apf28-linux-2.6.35.config
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.35.3
-# Tue Sep 11 18:40:49 2012
+# Mon Sep 17 00:59:29 2012
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -1858,6 +1858,43 @@ CONFIG_USB_OTG_UTILS=y
# CONFIG_USB_ULPI is not set
# CONFIG_NOP_USB_XCEIV is not set
CONFIG_MXC_OTG=y
+
+#
+# Armadeus specific drivers
+#
+CONFIG_ARMADEUS_DRIVERS=y
+
+#
+# Misc.
+#
+# CONFIG_ARMADEUS_GENERIC_DRIVER is not set
+# CONFIG_ARMADEUS_AS1531_PLAT is not set
+# CONFIG_ARMADEUS_GPIO_DRIVER is not set
+# CONFIG_ARMADEUS_KEYPAD_DRIVER is not set
+# CONFIG_ARMADEUS_MAX1027 is not set
+# CONFIG_ARMADEUS_MAX9768 is not set
+
+#
+# FPGA related
+#
+
+#
+# FPGA Drivers
+#
+# CONFIG_ARMADEUS_FPGA_DRIVERS is not set
+
+#
+# Handheld related
+#
+# CONFIG_ARMADEUS_PWM_DRIVER is not set
+CONFIG_ARMADEUS_MXS_PWM_DRIVER=y
+# CONFIG_IMX_BACKLIGHT is not set
+# CONFIG_HX5116_DISPLAY is not set
+
+#
+# Communication bus related
+#
+# CONFIG_ARMADEUS_ISP1761 is not set
CONFIG_MMC=y
# CONFIG_MMC_DEBUG is not set
# CONFIG_MMC_UNSAFE_RESUME is not set
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 c5c9cd0..4010c97 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
@@ -46,7 +46,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,1006 @@
+@@ -0,0 +1,1037 @@
+/*
+ * Copyright (C) 2012 Armadeus systems
+ *
@@ -99,6 +99,7 @@ Index: linux-2.6.35.3/arch/arm/mach-mx28/apf28dev.c
+#include "mx28_pins.h"
+#include "device.h"
+#include "usb.h"
++#include "../../../drivers/armadeus/pwm/mxs-pwm.h"
+
+#define USB_POWER_ENABLE MXS_PIN_TO_GPIO(PINID_LCD_D23)
+
@@ -770,6 +771,14 @@ Index: linux-2.6.35.3/arch/arm/mach-mx28/apf28dev.c
+ .drive = 1,
+ },
+#endif
++ {
++ .name = "PWM4",
++ .id = PINID_PWM4,
++ .fun = PIN_FUN1,
++ .strength = PAD_8MA,
++ .voltage = PAD_3_3V,
++ .drive = 1,
++ },
+};
+
+extern unsigned int vbus5v_gpio;
@@ -904,12 +913,34 @@ Index: linux-2.6.35.3/arch/arm/mach-mx28/apf28dev.c
+};
+#endif /* CONFIG_LEDS_GPIO */
+
++#if defined(CONFIG_ARMADEUS_MXS_PWM_DRIVER) || \
++ defined(CONFIG_ARMADEUS_MXS_PWM_DRIVER_MODULE)
++static struct resource apf28_pwm_res = {
++ .flags = IORESOURCE_MEM,
++ .start = PWM_PHYS_ADDR,
++ .end = PWM_PHYS_ADDR + 0x2000,
++};
++
++static struct platform_device apf28dev_pwm_dev = {
++ .name = "mxs_pwm",
++ .id = 4,
++ .resource = &apf28_pwm_res,
++ .num_resources = 1,
++};
++#endif /* defined(CONFIG_ARMADEUS_MXS_PWM_DRIVER) ||
++ defined(CONFIG_ARMADEUS_MXS_PWM_DRIVER_MODULE) */
++
+static struct platform_device *apf28dev_platform_devices[] __initdata = {
+#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
+ &apf28dev_gpio_keys_device,
+#endif
+#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
-+ &apf28dev_led_dev
++ &apf28dev_led_dev,
++#endif
++#if defined(CONFIG_ARMADEUS_MXS_PWM_DRIVER) || \
++ defined(CONFIG_ARMADEUS_MXS_PWM_DRIVER_MODULE)
++ &apf28dev_pwm_dev,
++
+#endif
+};
+
hooks/post-receive
--
armadeus
|
|
From: jorasse <jo...@us...> - 2012-09-16 22:43:02
|
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 cc49ce1081ffa1f8c82b69ee52280ff628db42e1 (commit)
from a0993efc4bb50fa545f4bd2b3cedd228f90628be (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 cc49ce1081ffa1f8c82b69ee52280ff628db42e1
Author: Eric Jarrige <eri...@ar...>
Date: Mon Sep 17 00:47:00 2012 +0200
[LINUX] apf28: add armadeus custom drivers
-----------------------------------------------------------------------
Summary of changes:
...50-armadeus-add_custom_drivers_to_kconfig.patch | 0
..._star_completion_for_source_in_menuconfig.patch | 0
2 files changed, 0 insertions(+), 0 deletions(-)
copy patches/linux/{2.6.38 => 2.6.35}/050-armadeus-add_custom_drivers_to_kconfig.patch (100%)
copy patches/linux/{2.6.29 => 2.6.35}/441-armadeus-adding_star_completion_for_source_in_menuconfig.patch (100%)
diff --git a/patches/linux/2.6.38/050-armadeus-add_custom_drivers_to_kconfig.patch b/patches/linux/2.6.35/050-armadeus-add_custom_drivers_to_kconfig.patch
similarity index 100%
copy from patches/linux/2.6.38/050-armadeus-add_custom_drivers_to_kconfig.patch
copy to patches/linux/2.6.35/050-armadeus-add_custom_drivers_to_kconfig.patch
diff --git a/patches/linux/2.6.29/441-armadeus-adding_star_completion_for_source_in_menuconfig.patch b/patches/linux/2.6.35/441-armadeus-adding_star_completion_for_source_in_menuconfig.patch
similarity index 100%
copy from patches/linux/2.6.29/441-armadeus-adding_star_completion_for_source_in_menuconfig.patch
copy to patches/linux/2.6.35/441-armadeus-adding_star_completion_for_source_in_menuconfig.patch
hooks/post-receive
--
armadeus
|
|
From: jorasse <jo...@us...> - 2012-09-16 22:20:26
|
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 a0993efc4bb50fa545f4bd2b3cedd228f90628be (commit)
from 68ade2d571454c680f3a769bbc56044e11144b43 (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 a0993efc4bb50fa545f4bd2b3cedd228f90628be
Author: Eric Jarrige <eri...@ar...>
Date: Mon Sep 17 00:24:11 2012 +0200
[LINUX] apf28: add mx28 pwm driver
-----------------------------------------------------------------------
Summary of changes:
target/linux/modules/pwm/Kconfig | 7 +
target/linux/modules/pwm/Makefile | 1 +
target/linux/modules/pwm/mxs-pwm.c | 589 +++++++++++++++++++++++++
target/linux/modules/pwm/{pwm.h => mxs-pwm.h} | 5 -
4 files changed, 597 insertions(+), 5 deletions(-)
create mode 100644 target/linux/modules/pwm/mxs-pwm.c
copy target/linux/modules/pwm/{pwm.h => mxs-pwm.h} (94%)
diff --git a/target/linux/modules/pwm/Kconfig b/target/linux/modules/pwm/Kconfig
index 24d4b92..7786335 100644
--- a/target/linux/modules/pwm/Kconfig
+++ b/target/linux/modules/pwm/Kconfig
@@ -9,3 +9,10 @@ config ARMADEUS_PWM_DRIVER
This driver allows you to control the PWM controller in the i.MXl.
PWM is useful to play sound or control motors
+config ARMADEUS_MXS_PWM_DRIVER
+ tristate "Armadeus MXS PWM driver"
+ default n
+ depends on ARMADEUS_DRIVERS
+ ---help---
+ This driver allows you to control the MXS PWM controller.
+
diff --git a/target/linux/modules/pwm/Makefile b/target/linux/modules/pwm/Makefile
index 61cba80..266e39f 100755
--- a/target/linux/modules/pwm/Makefile
+++ b/target/linux/modules/pwm/Makefile
@@ -7,6 +7,7 @@ ifneq ($(KERNELRELEASE),)
obj-$(CONFIG_ARMADEUS_PWM_DRIVER) += imx-pwm.o
imx-pwm-objs := pwm.o
+obj-$(CONFIG_ARMADEUS_MXS_PWM_DRIVER) += mxs-pwm.o
# Part executed when called from standard make in this directory:
# (preferably use Makefile in parent directory)
diff --git a/target/linux/modules/pwm/mxs-pwm.c b/target/linux/modules/pwm/mxs-pwm.c
new file mode 100644
index 0000000..d705769
--- /dev/null
+++ b/target/linux/modules/pwm/mxs-pwm.c
@@ -0,0 +1,589 @@
+/*
+ * MXS PWM driver
+ *
+ * Copyright (C) 2012 Eric Jarrige <eri...@ar...>
+ *
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#include <linux/module.h>
+#include <linux/version.h>
+#include <linux/fs.h>
+#include <linux/delay.h>
+#include <asm/uaccess.h> /* get_user, copy_to_user */
+#include <linux/miscdevice.h>
+#include <linux/timer.h>
+#include <linux/types.h>
+#include <linux/fcntl.h>
+#include <linux/interrupt.h>
+#include <asm/io.h>
+#include <mach/hardware.h>
+#include <mach/system.h>
+#include <mach/device.h>
+#include <mach/regs-pwm.h>
+#include <linux/errno.h>
+#include <linux/wait.h>
+#include <linux/pm.h>
+#include <linux/clk.h>
+#include <linux/sysdev.h>
+#include <linux/device.h> /* struct class */
+#include <linux/circ_buf.h>
+#include <linux/platform_device.h>
+
+#include <linux/slab.h>
+#include <linux/sched.h>
+
+#include "mxs-pwm.h"
+
+#define PWM_MIN_FREQUENCY 1 /* Hz */
+#define PWM_MAX_FREQUENCY 12000000 /* Hz */
+
+
+#define DRIVER_NAME "mxs_pwm"
+
+#define DRIVER_VERSION "1.00"
+
+
+struct pwm_device {
+ void __iomem *membase;
+ unsigned int id;
+ int active;
+ unsigned int duty; /* current duty cycle in % x 10 */
+ unsigned int frequency; /* current frequency in Hz */
+ unsigned int period_reg; /* value to put in PWMPR register to have requested freq */
+
+ struct clk *clk;
+
+ struct device *dev;
+};
+
+int gMajor = 0;
+static struct pwm_device *dev_table[CONFIG_MXS_PWM_CHANNELS];
+static const int div_shift[8] = {0, 1, 2, 3, 4, 6, 8, 10};
+static struct class *pwm_class; /* forward declaration only */
+
+static void inline unregister_sys_file(struct pwm_device *pwm);
+
+
+static int get_current_pwm_clk_rate(struct pwm_device *pwm)
+{
+ return clk_get_rate(pwm->clk);
+}
+
+/* result in Hz */
+static long get_pwm_min_freq(struct pwm_device *pwm)
+{
+ return PWM_MIN_FREQUENCY;
+}
+
+/* result in Hz */
+static long get_pwm_max_freq(struct pwm_device *pwm)
+{
+ return PWM_MAX_FREQUENCY;
+}
+
+/* freq in Hz */
+static void compute_pwm_params(u32 req_freq, struct pwm_device *pwm)
+{
+ unsigned int input_freq, cycles, cdiv = 0;
+
+ input_freq = get_current_pwm_clk_rate(pwm);
+ pr_debug("input freq, %d %d\n", input_freq, req_freq);
+
+ while (1) {
+ cycles = input_freq >> div_shift[cdiv];
+ cycles = cycles / req_freq;
+ if (cycles < 0x10000)
+ break;
+ cdiv++;
+
+ if (cdiv > 7)
+ return;
+ }
+
+ pr_debug("config period_cycles: %d clock divider: %d\n",
+ cycles, cdiv);
+
+ pwm->period_reg = BF_PWM_PERIODn_PERIOD(cycles-1) |
+ BF_PWM_PERIODn_ACTIVE_STATE(BV_PWM_PERIODn_ACTIVE_STATE__1) |
+ BF_PWM_PERIODn_INACTIVE_STATE(BV_PWM_PERIODn_INACTIVE_STATE__0) |
+ BF_PWM_PERIODn_CDIV(cdiv);
+ pwm->frequency = (input_freq >> div_shift[cdiv]) / cycles;
+
+ pr_debug("period reg: %x freq: %d\n", pwm->period_reg, pwm->frequency);
+}
+
+static void setup_pwm_params(struct pwm_device *pwm)
+{
+ u32 temp = ((pwm->period_reg & BM_PWM_PERIODn_PERIOD)+1)* pwm->duty;
+
+ /* Setup duty cycle */
+ writel(((temp<1000)?1:temp/1000) << 16,
+ pwm->membase + HW_PWM_ACTIVEn(pwm->id));
+ writel(pwm->period_reg, pwm->membase + HW_PWM_PERIODn(pwm->id));
+}
+
+
+/* common setup function whenever something was changed */
+static void setup_pwm_unit(struct pwm_device *pwm)
+{
+ if (pwm->active) {
+ /* Activate PWM */
+ setup_pwm_params(pwm);
+ writel(1 << pwm->id, pwm->membase + HW_PWM_CTRL_SET);
+ } else {
+ /* De-activate after one period cycle */
+ writel(1 << pwm->id, pwm->membase + HW_PWM_CTRL_CLR);
+ }
+}
+
+
+static void stop_pwm(struct pwm_device *pwm)
+{
+ /* De-activate after one period cycle */
+ writel(1 << pwm->id, pwm->membase + HW_PWM_CTRL_CLR);
+ pwm->active = 0;
+ pr_debug("data completed.\n");
+ pr_debug("PWMC = 0x%8x\n", readl(pwm->membase + HW_PWM_CTRL));
+}
+
+static int init_pwm(struct pwm_device *pwm)
+{
+ writel((1 << pwm->id) | BM_PWM_CTRL_SFTRST | BM_PWM_CTRL_CLKGATE,
+ pwm->membase + HW_PWM_CTRL_CLR);
+ pwm->active = 0;
+ return 1;
+}
+
+
+/* /DEV INTERFACE */
+
+int pwm_release(struct inode * inode, struct file * filp)
+{
+ struct pwm_device *pwm = dev_table[iminor(inode)];
+
+ stop_pwm(pwm);
+
+ return 0;
+}
+
+int pwm_open(struct inode * inode, struct file * filp)
+{
+ struct pwm_device *pwm = dev_table[iminor(inode)];
+
+ /* Init PWM hardware */
+ init_pwm(pwm);
+
+ pr_debug(DRIVER_NAME " opened \n");
+
+ return 0;
+}
+
+long pwm_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
+{
+ int ret = 0;
+ struct pwm_device *pwm = dev_table[iminor(filp->f_dentry->d_inode)];
+
+ switch (cmd) {
+ /* Set PWM Mode (Tone or Playback) */
+ case PWM_IOC_SMODE:
+ printk(DRIVER_NAME ": PWM_IOC_SMODE unkown IOCTL\n");
+ break;
+
+ /* Set Playback frequency/ouput rate */
+ case PWM_IOC_SFREQ:
+ {
+ compute_pwm_params(arg, pwm);
+ setup_pwm_params(pwm);
+ pr_debug("Sample rate = %d\n", pwm->frequency);
+ pr_debug("ioctl: PWMC = 0x%8x\n", readl(pwm->membase+HW_PWM_CTRL));
+ }
+ break;
+
+ /* Set samples length (8 or 16 bits) */
+ case PWM_IOC_SDATALEN:
+ printk(DRIVER_NAME ": PWM_IOC_SDATALEN unkown IOCTL\n");
+ break;
+
+ case PWM_IOC_SSAMPLE:
+ pwm->duty = arg;
+ setup_pwm_params(pwm);
+ break;
+
+ case PWM_IOC_SPERIOD:
+ printk(DRIVER_NAME ": PWM_IOC_SPERIOD unkown IOCTL\n");
+ break;
+
+ case PWM_IOC_STOP:
+ stop_pwm(pwm);
+ break;
+
+ case PWM_IOC_SWAPDATA:
+ printk(DRIVER_NAME ": PWM_IOC_SWAPDATA unkown IOCTL\n");
+ break;
+
+ default:
+ printk(DRIVER_NAME ": unkown IOCTL\n");
+ break;
+ }
+
+ return ret;
+}
+
+
+struct file_operations pwm_fops = {
+ open: pwm_open,
+ release: pwm_release,
+ unlocked_ioctl: pwm_ioctl,
+};
+
+/* END OF /DEV INTERFACE */
+
+
+/* /sys interface: */
+
+static ssize_t pwm_show_duty(struct device *dev, struct device_attribute *attr, char *buf)
+{
+ ssize_t ret_size = 0;
+ struct pwm_device *pwm = dev_get_drvdata(dev);
+
+ ret_size = sprintf(buf, "%u\n", pwm->duty);
+
+ return ret_size;
+}
+
+/*
+ * Duty value can be 0 ... 1000. Without floating point you can take
+ * one position after decimal point into account. The internal counters
+ * supports 10 bit resolution, so it makes sense to support such a thing
+ * like 66.6% or 33.3% (given as 666 and 333 values)
+ */
+static ssize_t pwm_store_duty(struct device *dev, struct device_attribute *attr, const char *buf, size_t size)
+{
+ long value;
+ struct pwm_device *pwm = dev_get_drvdata(dev);
+
+ value = simple_strtol(buf, NULL, 10);
+ if ((value < 1) || (value > 999))
+ return -EIO;
+
+ pwm->duty = (unsigned)value;
+ setup_pwm_unit(pwm);
+
+ return size;
+}
+
+static ssize_t pwm_show_period(struct device *dev, struct device_attribute *attr, char *buf)
+{
+ ssize_t ret_size = 0;
+ struct pwm_device *pwm = dev_get_drvdata(dev);
+
+ if (pwm->frequency)
+ ret_size = sprintf(buf, "%d\n", (u32) 1000000/(pwm->frequency));
+ else
+ ret_size = sprintf(buf, "0\n");
+
+ return ret_size;
+}
+
+static ssize_t pwm_store_period(struct device *dev, struct device_attribute *attr, const char *buf, size_t size)
+{
+ long value;
+ struct pwm_device *pwm = dev_get_drvdata(dev);
+
+ value = simple_strtol(buf, NULL, 10); /* in us */
+ if ((value < (1000000/get_pwm_max_freq(pwm))) || (value > (1000000/get_pwm_min_freq(pwm))))
+ return -EIO;
+
+ compute_pwm_params(1000000/value, pwm);
+ setup_pwm_unit(pwm);
+
+ return size;
+}
+
+static ssize_t pwm_show_frequency(struct device *dev, struct device_attribute *attr, char *buf)
+{
+ ssize_t ret_size = 0;
+ struct pwm_device *pwm = dev_get_drvdata(dev);
+
+ ret_size = sprintf(buf, "%d\n", pwm->frequency);
+
+ return ret_size;
+}
+
+/*
+ * Given value (in Hertz) should be between 2 and 100k
+ */
+
+static ssize_t pwm_store_frequency(struct device *dev, struct device_attribute *attr, const char *buf, size_t size)
+{
+ long value;
+
+ struct pwm_device *pwm = dev_get_drvdata(dev);
+
+ value = simple_strtol(buf, NULL, 10);
+ if ((value < get_pwm_min_freq(pwm)) || (value > get_pwm_max_freq(pwm)))
+ return -EIO;
+
+ compute_pwm_params(value, pwm);
+ setup_pwm_unit(pwm);
+
+ return size;
+}
+
+static ssize_t pwm_show_state(struct device *dev, struct device_attribute *attr, char *buf)
+{
+ ssize_t ret_size = 0;
+ struct pwm_device *pwm = dev_get_drvdata(dev);
+
+ ret_size = sprintf(buf, "%d\n", pwm->active);
+
+ return ret_size;
+}
+
+static ssize_t pwm_store_state(struct device *dev, struct device_attribute *attr, const char *buf, size_t size)
+{
+ long value;
+ struct pwm_device *pwm = dev_get_drvdata(dev);
+
+ value = simple_strtol(buf, NULL, 10);
+ if (value != 0)
+ pwm->active = 1;
+ else
+ pwm->active = 0;
+
+ setup_pwm_unit(pwm);
+
+ return size;
+}
+
+/* dev_attr_duty /class/pwm/pwmX/duty */
+static DEVICE_ATTR(duty, S_IWUSR | S_IRUGO, pwm_show_duty, pwm_store_duty);
+/* dev_attr_period /sys/class/pwm/pwmX/period */
+static DEVICE_ATTR(period, S_IWUSR | S_IRUGO, pwm_show_period, pwm_store_period);
+/* dev_attr_frequency /sys/class/pwm/pwmX/frequency */
+static DEVICE_ATTR(frequency, S_IWUSR | S_IRUGO, pwm_show_frequency, pwm_store_frequency);
+/* dev_attr_active /sys/class/pwm/pwmX/active */
+static DEVICE_ATTR(active, S_IWUSR | S_IRUGO, pwm_show_state, pwm_store_state);
+
+
+
+static int imx_pwm_drv_probe(struct platform_device *pdev)
+{
+ int err = -ENODEV;
+ struct resource *res;
+ struct pwm_device *pwm;
+
+ if (pdev->id >= CONFIG_MXS_PWM_CHANNELS)
+ dev_err(&pdev->dev, "failed. Unknown module. Remember that this device only supports %d PWM\n", CONFIG_MXS_PWM_CHANNELS);
+
+ if (dev_table[pdev->id] != NULL) {
+ dev_err(&pdev->dev, "already in use\n");
+ return -ENODEV;
+ }
+
+
+ pwm = kmalloc(sizeof(struct pwm_device), GFP_KERNEL);
+ if (!pwm) {
+ return -ENOMEM;
+ }
+
+ pwm->active = 0;
+ pwm->duty = 500; /* = 50.O% */
+ pwm->frequency = 1000;
+ pwm->id = pdev->id;
+ platform_set_drvdata(pdev, pwm);
+ dev_table[pdev->id] = pwm;
+
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (!res) {
+ dev_err(&pdev->dev, "unable to get mem ressource\n");
+ err = -ENOENT;
+ goto error_malloc;
+ }
+
+ pwm->membase = (void __iomem *)IO_ADDRESS(res->start);
+ if (!pwm->membase) {
+ err = -ENOMEM;
+ goto error_memreg;
+ }
+
+ /* Register our char device */
+ err = register_chrdev(gMajor, DRIVER_NAME, &pwm_fops);
+ if (err < 0) {
+ dev_err(&pdev->dev, "unable to register char driver\n");
+ goto error_iounmap;
+ }
+ /* Dynamic Major allocation */
+ if (gMajor == 0) {
+ gMajor = err;
+ dev_dbg(&pdev->dev, "major = %d\n", gMajor);
+ }
+
+ /* Create /dev */
+ pwm->dev = device_create(pwm_class, NULL, MKDEV(gMajor, pdev->id), NULL, "pwm%i", pdev->id);
+ if (IS_ERR(pwm->dev)) {
+ err = PTR_ERR(pwm->dev);
+ dev_err(&pdev->dev, "can't create device\n");
+ goto error_platform_init;
+ }
+ dev_set_drvdata(pwm->dev, pwm);
+
+ pwm->clk = clk_get(&pdev->dev, "pwm");
+
+ if (IS_ERR(pwm->clk)) {
+ dev_err(&pdev->dev, "can't get clock\n");
+ goto error_platform_init;
+ }
+ clk_enable(pwm->clk);
+
+ /* init PWM hardware module */
+ init_pwm(pwm);
+ compute_pwm_params(pwm->frequency, pwm);
+ setup_pwm_unit(pwm);
+
+ /* Register the attributes */
+ err = device_create_file(pwm->dev, &dev_attr_duty);
+ if (unlikely(err))
+ goto error_dev_create;
+ err |= device_create_file(pwm->dev, &dev_attr_period);
+ if (unlikely(err)) {
+ dev_err(&pdev->dev, "can't create /sys/.../period\n");
+ goto error_file;
+ }
+ err |= device_create_file(pwm->dev, &dev_attr_frequency);
+ if (unlikely(err)) {
+ dev_err(&pdev->dev, "can't create /sys/.../frequency\n");
+ goto error_file;
+ }
+ err |= device_create_file(pwm->dev, &dev_attr_active);
+ if (unlikely(err)) {
+ dev_err(&pdev->dev, "can't create /sys/.../active\n");
+ goto error_file;
+ }
+
+ dev_info(&pdev->dev, "initialized\n");
+ return 0;
+
+error_file:
+ unregister_sys_file(pwm);
+error_dev_create:
+ device_destroy(pwm_class, MKDEV(gMajor, pdev->id));
+error_platform_init:
+ unregister_chrdev(gMajor, DRIVER_NAME);
+error_iounmap:
+ iounmap(pwm->membase);
+error_memreg:
+ release_mem_region(res->start, resource_size(res));
+error_malloc:
+ kfree(pwm);
+
+ return err;
+}
+
+static inline void unregister_sys_file(struct pwm_device *pwm)
+{
+ /* Unregister /sys attributes */
+ device_remove_file(pwm->dev, &dev_attr_active);
+ device_remove_file(pwm->dev, &dev_attr_period);
+ device_remove_file(pwm->dev, &dev_attr_frequency);
+ device_remove_file(pwm->dev, &dev_attr_duty);
+}
+
+static int imx_pwm_drv_remove(struct platform_device *pdev)
+{
+ struct resource *res;
+ struct pwm_device *pwm = (struct pwm_device*)(dev_get_drvdata(&pdev->dev));
+
+ unregister_sys_file(pwm);
+ device_destroy(pwm_class, MKDEV(gMajor, pdev->id));
+ unregister_chrdev(gMajor, DRIVER_NAME);
+
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ release_mem_region(res->start, res->end - res->start + 1);
+ kfree(pwm);
+ dev_table[pdev->id] = NULL;
+
+ return 0;
+}
+
+#ifdef CONFIG_PM
+static int imx_pwm_drv_suspend(struct platform_device *pdev, pm_message_t state)
+{
+ struct pwm_device *pwm = (struct pwm_device*)(dev_get_drvdata(&pdev->dev));
+
+ clk_disable(pwm->clk);
+ dev_dbg(&pdev->dev, "suspended\n");
+
+ return 0;
+}
+
+static int imx_pwm_drv_resume(struct platform_device *pdev)
+{
+ struct pwm_device *pwm = (struct pwm_device*)(dev_get_drvdata(&pdev->dev));
+
+ clk_enable(pwm->clk);
+ dev_dbg(&pdev->dev, "resumed\n");
+
+ return 0;
+}
+#else
+
+# define imx_pwm_drv_suspend NULL
+# define imx_pwm_drv_resume NULL
+
+#endif /* CONFIG_PM */
+
+static struct platform_driver imx_pwm_driver = {
+ .probe = imx_pwm_drv_probe,
+ .remove = imx_pwm_drv_remove,
+ .suspend = imx_pwm_drv_suspend,
+ .resume = imx_pwm_drv_resume,
+ .driver = {
+ .name = DRIVER_NAME,
+ },
+};
+
+static int __init imx_pwm_init(void)
+{
+ printk("i.MX PWM driver v" DRIVER_VERSION "\n");
+
+ pwm_class = class_create(THIS_MODULE, "pwm");
+ if (IS_ERR(pwm_class)) {
+ return PTR_ERR(pwm_class);
+ }
+
+ return platform_driver_register(&imx_pwm_driver);
+}
+
+static void __exit imx_pwm_exit(void)
+{
+ int i;
+
+ platform_driver_unregister(&imx_pwm_driver);
+ class_destroy(pwm_class);
+ for (i=0; i<CONFIG_MXS_PWM_CHANNELS; i++)
+ dev_table[i] = NULL;
+
+ printk(DRIVER_NAME " successfully unloaded\n");
+}
+
+module_init(imx_pwm_init);
+module_exit(imx_pwm_exit);
+MODULE_AUTHOR("Eric Jarrige, inspired by armadeus PWM driver");
+MODULE_DESCRIPTION("MXS PWM driver");
+MODULE_LICENSE("GPL");
+
diff --git a/target/linux/modules/pwm/pwm.h b/target/linux/modules/pwm/mxs-pwm.h
similarity index 94%
copy from target/linux/modules/pwm/pwm.h
copy to target/linux/modules/pwm/mxs-pwm.h
index dbd3e6e..2504a1c 100644
--- a/target/linux/modules/pwm/pwm.h
+++ b/target/linux/modules/pwm/mxs-pwm.h
@@ -44,9 +44,4 @@
#define PWM_PLAY_MODE 1
#define PWM_TONE_MODE 2
-struct imx_pwm_platform_data {
- int (*init)(void);
- int (*exit)(void);
-};
-
#endif /* _PWM_DEF_H_*/
hooks/post-receive
--
armadeus
|
|
From: jorasse <jo...@us...> - 2012-09-14 07:18:47
|
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 68ade2d571454c680f3a769bbc56044e11144b43 (commit)
from 9241ec594bd47eef3a89434874d776dddfd80348 (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 68ade2d571454c680f3a769bbc56044e11144b43
Author: Eric Jarrige <eri...@ar...>
Date: Fri Sep 14 09:21:57 2012 +0200
[LINUX] apf28: Fix mx28 16 bits video modes (blue pingouin issue)
-----------------------------------------------------------------------
Summary of changes:
.../459-armadeus-mx28_fix_16bits_video.patch | 38 ++++++++++++++++++++
1 files changed, 38 insertions(+), 0 deletions(-)
create mode 100644 patches/linux/2.6.35/459-armadeus-mx28_fix_16bits_video.patch
diff --git a/patches/linux/2.6.35/459-armadeus-mx28_fix_16bits_video.patch b/patches/linux/2.6.35/459-armadeus-mx28_fix_16bits_video.patch
new file mode 100644
index 0000000..da428d4
--- /dev/null
+++ b/patches/linux/2.6.35/459-armadeus-mx28_fix_16bits_video.patch
@@ -0,0 +1,38 @@
+Fix mx28 16 bits video modes of freescale mxs framebuffer driver
+
+Signed-off-by: Eric Jarrige <eri...@ar...>
+
+Index: linux-2.6.35.3/drivers/video/mxs/mxsfb.c
+===================================================================
+--- linux-2.6.35.3/drivers/video/mxs/mxsfb.c
++++ linux-2.6.35.3/drivers/video/mxs/mxsfb.c
+@@ -466,21 +466,21 @@ static int mxsfb_check_var(struct fb_var
+ if (var->bits_per_pixel == 16) {
+ /* RGBA 5551 */
+ if (var->transp.length) {
+- var->red.offset = 0;
+- var->red.length = 5;
++ var->blue.offset = 0;
++ var->blue.length = 5;
+ var->green.offset = 5;
+ var->green.length = 5;
+- var->blue.offset = 10;
+- var->blue.length = 5;
++ var->red.offset = 10;
++ var->red.length = 5;
+ var->transp.offset = 15;
+ var->transp.length = 1;
+ } else { /* RGB 565 */
+- var->red.offset = 0;
+- var->red.length = 5;
++ var->blue.offset = 0;
++ var->blue.length = 5;
+ var->green.offset = 5;
+ var->green.length = 6;
+- var->blue.offset = 11;
+- var->blue.length = 5;
++ var->red.offset = 11;
++ var->red.length = 5;
+ var->transp.offset = 0;
+ var->transp.length = 0;
+ }
hooks/post-receive
--
armadeus
|
|
From: jorasse <jo...@us...> - 2012-09-12 14:43:30
|
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 9241ec594bd47eef3a89434874d776dddfd80348 (commit)
from 99d493523977febb00ea7d7f0e9c942eb17b4c2d (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 9241ec594bd47eef3a89434874d776dddfd80348
Author: Eric Jarrige <eri...@ar...>
Date: Wed Sep 12 16:47:41 2012 +0200
[LINUX] APF28: Support kernel 2.6.35 USB OTG
-----------------------------------------------------------------------
Summary of changes:
...1-armadeus-add_apf28dev_baseboard_support.patch | 117 ++++++++++++++++-
.../452-armadeus-mxs-fixes_USB_freescale_bsp.patch | 141 +++++++++++---------
2 files changed, 192 insertions(+), 66 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 fced9a8..c5c9cd0 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
@@ -1,6 +1,7 @@
Add APF28Dev support to Freescale's 2.6.35 BSP.
Signed-off-by: Julien Boibessot <jul...@ar...>
+Signed-off-by: Eric Jarrige <eri...@ar...>
Index: linux-2.6.35.3/arch/arm/mach-mx28/Kconfig
===================================================================
@@ -45,7 +46,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,898 @@
+@@ -0,0 +1,1006 @@
+/*
+ * Copyright (C) 2012 Armadeus systems
+ *
@@ -74,6 +75,7 @@ Index: linux-2.6.35.3/arch/arm/mach-mx28/apf28dev.c
+#include <linux/clk.h>
+#include <linux/delay.h>
+#include <linux/fec.h>
++#include <linux/fsl_devices.h>
+#include <linux/gpio_keys.h>
+#include <linux/input.h>
+#include <linux/leds.h>
@@ -86,6 +88,7 @@ Index: linux-2.6.35.3/arch/arm/mach-mx28/apf28dev.c
+#include <asm/mach/arch.h>
+
+#include <mach/apf28.h>
++#include <mach/arc_otg.h>
+#include <mach/device.h>
+#include <mach/dma.h>
+#include <mach/hardware.h>
@@ -95,7 +98,9 @@ Index: linux-2.6.35.3/arch/arm/mach-mx28/apf28dev.c
+
+#include "mx28_pins.h"
+#include "device.h"
++#include "usb.h"
+
++#define USB_POWER_ENABLE MXS_PIN_TO_GPIO(PINID_LCD_D23)
+
+static struct pin_desc apf28dev_fixed_pins[] = {
+ /* USB OTG VBus */
@@ -103,6 +108,9 @@ Index: linux-2.6.35.3/arch/arm/mach-mx28/apf28dev.c
+ .name = "USB_VBUS",
+ .id = PINID_LCD_D23,
+ .fun = PIN_GPIO,
++ .strength = PAD_8MA,
++ .voltage = PAD_3_3V,
++ .drive = 1,
+ .data = 0,
+ .output = 1,
+ },
@@ -110,9 +118,12 @@ Index: linux-2.6.35.3/arch/arm/mach-mx28/apf28dev.c
+ {
+ .name = "USB_ID",
+ .id = PINID_PWM2,
-+ .fun = PIN_GPIO,
-+ .data = 0,
-+ .output = 0,
++ .fun = PIN_FUN2,
++ .strength = PAD_8MA,
++ .voltage = PAD_3_3V,
++ .drive = 1,
++ .pull = 0,
++ .pullup = 0,
+ },
+#if defined(CONFIG_FB_MXS) || defined(CONFIG_FB_MXS_MODULE)
+ {
@@ -761,6 +772,89 @@ Index: linux-2.6.35.3/arch/arm/mach-mx28/apf28dev.c
+#endif
+};
+
++extern unsigned int vbus5v_gpio;
++static int otg_mode_host = -1;
++
++static int __init apf28_otg_mode(char *options)
++{
++ if (!strcmp(options, "host"))
++ otg_mode_host = 1;
++ else if (!strcmp(options, "device"))
++ otg_mode_host = 0;
++
++ return 0;
++}
++__setup("otg_mode=", apf28_otg_mode);
++
++extern int clk_get_usecount(struct clk *clk);
++static struct clk *usb_clk;
++static struct clk *usb_phy_clk;
++static int internal_phy_clk_already_on;
++
++static void apf28dev_usbotg_internal_phy_clock_gate(bool on)
++{
++ u32 tmp;
++ void __iomem *phy_reg = IO_ADDRESS(USBPHY0_PHYS_ADDR);
++ if (on) {
++ internal_phy_clk_already_on += 1;
++ if (internal_phy_clk_already_on == 1) {
++ pr_debug ("%s, Clock on UTMI \n", __func__);
++ tmp = BM_USBPHY_CTRL_SFTRST | BM_USBPHY_CTRL_CLKGATE;
++ __raw_writel(tmp, phy_reg + HW_USBPHY_CTRL_CLR);
++ }
++ } else {
++ internal_phy_clk_already_on -= 1;
++ if (internal_phy_clk_already_on == 0) {
++ pr_debug ("%s, Clock off UTMI \n", __func__);
++ tmp = BM_USBPHY_CTRL_CLKGATE;
++ __raw_writel(tmp, phy_reg + HW_USBPHY_CTRL_SET);
++ }
++ }
++ if (internal_phy_clk_already_on < 0)
++ printk(KERN_ERR "please check internal phy clock ON/OFF sequence \n");
++}
++
++
++static int apf28dev_usbotg_init_ext(struct platform_device *pdev)
++{
++ usb_clk = clk_get(NULL, "usb_clk0");
++ clk_enable(usb_clk);
++ clk_put(usb_clk);
++
++ usb_phy_clk = clk_get(NULL, "usb_phy_clk0");
++ clk_enable(usb_phy_clk);
++ clk_put(usb_phy_clk);
++
++ apf28dev_usbotg_internal_phy_clock_gate(true);
++ return usbotg_init(pdev);
++}
++
++static void apf28dev_usbotg_uninit_ext(struct fsl_usb2_platform_data *pdata)
++{
++ usbotg_uninit(pdata);
++
++ apf28dev_usbotg_internal_phy_clock_gate(false);
++ clk_disable(usb_phy_clk);
++ clk_disable(usb_clk);
++}
++
++static void apf28dev_usbotg_clock_gate(bool on)
++{
++ pr_debug("%s: on is %d\n", __func__, on);
++ if (on) {
++ /*clk_enable(usb_clk);
++ clk_enable(usb_phy_clk);
++ apf28dev_usbotg_internal_phy_clock_gate(on);*/
++ } else {
++ /*apf28dev_usbotg_internal_phy_clock_gate(on);
++ clk_disable(usb_phy_clk);
++ clk_disable(usb_clk);*/
++ }
++
++ pr_debug("usb_clk0_ref_count:%d, usb_phy_clk0_ref_count:%d\n", clk_get_usecount(usb_clk), clk_get_usecount(usb_phy_clk));
++}
++
++
+#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
+static struct gpio_keys_button apf28dev_gpio_keys[] = {
+ {
@@ -936,6 +1030,21 @@ Index: linux-2.6.35.3/arch/arm/mach-mx28/apf28dev.c
+
+void __init apf28_baseboard_devices_init(void)
+{
++ struct fsl_usb2_platform_data * dr_config = usb_dr_get_plateform_data();
++ dr_config->platform_init = apf28dev_usbotg_init_ext;
++ dr_config->platform_uninit = apf28dev_usbotg_uninit_ext;
++ dr_config->usb_clock_for_pm = apf28dev_usbotg_clock_gate;
++ if (otg_mode_host == 1){
++ gpio_direction_output(USB_POWER_ENABLE, 1);
++ gpio_set_value(USB_POWER_ENABLE, 1);
++ dr_config->vbus_gpio = 0;
++ } else if (otg_mode_host == 0){
++ gpio_direction_output(USB_POWER_ENABLE, 0);
++ gpio_set_value(USB_POWER_ENABLE, 0);
++ dr_config->vbus_gpio = 0;
++ } else dr_config->vbus_gpio = USB_POWER_ENABLE;
++ vbus5v_gpio = USB_POWER_ENABLE;
++
+ /* Add apf28dev special code */
+ platform_add_devices(apf28dev_platform_devices, ARRAY_SIZE(apf28dev_platform_devices));
+
diff --git a/patches/linux/2.6.35/452-armadeus-mxs-fixes_USB_freescale_bsp.patch b/patches/linux/2.6.35/452-armadeus-mxs-fixes_USB_freescale_bsp.patch
index dd696fc..d8ea709 100644
--- a/patches/linux/2.6.35/452-armadeus-mxs-fixes_USB_freescale_bsp.patch
+++ b/patches/linux/2.6.35/452-armadeus-mxs-fixes_USB_freescale_bsp.patch
@@ -1,96 +1,113 @@
-USB (i.MX28) fixes to Freescale's 2.6.35 BSP + USB OTG option to enforce mode
+USB (i.MX28) fixes to Freescale's 2.6.35 BSP USB OTG option
Signed-off-by: Julien Boibessot <jul...@ar...>
+Signed-off-by: Eric Jarrige <eri...@ar...>
Index: linux-2.6.35.3/arch/arm/mach-mx28/usb_dr.c
===================================================================
--- linux-2.6.35.3/arch/arm/mach-mx28/usb_dr.c
+++ linux-2.6.35.3/arch/arm/mach-mx28/usb_dr.c
-@@ -29,7 +29,13 @@
- #include <mach/arc_otg.h>
- #include "usb.h"
- #include "mx28_pins.h"
-+#if defined(CONFIG_MACH_MX28EVK)
- #define USB_POWER_ENABLE MXS_PIN_TO_GPIO(PINID_AUART2_TX)
-+#define USB_OTG_ID MXS_PIN_TO_GPIO(PINID_AUART2_TX)
-+#else
-+#define USB_POWER_ENABLE MXS_PIN_TO_GPIO(PINID_LCD_D23)
-+#define USB_OTG_ID MXS_PIN_TO_GPIO(PINID_PWM2)
-+#endif
-
- #ifdef CONFIG_WORKAROUND_ARCUSB_REG_RW
- static void fsl_safe_writel(u32 val32, volatile u32 *addr)
-@@ -40,6 +46,7 @@ static void fsl_safe_writel(u32 val32, v
- extern int clk_get_usecount(struct clk *clk);
- static struct clk *usb_clk;
- static struct clk *usb_phy_clk;
-+static int otg_mode_host = -1;
-
- void fsl_phy_usb_utmi_init(struct fsl_xcvr_ops *this)
- {
-@@ -58,11 +65,19 @@ void fsl_phy_usb_utmi_uninit(struct fsl_
+@@ -58,11 +58,11 @@ void fsl_phy_usb_utmi_uninit(struct fsl_
void fsl_phy_set_power(struct fsl_xcvr_ops *this,
struct fsl_usb2_platform_data *pdata, int on)
{
- /* USB_POWER_ENABLE_PIN have request at pin init*/
- if (pdata->phy_regs != USBPHY1_PHYS_ADDR) {
-- pr_debug("%s: on is %d\n", __func__, on);
++ /* pdata->vbus_gpio have request at pin init*/
++ if (pdata->vbus_gpio) {
+ pr_debug("%s: on is %d\n", __func__, on);
- gpio_direction_output(USB_POWER_ENABLE, on);
- gpio_set_value(USB_POWER_ENABLE, on);
-+ if (otg_mode_host == 1){
-+ gpio_direction_output(USB_POWER_ENABLE, 1);
-+ gpio_set_value(USB_POWER_ENABLE, 1);
-+ } else if (otg_mode_host == 0){
-+ gpio_direction_output(USB_POWER_ENABLE, 0);
-+ gpio_set_value(USB_POWER_ENABLE, 0);
-+ } else {
-+ /* USB_POWER_ENABLE_PIN have request at pin init*/
-+ if (pdata->phy_regs != USBPHY1_PHYS_ADDR) {
-+ pr_debug("%s: on is %d\n", __func__, on);
-+ gpio_direction_output(USB_POWER_ENABLE, on);
-+ gpio_set_value(USB_POWER_ENABLE, on);
-+ }
++ gpio_direction_output(pdata->vbus_gpio, on);
++ gpio_set_value(pdata->vbus_gpio, on);
}
}
-@@ -363,6 +378,7 @@ static struct fsl_usb2_platform_data __m
+@@ -363,6 +363,7 @@ static struct fsl_usb2_platform_data __m
.platform_resume = usb_host_phy_resume,
.transceiver = "utmi",
.phy_regs = USBPHY0_PHYS_ADDR,
-+ .id_gpio = USB_OTG_ID,
++ .vbus_gpio = USB_POWER_ENABLE,
};
/*
-@@ -457,6 +473,18 @@ static struct fsl_usb2_wakeup_platform_d
+@@ -457,6 +458,11 @@ static struct fsl_usb2_wakeup_platform_d
.usb_clock_for_pm = usbotg_clock_gate,
};
-+static int __init apf28_otg_mode(char *options)
++struct fsl_usb2_platform_data * __init usb_dr_get_plateform_data(void)
+{
-+ if (!strcmp(options, "host"))
-+ otg_mode_host = 1;
-+ else if (!strcmp(options, "device"))
-+ otg_mode_host = 0;
-+
-+ return 0;
++ return &dr_utmi_config;
+}
-+__setup("otg_mode=", apf28_otg_mode);
-+
+
static int __init usb_dr_init(void)
{
struct platform_device *pdev;
-@@ -472,6 +500,13 @@ static int __init usb_dr_init(void)
- dr_utmi_config.irq_delay = 0;
- dr_utmi_config.wakeup_pdata = &usbdr_wakeup_config;
+Index: linux-2.6.35.3/arch/arm/mach-mx28/usb.h
+===================================================================
+--- linux-2.6.35.3/arch/arm/mach-mx28/usb.h
++++ linux-2.6.35.3/arch/arm/mach-mx28/usb.h
+@@ -31,6 +31,8 @@ extern void fsl_usb_host_uninit(struct f
+ extern int gpio_usbh2_active(void);
+ extern void gpio_usbh2_inactive(void);
-+ if (otg_mode_host == 1) { /*mode defined by bootloader options*/
-+ printk("OTG mode forced to HOST\n");
-+ dr_utmi_config.id_gpio = 0; /* do not manage the ID pin */
-+ gpio_direction_output(USB_POWER_ENABLE, 1);
-+ gpio_set_value(USB_POWER_ENABLE, 1);
-+ }
++extern struct fsl_usb2_platform_data * __init usb_dr_get_plateform_data(void);
+
- if (platform_device_register(&dr_otg_device))
- printk(KERN_ERR "usb DR: can't register otg device\n");
- else {
+ /*
+ * Determine which platform_data struct to use for the DR controller,
+ * based on which transceiver is configured.
+Index: linux-2.6.35.3/include/linux/fsl_devices.h
+===================================================================
+--- linux-2.6.35.3/include/linux/fsl_devices.h
++++ linux-2.6.35.3/include/linux/fsl_devices.h
+@@ -109,6 +109,7 @@ struct fsl_usb2_platform_data {
+ struct fsl_usb2_wakeup_platform_data *wakeup_pdata;
+
+ u32 id_gpio;
++ u32 vbus_gpio;
+ /* register save area for suspend/resume */
+ u32 pm_command;
+ u32 pm_status;
+--- linux-2.6.35.3/arch/arm/mach-mx28/power.c
++++ linux-2.6.35.3/arch/arm/mach-mx28/power.c
+@@ -32,6 +32,7 @@
+ #include <mach/regs-power.h>
+
+ #define USB_POWER_ENABLE MXS_PIN_TO_GPIO(PINID_AUART2_TX)
++unsigned int vbus5v_gpio = USB_POWER_ENABLE;
+ #define MX28EVK_VBUS5v 5
+
+ static int get_voltage(struct mxs_regulator *sreg)
+@@ -315,19 +316,19 @@ static struct regulator_init_data vddio_
+
+ static int vbus5v_enable(struct mxs_regulator *sreg)
+ {
+- gpio_set_value(USB_POWER_ENABLE, 1);
++ gpio_set_value(vbus5v_gpio, 1);
+ return 0;
+ }
+
+ static int vbus5v_disable(struct mxs_regulator *sreg)
+ {
+- gpio_set_value(USB_POWER_ENABLE, 0);
++ gpio_set_value(vbus5v_gpio, 0);
+ return 0;
+ }
+
+ static int vbus5v_is_enabled(struct mxs_regulator *sreg)
+ {
+- return gpio_get_value(USB_POWER_ENABLE);
++ return gpio_get_value(vbus5v_gpio);
+ }
+
+
+@@ -576,7 +577,7 @@ static int __init regulators_init(void)
+ mxs_platform_add_regulator("charger", 1);
+ mxs_platform_add_regulator("power-test", 1);
+ mxs_platform_add_regulator("cpufreq", 1);
+- gpio_direction_output(USB_POWER_ENABLE, 0);
++ gpio_direction_output(vbus5v_gpio, 0);
+ return 0;
+ }
+ postcore_initcall(regulators_init);
+
hooks/post-receive
--
armadeus
|