Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5e1aeea5 authored by Feng Kan's avatar Feng Kan Committed by Greg Kroah-Hartman
Browse files

serial: 8250: add support for ACPI-probed serial port for X-Gene platform



Enable APM X-Gene SoC serial port functionality when using ACPI table to
initialize serial port.

Signed-off-by: default avatarFeng Kan <fkan@apm.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9bdd6369
Loading
Loading
Loading
Loading
+11 −0
Original line number Original line Diff line number Diff line
@@ -351,10 +351,20 @@ static int dw8250_probe_of(struct uart_port *p,
static int dw8250_probe_acpi(struct uart_8250_port *up,
static int dw8250_probe_acpi(struct uart_8250_port *up,
			     struct dw8250_data *data)
			     struct dw8250_data *data)
{
{
	const struct acpi_device_id *id;
	struct uart_port *p = &up->port;
	struct uart_port *p = &up->port;


	dw8250_setup_port(up);
	dw8250_setup_port(up);


	id = acpi_match_device(p->dev->driver->acpi_match_table, p->dev);
	if (!id)
		return -ENODEV;

	if (!p->uartclk)
		if (device_property_read_u32(p->dev, "clock-frequency",
					     &p->uartclk))
			return -EINVAL;

	p->iotype = UPIO_MEM32;
	p->iotype = UPIO_MEM32;
	p->serial_in = dw8250_serial_in32;
	p->serial_in = dw8250_serial_in32;
	p->serial_out = dw8250_serial_out32;
	p->serial_out = dw8250_serial_out32;
@@ -577,6 +587,7 @@ static const struct acpi_device_id dw8250_acpi_match[] = {
	{ "INT3435", 0 },
	{ "INT3435", 0 },
	{ "80860F0A", 0 },
	{ "80860F0A", 0 },
	{ "8086228A", 0 },
	{ "8086228A", 0 },
	{ "APMC0D08", 0},
	{ },
	{ },
};
};
MODULE_DEVICE_TABLE(acpi, dw8250_acpi_match);
MODULE_DEVICE_TABLE(acpi, dw8250_acpi_match);