From owner-freebsd-mips@freebsd.org Fri Feb 5 04:04:17 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 B1B68A9AC1B for ; Fri, 5 Feb 2016 04:04:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk0-x229.google.com (mail-qk0-x229.google.com [IPv6:2607:f8b0:400d:c09::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6D04E1ECC for ; Fri, 5 Feb 2016 04:04:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk0-x229.google.com with SMTP id o6so29919162qkc.2 for ; Thu, 04 Feb 2016 20:04:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=LB7HljdzVT+53E/ZzHA5O1uIkrLb6XFajwMroqrnMdo=; b=HQPedh5nzld0ZWjxC/mqa1/biijPjOSYCV7xZFgtpWDPhiCu5aPjdNaCPGTnnVKSkn vjfsD9SkjiTzdyP+re2ZThU7aFGCtgUf2kJeAJFly2W/rYUGvErHpJnFDb4wP/pU8g61 TEnvS+AvAeztOmpZHdpp9Ejd5wYpKzZmj9NRTIYDvpre9pC/iPCSttMhWxxlEA0ygHgJ KQN3tlM0gOKrzf9pTRzGVfml2w18l7AE2IcKhpbZFHU1CHybSPApNh62krkXlua3IaAQ 4DJS8DFnfLEYO9meIwM8CGiFRLzxaCgeHszY7drWT6ct+7qwLYUuujU4iP8qwzhzLDY/ rUFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=LB7HljdzVT+53E/ZzHA5O1uIkrLb6XFajwMroqrnMdo=; b=h3pJn0jNFLCs16yNXgy+aItWsIqZxQgA40OlCmTRudTq2QtBkEYo4QlT0z+QrybP/S 8ltBxh+WMJbz6vv0qk+ERyhTapmRUrF+XW+bz6G63ZLesuuBQ5hgeuS46YLctflq+HOV UUIR//UN1oL3uaFjbbShBAs5E7OZiBEb5p31R1EhAXdBzs7mNHje7vjEZlvVNj6wrP1O aBgd2bO1KeQwK7/aocANeQmdaMybvspcw+60+aQH6eNHlk7GMbr6EOARA/eYtfjRtRzl 8ZHZItRgWauNn0lr6bK/1LWvV/Z9u2FgeGQcXDDckBRjCWiw+u1YpluvoHU1jJV6ef7z cKeg== X-Gm-Message-State: AG10YORx2u1QHV6u3cJTNtRyQkOPNyWHxQoiGhxqsGKhWs4hgAD2rmqV2Qm0wAjzND6Goq5lT5k4fAIi0+SfnQ== MIME-Version: 1.0 X-Received: by 10.55.73.199 with SMTP id w190mr13619133qka.77.1454645056490; Thu, 04 Feb 2016 20:04:16 -0800 (PST) Sender: wlosh@bsdimp.com Received: by 10.140.30.166 with HTTP; Thu, 4 Feb 2016 20:04:16 -0800 (PST) X-Originating-IP: [50.253.99.174] In-Reply-To: <658790.3177.qm@web101716.mail.ssk.yahoo.co.jp> References: <658790.3177.qm@web101716.mail.ssk.yahoo.co.jp> Date: Thu, 4 Feb 2016 21:04:16 -0700 X-Google-Sender-Auth: 9pKPzhMJ_0Sf6x7S4crL23g8Z5Q Message-ID: Subject: Re: CFI Byte order problem From: Warner Losh To: Mori Hiroki Cc: "freebsd-mips@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 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 04:04:17 -0000 On Thu, Feb 4, 2016 at 8:31 AM, Mori Hiroki wrote: > Hi. > > I build Current for AR9132. But don't recognize cfi flash memory. > I make debug write and found byte endian issue. I seem AR9132 > is byte swap in cfi flash memory by default. Current cif code is > byte swap on Big Endian machine. This is conflict. > > I make workaound by option for this problem. > > > https://github.com/yamori813/freebsd/commit/2da6531d24e0d689763f25055420078a63a08baa Why the #ifdef? Why not always swap on big endian platforms? Warner