From owner-p4-projects@FreeBSD.ORG Fri Apr 14 06:43:41 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5CC1616A405; Fri, 14 Apr 2006 06:43:41 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 369F416A403 for ; Fri, 14 Apr 2006 06:43:41 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0593043D46 for ; Fri, 14 Apr 2006 06:43:41 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3E6heYt067988 for ; Fri, 14 Apr 2006 06:43:40 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3E6heBb067985 for perforce@freebsd.org; Fri, 14 Apr 2006 06:43:40 GMT (envelope-from imp@freebsd.org) Date: Fri, 14 Apr 2006 06:43:40 GMT Message-Id: <200604140643.k3E6heBb067985@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95235 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: Fri, 14 Apr 2006 06:43:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=95235 Change 95235 by imp@imp_hammer on 2006/04/14 06:43:39 tweaks, shaves a couple meaningless bytes Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/eeprom.c#2 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/eeprom.c#2 (text+ko) ==== @@ -44,25 +44,24 @@ * to be called a single time. * .KB_C_FN_DEFINITION_END */ -void InitEEPROM(void) { +void +InitEEPROM(void) +{ AT91PS_TWI twiPtr = (AT91PS_TWI)AT91C_BASE_TWI; AT91PS_PIO pPio = (AT91PS_PIO)AT91C_BASE_PIOA; AT91PS_PMC pPMC = (AT91PS_PMC)AT91C_BASE_PMC; - pPio->PIO_ASR = - ((unsigned)AT91C_PA25_TWD) | ((unsigned)AT91C_PA26_TWCK); - pPio->PIO_BSR = 0; - pPio->PIO_PDR = - ((unsigned)AT91C_PA25_TWD) | ((unsigned)AT91C_PA26_TWCK); + pPio->PIO_ASR = AT91C_PA25_TWD | AT91C_PA26_TWCK; + pPio->PIO_PDR = AT91C_PA25_TWD | AT91C_PA26_TWCK; - pPio->PIO_MDDR = ~((unsigned)AT91C_PA25_TWD); - pPio->PIO_MDER = (unsigned)AT91C_PA25_TWD; + pPio->PIO_MDDR = ~AT91C_PA25_TWD; + pPio->PIO_MDER = AT91C_PA25_TWD; - pPMC->PMC_PCER = ((unsigned) 1 << AT91C_ID_TWI); + pPMC->PMC_PCER = 1u << AT91C_ID_TWI; - twiPtr->TWI_IDR = (unsigned) -1; + twiPtr->TWI_IDR = 0xffffffffu; twiPtr->TWI_CR = AT91C_TWI_SWRST; twiPtr->TWI_CR = AT91C_TWI_MSEN | AT91C_TWI_SVDIS;