Re: [PATCH] ARM: Support for IXP4xx CPU.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jean-Christophe PLAGNIOL-VILLARD <plagnioj@xxxxxxxxxxxx> writes:

>> +static int ixp4xx_console_init(void)
>> +{
>> +	/* Register the serial port */
>> +	add_ns16550_device(0, (u32)IXP4XX_UART1_BASE, 1024, IORESOURCE_MEM_8BIT, &serial_plat);
> we have multiple uart on ixp do no hard code it

Yes, but there is a single console, at least on all devices I have
access to. I can add CONFIG_* item for this, but it will be forced to 0
for now anyway (on all supported boards).

>> --- a/drivers/serial/serial_ns16550.c
>> +++ b/drivers/serial/serial_ns16550.c
> please split this in an other patch
>
> and pass this as a pdata
>> @@ -137,7 +137,11 @@ static void ns16550_serial_init_port(struct console_device *cdev)
>>  {
>>  	/* initializing the device for the first time */
>>  	ns16550_write(cdev, 0x00, lcr); /* select ier reg */
>> +#ifdef CONFIG_ARCH_IXP4XX
>> +	ns16550_write(cdev, IER_UUE, ier); /* Enable UART operation */
>> +#else
>>  	ns16550_write(cdev, 0x00, ier);
>> +#endif
>>  
>>  #ifdef CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS
>>  	ns16550_write(cdev, 0x07, mdr1);	/* Disable */

What do you mean?

ns16550_probe() doesn't seem to accept anything which could be used for
custom init:

static int ns16550_probe(struct device_d *dev)
{
	struct console_device *cdev;
	struct NS16550_plat *plat = (struct NS16550_plat *)dev->platform_data;

	/* we do expect platform specific data */
	if (plat == NULL)
		return -EINVAL;
	dev->priv = dev_request_mem_region(dev, 0);

	cdev = xzalloc(sizeof(*cdev));

	cdev->dev = dev;
	if (plat->f_caps)
		cdev->f_caps = plat->f_caps;
	else
		cdev->f_caps = CONSOLE_STDIN | CONSOLE_STDOUT | CONSOLE_STDERR;
	cdev->tstc = ns16550_tstc;
	cdev->putc = ns16550_putc;
	cdev->getc = ns16550_getc;
	cdev->setbrg = ns16550_setbaudrate;

	ns16550_serial_init_port(cdev);

	return console_register(cdev);
}

-- 
Krzysztof Halasa

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux