Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 May 2019 10:41:52 -0600
From:      Ian Lepore <ian@freebsd.org>
To:        Adrian Chadd <adrian.chadd@gmail.com>, Mori Hiroki <yamori813@yahoo.co.jp>
Cc:        Emmanuel Vadot <manu@bidouilliste.com>, "freebsd-mips@freebsd.org" <freebsd-mips@freebsd.org>
Subject:   Re: spigen problem
Message-ID:  <ab39bb99ac13541ced71df599430ae9f87bf1af6.camel@freebsd.org>
In-Reply-To: <CAJ-Vmo=dHVde2Ojqj=wOCJFp=2-iQtcOyuoDRy=6Smbq0_qKEA@mail.gmail.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> <c05a6d77563c5d332a108272654ef75f74c88067.camel@freebsd.org> <20190429202357.79ac2d8dba8d0bed1caa8203@bidouilliste.com> <130153476.2287928.1556589558764.JavaMail.yahoo@jws700105.mail.ssk.yahoo.co.jp> <CAJ-Vmo=dHVde2Ojqj=wOCJFp=2-iQtcOyuoDRy=6Smbq0_qKEA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <yamori813@yahoo.co.jp>
> 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 <manu@bidouilliste.com>
> > > To: Ian Lepore <ian@freebsd.org>
> > > Cc: "freebsd-mips@freebsd.org" <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 <ian@freebsd.org> wrote:
> > > 
> > > >  On Mon, 2019-04-29 at 19:57 +0200, Emmanuel Vadot wrote:
> > > >  > On Mon, 29 Apr 2019 11:34:34 -0600
> > > >  > Ian Lepore <ian@freebsd.org> 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 <manu@bidouilliste.com> <manu@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"
> 
> _______________________________________________
> 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"




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ab39bb99ac13541ced71df599430ae9f87bf1af6.camel>