[PATCH v7 13/15] MIPS: add initial D-Link DIR-320 wireless router support

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Wed Jul 20 00:11:18 EDT 2011


> diff --git a/arch/mips/boards/dlink-dir-320/serial.c b/arch/mips/boards/dlink-dir-320/serial.c
> new file mode 100644
> index 0000000..6e878cd
> --- /dev/null
> +++ b/arch/mips/boards/dlink-dir-320/serial.c
> @@ -0,0 +1,61 @@
> +/*
> + * Copyright (C) 2011 Antony Pavlov <antonynpavlov at gmail.com>
> + *
> + * This file is part of barebox.
> + * See file CREDITS for list of people who contributed to this project.
> + *
> + * 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.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
> + */
> +
> +#include <common.h>
> +#include <types.h>
> +#include <driver.h>
> +#include <init.h>
> +#include <ns16550.h>
> +#include <mach/hardware.h>
> +#include <asm/io.h>
> +
> +/** to work with the 8250 UART driver implementation we need this function */
> +static unsigned int dir320_uart_read(unsigned long base, unsigned char reg_idx)
> +{
> +	return __raw_readb((char *)base + reg_idx);
> +}
> +
> +/** to work with the 8250 UART driver implementation we need this function */
> +static void dir320_uart_write(unsigned int val, unsigned long base, unsigned char reg_idx)
> +{
> +	__raw_writeb(val, (char *)base + reg_idx);
> +}
can we drop those duplicated function with malta and other

Best Regards,
J.



More information about the barebox mailing list