From f9004dbfff8a3fbbd7e2a88c8a4327c7f2f8e5b2 Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Wed, 31 Jan 2024 01:04:47 +0000 Subject: [PATCH] add driver 5G --- kernel/arch/arm/mach-sa1100/hackkit.c | 56 ++------------------------------------------------------ 1 files changed, 2 insertions(+), 54 deletions(-) diff --git a/kernel/arch/arm/mach-sa1100/hackkit.c b/kernel/arch/arm/mach-sa1100/hackkit.c index 643d5f2..3085f1c 100644 --- a/kernel/arch/arm/mach-sa1100/hackkit.c +++ b/kernel/arch/arm/mach-sa1100/hackkit.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * linux/arch/arm/mach-sa1100/hackkit.c * @@ -5,11 +6,6 @@ * * This file contains all HackKit tweaks. Based on original work from * Nicolas Pitre's assabet fixes - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * */ #include <linux/init.h> #include <linux/kernel.h> @@ -26,11 +22,11 @@ #include <linux/gpio.h> #include <linux/leds.h> #include <linux/platform_device.h> +#include <linux/pgtable.h> #include <asm/mach-types.h> #include <asm/setup.h> #include <asm/page.h> -#include <asm/pgtable.h> #include <asm/mach/arch.h> #include <asm/mach/flash.h> @@ -49,8 +45,6 @@ /* init funcs */ static void __init hackkit_map_io(void); -static u_int hackkit_get_mctrl(struct uart_port *port); -static void hackkit_set_mctrl(struct uart_port *port, u_int mctrl); static void hackkit_uart_pm(struct uart_port *port, u_int state, u_int oldstate); /********************************************************************** @@ -71,8 +65,6 @@ }; static struct sa1100_port_fns hackkit_port_fns __initdata = { - .set_mctrl = hackkit_set_mctrl, - .get_mctrl = hackkit_get_mctrl, .pm = hackkit_uart_pm, }; @@ -103,50 +95,6 @@ static void hackkit_uart_pm(struct uart_port *port, u_int state, u_int oldstate) { /* TODO: switch on/off uart in powersave mode */ -} - -/* - * Note! this can be called from IRQ context. - * FIXME: No modem ctrl lines yet. - */ -static void hackkit_set_mctrl(struct uart_port *port, u_int mctrl) -{ -#if 0 - if (port->mapbase == _Ser1UTCR0) { - u_int set = 0, clear = 0; - - if (mctrl & TIOCM_RTS) - set |= PT_CTRL2_RS1_RTS; - else - clear |= PT_CTRL2_RS1_RTS; - - if (mctrl & TIOCM_DTR) - set |= PT_CTRL2_RS1_DTR; - else - clear |= PT_CTRL2_RS1_DTR; - - PTCTRL2_clear(clear); - PTCTRL2_set(set); - } -#endif -} - -static u_int hackkit_get_mctrl(struct uart_port *port) -{ - u_int ret = 0; -#if 0 - u_int irqsr = PT_IRQSR; - - /* need 2 reads to read current value */ - irqsr = PT_IRQSR; - - /* TODO: check IRQ source register for modem/com - status lines and set them correctly. */ -#endif - - ret = TIOCM_CD | TIOCM_CTS | TIOCM_DSR; - - return ret; } static struct mtd_partition hackkit_partitions[] = { -- Gitblit v1.6.2