From patchwork Thu Aug 6 15:12:27 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 39632 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 n76FGgtV008545 for ; Thu, 6 Aug 2009 15:16:42 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755994AbZHFPQk (ORCPT ); Thu, 6 Aug 2009 11:16:40 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756006AbZHFPQk (ORCPT ); Thu, 6 Aug 2009 11:16:40 -0400 Received: from mail-pz0-f195.google.com ([209.85.222.195]:37179 "EHLO mail-pz0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755994AbZHFPQj (ORCPT ); Thu, 6 Aug 2009 11:16:39 -0400 Received: by pzk33 with SMTP id 33so963051pzk.15 for ; Thu, 06 Aug 2009 08:16:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:date:message-id :subject; bh=gdB6YqOa4PsHxyqRCuBqkQEUWxk2aPxgBvhlQKnQr8I=; b=K4jIOt5/sx7iumg0XgxU+tRewTyjl8XjUaCRlBvn326t2PUbGK4Nr4+Gy+jOqbdMH3 fkAT+EkRurh2DfVzHuIqSAXjcRA2ujSAXCnBpkSWNZyOvFLP4hGauLk6Hhx+Xv/7iV9n zn8xqRIK3JXM1n9ZWYgW+AvAzlg0rOuw9zDMQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:subject; b=L84U7ZJc1lG3OabcYai85+ODaC9Vzfhv5Tg73j/smyaByFUxbC1PVoPOHGzL8xkfor PWikyUpJaLweDCQkqUsyDxlIxY/gNoI8fmYnKKjaw/PGQcaX04Zb2m0mowqWOsni60Jl HW5/JIlv2P+St5gus/BKDyB0ywheQDZPNaip8= Received: by 10.114.169.10 with SMTP id r10mr13497348wae.140.1249571799895; Thu, 06 Aug 2009 08:16:39 -0700 (PDT) Received: from rx1.opensource.se (210.5.32.202.bf.2iij.net [202.32.5.210]) by mx.google.com with ESMTPS id n6sm145976wag.4.2009.08.06.08.16.37 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 06 Aug 2009 08:16:38 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: Magnus Damm , lethal@linux-sh.org Date: Fri, 07 Aug 2009 00:12:27 +0900 Message-Id: <20090806151227.5103.31166.sendpatchset@rx1.opensource.se> Subject: [PATCH] sh: fix romImage mach dir usage Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org From: Magnus Damm This patch moves all the romImage related header files into the mach/ directory. Signed-off-by: Magnus Damm --- arch/sh/boot/romimage/head.S | 2 arch/sh/include/mach-common/mach/romimage.h | 1 arch/sh/include/mach-common/romimage.h | 1 arch/sh/include/mach-kfr2r09/mach/partner-jet-setup.txt | 134 +++++++++++++++ arch/sh/include/mach-kfr2r09/mach/romimage.h | 75 ++++++++ arch/sh/include/mach-kfr2r09/partner-jet-setup.txt | 134 --------------- arch/sh/include/mach-kfr2r09/romimage.h | 75 -------- 7 files changed, 211 insertions(+), 211 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 0001/arch/sh/boot/romimage/head.S +++ work/arch/sh/boot/romimage/head.S 2009-08-06 21:38:30.000000000 +0900 @@ -7,4 +7,4 @@ .text .global romstart romstart: -#include +#include --- /dev/null +++ work/arch/sh/include/mach-common/mach/romimage.h 2009-08-04 15:54:33.000000000 +0900 @@ -0,0 +1 @@ +/* do nothing here by default */ --- 0001/arch/sh/include/mach-common/romimage.h +++ /dev/null 2009-08-04 09:21:32.824030158 +0900 @@ -1 +0,0 @@ -/* do nothing here by default */ --- /dev/null +++ work/arch/sh/include/mach-kfr2r09/mach/partner-jet-setup.txt 2009-08-04 15:54:33.000000000 +0900 @@ -0,0 +1,134 @@ +LIST "partner-jet-setup.txt - 20090729 Magnus Damm" +LIST "set up enough of the kfr2r09 hardware to boot the kernel" + +LIST "zImage (RAM boot)" +LIST "This script can be used to boot the kernel from RAM via JTAG:" +LIST "> < partner-jet-setup.txt" +LIST "> RD zImage, 0xa8800000" +LIST "> G=0xa8800000" + +LIST "romImage (Flash boot)" +LIST "Use the following command to burn the zImage to flash via JTAG:" +LIST "> RD romImage, 0" + +LIST "--------------------------------" + +LIST "disable watchdog" +EW 0xa4520004, 0xa507 + +LIST "select mode for cs5 + cs6" +ED 0xff800020, 0xa5a50001 +ED 0xfec10000, 0x0000001b + +LIST "setup clocks" +ED 0xa4150004, 0x00000050 +ED 0xa4150000, 0x91053508 +WAIT 1 +ED 0xa4150024, 0x00005000 + +LIST "setup pins" +EB 0xa4050120, 0x00 +EB 0xa4050122, 0x00 +EB 0xa4050124, 0x00 +EB 0xa4050126, 0x00 +EB 0xa4050128, 0xA0 +EB 0xa405012A, 0x10 +EB 0xa405012C, 0x00 +EB 0xa405012E, 0x00 +EB 0xa4050130, 0x00 +EB 0xa4050132, 0x00 +EB 0xa4050134, 0x01 +EB 0xa4050136, 0x40 +EB 0xa4050138, 0x00 +EB 0xa405013A, 0x00 +EB 0xa405013C, 0x00 +EB 0xa405013E, 0x20 +EB 0xa4050160, 0x00 +EB 0xa4050162, 0x40 +EB 0xa4050164, 0x03 +EB 0xa4050166, 0x00 +EB 0xa4050168, 0x00 +EB 0xa405016A, 0x00 +EB 0xa405016C, 0x00 + +EW 0xa405014E, 0x5660 +EW 0xa4050150, 0x0145 +EW 0xa4050152, 0x1550 +EW 0xa4050154, 0x0200 +EW 0xa4050156, 0x0040 + +EW 0xa4050158, 0x0000 +EW 0xa405015a, 0x0000 +EW 0xa405015c, 0x0000 +EW 0xa405015e, 0x0000 + +EW 0xa4050180, 0x0000 +EW 0xa4050182, 0x8002 +EW 0xa4050184, 0x0000 + +EW 0xa405018a, 0x9991 +EW 0xa405018c, 0x8011 +EW 0xa405018e, 0x9550 + +EW 0xa4050100, 0x0000 +EW 0xa4050102, 0x5540 +EW 0xa4050104, 0x0000 +EW 0xa4050106, 0x0000 +EW 0xa4050108, 0x4550 +EW 0xa405010a, 0x0130 +EW 0xa405010c, 0x0555 +EW 0xa405010e, 0x0000 +EW 0xa4050110, 0x0000 +EW 0xa4050112, 0xAAA8 +EW 0xa4050114, 0x8305 +EW 0xa4050116, 0x10F0 +EW 0xa4050118, 0x0F50 +EW 0xa405011a, 0x0000 +EW 0xa405011c, 0x0000 +EW 0xa405011e, 0x0555 +EW 0xa4050140, 0x0000 +EW 0xa4050142, 0x5141 +EW 0xa4050144, 0x5005 +EW 0xa4050146, 0xAAA9 +EW 0xa4050148, 0xFAA9 +EW 0xa405014a, 0x3000 +EW 0xa405014c, 0x0000 + +LIST "setup sdram" +ED 0xFD000108, 0x40000301 +ED 0xFD000020, 0x011B0002 +ED 0xFD000030, 0x03060E02 +ED 0xFD000034, 0x01020102 +ED 0xFD000038, 0x01090406 +ED 0xFD000008, 0x00000004 +ED 0xFD000040, 0x00000001 +ED 0xFD000040, 0x00000000 +ED 0xFD000018, 0x00000001 + +WAIT 1 + +ED 0xFD000014, 0x00000002 +ED 0xFD000060, 0x00000032 +ED 0xFD000060, 0x00020000 +ED 0xFD000014, 0x00000004 +ED 0xFD000014, 0x00000004 +ED 0xFD000010, 0x00000001 +ED 0xFD000044, 0x000004AF +ED 0xFD000048, 0x20CF0037 + +LIST "read 16 bytes from sdram" +DD 0xa8000000, 0xa8000000, 1 +DD 0xa8000004, 0xa8000004, 1 +DD 0xa8000008, 0xa8000008, 1 +DD 0xa800000c, 0xa800000c, 1 + +ED 0xFD000014, 0x00000002 +ED 0xFD000014, 0x00000004 +ED 0xFD000108, 0x40000300 +ED 0xFD000040, 0x00010000 + +LIST "write to internal ram" +ED 0xfd8007fc, 0 + +LIST "setup cache" +ED 0xff00001c, 0x0000090b --- /dev/null +++ work/arch/sh/include/mach-kfr2r09/mach/romimage.h 2009-08-04 15:54:33.000000000 +0900 @@ -0,0 +1,75 @@ +/* kfr2r09 board specific boot code: + * converts the "partner-jet-script.txt" script into assembly + * 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 "partner-jet-setup.txt" --- 0001/arch/sh/include/mach-kfr2r09/partner-jet-setup.txt +++ /dev/null 2009-08-04 09:21:32.824030158 +0900 @@ -1,134 +0,0 @@ -LIST "partner-jet-setup.txt - 20090729 Magnus Damm" -LIST "set up enough of the kfr2r09 hardware to boot the kernel" - -LIST "zImage (RAM boot)" -LIST "This script can be used to boot the kernel from RAM via JTAG:" -LIST "> < partner-jet-setup.txt" -LIST "> RD zImage, 0xa8800000" -LIST "> G=0xa8800000" - -LIST "romImage (Flash boot)" -LIST "Use the following command to burn the zImage to flash via JTAG:" -LIST "> RD romImage, 0" - -LIST "--------------------------------" - -LIST "disable watchdog" -EW 0xa4520004, 0xa507 - -LIST "select mode for cs5 + cs6" -ED 0xff800020, 0xa5a50001 -ED 0xfec10000, 0x0000001b - -LIST "setup clocks" -ED 0xa4150004, 0x00000050 -ED 0xa4150000, 0x91053508 -WAIT 1 -ED 0xa4150024, 0x00005000 - -LIST "setup pins" -EB 0xa4050120, 0x00 -EB 0xa4050122, 0x00 -EB 0xa4050124, 0x00 -EB 0xa4050126, 0x00 -EB 0xa4050128, 0xA0 -EB 0xa405012A, 0x10 -EB 0xa405012C, 0x00 -EB 0xa405012E, 0x00 -EB 0xa4050130, 0x00 -EB 0xa4050132, 0x00 -EB 0xa4050134, 0x01 -EB 0xa4050136, 0x40 -EB 0xa4050138, 0x00 -EB 0xa405013A, 0x00 -EB 0xa405013C, 0x00 -EB 0xa405013E, 0x20 -EB 0xa4050160, 0x00 -EB 0xa4050162, 0x40 -EB 0xa4050164, 0x03 -EB 0xa4050166, 0x00 -EB 0xa4050168, 0x00 -EB 0xa405016A, 0x00 -EB 0xa405016C, 0x00 - -EW 0xa405014E, 0x5660 -EW 0xa4050150, 0x0145 -EW 0xa4050152, 0x1550 -EW 0xa4050154, 0x0200 -EW 0xa4050156, 0x0040 - -EW 0xa4050158, 0x0000 -EW 0xa405015a, 0x0000 -EW 0xa405015c, 0x0000 -EW 0xa405015e, 0x0000 - -EW 0xa4050180, 0x0000 -EW 0xa4050182, 0x8002 -EW 0xa4050184, 0x0000 - -EW 0xa405018a, 0x9991 -EW 0xa405018c, 0x8011 -EW 0xa405018e, 0x9550 - -EW 0xa4050100, 0x0000 -EW 0xa4050102, 0x5540 -EW 0xa4050104, 0x0000 -EW 0xa4050106, 0x0000 -EW 0xa4050108, 0x4550 -EW 0xa405010a, 0x0130 -EW 0xa405010c, 0x0555 -EW 0xa405010e, 0x0000 -EW 0xa4050110, 0x0000 -EW 0xa4050112, 0xAAA8 -EW 0xa4050114, 0x8305 -EW 0xa4050116, 0x10F0 -EW 0xa4050118, 0x0F50 -EW 0xa405011a, 0x0000 -EW 0xa405011c, 0x0000 -EW 0xa405011e, 0x0555 -EW 0xa4050140, 0x0000 -EW 0xa4050142, 0x5141 -EW 0xa4050144, 0x5005 -EW 0xa4050146, 0xAAA9 -EW 0xa4050148, 0xFAA9 -EW 0xa405014a, 0x3000 -EW 0xa405014c, 0x0000 - -LIST "setup sdram" -ED 0xFD000108, 0x40000301 -ED 0xFD000020, 0x011B0002 -ED 0xFD000030, 0x03060E02 -ED 0xFD000034, 0x01020102 -ED 0xFD000038, 0x01090406 -ED 0xFD000008, 0x00000004 -ED 0xFD000040, 0x00000001 -ED 0xFD000040, 0x00000000 -ED 0xFD000018, 0x00000001 - -WAIT 1 - -ED 0xFD000014, 0x00000002 -ED 0xFD000060, 0x00000032 -ED 0xFD000060, 0x00020000 -ED 0xFD000014, 0x00000004 -ED 0xFD000014, 0x00000004 -ED 0xFD000010, 0x00000001 -ED 0xFD000044, 0x000004AF -ED 0xFD000048, 0x20CF0037 - -LIST "read 16 bytes from sdram" -DD 0xa8000000, 0xa8000000, 1 -DD 0xa8000004, 0xa8000004, 1 -DD 0xa8000008, 0xa8000008, 1 -DD 0xa800000c, 0xa800000c, 1 - -ED 0xFD000014, 0x00000002 -ED 0xFD000014, 0x00000004 -ED 0xFD000108, 0x40000300 -ED 0xFD000040, 0x00010000 - -LIST "write to internal ram" -ED 0xfd8007fc, 0 - -LIST "setup cache" -ED 0xff00001c, 0x0000090b --- 0001/arch/sh/include/mach-kfr2r09/romimage.h +++ /dev/null 2009-08-04 09:21:32.824030158 +0900 @@ -1,75 +0,0 @@ -/* kfr2r09 board specific boot code: - * converts the "partner-jet-script.txt" script into assembly - * 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 "partner-jet-setup.txt"