From f013a5e46b915a2c6027ba69220d113e786d952b Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Sun, 23 Aug 2009 18:04:07 +0900 Subject: [PATCH] --- yaml --- r: 163515 b: refs/heads/master c: c3144fc46f987413df10e83659f0bf1aad76f79e h: refs/heads/master i: 163513: 9a9e0035a6661c9ef2ca66464f3a4dea9914074a 163511: 3c9dfe37d70fe6a7c71a5a41052b7c1142104ff3 v: v3 --- [refs] | 2 +- trunk/arch/sh/Kconfig | 7 + trunk/arch/sh/Kconfig.debug | 1 + trunk/arch/sh/Makefile | 1 + trunk/arch/sh/boards/Kconfig | 7 + trunk/arch/sh/boards/mach-ecovec24/Makefile | 9 + trunk/arch/sh/boards/mach-ecovec24/setup.c | 129 ++ trunk/arch/sh/boards/mach-kfr2r09/setup.c | 110 + trunk/arch/sh/boards/mach-se/7724/setup.c | 35 +- trunk/arch/sh/configs/ecovec24_defconfig | 1550 +++++++++++++ .../sh/configs/kfr2r09-romimage_defconfig | 774 +++++++ trunk/arch/sh/configs/kfr2r09_defconfig | 212 +- trunk/arch/sh/configs/snapgear_defconfig | 77 +- trunk/arch/sh/drivers/dma/Kconfig | 6 +- trunk/arch/sh/drivers/heartbeat.c | 10 + trunk/arch/sh/include/asm/bug.h | 31 + trunk/arch/sh/include/asm/dwarf.h | 32 +- trunk/arch/sh/include/asm/heartbeat.h | 1 + trunk/arch/sh/include/asm/pgtable_32.h | 8 + trunk/arch/sh/include/asm/processor.h | 2 +- trunk/arch/sh/include/asm/system.h | 5 + trunk/arch/sh/include/asm/system_32.h | 26 +- trunk/arch/sh/include/asm/unwinder.h | 6 + trunk/arch/sh/include/cpu-sh4/cpu/freq.h | 4 + trunk/arch/sh/include/cpu-sh4/cpu/sh7757.h | 243 ++ .../mach-kfr2r09/mach/partner-jet-setup.txt | 7 + .../sh/include/mach-kfr2r09/mach/romimage.h | 13 + trunk/arch/sh/kernel/Makefile | 43 +- trunk/arch/sh/kernel/Makefile_32 | 40 - trunk/arch/sh/kernel/Makefile_64 | 20 - trunk/arch/sh/kernel/cpu/sh3/entry.S | 10 + trunk/arch/sh/kernel/cpu/sh4/probe.c | 11 +- trunk/arch/sh/kernel/cpu/sh4a/Makefile | 3 + trunk/arch/sh/kernel/cpu/sh4a/clock-sh7724.c | 2 +- trunk/arch/sh/kernel/cpu/sh4a/clock-sh7757.c | 130 ++ trunk/arch/sh/kernel/cpu/sh4a/pinmux-sh7757.c | 2019 +++++++++++++++++ trunk/arch/sh/kernel/cpu/sh4a/setup-sh7757.c | 513 +++++ trunk/arch/sh/kernel/cpu/shmobile/cpuidle.c | 11 + trunk/arch/sh/kernel/cpu/shmobile/pm.c | 16 +- trunk/arch/sh/kernel/cpu/shmobile/sleep.S | 155 +- trunk/arch/sh/kernel/dwarf.c | 330 +-- trunk/arch/sh/kernel/entry-common.S | 27 +- trunk/arch/sh/kernel/irq.c | 4 - trunk/arch/sh/kernel/ptrace_32.c | 4 + trunk/arch/sh/kernel/setup.c | 2 +- trunk/arch/sh/kernel/traps.c | 24 +- trunk/arch/sh/kernel/traps_32.c | 1 + trunk/arch/sh/kernel/unwinder.c | 16 +- trunk/arch/sh/mm/Kconfig | 7 +- trunk/arch/sh/mm/tlb-sh4.c | 9 +- trunk/arch/sh/tools/mach-types | 1 + trunk/drivers/rtc/rtc-ds1302.c | 69 +- trunk/drivers/rtc/rtc-sh.c | 93 +- trunk/drivers/serial/sh-sci.c | 3 +- trunk/drivers/serial/sh-sci.h | 17 + trunk/drivers/usb/gadget/Kconfig | 18 + trunk/drivers/usb/gadget/Makefile | 1 + trunk/drivers/usb/gadget/gadget_chips.h | 8 + trunk/drivers/usb/gadget/r8a66597-udc.c | 1689 ++++++++++++++ trunk/drivers/usb/gadget/r8a66597-udc.h | 256 +++ 60 files changed, 8393 insertions(+), 467 deletions(-) create mode 100644 trunk/arch/sh/boards/mach-ecovec24/Makefile create mode 100644 trunk/arch/sh/boards/mach-ecovec24/setup.c create mode 100644 trunk/arch/sh/configs/ecovec24_defconfig create mode 100644 trunk/arch/sh/configs/kfr2r09-romimage_defconfig create mode 100644 trunk/arch/sh/include/cpu-sh4/cpu/sh7757.h delete mode 100644 trunk/arch/sh/kernel/Makefile_32 delete mode 100644 trunk/arch/sh/kernel/Makefile_64 create mode 100644 trunk/arch/sh/kernel/cpu/sh4a/clock-sh7757.c create mode 100644 trunk/arch/sh/kernel/cpu/sh4a/pinmux-sh7757.c create mode 100644 trunk/arch/sh/kernel/cpu/sh4a/setup-sh7757.c create mode 100644 trunk/drivers/usb/gadget/r8a66597-udc.c create mode 100644 trunk/drivers/usb/gadget/r8a66597-udc.h diff --git a/[refs] b/[refs] index c29e81961845..10f7836c081c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: cc58f597afc63a57bb55ed97c2a72f7405320c93 +refs/heads/master: c3144fc46f987413df10e83659f0bf1aad76f79e diff --git a/trunk/arch/sh/Kconfig b/trunk/arch/sh/Kconfig index 2a16014d9de3..80b4f9a743a1 100644 --- a/trunk/arch/sh/Kconfig +++ b/trunk/arch/sh/Kconfig @@ -398,6 +398,13 @@ config CPU_SUBTYPE_SH7724 help Select SH7724 if you have an SH-MobileR2R CPU. +config CPU_SUBTYPE_SH7757 + bool "Support SH7757 processor" + select CPU_SH4A + select CPU_SHX2 + help + Select SH7757 if you have a SH4A SH7757 CPU. + config CPU_SUBTYPE_SH7763 bool "Support SH7763 processor" select CPU_SH4A diff --git a/trunk/arch/sh/Kconfig.debug b/trunk/arch/sh/Kconfig.debug index 741d20fab2e1..55907af1dc25 100644 --- a/trunk/arch/sh/Kconfig.debug +++ b/trunk/arch/sh/Kconfig.debug @@ -38,6 +38,7 @@ config EARLY_SCIF_CONSOLE_PORT default "0xffe00000" if CPU_SUBTYPE_SH7780 || CPU_SUBTYPE_SH7763 || \ CPU_SUBTYPE_SH7722 || CPU_SUBTYPE_SH7366 || \ CPU_SUBTYPE_SH7343 + default "0xfe4c0000" if CPU_SUBTYPE_SH7757 default "0xffeb0000" if CPU_SUBTYPE_SH7785 default "0xffeb0000" if CPU_SUBTYPE_SH7786 default "0xfffe8000" if CPU_SUBTYPE_SH7203 diff --git a/trunk/arch/sh/Makefile b/trunk/arch/sh/Makefile index e26421bf9976..fc51a918b31a 100644 --- a/trunk/arch/sh/Makefile +++ b/trunk/arch/sh/Makefile @@ -137,6 +137,7 @@ 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_ECOVEC) += mach-ecovec24 machdir-$(CONFIG_SH_SDK7780) += mach-sdk7780 machdir-$(CONFIG_SH_X3PROTO) += mach-x3proto machdir-$(CONFIG_SH_SH7763RDP) += mach-sh7763rdp diff --git a/trunk/arch/sh/boards/Kconfig b/trunk/arch/sh/boards/Kconfig index db04c85971ad..b66f6d16523e 100644 --- a/trunk/arch/sh/boards/Kconfig +++ b/trunk/arch/sh/boards/Kconfig @@ -200,6 +200,13 @@ config SH_KFR2R09 help "Kit For R2R for 2009" support. +config SH_ECOVEC + bool "EcoVec" + depends on CPU_SUBTYPE_SH7724 + select ARCH_REQUIRE_GPIOLIB + help + Renesas "R0P7724LC0011/21RL (EcoVec)" support. + config SH_SH7763RDP bool "SH7763RDP" depends on CPU_SUBTYPE_SH7763 diff --git a/trunk/arch/sh/boards/mach-ecovec24/Makefile b/trunk/arch/sh/boards/mach-ecovec24/Makefile new file mode 100644 index 000000000000..51f852151655 --- /dev/null +++ b/trunk/arch/sh/boards/mach-ecovec24/Makefile @@ -0,0 +1,9 @@ +# +# Makefile for the R0P7724LC0011/21RL (EcoVec) +# +# 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. +# + +obj-y := setup.o \ No newline at end of file diff --git a/trunk/arch/sh/boards/mach-ecovec24/setup.c b/trunk/arch/sh/boards/mach-ecovec24/setup.c new file mode 100644 index 000000000000..b634a72da1e6 --- /dev/null +++ b/trunk/arch/sh/boards/mach-ecovec24/setup.c @@ -0,0 +1,129 @@ +/* + * Copyright (C) 2009 Renesas Solutions Corp. + * + * Kuninori Morimoto + * + * 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 + +/* + * Area Address Interface size BusWidth + * 0 0x0000_0000 ~ 0x03FF_FFFF FROM 64MB 16bit + * 1 0x0400_0000 ~ 0x07FF_FFFF Internal I/O 64MB 16/32bit + * 2 0x0800_0000 ~ 0x0BFF_FFFF DRAM 2 64MB 32bit + * 3 0x0C00_0000 ~ 0x0FFF_FFFF DRAM 3 64MB 32bit + * 4 0x1000_0000 ~ 0x13FF_FFFF DRAM 4 64MB 32bit + * 5 0x1400_0000 ~ 0x17FF_FFFF DRAM 5 64MB 32bit + * 6 0x1800_0000 ~ 0x1BFF_FFFF MFI 64MB 16bit + */ + +/* Heartbeat */ +static unsigned char led_pos[] = { 0, 1, 2, 3 }; +static struct heartbeat_data heartbeat_data = { + .regsize = 8, + .nr_bits = 4, + .bit_pos = led_pos, +}; + +static struct resource heartbeat_resources[] = { + [0] = { + .start = 0xA405012C, /* PTG */ + .end = 0xA405012E - 1, + .flags = IORESOURCE_MEM, + }, +}; + +static struct platform_device heartbeat_device = { + .name = "heartbeat", + .id = -1, + .dev = { + .platform_data = &heartbeat_data, + }, + .num_resources = ARRAY_SIZE(heartbeat_resources), + .resource = heartbeat_resources, +}; + +/* MTD */ +static struct mtd_partition nor_flash_partitions[] = { + { + .name = "uboot", + .offset = 0, + .size = (256 * 1024), + .mask_flags = MTD_CAP_ROM, + }, { + .name = "kernel", + .offset = MTDPART_OFS_APPEND, + .size = (2 * 1024 * 1024), + }, { + .name = "free-area", + .offset = MTDPART_OFS_APPEND, + .size = MTDPART_SIZ_FULL, + }, +}; + +static struct physmap_flash_data nor_flash_data = { + .width = 2, + .parts = nor_flash_partitions, + .nr_parts = ARRAY_SIZE(nor_flash_partitions), +}; + +static struct resource nor_flash_resources[] = { + [0] = { + .name = "NOR Flash", + .start = 0x00000000, + .end = 0x03ffffff, + .flags = IORESOURCE_MEM, + } +}; + +static struct platform_device nor_flash_device = { + .name = "physmap-flash", + .resource = nor_flash_resources, + .num_resources = ARRAY_SIZE(nor_flash_resources), + .dev = { + .platform_data = &nor_flash_data, + }, +}; + +static struct platform_device *ecovec_devices[] __initdata = { + &heartbeat_device, + &nor_flash_device, +}; + +static int __init devices_setup(void) +{ + /* enable SCIFA0 */ + gpio_request(GPIO_FN_SCIF0_TXD, NULL); + gpio_request(GPIO_FN_SCIF0_RXD, NULL); + gpio_request(GPIO_FN_SCIF0_SCK, NULL); + + /* enable debug LED */ + gpio_request(GPIO_PTG0, NULL); + gpio_request(GPIO_PTG1, NULL); + gpio_request(GPIO_PTG2, NULL); + gpio_request(GPIO_PTG3, NULL); + gpio_direction_output(GPIO_PTT0, 0); + gpio_direction_output(GPIO_PTT1, 0); + gpio_direction_output(GPIO_PTT2, 0); + gpio_direction_output(GPIO_PTT3, 0); + + return platform_add_devices(ecovec_devices, + ARRAY_SIZE(ecovec_devices)); +} +device_initcall(devices_setup); + +static struct sh_machine_vector mv_ecovec __initmv = { + .mv_name = "R0P7724 (EcoVec)", +}; diff --git a/trunk/arch/sh/boards/mach-kfr2r09/setup.c b/trunk/arch/sh/boards/mach-kfr2r09/setup.c index f9ba43635dc1..7155be0d1154 100644 --- a/trunk/arch/sh/boards/mach-kfr2r09/setup.c +++ b/trunk/arch/sh/boards/mach-kfr2r09/setup.c @@ -16,6 +16,8 @@ #include #include #include +#include +#include #include