From patchwork Thu Sep 10 01:39:52 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 46528 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n8A1e9E5000533 for ; Thu, 10 Sep 2009 01:40:10 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754816AbZIJBjv (ORCPT ); Wed, 9 Sep 2009 21:39:51 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754820AbZIJBjv (ORCPT ); Wed, 9 Sep 2009 21:39:51 -0400 Received: from mail.renesas.com ([202.234.163.13]:34762 "EHLO mail04.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754816AbZIJBju (ORCPT ); Wed, 9 Sep 2009 21:39:50 -0400 X-AuditID: ac140387-00000004000005fd-6a-4aa858e876da Received: from guardian02.idc.renesas.com ([172.20.8.201]) by mail04.idc.renesas.com (sendmail) with ESMTP id n8A1dqSL011841; Thu, 10 Sep 2009 10:39:52 +0900 (JST) Received: (from root@localhost) by guardian02.idc.renesas.com with id n8A1dpO8003019; Thu, 10 Sep 2009 10:39:51 +0900 (JST) Received: from mta01.idc.renesas.com (localhost [127.0.0.1]) by mta01.idc.renesas.com with ESMTP id n8A1dpSC011385; Thu, 10 Sep 2009 10:39:51 +0900 (JST) Received: from PG10870.renesas.com ([172.30.8.159]) by ims05.idc.renesas.com (Sendmail) with ESMTPA id <0KPQ003D0FAGT9@ims05.idc.renesas.com>; Thu, 10 Sep 2009 10:39:52 +0900 (JST) Date: Thu, 10 Sep 2009 10:39:52 +0900 From: Kuninori Morimoto Subject: [PATCH 1/6] sh: add romimage-macros.h To: SH-Linux Cc: Paul Mundt Message-id: MIME-version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-type: text/plain; charset=US-ASCII User-Agent: SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.7 Emacs/22.1 (i386-mingw-nt5.1.2600) MULE/5.0 (SAKAKI) Meadow/3.00-dev (KIKU) X-Brightmail-Tracker: AAAAAA== Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org romimage macros which are used in kfr2r09 is very useful for other board. This patch divides kfr2r09's romimage.h into romimage-macros and partner-jet-setup. Signed-off-by: Kuninori Morimoto --- arch/sh/include/asm/romimage-macros.h | 73 ++++++++++++++++++++++++++ arch/sh/include/mach-kfr2r09/mach/romimage.h | 70 +------------------------ 2 files changed, 74 insertions(+), 69 deletions(-) create mode 100644 arch/sh/include/asm/romimage-macros.h diff --git a/arch/sh/include/asm/romimage-macros.h b/arch/sh/include/asm/romimage-macros.h new file mode 100644 index 0000000..ae17a15 --- /dev/null +++ b/arch/sh/include/asm/romimage-macros.h @@ -0,0 +1,73 @@ +#ifndef __ROMIMAGE_MACRO_H +#define __ROMIMAGE_MACRO_H + +/* The LIST command is used to include comments in the script */ +.macro LIST comment +.endm + +/* The ED command is used to write a 32-bit word */ +.macro ED, addr, data + mov.l 1f, r1 + mov.l 2f, r0 + mov.l r0, @r1 + bra 3f + nop + .align 2 +1 : .long \addr +2 : .long \data +3 : +.endm + +/* The EW command is used to write a 16-bit word */ +.macro EW, addr, data + mov.l 1f, r1 + mov.l 2f, r0 + mov.w r0, @r1 + bra 3f + nop + .align 2 +1 : .long \addr +2 : .long \data +3 : +.endm + +/* The EB command is used to write an 8-bit word */ +.macro EB, addr, data + mov.l 1f, r1 + mov.l 2f, r0 + mov.b r0, @r1 + bra 3f + nop + .align 2 +1 : .long \addr +2 : .long \data +3 : +.endm + +/* The WAIT command is used to delay the execution */ +.macro WAIT, time + mov.l 2f, r3 +1 : + nop + tst r3, r3 + bf/s 1b + dt r3 + bra 3f + nop + .align 2 +2 : .long \time * 100 +3 : +.endm + +/* The DD command is used to read a 32-bit word */ +.macro DD, addr, addr2, nr + mov.l 1f, r1 + mov.l @r1, r0 + bra 2f + nop + .align 2 +1 : .long \addr +2 : +.endm + +#endif /* __ROMIMAGE_MACRO_H */ diff --git a/arch/sh/include/mach-kfr2r09/mach/romimage.h b/arch/sh/include/mach-kfr2r09/mach/romimage.h index 39ee794..a110823 100644 --- a/arch/sh/include/mach-kfr2r09/mach/romimage.h +++ b/arch/sh/include/mach-kfr2r09/mach/romimage.h @@ -3,75 +3,7 @@ * the assembly code is the first code to be executed in the romImage */ -/* The LIST command is used to include comments in the script */ -.macro LIST comment -.endm - -/* The ED command is used to write a 32-bit word */ -.macro ED, addr, data - mov.l 1f ,r1 - mov.l 2f ,r0 - mov.l r0, @r1 - bra 3f - nop - .align 2 -1: .long \addr -2: .long \data -3: -.endm - -/* The EW command is used to write a 16-bit word */ -.macro EW, addr, data - mov.l 1f ,r1 - mov.l 2f ,r0 - mov.w r0, @r1 - bra 3f - nop - .align 2 -1: .long \addr -2: .long \data -3: -.endm - -/* The EB command is used to write an 8-bit word */ -.macro EB, addr, data - mov.l 1f ,r1 - mov.l 2f ,r0 - mov.b r0, @r1 - bra 3f - nop - .align 2 -1: .long \addr -2: .long \data -3: -.endm - -/* The WAIT command is used to delay the execution */ -.macro WAIT, time - mov.l 2f ,r3 -1: - nop - tst r3, r3 - bf/s 1b - dt r3 - bra 3f - nop - .align 2 -2: .long \time * 100 -3: -.endm - -/* The DD command is used to read a 32-bit word */ -.macro DD, addr, addr2, nr - mov.l 1f ,r1 - mov.l @r1, r0 - bra 2f - nop - .align 2 -1: .long \addr -2: -.endm - +#include #include "partner-jet-setup.txt" /* execute icbi after enabling cache */