From patchwork Wed Jul 22 16:20:54 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 36859 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 n6MGOtt7024933 for ; Wed, 22 Jul 2009 16:24:55 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751736AbZGVQYy (ORCPT ); Wed, 22 Jul 2009 12:24:54 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752138AbZGVQYy (ORCPT ); Wed, 22 Jul 2009 12:24:54 -0400 Received: from fg-out-1718.google.com ([72.14.220.156]:9937 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751736AbZGVQYx (ORCPT ); Wed, 22 Jul 2009 12:24:53 -0400 Received: by fg-out-1718.google.com with SMTP id e21so94159fga.17 for ; Wed, 22 Jul 2009 09:24:52 -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=yUCrjUUWOOPCvg/YjvBBqI+//g/vYvxE10zk1up4i40=; b=AbufrRA4omnubzVHnhut4zBkSGvn9pWT9ANeW7kSM0FhSqnk8qD7fh4drBhu5gd6n3 5V5c+WXSUr7cJqJgHZrhZWsehZ8DYDHphMfOmXYacEZuNKe9U07vosDEHUD0Py36YM2G IqhqzdoREaf4e+PfYhAjefIrdqzaoIRvOMh5c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:subject; b=vBGZHuU6ZBNOubWDiTpmTmuR1SAauCuS8ElrTcb29b8CqMJXLUIl8hg/GQe4aBsxVh aC652bvqBFfXTdI6aWo3isK5t8+pPV+6o9l7QmRUmfVselt7VZmxTWdR2WNhetU5G+I9 9fVrMtcaz65SSQTNaun5UUkYMeUehpEF9pd8E= Received: by 10.86.30.17 with SMTP id d17mr973183fgd.30.1248279892723; Wed, 22 Jul 2009 09:24:52 -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 e11sm16822681fga.6.2009.07.22.09.24.50 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 22 Jul 2009 09:24:52 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: Magnus Damm , lethal@linux-sh.org Date: Thu, 23 Jul 2009 01:20:54 +0900 Message-Id: <20090722162054.18165.73500.sendpatchset@rx1.opensource.se> Subject: [PATCH] sh: kfr2r09 board support - SCIF console Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org From: Magnus Damm This patch adds basic kfr2r09 board support. Only the SCIF1 console is supported with this patch, but this patch and a proper sh7724 configuration is all that is needed. Combine with an initramfs to have a small RAM based kernel and distribution booted as zImage from RAM via JTAG. Signed-off-by: Magnus Damm --- I'll post a defconfig later on when we have agreed on how to handle the zImage boot loader stuff. arch/sh/Makefile | 1 arch/sh/boards/Kconfig | 7 ++++ arch/sh/boards/mach-kfr2r09/Makefile | 1 arch/sh/boards/mach-kfr2r09/setup.c | 48 ++++++++++++++++++++++++++++++++++ 4 files changed, 57 insertions(+) -- 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/Makefile +++ work/arch/sh/Makefile 2009-07-22 22:05:57.000000000 +0900 @@ -136,6 +136,7 @@ machdir-$(CONFIG_SH_7751_SYSTEMH) += ma machdir-$(CONFIG_SH_EDOSK7705) += mach-edosk7705 machdir-$(CONFIG_SH_HIGHLANDER) += mach-highlander machdir-$(CONFIG_SH_MIGOR) += mach-migor +machdir-$(CONFIG_SH_KFR2R09) += mach-kfr2r09 machdir-$(CONFIG_SH_SDK7780) += mach-sdk7780 machdir-$(CONFIG_SH_X3PROTO) += mach-x3proto machdir-$(CONFIG_SH_SH7763RDP) += mach-sh7763rdp --- 0001/arch/sh/boards/Kconfig +++ work/arch/sh/boards/Kconfig 2009-07-22 22:05:57.000000000 +0900 @@ -193,6 +193,13 @@ config SH_AP325RXA Renesas "AP-325RXA" support. Compatible with ALGO SYSTEM CO.,LTD. "AP-320A" +config SH_KFR2R09 + bool "KFR2R09" + depends on CPU_SUBTYPE_SH7724 + select ARCH_REQUIRE_GPIOLIB + help + "Kit For R2R for 2009" support. + config SH_SH7763RDP bool "SH7763RDP" depends on CPU_SUBTYPE_SH7763 --- /dev/null +++ work/arch/sh/boards/mach-kfr2r09/Makefile 2009-07-22 22:05:57.000000000 +0900 @@ -0,0 +1 @@ +obj-y := setup.o --- /dev/null +++ work/arch/sh/boards/mach-kfr2r09/setup.c 2009-07-23 00:31:19.000000000 +0900 @@ -0,0 +1,48 @@ +/* + * KFR2R09 board support code + * + * Copyright (C) 2009 Magnus Damm + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static int __init kfr2r09_devices_setup(void) +{ + /* enable SCIF1 serial port for YC401 console support */ + gpio_request(GPIO_FN_SCIF1_RXD, NULL); + gpio_request(GPIO_FN_SCIF1_TXD, NULL); + + return 0; +} +device_initcall(kfr2r09_devices_setup); + +/* Return the board specific boot mode pin configuration */ +static int kfr2r09_mode_pins(void) +{ + /* MD0=1, MD1=1, MD2=0: Clock Mode 3 + * MD3=0: 16-bit Area0 Bus Width + * MD5=1: Little Endian + * MD8=1: Test Mode Disabled + */ + return MODE_PIN0 | MODE_PIN1 | MODE_PIN5 | MODE_PIN8; +} + +/* + * The Machine Vector + */ +static struct sh_machine_vector mv_kfr2r09 __initmv = { + .mv_name = "kfr2r09", + .mv_mode_pins = kfr2r09_mode_pins, +};