From patchwork Thu Jun 30 12:38:55 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Padmavathi Venna X-Patchwork-Id: 931732 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p5U6pw55011323 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 30 Jun 2011 06:52:19 GMT Received: from canuck.infradead.org ([134.117.69.58]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QcB6I-0006Wc-C6; Thu, 30 Jun 2011 06:51:46 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QcB6I-0003FO-0E; Thu, 30 Jun 2011 06:51:46 +0000 Received: from mailout1.samsung.com ([203.254.224.24]) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QcB6D-0003Eo-Ar for linux-arm-kernel@lists.infradead.org; Thu, 30 Jun 2011 06:51:43 +0000 Received: from epcpsbgm1.samsung.com (mailout1.samsung.com [203.254.224.24]) by mailout1.samsung.com (Oracle Communications Messaging Exchange Server 7u4-19.01 64bit (built Sep 7 2010)) with ESMTP id <0LNL006SJCD84190@mailout1.samsung.com> for linux-arm-kernel@lists.infradead.org; Thu, 30 Jun 2011 15:51:37 +0900 (KST) X-AuditID: cbfee61a-b7c53ae000002dc1-54-4e0c1cf9f301 Received: from epmmp1 ( [203.254.227.16]) by epcpsbgm1.samsung.com (MMPCPMTA) with SMTP id 7C.52.11713.9FC1C0E4; Thu, 30 Jun 2011 15:51:37 +0900 (KST) Received: from localhost.localdomain ([107.108.73.106]) by mmp1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0LNL00EXBCDRRJ@mmp1.samsung.com> for linux-arm-kernel@lists.infradead.org; Thu, 30 Jun 2011 15:51:37 +0900 (KST) Date: Thu, 30 Jun 2011 08:38:55 -0400 From: Padmavathi Venna Subject: [PATCH 1/2] ARM: SAMSUNG: Added tx_st_done variable in the platform data of SPI To: kgene.kim@samsung.com, jassisinghbrar@gmail.com, sbkim73@samsung.com, grant.likely@secretlab.ca, spi-devel-general@lists.sourceforge.net, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Message-id: <1309437536-9315-1-git-send-email-padma.v@samsung.com> X-Mailer: git-send-email 1.7.0.4 X-Brightmail-Tracker: AAAAAA== X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110630_025141_898315_AF64881E X-CRM114-Status: GOOD ( 18.06 ) X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [203.254.224.24 listed in list.dnswl.org] -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain 2.4 DATE_IN_FUTURE_03_06 Date: is 3 to 6 hours after Received: date X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 30 Jun 2011 06:52:19 +0000 (UTC) tx_st_done is required for checking the transmission status of SPI channels with different fifo levels Signed-off-by: Padmavathi Venna Acked-by: Jassi Brar Acked-by: Grant Likely --- arch/arm/mach-s3c64xx/mach-smdk6410.c | 2 ++ arch/arm/mach-s5p64x0/mach-smdk6440.c | 2 ++ arch/arm/mach-s5p64x0/mach-smdk6450.c | 2 ++ arch/arm/mach-s5pc100/mach-smdkc100.c | 3 +++ arch/arm/mach-s5pv210/mach-smdkv210.c | 2 ++ arch/arm/plat-samsung/dev-spi0.c | 1 + arch/arm/plat-samsung/dev-spi1.c | 1 + arch/arm/plat-samsung/dev-spi2.c | 1 + arch/arm/plat-samsung/include/plat/s3c64xx-spi.h | 2 ++ 9 files changed, 16 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c index ff31a3d..dce89aa 100644 --- a/arch/arm/mach-s3c64xx/mach-smdk6410.c +++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c @@ -212,11 +212,13 @@ static struct platform_device smdk6410_smsc911x = { static struct s3c64xx_spi_info s3c_spi0_pdata __initdata = { .fifo_lvl_mask = 0x7f, .rx_lvl_offset = 13, + .tx_st_done = 21, }; static struct s3c64xx_spi_info s3c_spi1_pdata __initdata = { .fifo_lvl_mask = 0x7f, .rx_lvl_offset = 13, + .tx_st_done = 21, }; #ifdef CONFIG_REGULATOR diff --git a/arch/arm/mach-s5p64x0/mach-smdk6440.c b/arch/arm/mach-s5p64x0/mach-smdk6440.c index 03469bc..7488feb 100644 --- a/arch/arm/mach-s5p64x0/mach-smdk6440.c +++ b/arch/arm/mach-s5p64x0/mach-smdk6440.c @@ -134,11 +134,13 @@ static struct platform_device smdk6440_backlight_device = { static struct s3c64xx_spi_info s3c_spi0_pdata __initdata = { .fifo_lvl_mask = 0x1ff, .rx_lvl_offset = 15, + .tx_st_done = 25, }; static struct s3c64xx_spi_info s3c_spi1_pdata __initdata = { .fifo_lvl_mask = 0x7f, .rx_lvl_offset = 15, + .tx_st_done = 25, }; static struct platform_device *smdk6440_devices[] __initdata = { diff --git a/arch/arm/mach-s5p64x0/mach-smdk6450.c b/arch/arm/mach-s5p64x0/mach-smdk6450.c index 4048447..e7b2560 100644 --- a/arch/arm/mach-s5p64x0/mach-smdk6450.c +++ b/arch/arm/mach-s5p64x0/mach-smdk6450.c @@ -152,11 +152,13 @@ static struct platform_device smdk6450_backlight_device = { static struct s3c64xx_spi_info s3c_spi0_pdata __initdata = { .fifo_lvl_mask = 0x1ff, .rx_lvl_offset = 15, + .tx_st_done = 25, }; static struct s3c64xx_spi_info s3c_spi1_pdata __initdata = { .fifo_lvl_mask = 0x7f, .rx_lvl_offset = 15, + .tx_st_done = 25, }; static struct platform_device *smdk6450_devices[] __initdata = { diff --git a/arch/arm/mach-s5pc100/mach-smdkc100.c b/arch/arm/mach-s5pc100/mach-smdkc100.c index 127f7b6..4e87530 100644 --- a/arch/arm/mach-s5pc100/mach-smdkc100.c +++ b/arch/arm/mach-s5pc100/mach-smdkc100.c @@ -223,18 +223,21 @@ static struct s3c64xx_spi_info s3c_spi0_pdata __initdata = { .fifo_lvl_mask = 0x7f, .rx_lvl_offset = 13, .high_speed = 1, + .tx_st_done = 21, }; static struct s3c64xx_spi_info s3c_spi1_pdata __initdata = { .fifo_lvl_mask = 0x7f, .rx_lvl_offset = 13, .high_speed = 1, + .tx_st_done = 21, }; static struct s3c64xx_spi_info s3c_spi2_pdata __initdata = { .fifo_lvl_mask = 0x7f, .rx_lvl_offset = 13, .high_speed = 1, + .tx_st_done = 21, }; static struct platform_device *smdkc100_devices[] __initdata = { diff --git a/arch/arm/mach-s5pv210/mach-smdkv210.c b/arch/arm/mach-s5pv210/mach-smdkv210.c index 8978757..71af473 100644 --- a/arch/arm/mach-s5pv210/mach-smdkv210.c +++ b/arch/arm/mach-s5pv210/mach-smdkv210.c @@ -254,12 +254,14 @@ static struct s3c64xx_spi_info s3c_spi0_pdata __initdata = { .fifo_lvl_mask = 0x1ff, .rx_lvl_offset = 15, .high_speed = 1, + .tx_st_done = 25, }; static struct s3c64xx_spi_info s3c_spi1_pdata __initdata = { .fifo_lvl_mask = 0x7f, .rx_lvl_offset = 15, .high_speed = 1, + .tx_st_done = 25, }; static struct platform_device *smdkv210_devices[] __initdata = { &s3c_device_adc, diff --git a/arch/arm/plat-samsung/dev-spi0.c b/arch/arm/plat-samsung/dev-spi0.c index 3d2c8bf..18f379e 100644 --- a/arch/arm/plat-samsung/dev-spi0.c +++ b/arch/arm/plat-samsung/dev-spi0.c @@ -71,6 +71,7 @@ void __init s3c_spi0_set_info(struct s3c64xx_spi_info *pd, } spi_info->fifo_lvl_mask = pd->fifo_lvl_mask; spi_info->rx_lvl_offset = pd->rx_lvl_offset; + spi_info->tx_st_done = pd->tx_st_done; /* Reject invalid configuration */ if (!num_cs || src_clk_nr < 0 || src_clk_nr > ARRAY_SIZE(spi_src_clks)) { diff --git a/arch/arm/plat-samsung/dev-spi1.c b/arch/arm/plat-samsung/dev-spi1.c index 2aaa251..2a80c5d 100644 --- a/arch/arm/plat-samsung/dev-spi1.c +++ b/arch/arm/plat-samsung/dev-spi1.c @@ -71,6 +71,7 @@ void __init s3c_spi1_set_info(struct s3c64xx_spi_info *pd, } spi_info->fifo_lvl_mask = pd->fifo_lvl_mask; spi_info->rx_lvl_offset = pd->rx_lvl_offset; + spi_info->tx_st_done = pd->tx_st_done; /* Reject invalid configuration */ if (!num_cs || src_clk_nr < 0 || src_clk_nr > ARRAY_SIZE(spi_src_clks)) { diff --git a/arch/arm/plat-samsung/dev-spi2.c b/arch/arm/plat-samsung/dev-spi2.c index 15218b5..5430738 100644 --- a/arch/arm/plat-samsung/dev-spi2.c +++ b/arch/arm/plat-samsung/dev-spi2.c @@ -71,6 +71,7 @@ void __init s3c_spi2_set_info(struct s3c64xx_spi_info *pd, } spi_info->fifo_lvl_mask = pd->fifo_lvl_mask; spi_info->rx_lvl_offset = pd->rx_lvl_offset; + spi_info->tx_st_done = pd->tx_st_done; /* Reject invalid configuration */ if (!num_cs || src_clk_nr < 0 || src_clk_nr > ARRAY_SIZE(spi_src_clks)) { diff --git a/arch/arm/plat-samsung/include/plat/s3c64xx-spi.h b/arch/arm/plat-samsung/include/plat/s3c64xx-spi.h index b9f6a4b..551ae27 100644 --- a/arch/arm/plat-samsung/include/plat/s3c64xx-spi.h +++ b/arch/arm/plat-samsung/include/plat/s3c64xx-spi.h @@ -39,6 +39,7 @@ struct s3c64xx_spi_csinfo { * @fifo_lvl_mask: All tx fifo_lvl fields start at offset-6 * @rx_lvl_offset: Depends on tx fifo_lvl field and bus number * @high_speed: If the controller supports HIGH_SPEED_EN bit + * @tx_st_done: Depends on tx fifo_lvl field */ struct s3c64xx_spi_info { int src_clk_nr; @@ -53,6 +54,7 @@ struct s3c64xx_spi_info { int fifo_lvl_mask; int rx_lvl_offset; int high_speed; + int tx_st_done; }; /**