diff options
author | Magnus Damm <damm@igel.co.jp> | 2009-07-22 12:20:54 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-07-23 00:15:18 -0400 |
commit | e7d165146a7de5ceb4f68e188b2679f003744f54 (patch) | |
tree | d6e4118cba7642bed65622c5d0ea6f6cfb3a3c27 /arch/sh/boards/mach-kfr2r09 | |
parent | 4be3bd7849165e7efa6b0b35a23d6a3598d97465 (diff) |
sh: kfr2r09 board support - SCIF console
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 <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boards/mach-kfr2r09')
-rw-r--r-- | arch/sh/boards/mach-kfr2r09/Makefile | 1 | ||||
-rw-r--r-- | arch/sh/boards/mach-kfr2r09/setup.c | 48 |
2 files changed, 49 insertions, 0 deletions
diff --git a/arch/sh/boards/mach-kfr2r09/Makefile b/arch/sh/boards/mach-kfr2r09/Makefile new file mode 100644 index 000000000000..77037567633b --- /dev/null +++ b/arch/sh/boards/mach-kfr2r09/Makefile | |||
@@ -0,0 +1 @@ | |||
obj-y := setup.o | |||
diff --git a/arch/sh/boards/mach-kfr2r09/setup.c b/arch/sh/boards/mach-kfr2r09/setup.c new file mode 100644 index 000000000000..224318abc9e6 --- /dev/null +++ b/arch/sh/boards/mach-kfr2r09/setup.c | |||
@@ -0,0 +1,48 @@ | |||
1 | /* | ||
2 | * KFR2R09 board support code | ||
3 | * | ||
4 | * Copyright (C) 2009 Magnus Damm | ||
5 | * | ||
6 | * This file is subject to the terms and conditions of the GNU General Public | ||
7 | * License. See the file "COPYING" in the main directory of this archive | ||
8 | * for more details. | ||
9 | */ | ||
10 | #include <linux/init.h> | ||
11 | #include <linux/platform_device.h> | ||
12 | #include <linux/interrupt.h> | ||
13 | #include <linux/delay.h> | ||
14 | #include <linux/clk.h> | ||
15 | #include <linux/gpio.h> | ||
16 | #include <asm/clock.h> | ||
17 | #include <asm/machvec.h> | ||
18 | #include <asm/io.h> | ||
19 | #include <cpu/sh7724.h> | ||
20 | |||
21 | static int __init kfr2r09_devices_setup(void) | ||
22 | { | ||
23 | /* enable SCIF1 serial port for YC401 console support */ | ||
24 | gpio_request(GPIO_FN_SCIF1_RXD, NULL); | ||
25 | gpio_request(GPIO_FN_SCIF1_TXD, NULL); | ||
26 | |||
27 | return 0; | ||
28 | } | ||
29 | device_initcall(kfr2r09_devices_setup); | ||
30 | |||
31 | /* Return the board specific boot mode pin configuration */ | ||
32 | static int kfr2r09_mode_pins(void) | ||
33 | { | ||
34 | /* MD0=1, MD1=1, MD2=0: Clock Mode 3 | ||
35 | * MD3=0: 16-bit Area0 Bus Width | ||
36 | * MD5=1: Little Endian | ||
37 | * MD8=1: Test Mode Disabled | ||
38 | */ | ||
39 | return MODE_PIN0 | MODE_PIN1 | MODE_PIN5 | MODE_PIN8; | ||
40 | } | ||
41 | |||
42 | /* | ||
43 | * The Machine Vector | ||
44 | */ | ||
45 | static struct sh_machine_vector mv_kfr2r09 __initmv = { | ||
46 | .mv_name = "kfr2r09", | ||
47 | .mv_mode_pins = kfr2r09_mode_pins, | ||
48 | }; | ||