From owner-freebsd-mips@freebsd.org Mon Apr 29 17:20:58 2019 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C5FB1597137 for ; Mon, 29 Apr 2019 17:20:58 +0000 (UTC) (envelope-from yamori813@yahoo.co.jp) Received: from nh501-vm13.bullet.mail.kks.yahoo.co.jp (nh501-vm13.bullet.mail.kks.yahoo.co.jp [183.79.56.143]) by mx1.freebsd.org (Postfix) with SMTP id D958D8D464 for ; Mon, 29 Apr 2019 17:20:54 +0000 (UTC) (envelope-from yamori813@yahoo.co.jp) Received: from [183.79.100.141] by nh501.bullet.mail.kks.yahoo.co.jp with NNFMP; 29 Apr 2019 17:18:35 -0000 Received: from [183.79.100.132] by t504.bullet.mail.kks.yahoo.co.jp with NNFMP; 29 Apr 2019 17:18:35 -0000 Received: from [127.0.0.1] by omp501.mail.kks.yahoo.co.jp with NNFMP; 29 Apr 2019 17:18:35 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 57017.40650.bm@omp501.mail.kks.yahoo.co.jp X-YMail-OSG: O4ylksQVM1kN4ARjyKQf49hsWnaY4YKaXP8ygFXuYaI.wb5.iBnJETOdKUXZzUB AOMyPYdKPy0_HiXMUPOrTaYsbpn8Khk7VczfMgJSBkF6Mvg1WtlTTsxkktvxSIZS_6.4a1Yu6EO1 EpaXtT1Lblej6yWrA_hHkXsyFlAxAFYzoif9CKRXsDo03D4fLdPOP8myive6mbqqOIDd63VKrrbe 9zTtR6ESYCmrPt5otHtLak2rTq4Lh.7YAwGzflQVmA3TIxxtmmdnc34Jxb1ShOHL5D8cdE9K1a00 asZMQesQ_bXTttXw_ws0aSc_v6D0TTmgbmaJbDlSMr7_wGxnNr..a5j9MfeDgKCqYm.X7Lhl1vTD xy2QgfFfQCLVwP6zBocdkvu51lHJ_caPCXnWldi3FlOfJkaXkHE6AXqaEF0ay_SLjY0PsjddKB4B jDy4UTWgKnZ0UbP1dWxyI0Us0ObmmYF7pUmTO.FzlQ8_Tvis1RhYcpmKIPQkdYjwAzEIoyXpP8Lp .PiDsHGExEhJlY_7pBQG893WrRjLz9KZdEEJ16TDf.5F4vfq0pyBU71Kt64SoiLgWJpJgn4qRHT9 3jvEwCkLbwcZSGy2I6AyV31VmmNu5LE.kavPpEZ0- Received: from jws704008.mail.kks.yahoo.co.jp by sendmailws513.mail.kks.yahoo.co.jp; Tue, 30 Apr 2019 02:18:34 +0000; 1556558314.483 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1556558315; s=yj20110701; d=yahoo.co.jp; h=Date:From:Reply-To:To:Message-ID:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding:References; bh=T37A/BIECyAnZcIeJSHsFidRg4huk7SwXRx8W4bu6WM=; b=dhS7tioVjtAVqlqnegyqy/bX5roZqTUlWcJTuedDRTMdLBkv6+AYmOjWMK0sMrtd 3iw4qlbcSYSQPqJ1lDlXp9vmwT9+vGxxXE/rV6MjJLU3kOUjFaBPRH9Bp0C+cgmIIPm ufOtzKva3KKQblcjPdQ7mWhG7hPHP+KD3BKGevaU= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=yj20110701; d=yahoo.co.jp; h=Date:From:Reply-To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:References; b=myf6D9EM9BFvOWhbfZP7NM+qNngqVTinZGVbiJw9ndlCHxbdJiNQG5XFShKn/mqp 82ZLjM6FtcA3i5HOV1gAZkHZw93hTPVnlkKmnPeIiCxm9H8ffNhmK/zuEdDkKpeWDTP B7Dx2O428Dd80ysOrowMO+HldMrOUzFN+NDqsvac=; Date: Tue, 30 Apr 2019 02:18:34 +0900 (JST) From: Mori Hiroki Reply-To: Mori Hiroki To: "freebsd-mips@freebsd.org" Message-ID: <1991993923.530828.1556558314174.JavaMail.yahoo@jws704008.mail.kks.yahoo.co.jp> Subject: spigen problem MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable References: <1991993923.530828.1556558314174.JavaMail.yahoo.ref@jws704008.mail.kks.yahoo.co.jp> X-Rspamd-Queue-Id: D958D8D464 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.co.jp header.s=yj20110701 header.b=dhS7tioV; dmarc=pass (policy=none) header.from=yahoo.co.jp; spf=pass (mx1.freebsd.org: domain of yamori813@yahoo.co.jp designates 183.79.56.143 as permitted sender) smtp.mailfrom=yamori813@yahoo.co.jp X-Spamd-Result: default: False [0.93 / 15.00]; HAS_REPLYTO(0.00)[yamori813@yahoo.co.jp]; R_SPF_ALLOW(-0.20)[+ip4:183.79.56.0/23]; FREEMAIL_FROM(0.00)[yahoo.co.jp]; DKIM_TRACE(0.00)[yahoo.co.jp:+]; DMARC_POLICY_ALLOW(-0.50)[yahoo.co.jp,none]; MX_GOOD(-0.01)[cached: mx3.mail.yahoo.co.jp]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.co.jp]; ASN(0.00)[asn:24572, ipnet:183.79.0.0/16, country:JP]; IP_SCORE(0.88)[ipnet: 183.79.0.0/16(2.47), asn: 24572(1.98), country: JP(-0.06)]; DWL_DNSWL_NONE(0.00)[yahoo.co.jp.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.co.jp:s=yj20110701]; RCVD_COUNT_FIVE(0.00)[5]; FROM_HAS_DN(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; FREEMAIL_REPLYTO(0.00)[yahoo.co.jp]; NEURAL_HAM_LONG(-0.40)[-0.397,0]; NEURAL_SPAM_MEDIUM(0.57)[0.572,0]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_SPAM_SHORT(0.79)[0.786,0]; RCVD_IN_DNSWL_NONE(0.00)[143.56.79.183.list.dnswl.org : 127.0.5.0]; TO_DN_EQ_ADDR_ALL(0.00)[] X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Apr 2019 17:20:58 -0000 Hi I add small spi lcd on RT3050. This lcd controller is=C2=A0S6D0151. S6D0151 transfer is tree byte command then tree byte data. I use spigen mruby rapper. This rapper use=C2=A0SPIGENIOC_TRANSFER. I try to send tree byte command. But spi transfer is six byte. This is reason. sys/dev/spibus/spigen.c =C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0error =3D copyin(st->st_command.iov_base, = transfer.tx_cmd, =C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 transfer.tx_cmd_sz =3D transfer.rx= _cmd_sz =3D st->st_command.iov_len); =C2=A0 This lcd not work six byte transfer. How do I fix this ? Regards Hiroki Mori From owner-freebsd-mips@freebsd.org Mon Apr 29 17:34:38 2019 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F126B15974F0 for ; Mon, 29 Apr 2019 17:34:37 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound3d.ore.mailhop.org (outbound3d.ore.mailhop.org [54.186.57.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 43C9C8DAB5 for ; Mon, 29 Apr 2019 17:34:37 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1556559276; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=f37C0CT8LoMF2r8uVXbTf1DB11lQj/xUlWniGzeinQi0BnCOufA2R1RdTivlFtoc/ErQKAek53GcJ YZ1LtQR5uE7hfZx7nYu5TtlPiK4sbbh3yWLWrJEllqt43czUpD2W7YZqEddcdsm63FfS+05u0qIqnT Rf+8OX1/fd+XuvCsxoq/BmCaJZFC41bdXyx5e7rBfJgvT1JsdLmasENxjrJRYUZuAIqvbHZp+slbhL y5FliKdHjVQoIBF6rBwzu0+5La9FMZixgomZyFd4UPOa5z/W1RNjXmwPM5pth99M/JHsLdPg7Wf5Iw Qp7+hJPfoogkyWLQqqrSCu1mPPakWBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:dkim-signature:from; bh=AZsiI8NL2UKA7mzUTUbfgJ3WpMcfQUDuPJ+FE1fAtNc=; b=Iun2iz2CMFZeAJ53InGXstrRV32D3SMMdjlikiIbEw0eXZDXeBeUatNhZzYuHNI756TkQMBHpEbm+ MOibWtNMZtPS5QXaiCFOhqxNpYH/mO40E9MdclFIYaXmdJyZQochESH2ZijlKJQv/YgTkRxFEdzQxg fXc0O1TRwtsCK2ldvtx8mdAC6timliUUEV9iG+n0FbWsZR/pYPTjAmij6aCPfsJxyNSTDfq0VBKShQ FolPw5kVmAg/Pe+JhggcnPWdzI//iFTGo2btAMX1IiqSW+seeIVixumpxKzbj6ItRktyv/axaZnj2l wxZvf1eYImwsxBWv3tASIZ3meM1Na1Q== ARC-Authentication-Results: i=1; outbound3.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:from; bh=AZsiI8NL2UKA7mzUTUbfgJ3WpMcfQUDuPJ+FE1fAtNc=; b=EG7tSSdMn3tbs4gzxx+iZA5D0f4AJpsrzlyHS+drLzbs0F7xDGGN9esB/ofeWrnvuxBxbOFQhuJh8 kuFE4VWlb3aF0JGpxn3O9lNr6eI9Gdk4JexA1oROnV5vWtWLpd0lCtZit979IDbdYobLBqSQVcorX3 oYZ0td6qx+Hd2kgoL4ClRk8rXLDZbR59hlAB2Oo7s4Jwy7qZo6XmyQsxAd70ZvmDLKqnvaSlVup7Oj OG8PA6SDM/XaH0cxWMkE0g23FvV22TMcJTwZrC30xADkBrZuVocs0xRwfDiyF/VAPIIgmGMEbgGzrU rVYd50nx1DXKCzSCVfL7KObfRDTphUg== X-MHO-RoutePath: aGlwcGll X-MHO-User: 0dbd0491-6aa5-11e9-990e-673a89bc4518 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound3.ore.mailhop.org (Halon) with ESMTPSA id 0dbd0491-6aa5-11e9-990e-673a89bc4518; Mon, 29 Apr 2019 17:34:35 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x3THYYMF003717; Mon, 29 Apr 2019 11:34:34 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <22b68b094cbe7ab1b07673e43f6473906bd2d648.camel@freebsd.org> Subject: Re: spigen problem From: Ian Lepore To: Mori Hiroki , "freebsd-mips@freebsd.org" Date: Mon, 29 Apr 2019 11:34:34 -0600 In-Reply-To: <1991993923.530828.1556558314174.JavaMail.yahoo@jws704008.mail.kks.yahoo.co.jp> References: <1991993923.530828.1556558314174.JavaMail.yahoo.ref@jws704008.mail.kks.yahoo.co.jp> <1991993923.530828.1556558314174.JavaMail.yahoo@jws704008.mail.kks.yahoo.co.jp> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 43C9C8DAB5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.99 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.988,0]; ASN(0.00)[asn:16509, ipnet:54.186.0.0/15, country:US] X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Apr 2019 17:34:38 -0000 On Tue, 2019-04-30 at 02:18 +0900, Mori Hiroki wrote: > Hi > > I add small spi lcd on RT3050. This lcd controller is S6D0151. > > S6D0151 transfer is tree byte command then tree byte data. > > I use spigen mruby rapper. This rapper use SPIGENIOC_TRANSFER. > > I try to send tree byte command. But spi transfer is six byte. > > This is reason. > > sys/dev/spibus/spigen.c > > error = copyin(st->st_command.iov_base, transfer.tx_cmd, > transfer.tx_cmd_sz = transfer.rx_cmd_sz = st- > >st_command.iov_len); > > > This lcd not work six byte transfer. > > How do I fix this ? > > Regards > > Hiroki Mori > I'm not sure what you mean by "This is the reason", that code sets up the transfer for exactly as many bytes as you requested in st_command.iov_len. If you set that to three bytes, only three bytes will be transfered. -- Ian From owner-freebsd-mips@freebsd.org Mon Apr 29 17:57:54 2019 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F449159796F for ; Mon, 29 Apr 2019 17:57:54 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.blih.net", Issuer "mail.blih.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id CC8B98E444; Mon, 29 Apr 2019 17:57:52 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) by mail.blih.net (OpenSMTPD) with ESMTP id d50ffeac; Mon, 29 Apr 2019 19:57:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=mail; bh=/Jp61+PVDBJ7638J19Z5BuT07CI=; b=iZMB/kXJSSj6Md1ueBPI9J3TABQV kq/amQr1DhtkVC7CKu0pIQ8c/+OAahAIgKpuQscEtyFTYdwtKDS7XN7PXZ3h+Z9s Jjfhpu7/PZsIuPpXrFa7bSh4Bl5MAMbejevAdd6nkhxjKcLXjn/YdzWNqA11nElj SiY4B5kQ+V/5oFc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; q=dns; s= mail; b=ZMOv/L8MPELU8mr3CVKyE69YHrRQZE70nSVmXjFPPZRoLi5s5iktAVbN 3XZeU/bpQtDdPN2lVkwgtJdQZeL0Ind29olTwKp91Te5GnIvVaYsBdw4hnJBdWlM n2MLAuGrsRF4TVT5HFli3JRhO5w43q7lK7CjPDCVKIb2192uitA= Received: from skull.home.blih.net (ip-9.net-89-3-105.rev.numericable.fr [89.3.105.9]) by mail.blih.net (OpenSMTPD) with ESMTPSA id c6defe16 TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Mon, 29 Apr 2019 19:57:50 +0200 (CEST) Date: Mon, 29 Apr 2019 19:57:50 +0200 From: Emmanuel Vadot To: Ian Lepore Cc: Mori Hiroki , "freebsd-mips@freebsd.org" Subject: Re: spigen problem Message-Id: <20190429195750.409e9d13aea2ff1654a20d3c@bidouilliste.com> In-Reply-To: <22b68b094cbe7ab1b07673e43f6473906bd2d648.camel@freebsd.org> References: <1991993923.530828.1556558314174.JavaMail.yahoo.ref@jws704008.mail.kks.yahoo.co.jp> <1991993923.530828.1556558314174.JavaMail.yahoo@jws704008.mail.kks.yahoo.co.jp> <22b68b094cbe7ab1b07673e43f6473906bd2d648.camel@freebsd.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd13.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: CC8B98E444 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bidouilliste.com header.s=mail header.b=iZMB/kXJ; spf=pass (mx1.freebsd.org: domain of manu@bidouilliste.com designates 212.83.177.182 as permitted sender) smtp.mailfrom=manu@bidouilliste.com X-Spamd-Result: default: False [0.52 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; R_DKIM_ALLOW(-0.20)[bidouilliste.com:s=mail]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip4:212.83.177.182/32]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[bidouilliste.com]; NEURAL_HAM_LONG(-0.43)[-0.434,0]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.83)[0.828,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: mx-backup.blih.net]; DKIM_TRACE(0.00)[bidouilliste.com:+]; NEURAL_HAM_MEDIUM(-0.35)[-0.350,0]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; IP_SCORE(0.39)[ip: (-0.83), ipnet: 212.83.160.0/19(2.96), asn: 12876(-0.17), country: FR(-0.01)]; ASN(0.00)[asn:12876, ipnet:212.83.160.0/19, country:FR]; FREEMAIL_CC(0.00)[yahoo.co.jp]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Apr 2019 17:57:54 -0000 On Mon, 29 Apr 2019 11:34:34 -0600 Ian Lepore wrote: > On Tue, 2019-04-30 at 02:18 +0900, Mori Hiroki wrote: > > Hi > > > > I add small spi lcd on RT3050. This lcd controller is S6D0151. > > > > S6D0151 transfer is tree byte command then tree byte data. > > > > I use spigen mruby rapper. This rapper use SPIGENIOC_TRANSFER. > > > > I try to send tree byte command. But spi transfer is six byte. > > > > This is reason. > > > > sys/dev/spibus/spigen.c > > > > error = copyin(st->st_command.iov_base, transfer.tx_cmd, > > transfer.tx_cmd_sz = transfer.rx_cmd_sz = st- > > >st_command.iov_len); > > > > > > This lcd not work six byte transfer. > > > > How do I fix this ? > > > > Regards > > > > Hiroki Mori > > > > I'm not sure what you mean by "This is the reason", that code sets up > the transfer for exactly as many bytes as you requested in > st_command.iov_len. If you set that to three bytes, only three bytes > will be transfered. > > -- Ian I guess that Mori-San wants to transfer 3 bytes but receive 6, if it's that you need to set tx_cmd_sz with dummy bytes count too. The tx buffer will also need to contain the dummy bytes values. -- Emmanuel Vadot From owner-freebsd-mips@freebsd.org Mon Apr 29 18:13:46 2019 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44AC5159819B for ; Mon, 29 Apr 2019 18:13:46 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound3d.ore.mailhop.org (outbound3d.ore.mailhop.org [54.186.57.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C2C88EF61 for ; Mon, 29 Apr 2019 18:13:45 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1556561624; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=oUcLk4tnxH9WnWlu9k03HdGFYARdH5fvSioAHJx/E8lsFiRRo0gktpjKHg46dBMNvmoewMo6jTF4n TuYlIqxUnPEpvZ6rfmS2lfpUYd7U1JrBZSblGSWuuaSj/UPHM4GW/CZvbTpOrmNgrHvRq71ahCsMZA +D42Xut3o91HRvZf2lu2FdvBB2Wh4YU0dpHMD7n9XteIe72RwHIE89sqXIzzBLTYbFZ8HComVG+wrz iRSrsEvnf5IC3CJyuZB+fozO5Q80Z1CfzdHAT4MoLAJyTFz9XeP9MZFdvMZRuFNJabkhImNrK7kb1h NqDVEeTnA0zWd5dcmu+GxQUqNRdUfXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=QKkwxb6cWjhn2UCrCGcgr2Jpq5WMPtxVdxjFHaLpW00=; b=KEFtPe1ytUNkpjYsG8+Setq8nhq4TYAnpVjS8BYLZ5x9CHn9x3URJl/sdnZeOr8vXDlVmBKa+ks3J FA5cmLmLhNhcATXbSA5BTQ6g6jkYT4EPTyITQ6Q6VQFPl8nSbKSBl3Ofor0o+IkJHBdL8A0Cp80LTX 2DwPnhMfVxqFNvnz2sqEC/8EWgC0wy8xeng4QXprbjjDAPtPjaDpIfgRrVCMx/RocmVpRWk4+nXiBG 1cv1ukz0UDEY/578VcCoo1XBKZMJvBRJYH9YgDiTL7Ac1BoUb58nK1mD3Sj83CLuCQzL30VpBfqILy ljC0Lk57q5clX0trHeO31AVhGUG3I6A== ARC-Authentication-Results: i=1; outbound3.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=QKkwxb6cWjhn2UCrCGcgr2Jpq5WMPtxVdxjFHaLpW00=; b=pawPOoaEN15M4yi5KPZKqw2IXoxTRryGGh9gMNA2xNAiVKwOdvahfGABmUKkXBgS2OoKiomw9D7wd ZohrxFe4b8V4h/dZ7D/CYy4fslq7MjswTln0KXh6PFAJY/XZL+wVfq3XZXHwX2hPBy9Pynx2AkLTuq yPEcYh7YbcQavifU7niw7gl1D9bMa60Va6wqt0nY1mR6HmL8FEL7v/wI07mSmQ1qYvnXAxwZ0sHtWT Ni0C0KuWxWmb14YGlx/HMMewP6O3Wd3se6WKC/dMMMsjP3lRcnRMOttcI2mm7fxbQAndD/HNyJd3yD w1XOv17oOWvEyntp64iLDlCij/N+QfQ== X-MHO-RoutePath: aGlwcGll X-MHO-User: 84b525b2-6aaa-11e9-990e-673a89bc4518 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound3.ore.mailhop.org (Halon) with ESMTPSA id 84b525b2-6aaa-11e9-990e-673a89bc4518; Mon, 29 Apr 2019 18:13:43 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x3TIDfHY003813; Mon, 29 Apr 2019 12:13:41 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: Subject: Re: spigen problem From: Ian Lepore To: Emmanuel Vadot Cc: Mori Hiroki , "freebsd-mips@freebsd.org" Date: Mon, 29 Apr 2019 12:13:41 -0600 In-Reply-To: <20190429195750.409e9d13aea2ff1654a20d3c@bidouilliste.com> References: <1991993923.530828.1556558314174.JavaMail.yahoo.ref@jws704008.mail.kks.yahoo.co.jp> <1991993923.530828.1556558314174.JavaMail.yahoo@jws704008.mail.kks.yahoo.co.jp> <22b68b094cbe7ab1b07673e43f6473906bd2d648.camel@freebsd.org> <20190429195750.409e9d13aea2ff1654a20d3c@bidouilliste.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 7C2C88EF61 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.984,0]; ASN(0.00)[asn:16509, ipnet:54.186.0.0/15, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Apr 2019 18:13:46 -0000 On Mon, 2019-04-29 at 19:57 +0200, Emmanuel Vadot wrote: > On Mon, 29 Apr 2019 11:34:34 -0600 > Ian Lepore wrote: > > > On Tue, 2019-04-30 at 02:18 +0900, Mori Hiroki wrote: > > > Hi > > > > > > I add small spi lcd on RT3050. This lcd controller is S6D0151. > > > > > > S6D0151 transfer is tree byte command then tree byte data. > > > > > > I use spigen mruby rapper. This rapper use SPIGENIOC_TRANSFER. > > > > > > I try to send tree byte command. But spi transfer is six byte. > > > > > > This is reason. > > > > > > sys/dev/spibus/spigen.c > > > > > > error = copyin(st->st_command.iov_base, transfer.tx_cmd, > > > transfer.tx_cmd_sz = transfer.rx_cmd_sz = st- > > > > st_command.iov_len); > > > > > > > > > This lcd not work six byte transfer. > > > > > > How do I fix this ? > > > > > > Regards > > > > > > Hiroki Mori > > > > > > > I'm not sure what you mean by "This is the reason", that code sets > > up > > the transfer for exactly as many bytes as you requested in > > st_command.iov_len. If you set that to three bytes, only three > > bytes > > will be transfered. > > > > -- Ian > > I guess that Mori-San wants to transfer 3 bytes but receive 6, if > it's > that you need to set tx_cmd_sz with dummy bytes count too. The tx > buffer will also need to contain the dummy bytes values. > If you mean send 3 command bytes and read back 3 response bytes, then set st_command.iov_len to 3 and st_data.iov_len to 3. -- Ian From owner-freebsd-mips@freebsd.org Mon Apr 29 18:24:00 2019 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7AF5015986F1 for ; Mon, 29 Apr 2019 18:24:00 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.blih.net", Issuer "mail.blih.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 961E88FD59; Mon, 29 Apr 2019 18:23:59 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) by mail.blih.net (OpenSMTPD) with ESMTP id 2d6397f1; Mon, 29 Apr 2019 20:23:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=mail; bh=Uss3K4EOxhK0Z7C8ch8CE/msmNU=; b=APhAuJW1x3GSgIc/NMBr4xs8VFg1 4QXqYuff9jplXHFyZ83cmovEE0C1oXGO/o8l2aIVvj1iPcdW2xq/RqrosbrX+fgt o3z+4ILW8qiPoC3r6V9TyhpgzL0+7HT0sjF2FKqwu40n6oMT4SFMlGnUpsOaK/oq GE8WFJh2lLlD/4A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; q=dns; s= mail; b=hMT57OGY9NIuVt3sdg16agUuVhK+ZzjVcnflpBRj1jmjtHJdP+sUL7Vv 3KXPz0QvNgCFhp56Q8NbduMk6aN2w34qOWcAb/+lGcllXUx5MbLrnZlFdTPCoBa5 M7GErgXOKDw3clKWaVeTi+WX8NYAl/JPFq3ieQKKJRT6zuaQbeY= Received: from skull.home.blih.net (ip-9.net-89-3-105.rev.numericable.fr [89.3.105.9]) by mail.blih.net (OpenSMTPD) with ESMTPSA id c5a87848 TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Mon, 29 Apr 2019 20:23:57 +0200 (CEST) Date: Mon, 29 Apr 2019 20:23:57 +0200 From: Emmanuel Vadot To: Ian Lepore Cc: "freebsd-mips@freebsd.org" Subject: Re: spigen problem Message-Id: <20190429202357.79ac2d8dba8d0bed1caa8203@bidouilliste.com> In-Reply-To: References: <1991993923.530828.1556558314174.JavaMail.yahoo.ref@jws704008.mail.kks.yahoo.co.jp> <1991993923.530828.1556558314174.JavaMail.yahoo@jws704008.mail.kks.yahoo.co.jp> <22b68b094cbe7ab1b07673e43f6473906bd2d648.camel@freebsd.org> <20190429195750.409e9d13aea2ff1654a20d3c@bidouilliste.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd13.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 961E88FD59 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bidouilliste.com header.s=mail header.b=APhAuJW1; spf=pass (mx1.freebsd.org: domain of manu@bidouilliste.com designates 212.83.177.182 as permitted sender) smtp.mailfrom=manu@bidouilliste.com X-Spamd-Result: default: False [0.66 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; R_DKIM_ALLOW(-0.20)[bidouilliste.com:s=mail]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:212.83.177.182/32]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DMARC_NA(0.00)[bidouilliste.com]; NEURAL_SPAM_SHORT(0.71)[0.706,0]; NEURAL_HAM_LONG(-0.36)[-0.360,0]; NEURAL_HAM_MEDIUM(-0.16)[-0.163,0]; DKIM_TRACE(0.00)[bidouilliste.com:+]; RCPT_COUNT_TWO(0.00)[2]; MX_GOOD(-0.01)[cached: mx-backup.blih.net]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; IP_SCORE(0.39)[ip: (-0.82), ipnet: 212.83.160.0/19(2.95), asn: 12876(-0.17), country: FR(-0.01)]; ASN(0.00)[asn:12876, ipnet:212.83.160.0/19, country:FR]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Apr 2019 18:24:00 -0000 On Mon, 29 Apr 2019 12:13:41 -0600 Ian Lepore wrote: > On Mon, 2019-04-29 at 19:57 +0200, Emmanuel Vadot wrote: > > On Mon, 29 Apr 2019 11:34:34 -0600 > > Ian Lepore wrote: > > > > > On Tue, 2019-04-30 at 02:18 +0900, Mori Hiroki wrote: > > > > Hi > > > > > > > > I add small spi lcd on RT3050. This lcd controller is S6D0151. > > > > > > > > S6D0151 transfer is tree byte command then tree byte data. > > > > > > > > I use spigen mruby rapper. This rapper use SPIGENIOC_TRANSFER. > > > > > > > > I try to send tree byte command. But spi transfer is six byte. > > > > > > > > This is reason. > > > > > > > > sys/dev/spibus/spigen.c > > > > > > > > error = copyin(st->st_command.iov_base, transfer.tx_cmd, > > > > transfer.tx_cmd_sz = transfer.rx_cmd_sz = st- > > > > > st_command.iov_len); > > > > > > > > > > > > This lcd not work six byte transfer. > > > > > > > > How do I fix this ? > > > > > > > > Regards > > > > > > > > Hiroki Mori > > > > > > > > > > I'm not sure what you mean by "This is the reason", that code sets > > > up > > > the transfer for exactly as many bytes as you requested in > > > st_command.iov_len. If you set that to three bytes, only three > > > bytes > > > will be transfered. > > > > > > -- Ian > > > > I guess that Mori-San wants to transfer 3 bytes but receive 6, if > > it's > > that you need to set tx_cmd_sz with dummy bytes count too. The tx > > buffer will also need to contain the dummy bytes values. > > > > If you mean send 3 command bytes and read back 3 response bytes, then > set st_command.iov_len to 3 and st_data.iov_len to 3. > > -- Ian Ah right, forgot about command/data being splitted. -- Emmanuel Vadot From owner-freebsd-mips@freebsd.org Tue Apr 30 02:02:49 2019 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5CC3A15A450D for ; Tue, 30 Apr 2019 02:02:49 +0000 (UTC) (envelope-from yamori813@yahoo.co.jp) Received: from nh502-vm10.bullet.mail.kks.yahoo.co.jp (nh502-vm10.bullet.mail.kks.yahoo.co.jp [183.79.56.155]) by mx1.freebsd.org (Postfix) with SMTP id A1C2B875C9 for ; Tue, 30 Apr 2019 02:02:46 +0000 (UTC) (envelope-from yamori813@yahoo.co.jp) Received: from [183.79.100.138] by nh502.bullet.mail.kks.yahoo.co.jp with NNFMP; 30 Apr 2019 01:59:20 -0000 Received: from [183.79.100.136] by t501.bullet.mail.kks.yahoo.co.jp with NNFMP; 30 Apr 2019 01:59:20 -0000 Received: from [127.0.0.1] by omp505.mail.kks.yahoo.co.jp with NNFMP; 30 Apr 2019 01:59:20 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 7045.32235.bm@omp505.mail.kks.yahoo.co.jp X-YMail-OSG: o2lBzDIVM1k9N0Bd_csdnblxDGy8Pxsj9MjPE4BHlsqvqsGVyAVbYhJ8BIsIUa8 QJsaxF7yuEfDu5FGhyu7k7T56juT5n.tME1H6T9Lkyhamdtoi3OCAVJQkHu4nKd87WYtoyaeXixl qci1VinN4lXiw.Clm.3Xucxk3DhXhtxlCk8Uy9xQDse_4M3VHJE57Fi2DbazI6yG3HcHX4j5FPTv ebghu7mdsnoTmxLZByLNPaxAIBPQVaofCgVBOK0j9X4UUr6ljdFsLlZOcHviPhOzrNHhCN0sy87r k.GUlsDtDbiVICFXtrUCt2HABHNrpryRPm0ssz5iIUrS7PbqeX06tWGLYv_z6hLJAJDV2Puq8eKn BVsbMpg7KrDactgPPRurwSW2xmFfiYDV3EvIbnjYQA_mnThqErfYk2jyKtR1jWf5cg_bIhQwgIfg EHlHb04zDKiJuIxyU7xR93Cv8Z4C2W3D1x_gzvvJeyxkDXyDy099INouJTuFdq.cy1dUURcu19F4 BHf7BpO0yUycY6xO54gk.lCYk6VRs0i3_IS48k5zK03lQQV8D1KTMTf5PsVtT4yk_Nl7hO_bSZPU 4zt21Axl27vfENxmVma5OmXuHsDPdoYnEKhvTe4jVIg-- Received: from jws700105.mail.ssk.yahoo.co.jp by sendmailws612.mail.ssk.yahoo.co.jp; Tue, 30 Apr 2019 10:59:19 +0000; 1556589559.375 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1556589559; s=yj20110701; d=yahoo.co.jp; h=Date:From:Reply-To:To:Cc:Message-ID:In-Reply-To:References:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=Ac+pQ0N2JtOw24la+1wbYyiE+I5KiVMSiDNbBgk4cj4=; b=pn1flooNdsKfuJ3gPejH8xFN5aIDuq6HCB7f0QV/7Oa5Oy2KYmMOVbTMZvsj9ECe +cz4SpjqrbE7KbqRg5sYR2l300uQhTb8x83hkotw9HYkQpA6N+5JgQ/o3HjuSoZSwsf xinY5f/qPZASl3PeXBhy7hYKiynkzKVyEvymx1uY= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=yj20110701; d=yahoo.co.jp; h=Date:From:Reply-To:Cc:Message-ID:In-Reply-To:References:MIME-Version:Content-Type:Content-Transfer-Encoding; b=VQD3FFp6oKasU8RU56Melq4hZv9C8TNNIE1SxDzNvS2Aidc7C/YvMSBkGdhRth4e 4bbhIGtUcdzESNEXZOogeSAQ8qP0XIPqJ/asZ+2JRqOIrT35wxDNiPYiF2kAE/GkgDe wv5Pp/Oo0k07TKd8jD4Y1c8sz4UBhMbZSRej6hbg=; Date: Tue, 30 Apr 2019 10:59:18 +0900 (JST) From: Mori Hiroki Reply-To: Mori Hiroki To: Emmanuel Vadot , Ian Lepore Cc: "freebsd-mips@freebsd.org" Message-ID: <130153476.2287928.1556589558764.JavaMail.yahoo@jws700105.mail.ssk.yahoo.co.jp> In-Reply-To: <20190429202357.79ac2d8dba8d0bed1caa8203@bidouilliste.com> References: <1991993923.530828.1556558314174.JavaMail.yahoo.ref@jws704008.mail.kks.yahoo.co.jp> <1991993923.530828.1556558314174.JavaMail.yahoo@jws704008.mail.kks.yahoo.co.jp> <22b68b094cbe7ab1b07673e43f6473906bd2d648.camel@freebsd.org> <20190429195750.409e9d13aea2ff1654a20d3c@bidouilliste.com> <20190429202357.79ac2d8dba8d0bed1caa8203@bidouilliste.com> Subject: Re: spigen problem MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: A1C2B875C9 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.co.jp header.s=yj20110701 header.b=pn1flooN; dmarc=pass (policy=none) header.from=yahoo.co.jp; spf=pass (mx1.freebsd.org: domain of yamori813@yahoo.co.jp designates 183.79.56.155 as permitted sender) smtp.mailfrom=yamori813@yahoo.co.jp X-Spamd-Result: default: False [-0.63 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; HAS_REPLYTO(0.00)[yamori813@yahoo.co.jp]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:183.79.56.0/23]; FREEMAIL_FROM(0.00)[yahoo.co.jp]; MX_GOOD(-0.01)[cached: mx3.mail.yahoo.co.jp]; DKIM_TRACE(0.00)[yahoo.co.jp:+]; DMARC_POLICY_ALLOW(-0.50)[yahoo.co.jp,none]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.co.jp]; ASN(0.00)[asn:24572, ipnet:183.79.0.0/16, country:JP]; IP_SCORE(0.87)[ipnet: 183.79.0.0/16(2.46), asn: 24572(1.97), country: JP(-0.06)]; DWL_DNSWL_NONE(0.00)[yahoo.co.jp.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.37)[-0.368,0]; R_DKIM_ALLOW(-0.20)[yahoo.co.jp:s=yj20110701]; RCVD_COUNT_FIVE(0.00)[5]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; REPLYTO_EQ_FROM(0.00)[]; NEURAL_HAM_LONG(-0.68)[-0.679,0]; MIME_GOOD(-0.10)[text/plain]; FREEMAIL_REPLYTO(0.00)[yahoo.co.jp]; NEURAL_SPAM_SHORT(0.46)[0.458,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[155.56.79.183.list.dnswl.org : 127.0.5.0] X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Apr 2019 02:02:49 -0000 Hi. I'm sorry. This is mtk_spi_v1.c issue. Current code hard depend flash access. I add workadound for this code and put review. https://reviews.freebsd.org/D20101 Thanks Hiroki Mori ----- Original Message ----- > From: Emmanuel Vadot > To: Ian Lepore > Cc: "freebsd-mips@freebsd.org" > Date: 2019/4/30, Tue 03:23 > Subject: Re: spigen problem >=20 > On Mon, 29 Apr 2019 12:13:41 -0600 > Ian Lepore wrote: >=20 >>=C2=A0=C2=A0On Mon, 2019-04-29 at 19:57 +0200, Emmanuel Vadot wrote: >>=C2=A0=C2=A0> On Mon, 29 Apr 2019 11:34:34 -0600 >>=C2=A0=C2=A0> Ian Lepore wrote: >>=C2=A0=C2=A0>=20 >>=C2=A0=C2=A0> > On Tue, 2019-04-30 at 02:18 +0900, Mori Hiroki wrote: >>=C2=A0=C2=A0> > > Hi >>=C2=A0=C2=A0> > >=20 >>=C2=A0=C2=A0> > > I add small spi lcd on RT3050. This lcd controller is= =20 > S6D0151. >>=C2=A0=C2=A0> > >=20 >>=C2=A0=C2=A0> > > S6D0151 transfer is tree byte command then tree byte da= ta. >>=C2=A0=C2=A0> > >=20 >>=C2=A0=C2=A0> > > I use spigen mruby rapper. This rapper use=20 > SPIGENIOC_TRANSFER. >>=C2=A0=C2=A0> > >=20 >>=C2=A0=C2=A0> > > I try to send tree byte command. But spi transfer is si= x=20 > byte. >>=C2=A0=C2=A0> > >=20 >>=C2=A0=C2=A0> > > This is reason. >>=C2=A0=C2=A0> > >=20 >>=C2=A0=C2=A0> > > sys/dev/spibus/spigen.c >>=C2=A0=C2=A0> > >=20 >>=C2=A0=C2=A0> > >=C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0=C2=A0error =3D copyin(= st->st_command.iov_base,=20 > transfer.tx_cmd, >>=C2=A0=C2=A0> > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 transfer.tx_cm= d_sz =3D transfer.rx_cmd_sz =3D st- >>=C2=A0=C2=A0> > > > st_command.iov_len);=C2=A0=20 >>=C2=A0=C2=A0> > >=20 >>=C2=A0=C2=A0> > >=20 >>=C2=A0=C2=A0> > > This lcd not work six byte transfer. >>=C2=A0=C2=A0> > >=20 >>=C2=A0=C2=A0> > > How do I fix this ? >>=C2=A0=C2=A0> > >=20 >>=C2=A0=C2=A0> > > Regards >>=C2=A0=C2=A0> > >=20 >>=C2=A0=C2=A0> > > Hiroki Mori >>=C2=A0=C2=A0> > >=20 >>=C2=A0=C2=A0> >=20 >>=C2=A0=C2=A0> > I'm not sure what you mean by "This is the reason",=20 > that code sets >>=C2=A0=C2=A0> > up >>=C2=A0=C2=A0> > the transfer for exactly as many bytes as you requested i= n >>=C2=A0=C2=A0> > st_command.iov_len.=C2=A0 If you set that to three bytes,= only three >>=C2=A0=C2=A0> > bytes >>=C2=A0=C2=A0> > will be transfered. >>=C2=A0=C2=A0> >=20 >>=C2=A0=C2=A0> > -- Ian >>=C2=A0=C2=A0>=20 >>=C2=A0=C2=A0>=C2=A0 I guess that Mori-San wants to transfer 3 bytes but r= eceive 6, if >>=C2=A0=C2=A0> it's >>=C2=A0=C2=A0> that you need to set tx_cmd_sz with dummy bytes count too. = The tx >>=C2=A0=C2=A0> buffer will also need to contain the dummy bytes values. >>=C2=A0=C2=A0>=20 >>=20 >>=C2=A0=C2=A0If you mean send 3 command bytes and read back 3 response byt= es, then >>=C2=A0=C2=A0set st_command.iov_len to 3 and st_data.iov_len to 3. >>=20 >>=C2=A0=C2=A0-- Ian >=20 > Ah right, forgot about command/data being splitted. >=20 > --=20 > Emmanuel Vadot > _______________________________________________ > freebsd-mips@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-mips > To unsubscribe, send any mail to=20 > "freebsd-mips-unsubscribe@freebsd.org" >=20