From owner-freebsd-mips@FreeBSD.ORG Fri Jun 12 08:09:38 2009 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88358106567C for ; Fri, 12 Jun 2009 08:09:38 +0000 (UTC) (envelope-from ray@ddteam.net) Received: from mail-fx0-f220.google.com (mail-fx0-f220.google.com [209.85.220.220]) by mx1.freebsd.org (Postfix) with ESMTP id E66088FC21 for ; Fri, 12 Jun 2009 08:09:36 +0000 (UTC) (envelope-from ray@ddteam.net) Received: by fxm20 with SMTP id 20so1855644fxm.43 for ; Fri, 12 Jun 2009 01:09:36 -0700 (PDT) Received: by 10.204.57.67 with SMTP id b3mr3373861bkh.99.1244794175985; Fri, 12 Jun 2009 01:09:35 -0700 (PDT) Received: from terran.mk.farlep.net (i183-101-19-89.vpdn.way.kv.chereda.net [89.19.101.183]) by mx.google.com with ESMTPS id 19sm833911fkr.55.2009.06.12.01.09.35 (version=SSLv3 cipher=RC4-MD5); Fri, 12 Jun 2009 01:09:35 -0700 (PDT) Sender: Alex RAY Date: Fri, 12 Jun 2009 11:09:32 +0300 From: Alexandr Rybalko To: "M. Warner Losh" Message-Id: <20090612110932.22f2dfa6.ray@dlink.ua> Organization: D-Link X-Mailer: Sylpheed 2.6.0 (GTK+ 2.14.7; i386-portbld-freebsd7.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-mips@freebsd.org, freebsd-hardware@freebsd.org Subject: CFI X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2009 08:09:38 -0000 Good day! Writing to you Warner because you made cfi driver. I found what Spansion S29AL032D90TFII03 and S29GL064A90TFI03 detect in byte mode on addresses shifted by 1, and in chip manual I found what, in byte mode we read on shifted address (like 0x20 for 'Q'), in word mode we read on non shifted address (like 0x10 for 'Q') So if we wont to use same driver for any CFI chips, we need to test on shifted addresses. Temporary I change val = bus_space_read_1(sc->sc_tag, sc->sc_handle, ofs); to val = bus_space_read_1(sc->sc_tag, sc->sc_handle, ofs<<1); And chip detect correctly. Thunks. -- Alexandr Rybalko