From owner-p4-projects@FreeBSD.ORG Wed Feb 3 20:24:42 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 14F5E1065694; Wed, 3 Feb 2010 20:24:42 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCE441065676; Wed, 3 Feb 2010 20:24:41 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from mail.icecube.wisc.edu (trout.icecube.wisc.edu [128.104.255.119]) by mx1.freebsd.org (Postfix) with ESMTP id A42598FC12; Wed, 3 Feb 2010 20:24:41 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.icecube.wisc.edu (Postfix) with ESMTP id C89E1582A6; Wed, 3 Feb 2010 14:24:40 -0600 (CST) X-Virus-Scanned: amavisd-new at icecube.wisc.edu Received: from mail.icecube.wisc.edu ([127.0.0.1]) by localhost (trout.icecube.wisc.edu [127.0.0.1]) (amavisd-new, port 10030) with ESMTP id moVoTrIgyPPY; Wed, 3 Feb 2010 14:24:40 -0600 (CST) Received: from wanderer.tachypleus.net (i3-dhcp-172-16-55-200.icecube.wisc.edu [172.16.55.200]) by mail.icecube.wisc.edu (Postfix) with ESMTP id 92EB858267; Wed, 3 Feb 2010 14:24:40 -0600 (CST) Message-ID: <4B69DB88.2050502@freebsd.org> Date: Wed, 03 Feb 2010 14:24:40 -0600 From: Nathan Whitehorn User-Agent: Thunderbird 2.0.0.23 (X11/20091207) MIME-Version: 1.0 To: Rafal Jaworowski References: <201002032021.o13KLkPO006520@repoman.freebsd.org> In-Reply-To: <201002032021.o13KLkPO006520@repoman.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Perforce Change Reviews Subject: Re: PERFORCE change 174261 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 20:24:42 -0000 Rafal Jaworowski wrote: > http://p4web.freebsd.org/chv.cgi?CH=174261 > > Change 174261 by raj@raj_fdt on 2010/02/03 20:20:54 > > Bring more endian-safety for FDT uart(4) attachment. > > Affected files ... > > .. //depot/projects/fdt/sys/dev/uart/uart_bus_fdt.c#5 edit > > Differences ... > > ==== //depot/projects/fdt/sys/dev/uart/uart_bus_fdt.c#5 (text+ko) ==== > > @@ -1,5 +1,5 @@ > /*- > - * Copyright (c) 2009 The FreeBSD Foundation > + * Copyright (c) 2009-2010 The FreeBSD Foundation > * All rights reserved. > * > * This software was developed by Semihalf under sponsorship from > @@ -35,11 +35,15 @@ > #include > #include > > +#include > + > #include > #include > #include > #include > > +#include "../../contrib/dtc/libfdt/libfdt_env.h" > + > static int uart_fdt_probe(device_t); > > static device_method_t uart_fdt_methods[] = { > @@ -81,8 +85,11 @@ > sizeof(clock))) <= 0) > clock = 0; > > + clock = fdt32_to_cpu(clock); > + Can't you just use ntoh*? As far as I know, FDT (and Open Firmware) are defined to always use network byte order. -Nathan