[U-Boot] [PATCH v7] Marvell Kirkwood family SOC support

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Mon May 18 23:39:13 CEST 2009


> +
> +	icache_enable();
> +	/* Change reset vector to address 0x0 */
> +	temp = get_cr();
> +	set_cr(temp & ~CR_V);
> +
> +	return 0;
> +}
> +#endif /* CONFIG_ARCH_MISC_INIT */
> diff --git a/cpu/arm926ejs/kirkwood/cpu.h b/cpu/arm926ejs/kirkwood/cpu.h
please move to include/asm-arm/arch-kirkwood/
> new file mode 100644
> index 0000000..d36835b
> --- /dev/null
> +++ b/cpu/arm926ejs/kirkwood/cpu.h
> @@ -0,0 +1,103 @@
> +/*
> + * (C) Copyright 2009
> + * Marvell Semiconductor <www.marvell.com>
> + * Prafulla Wadaskar <prafulla at marvell.com>
> + *
> + * 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 as
> + * published by the Free Software Foundation; either version 2 of
> + * the License, or (at your option) any later version.
> + *
> + * 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., 51 Franklin Street, Fifth Floor, Boston,
> + * MA 02110-1301 USA
> + */
> +
> +#ifndef _KWCPU_H
> +#define _KWCPU_H
> +
> +#include <asm/system.h>
> +
> +#ifndef __ASSEMBLY__
> +
> +#define KWGBE_PORT_SERIAL_CONTROL1_REG(_x)	\
> +		((_x ? KW_EGIGA0_BASE : KW_EGIGA1_BASE) + 0x44c)
> +
> +enum memory_bank {
> +	BANK0,
....
> +void serial_putc(const char c)
> +{
> +	if (c == '\n')
> +		kw_uart_putc('\r');
> +
> +	kw_uart_putc(c);
> +}
> +
> +int serial_getc(void)
> +{
> +	while ((p_uart_port->lsr & LSR_DR) == 0) ;
while(!serial_tstc());
> +	return (p_uart_port->rbr);
> +}
> +
> +int serial_tstc(void)
> +{
> +	return ((p_uart_port->lsr & LSR_DR) != 0);
> +}
> +
> +void serial_setbrg(void)
> +{
> +	DECLARE_GLOBAL_DATA_PTR;
> +
> +	int clock_divisor = (CONFIG_SYS_TCLK / 16) / gd->baudrate;
> +
> +	p_uart_port->ier = 0x00;
> +	p_uart_port->lcr = LCR_DIVL_EN;	/* Access baud rate */
> +	p_uart_port->dll = clock_divisor & 0xff;	/* 9600 baud */
> +	p_uart_port->dlm = (clock_divisor >> 8) & 0xff;
> +	p_uart_port->lcr = LCR_8N1;	/* 8 data, 1 stop, no parity */
> +	/* Clear & enable FIFOs */
> +	p_uart_port->fcr = FCR_FIFO_EN | FCR_RXSR | FCR_TXSR;
> +	return;
> +}
> +
> +void serial_puts(const char *s)
> +{
> +	while (*s) {
> +		serial_putc(*s++);
> +	}
> +}
> +
> +#ifdef CONFIG_CMD_KGDB
> +void kgdb_serial_init(void)
> +{
> +}
> +
> +void putDebugChar(int c)
> +{
> +	serial_putc(c);
> +}
> +
> +void putDebugStr(const char *str)
> +{
> +	serial_puts(str);
> +}
> +
> +int getDebugChar(void)
> +{
> +	return serial_getc();
> +}
> +
> +void kgdb_interruptible(int yes)
> +{
> +	return;
> +}
> +#endif /* CONFIG_CMD_KGDB */
no need please remove the KGBD support as the does not support it
> diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile
> index 1350f3e..7ffa47d 100644
> --- a/drivers/spi/Makefile
> +++ b/drivers/spi/Makefile
> @@ -28,6 +28,7 @@ LIB	:= $(obj)libspi.a
>  COBJS-$(CONFIG_ATMEL_DATAFLASH_SPI) += atmel_dataflash_spi.o
>  COBJS-$(CONFIG_ATMEL_SPI) += atmel_spi.o
>  COBJS-$(CONFIG_BFIN_SPI) += bfin_spi.o
> +COBJS-$(CONFIG_KIRKWOOD_SPI) += kirkwood_spi.o
>  COBJS-$(CONFIG_MPC8XXX_SPI) += mpc8xxx_spi.o
>  COBJS-$(CONFIG_MXC_SPI) += mxc_spi.o
>  COBJS-$(CONFIG_SOFT_SPI) += soft_spi.o
...
> diff --git a/include/asm-arm/arch-kirkwood/kirkwood.h b/include/asm-arm/arch-kirkwood/kirkwood.h
> new file mode 100644
> index 0000000..0e6e0be
> --- /dev/null
> +++ b/include/asm-arm/arch-kirkwood/kirkwood.h
> @@ -0,0 +1,117 @@
> +/*
> + * (C) Copyright 2009
> + * Marvell Semiconductor <www.marvell.com>
> + * Prafulla Wadaskar <prafulla at marvell.com>
> + *
> + * Header file for the Marvell's Feroceon CPU core.
> + *
> + * 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 as
> + * published by the Free Software Foundation; either version 2 of
> + * the License, or (at your option) any later version.
> + *
> + * 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., 51 Franklin Street, Fifth Floor, Boston,
> + * MA 02110-1301 USA
> + */
> +
> +#ifndef _ASM_ARCH_KIRKWOOD_H
> +#define _ASM_ARCH_KIRKWOOD_H
> +
> +#ifndef __ASSEMBLY__
> +#include <asm/types.h>
> +#include <asm/io.h>
> +#endif /* __ASSEMBLY__ */
> +
> +#if defined (CONFIG_FEROCEON_88FR131) || defined (CONFIG_SHEEVA_88SV131)
> +#include <../cpu/arm926ejs/kirkwood/cpu.h>
as mention upper include/asm/arch/cpu.h
> +

> +
> +#if defined (CONFIG_KW88F6281)
> +#include "kw88f6281.h"
please use <include/asm/arch/kw88f6281.h>
> +#endif /* CONFIG_KW88F6281 */
> +#if defined (CONFIG_KW88F6192)
please use elif as they will not be include together
> +#include "kw88f6192.h"
please use <include/asm/arch/kw88f6192.h>
> +#endif /* CONFIG_KW88F6192 */
> +
> +#endif /* CONFIG_FEROCEON_88FR131 */
> +#endif /* _ASM_ARCH_KIRKWOOD_H */
> diff --git a/include/asm-arm/arch-kirkwood/kw88f6192.h b/include/asm-arm/arch-kirkwood/kw88f6192.h
> new file mode 100644
> index 0000000..000fc16

Best Regards,
J.


More information about the U-Boot mailing list