···621621 help622622 Support for Intel/Marvell's PXA2xx/PXA3xx processor line.623623624624-config ARCH_SHMOBILE_LEGACY625625- bool "Renesas ARM SoCs (non-multiplatform)"626626- select ARCH_SHMOBILE627627- select ARM_PATCH_PHYS_VIRT if MMU628628- select CLKDEV_LOOKUP629629- select CPU_V7630630- select GENERIC_CLOCKEVENTS631631- select HAVE_ARM_SCU if SMP632632- select HAVE_ARM_TWD if SMP633633- select HAVE_SMP634634- select MIGHT_HAVE_CACHE_L2X0635635- select MULTI_IRQ_HANDLER636636- select NO_IOPORT_MAP637637- select PINCTRL638638- select PM_GENERIC_DOMAINS if PM639639- select SH_CLK_CPG640640- select SPARSE_IRQ641641- help642642- Support for Renesas ARM SoC platforms using a non-multiplatform643643- kernel. This includes the SH-Mobile, R-Mobile, EMMA-Mobile, R-Car644644- and RZ families.645645-646624config ARCH_RPC647625 bool "RiscPC"648626 select ARCH_ACORN···15121534 default 200 if ARCH_EBSA110 || ARCH_S3C24XX || \15131535 ARCH_S5PV210 || ARCH_EXYNOS415141536 default 128 if SOC_AT91RM920015151515- default SHMOBILE_TIMER_HZ if ARCH_SHMOBILE_LEGACY15161537 default 01517153815181539choice···17291752source "mm/Kconfig"1730175317311754config FORCE_MAX_ZONEORDER17321732- int "Maximum zone order" if ARCH_SHMOBILE_LEGACY17331733- range 11 64 if ARCH_SHMOBILE_LEGACY17551755+ int "Maximum zone order"17341756 default "12" if SOC_AM33XX17351757 default "9" if SA1111 || ARCH_EFM3217361758 default "11"
···11-# CONFIG_ARM_PATCH_PHYS_VIRT is not set22-CONFIG_KERNEL_LZMA=y33-CONFIG_NO_HZ=y44-CONFIG_IKCONFIG=y55-CONFIG_IKCONFIG_PROC=y66-CONFIG_LOG_BUF_SHIFT=1677-CONFIG_SYSCTL_SYSCALL=y88-CONFIG_EMBEDDED=y99-CONFIG_SLAB=y1010-# CONFIG_IOSCHED_CFQ is not set1111-CONFIG_ARCH_SHMOBILE_LEGACY=y1212-CONFIG_ARCH_R8A7778=y1313-CONFIG_MACH_BOCKW=y1414-CONFIG_MEMORY_START=0x600000001515-CONFIG_MEMORY_SIZE=0x100000001616-CONFIG_SHMOBILE_TIMER_HZ=10241717-# CONFIG_SH_TIMER_CMT is not set1818-# CONFIG_EM_TIMER_STI is not set1919-CONFIG_ARM_ERRATA_430973=y2020-CONFIG_ARM_ERRATA_458693=y2121-CONFIG_ARM_ERRATA_460075=y2222-CONFIG_ARM_ERRATA_743622=y2323-CONFIG_ARM_ERRATA_754322=y2424-CONFIG_AEABI=y2525-# CONFIG_OABI_COMPAT is not set2626-CONFIG_HIGHMEM=y2727-CONFIG_ZBOOT_ROM_TEXT=0x02828-CONFIG_ZBOOT_ROM_BSS=0x02929-CONFIG_ARM_APPENDED_DTB=y3030-CONFIG_VFP=y3131-# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set3232-CONFIG_PM=y3333-CONFIG_NET=y3434-CONFIG_PACKET=y3535-CONFIG_UNIX=y3636-CONFIG_INET=y3737-CONFIG_IP_PNP=y3838-CONFIG_IP_PNP_DHCP=y3939-# CONFIG_INET_XFRM_MODE_TRANSPORT is not set4040-# CONFIG_INET_XFRM_MODE_TUNNEL is not set4141-# CONFIG_INET_XFRM_MODE_BEET is not set4242-# CONFIG_INET_LRO is not set4343-# CONFIG_INET_DIAG is not set4444-# CONFIG_IPV6 is not set4545-CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"4646-CONFIG_DEVTMPFS=y4747-CONFIG_DEVTMPFS_MOUNT=y4848-# CONFIG_STANDALONE is not set4949-# CONFIG_PREVENT_FIRMWARE_BUILD is not set5050-# CONFIG_FW_LOADER is not set5151-CONFIG_MTD=y5252-CONFIG_MTD_CHAR=y5353-CONFIG_MTD_BLOCK=y5454-CONFIG_MTD_CFI=y5555-CONFIG_MTD_CFI_AMDSTD=y5656-CONFIG_MTD_M25P80=y5757-CONFIG_MTD_SPI_NOR=y5858-CONFIG_SCSI=y5959-CONFIG_BLK_DEV_SD=y6060-CONFIG_NETDEVICES=y6161-# CONFIG_NET_CADENCE is not set6262-# CONFIG_NET_VENDOR_BROADCOM is not set6363-# CONFIG_NET_VENDOR_CIRRUS is not set6464-# CONFIG_NET_VENDOR_FARADAY is not set6565-# CONFIG_NET_VENDOR_INTEL is not set6666-# CONFIG_NET_VENDOR_MARVELL is not set6767-# CONFIG_NET_VENDOR_MICREL is not set6868-# CONFIG_NET_VENDOR_NATSEMI is not set6969-# CONFIG_NET_VENDOR_SEEQ is not set7070-CONFIG_SMSC911X=y7171-# CONFIG_NET_VENDOR_STMICRO is not set7272-# CONFIG_NET_VENDOR_WIZNET is not set7373-# CONFIG_INPUT is not set7474-# CONFIG_SERIO is not set7575-# CONFIG_VT is not set7676-# CONFIG_LEGACY_PTYS is not set7777-# CONFIG_DEVKMEM is not set7878-CONFIG_SERIAL_SH_SCI=y7979-CONFIG_SERIAL_SH_SCI_NR_UARTS=68080-CONFIG_SERIAL_SH_SCI_CONSOLE=y8181-# CONFIG_HW_RANDOM is not set8282-# CONFIG_HWMON is not set8383-CONFIG_I2C=y8484-CONFIG_I2C_RCAR=y8585-CONFIG_GPIO_RCAR=y8686-CONFIG_REGULATOR=y8787-CONFIG_MEDIA_SUPPORT=y8888-CONFIG_MEDIA_CAMERA_SUPPORT=y8989-CONFIG_V4L_PLATFORM_DRIVERS=y9090-CONFIG_SOC_CAMERA=y9191-CONFIG_VIDEO_RCAR_VIN=y9292-# CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set9393-CONFIG_VIDEO_ML86V7667=y9494-CONFIG_SPI=y9595-CONFIG_SPI_SH_HSPI=y9696-CONFIG_SOUND=y9797-CONFIG_SND=y9898-CONFIG_SND_SOC=y9999-CONFIG_SND_SOC_RCAR=y100100-CONFIG_USB=y101101-CONFIG_USB_ANNOUNCE_NEW_DEVICES=y102102-CONFIG_USB_EHCI_HCD=y103103-CONFIG_USB_OHCI_HCD=y104104-CONFIG_USB_OHCI_HCD_PLATFORM=y105105-CONFIG_USB_EHCI_HCD_PLATFORM=y106106-CONFIG_USB_STORAGE=y107107-CONFIG_USB_RCAR_PHY=y108108-CONFIG_MMC=y109109-CONFIG_MMC_SDHI=y110110-CONFIG_MMC_SH_MMCIF=y111111-CONFIG_RTC_CLASS=y112112-CONFIG_RTC_DRV_RX8581=y113113-CONFIG_DMADEVICES=y114114-CONFIG_RCAR_HPB_DMAE=y115115-CONFIG_UIO=y116116-CONFIG_UIO_PDRV_GENIRQ=y117117-# CONFIG_IOMMU_SUPPORT is not set118118-# CONFIG_DNOTIFY is not set119119-CONFIG_TMPFS=y120120-# CONFIG_MISC_FILESYSTEMS is not set121121-CONFIG_NFS_FS=y122122-CONFIG_NFS_V3_ACL=y123123-CONFIG_NFS_V4=y124124-CONFIG_NFS_SWAP=y125125-CONFIG_NFS_V4_1=y126126-CONFIG_ROOT_NFS=y127127-# CONFIG_ENABLE_WARN_DEPRECATED is not set128128-# CONFIG_ENABLE_MUST_CHECK is not set129129-# CONFIG_SCHED_DEBUG is not set130130-# CONFIG_DEBUG_BUGVERBOSE is not set131131-# CONFIG_FTRACE is not set132132-# CONFIG_ARM_UNWIND is not set133133-CONFIG_AVERAGE=y
-73
arch/arm/mach-shmobile/Kconfig
···98989999comment "Renesas ARM SoCs System Configuration"100100endif101101-102102-if ARCH_SHMOBILE_LEGACY103103-104104-comment "Renesas ARM SoCs System Type"105105-106106-config ARCH_R8A7778107107- bool "R-Car M1A (R8A77781)"108108- select ARCH_RCAR_GEN1109109- select ARCH_WANT_OPTIONAL_GPIOLIB110110- select ARM_GIC111111-112112-config ARCH_R8A7779113113- bool "R-Car H1 (R8A77790)"114114- select ARCH_RCAR_GEN1115115- select ARCH_WANT_OPTIONAL_GPIOLIB116116- select ARM_GIC117117-118118-comment "Renesas ARM SoCs Board Type"119119-120120-config MACH_BOCKW121121- bool "BOCK-W platform"122122- depends on ARCH_R8A7778123123- select ARCH_REQUIRE_GPIOLIB124124- select REGULATOR_FIXED_VOLTAGE if REGULATOR125125- select SND_SOC_AK4554 if SND_SIMPLE_CARD126126- select SND_SOC_AK4642 if SND_SIMPLE_CARD && I2C127127- select USE_OF128128-129129-config MACH_BOCKW_REFERENCE130130- bool "BOCK-W - Reference Device Tree Implementation"131131- depends on ARCH_R8A7778132132- select ARCH_REQUIRE_GPIOLIB133133- select REGULATOR_FIXED_VOLTAGE if REGULATOR134134- select USE_OF135135- ---help---136136- Use reference implementation of BockW board support137137- which makes use of device tree at the expense138138- of not supporting a number of devices.139139-140140- This is intended to aid developers141141-142142-comment "Renesas ARM SoCs System Configuration"143143-144144-config CPU_HAS_INTEVT145145- bool146146- default y147147-148148-config SH_CLK_CPG149149- bool150150-151151-source "drivers/sh/Kconfig"152152-153153-endif154154-155155-if ARCH_SHMOBILE156156-157157-menu "Timer and clock configuration"158158-159159-config SHMOBILE_TIMER_HZ160160- int "Kernel HZ (jiffies per second)"161161- range 32 1024162162- default "128"163163- help164164- Allows the configuration of the timer frequency. It is customary165165- to have the timer interrupt run at 1000 Hz or 100 Hz, but in the166166- case of low timer frequencies other values may be more suitable.167167- Renesas ARM SoC systems using a 32768 Hz RCLK for clock events may168168- want to select a HZ value such as 128 that can evenly divide RCLK.169169- A HZ value that does not divide evenly may cause timer drift.170170-171171-endmenu172172-173173-endif
···11-# per-board load address for uImage22-loadaddr-y :=33-loadaddr-$(CONFIG_MACH_BOCKW) += 0x6000800044-loadaddr-$(CONFIG_MACH_BOCKW_REFERENCE) += 0x6000800055-66-__ZRELADDR := $(sort $(loadaddr-y))77- zreladdr-y += $(__ZRELADDR)88-99-# Unsupported legacy stuff1010-#1111-#params_phys-y (Instead: Pass atags pointer in r2)1212-#initrd_phys-y (Instead: Use compiled-in initramfs)
-86
arch/arm/mach-shmobile/board-bockw-reference.c
···11-/*22- * Bock-W board support33- *44- * Copyright (C) 2013 Renesas Solutions Corp.55- * Copyright (C) 2013 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>66- *77- * This program is free software; you can redistribute it and/or modify88- * it under the terms of the GNU General Public License as published by99- * the Free Software Foundation; version 2 of the License.1010- *1111- * This program is distributed in the hope that it will be useful,1212- * but WITHOUT ANY WARRANTY; without even the implied warranty of1313- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the1414- * GNU General Public License for more details.1515- */1616-1717-#include <linux/of_platform.h>1818-1919-#include <asm/mach/arch.h>2020-2121-#include "common.h"2222-#include "r8a7778.h"2323-2424-/*2525- * see board-bock.c for checking detail of dip-switch2626- */2727-2828-#define FPGA 0x182000002929-#define IRQ0MR 0x303030-#define COMCTLR 0x101c3131-3232-#define PFC 0xfffc00003333-#define PUPR4 0x1103434-static void __init bockw_init(void)3535-{3636- void __iomem *fpga;3737- void __iomem *pfc;3838-3939-#ifndef CONFIG_COMMON_CLK4040- r8a7778_clock_init();4141-#endif4242- r8a7778_init_irq_extpin_dt(1);4343- r8a7778_add_dt_devices();4444-4545- fpga = ioremap_nocache(FPGA, SZ_1M);4646- if (fpga) {4747- /*4848- * CAUTION4949- *5050- * IRQ0/1 is cascaded interrupt from FPGA.5151- * it should be cared in the future5252- * Now, it is assuming IRQ0 was used only from SMSC.5353- */5454- u16 val = ioread16(fpga + IRQ0MR);5555- val &= ~(1 << 4); /* enable SMSC911x */5656- iowrite16(val, fpga + IRQ0MR);5757-5858- iounmap(fpga);5959- }6060-6161- pfc = ioremap_nocache(PFC, 0x200);6262- if (pfc) {6363- /*6464- * FIXME6565- *6666- * SDHI CD/WP pin needs pull-up6767- */6868- iowrite32(ioread32(pfc + PUPR4) | (3 << 26), pfc + PUPR4);6969- iounmap(pfc);7070- }7171-7272- of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);7373-}7474-7575-static const char *const bockw_boards_compat_dt[] __initconst = {7676- "renesas,bockw-reference",7777- NULL,7878-};7979-8080-DT_MACHINE_START(BOCKW_DT, "bockw")8181- .init_early = shmobile_init_delay,8282- .init_irq = r8a7778_init_irq_dt,8383- .init_machine = bockw_init,8484- .init_late = shmobile_init_late,8585- .dt_compat = bockw_boards_compat_dt,8686-MACHINE_END
···11-/*22- * SH-Mobile Clock Framework33- *44- * Copyright (C) 2010 Magnus Damm55- *66- * Used together with arch/arm/common/clkdev.c and drivers/sh/clk.c.77- *88- * This program is free software; you can redistribute it and/or modify99- * it under the terms of the GNU General Public License as published by1010- * the Free Software Foundation; version 2 of the License.1111- *1212- * This program is distributed in the hope that it will be useful,1313- * but WITHOUT ANY WARRANTY; without even the implied warranty of1414- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the1515- * GNU General Public License for more details.1616- *1717- */1818-1919-#include <linux/export.h>2020-#include <linux/kernel.h>2121-#include <linux/init.h>2222-#include <linux/sh_clk.h>2323-2424-#include "clock.h"2525-#include "common.h"2626-2727-unsigned long shmobile_fixed_ratio_clk_recalc(struct clk *clk)2828-{2929- struct clk_ratio *p = clk->priv;3030-3131- return clk->parent->rate / p->div * p->mul;3232-};3333-3434-struct sh_clk_ops shmobile_fixed_ratio_clk_ops = {3535- .recalc = shmobile_fixed_ratio_clk_recalc,3636-};3737-3838-int __init shmobile_clk_init(void)3939-{4040- /* Kick the child clocks.. */4141- recalculate_root_clocks();4242-4343- /* Enable the necessary init clocks */4444- clk_enable_init_clocks();4545-4646- return 0;4747-}
-42
arch/arm/mach-shmobile/clock.h
···11-#ifndef CLOCK_H22-#define CLOCK_H33-44-/* legacy clock implementation */55-66-struct clk;77-unsigned long shmobile_fixed_ratio_clk_recalc(struct clk *clk);88-extern struct sh_clk_ops shmobile_fixed_ratio_clk_ops;99-1010-/* clock ratio */1111-struct clk_ratio {1212- int mul;1313- int div;1414-};1515-1616-#define SH_CLK_RATIO(name, m, d) \1717-static struct clk_ratio name ##_ratio = { \1818- .mul = m, \1919- .div = d, \2020-}2121-2222-#define SH_FIXED_RATIO_CLKg(name, p, r) \2323-struct clk name = { \2424- .parent = &p, \2525- .ops = &shmobile_fixed_ratio_clk_ops,\2626- .priv = &r ## _ratio, \2727-}2828-2929-#define SH_FIXED_RATIO_CLK(name, p, r) \3030-static SH_FIXED_RATIO_CLKg(name, p, r)3131-3232-#define SH_FIXED_RATIO_CLK_SET(name, p, m, d) \3333- SH_CLK_RATIO(name, m, d); \3434- SH_FIXED_RATIO_CLK(name, p, name)3535-3636-#define SH_CLK_SET_RATIO(p, m, d) \3737-do { \3838- (p)->mul = m; \3939- (p)->div = d; \4040-} while (0)4141-4242-#endif
-5
arch/arm/mach-shmobile/common.h
···11#ifndef __ARCH_MACH_COMMON_H22#define __ARCH_MACH_COMMON_H3344-extern void shmobile_earlytimer_init(void);54extern void shmobile_init_delay(void);66-struct twd_local_timer;77-extern void shmobile_setup_console(void);85extern void shmobile_boot_vector(void);96extern unsigned long shmobile_boot_fn;107extern unsigned long shmobile_boot_arg;···1518extern void shmobile_smp_scu_prepare_cpus(unsigned int max_cpus);1619extern void shmobile_smp_scu_cpu_die(unsigned int cpu);1720extern int shmobile_smp_scu_cpu_kill(unsigned int cpu);1818-struct clk;1919-extern int shmobile_clk_init(void);2021extern struct platform_suspend_ops shmobile_suspend_ops;21222223#ifdef CONFIG_SUSPEND
-27
arch/arm/mach-shmobile/console.c
···11-/*22- * SH-Mobile Console33- *44- * Copyright (C) 2010 Magnus Damm55- *66- * This program is free software; you can redistribute it and/or modify77- * it under the terms of the GNU General Public License as published by88- * the Free Software Foundation; version 2 of the License.99- *1010- * This program is distributed in the hope that it will be useful,1111- * but WITHOUT ANY WARRANTY; without even the implied warranty of1212- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the1313- * GNU General Public License for more details.1414- */1515-#include <linux/kernel.h>1616-#include <linux/init.h>1717-#include <linux/platform_device.h>1818-#include <asm/mach/map.h>1919-#include "common.h"2020-2121-void __init shmobile_setup_console(void)2222-{2323- parse_early_param();2424-2525- /* Let earlyprintk output early console messages */2626- early_platform_driver_probe("earlyprintk", 1, 1);2727-}
-295
arch/arm/mach-shmobile/intc.h
···11-#ifndef __ASM_MACH_INTC_H22-#define __ASM_MACH_INTC_H33-#include <linux/sh_intc.h>44-55-#define INTC_IRQ_PINS_ENUM_16L(p) \66- p ## _IRQ0, p ## _IRQ1, p ## _IRQ2, p ## _IRQ3, \77- p ## _IRQ4, p ## _IRQ5, p ## _IRQ6, p ## _IRQ7, \88- p ## _IRQ8, p ## _IRQ9, p ## _IRQ10, p ## _IRQ11, \99- p ## _IRQ12, p ## _IRQ13, p ## _IRQ14, p ## _IRQ151010-1111-#define INTC_IRQ_PINS_ENUM_16H(p) \1212- p ## _IRQ16, p ## _IRQ17, p ## _IRQ18, p ## _IRQ19, \1313- p ## _IRQ20, p ## _IRQ21, p ## _IRQ22, p ## _IRQ23, \1414- p ## _IRQ24, p ## _IRQ25, p ## _IRQ26, p ## _IRQ27, \1515- p ## _IRQ28, p ## _IRQ29, p ## _IRQ30, p ## _IRQ311616-1717-#define INTC_IRQ_PINS_VECT_16L(p, vect) \1818- vect(p ## _IRQ0, 0x0200), vect(p ## _IRQ1, 0x0220), \1919- vect(p ## _IRQ2, 0x0240), vect(p ## _IRQ3, 0x0260), \2020- vect(p ## _IRQ4, 0x0280), vect(p ## _IRQ5, 0x02a0), \2121- vect(p ## _IRQ6, 0x02c0), vect(p ## _IRQ7, 0x02e0), \2222- vect(p ## _IRQ8, 0x0300), vect(p ## _IRQ9, 0x0320), \2323- vect(p ## _IRQ10, 0x0340), vect(p ## _IRQ11, 0x0360), \2424- vect(p ## _IRQ12, 0x0380), vect(p ## _IRQ13, 0x03a0), \2525- vect(p ## _IRQ14, 0x03c0), vect(p ## _IRQ15, 0x03e0)2626-2727-#define INTC_IRQ_PINS_VECT_16H(p, vect) \2828- vect(p ## _IRQ16, 0x3200), vect(p ## _IRQ17, 0x3220), \2929- vect(p ## _IRQ18, 0x3240), vect(p ## _IRQ19, 0x3260), \3030- vect(p ## _IRQ20, 0x3280), vect(p ## _IRQ21, 0x32a0), \3131- vect(p ## _IRQ22, 0x32c0), vect(p ## _IRQ23, 0x32e0), \3232- vect(p ## _IRQ24, 0x3300), vect(p ## _IRQ25, 0x3320), \3333- vect(p ## _IRQ26, 0x3340), vect(p ## _IRQ27, 0x3360), \3434- vect(p ## _IRQ28, 0x3380), vect(p ## _IRQ29, 0x33a0), \3535- vect(p ## _IRQ30, 0x33c0), vect(p ## _IRQ31, 0x33e0)3636-3737-#define INTC_IRQ_PINS_MASK_16L(p, base) \3838- { base + 0x40, base + 0x60, 8, /* INTMSK00A / INTMSKCLR00A */ \3939- { p ## _IRQ0, p ## _IRQ1, p ## _IRQ2, p ## _IRQ3, \4040- p ## _IRQ4, p ## _IRQ5, p ## _IRQ6, p ## _IRQ7 } }, \4141- { base + 0x44, base + 0x64, 8, /* INTMSK10A / INTMSKCLR10A */ \4242- { p ## _IRQ8, p ## _IRQ9, p ## _IRQ10, p ## _IRQ11, \4343- p ## _IRQ12, p ## _IRQ13, p ## _IRQ14, p ## _IRQ15 } }4444-4545-#define INTC_IRQ_PINS_MASK_16H(p, base) \4646- { base + 0x48, base + 0x68, 8, /* INTMSK20A / INTMSKCLR20A */ \4747- { p ## _IRQ16, p ## _IRQ17, p ## _IRQ18, p ## _IRQ19, \4848- p ## _IRQ20, p ## _IRQ21, p ## _IRQ22, p ## _IRQ23 } }, \4949- { base + 0x4c, base + 0x6c, 8, /* INTMSK30A / INTMSKCLR30A */ \5050- { p ## _IRQ24, p ## _IRQ25, p ## _IRQ26, p ## _IRQ27, \5151- p ## _IRQ28, p ## _IRQ29, p ## _IRQ30, p ## _IRQ31 } }5252-5353-#define INTC_IRQ_PINS_PRIO_16L(p, base) \5454- { base + 0x10, 0, 32, 4, /* INTPRI00A */ \5555- { p ## _IRQ0, p ## _IRQ1, p ## _IRQ2, p ## _IRQ3, \5656- p ## _IRQ4, p ## _IRQ5, p ## _IRQ6, p ## _IRQ7 } }, \5757- { base + 0x14, 0, 32, 4, /* INTPRI10A */ \5858- { p ## _IRQ8, p ## _IRQ9, p ## _IRQ10, p ## _IRQ11, \5959- p ## _IRQ12, p ## _IRQ13, p ## _IRQ14, p ## _IRQ15 } }6060-6161-#define INTC_IRQ_PINS_PRIO_16H(p, base) \6262- { base + 0x18, 0, 32, 4, /* INTPRI20A */ \6363- { p ## _IRQ16, p ## _IRQ17, p ## _IRQ18, p ## _IRQ19, \6464- p ## _IRQ20, p ## _IRQ21, p ## _IRQ22, p ## _IRQ23 } }, \6565- { base + 0x1c, 0, 32, 4, /* INTPRI30A */ \6666- { p ## _IRQ24, p ## _IRQ25, p ## _IRQ26, p ## _IRQ27, \6767- p ## _IRQ28, p ## _IRQ29, p ## _IRQ30, p ## _IRQ31 } }6868-6969-#define INTC_IRQ_PINS_SENSE_16L(p, base) \7070- { base + 0x00, 32, 4, /* ICR1A */ \7171- { p ## _IRQ0, p ## _IRQ1, p ## _IRQ2, p ## _IRQ3, \7272- p ## _IRQ4, p ## _IRQ5, p ## _IRQ6, p ## _IRQ7 } }, \7373- { base + 0x04, 32, 4, /* ICR2A */ \7474- { p ## _IRQ8, p ## _IRQ9, p ## _IRQ10, p ## _IRQ11, \7575- p ## _IRQ12, p ## _IRQ13, p ## _IRQ14, p ## _IRQ15 } }7676-7777-#define INTC_IRQ_PINS_SENSE_16H(p, base) \7878- { base + 0x08, 32, 4, /* ICR3A */ \7979- { p ## _IRQ16, p ## _IRQ17, p ## _IRQ18, p ## _IRQ19, \8080- p ## _IRQ20, p ## _IRQ21, p ## _IRQ22, p ## _IRQ23 } }, \8181- { base + 0x0c, 32, 4, /* ICR4A */ \8282- { p ## _IRQ24, p ## _IRQ25, p ## _IRQ26, p ## _IRQ27, \8383- p ## _IRQ28, p ## _IRQ29, p ## _IRQ30, p ## _IRQ31 } }8484-8585-#define INTC_IRQ_PINS_ACK_16L(p, base) \8686- { base + 0x20, 0, 8, /* INTREQ00A */ \8787- { p ## _IRQ0, p ## _IRQ1, p ## _IRQ2, p ## _IRQ3, \8888- p ## _IRQ4, p ## _IRQ5, p ## _IRQ6, p ## _IRQ7 } }, \8989- { base + 0x24, 0, 8, /* INTREQ10A */ \9090- { p ## _IRQ8, p ## _IRQ9, p ## _IRQ10, p ## _IRQ11, \9191- p ## _IRQ12, p ## _IRQ13, p ## _IRQ14, p ## _IRQ15 } }9292-9393-#define INTC_IRQ_PINS_ACK_16H(p, base) \9494- { base + 0x28, 0, 8, /* INTREQ20A */ \9595- { p ## _IRQ16, p ## _IRQ17, p ## _IRQ18, p ## _IRQ19, \9696- p ## _IRQ20, p ## _IRQ21, p ## _IRQ22, p ## _IRQ23 } }, \9797- { base + 0x2c, 0, 8, /* INTREQ30A */ \9898- { p ## _IRQ24, p ## _IRQ25, p ## _IRQ26, p ## _IRQ27, \9999- p ## _IRQ28, p ## _IRQ29, p ## _IRQ30, p ## _IRQ31 } }100100-101101-#define INTC_IRQ_PINS_16(p, base, vect, str) \102102- \103103-static struct resource p ## _resources[] __initdata = { \104104- [0] = { \105105- .start = base, \106106- .end = base + 0x64, \107107- .flags = IORESOURCE_MEM, \108108- }, \109109-}; \110110- \111111-enum { \112112- p ## _UNUSED = 0, \113113- INTC_IRQ_PINS_ENUM_16L(p), \114114-}; \115115- \116116-static struct intc_vect p ## _vectors[] __initdata = { \117117- INTC_IRQ_PINS_VECT_16L(p, vect), \118118-}; \119119- \120120-static struct intc_mask_reg p ## _mask_registers[] __initdata = { \121121- INTC_IRQ_PINS_MASK_16L(p, base), \122122-}; \123123- \124124-static struct intc_prio_reg p ## _prio_registers[] __initdata = { \125125- INTC_IRQ_PINS_PRIO_16L(p, base), \126126-}; \127127- \128128-static struct intc_sense_reg p ## _sense_registers[] __initdata = { \129129- INTC_IRQ_PINS_SENSE_16L(p, base), \130130-}; \131131- \132132-static struct intc_mask_reg p ## _ack_registers[] __initdata = { \133133- INTC_IRQ_PINS_ACK_16L(p, base), \134134-}; \135135- \136136-static struct intc_desc p ## _desc __initdata = { \137137- .name = str, \138138- .resource = p ## _resources, \139139- .num_resources = ARRAY_SIZE(p ## _resources), \140140- .hw = INTC_HW_DESC(p ## _vectors, NULL, \141141- p ## _mask_registers, p ## _prio_registers, \142142- p ## _sense_registers, p ## _ack_registers) \143143-}144144-145145-#define INTC_IRQ_PINS_16H(p, base, vect, str) \146146- \147147-static struct resource p ## _resources[] __initdata = { \148148- [0] = { \149149- .start = base, \150150- .end = base + 0x64, \151151- .flags = IORESOURCE_MEM, \152152- }, \153153-}; \154154- \155155-enum { \156156- p ## _UNUSED = 0, \157157- INTC_IRQ_PINS_ENUM_16H(p), \158158-}; \159159- \160160-static struct intc_vect p ## _vectors[] __initdata = { \161161- INTC_IRQ_PINS_VECT_16H(p, vect), \162162-}; \163163- \164164-static struct intc_mask_reg p ## _mask_registers[] __initdata = { \165165- INTC_IRQ_PINS_MASK_16H(p, base), \166166-}; \167167- \168168-static struct intc_prio_reg p ## _prio_registers[] __initdata = { \169169- INTC_IRQ_PINS_PRIO_16H(p, base), \170170-}; \171171- \172172-static struct intc_sense_reg p ## _sense_registers[] __initdata = { \173173- INTC_IRQ_PINS_SENSE_16H(p, base), \174174-}; \175175- \176176-static struct intc_mask_reg p ## _ack_registers[] __initdata = { \177177- INTC_IRQ_PINS_ACK_16H(p, base), \178178-}; \179179- \180180-static struct intc_desc p ## _desc __initdata = { \181181- .name = str, \182182- .resource = p ## _resources, \183183- .num_resources = ARRAY_SIZE(p ## _resources), \184184- .hw = INTC_HW_DESC(p ## _vectors, NULL, \185185- p ## _mask_registers, p ## _prio_registers, \186186- p ## _sense_registers, p ## _ack_registers) \187187-}188188-189189-#define INTC_IRQ_PINS_32(p, base, vect, str) \190190- \191191-static struct resource p ## _resources[] __initdata = { \192192- [0] = { \193193- .start = base, \194194- .end = base + 0x6c, \195195- .flags = IORESOURCE_MEM, \196196- }, \197197-}; \198198- \199199-enum { \200200- p ## _UNUSED = 0, \201201- INTC_IRQ_PINS_ENUM_16L(p), \202202- INTC_IRQ_PINS_ENUM_16H(p), \203203-}; \204204- \205205-static struct intc_vect p ## _vectors[] __initdata = { \206206- INTC_IRQ_PINS_VECT_16L(p, vect), \207207- INTC_IRQ_PINS_VECT_16H(p, vect), \208208-}; \209209- \210210-static struct intc_mask_reg p ## _mask_registers[] __initdata = { \211211- INTC_IRQ_PINS_MASK_16L(p, base), \212212- INTC_IRQ_PINS_MASK_16H(p, base), \213213-}; \214214- \215215-static struct intc_prio_reg p ## _prio_registers[] __initdata = { \216216- INTC_IRQ_PINS_PRIO_16L(p, base), \217217- INTC_IRQ_PINS_PRIO_16H(p, base), \218218-}; \219219- \220220-static struct intc_sense_reg p ## _sense_registers[] __initdata = { \221221- INTC_IRQ_PINS_SENSE_16L(p, base), \222222- INTC_IRQ_PINS_SENSE_16H(p, base), \223223-}; \224224- \225225-static struct intc_mask_reg p ## _ack_registers[] __initdata = { \226226- INTC_IRQ_PINS_ACK_16L(p, base), \227227- INTC_IRQ_PINS_ACK_16H(p, base), \228228-}; \229229- \230230-static struct intc_desc p ## _desc __initdata = { \231231- .name = str, \232232- .resource = p ## _resources, \233233- .num_resources = ARRAY_SIZE(p ## _resources), \234234- .hw = INTC_HW_DESC(p ## _vectors, NULL, \235235- p ## _mask_registers, p ## _prio_registers, \236236- p ## _sense_registers, p ## _ack_registers) \237237-}238238-239239-#define INTC_PINT_E_EMPTY240240-#define INTC_PINT_E_NONE 0, 0, 0, 0, 0, 0, 0, 0,241241-#define INTC_PINT_E(p) \242242- PINT ## p ## 0, PINT ## p ## 1, PINT ## p ## 2, PINT ## p ## 3, \243243- PINT ## p ## 4, PINT ## p ## 5, PINT ## p ## 6, PINT ## p ## 7,244244-245245-#define INTC_PINT_V_NONE246246-#define INTC_PINT_V(p, vect) \247247- vect(PINT ## p ## 0, 0), vect(PINT ## p ## 1, 1), \248248- vect(PINT ## p ## 2, 2), vect(PINT ## p ## 3, 3), \249249- vect(PINT ## p ## 4, 4), vect(PINT ## p ## 5, 5), \250250- vect(PINT ## p ## 6, 6), vect(PINT ## p ## 7, 7),251251-252252-#define INTC_PINT(p, mask_reg, sense_base, str, \253253- enums_1, enums_2, enums_3, enums_4, \254254- vect_1, vect_2, vect_3, vect_4, \255255- mask_a, mask_b, mask_c, mask_d, \256256- sense_a, sense_b, sense_c, sense_d) \257257- \258258-enum { \259259- PINT ## p ## _UNUSED = 0, \260260- enums_1 enums_2 enums_3 enums_4 \261261-}; \262262- \263263-static struct intc_vect p ## _vectors[] __initdata = { \264264- vect_1 vect_2 vect_3 vect_4 \265265-}; \266266- \267267-static struct intc_mask_reg p ## _mask_registers[] __initdata = { \268268- { mask_reg, 0, 32, /* PINTER */ \269269- { mask_a mask_b mask_c mask_d } } \270270-}; \271271- \272272-static struct intc_sense_reg p ## _sense_registers[] __initdata = { \273273- { sense_base + 0x00, 16, 2, /* PINTCR */ \274274- { sense_a } }, \275275- { sense_base + 0x04, 16, 2, /* PINTCR */ \276276- { sense_b } }, \277277- { sense_base + 0x08, 16, 2, /* PINTCR */ \278278- { sense_c } }, \279279- { sense_base + 0x0c, 16, 2, /* PINTCR */ \280280- { sense_d } }, \281281-}; \282282- \283283-static struct intc_desc p ## _desc __initdata = { \284284- .name = str, \285285- .hw = INTC_HW_DESC(p ## _vectors, NULL, \286286- p ## _mask_registers, NULL, \287287- p ## _sense_registers, NULL), \288288-}289289-290290-/* INTCS */291291-#define INTCS_VECT_BASE 0x3400292292-#define INTCS_VECT(n, vect) INTC_VECT((n), INTCS_VECT_BASE + (vect))293293-#define intcs_evt2irq(evt) evt2irq(INTCS_VECT_BASE + (evt))294294-295295-#endif /* __ASM_MACH_INTC_H */
···11-/*22- * Copyright (C) 2013 Renesas Solutions Corp.33- * Copyright (C) 2013 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>44- * Copyright (C) 2013 Cogent Embedded, Inc.55- *66- * This program is free software; you can redistribute it and/or modify77- * it under the terms of the GNU General Public License as published by88- * the Free Software Foundation; version 2 of the License.99- *1010- * This program is distributed in the hope that it will be useful,1111- * but WITHOUT ANY WARRANTY; without even the implied warranty of1212- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the1313- * GNU General Public License for more details.1414- */1515-#ifndef __ASM_R8A7778_H__1616-#define __ASM_R8A7778_H__1717-1818-#include <linux/sh_eth.h>1919-2020-/* HPB-DMA slave IDs */2121-enum {2222- HPBDMA_SLAVE_DUMMY,2323- HPBDMA_SLAVE_SDHI0_TX,2424- HPBDMA_SLAVE_SDHI0_RX,2525- HPBDMA_SLAVE_SSI0_TX,2626- HPBDMA_SLAVE_SSI0_RX,2727- HPBDMA_SLAVE_SSI1_TX,2828- HPBDMA_SLAVE_SSI1_RX,2929- HPBDMA_SLAVE_SSI2_TX,3030- HPBDMA_SLAVE_SSI2_RX,3131- HPBDMA_SLAVE_SSI3_TX,3232- HPBDMA_SLAVE_SSI3_RX,3333- HPBDMA_SLAVE_SSI4_TX,3434- HPBDMA_SLAVE_SSI4_RX,3535- HPBDMA_SLAVE_SSI5_TX,3636- HPBDMA_SLAVE_SSI5_RX,3737- HPBDMA_SLAVE_SSI6_TX,3838- HPBDMA_SLAVE_SSI6_RX,3939- HPBDMA_SLAVE_SSI7_TX,4040- HPBDMA_SLAVE_SSI7_RX,4141- HPBDMA_SLAVE_SSI8_TX,4242- HPBDMA_SLAVE_SSI8_RX,4343- HPBDMA_SLAVE_HPBIF0_TX,4444- HPBDMA_SLAVE_HPBIF0_RX,4545- HPBDMA_SLAVE_HPBIF1_TX,4646- HPBDMA_SLAVE_HPBIF1_RX,4747- HPBDMA_SLAVE_HPBIF2_TX,4848- HPBDMA_SLAVE_HPBIF2_RX,4949- HPBDMA_SLAVE_HPBIF3_TX,5050- HPBDMA_SLAVE_HPBIF3_RX,5151- HPBDMA_SLAVE_HPBIF4_TX,5252- HPBDMA_SLAVE_HPBIF4_RX,5353- HPBDMA_SLAVE_HPBIF5_TX,5454- HPBDMA_SLAVE_HPBIF5_RX,5555- HPBDMA_SLAVE_HPBIF6_TX,5656- HPBDMA_SLAVE_HPBIF6_RX,5757- HPBDMA_SLAVE_HPBIF7_TX,5858- HPBDMA_SLAVE_HPBIF7_RX,5959- HPBDMA_SLAVE_HPBIF8_TX,6060- HPBDMA_SLAVE_HPBIF8_RX,6161- HPBDMA_SLAVE_USBFUNC_TX,6262- HPBDMA_SLAVE_USBFUNC_RX,6363-};6464-6565-extern void r8a7778_add_standard_devices(void);6666-extern void r8a7778_add_standard_devices_dt(void);6767-extern void r8a7778_add_dt_devices(void);6868-6969-extern void r8a7778_init_late(void);7070-extern void r8a7778_init_irq_dt(void);7171-extern void r8a7778_clock_init(void);7272-extern void r8a7778_init_irq_extpin(int irlm);7373-extern void r8a7778_init_irq_extpin_dt(int irlm);7474-extern void r8a7778_pinmux_init(void);7575-7676-extern int r8a7778_usb_phy_power(bool enable);7777-7878-#endif /* __ASM_R8A7778_H__ */
···11-/*22- * Generic GPIO API and pinmux table support33- *44- * Copyright (c) 2008 Magnus Damm55- *66- * This file is subject to the terms and conditions of the GNU General Public77- * License. See the file "COPYING" in the main directory of this archive88- * for more details.99- */1010-#ifndef __ASM_ARCH_GPIO_H1111-#define __ASM_ARCH_GPIO_H1212-1313-#include <linux/kernel.h>1414-#include <linux/errno.h>1515-#include <linux/io.h>1616-1717-/*1818- * FIXME !!1919- *2020- * current gpio frame work doesn't have2121- * the method to control only pull up/down/free.2222- * this function should be replaced by correct gpio function2323- */2424-static inline void __init gpio_direction_none(void __iomem * addr)2525-{2626- __raw_writeb(0x00, addr);2727-}2828-2929-#endif /* __ASM_ARCH_GPIO_H */
-21
arch/arm/mach-shmobile/timer.c
···7777 shmobile_setup_delay_hz(max_freq, 2, 4);7878 }7979}8080-8181-static void __init shmobile_late_time_init(void)8282-{8383- /*8484- * Make sure all compiled-in early timers register themselves.8585- *8686- * Run probe() for two "earlytimer" devices, these will be the8787- * clockevents and clocksource devices respectively. In the event8888- * that only a clockevents device is available, we -ENODEV on the8989- * clocksource and the jiffies clocksource is used transparently9090- * instead. No error handling is necessary here.9191- */9292- early_platform_driver_register_all("earlytimer");9393- early_platform_driver_probe("earlytimer", 2, 0);9494-}9595-9696-void __init shmobile_earlytimer_init(void)9797-{9898- late_time_init = shmobile_late_time_init;9999-}100100-