Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Feb 2014 18:42:23 -0700
From:      Warner Losh <wlosh@bsdimp.com>
To:        Ian Lepore <ian@FreeBSD.org>
Cc:        arm@freebsd.org
Subject:   Re: svn commit: r262244 - head/sys/arm/freescale/imx
Message-ID:  <BE6D12EB-2B60-4694-97F4-133512B18411@bsdimp.com>
In-Reply-To: <201402201429.s1KETxk3090247@svn.freebsd.org>
References:  <201402201429.s1KETxk3090247@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

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





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BE6D12EB-2B60-4694-97F4-133512B18411>