From owner-freebsd-arm@FreeBSD.ORG Sat Feb 22 01:42:31 2014 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4124F6E6 for ; Sat, 22 Feb 2014 01:42:31 +0000 (UTC) Received: from mail-ig0-f182.google.com (mail-ig0-f182.google.com [209.85.213.182]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 077A71558 for ; Sat, 22 Feb 2014 01:42:30 +0000 (UTC) Received: by mail-ig0-f182.google.com with SMTP id uy17so867936igb.3 for ; Fri, 21 Feb 2014 17:42:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:mime-version:content-type:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=iZfgemVnyfOAG3M967ANnb/sXZ5sHEVPYhJeesx8DPs=; b=PSZs8eoVGjf4VOmkJLdmSVNeOdg1DYmp9viPcD5nTnMphTQAhBmjuZxXj5WKVLkzx0 B3l+se7jSfV0NhRJzi/Ze4SDB/36uZRpeu+/ejsJgctetiYqhIYXWCeNoHQb8qekvz33 MHZEkybWo7aHYHIsGuR1NbA7YahDX8XjRQ4fBttm1gk0CilwVt+hoZ1FkDZY9vvZSlGh 1S+uADYsSTyjbShk+a4lyC+Ft/b9YPnliV9myWWaLNyPXLXr63Drb6A3krnctT3VvC0B Uo6AysTi6NxU0nLtjFD0KZV0RqIVk3ZC8wVpSQcoHsjoDYHgDGI3ZzqRXpuinE3W8/dm X2Og== X-Gm-Message-State: ALoCoQmx9pqwspdhzO4Ceblk2q7Q+/oXJhlTQZUlz1u3Pw/fo47LkME2N/fZnk0xfKX5e+MnU518 X-Received: by 10.43.52.65 with SMTP id vl1mr5013361icb.86.1393033344687; Fri, 21 Feb 2014 17:42:24 -0800 (PST) Received: from macmini.bsdimp.com (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPSA id r6sm490361igg.10.2014.02.21.17.42.23 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 21 Feb 2014 17:42:24 -0800 (PST) Subject: Re: svn commit: r262244 - head/sys/arm/freescale/imx Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <201402201429.s1KETxk3090247@svn.freebsd.org> Date: Fri, 21 Feb 2014 18:42:23 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201402201429.s1KETxk3090247@svn.freebsd.org> To: Ian Lepore X-Mailer: Apple Mail (2.1085) Cc: arm@freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Feb 2014 01:42:31 -0000 On Feb 20, 2014, at 7:29 AM, Ian Lepore wrote: > + * Resist the temptation to change the #if 0 to #ifdef EARLY_PRINTF = here. It > + * makes sense now, but if multiple SOCs do that it will make = early_putc another > + * duplicate symbol to be eliminated on the path to a generic kernel. > + */ > +#if 0=20 > +static void=20 > +imx6_early_putc(int c) > +{ > + volatile uint32_t * UART_STAT_REG =3D (uint32_t *)0x02020098; > + volatile uint32_t * UART_TX_REG =3D (uint32_t *)0x02020040; > + const uint32_t UART_TXRDY =3D (1 << 3); > + > + while ((*UART_STAT_REG & UART_TXRDY) =3D=3D 0) > + continue; > + *UART_TX_REG =3D c; > +} > +early_putc_t *early_putc =3D imx6_early_putc; > +#endif I'm starting to think we should have code like this in a platform board = specific file that's matched based on the top-level compatible = strings... Doing this is like 8th on my list right now... Warner