From owner-freebsd-mips@freebsd.org Fri Feb 5 14:41:29 2016 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B8FAA9A298 for ; Fri, 5 Feb 2016 14:41:29 +0000 (UTC) (envelope-from yamori813@yahoo.co.jp) Received: from web101717.mail.ssk.yahoo.co.jp (web101717.mail.ssk.yahoo.co.jp [182.22.66.20]) by mx1.freebsd.org (Postfix) with SMTP id 0DB421BEF for ; Fri, 5 Feb 2016 14:41:28 +0000 (UTC) (envelope-from yamori813@yahoo.co.jp) Received: (qmail 29985 invoked by uid 60001); 5 Feb 2016 14:34:44 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.jp; s=yj20110701; t=1454682884; bh=SSfQ3P9ZFGuZcObUk81OTQIhaBjxjWC68VZSR3J4qHw=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:X-YMail-JAS:References:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Pd10Z8YfCmn8Lh/QB++9V74AxMTe/lLV941XumQOk3qZtI8ma+Brr/tHrvNhEFvFhkkvf35i+N9xKyaVLV4NRITkPqNDgWWr41e6H6sL4xp1+xLiiZBqsIgHa4Fk4/zosSW3kaYGUYp8PuFkRnVbimpIk87W5vhYyWQqa4XK+as= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=yj20110701; d=yahoo.co.jp; h=Message-ID:X-YMail-OSG:Received:X-Mailer:X-YMail-JAS:References:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=ZPe9VcYucGQHdlam+HVFQlzLbuWNbKxDN38olp45I79z/sh7QEIY3xP6bot8tQyzYBJuHYI2v+FwU3sV62PdDax6XLaB44xpWuuFJ0HZFEppAG7SMZmhc4L0x1UnFrPIrEjx6wKkNYRLpfi6gGV6aVkht0n/+h7aML9Ov0y0vjw=; Message-ID: <641178.28622.qm@web101717.mail.ssk.yahoo.co.jp> X-YMail-OSG: EskfBlYVM1m0.tnHvgqZsaIFAm_N_ddFNPtZQZR5rebkgHXi1sL1Sm3VuJHzU3WUFVVt3wsQvuRvAjo4VqM3V0Mt_ndxKz_my1dPPtLrIFBTVa5h4Wb_0uYZJM_FV5Dri9M720Qc4FqCEzFSa6V_JMR5pCo9FxI7B5RY.LPH5kj0ozf5xGi8_FADVoaXHbqr.PXx4XJkxrOhi1Znwv.bffVWq.utYigYSBecueIShM9jbu_qEHE3IVzNMuzFXlNNJpiUfn.GgmvQyleyHQqZyvXAIuiw8ev65F76CV4X829PZbDN.ENfp2htBlW.LFo5sHii12VHMxSSk5RTqSriG8h.u6TKFRYycbD6_8ZqcAHcjThcb5Rh3X44a3qndBC39INGOZVsTQ5V2epEtYjAXFx6mx8DE4XiBofki1thmRQ7CvlPt79eNShk4zOO7Y8y69305Yren1nlQUzs0z_MzMdp8IRSNZ93G6P6XaztUp0cCKBUcYCKbx.wx86iDCysQ3rx0_bKHku.iSeFrqEpu_1fTI9q0.xXreHU5b4- Received: from [110.134.194.196] by web101717.mail.ssk.yahoo.co.jp via HTTP; Fri, 05 Feb 2016 23:34:44 JST X-Mailer: YahooMailWebService/0.8.111_67 X-YMail-JAS: 2O7fXVIVM1muGVUeKVOXwX00EK0v.ichVMntcxmNKLwPo.yf40Ryp8AVap4eIXL17ODaTygEWaloQDJOCZsmCbRoJj.7HTEUAsQANr_1yIV_JA.e6k6wba0G1Ho1q3AkjCm7 References: <658790.3177.qm@web101716.mail.ssk.yahoo.co.jp> <915990.4597.qm@web101713.mail.ssk.yahoo.co.jp> Date: Fri, 5 Feb 2016 23:34:44 +0900 (JST) From: Mori Hiroki Reply-To: Mori Hiroki Subject: Re: CFI Byte order problem To: Adrian Chadd Cc: Warner Losh , "freebsd-mips@freebsd.org" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 14:41:29 -0000 I have AR2316 datasheet from net. This document have=0A=0A3.1.4 Byteswap Co= ntrol=0A=0AThis document have not=A0parallel flash(cfi) information=A0=0Abe= cause of AR2316=A0don't=A0have cfi interface. I guess=0AAR9132 datasheet ha= ve it.=0A=0AI think two case. One is cfi byte swap is soc default.=0AOther = is U-Boot is set to this control.=0A=0AI use Buffalo WZR-HP-G300NH 1stGen.= =0A=0Ahttp://www.dd-wrt.com/wiki/index.php/Buffalo_WZR-HP-G300NH=0A=0A=0ATh= is router have 32MByte cfi flash 16 bit bus wide.=0A=0AI think add check by= te swap contole in=A0cfi_core.c is more better.=0A=0ADo you think this?=0A= =0ARegards.=0A=0AHiroki Mori=0A=0A----- Original Message -----=0A> From: Ad= rian Chadd =0A> To: Mori Hiroki =0A> Cc: Warner Losh ; "freebsd-mips@freebsd.org" =0A> Date: 2016/2/5, Fri 14:23=0A> Subject: Re: CFI By= te order problem=0A> =0A> I have the AR9132 datasheet. What's the CFI hooke= d up to? That's what=0A> I'm confused about, the AR9132 doesn't /have/ a pa= rallel flash=0A> interface. :P=0A> =0A> =0A> =0A> -a=0A> =0A> =0A> On 4 Feb= ruary 2016 at 20:17, Mori Hiroki wrote:=0A>>=A0=A0I= don't have AR9132 datasheet. But Some other Atheros datasheet=0A>>=A0=A0te= ll to know Byteswap Control register. I think if Atheros open=0A>>=A0=A0the= AR9132 datasheet, then set correct to Byteswap Control=0A>>=A0=A0register.= But It's impossible, then ifdef workaround.=0A>> =0A>>=A0=A0Hiroki Mori=0A= >> =0A>>=A0=A0----- Original Message -----=0A>>> From: Warner Losh =0A>>> To: Mori Hiroki =0A>>> Cc: "freebsd-m= ips@freebsd.org" =0A> =0A>>> Date: 2016/2/5, Fri = 13:04=0A>>> Subject: Re: CFI Byte order problem=0A>>> =0A>>> =0A>>> =0A>>> = =0A>>> =0A>>> =0A>>> On Thu, Feb 4, 2016 at 8:31 AM, Mori Hiroki =0A> wrote:=0A>>> =0A>>> Hi.=0A>>>> =0A>>>> I build Current f= or AR9132. But don't recognize cfi flash =0A> memory.=0A>>>> I make debug w= rite and found byte endian issue. I seem AR9132=0A>>>> is byte swap in cfi = flash memory by default. Current cif code is=0A>>>> byte swap on Big Endian= machine. This is conflict.=0A>>>> =0A>>>> I make workaound by option for t= his problem.=0A>>>> =0A>>>> https://github.com/yamori813/freebsd/commit/2da= 6531d24e0d689763f25055420078a63a08baa=0A>>> =0A>>> =0A>>> Why the #ifdef? W= hy not always swap on big endian platforms?=0A>>> =0A>>> =0A>>> Warner=0A>>= > =0A>>> =0A>>> =0A>>> =0A>>=A0=A0_________________________________________= ______=0A>>=A0=A0freebsd-mips@freebsd.org mailing list=0A>>=A0=A0https://li= sts.freebsd.org/mailman/listinfo/freebsd-mips=0A>>=A0=A0To unsubscribe, sen= d any mail to =0A> "freebsd-mips-unsubscribe@freebsd.org"=0A>