From 871480933a1c28f8a9fed4c4d34d06c439a7a422 Mon Sep 17 00:00:00 2001 From: Srikant Patnaik Date: Sun, 11 Jan 2015 12:28:04 +0530 Subject: Moved, renamed, and deleted files The original directory structure was scattered and unorganized. Changes are basically to make it look like kernel structure. --- arch/arm/mach-shmobile/Kconfig | 169 ++ arch/arm/mach-shmobile/Makefile | 55 + arch/arm/mach-shmobile/Makefile.boot | 9 + arch/arm/mach-shmobile/board-ag5evm.c | 584 ++++ arch/arm/mach-shmobile/board-ap4evb.c | 1444 ++++++++++ arch/arm/mach-shmobile/board-bonito.c | 504 ++++ arch/arm/mach-shmobile/board-g3evm.c | 342 +++ arch/arm/mach-shmobile/board-g4evm.c | 385 +++ arch/arm/mach-shmobile/board-kota2.c | 525 ++++ arch/arm/mach-shmobile/board-mackerel.c | 1609 +++++++++++ arch/arm/mach-shmobile/board-marzen.c | 102 + arch/arm/mach-shmobile/clock-r8a7740.c | 382 +++ arch/arm/mach-shmobile/clock-r8a7779.c | 176 ++ arch/arm/mach-shmobile/clock-sh7367.c | 355 +++ arch/arm/mach-shmobile/clock-sh7372.c | 719 +++++ arch/arm/mach-shmobile/clock-sh7377.c | 366 +++ arch/arm/mach-shmobile/clock-sh73a0.c | 626 +++++ arch/arm/mach-shmobile/clock.c | 47 + arch/arm/mach-shmobile/console.c | 31 + arch/arm/mach-shmobile/cpuidle.c | 68 + arch/arm/mach-shmobile/entry-intc.S | 54 + arch/arm/mach-shmobile/headsmp.S | 81 + arch/arm/mach-shmobile/hotplug.c | 71 + arch/arm/mach-shmobile/include/mach/clkdev.h | 7 + arch/arm/mach-shmobile/include/mach/common.h | 86 + arch/arm/mach-shmobile/include/mach/dma.h | 1 + arch/arm/mach-shmobile/include/mach/gpio.h | 30 + arch/arm/mach-shmobile/include/mach/hardware.h | 4 + .../arm/mach-shmobile/include/mach/head-ap4evb.txt | 93 + .../mach-shmobile/include/mach/head-mackerel.txt | 93 + arch/arm/mach-shmobile/include/mach/intc.h | 246 ++ arch/arm/mach-shmobile/include/mach/irqs.h | 14 + arch/arm/mach-shmobile/include/mach/memory.h | 7 + arch/arm/mach-shmobile/include/mach/mmc-ap4eb.h | 29 + arch/arm/mach-shmobile/include/mach/mmc-mackerel.h | 38 + arch/arm/mach-shmobile/include/mach/mmc.h | 18 + arch/arm/mach-shmobile/include/mach/r8a7740.h | 584 ++++ arch/arm/mach-shmobile/include/mach/r8a7779.h | 363 +++ arch/arm/mach-shmobile/include/mach/sdhi-sh7372.h | 21 + arch/arm/mach-shmobile/include/mach/sdhi.h | 16 + arch/arm/mach-shmobile/include/mach/sh7367.h | 332 +++ arch/arm/mach-shmobile/include/mach/sh7372.h | 521 ++++ arch/arm/mach-shmobile/include/mach/sh7377.h | 360 +++ arch/arm/mach-shmobile/include/mach/sh73a0.h | 522 ++++ arch/arm/mach-shmobile/include/mach/system.h | 11 + arch/arm/mach-shmobile/include/mach/timex.h | 6 + arch/arm/mach-shmobile/include/mach/uncompress.h | 21 + arch/arm/mach-shmobile/include/mach/zboot.h | 23 + arch/arm/mach-shmobile/include/mach/zboot_macros.h | 65 + arch/arm/mach-shmobile/intc-r8a7740.c | 632 +++++ arch/arm/mach-shmobile/intc-r8a7779.c | 58 + arch/arm/mach-shmobile/intc-sh7367.c | 413 +++ arch/arm/mach-shmobile/intc-sh7372.c | 664 +++++ arch/arm/mach-shmobile/intc-sh7377.c | 592 +++++ arch/arm/mach-shmobile/intc-sh73a0.c | 464 ++++ arch/arm/mach-shmobile/pfc-r8a7740.c | 2562 ++++++++++++++++++ arch/arm/mach-shmobile/pfc-r8a7779.c | 2645 ++++++++++++++++++ arch/arm/mach-shmobile/pfc-sh7367.c | 1727 ++++++++++++ arch/arm/mach-shmobile/pfc-sh7372.c | 1663 ++++++++++++ arch/arm/mach-shmobile/pfc-sh7377.c | 1688 ++++++++++++ arch/arm/mach-shmobile/pfc-sh73a0.c | 2803 ++++++++++++++++++++ arch/arm/mach-shmobile/platsmp.c | 96 + arch/arm/mach-shmobile/pm-r8a7779.c | 248 ++ arch/arm/mach-shmobile/pm-sh7372.c | 584 ++++ arch/arm/mach-shmobile/setup-r8a7740.c | 398 +++ arch/arm/mach-shmobile/setup-r8a7779.c | 298 +++ arch/arm/mach-shmobile/setup-sh7367.c | 481 ++++ arch/arm/mach-shmobile/setup-sh7372.c | 1094 ++++++++ arch/arm/mach-shmobile/setup-sh7377.c | 502 ++++ arch/arm/mach-shmobile/setup-sh73a0.c | 711 +++++ arch/arm/mach-shmobile/sleep-sh7372.S | 96 + arch/arm/mach-shmobile/smp-r8a7779.c | 158 ++ arch/arm/mach-shmobile/smp-sh73a0.c | 106 + arch/arm/mach-shmobile/suspend.c | 47 + arch/arm/mach-shmobile/timer.c | 51 + 75 files changed, 32996 insertions(+) create mode 100644 arch/arm/mach-shmobile/Kconfig create mode 100644 arch/arm/mach-shmobile/Makefile create mode 100644 arch/arm/mach-shmobile/Makefile.boot create mode 100644 arch/arm/mach-shmobile/board-ag5evm.c create mode 100644 arch/arm/mach-shmobile/board-ap4evb.c create mode 100644 arch/arm/mach-shmobile/board-bonito.c create mode 100644 arch/arm/mach-shmobile/board-g3evm.c create mode 100644 arch/arm/mach-shmobile/board-g4evm.c create mode 100644 arch/arm/mach-shmobile/board-kota2.c create mode 100644 arch/arm/mach-shmobile/board-mackerel.c create mode 100644 arch/arm/mach-shmobile/board-marzen.c create mode 100644 arch/arm/mach-shmobile/clock-r8a7740.c create mode 100644 arch/arm/mach-shmobile/clock-r8a7779.c create mode 100644 arch/arm/mach-shmobile/clock-sh7367.c create mode 100644 arch/arm/mach-shmobile/clock-sh7372.c create mode 100644 arch/arm/mach-shmobile/clock-sh7377.c create mode 100644 arch/arm/mach-shmobile/clock-sh73a0.c create mode 100644 arch/arm/mach-shmobile/clock.c create mode 100644 arch/arm/mach-shmobile/console.c create mode 100644 arch/arm/mach-shmobile/cpuidle.c create mode 100644 arch/arm/mach-shmobile/entry-intc.S create mode 100644 arch/arm/mach-shmobile/headsmp.S create mode 100644 arch/arm/mach-shmobile/hotplug.c create mode 100644 arch/arm/mach-shmobile/include/mach/clkdev.h create mode 100644 arch/arm/mach-shmobile/include/mach/common.h create mode 100644 arch/arm/mach-shmobile/include/mach/dma.h create mode 100644 arch/arm/mach-shmobile/include/mach/gpio.h create mode 100644 arch/arm/mach-shmobile/include/mach/hardware.h create mode 100644 arch/arm/mach-shmobile/include/mach/head-ap4evb.txt create mode 100644 arch/arm/mach-shmobile/include/mach/head-mackerel.txt create mode 100644 arch/arm/mach-shmobile/include/mach/intc.h create mode 100644 arch/arm/mach-shmobile/include/mach/irqs.h create mode 100644 arch/arm/mach-shmobile/include/mach/memory.h create mode 100644 arch/arm/mach-shmobile/include/mach/mmc-ap4eb.h create mode 100644 arch/arm/mach-shmobile/include/mach/mmc-mackerel.h create mode 100644 arch/arm/mach-shmobile/include/mach/mmc.h create mode 100644 arch/arm/mach-shmobile/include/mach/r8a7740.h create mode 100644 arch/arm/mach-shmobile/include/mach/r8a7779.h create mode 100644 arch/arm/mach-shmobile/include/mach/sdhi-sh7372.h create mode 100644 arch/arm/mach-shmobile/include/mach/sdhi.h create mode 100644 arch/arm/mach-shmobile/include/mach/sh7367.h create mode 100644 arch/arm/mach-shmobile/include/mach/sh7372.h create mode 100644 arch/arm/mach-shmobile/include/mach/sh7377.h create mode 100644 arch/arm/mach-shmobile/include/mach/sh73a0.h create mode 100644 arch/arm/mach-shmobile/include/mach/system.h create mode 100644 arch/arm/mach-shmobile/include/mach/timex.h create mode 100644 arch/arm/mach-shmobile/include/mach/uncompress.h create mode 100644 arch/arm/mach-shmobile/include/mach/zboot.h create mode 100644 arch/arm/mach-shmobile/include/mach/zboot_macros.h create mode 100644 arch/arm/mach-shmobile/intc-r8a7740.c create mode 100644 arch/arm/mach-shmobile/intc-r8a7779.c create mode 100644 arch/arm/mach-shmobile/intc-sh7367.c create mode 100644 arch/arm/mach-shmobile/intc-sh7372.c create mode 100644 arch/arm/mach-shmobile/intc-sh7377.c create mode 100644 arch/arm/mach-shmobile/intc-sh73a0.c create mode 100644 arch/arm/mach-shmobile/pfc-r8a7740.c create mode 100644 arch/arm/mach-shmobile/pfc-r8a7779.c create mode 100644 arch/arm/mach-shmobile/pfc-sh7367.c create mode 100644 arch/arm/mach-shmobile/pfc-sh7372.c create mode 100644 arch/arm/mach-shmobile/pfc-sh7377.c create mode 100644 arch/arm/mach-shmobile/pfc-sh73a0.c create mode 100644 arch/arm/mach-shmobile/platsmp.c create mode 100644 arch/arm/mach-shmobile/pm-r8a7779.c create mode 100644 arch/arm/mach-shmobile/pm-sh7372.c create mode 100644 arch/arm/mach-shmobile/setup-r8a7740.c create mode 100644 arch/arm/mach-shmobile/setup-r8a7779.c create mode 100644 arch/arm/mach-shmobile/setup-sh7367.c create mode 100644 arch/arm/mach-shmobile/setup-sh7372.c create mode 100644 arch/arm/mach-shmobile/setup-sh7377.c create mode 100644 arch/arm/mach-shmobile/setup-sh73a0.c create mode 100644 arch/arm/mach-shmobile/sleep-sh7372.S create mode 100644 arch/arm/mach-shmobile/smp-r8a7779.c create mode 100644 arch/arm/mach-shmobile/smp-sh73a0.c create mode 100644 arch/arm/mach-shmobile/suspend.c create mode 100644 arch/arm/mach-shmobile/timer.c (limited to 'arch/arm/mach-shmobile') diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig new file mode 100644 index 00000000..34560cab --- /dev/null +++ b/arch/arm/mach-shmobile/Kconfig @@ -0,0 +1,169 @@ +if ARCH_SHMOBILE + +comment "SH-Mobile System Type" + +config ARCH_SH7367 + bool "SH-Mobile G3 (SH7367)" + select CPU_V6 + select SH_CLK_CPG + select ARCH_WANT_OPTIONAL_GPIOLIB + +config ARCH_SH7377 + bool "SH-Mobile G4 (SH7377)" + select CPU_V7 + select SH_CLK_CPG + select ARCH_WANT_OPTIONAL_GPIOLIB + +config ARCH_SH7372 + bool "SH-Mobile AP4 (SH7372)" + select CPU_V7 + select SH_CLK_CPG + select ARCH_WANT_OPTIONAL_GPIOLIB + +config ARCH_SH73A0 + bool "SH-Mobile AG5 (R8A73A00)" + select CPU_V7 + select SH_CLK_CPG + select ARCH_WANT_OPTIONAL_GPIOLIB + select ARM_GIC + select I2C + +config ARCH_R8A7740 + bool "R-Mobile A1 (R8A77400)" + select CPU_V7 + select SH_CLK_CPG + select ARCH_WANT_OPTIONAL_GPIOLIB + +config ARCH_R8A7779 + bool "R-Car H1 (R8A77790)" + select CPU_V7 + select SH_CLK_CPG + select ARM_GIC + select ARCH_WANT_OPTIONAL_GPIOLIB + +comment "SH-Mobile Board Type" + +config MACH_G3EVM + bool "G3EVM board" + depends on ARCH_SH7367 + select ARCH_REQUIRE_GPIOLIB + +config MACH_G4EVM + bool "G4EVM board" + depends on ARCH_SH7377 + select ARCH_REQUIRE_GPIOLIB + +config MACH_AP4EVB + bool "AP4EVB board" + depends on ARCH_SH7372 + select ARCH_REQUIRE_GPIOLIB + select SH_LCD_MIPI_DSI + +choice + prompt "AP4EVB LCD panel selection" + default AP4EVB_QHD + depends on MACH_AP4EVB + +config AP4EVB_QHD + bool "MIPI-DSI QHD (960x540)" + +config AP4EVB_WVGA + bool "Parallel WVGA (800x480)" + +endchoice + +config MACH_AG5EVM + bool "AG5EVM board" + select ARCH_REQUIRE_GPIOLIB + select SH_LCD_MIPI_DSI + depends on ARCH_SH73A0 + +config MACH_MACKEREL + bool "mackerel board" + depends on ARCH_SH7372 + select ARCH_REQUIRE_GPIOLIB + +config MACH_KOTA2 + bool "KOTA2 board" + select ARCH_REQUIRE_GPIOLIB + depends on ARCH_SH73A0 + +config MACH_BONITO + bool "bonito board" + select ARCH_REQUIRE_GPIOLIB + depends on ARCH_R8A7740 + +config MACH_MARZEN + bool "MARZEN board" + depends on ARCH_R8A7779 + select ARCH_REQUIRE_GPIOLIB + +comment "SH-Mobile System Configuration" + +config CPU_HAS_INTEVT + bool + default y + +menu "Memory configuration" + +config MEMORY_START + hex "Physical memory start address" + default "0x50000000" if MACH_G3EVM + default "0x40000000" if MACH_G4EVM || MACH_AP4EVB || MACH_AG5EVM || \ + MACH_MACKEREL || MACH_BONITO + default "0x41000000" if MACH_KOTA2 + default "0x00000000" + ---help--- + Tweak this only when porting to a new machine which does not + already have a defconfig. Changing it from the known correct + value on any of the known systems will only lead to disaster. + +config MEMORY_SIZE + hex "Physical memory size" + default "0x08000000" if MACH_G3EVM + default "0x08000000" if MACH_G4EVM + default "0x20000000" if MACH_AG5EVM || MACH_BONITO + default "0x1e000000" if MACH_KOTA2 + default "0x10000000" if MACH_AP4EVB || MACH_MACKEREL + default "0x04000000" + help + This sets the default memory size assumed by your kernel. It can + be overridden as normal by the 'mem=' argument on the kernel command + line. + +endmenu + +menu "Timer and clock configuration" + +config SHMOBILE_TIMER_HZ + int "Kernel HZ (jiffies per second)" + range 32 1024 + default "128" + help + Allows the configuration of the timer frequency. It is customary + to have the timer interrupt run at 1000 Hz or 100 Hz, but in the + case of low timer frequencies other values may be more suitable. + SH-Mobile systems using a 32768 Hz RCLK for clock events may want + to select a HZ value such as 128 that can evenly divide RCLK. + A HZ value that does not divide evenly may cause timer drift. + +config SH_TIMER_CMT + bool "CMT timer driver" + default y + help + This enables build of the CMT timer driver. + +config SH_TIMER_TMU + bool "TMU timer driver" + default y + help + This enables build of the TMU timer driver. + +endmenu + +config SH_CLK_CPG + bool + +source "drivers/sh/Kconfig" + +endif diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile new file mode 100644 index 00000000..e7c2590b --- /dev/null +++ b/arch/arm/mach-shmobile/Makefile @@ -0,0 +1,55 @@ +# +# Makefile for the linux kernel. +# + +# Common objects +obj-y := timer.o console.o clock.o + +# CPU objects +obj-$(CONFIG_ARCH_SH7367) += setup-sh7367.o clock-sh7367.o intc-sh7367.o +obj-$(CONFIG_ARCH_SH7377) += setup-sh7377.o clock-sh7377.o intc-sh7377.o +obj-$(CONFIG_ARCH_SH7372) += setup-sh7372.o clock-sh7372.o intc-sh7372.o +obj-$(CONFIG_ARCH_SH73A0) += setup-sh73a0.o clock-sh73a0.o intc-sh73a0.o +obj-$(CONFIG_ARCH_R8A7740) += setup-r8a7740.o clock-r8a7740.o intc-r8a7740.o +obj-$(CONFIG_ARCH_R8A7779) += setup-r8a7779.o clock-r8a7779.o intc-r8a7779.o + +# SMP objects +smp-y := platsmp.o headsmp.o +smp-$(CONFIG_HOTPLUG_CPU) += hotplug.o +smp-$(CONFIG_ARCH_SH73A0) += smp-sh73a0.o +smp-$(CONFIG_ARCH_R8A7779) += smp-r8a7779.o + +# Pinmux setup +pfc-y := +pfc-$(CONFIG_ARCH_SH7367) += pfc-sh7367.o +pfc-$(CONFIG_ARCH_SH7377) += pfc-sh7377.o +pfc-$(CONFIG_ARCH_SH7372) += pfc-sh7372.o +pfc-$(CONFIG_ARCH_SH73A0) += pfc-sh73a0.o +pfc-$(CONFIG_ARCH_R8A7740) += pfc-r8a7740.o +pfc-$(CONFIG_ARCH_R8A7779) += pfc-r8a7779.o + +# IRQ objects +obj-$(CONFIG_ARCH_SH7367) += entry-intc.o +obj-$(CONFIG_ARCH_SH7377) += entry-intc.o +obj-$(CONFIG_ARCH_SH7372) += entry-intc.o +obj-$(CONFIG_ARCH_R8A7740) += entry-intc.o + +# PM objects +obj-$(CONFIG_SUSPEND) += suspend.o +obj-$(CONFIG_CPU_IDLE) += cpuidle.o +obj-$(CONFIG_ARCH_SH7372) += pm-sh7372.o sleep-sh7372.o +obj-$(CONFIG_ARCH_R8A7779) += pm-r8a7779.o + +# Board objects +obj-$(CONFIG_MACH_G3EVM) += board-g3evm.o +obj-$(CONFIG_MACH_G4EVM) += board-g4evm.o +obj-$(CONFIG_MACH_AP4EVB) += board-ap4evb.o +obj-$(CONFIG_MACH_AG5EVM) += board-ag5evm.o +obj-$(CONFIG_MACH_MACKEREL) += board-mackerel.o +obj-$(CONFIG_MACH_KOTA2) += board-kota2.o +obj-$(CONFIG_MACH_BONITO) += board-bonito.o +obj-$(CONFIG_MACH_MARZEN) += board-marzen.o + +# Framework support +obj-$(CONFIG_SMP) += $(smp-y) +obj-$(CONFIG_GENERIC_GPIO) += $(pfc-y) diff --git a/arch/arm/mach-shmobile/Makefile.boot b/arch/arm/mach-shmobile/Makefile.boot new file mode 100644 index 00000000..498efd99 --- /dev/null +++ b/arch/arm/mach-shmobile/Makefile.boot @@ -0,0 +1,9 @@ +__ZRELADDR := $(shell /bin/bash -c 'printf "0x%08x" \ + $$[$(CONFIG_MEMORY_START) + 0x8000]') + + zreladdr-y += $(__ZRELADDR) + +# Unsupported legacy stuff +# +#params_phys-y (Instead: Pass atags pointer in r2) +#initrd_phys-y (Instead: Use compiled-in initramfs) diff --git a/arch/arm/mach-shmobile/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c new file mode 100644 index 00000000..0891ec6e --- /dev/null +++ b/arch/arm/mach-shmobile/board-ag5evm.c @@ -0,0 +1,584 @@ +/* + * arch/arm/mach-shmobile/board-ag5evm.c + * + * Copyright (C) 2010 Takashi Yoshii + * Copyright (C) 2009 Yoshihiro Shimoda + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include