1
0
Files
kernel-49/arch/mips/mti-malta/malta-platform.c
Greg Kroah-Hartman 00174be1fe Merge 4.9.280 into android-4.9-q
Changes in 4.9.280
	ALSA: seq: Fix racy deletion of subscriber
	scsi: sr: Return correct event when media event code is 3
	media: videobuf2-core: dequeue if start_streaming fails
	net: natsemi: Fix missing pci_disable_device() in probe and remove
	mips: Fix non-POSIX regexp
	bnx2x: fix an error code in bnx2x_nic_load()
	net: pegasus: fix uninit-value in get_interrupt_interval
	net: fec: fix use-after-free in fec_drv_remove
	net: vxge: fix use-after-free in vxge_device_unregister
	Bluetooth: defer cleanup of resources in hci_unregister_dev()
	USB: usbtmc: Fix RCU stall warning
	USB: serial: option: add Telit FD980 composition 0x1056
	USB: serial: ch341: fix character loss at high transfer rates
	USB: serial: ftdi_sio: add device ID for Auto-M3 OP-COM v2
	usb: otg-fsm: Fix hrtimer list corruption
	scripts/tracing: fix the bug that can't parse raw_trace_func
	media: rtl28xxu: fix zero-length control request
	pipe: increase minimum default pipe size to 2 pages
	serial: 8250: Mask out floating 16/32-bit bus bits
	MIPS: Malta: Do not byte-swap accesses to the CBUS UART
	pcmcia: i82092: fix a null pointer dereference bug
	perf/x86/amd: Don't touch the AMD64_EVENTSEL_HOSTONLY bit inside the guest
	reiserfs: add check for root_inode in reiserfs_fill_super
	reiserfs: check directory items on read from disk
	alpha: Send stop IPI to send to online CPUs
	net/qla3xxx: fix schedule while atomic in ql_wait_for_drvr_lock and ql_adapter_reset
	USB:ehci:fix Kunpeng920 ehci hardware problem
	ppp: Fix generating ppp unit id when ifname is not specified
	net: xilinx_emaclite: Do not print real IOMEM pointer
	ovl: prevent private clone if bind mount is not allowed
	Linux 4.9.280

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I9ec4951d64f625a7bd15aec0fae6c294e3ec0897
2021-08-17 14:09:27 +03:00

78 lines
2.0 KiB
C

/*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
* Copyright (C) 2006, 07 MIPS Technologies, Inc.
* written by Ralf Baechle (ralf@linux-mips.org)
* written by Ralf Baechle <ralf@linux-mips.org>
*
* Copyright (C) 2008 Wind River Systems, Inc.
* updated by Tiejun Chen <tiejun.chen@windriver.com>
*
* 1. Probe driver for the Malta's UART ports:
*
* o 2 ports in the SMC SuperIO
* o 1 port in the CBUS UART, a discrete 16550 which normally is only used
* for bringups.
*
* We don't use 8250_platform.c on Malta as it would result in the CBUS
* UART becoming ttyS0.
*
* 2. Register RTC-CMOS platform device on Malta.
*/
#include <linux/init.h>
#include <linux/serial_8250.h>
#include <linux/module.h>
#include <linux/irq.h>
#include <linux/platform_device.h>
#include <asm/mips-boards/maltaint.h>
#define SMC_PORT(base, int) \
{ \
.iobase = base, \
.irq = int, \
.uartclk = 1843200, \
.iotype = UPIO_PORT, \
.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, \
.regshift = 0, \
}
#define CBUS_UART_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP)
static struct plat_serial8250_port uart8250_data[] = {
SMC_PORT(0x3F8, 4),
SMC_PORT(0x2F8, 3),
#ifndef CONFIG_MIPS_CMP
{
.mapbase = 0x1f000900, /* The CBUS UART */
.irq = MIPS_CPU_IRQ_BASE + MIPSCPU_INT_MB2,
.uartclk = 3686400, /* Twice the usual clk! */
.iotype = IS_ENABLED(CONFIG_CPU_BIG_ENDIAN) ?
UPIO_MEM32BE : UPIO_MEM32,
.flags = CBUS_UART_FLAGS,
.regshift = 3,
},
#endif
{ },
};
static struct platform_device malta_uart8250_device = {
.name = "serial8250",
.id = PLAT8250_DEV_PLATFORM,
.dev = {
.platform_data = uart8250_data,
},
};
static struct platform_device *malta_devices[] __initdata = {
&malta_uart8250_device,
};
static int __init malta_add_devices(void)
{
return platform_add_devices(malta_devices, ARRAY_SIZE(malta_devices));
}
device_initcall(malta_add_devices);