From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] sh: Add support SH2/SH2A which is CPU of Renesas Technology (Re: [U-Boot-Users] [PATCH 1/3] sh: Add support SH2/SH2A which is CPU of Renesas Technology)
Date: Sun, 31 Aug 2008 18:40:52 +0200 [thread overview]
Message-ID: <20080831164052.GA21660@game.jcrosoft.org> (raw)
In-Reply-To: <20080831232052.f42049cf.iwamatsu@nigauri.org>
On 23:20 Sun 31 Aug , Nobuhiro Iwamatsu wrote:
> Add support SH2/SH2A basic function.
>
> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
> ---
> PATCH v2 :
> - Apply Jean-Christophe's comments
>
> cpu/sh2/Makefile | 49 +++++++++++++++++++
> cpu/sh2/cache.c | 112 ++++++++++++++++++++++++++++++++++++++++++++
> cpu/sh2/config.mk | 26 ++++++++++
> cpu/sh2/cpu.c | 98 ++++++++++++++++++++++++++++++++++++++
> cpu/sh2/interrupts.c | 39 +++++++++++++++
> cpu/sh2/start.S | 78 ++++++++++++++++++++++++++++++
> cpu/sh2/time.c | 111 +++++++++++++++++++++++++++++++++++++++++++
> cpu/sh2/watchdog.c | 33 +++++++++++++
> examples/Makefile | 3 +
> include/asm-sh/cpu_sh2.h | 40 ++++++++++++++++
> include/asm-sh/processor.h | 5 ++-
> 11 files changed, 593 insertions(+), 1 deletions(-)
> create mode 100644 cpu/sh2/Makefile
> create mode 100644 cpu/sh2/cache.c
> create mode 100644 cpu/sh2/config.mk
> create mode 100644 cpu/sh2/cpu.c
> create mode 100644 cpu/sh2/interrupts.c
> create mode 100644 cpu/sh2/start.S
> create mode 100644 cpu/sh2/time.c
> create mode 100644 cpu/sh2/watchdog.c
> create mode 100644 include/asm-sh/cpu_sh2.h
>
> diff --git a/cpu/sh2/Makefile b/cpu/sh2/Makefile
> new file mode 100644
> index 0000000..50f6720
> --- /dev/null
> +++ b/cpu/sh2/Makefile
> @@ -0,0 +1,49 @@
> +#
> +# (C) Copyright 2000-2006
> +# Wolfgang Denk, DENX Software Engineering, wd at denx.de.
> +#
> +# Copyright (C) 2007,2008 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
> +# Copyright (C) 2008 Renesas Solutions Corp.
> +#
> +# 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., 59 Temple Place, Suite 330, Boston,
> +# MA 02111-1307 USA
> +#
> +
> +include $(TOPDIR)/config.mk
> +
> +LIB = $(obj)lib$(CPU).a
> +
> +START = start.o
> +OBJS = cpu.o interrupts.o watchdog.o time.o # cache.o
> +
> +all: .depend $(START) $(LIB)
please use $(obj).depend
> +
> +$(LIB): $(OBJS)
> + $(AR) $(ARFLAGS) $@ $(OBJS)
> +
> +#########################################################################
> +
> +.depend: Makefile $(START:.o=.S) $(OBJS:.o=.c)
> + $(CC) -M $(CFLAGS) $(START:.o=.S) $(OBJS:.o=.c) > $@
please remove
> +
> +# defines $(obj).depend target
> +include $(SRCTREE)/rules.mk
> +
> +sinclude $(obj).depend
> +
> +#########################################################################
> +/*
> + * Copyright (C) 2007,2008 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
> + * Copyright (C) 2008 Renesas Solutions Corp.
> + *
> + * 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., 59 Temple Place, Suite 330, Boston,
> + * MA 02111-1307 USA
> + */
> +
> +#include <common.h>
> +#include <command.h>
> +#include <asm/processor.h>
> +#include <asm/io.h>
> +
> +#define STBCR4 0xFFFE040C
^^^^^^
whitespace
> +#define cmt_clock_enable() do {\
> + writeb(readb(STBCR4) & ~0x04, STBCR4);\
> + } while (0)
> +#define scif0_enable() do {\
> + writeb(readb(STBCR4) & ~0x80, STBCR4);\
> + } while (0)
> +
> +++ b/cpu/sh2/time.c
> @@ -0,0 +1,111 @@
> +/*
> + * Copyright (C) 2007,2008 Nobobuhiro Iwamatsu <iwamatsu@nigauri.org>
> + * Copyright (C) 2008 Renesas Solutions Corp.
> + *
> + * (C) Copyright 2003
> + * Wolfgang Denk, DENX Software Engineering, wd at denx.de.
> + *
> + * 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., 59 Temple Place, Suite 330, Boston,
> + * MA 02111-1307 USA
> + */
> +
> +#include <common.h>
> +#include <asm/io.h>
> +#include <asm/processor.h>
> +
> +#define CMT_CMCSR_INIT 0x0001 /* PCLK/32 */
^^
whitespace
> +#define CMT_CMCSR_CALIB 0x0000
> +#define CMT_MAX_COUNTER (0xFFFFFFFF)
> +#define CMT_TIMER_RESET (0xFFFF)
> +
> +static vu_long cmt0_timer;
> +
Best Regards,
J.
prev parent reply other threads:[~2008-08-31 16:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-03 14:09 [U-Boot-Users] [PATCH 1/3] sh: Add support SH2/SH2A which is CPU of Renesas Technology Nobuhiro Iwamatsu
[not found] ` <20080830113151.GD6190@game.jcrosoft.org>
2008-08-31 14:20 ` [U-Boot] [PATCH v2] sh: Add support SH2/SH2A which is CPU of Renesas Technology (Re: [U-Boot-Users] [PATCH 1/3] sh: Add support SH2/SH2A which is CPU of Renesas Technology) Nobuhiro Iwamatsu
2008-08-31 16:40 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080831164052.GA21660@game.jcrosoft.org \
--to=plagnioj@jcrosoft.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox