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

Commit e7c4782f authored by Ralf Baechle's avatar Ralf Baechle
Browse files

[MIPS] Put an end to <asm/serial.h>'s long and annyoing existence

parent 192cca6e
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -155,7 +155,6 @@ config MIPS_MALTA
	bool "MIPS Malta board"
	select ARCH_MAY_HAVE_PC_FDC
	select BOOT_ELF32
	select HAVE_STD_PC_SERIAL_PORT
	select DMA_NONCOHERENT
	select GENERIC_ISA_DMA
	select IRQ_CPU
+2 −1
Original line number Diff line number Diff line
@@ -2,7 +2,8 @@
# Makefile for NEC DDB-Vrc5477 board
#

obj-y	 		+= irq.o irq_5477.o setup.o lcd44780.o
obj-y	 		+= ddb5477-platform.o irq.o irq_5477.o setup.o \
			   lcd44780.o

obj-$(CONFIG_RUNTIME_DEBUG) 	+= debug.o
obj-$(CONFIG_KGDB)		+= kgdb_io.o
+49 −0
Original line number Diff line number Diff line
/*
 * 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) 2007 Ralf Baechle (ralf@linux-mips.org)
 */
#include <linux/init.h>
#include <linux/module.h>
#include <linux/serial_8250.h>

#include <asm/ddb5xxx/ddb5477.h>

#define DDB_UART_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP)

#define DDB5477_PORT(base, int)						\
{									\
	.mapbase	= base,						\
	.irq		= int,						\
	.uartclk	= 1843200,					\
	.iotype		= UPIO_MEM,					\
	.flags		= DDB_UART_FLAGS,				\
	.regshift	= 3,						\
}

static struct plat_serial8250_port uart8250_data[] = {
	DDB5477_PORT(0xbfa04200, VRC5477_IRQ_UART0),
	DDB5477_PORT(0xbfa04240, VRC5477_IRQ_UART1),
	{ },
};

static struct platform_device uart8250_device = {
	.name			= "serial8250",
	.id			= PLAT8250_DEV_PLATFORM,
	.dev			= {
		.platform_data	= uart8250_data,
	},
};

static int __init uart8250_init(void)
{
	return platform_device_register(&uart8250_device);
}

module_init(uart8250_init);

MODULE_AUTHOR("Ralf Baechle <ralf@linux-mips.org>");
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("8250 UART probe driver for the NEC DDB5477");
+1 −1
Original line number Diff line number Diff line
@@ -2,6 +2,6 @@
# Makefile for Momentum's Ocelot board.
#

obj-y	 		+= irq.o prom.o reset.o setup.o
obj-y	 		+= irq.o ocelot-platform.o prom.o reset.o setup.o

obj-$(CONFIG_KGDB)	+= dbg_io.o
+46 −0
Original line number Diff line number Diff line
/*
 * 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) 2007 Ralf Baechle (ralf@linux-mips.org)
 *
 * A NS16552 DUART with a 20MHz crystal.
 *
 */
#include <linux/module.h>
#include <linux/init.h>
#include <linux/serial_8250.h>

#define OCELOT_UART_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP)

static struct plat_serial8250_port uart8250_data[] = {
	{
		.mapbase	= 0xe0001020,
		.irq		= 4,
		.uartclk	= 20000000,
		.iotype		= UPIO_MEM,
		.flags		= OCELOT_UART_FLAGS,
		.regshift	= 2,
	},
	{ },
};

static struct platform_device uart8250_device = {
	.name			= "serial8250",
	.id			= PLAT8250_DEV_PLATFORM,
	.dev			= {
		.platform_data	= uart8250_data,
	},
};

static int __init uart8250_init(void)
{
	return platform_device_register(&uart8250_device);
}

module_init(uart8250_init);

MODULE_AUTHOR("Ralf Baechle <ralf@linux-mips.org>");
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("8250 UART probe driver for the Momenco Ocelot");
Loading