From owner-freebsd-mips@freebsd.org Sun May 19 16:58:10 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 E47FE15B2B74 for ; Sun, 19 May 2019 16:58:09 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2m.ore.mailhop.org (outbound2m.ore.mailhop.org [54.149.155.156]) (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 2E2786C5C8 for ; Sun, 19 May 2019 16:58:08 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1558284117; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=gW1okSqWmUNqlPjJgCaR/ZEnPwN1uV1c8T9yJ95q8AOYmlTwNXsOsgNDZD08ffknhkJDGsheMxUYo DMSVaVotGvjrNLB4LWg0Gh/QNOEu0VnNomT2Skmt2Y86SvPRuj1AAYySxSfXmZKZ1uRU68M+sR+yjE CHcI8reDkiv8q8MwnNAosCR8cl8mZS+nMuA1xeWR8M4YFEEMJFIe022qCcsTepNlI+yH7GzheB/KcQ xGCytYlvvhaBI2SpBQ5CZse5ZMv3KXZF0bBInkZWaNqicMmpGHLO3kfHiJRdFbfeO3rooeF66FKfpz swEtIONOcOLb9Z9P5DKZIS8Q9MUUz9w== 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=yLuDOLQ1ed6QMHiFQrbqAofks7QbtuIMW3Lv041k+30=; b=G51vzQE0Wz1lO/3UKaeIImy9tOyuwqyWyi4UejcAmDTmd72tg6sMaMck+/UDaCE4e7rDfWQeP0v+v uBGtsckjblR2fInZHeMvB9PJ0K9MSYCyobog/YrYD7m8/K26KeyaRPK/N8xr4OxjWmzB/hDKdEdGKe q3zBnH2/tOIz3nwW+KO0P5mUAwOSWbDublnguab16CGJndKu6jBdDQDkST+qd/o5pThGusgPYdBJxA UaVwM+IRvsIfwW6W2eCrpr9J27qvjw1QIrGKQuzaDVlo4IZpmHzvOAV72gK1ycbGfoid66P1/ksVAC R6ZtOF74ac12oWkUejEvtHxpatoG9aA== ARC-Authentication-Results: i=1; outbound4.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=yLuDOLQ1ed6QMHiFQrbqAofks7QbtuIMW3Lv041k+30=; b=D1+kWH+j5UMQMc+aMP26rfc7uQKPx1Xnrnx0bvO8/qvDWA40plUTVpJrg/rdHELbHeGJ7EqiO9ceL ej6NXrIk2esFaXd070AJ59SvFNHouVWgWSxYwgYXtmSKdggsAmni4ogkwBokeVAqZfSyF/A3mgH7Sl Ovm6nzRFpAtkDKJEDverx1NWEQsLwZ2AeNlhzF8otwov76mgNmKQ5sbfUrX+IqdrqUXwjMKI5UFb6Z 1sOzvM/BsrWj841MZFHZgrEwkNSyqHldIZnz4QYJ2asVsNN8CWcZTWy6RKnsbfk+B+7poPgY5thKX4 amIGfqyMYOpTyuJwL1tv0K/u2vfwqcg== X-MHO-RoutePath: aGlwcGll X-MHO-User: 01b95847-7a55-11e9-98b8-27c316fec7c4 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 outbound4.ore.mailhop.org (Halon) with ESMTPSA id 01b95847-7a55-11e9-98b8-27c316fec7c4; Sun, 19 May 2019 16:41:56 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x4JGfqou020974; Sun, 19 May 2019 10:41:52 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: Subject: Re: spigen problem From: Ian Lepore To: Adrian Chadd , Mori Hiroki Cc: Emmanuel Vadot , "freebsd-mips@freebsd.org" Date: Sun, 19 May 2019 10:41:52 -0600 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> <20190429202357.79ac2d8dba8d0bed1caa8203@bidouilliste.com> <130153476.2287928.1556589558764.JavaMail.yahoo@jws700105.mail.ssk.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: 2E2786C5C8 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]; TAGGED_RCPT(0.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.986,0]; ASN(0.00)[asn:16509, ipnet:54.148.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: Sun, 19 May 2019 16:58:10 -0000 On Sun, 2019-05-19 at 09:03 -0700, Adrian Chadd wrote: > hi! > > this looks ok to me. I'll go commit this tonight. > > > -a > I actually think it's horrible and we should fix the real problem of supporting hardware that can only do unidirectional transfers. But, doing so is a pretty big job. I've got some ideas on it, but it's not something that's going to get finished in a week or two. -- Ian > On Mon, 29 Apr 2019 at 19:03, Mori Hiroki > wrote: > > > > 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 > > > > > > 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 > > > _______________________________________________ > > > freebsd-mips@freebsd.org mailing list > > > https://lists.freebsd.org/mailman/listinfo/freebsd-mips > > > To unsubscribe, send any mail to > > > "freebsd-mips-unsubscribe@freebsd.org" > > > > > > > _______________________________________________ > > freebsd-mips@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/freebsd-mips > > To unsubscribe, send any mail to " > > freebsd-mips-unsubscribe@freebsd.org" > > _______________________________________________ > freebsd-mips@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-mips > To unsubscribe, send any mail to " > freebsd-mips-unsubscribe@freebsd.org"