Re: [PATCH v3 4/4] x86, earlyprintk: add hsu early console forIntel Medfield platform

From: Alan Cox
Date: Thu Sep 23 2010 - 06:55:23 EST


> Is there a link to a PDF of the device in question?

Not that I know of at least so far.

> > + */
> > +#define HSU_PORT2_PADDR 0xffa28180
>
> Is it _always_ that address?

Yes.

> > +
> > +static void __iomem *phsu;
> > +
> > +void hsu_early_console_init(void)
> > +{
> > + u8 lcr;
> > +
> > + phsu = (void
> > *)set_fixmap_offset_nocache(FIX_EARLYCON_MEM_BASE,
> > +
> > HSU_PORT2_PADDR); +
> > + /* Disable FIFO */
> > + writeb(0x0, phsu + UART_FCR);
>
> No detection? What happens if you don't have the device (say in
> production it gets removed) and we try to use earlyprintk=hsu? Won't
> we have some trouble?

Same as if you try and use the other serial console drivers that way.
It's a bit tricky to do much about because to be sure you've got this
stuff you need to have done a whole ton of work which then makes the
early console pointless.

>
> > +
> > + /* Set to default 115200 bps, 8n1 */
>
> Is that OK? Should there be some parsing of the baudrate data?

For a serial console yes - for an early console robustness is
everything, and its an embedded development environment so fixed
configuration really isn't a problem.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/