From 65963cc12657ec09458f1044b28d762456e12625 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 19 Mar 2013 15:38:50 +0100 Subject: [PATCH] --- yaml --- r: 370682 b: refs/heads/master c: 4d10f054f7df600ec8a388091c93b2d976920de0 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/arm/Kconfig | 43 ++++++- trunk/arch/arm/Kconfig.debug | 16 --- trunk/arch/arm/Makefile | 5 +- trunk/arch/arm/configs/cns3420vb_defconfig | 3 - trunk/arch/arm/configs/multi_v7_defconfig | 9 -- trunk/arch/arm/configs/nhk8815_defconfig | 42 +++--- trunk/arch/arm/configs/spear3xx_defconfig | 2 - trunk/arch/arm/configs/spear6xx_defconfig | 1 - trunk/arch/arm/include/asm/smp_twd.h | 8 -- trunk/arch/arm/kernel/smp_twd.c | 17 +-- trunk/arch/arm/mach-cns3xxx/Kconfig | 12 -- trunk/arch/arm/mach-cns3xxx/Makefile | 8 +- trunk/arch/arm/mach-cns3xxx/cns3420vb.c | 6 +- trunk/arch/arm/mach-cns3xxx/core.c | 121 +----------------- trunk/arch/arm/mach-cns3xxx/devices.c | 5 +- .../mach-cns3xxx/{ => include/mach}/cns3xxx.h | 7 +- .../include/mach/debug-macro.S} | 0 .../arch/arm/mach-cns3xxx/include/mach/irqs.h | 24 ++++ .../arm/mach-cns3xxx/{ => include/mach}/pm.h | 0 .../arm/mach-cns3xxx/include/mach/timex.h | 12 ++ .../mach-cns3xxx/include/mach/uncompress.h | 53 ++++++++ trunk/arch/arm/mach-cns3xxx/pcie.c | 2 +- trunk/arch/arm/mach-cns3xxx/pm.c | 4 +- trunk/arch/arm/mach-highbank/highbank.c | 5 +- trunk/arch/arm/mach-imx/mach-imx6q.c | 5 +- trunk/arch/arm/mach-nomadik/Kconfig | 24 +--- trunk/arch/arm/mach-nomadik/Makefile.boot | 4 + trunk/arch/arm/mach-nomadik/cpu-8815.c | 1 + .../include/mach/debug-macro.S} | 0 .../arch/arm/mach-nomadik/include/mach/irqs.h | 79 ++++++++++++ .../arm/mach-nomadik/include/mach/timex.h | 6 + .../mach-nomadik/include/mach/uncompress.h | 60 +++++++++ trunk/arch/arm/mach-omap2/timer.c | 2 +- trunk/arch/arm/mach-spear/Kconfig | 103 --------------- trunk/arch/arm/mach-spear/Makefile | 26 ---- .../arch/arm/mach-spear/include/mach/spear.h | 95 -------------- trunk/arch/arm/mach-spear13xx/Kconfig | 20 +++ trunk/arch/arm/mach-spear13xx/Makefile | 10 ++ .../Makefile.boot | 0 .../{mach-spear => mach-spear13xx}/headsmp.S | 0 .../{mach-spear => mach-spear13xx}/hotplug.c | 0 .../mach-spear13xx/include/mach/debug-macro.S | 14 ++ .../include/mach/dma.h} | 0 .../include/mach}/generic.h | 30 ++--- .../mach-spear13xx/include/mach/hardware.h | 1 + .../arm/mach-spear13xx/include/mach/irqs.h | 20 +++ .../arm/mach-spear13xx/include/mach/spear.h | 54 ++++++++ .../arm/mach-spear13xx/include/mach/timex.h | 19 +++ .../mach-spear13xx/include/mach/uncompress.h | 19 +++ .../{mach-spear => mach-spear13xx}/platsmp.c | 2 +- .../spear1310.c | 4 +- .../spear1340.c | 5 +- .../spear13xx.c | 13 +- trunk/arch/arm/mach-spear3xx/Kconfig | 26 ++++ trunk/arch/arm/mach-spear3xx/Makefile | 15 +++ trunk/arch/arm/mach-spear3xx/Makefile.boot | 3 + .../mach-spear3xx/include/mach/debug-macro.S | 14 ++ .../arm/mach-spear3xx/include/mach/generic.h | 36 ++++++ .../arm/mach-spear3xx/include/mach/hardware.h | 1 + .../arm/mach-spear3xx/include/mach/irqs.h | 19 +++ .../include/mach/misc_regs.h | 2 +- .../arm/mach-spear3xx/include/mach/spear.h | 60 +++++++++ .../arm/mach-spear3xx/include/mach/timex.h | 19 +++ .../mach-spear3xx/include/mach/uncompress.h | 19 +++ .../{mach-spear => mach-spear3xx}/spear300.c | 4 +- .../{mach-spear => mach-spear3xx}/spear310.c | 4 +- .../{mach-spear => mach-spear3xx}/spear320.c | 7 +- .../{mach-spear => mach-spear3xx}/spear3xx.c | 19 ++- trunk/arch/arm/mach-spear6xx/Kconfig | 10 ++ trunk/arch/arm/mach-spear6xx/Makefile | 6 + trunk/arch/arm/mach-spear6xx/Makefile.boot | 3 + .../mach-spear6xx/include/mach/debug-macro.S | 14 ++ .../arm/mach-spear6xx/include/mach/generic.h | 23 ++++ .../arm/mach-spear6xx/include/mach/hardware.h | 1 + .../include/mach/irqs.h | 22 +--- .../mach-spear6xx/include/mach/misc_regs.h | 22 ++++ .../arm/mach-spear6xx/include/mach/spear.h | 46 +++++++ .../arm/mach-spear6xx/include/mach/timex.h | 19 +++ .../mach-spear6xx/include/mach/uncompress.h | 19 +++ .../{mach-spear => mach-spear6xx}/spear6xx.c | 25 ++-- trunk/arch/arm/mach-ux500/timer.c | 3 +- trunk/arch/arm/mach-vexpress/v2m.c | 6 +- trunk/arch/arm/plat-spear/Kconfig | 47 +++++++ trunk/arch/arm/plat-spear/Makefile | 9 ++ .../include/plat}/debug-macro.S | 0 .../include/plat}/pl080.h | 0 .../mach => plat-spear/include/plat}/timex.h | 0 .../include/plat}/uncompress.h | 0 .../arm/{mach-spear => plat-spear}/pl080.c | 0 .../arm/{mach-spear => plat-spear}/restart.c | 5 +- .../arm/{mach-spear => plat-spear}/time.c | 2 +- trunk/drivers/clk/spear/spear1310_clock.c | 64 ++++----- trunk/drivers/clk/spear/spear1340_clock.c | 63 ++++----- trunk/drivers/clk/spear/spear3xx_clock.c | 60 ++++----- trunk/drivers/clk/spear/spear6xx_clock.c | 31 ++--- trunk/drivers/clocksource/bcm2835_timer.c | 12 +- trunk/drivers/clocksource/clksrc-of.c | 5 +- trunk/drivers/clocksource/tegra20_timer.c | 73 ++++------- trunk/drivers/clocksource/vt8500_timer.c | 16 +-- trunk/drivers/mmc/host/sdhci-cns3xxx.c | 1 + trunk/include/linux/clocksource.h | 12 +- 102 files changed, 1142 insertions(+), 748 deletions(-) rename trunk/arch/arm/mach-cns3xxx/{ => include/mach}/cns3xxx.h (99%) rename trunk/arch/arm/{include/debug/cns3xxx.S => mach-cns3xxx/include/mach/debug-macro.S} (100%) create mode 100644 trunk/arch/arm/mach-cns3xxx/include/mach/irqs.h rename trunk/arch/arm/mach-cns3xxx/{ => include/mach}/pm.h (100%) create mode 100644 trunk/arch/arm/mach-cns3xxx/include/mach/timex.h create mode 100644 trunk/arch/arm/mach-cns3xxx/include/mach/uncompress.h create mode 100644 trunk/arch/arm/mach-nomadik/Makefile.boot rename trunk/arch/arm/{include/debug/nomadik.S => mach-nomadik/include/mach/debug-macro.S} (100%) create mode 100644 trunk/arch/arm/mach-nomadik/include/mach/irqs.h create mode 100644 trunk/arch/arm/mach-nomadik/include/mach/timex.h create mode 100644 trunk/arch/arm/mach-nomadik/include/mach/uncompress.h delete mode 100644 trunk/arch/arm/mach-spear/Kconfig delete mode 100644 trunk/arch/arm/mach-spear/Makefile delete mode 100644 trunk/arch/arm/mach-spear/include/mach/spear.h create mode 100644 trunk/arch/arm/mach-spear13xx/Kconfig create mode 100644 trunk/arch/arm/mach-spear13xx/Makefile rename trunk/arch/arm/{mach-spear => mach-spear13xx}/Makefile.boot (100%) rename trunk/arch/arm/{mach-spear => mach-spear13xx}/headsmp.S (100%) rename trunk/arch/arm/{mach-spear => mach-spear13xx}/hotplug.c (100%) create mode 100644 trunk/arch/arm/mach-spear13xx/include/mach/debug-macro.S rename trunk/arch/arm/{mach-spear/spear13xx-dma.h => mach-spear13xx/include/mach/dma.h} (100%) rename trunk/arch/arm/{mach-spear => mach-spear13xx/include/mach}/generic.h (57%) create mode 100644 trunk/arch/arm/mach-spear13xx/include/mach/hardware.h create mode 100644 trunk/arch/arm/mach-spear13xx/include/mach/irqs.h create mode 100644 trunk/arch/arm/mach-spear13xx/include/mach/spear.h create mode 100644 trunk/arch/arm/mach-spear13xx/include/mach/timex.h create mode 100644 trunk/arch/arm/mach-spear13xx/include/mach/uncompress.h rename trunk/arch/arm/{mach-spear => mach-spear13xx}/platsmp.c (99%) rename trunk/arch/arm/{mach-spear => mach-spear13xx}/spear1310.c (95%) rename trunk/arch/arm/{mach-spear => mach-spear13xx}/spear1340.c (99%) rename trunk/arch/arm/{mach-spear => mach-spear13xx}/spear13xx.c (95%) create mode 100644 trunk/arch/arm/mach-spear3xx/Kconfig create mode 100644 trunk/arch/arm/mach-spear3xx/Makefile create mode 100644 trunk/arch/arm/mach-spear3xx/Makefile.boot create mode 100644 trunk/arch/arm/mach-spear3xx/include/mach/debug-macro.S create mode 100644 trunk/arch/arm/mach-spear3xx/include/mach/generic.h create mode 100644 trunk/arch/arm/mach-spear3xx/include/mach/hardware.h create mode 100644 trunk/arch/arm/mach-spear3xx/include/mach/irqs.h rename trunk/arch/arm/{mach-spear => mach-spear3xx}/include/mach/misc_regs.h (90%) create mode 100644 trunk/arch/arm/mach-spear3xx/include/mach/spear.h create mode 100644 trunk/arch/arm/mach-spear3xx/include/mach/timex.h create mode 100644 trunk/arch/arm/mach-spear3xx/include/mach/uncompress.h rename trunk/arch/arm/{mach-spear => mach-spear3xx}/spear300.c (98%) rename trunk/arch/arm/{mach-spear => mach-spear3xx}/spear310.c (98%) rename trunk/arch/arm/{mach-spear => mach-spear3xx}/spear320.c (97%) rename trunk/arch/arm/{mach-spear => mach-spear3xx}/spear3xx.c (87%) create mode 100644 trunk/arch/arm/mach-spear6xx/Kconfig create mode 100644 trunk/arch/arm/mach-spear6xx/Makefile create mode 100644 trunk/arch/arm/mach-spear6xx/Makefile.boot create mode 100644 trunk/arch/arm/mach-spear6xx/include/mach/debug-macro.S create mode 100644 trunk/arch/arm/mach-spear6xx/include/mach/generic.h create mode 100644 trunk/arch/arm/mach-spear6xx/include/mach/hardware.h rename trunk/arch/arm/{mach-spear => mach-spear6xx}/include/mach/irqs.h (51%) create mode 100644 trunk/arch/arm/mach-spear6xx/include/mach/misc_regs.h create mode 100644 trunk/arch/arm/mach-spear6xx/include/mach/spear.h create mode 100644 trunk/arch/arm/mach-spear6xx/include/mach/timex.h create mode 100644 trunk/arch/arm/mach-spear6xx/include/mach/uncompress.h rename trunk/arch/arm/{mach-spear => mach-spear6xx}/spear6xx.c (93%) create mode 100644 trunk/arch/arm/plat-spear/Kconfig create mode 100644 trunk/arch/arm/plat-spear/Makefile rename trunk/arch/arm/{mach-spear/include/mach => plat-spear/include/plat}/debug-macro.S (100%) rename trunk/arch/arm/{mach-spear => plat-spear/include/plat}/pl080.h (100%) rename trunk/arch/arm/{mach-spear/include/mach => plat-spear/include/plat}/timex.h (100%) rename trunk/arch/arm/{mach-spear/include/mach => plat-spear/include/plat}/uncompress.h (100%) rename trunk/arch/arm/{mach-spear => plat-spear}/pl080.c (100%) rename trunk/arch/arm/{mach-spear => plat-spear}/restart.c (90%) rename trunk/arch/arm/{mach-spear => plat-spear}/time.c (99%) diff --git a/[refs] b/[refs] index d39c57eaf62c..17caf585c0f5 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: cde35bd027023b052316c14ae3fc01e2f487a6ab +refs/heads/master: 4d10f054f7df600ec8a388091c93b2d976920de0 diff --git a/trunk/arch/arm/Kconfig b/trunk/arch/arm/Kconfig index e2c7ecf0d1ca..5bfd584929c8 100644 --- a/trunk/arch/arm/Kconfig +++ b/trunk/arch/arm/Kconfig @@ -382,6 +382,17 @@ config ARCH_BCM2835 This enables support for the Broadcom BCM2835 SoC. This SoC is use in the Raspberry Pi, and Roku 2 devices. +config ARCH_CNS3XXX + bool "Cavium Networks CNS3XXX family" + select ARM_GIC + select CPU_V6K + select GENERIC_CLOCKEVENTS + select MIGHT_HAVE_CACHE_L2X0 + select MIGHT_HAVE_PCI + select PCI_DOMAINS if PCI + help + Support for Cavium Networks CNS3XXX platform. + config ARCH_CLPS711X bool "Cirrus Logic CLPS711x/EP721x/EP731x-based" select ARCH_REQUIRE_GPIOLIB @@ -905,6 +916,35 @@ config ARCH_U8500 help Support for ST-Ericsson's Ux500 architecture +config ARCH_NOMADIK + bool "STMicroelectronics Nomadik" + select ARCH_REQUIRE_GPIOLIB + select ARM_AMBA + select ARM_VIC + select CLKSRC_NOMADIK_MTU + select COMMON_CLK + select CPU_ARM926T + select GENERIC_CLOCKEVENTS + select MIGHT_HAVE_CACHE_L2X0 + select USE_OF + select PINCTRL + select PINCTRL_STN8815 + select SPARSE_IRQ + help + Support for the Nomadik platform by ST-Ericsson + +config PLAT_SPEAR + bool "ST SPEAr" + select ARCH_HAS_CPUFREQ + select ARCH_REQUIRE_GPIOLIB + select ARM_AMBA + select CLKDEV_LOOKUP + select CLKSRC_MMIO + select COMMON_CLK + select GENERIC_CLOCKEVENTS + select HAVE_CLK + help + Support for ST's SPEAr platform (SPEAr3xx, SPEAr6xx and SPEAr13xx). config ARCH_DAVINCI bool "TI DaVinci" @@ -1064,7 +1104,7 @@ source "arch/arm/plat-samsung/Kconfig" source "arch/arm/mach-socfpga/Kconfig" -source "arch/arm/mach-spear/Kconfig" +source "arch/arm/plat-spear/Kconfig" source "arch/arm/mach-s3c24xx/Kconfig" @@ -1557,6 +1597,7 @@ config HAVE_ARM_ARCH_TIMER config HAVE_ARM_TWD bool depends on SMP + select CLKSRC_OF if OF help This options enables support for the ARM timer and watchdog unit diff --git a/trunk/arch/arm/Kconfig.debug b/trunk/arch/arm/Kconfig.debug index 5115ff9e8a2a..acddddac7ee4 100644 --- a/trunk/arch/arm/Kconfig.debug +++ b/trunk/arch/arm/Kconfig.debug @@ -103,13 +103,6 @@ choice Say Y here if you want the debug print routines to direct their output to the second serial port on these devices. - config DEBUG_CNS3XXX - bool "Kernel Kernel low-level debugging on Cavium Networks CNS3xxx" - depends on ARCH_CNS3XXX - help - Say Y here if you want the debug print routines to direct - their output to the CNS3xxx UART0. - config DEBUG_DAVINCI_DA8XX_UART1 bool "Kernel low-level debugging on DaVinci DA8XX using UART1" depends on ARCH_DAVINCI_DA8XX @@ -305,13 +298,6 @@ choice Say Y here if you want kernel low-level debugging support on MVEBU based platforms. - config DEBUG_NOMADIK_UART - bool "Kernel low-level debugging messages via NOMADIK UART" - depends on ARCH_NOMADIK - help - Say Y here if you want kernel low-level debugging support - on NOMADIK based platforms. - config DEBUG_OMAP2PLUS_UART bool "Kernel low-level debugging messages via OMAP2PLUS UART" depends on ARCH_OMAP2PLUS @@ -593,7 +579,6 @@ endchoice config DEBUG_LL_INCLUDE string - default "debug/cns3xxx.S" if DEBUG_CNS3XXX default "debug/icedcc.S" if DEBUG_ICEDCC default "debug/imx.S" if DEBUG_IMX1_UART || \ DEBUG_IMX25_UART || \ @@ -605,7 +590,6 @@ config DEBUG_LL_INCLUDE DEBUG_IMX6Q_UART default "debug/highbank.S" if DEBUG_HIGHBANK_UART default "debug/mvebu.S" if DEBUG_MVEBU_UART - default "debug/nomadik.S" if DEBUG_NOMADIK_UART default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART default "debug/picoxcell.S" if DEBUG_PICOXCELL_UART default "debug/socfpga.S" if DEBUG_SOCFPGA_UART diff --git a/trunk/arch/arm/Makefile b/trunk/arch/arm/Makefile index 8276536815a8..ee4605f400b0 100644 --- a/trunk/arch/arm/Makefile +++ b/trunk/arch/arm/Makefile @@ -191,7 +191,9 @@ machine-$(CONFIG_ARCH_VT8500) += vt8500 machine-$(CONFIG_ARCH_W90X900) += w90x900 machine-$(CONFIG_FOOTBRIDGE) += footbridge machine-$(CONFIG_ARCH_SOCFPGA) += socfpga -machine-$(CONFIG_PLAT_SPEAR) += spear +machine-$(CONFIG_ARCH_SPEAR13XX) += spear13xx +machine-$(CONFIG_ARCH_SPEAR3XX) += spear3xx +machine-$(CONFIG_MACH_SPEAR600) += spear6xx machine-$(CONFIG_ARCH_VIRT) += virt machine-$(CONFIG_ARCH_ZYNQ) += zynq machine-$(CONFIG_ARCH_SUNXI) += sunxi @@ -205,6 +207,7 @@ plat-$(CONFIG_PLAT_ORION) += orion plat-$(CONFIG_PLAT_PXA) += pxa plat-$(CONFIG_PLAT_S3C24XX) += samsung plat-$(CONFIG_PLAT_S5P) += samsung +plat-$(CONFIG_PLAT_SPEAR) += spear plat-$(CONFIG_PLAT_VERSATILE) += versatile ifeq ($(CONFIG_ARCH_EBSA110),y) diff --git a/trunk/arch/arm/configs/cns3420vb_defconfig b/trunk/arch/arm/configs/cns3420vb_defconfig index b1ff5cdba9a1..313627adf46c 100644 --- a/trunk/arch/arm/configs/cns3420vb_defconfig +++ b/trunk/arch/arm/configs/cns3420vb_defconfig @@ -19,11 +19,8 @@ CONFIG_MODULE_FORCE_UNLOAD=y CONFIG_MODVERSIONS=y # CONFIG_BLK_DEV_BSG is not set CONFIG_IOSCHED_CFQ=m -CONFIG_ARCH_MULTI_V6=y -#CONFIG_ARCH_MULTI_V7 is not set CONFIG_ARCH_CNS3XXX=y CONFIG_MACH_CNS3420VB=y -CONFIG_DEBUG_CNS3XXX=y CONFIG_AEABI=y CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 diff --git a/trunk/arch/arm/configs/multi_v7_defconfig b/trunk/arch/arm/configs/multi_v7_defconfig index 3bf0c543216a..e31d442343c8 100644 --- a/trunk/arch/arm/configs/multi_v7_defconfig +++ b/trunk/arch/arm/configs/multi_v7_defconfig @@ -10,10 +10,6 @@ CONFIG_ARCH_SUNXI=y # CONFIG_ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA is not set CONFIG_ARCH_ZYNQ=y CONFIG_ARM_ERRATA_754322=y -CONFIG_PLAT_SPEAR=y -CONFIG_ARCH_SPEAR13XX=y -CONFIG_MACH_SPEAR1310=y -CONFIG_MACH_SPEAR1340=y CONFIG_SMP=y CONFIG_ARM_ARCH_TIMER=y CONFIG_AEABI=y @@ -27,7 +23,6 @@ CONFIG_BLK_DEV_SD=y CONFIG_ATA=y CONFIG_SATA_HIGHBANK=y CONFIG_SATA_MV=y -CONFIG_SATA_AHCI_PLATFORM=y CONFIG_NETDEVICES=y CONFIG_NET_CALXEDA_XGMAC=y CONFIG_SMSC911X=y @@ -36,7 +31,6 @@ CONFIG_SERIO_AMBAKMI=y CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y CONFIG_SERIAL_8250_DW=y -CONFIG_KEYBOARD_SPEAR=y CONFIG_SERIAL_AMBA_PL011=y CONFIG_SERIAL_AMBA_PL011_CONSOLE=y CONFIG_SERIAL_OF_PLATFORM=y @@ -46,7 +40,6 @@ CONFIG_I2C=y CONFIG_I2C_DESIGNWARE_PLATFORM=y CONFIG_SPI=y CONFIG_SPI_PL022=y -CONFIG_GPIO_PL061=y CONFIG_FB=y CONFIG_FB_ARMCLCD=y CONFIG_FRAMEBUFFER_CONSOLE=y @@ -57,7 +50,6 @@ CONFIG_MMC=y CONFIG_MMC_ARMMMCI=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_PLTFM=y -CONFIG_MMC_SDHCI_SPEAR=y CONFIG_EDAC=y CONFIG_EDAC_MM_EDAC=y CONFIG_EDAC_HIGHBANK_MC=y @@ -66,4 +58,3 @@ CONFIG_RTC_CLASS=y CONFIG_RTC_DRV_PL031=y CONFIG_DMADEVICES=y CONFIG_PL330_DMA=y -CONFIG_DW_DMAC=y diff --git a/trunk/arch/arm/configs/nhk8815_defconfig b/trunk/arch/arm/configs/nhk8815_defconfig index b01e7632ed2e..86cfd2959c47 100644 --- a/trunk/arch/arm/configs/nhk8815_defconfig +++ b/trunk/arch/arm/configs/nhk8815_defconfig @@ -1,9 +1,11 @@ +CONFIG_EXPERIMENTAL=y # CONFIG_LOCALVERSION_AUTO is not set # CONFIG_SWAP is not set CONFIG_SYSVIPC=y CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_LOG_BUF_SHIFT=14 +CONFIG_SYSFS_DEPRECATED_V2=y CONFIG_BLK_DEV_INITRD=y CONFIG_EXPERT=y CONFIG_KALLSYMS_ALL=y @@ -11,7 +13,6 @@ CONFIG_SLAB=y CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y # CONFIG_BLK_DEV_BSG is not set -# CONFIG_ARCH_MULTI_V7 is not set CONFIG_ARCH_NOMADIK=y CONFIG_MACH_NOMADIK_8815NHK=y CONFIG_PREEMPT=y @@ -19,6 +20,7 @@ CONFIG_AEABI=y CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 CONFIG_FPE_NWFPE=y +CONFIG_PM=y CONFIG_NET=y CONFIG_PACKET=y CONFIG_UNIX=y @@ -30,10 +32,14 @@ CONFIG_IP_PNP=y CONFIG_IP_PNP_DHCP=y CONFIG_IP_PNP_BOOTP=y CONFIG_NET_IPIP=y +CONFIG_NET_IPGRE=y +CONFIG_NET_IPGRE_BROADCAST=y CONFIG_IP_MROUTE=y # CONFIG_INET_LRO is not set # CONFIG_IPV6 is not set CONFIG_BT=m +CONFIG_BT_L2CAP=m +CONFIG_BT_SCO=m CONFIG_BT_RFCOMM=m CONFIG_BT_RFCOMM_TTY=y CONFIG_BT_BNEP=m @@ -47,16 +53,14 @@ CONFIG_BT_HCIVHCI=m CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" CONFIG_MTD=y CONFIG_MTD_TESTS=m -CONFIG_MTD_CMDLINE_PARTS=y CONFIG_MTD_CHAR=y CONFIG_MTD_BLOCK=y -CONFIG_MTD_NAND_ECC_SMC=y CONFIG_MTD_NAND=y +CONFIG_MTD_NAND_ECC_SMC=y CONFIG_MTD_NAND_FSMC=y CONFIG_MTD_ONENAND=y CONFIG_MTD_ONENAND_VERIFY_WRITE=y CONFIG_MTD_ONENAND_GENERIC=y -CONFIG_PROC_DEVICETREE=y CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_CRYPTOLOOP=y CONFIG_BLK_DEV_RAM=y @@ -68,48 +72,47 @@ CONFIG_SCSI_CONSTANTS=y CONFIG_SCSI_LOGGING=y CONFIG_SCSI_SCAN_ASYNC=y CONFIG_NETDEVICES=y -CONFIG_NETCONSOLE=m CONFIG_TUN=y +CONFIG_NET_ETHERNET=y CONFIG_SMC91X=y CONFIG_PPP=m -CONFIG_PPP_BSDCOMP=m +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m CONFIG_PPP_DEFLATE=m +CONFIG_PPP_BSDCOMP=m CONFIG_PPP_MPPE=m CONFIG_PPPOE=m -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m +CONFIG_NETCONSOLE=m # CONFIG_INPUT_MOUSEDEV is not set CONFIG_INPUT_EVDEV=y # CONFIG_KEYBOARD_ATKBD is not set # CONFIG_MOUSE_PS2 is not set # CONFIG_SERIO is not set -# CONFIG_LEGACY_PTYS is not set CONFIG_SERIAL_AMBA_PL011=y CONFIG_SERIAL_AMBA_PL011_CONSOLE=y -CONFIG_HW_RANDOM=y -CONFIG_HW_RANDOM_NOMADIK=y +# CONFIG_LEGACY_PTYS is not set +# CONFIG_HW_RANDOM is not set +CONFIG_I2C=y CONFIG_I2C_CHARDEV=y CONFIG_I2C_GPIO=y -CONFIG_I2C_NOMADIK=y CONFIG_DEBUG_GPIO=y +CONFIG_PINCTRL_NOMADIK=y # CONFIG_HWMON is not set -CONFIG_MMC=y -CONFIG_MMC_CLKGATE=y -CONFIG_MMC_ARMMMCI=y +# CONFIG_VGA_CONSOLE is not set CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_PL031=y -CONFIG_DMADEVICES=y -CONFIG_AMBA_PL08X=y CONFIG_EXT2_FS=y CONFIG_EXT3_FS=y +CONFIG_INOTIFY=y CONFIG_FUSE_FS=y CONFIG_MSDOS_FS=y CONFIG_VFAT_FS=y CONFIG_TMPFS=y CONFIG_JFFS2_FS=y CONFIG_NFS_FS=y +CONFIG_NFS_V3=y CONFIG_NFS_V3_ACL=y CONFIG_ROOT_NFS=y +CONFIG_SMB_FS=m CONFIG_CIFS=m CONFIG_CIFS_WEAK_PW_HASH=y CONFIG_NLS_CODEPAGE_437=y @@ -117,11 +120,12 @@ CONFIG_NLS_ASCII=y CONFIG_NLS_ISO8859_1=y CONFIG_NLS_ISO8859_15=y # CONFIG_ENABLE_MUST_CHECK is not set -CONFIG_DEBUG_FS=y +CONFIG_DEBUG_KERNEL=y # CONFIG_SCHED_DEBUG is not set # CONFIG_DEBUG_PREEMPT is not set # CONFIG_DEBUG_BUGVERBOSE is not set CONFIG_DEBUG_INFO=y +# CONFIG_RCU_CPU_STALL_DETECTOR is not set CONFIG_CRYPTO_MD5=y CONFIG_CRYPTO_SHA1=y CONFIG_CRYPTO_DES=y diff --git a/trunk/arch/arm/configs/spear3xx_defconfig b/trunk/arch/arm/configs/spear3xx_defconfig index 7ff23a077f5d..865980c5f212 100644 --- a/trunk/arch/arm/configs/spear3xx_defconfig +++ b/trunk/arch/arm/configs/spear3xx_defconfig @@ -6,9 +6,7 @@ CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y CONFIG_MODVERSIONS=y CONFIG_PARTITION_ADVANCED=y -# CONFIG_ARCH_MULTI_V7 is not set CONFIG_PLAT_SPEAR=y -CONFIG_ARCH_SPEAR3XX=y CONFIG_MACH_SPEAR300=y CONFIG_MACH_SPEAR310=y CONFIG_MACH_SPEAR320=y diff --git a/trunk/arch/arm/configs/spear6xx_defconfig b/trunk/arch/arm/configs/spear6xx_defconfig index 7822980d7d55..a2a1265f86b6 100644 --- a/trunk/arch/arm/configs/spear6xx_defconfig +++ b/trunk/arch/arm/configs/spear6xx_defconfig @@ -6,7 +6,6 @@ CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y CONFIG_MODVERSIONS=y CONFIG_PARTITION_ADVANCED=y -# CONFIG_ARCH_MULTI_V7 is not set CONFIG_PLAT_SPEAR=y CONFIG_ARCH_SPEAR6XX=y CONFIG_BINFMT_MISC=y diff --git a/trunk/arch/arm/include/asm/smp_twd.h b/trunk/arch/arm/include/asm/smp_twd.h index 0f01f4677bd2..7b2899c2f7fc 100644 --- a/trunk/arch/arm/include/asm/smp_twd.h +++ b/trunk/arch/arm/include/asm/smp_twd.h @@ -34,12 +34,4 @@ struct twd_local_timer name __initdata = { \ int twd_local_timer_register(struct twd_local_timer *); -#ifdef CONFIG_HAVE_ARM_TWD -void twd_local_timer_of_register(void); -#else -static inline void twd_local_timer_of_register(void) -{ -} -#endif - #endif diff --git a/trunk/arch/arm/kernel/smp_twd.c b/trunk/arch/arm/kernel/smp_twd.c index 3f2565037480..90525d9d290b 100644 --- a/trunk/arch/arm/kernel/smp_twd.c +++ b/trunk/arch/arm/kernel/smp_twd.c @@ -362,25 +362,13 @@ int __init twd_local_timer_register(struct twd_local_timer *tlt) } #ifdef CONFIG_OF -const static struct of_device_id twd_of_match[] __initconst = { - { .compatible = "arm,cortex-a9-twd-timer", }, - { .compatible = "arm,cortex-a5-twd-timer", }, - { .compatible = "arm,arm11mp-twd-timer", }, - { }, -}; - -void __init twd_local_timer_of_register(void) +static void __init twd_local_timer_of_register(struct device_node *np) { - struct device_node *np; int err; if (!is_smp() || !setup_max_cpus) return; - np = of_find_matching_node(NULL, twd_of_match); - if (!np) - return; - twd_ppi = irq_of_parse_and_map(np, 0); if (!twd_ppi) { err = -EINVAL; @@ -398,4 +386,7 @@ void __init twd_local_timer_of_register(void) out: WARN(err, "twd_local_timer_of_register failed (%d)\n", err); } +CLOCKSOURCE_OF_DECLARE(arm_twd_a9, "arm,cortex-a9-twd-timer", twd_local_timer_of_register); +CLOCKSOURCE_OF_DECLARE(arm_twd_a5, "arm,cortex-a5-twd-timer", twd_local_timer_of_register); +CLOCKSOURCE_OF_DECLARE(arm_twd_11mp, "arm,arm11mp-twd-timer", twd_local_timer_of_register); #endif diff --git a/trunk/arch/arm/mach-cns3xxx/Kconfig b/trunk/arch/arm/mach-cns3xxx/Kconfig index dbf0df8bb0ac..9ebfcc46feb1 100644 --- a/trunk/arch/arm/mach-cns3xxx/Kconfig +++ b/trunk/arch/arm/mach-cns3xxx/Kconfig @@ -1,20 +1,8 @@ -config ARCH_CNS3XXX - bool "Cavium Networks CNS3XXX family" if ARCH_MULTI_V6 - select ARM_GIC - select CPU_V6K - select GENERIC_CLOCKEVENTS - select MIGHT_HAVE_CACHE_L2X0 - select MIGHT_HAVE_PCI - select PCI_DOMAINS if PCI - help - Support for Cavium Networks CNS3XXX platform. - menu "CNS3XXX platform type" depends on ARCH_CNS3XXX config MACH_CNS3420VB bool "Support for CNS3420 Validation Board" - depends on ATAGS help Include support for the Cavium Networks CNS3420 MPCore Platform Baseboard. diff --git a/trunk/arch/arm/mach-cns3xxx/Makefile b/trunk/arch/arm/mach-cns3xxx/Makefile index a1ff10848698..11033f1c2e23 100644 --- a/trunk/arch/arm/mach-cns3xxx/Makefile +++ b/trunk/arch/arm/mach-cns3xxx/Makefile @@ -1,5 +1,3 @@ -obj-$(CONFIG_ARCH_CNS3XXX) += cns3xxx.o -cns3xxx-y += core.o pm.o -cns3xxx-$(CONFIG_ATAGS) += devices.o -cns3xxx-$(CONFIG_PCI) += pcie.o -cns3xxx-$(CONFIG_MACH_CNS3420VB) += cns3420vb.o +obj-$(CONFIG_ARCH_CNS3XXX) += core.o pm.o devices.o +obj-$(CONFIG_PCI) += pcie.o +obj-$(CONFIG_MACH_CNS3420VB) += cns3420vb.o diff --git a/trunk/arch/arm/mach-cns3xxx/cns3420vb.c b/trunk/arch/arm/mach-cns3xxx/cns3420vb.c index ce096d678aa4..a71867e1d8d6 100644 --- a/trunk/arch/arm/mach-cns3xxx/cns3420vb.c +++ b/trunk/arch/arm/mach-cns3xxx/cns3420vb.c @@ -31,8 +31,9 @@ #include #include #include -#include "cns3xxx.h" -#include "pm.h" +#include +#include +#include #include "core.h" #include "devices.h" @@ -246,7 +247,6 @@ static void __init cns3420_map_io(void) MACHINE_START(CNS3420VB, "Cavium Networks CNS3420 Validation Board") .atag_offset = 0x100, - .nr_irqs = NR_IRQS_CNS3XXX, .map_io = cns3420_map_io, .init_irq = cns3xxx_init_irq, .init_time = cns3xxx_timer_init, diff --git a/trunk/arch/arm/mach-cns3xxx/core.c b/trunk/arch/arm/mach-cns3xxx/core.c index 49e657c15067..e698f26cc0cb 100644 --- a/trunk/arch/arm/mach-cns3xxx/core.c +++ b/trunk/arch/arm/mach-cns3xxx/core.c @@ -13,18 +13,12 @@ #include #include #include -#include -#include -#include -#include -#include #include #include #include #include -#include "cns3xxx.h" +#include #include "core.h" -#include "pm.h" static struct map_desc cns3xxx_io_desc[] __initdata = { { @@ -282,116 +276,3 @@ void __init cns3xxx_l2x0_init(void) } #endif /* CONFIG_CACHE_L2X0 */ - -static int csn3xxx_usb_power_on(struct platform_device *pdev) -{ - /* - * EHCI and OHCI share the same clock and power, - * resetting twice would cause the 1st controller been reset. - * Therefore only do power up at the first up device, and - * power down at the last down device. - * - * Set USB AHB INCR length to 16 - */ - if (atomic_inc_return(&usb_pwr_ref) == 1) { - cns3xxx_pwr_power_up(1 << PM_PLL_HM_PD_CTRL_REG_OFFSET_PLL_USB); - cns3xxx_pwr_clk_en(1 << PM_CLK_GATE_REG_OFFSET_USB_HOST); - cns3xxx_pwr_soft_rst(1 << PM_SOFT_RST_REG_OFFST_USB_HOST); - __raw_writel((__raw_readl(MISC_CHIP_CONFIG_REG) | (0X2 << 24)), - MISC_CHIP_CONFIG_REG); - } - - return 0; -} - -static void csn3xxx_usb_power_off(struct platform_device *pdev) -{ - /* - * EHCI and OHCI share the same clock and power, - * resetting twice would cause the 1st controller been reset. - * Therefore only do power up at the first up device, and - * power down at the last down device. - */ - if (atomic_dec_return(&usb_pwr_ref) == 0) - cns3xxx_pwr_clk_dis(1 << PM_CLK_GATE_REG_OFFSET_USB_HOST); -} - -static struct usb_ehci_pdata cns3xxx_usb_ehci_pdata = { - .power_on = csn3xxx_usb_power_on, - .power_off = csn3xxx_usb_power_off, -}; - -static struct usb_ohci_pdata cns3xxx_usb_ohci_pdata = { - .num_ports = 1, - .power_on = csn3xxx_usb_power_on, - .power_off = csn3xxx_usb_power_off, -}; - -static struct of_dev_auxdata cns3xxx_auxdata[] __initconst = { - { "intel,usb-ehci", CNS3XXX_USB_BASE, "ehci-platform", &cns3xxx_usb_ehci_pdata }, - { "intel,usb-ohci", CNS3XXX_USB_OHCI_BASE, "ohci-platform", &cns3xxx_usb_ohci_pdata }, - { "cavium,cns3420-ahci", CNS3XXX_SATA2_BASE, "ahci", NULL }, - { "cavium,cns3420-sdhci", CNS3XXX_SDIO_BASE, "ahci", NULL }, - {}, -}; - -static void __init cns3xxx_init(void) -{ - struct device_node *dn; - - cns3xxx_l2x0_init(); - - dn = of_find_compatible_node(NULL, NULL, "cavium,cns3420-ahci"); - if (of_device_is_available(dn)) { - u32 tmp; - - tmp = __raw_readl(MISC_SATA_POWER_MODE); - tmp |= 0x1 << 16; /* Disable SATA PHY 0 from SLUMBER Mode */ - tmp |= 0x1 << 17; /* Disable SATA PHY 1 from SLUMBER Mode */ - __raw_writel(tmp, MISC_SATA_POWER_MODE); - - /* Enable SATA PHY */ - cns3xxx_pwr_power_up(0x1 << PM_PLL_HM_PD_CTRL_REG_OFFSET_SATA_PHY0); - cns3xxx_pwr_power_up(0x1 << PM_PLL_HM_PD_CTRL_REG_OFFSET_SATA_PHY1); - - /* Enable SATA Clock */ - cns3xxx_pwr_clk_en(0x1 << PM_CLK_GATE_REG_OFFSET_SATA); - - /* De-Asscer SATA Reset */ - cns3xxx_pwr_soft_rst(CNS3XXX_PWR_SOFTWARE_RST(SATA)); - } - - dn = of_find_compatible_node(NULL, NULL, "cavium,cns3420-sdhci"); - if (of_device_is_available(dn)) { - u32 __iomem *gpioa = IOMEM(CNS3XXX_MISC_BASE_VIRT + 0x0014); - u32 gpioa_pins = __raw_readl(gpioa); - - /* MMC/SD pins share with GPIOA */ - gpioa_pins |= 0x1fff0004; - __raw_writel(gpioa_pins, gpioa); - - cns3xxx_pwr_clk_en(CNS3XXX_PWR_CLK_EN(SDIO)); - cns3xxx_pwr_soft_rst(CNS3XXX_PWR_SOFTWARE_RST(SDIO)); - } - - pm_power_off = cns3xxx_power_off; - - of_platform_populate(NULL, of_default_bus_match_table, - cns3xxx_auxdata, NULL); -} - -static const char *cns3xxx_dt_compat[] __initdata = { - "cavium,cns3410", - "cavium,cns3420", - NULL, -}; - -DT_MACHINE_START(CNS3XXX_DT, "Cavium Networks CNS3xxx") - .dt_compat = cns3xxx_dt_compat, - .nr_irqs = NR_IRQS_CNS3XXX, - .map_io = cns3xxx_map_io, - .init_irq = cns3xxx_init_irq, - .init_time = cns3xxx_timer_init, - .init_machine = cns3xxx_init, - .restart = cns3xxx_restart, -MACHINE_END diff --git a/trunk/arch/arm/mach-cns3xxx/devices.c b/trunk/arch/arm/mach-cns3xxx/devices.c index 7da78a2451f1..1e40c99b015f 100644 --- a/trunk/arch/arm/mach-cns3xxx/devices.c +++ b/trunk/arch/arm/mach-cns3xxx/devices.c @@ -16,8 +16,9 @@ #include #include #include -#include "cns3xxx.h" -#include "pm.h" +#include +#include +#include #include "core.h" #include "devices.h" diff --git a/trunk/arch/arm/mach-cns3xxx/cns3xxx.h b/trunk/arch/arm/mach-cns3xxx/include/mach/cns3xxx.h similarity index 99% rename from trunk/arch/arm/mach-cns3xxx/cns3xxx.h rename to trunk/arch/arm/mach-cns3xxx/include/mach/cns3xxx.h index d7d3a8d64282..191c8e57f289 100644 --- a/trunk/arch/arm/mach-cns3xxx/cns3xxx.h +++ b/trunk/arch/arm/mach-cns3xxx/include/mach/cns3xxx.h @@ -553,8 +553,6 @@ int cns3xxx_cpu_clock(void); /* * ARM11 MPCore interrupt sources (primary GIC) */ -#define IRQ_TC11MP_GIC_START 32 - #define IRQ_CNS3XXX_PMU (IRQ_TC11MP_GIC_START + 0) #define IRQ_CNS3XXX_SDIO (IRQ_TC11MP_GIC_START + 1) #define IRQ_CNS3XXX_L2CC (IRQ_TC11MP_GIC_START + 2) @@ -626,4 +624,9 @@ int cns3xxx_cpu_clock(void); #define NR_IRQS_CNS3XXX (IRQ_TC11MP_GIC_START + 64) +#if !defined(NR_IRQS) || (NR_IRQS < NR_IRQS_CNS3XXX) +#undef NR_IRQS +#define NR_IRQS NR_IRQS_CNS3XXX +#endif + #endif /* __MACH_BOARD_CNS3XXX_H */ diff --git a/trunk/arch/arm/include/debug/cns3xxx.S b/trunk/arch/arm/mach-cns3xxx/include/mach/debug-macro.S similarity index 100% rename from trunk/arch/arm/include/debug/cns3xxx.S rename to trunk/arch/arm/mach-cns3xxx/include/mach/debug-macro.S diff --git a/trunk/arch/arm/mach-cns3xxx/include/mach/irqs.h b/trunk/arch/arm/mach-cns3xxx/include/mach/irqs.h new file mode 100644 index 000000000000..2ab96f8085c8 --- /dev/null +++ b/trunk/arch/arm/mach-cns3xxx/include/mach/irqs.h @@ -0,0 +1,24 @@ +/* + * Copyright 2000 Deep Blue Solutions Ltd. + * Copyright 2003 ARM Limited + * Copyright 2008 Cavium Networks + * + * This file is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License, Version 2, as + * published by the Free Software Foundation. + */ + +#ifndef __MACH_IRQS_H +#define __MACH_IRQS_H + +#define IRQ_LOCALTIMER 29 +#define IRQ_LOCALWDOG 30 +#define IRQ_TC11MP_GIC_START 32 + +#include + +#ifndef NR_IRQS +#error "NR_IRQS not defined by the board-specific files" +#endif + +#endif diff --git a/trunk/arch/arm/mach-cns3xxx/pm.h b/trunk/arch/arm/mach-cns3xxx/include/mach/pm.h similarity index 100% rename from trunk/arch/arm/mach-cns3xxx/pm.h rename to trunk/arch/arm/mach-cns3xxx/include/mach/pm.h diff --git a/trunk/arch/arm/mach-cns3xxx/include/mach/timex.h b/trunk/arch/arm/mach-cns3xxx/include/mach/timex.h new file mode 100644 index 000000000000..1fd04217cacb --- /dev/null +++ b/trunk/arch/arm/mach-cns3xxx/include/mach/timex.h @@ -0,0 +1,12 @@ +/* + * Cavium Networks architecture timex specifications + * + * Copyright 2003 ARM Limited + * Copyright 2008 Cavium Networks + * + * This file is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License, Version 2, as + * published by the Free Software Foundation. + */ + +#define CLOCK_TICK_RATE (50000000 / 16) diff --git a/trunk/arch/arm/mach-cns3xxx/include/mach/uncompress.h b/trunk/arch/arm/mach-cns3xxx/include/mach/uncompress.h new file mode 100644 index 000000000000..7a030b99df84 --- /dev/null +++ b/trunk/arch/arm/mach-cns3xxx/include/mach/uncompress.h @@ -0,0 +1,53 @@ +/* + * Copyright 2003 ARM Limited + * Copyright 2008 Cavium Networks + * + * This file is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License, Version 2, as + * published by the Free Software Foundation. + */ + +#include +#include + +#define AMBA_UART_DR(base) (*(volatile unsigned char *)((base) + 0x00)) +#define AMBA_UART_LCRH(base) (*(volatile unsigned char *)((base) + 0x2c)) +#define AMBA_UART_CR(base) (*(volatile unsigned char *)((base) + 0x30)) +#define AMBA_UART_FR(base) (*(volatile unsigned char *)((base) + 0x18)) + +/* + * Return the UART base address + */ +static inline unsigned long get_uart_base(void) +{ + if (machine_is_cns3420vb()) + return CNS3XXX_UART0_BASE; + else + return 0; +} + +/* + * This does not append a newline + */ +static inline void putc(int c) +{ + unsigned long base = get_uart_base(); + + while (AMBA_UART_FR(base) & (1 << 5)) + barrier(); + + AMBA_UART_DR(base) = c; +} + +static inline void flush(void) +{ + unsigned long base = get_uart_base(); + + while (AMBA_UART_FR(base) & (1 << 3)) + barrier(); +} + +/* + * nothing to do + */ +#define arch_decomp_setup() diff --git a/trunk/arch/arm/mach-cns3xxx/pcie.c b/trunk/arch/arm/mach-cns3xxx/pcie.c index c7b204bff386..311328314163 100644 --- a/trunk/arch/arm/mach-cns3xxx/pcie.c +++ b/trunk/arch/arm/mach-cns3xxx/pcie.c @@ -20,7 +20,7 @@ #include #include #include -#include "cns3xxx.h" +#include #include "core.h" enum cns3xxx_access_type { diff --git a/trunk/arch/arm/mach-cns3xxx/pm.c b/trunk/arch/arm/mach-cns3xxx/pm.c index 79e3d47aad65..36458080332a 100644 --- a/trunk/arch/arm/mach-cns3xxx/pm.c +++ b/trunk/arch/arm/mach-cns3xxx/pm.c @@ -11,8 +11,8 @@ #include #include #include -#include "cns3xxx.h" -#include "pm.h" +#include +#include #include "core.h" void cns3xxx_pwr_clk_en(unsigned int block) diff --git a/trunk/arch/arm/mach-highbank/highbank.c b/trunk/arch/arm/mach-highbank/highbank.c index a4f9f50247d4..76c1170b3528 100644 --- a/trunk/arch/arm/mach-highbank/highbank.c +++ b/trunk/arch/arm/mach-highbank/highbank.c @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include @@ -119,10 +118,10 @@ static void __init highbank_timer_init(void) sp804_clocksource_and_sched_clock_init(timer_base + 0x20, "timer1"); sp804_clockevents_init(timer_base, irq, "timer0"); - twd_local_timer_of_register(); - arch_timer_of_register(); arch_timer_sched_clock_init(); + + clocksource_of_init(); } static void highbank_power_off(void) diff --git a/trunk/arch/arm/mach-imx/mach-imx6q.c b/trunk/arch/arm/mach-imx/mach-imx6q.c index 9ffd103b27e4..b59ddcb57c78 100644 --- a/trunk/arch/arm/mach-imx/mach-imx6q.c +++ b/trunk/arch/arm/mach-imx/mach-imx6q.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include @@ -28,11 +29,9 @@ #include #include #include -#include #include #include #include -#include #include #include "common.h" @@ -292,7 +291,7 @@ static void __init imx6q_init_irq(void) static void __init imx6q_timer_init(void) { mx6q_clocks_init(); - twd_local_timer_of_register(); + clocksource_of_init(); imx_print_silicon_rev("i.MX6Q", imx6q_revision()); } diff --git a/trunk/arch/arm/mach-nomadik/Kconfig b/trunk/arch/arm/mach-nomadik/Kconfig index 3213badf25d8..82226a5d60ef 100644 --- a/trunk/arch/arm/mach-nomadik/Kconfig +++ b/trunk/arch/arm/mach-nomadik/Kconfig @@ -1,23 +1,5 @@ -config ARCH_NOMADIK - bool "ST-Ericsson Nomadik" - depends on ARCH_MULTI_V5 - select ARCH_REQUIRE_GPIOLIB - select ARM_AMBA - select ARM_VIC - select CLKSRC_NOMADIK_MTU - select COMMON_CLK - select CPU_ARM926T - select GENERIC_CLOCKEVENTS - select MIGHT_HAVE_CACHE_L2X0 - select PINCTRL - select PINCTRL_NOMADIK - select PINCTRL_STN8815 - select SPARSE_IRQ - select USE_OF - help - Support for the Nomadik platform by ST-Ericsson - if ARCH_NOMADIK + menu "Nomadik boards" config MACH_NOMADIK_8815NHK @@ -27,8 +9,8 @@ config MACH_NOMADIK_8815NHK select I2C_ALGOBIT endmenu -endif config NOMADIK_8815 - depends on ARCH_NOMADIK bool + +endif diff --git a/trunk/arch/arm/mach-nomadik/Makefile.boot b/trunk/arch/arm/mach-nomadik/Makefile.boot new file mode 100644 index 000000000000..ff0a4b5b0a82 --- /dev/null +++ b/trunk/arch/arm/mach-nomadik/Makefile.boot @@ -0,0 +1,4 @@ + zreladdr-y += 0x00008000 +params_phys-y := 0x00000100 +initrd_phys-y := 0x00800000 + diff --git a/trunk/arch/arm/mach-nomadik/cpu-8815.c b/trunk/arch/arm/mach-nomadik/cpu-8815.c index 59f6ff5c9bae..21c1aa512640 100644 --- a/trunk/arch/arm/mach-nomadik/cpu-8815.c +++ b/trunk/arch/arm/mach-nomadik/cpu-8815.c @@ -38,6 +38,7 @@ #include #include +#include #include #include #include diff --git a/trunk/arch/arm/include/debug/nomadik.S b/trunk/arch/arm/mach-nomadik/include/mach/debug-macro.S similarity index 100% rename from trunk/arch/arm/include/debug/nomadik.S rename to trunk/arch/arm/mach-nomadik/include/mach/debug-macro.S diff --git a/trunk/arch/arm/mach-nomadik/include/mach/irqs.h b/trunk/arch/arm/mach-nomadik/include/mach/irqs.h new file mode 100644 index 000000000000..90ac965a92fe --- /dev/null +++ b/trunk/arch/arm/mach-nomadik/include/mach/irqs.h @@ -0,0 +1,79 @@ +/* + * mach-nomadik/include/mach/irqs.h + * + * Copyright (C) ST Microelectronics + * + * 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; either version 2 of the License, or + * (at your option) any later version. + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef __ASM_ARCH_IRQS_H +#define __ASM_ARCH_IRQS_H + +#define IRQ_VIC_START 32 /* first VIC interrupt is 1 */ + +/* + * Interrupt numbers generic for all Nomadik Chip cuts + */ +#define IRQ_WATCHDOG (IRQ_VIC_START+0) +#define IRQ_SOFTINT (IRQ_VIC_START+1) +#define IRQ_CRYPTO (IRQ_VIC_START+2) +#define IRQ_OWM (IRQ_VIC_START+3) +#define IRQ_MTU0 (IRQ_VIC_START+4) +#define IRQ_MTU1 (IRQ_VIC_START+5) +#define IRQ_GPIO0 (IRQ_VIC_START+6) +#define IRQ_GPIO1 (IRQ_VIC_START+7) +#define IRQ_GPIO2 (IRQ_VIC_START+8) +#define IRQ_GPIO3 (IRQ_VIC_START+9) +#define IRQ_RTC_RTT (IRQ_VIC_START+10) +#define IRQ_SSP (IRQ_VIC_START+11) +#define IRQ_UART0 (IRQ_VIC_START+12) +#define IRQ_DMA1 (IRQ_VIC_START+13) +#define IRQ_CLCD_MDIF (IRQ_VIC_START+14) +#define IRQ_DMA0 (IRQ_VIC_START+15) +#define IRQ_PWRFAIL (IRQ_VIC_START+16) +#define IRQ_UART1 (IRQ_VIC_START+17) +#define IRQ_FIRDA (IRQ_VIC_START+18) +#define IRQ_MSP0 (IRQ_VIC_START+19) +#define IRQ_I2C0 (IRQ_VIC_START+20) +#define IRQ_I2C1 (IRQ_VIC_START+21) +#define IRQ_SDMMC (IRQ_VIC_START+22) +#define IRQ_USBOTG (IRQ_VIC_START+23) +#define IRQ_SVA_IT0 (IRQ_VIC_START+24) +#define IRQ_SVA_IT1 (IRQ_VIC_START+25) +#define IRQ_SAA_IT0 (IRQ_VIC_START+26) +#define IRQ_SAA_IT1 (IRQ_VIC_START+27) +#define IRQ_UART2 (IRQ_VIC_START+28) +#define IRQ_MSP2 (IRQ_VIC_START+29) +#define IRQ_L2CC (IRQ_VIC_START+30) +#define IRQ_HPI (IRQ_VIC_START+31) +#define IRQ_SKE (IRQ_VIC_START+32) +#define IRQ_KP (IRQ_VIC_START+33) +#define IRQ_MEMST (IRQ_VIC_START+34) +#define IRQ_SGA_IT (IRQ_VIC_START+35) +#define IRQ_USBM (IRQ_VIC_START+36) +#define IRQ_MSP1 (IRQ_VIC_START+37) + +#define NOMADIK_GPIO_OFFSET (IRQ_VIC_START+64) + +/* After chip-specific IRQ numbers we have the GPIO ones */ +#define NOMADIK_NR_GPIO 128 /* last 4 not wired to pins */ +#define NOMADIK_GPIO_TO_IRQ(gpio) ((gpio) + NOMADIK_GPIO_OFFSET) +#define NOMADIK_IRQ_TO_GPIO(irq) ((irq) - NOMADIK_GPIO_OFFSET) +#define NOMADIK_NR_IRQS NOMADIK_GPIO_TO_IRQ(NOMADIK_NR_GPIO) + +/* Following two are used by entry_macro.S, to access our dual-vic */ +#define VIC_REG_IRQSR0 0 +#define VIC_REG_IRQSR1 0x20 + +#endif /* __ASM_ARCH_IRQS_H */ diff --git a/trunk/arch/arm/mach-nomadik/include/mach/timex.h b/trunk/arch/arm/mach-nomadik/include/mach/timex.h new file mode 100644 index 000000000000..318b8896ce96 --- /dev/null +++ b/trunk/arch/arm/mach-nomadik/include/mach/timex.h @@ -0,0 +1,6 @@ +#ifndef __ASM_ARCH_TIMEX_H +#define __ASM_ARCH_TIMEX_H + +#define CLOCK_TICK_RATE 2400000 + +#endif diff --git a/trunk/arch/arm/mach-nomadik/include/mach/uncompress.h b/trunk/arch/arm/mach-nomadik/include/mach/uncompress.h new file mode 100644 index 000000000000..106fccca2021 --- /dev/null +++ b/trunk/arch/arm/mach-nomadik/include/mach/uncompress.h @@ -0,0 +1,60 @@ +/* + * Copyright (C) 2008 STMicroelectronics + * + * 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; either version 2 of the License, or + * (at your option) any later version. + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __ASM_ARCH_UNCOMPRESS_H +#define __ASM_ARCH_UNCOMPRESS_H + +#include +#include + +/* we need the constants in amba/serial.h, but it refers to amba_device */ +struct amba_device; +#include + +#define NOMADIK_UART_DR (void __iomem *)0x101FB000 +#define NOMADIK_UART_LCRH (void __iomem *)0x101FB02c +#define NOMADIK_UART_CR (void __iomem *)0x101FB030 +#define NOMADIK_UART_FR (void __iomem *)0x101FB018 + +static void putc(const char c) +{ + /* Do nothing if the UART is not enabled. */ + if (!(readb(NOMADIK_UART_CR) & UART01x_CR_UARTEN)) + return; + + if (c == '\n') + putc('\r'); + + while (readb(NOMADIK_UART_FR) & UART01x_FR_TXFF) + barrier(); + writeb(c, NOMADIK_UART_DR); +} + +static void flush(void) +{ + if (!(readb(NOMADIK_UART_CR) & UART01x_CR_UARTEN)) + return; + while (readb(NOMADIK_UART_FR) & UART01x_FR_BUSY) + barrier(); +} + +static inline void arch_decomp_setup(void) +{ +} + +#endif /* __ASM_ARCH_UNCOMPRESS_H */ diff --git a/trunk/arch/arm/mach-omap2/timer.c b/trunk/arch/arm/mach-omap2/timer.c index 2bdd4cf17a8f..4fd80257c73e 100644 --- a/trunk/arch/arm/mach-omap2/timer.c +++ b/trunk/arch/arm/mach-omap2/timer.c @@ -597,7 +597,7 @@ void __init omap4_local_timer_init(void) int err; if (of_have_populated_dt()) { - twd_local_timer_of_register(); + clocksource_of_init(); return; } diff --git a/trunk/arch/arm/mach-spear/Kconfig b/trunk/arch/arm/mach-spear/Kconfig deleted file mode 100644 index 4c52ee2b77dc..000000000000 --- a/trunk/arch/arm/mach-spear/Kconfig +++ /dev/null @@ -1,103 +0,0 @@ -# -# SPEAr Platform configuration file -# - -menuconfig PLAT_SPEAR - bool "ST SPEAr Family" if ARCH_MULTI_V7 || ARCH_MULTI_V5 - default PLAT_SPEAR_SINGLE - select ARCH_REQUIRE_GPIOLIB - select ARM_AMBA - select CLKDEV_LOOKUP - select CLKSRC_MMIO - select COMMON_CLK - select GENERIC_CLOCKEVENTS - select HAVE_CLK - -if PLAT_SPEAR - -config ARCH_SPEAR13XX - bool "ST SPEAr13xx" - depends on ARCH_MULTI_V7 || PLAT_SPEAR_SINGLE - select ARCH_HAVE_CPUFREQ - select ARM_GIC - select CPU_V7 - select GPIO_SPEAR_SPICS - select HAVE_SMP - select MIGHT_HAVE_CACHE_L2X0 - select PINCTRL - select USE_OF - help - Supports for ARM's SPEAR13XX family - -if ARCH_SPEAR13XX - -config MACH_SPEAR1310 - bool "SPEAr1310 Machine support with Device Tree" - select PINCTRL_SPEAR1310 - help - Supports ST SPEAr1310 machine configured via the device-tree - -config MACH_SPEAR1340 - bool "SPEAr1340 Machine support with Device Tree" - select PINCTRL_SPEAR1340 - help - Supports ST SPEAr1340 machine configured via the device-tree - -endif #ARCH_SPEAR13XX - -config ARCH_SPEAR3XX - bool "ST SPEAr3xx" - depends on ARCH_MULTI_V5 || PLAT_SPEAR_SINGLE - depends on !ARCH_SPEAR13XX - select ARM_VIC - select CPU_ARM926T - select PINCTRL - select USE_OF - help - Supports for ARM's SPEAR3XX family - -if ARCH_SPEAR3XX - -config MACH_SPEAR300 - bool "SPEAr300 Machine support with Device Tree" - select PINCTRL_SPEAR300 - help - Supports ST SPEAr300 machine configured via the device-tree - -config MACH_SPEAR310 - bool "SPEAr310 Machine support with Device Tree" - select PINCTRL_SPEAR310 - help - Supports ST SPEAr310 machine configured via the device-tree - -config MACH_SPEAR320 - bool "SPEAr320 Machine support with Device Tree" - select PINCTRL_SPEAR320 - help - Supports ST SPEAr320 machine configured via the device-tree - -endif - -config ARCH_SPEAR6XX - bool "ST SPEAr6XX" - depends on ARCH_MULTI_V5 || PLAT_SPEAR_SINGLE - depends on !ARCH_SPEAR13XX - select ARM_VIC - select CPU_ARM926T - help - Supports for ARM's SPEAR6XX family - -config MACH_SPEAR600 - def_bool y - depends on ARCH_SPEAR6XX - select USE_OF - help - Supports ST SPEAr600 boards configured via the device-treesource "arch/arm/mach-spear6xx/Kconfig" - -config ARCH_SPEAR_AUTO - def_bool PLAT_SPEAR_SINGLE - depends on !ARCH_SPEAR13XX && !ARCH_SPEAR6XX - select ARCH_SPEAR3XX - -endif - diff --git a/trunk/arch/arm/mach-spear/Makefile b/trunk/arch/arm/mach-spear/Makefile deleted file mode 100644 index af9bffb94f1c..000000000000 --- a/trunk/arch/arm/mach-spear/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -# -# SPEAr Platform specific Makefile -# - -ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include - -# Common support -obj-y := restart.o time.o - -obj-$(CONFIG_SMP) += headsmp.o platsmp.o -obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o - -obj-$(CONFIG_ARCH_SPEAR13XX) += spear13xx.o -obj-$(CONFIG_MACH_SPEAR1310) += spear1310.o -obj-$(CONFIG_MACH_SPEAR1340) += spear1340.o - -obj-$(CONFIG_ARCH_SPEAR3XX) += spear3xx.o -obj-$(CONFIG_ARCH_SPEAR3XX) += pl080.o -obj-$(CONFIG_MACH_SPEAR300) += spear300.o -obj-$(CONFIG_MACH_SPEAR310) += spear310.o -obj-$(CONFIG_MACH_SPEAR320) += spear320.o - -obj-$(CONFIG_ARCH_SPEAR6XX) += spear6xx.o -obj-$(CONFIG_ARCH_SPEAR6XX) += pl080.o - -CFLAGS_hotplug.o += -march=armv7-a diff --git a/trunk/arch/arm/mach-spear/include/mach/spear.h b/trunk/arch/arm/mach-spear/include/mach/spear.h deleted file mode 100644 index 374ddc393df1..000000000000 --- a/trunk/arch/arm/mach-spear/include/mach/spear.h +++ /dev/null @@ -1,95 +0,0 @@ -/* - * SPEAr3xx/6xx Machine family specific definition - * - * Copyright (C) 2009,2012 ST Microelectronics - * Rajeev Kumar - * Viresh Kumar - * - * This file is licensed under the terms of the GNU General Public - * License version 2. This program is licensed "as is" without any - * warranty of any kind, whether express or implied. - */ - -#ifndef __MACH_SPEAR_H -#define __MACH_SPEAR_H - -#include - -#if defined(CONFIG_ARCH_SPEAR3XX) || defined (CONFIG_ARCH_SPEAR6XX) - -/* ICM1 - Low speed connection */ -#define SPEAR_ICM1_2_BASE UL(0xD0000000) -#define VA_SPEAR_ICM1_2_BASE IOMEM(0xFD000000) -#define SPEAR_ICM1_UART_BASE UL(0xD0000000) -#define VA_SPEAR_ICM1_UART_BASE (VA_SPEAR_ICM1_2_BASE - SPEAR_ICM1_2_BASE + SPEAR_ICM1_UART_BASE) -#define SPEAR3XX_ICM1_SSP_BASE UL(0xD0100000) - -/* ML-1, 2 - Multi Layer CPU Subsystem */ -#define SPEAR_ICM3_ML1_2_BASE UL(0xF0000000) -#define VA_SPEAR6XX_ML_CPU_BASE IOMEM(0xF0000000) - -/* ICM3 - Basic Subsystem */ -#define SPEAR_ICM3_SMI_CTRL_BASE UL(0xFC000000) -#define VA_SPEAR_ICM3_SMI_CTRL_BASE IOMEM(0xFC000000) -#define SPEAR_ICM3_DMA_BASE UL(0xFC400000) -#define SPEAR_ICM3_SYS_CTRL_BASE UL(0xFCA00000) -#define VA_SPEAR_ICM3_SYS_CTRL_BASE (VA_SPEAR_ICM3_SMI_CTRL_BASE - SPEAR_ICM3_SMI_CTRL_BASE + SPEAR_ICM3_SYS_CTRL_BASE) -#define SPEAR_ICM3_MISC_REG_BASE UL(0xFCA80000) -#define VA_SPEAR_ICM3_MISC_REG_BASE (VA_SPEAR_ICM3_SMI_CTRL_BASE - SPEAR_ICM3_SMI_CTRL_BASE + SPEAR_ICM3_MISC_REG_BASE) - -/* Debug uart for linux, will be used for debug and uncompress messages */ -#define SPEAR_DBG_UART_BASE SPEAR_ICM1_UART_BASE -#define VA_SPEAR_DBG_UART_BASE VA_SPEAR_ICM1_UART_BASE - -/* Sysctl base for spear platform */ -#define SPEAR_SYS_CTRL_BASE SPEAR_ICM3_SYS_CTRL_BASE -#define VA_SPEAR_SYS_CTRL_BASE VA_SPEAR_ICM3_SYS_CTRL_BASE -#endif /* SPEAR3xx || SPEAR6XX */ - -/* SPEAr320 Macros */ -#define SPEAR320_SOC_CONFIG_BASE UL(0xB3000000) -#define VA_SPEAR320_SOC_CONFIG_BASE IOMEM(0xFE000000) - -#ifdef CONFIG_ARCH_SPEAR13XX - -#define PERIP_GRP2_BASE UL(0xB3000000) -#define VA_PERIP_GRP2_BASE IOMEM(0xFE000000) -#define MCIF_SDHCI_BASE UL(0xB3000000) -#define SYSRAM0_BASE UL(0xB3800000) -#define VA_SYSRAM0_BASE IOMEM(0xFE800000) -#define SYS_LOCATION (VA_SYSRAM0_BASE + 0x600) - -#define PERIP_GRP1_BASE UL(0xE0000000) -#define VA_PERIP_GRP1_BASE IOMEM(0xFD000000) -#define UART_BASE UL(0xE0000000) -#define VA_UART_BASE IOMEM(0xFD000000) -#define SSP_BASE UL(0xE0100000) -#define MISC_BASE UL(0xE0700000) -#define VA_MISC_BASE IOMEM(0xFD700000) - -#define A9SM_AND_MPMC_BASE UL(0xEC000000) -#define VA_A9SM_AND_MPMC_BASE IOMEM(0xFC000000) - -#define SPEAR1310_RAS_BASE UL(0xD8400000) -#define VA_SPEAR1310_RAS_BASE IOMEM(UL(0xFA400000)) - -/* A9SM peripheral offsets */ -#define A9SM_PERIP_BASE UL(0xEC800000) -#define VA_A9SM_PERIP_BASE IOMEM(0xFC800000) -#define VA_SCU_BASE (VA_A9SM_PERIP_BASE + 0x00) - -#define L2CC_BASE UL(0xED000000) -#define VA_L2CC_BASE IOMEM(UL(0xFB000000)) - -/* others */ -#define DMAC0_BASE UL(0xEA800000) -#define DMAC1_BASE UL(0xEB000000) -#define MCIF_CF_BASE UL(0xB2800000) - -/* Debug uart for linux, will be used for debug and uncompress messages */ -#define SPEAR_DBG_UART_BASE UART_BASE -#define VA_SPEAR_DBG_UART_BASE VA_UART_BASE - -#endif /* SPEAR13XX */ - -#endif /* __MACH_SPEAR_H */ diff --git a/trunk/arch/arm/mach-spear13xx/Kconfig b/trunk/arch/arm/mach-spear13xx/Kconfig new file mode 100644 index 000000000000..eaadc66d96b3 --- /dev/null +++ b/trunk/arch/arm/mach-spear13xx/Kconfig @@ -0,0 +1,20 @@ +# +# SPEAr13XX Machine configuration file +# + +if ARCH_SPEAR13XX + +menu "SPEAr13xx Implementations" +config MACH_SPEAR1310 + bool "SPEAr1310 Machine support with Device Tree" + select PINCTRL_SPEAR1310 + help + Supports ST SPEAr1310 machine configured via the device-tree + +config MACH_SPEAR1340 + bool "SPEAr1340 Machine support with Device Tree" + select PINCTRL_SPEAR1340 + help + Supports ST SPEAr1340 machine configured via the device-tree +endmenu +endif #ARCH_SPEAR13XX diff --git a/trunk/arch/arm/mach-spear13xx/Makefile b/trunk/arch/arm/mach-spear13xx/Makefile new file mode 100644 index 000000000000..3435ea78c15d --- /dev/null +++ b/trunk/arch/arm/mach-spear13xx/Makefile @@ -0,0 +1,10 @@ +# +# Makefile for SPEAr13XX machine series +# + +obj-$(CONFIG_SMP) += headsmp.o platsmp.o +obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o + +obj-$(CONFIG_ARCH_SPEAR13XX) += spear13xx.o +obj-$(CONFIG_MACH_SPEAR1310) += spear1310.o +obj-$(CONFIG_MACH_SPEAR1340) += spear1340.o diff --git a/trunk/arch/arm/mach-spear/Makefile.boot b/trunk/arch/arm/mach-spear13xx/Makefile.boot similarity index 100% rename from trunk/arch/arm/mach-spear/Makefile.boot rename to trunk/arch/arm/mach-spear13xx/Makefile.boot diff --git a/trunk/arch/arm/mach-spear/headsmp.S b/trunk/arch/arm/mach-spear13xx/headsmp.S similarity index 100% rename from trunk/arch/arm/mach-spear/headsmp.S rename to trunk/arch/arm/mach-spear13xx/headsmp.S diff --git a/trunk/arch/arm/mach-spear/hotplug.c b/trunk/arch/arm/mach-spear13xx/hotplug.c similarity index 100% rename from trunk/arch/arm/mach-spear/hotplug.c rename to trunk/arch/arm/mach-spear13xx/hotplug.c diff --git a/trunk/arch/arm/mach-spear13xx/include/mach/debug-macro.S b/trunk/arch/arm/mach-spear13xx/include/mach/debug-macro.S new file mode 100644 index 000000000000..9e3ae6bfe50d --- /dev/null +++ b/trunk/arch/arm/mach-spear13xx/include/mach/debug-macro.S @@ -0,0 +1,14 @@ +/* + * arch/arm/mach-spear13xx/include/mach/debug-macro.S + * + * Debugging macro include header spear13xx machine family + * + * Copyright (C) 2012 ST Microelectronics + * Viresh Kumar + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without any + * warranty of any kind, whether express or implied. + */ + +#include diff --git a/trunk/arch/arm/mach-spear/spear13xx-dma.h b/trunk/arch/arm/mach-spear13xx/include/mach/dma.h similarity index 100% rename from trunk/arch/arm/mach-spear/spear13xx-dma.h rename to trunk/arch/arm/mach-spear13xx/include/mach/dma.h diff --git a/trunk/arch/arm/mach-spear/generic.h b/trunk/arch/arm/mach-spear13xx/include/mach/generic.h similarity index 57% rename from trunk/arch/arm/mach-spear/generic.h rename to trunk/arch/arm/mach-spear13xx/include/mach/generic.h index 8ba7e75b648d..633e678e01a3 100644 --- a/trunk/arch/arm/mach-spear/generic.h +++ b/trunk/arch/arm/mach-spear13xx/include/mach/generic.h @@ -1,8 +1,9 @@ /* - * spear machine family generic header file + * arch/arm/mach-spear13xx/include/mach/generic.h * - * Copyright (C) 2009-2012 ST Microelectronics - * Rajeev Kumar + * spear13xx machine family generic header file + * + * Copyright (C) 2012 ST Microelectronics * Viresh Kumar * * This file is licensed under the terms of the GNU General Public @@ -14,46 +15,37 @@ #define __MACH_GENERIC_H #include -#include -#include #include +/* Add spear13xx structure declarations here */ extern void spear13xx_timer_init(void); -extern void spear3xx_timer_init(void); extern struct pl022_ssp_controller pl022_plat_data; -extern struct pl08x_platform_data pl080_plat_data; extern struct dw_dma_platform_data dmac_plat_data; extern struct dw_dma_slave cf_dma_priv; extern struct dw_dma_slave nand_read_dma_priv; extern struct dw_dma_slave nand_write_dma_priv; -bool dw_dma_filter(struct dma_chan *chan, void *slave); +/* Add spear13xx family function declarations here */ void __init spear_setup_of_timer(void); -void __init spear3xx_clk_init(void __iomem *misc_base, - void __iomem *soc_config_base); -void __init spear3xx_map_io(void); -void __init spear3xx_dt_init_irq(void); -void __init spear6xx_clk_init(void __iomem *misc_base); void __init spear13xx_map_io(void); void __init spear13xx_l2x0_init(void); - +bool dw_dma_filter(struct dma_chan *chan, void *slave); void spear_restart(char, const char *); - void spear13xx_secondary_startup(void); void __cpuinit spear13xx_cpu_die(unsigned int cpu); extern struct smp_operations spear13xx_smp_ops; #ifdef CONFIG_MACH_SPEAR1310 -void __init spear1310_clk_init(void __iomem *misc_base, void __iomem *ras_base); +void __init spear1310_clk_init(void); #else -static inline void spear1310_clk_init(void __iomem *misc_base, void __iomem *ras_base) {} +static inline void spear1310_clk_init(void) {} #endif #ifdef CONFIG_MACH_SPEAR1340 -void __init spear1340_clk_init(void __iomem *misc_base); +void __init spear1340_clk_init(void); #else -static inline void spear1340_clk_init(void __iomem *misc_base) {} +static inline void spear1340_clk_init(void) {} #endif #endif /* __MACH_GENERIC_H */ diff --git a/trunk/arch/arm/mach-spear13xx/include/mach/hardware.h b/trunk/arch/arm/mach-spear13xx/include/mach/hardware.h new file mode 100644 index 000000000000..40a8c178f10d --- /dev/null +++ b/trunk/arch/arm/mach-spear13xx/include/mach/hardware.h @@ -0,0 +1 @@ +/* empty */ diff --git a/trunk/arch/arm/mach-spear13xx/include/mach/irqs.h b/trunk/arch/arm/mach-spear13xx/include/mach/irqs.h new file mode 100644 index 000000000000..271a62b4cd31 --- /dev/null +++ b/trunk/arch/arm/mach-spear13xx/include/mach/irqs.h @@ -0,0 +1,20 @@ +/* + * arch/arm/mach-spear13xx/include/mach/irqs.h + * + * IRQ helper macros for spear13xx machine family + * + * Copyright (C) 2012 ST Microelectronics + * Viresh Kumar + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without any + * warranty of any kind, whether express or implied. + */ + +#ifndef __MACH_IRQS_H +#define __MACH_IRQS_H + +#define IRQ_GIC_END 160 +#define NR_IRQS IRQ_GIC_END + +#endif /* __MACH_IRQS_H */ diff --git a/trunk/arch/arm/mach-spear13xx/include/mach/spear.h b/trunk/arch/arm/mach-spear13xx/include/mach/spear.h new file mode 100644 index 000000000000..7cfa6818865a --- /dev/null +++ b/trunk/arch/arm/mach-spear13xx/include/mach/spear.h @@ -0,0 +1,54 @@ +/* + * arch/arm/mach-spear13xx/include/mach/spear.h + * + * spear13xx Machine family specific definition + * + * Copyright (C) 2012 ST Microelectronics + * Viresh Kumar + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without any + * warranty of any kind, whether express or implied. + */ + +#ifndef __MACH_SPEAR13XX_H +#define __MACH_SPEAR13XX_H + +#include + +#define PERIP_GRP2_BASE UL(0xB3000000) +#define VA_PERIP_GRP2_BASE IOMEM(0xFE000000) +#define MCIF_SDHCI_BASE UL(0xB3000000) +#define SYSRAM0_BASE UL(0xB3800000) +#define VA_SYSRAM0_BASE IOMEM(0xFE800000) +#define SYS_LOCATION (VA_SYSRAM0_BASE + 0x600) + +#define PERIP_GRP1_BASE UL(0xE0000000) +#define VA_PERIP_GRP1_BASE IOMEM(0xFD000000) +#define UART_BASE UL(0xE0000000) +#define VA_UART_BASE IOMEM(0xFD000000) +#define SSP_BASE UL(0xE0100000) +#define MISC_BASE UL(0xE0700000) +#define VA_MISC_BASE IOMEM(0xFD700000) + +#define A9SM_AND_MPMC_BASE UL(0xEC000000) +#define VA_A9SM_AND_MPMC_BASE IOMEM(0xFC000000) + +/* A9SM peripheral offsets */ +#define A9SM_PERIP_BASE UL(0xEC800000) +#define VA_A9SM_PERIP_BASE IOMEM(0xFC800000) +#define VA_SCU_BASE (VA_A9SM_PERIP_BASE + 0x00) + +#define L2CC_BASE UL(0xED000000) +#define VA_L2CC_BASE IOMEM(UL(0xFB000000)) + +/* others */ +#define DMAC0_BASE UL(0xEA800000) +#define DMAC1_BASE UL(0xEB000000) +#define MCIF_CF_BASE UL(0xB2800000) + +/* Debug uart for linux, will be used for debug and uncompress messages */ +#define SPEAR_DBG_UART_BASE UART_BASE +#define VA_SPEAR_DBG_UART_BASE VA_UART_BASE + +#endif /* __MACH_SPEAR13XX_H */ diff --git a/trunk/arch/arm/mach-spear13xx/include/mach/timex.h b/trunk/arch/arm/mach-spear13xx/include/mach/timex.h new file mode 100644 index 000000000000..3a58b8284a6a --- /dev/null +++ b/trunk/arch/arm/mach-spear13xx/include/mach/timex.h @@ -0,0 +1,19 @@ +/* + * arch/arm/mach-spear3xx/include/mach/timex.h + * + * SPEAr3XX machine family specific timex definitions + * + * Copyright (C) 2012 ST Microelectronics + * Viresh Kumar + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without any + * warranty of any kind, whether express or implied. + */ + +#ifndef __MACH_TIMEX_H +#define __MACH_TIMEX_H + +#include + +#endif /* __MACH_TIMEX_H */ diff --git a/trunk/arch/arm/mach-spear13xx/include/mach/uncompress.h b/trunk/arch/arm/mach-spear13xx/include/mach/uncompress.h new file mode 100644 index 000000000000..70fe72f05dea --- /dev/null +++ b/trunk/arch/arm/mach-spear13xx/include/mach/uncompress.h @@ -0,0 +1,19 @@ +/* + * arch/arm/mach-spear13xx/include/mach/uncompress.h + * + * Serial port stubs for kernel decompress status messages + * + * Copyright (C) 2012 ST Microelectronics + * Viresh Kumar + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without any + * warranty of any kind, whether express or implied. + */ + +#ifndef __MACH_UNCOMPRESS_H +#define __MACH_UNCOMPRESS_H + +#include + +#endif /* __MACH_UNCOMPRESS_H */ diff --git a/trunk/arch/arm/mach-spear/platsmp.c b/trunk/arch/arm/mach-spear13xx/platsmp.c similarity index 99% rename from trunk/arch/arm/mach-spear/platsmp.c rename to trunk/arch/arm/mach-spear13xx/platsmp.c index 927979e26b4d..af4ade61cd95 100644 --- a/trunk/arch/arm/mach-spear/platsmp.c +++ b/trunk/arch/arm/mach-spear13xx/platsmp.c @@ -19,7 +19,7 @@ #include #include #include -#include "generic.h" +#include static DEFINE_SPINLOCK(boot_lock); diff --git a/trunk/arch/arm/mach-spear/spear1310.c b/trunk/arch/arm/mach-spear13xx/spear1310.c similarity index 95% rename from trunk/arch/arm/mach-spear/spear1310.c rename to trunk/arch/arm/mach-spear13xx/spear1310.c index ed3b5c287a7b..56214d1076ef 100644 --- a/trunk/arch/arm/mach-spear/spear1310.c +++ b/trunk/arch/arm/mach-spear13xx/spear1310.c @@ -19,7 +19,7 @@ #include #include #include -#include "generic.h" +#include #include /* Base addresses */ @@ -30,6 +30,8 @@ #define SPEAR1310_RAS_GRP1_BASE UL(0xD8000000) #define VA_SPEAR1310_RAS_GRP1_BASE UL(0xFA000000) +#define SPEAR1310_RAS_BASE UL(0xD8400000) +#define VA_SPEAR1310_RAS_BASE IOMEM(UL(0xFA400000)) static struct arasan_cf_pdata cf_pdata = { .cf_if_clk = CF_IF_CLK_166M, diff --git a/trunk/arch/arm/mach-spear/spear1340.c b/trunk/arch/arm/mach-spear13xx/spear1340.c similarity index 99% rename from trunk/arch/arm/mach-spear/spear1340.c rename to trunk/arch/arm/mach-spear13xx/spear1340.c index 75e38644bbfb..9a28beb2a113 100644 --- a/trunk/arch/arm/mach-spear/spear1340.c +++ b/trunk/arch/arm/mach-spear13xx/spear1340.c @@ -20,11 +20,10 @@ #include #include #include -#include "generic.h" +#include +#include #include -#include "spear13xx-dma.h" - /* Base addresses */ #define SPEAR1340_SATA_BASE UL(0xB1000000) #define SPEAR1340_UART1_BASE UL(0xB4100000) diff --git a/trunk/arch/arm/mach-spear/spear13xx.c b/trunk/arch/arm/mach-spear13xx/spear13xx.c similarity index 95% rename from trunk/arch/arm/mach-spear/spear13xx.c rename to trunk/arch/arm/mach-spear13xx/spear13xx.c index 1b97e8623472..25a10191b021 100644 --- a/trunk/arch/arm/mach-spear/spear13xx.c +++ b/trunk/arch/arm/mach-spear13xx/spear13xx.c @@ -15,17 +15,16 @@ #include #include +#include #include #include #include #include #include -#include -#include "generic.h" +#include +#include #include -#include "spear13xx-dma.h" - /* common dw_dma filter routine to be used by peripherals */ bool dw_dma_filter(struct dma_chan *chan, void *slave) { @@ -146,9 +145,9 @@ void __init spear13xx_map_io(void) static void __init spear13xx_clk_init(void) { if (of_machine_is_compatible("st,spear1310")) - spear1310_clk_init(VA_MISC_BASE, VA_SPEAR1310_RAS_BASE); + spear1310_clk_init(); else if (of_machine_is_compatible("st,spear1340")) - spear1340_clk_init(VA_MISC_BASE); + spear1340_clk_init(); else pr_err("%s: Unknown machine\n", __func__); } @@ -180,5 +179,5 @@ void __init spear13xx_timer_init(void) clk_put(pclk); spear_setup_of_timer(); - twd_local_timer_of_register(); + clocksource_of_init(); } diff --git a/trunk/arch/arm/mach-spear3xx/Kconfig b/trunk/arch/arm/mach-spear3xx/Kconfig new file mode 100644 index 000000000000..8bd37291fa4f --- /dev/null +++ b/trunk/arch/arm/mach-spear3xx/Kconfig @@ -0,0 +1,26 @@ +# +# SPEAr3XX Machine configuration file +# + +if ARCH_SPEAR3XX + +menu "SPEAr3xx Implementations" +config MACH_SPEAR300 + bool "SPEAr300 Machine support with Device Tree" + select PINCTRL_SPEAR300 + help + Supports ST SPEAr300 machine configured via the device-tree + +config MACH_SPEAR310 + bool "SPEAr310 Machine support with Device Tree" + select PINCTRL_SPEAR310 + help + Supports ST SPEAr310 machine configured via the device-tree + +config MACH_SPEAR320 + bool "SPEAr320 Machine support with Device Tree" + select PINCTRL_SPEAR320 + help + Supports ST SPEAr320 machine configured via the device-tree +endmenu +endif #ARCH_SPEAR3XX diff --git a/trunk/arch/arm/mach-spear3xx/Makefile b/trunk/arch/arm/mach-spear3xx/Makefile new file mode 100644 index 000000000000..8d12faa178fd --- /dev/null +++ b/trunk/arch/arm/mach-spear3xx/Makefile @@ -0,0 +1,15 @@ +# +# Makefile for SPEAr3XX machine series +# + +# common files +obj-$(CONFIG_ARCH_SPEAR3XX) += spear3xx.o + +# spear300 specific files +obj-$(CONFIG_MACH_SPEAR300) += spear300.o + +# spear310 specific files +obj-$(CONFIG_MACH_SPEAR310) += spear310.o + +# spear320 specific files +obj-$(CONFIG_MACH_SPEAR320) += spear320.o diff --git a/trunk/arch/arm/mach-spear3xx/Makefile.boot b/trunk/arch/arm/mach-spear3xx/Makefile.boot new file mode 100644 index 000000000000..4674a4c221db --- /dev/null +++ b/trunk/arch/arm/mach-spear3xx/Makefile.boot @@ -0,0 +1,3 @@ +zreladdr-y += 0x00008000 +params_phys-y := 0x00000100 +initrd_phys-y := 0x00800000 diff --git a/trunk/arch/arm/mach-spear3xx/include/mach/debug-macro.S b/trunk/arch/arm/mach-spear3xx/include/mach/debug-macro.S new file mode 100644 index 000000000000..0a6381fad5d9 --- /dev/null +++ b/trunk/arch/arm/mach-spear3xx/include/mach/debug-macro.S @@ -0,0 +1,14 @@ +/* + * arch/arm/mach-spear3xx/include/mach/debug-macro.S + * + * Debugging macro include header spear3xx machine family + * + * Copyright (C) 2009 ST Microelectronics + * Viresh Kumar + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without any + * warranty of any kind, whether express or implied. + */ + +#include diff --git a/trunk/arch/arm/mach-spear3xx/include/mach/generic.h b/trunk/arch/arm/mach-spear3xx/include/mach/generic.h new file mode 100644 index 000000000000..df310799e416 --- /dev/null +++ b/trunk/arch/arm/mach-spear3xx/include/mach/generic.h @@ -0,0 +1,36 @@ +/* + * arch/arm/mach-spear3xx/generic.h + * + * SPEAr3XX machine family generic header file + * + * Copyright (C) 2009 ST Microelectronics + * Viresh Kumar + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without any + * warranty of any kind, whether express or implied. + */ + +#ifndef __MACH_GENERIC_H +#define __MACH_GENERIC_H + +#include +#include +#include +#include +#include +#include + +/* Add spear3xx family device structure declarations here */ +extern void spear3xx_timer_init(void); +extern struct pl022_ssp_controller pl022_plat_data; +extern struct pl08x_platform_data pl080_plat_data; + +/* Add spear3xx family function declarations here */ +void __init spear_setup_of_timer(void); +void __init spear3xx_clk_init(void); +void __init spear3xx_map_io(void); + +void spear_restart(char, const char *); + +#endif /* __MACH_GENERIC_H */ diff --git a/trunk/arch/arm/mach-spear3xx/include/mach/hardware.h b/trunk/arch/arm/mach-spear3xx/include/mach/hardware.h new file mode 100644 index 000000000000..40a8c178f10d --- /dev/null +++ b/trunk/arch/arm/mach-spear3xx/include/mach/hardware.h @@ -0,0 +1 @@ +/* empty */ diff --git a/trunk/arch/arm/mach-spear3xx/include/mach/irqs.h b/trunk/arch/arm/mach-spear3xx/include/mach/irqs.h new file mode 100644 index 000000000000..f95e5b2b6686 --- /dev/null +++ b/trunk/arch/arm/mach-spear3xx/include/mach/irqs.h @@ -0,0 +1,19 @@ +/* + * arch/arm/mach-spear3xx/include/mach/irqs.h + * + * IRQ helper macros for SPEAr3xx machine family + * + * Copyright (C) 2009 ST Microelectronics + * Viresh Kumar + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without any + * warranty of any kind, whether express or implied. + */ + +#ifndef __MACH_IRQS_H +#define __MACH_IRQS_H + +#define NR_IRQS 256 + +#endif /* __MACH_IRQS_H */ diff --git a/trunk/arch/arm/mach-spear/include/mach/misc_regs.h b/trunk/arch/arm/mach-spear3xx/include/mach/misc_regs.h similarity index 90% rename from trunk/arch/arm/mach-spear/include/mach/misc_regs.h rename to trunk/arch/arm/mach-spear3xx/include/mach/misc_regs.h index 935639ce59ba..6309bf68d6f8 100644 --- a/trunk/arch/arm/mach-spear/include/mach/misc_regs.h +++ b/trunk/arch/arm/mach-spear3xx/include/mach/misc_regs.h @@ -16,7 +16,7 @@ #include -#define MISC_BASE (VA_SPEAR_ICM3_MISC_REG_BASE) +#define MISC_BASE IOMEM(VA_SPEAR3XX_ICM3_MISC_REG_BASE) #define DMA_CHN_CFG (MISC_BASE + 0x0A0) #endif /* __MACH_MISC_REGS_H */ diff --git a/trunk/arch/arm/mach-spear3xx/include/mach/spear.h b/trunk/arch/arm/mach-spear3xx/include/mach/spear.h new file mode 100644 index 000000000000..8cca95193d4d --- /dev/null +++ b/trunk/arch/arm/mach-spear3xx/include/mach/spear.h @@ -0,0 +1,60 @@ +/* + * arch/arm/mach-spear3xx/include/mach/spear.h + * + * SPEAr3xx Machine family specific definition + * + * Copyright (C) 2009 ST Microelectronics + * Viresh Kumar + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without any + * warranty of any kind, whether express or implied. + */ + +#ifndef __MACH_SPEAR3XX_H +#define __MACH_SPEAR3XX_H + +#include + +/* ICM1 - Low speed connection */ +#define SPEAR3XX_ICM1_2_BASE UL(0xD0000000) +#define VA_SPEAR3XX_ICM1_2_BASE UL(0xFD000000) +#define SPEAR3XX_ICM1_UART_BASE UL(0xD0000000) +#define VA_SPEAR3XX_ICM1_UART_BASE (VA_SPEAR3XX_ICM1_2_BASE | SPEAR3XX_ICM1_UART_BASE) +#define SPEAR3XX_ICM1_SSP_BASE UL(0xD0100000) + +/* ML1 - Multi Layer CPU Subsystem */ +#define SPEAR3XX_ICM3_ML1_2_BASE UL(0xF0000000) +#define VA_SPEAR6XX_ML_CPU_BASE UL(0xF0000000) + +/* ICM3 - Basic Subsystem */ +#define SPEAR3XX_ICM3_SMI_CTRL_BASE UL(0xFC000000) +#define VA_SPEAR3XX_ICM3_SMI_CTRL_BASE UL(0xFC000000) +#define SPEAR3XX_ICM3_DMA_BASE UL(0xFC400000) +#define SPEAR3XX_ICM3_SYS_CTRL_BASE UL(0xFCA00000) +#define VA_SPEAR3XX_ICM3_SYS_CTRL_BASE (VA_SPEAR3XX_ICM3_SMI_CTRL_BASE | SPEAR3XX_ICM3_SYS_CTRL_BASE) +#define SPEAR3XX_ICM3_MISC_REG_BASE UL(0xFCA80000) +#define VA_SPEAR3XX_ICM3_MISC_REG_BASE (VA_SPEAR3XX_ICM3_SMI_CTRL_BASE | SPEAR3XX_ICM3_MISC_REG_BASE) + +/* Debug uart for linux, will be used for debug and uncompress messages */ +#define SPEAR_DBG_UART_BASE SPEAR3XX_ICM1_UART_BASE +#define VA_SPEAR_DBG_UART_BASE VA_SPEAR3XX_ICM1_UART_BASE + +/* Sysctl base for spear platform */ +#define SPEAR_SYS_CTRL_BASE SPEAR3XX_ICM3_SYS_CTRL_BASE +#define VA_SPEAR_SYS_CTRL_BASE VA_SPEAR3XX_ICM3_SYS_CTRL_BASE + +/* SPEAr320 Macros */ +#define SPEAR320_SOC_CONFIG_BASE UL(0xB3000000) +#define VA_SPEAR320_SOC_CONFIG_BASE UL(0xFE000000) +#define SPEAR320_CONTROL_REG IOMEM(VA_SPEAR320_SOC_CONFIG_BASE) +#define SPEAR320_EXT_CTRL_REG IOMEM(VA_SPEAR320_SOC_CONFIG_BASE + 0x0018) + #define SPEAR320_UARTX_PCLK_MASK 0x1 + #define SPEAR320_UART2_PCLK_SHIFT 8 + #define SPEAR320_UART3_PCLK_SHIFT 9 + #define SPEAR320_UART4_PCLK_SHIFT 10 + #define SPEAR320_UART5_PCLK_SHIFT 11 + #define SPEAR320_UART6_PCLK_SHIFT 12 + #define SPEAR320_RS485_PCLK_SHIFT 13 + +#endif /* __MACH_SPEAR3XX_H */ diff --git a/trunk/arch/arm/mach-spear3xx/include/mach/timex.h b/trunk/arch/arm/mach-spear3xx/include/mach/timex.h new file mode 100644 index 000000000000..9f5d08bd0c44 --- /dev/null +++ b/trunk/arch/arm/mach-spear3xx/include/mach/timex.h @@ -0,0 +1,19 @@ +/* + * arch/arm/mach-spear3xx/include/mach/timex.h + * + * SPEAr3XX machine family specific timex definitions + * + * Copyright (C) 2009 ST Microelectronics + * Viresh Kumar + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without any + * warranty of any kind, whether express or implied. + */ + +#ifndef __MACH_TIMEX_H +#define __MACH_TIMEX_H + +#include + +#endif /* __MACH_TIMEX_H */ diff --git a/trunk/arch/arm/mach-spear3xx/include/mach/uncompress.h b/trunk/arch/arm/mach-spear3xx/include/mach/uncompress.h new file mode 100644 index 000000000000..b909b011f7c8 --- /dev/null +++ b/trunk/arch/arm/mach-spear3xx/include/mach/uncompress.h @@ -0,0 +1,19 @@ +/* + * arch/arm/mach-spear3xx/include/mach/uncompress.h + * + * Serial port stubs for kernel decompress status messages + * + * Copyright (C) 2009 ST Microelectronics + * Viresh Kumar + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without any + * warranty of any kind, whether express or implied. + */ + +#ifndef __MACH_UNCOMPRESS_H +#define __MACH_UNCOMPRESS_H + +#include + +#endif /* __MACH_UNCOMPRESS_H */ diff --git a/trunk/arch/arm/mach-spear/spear300.c b/trunk/arch/arm/mach-spear3xx/spear300.c similarity index 98% rename from trunk/arch/arm/mach-spear/spear300.c rename to trunk/arch/arm/mach-spear3xx/spear300.c index bac56e845f7a..bbc9b7e9c62c 100644 --- a/trunk/arch/arm/mach-spear/spear300.c +++ b/trunk/arch/arm/mach-spear3xx/spear300.c @@ -17,7 +17,7 @@ #include #include #include -#include "generic.h" +#include #include /* DMAC platform data's slave info */ @@ -185,7 +185,7 @@ struct pl08x_channel_data spear300_dma_info[] = { static struct of_dev_auxdata spear300_auxdata_lookup[] __initdata = { OF_DEV_AUXDATA("arm,pl022", SPEAR3XX_ICM1_SSP_BASE, NULL, &pl022_plat_data), - OF_DEV_AUXDATA("arm,pl080", SPEAR_ICM3_DMA_BASE, NULL, + OF_DEV_AUXDATA("arm,pl080", SPEAR3XX_ICM3_DMA_BASE, NULL, &pl080_plat_data), {} }; diff --git a/trunk/arch/arm/mach-spear/spear310.c b/trunk/arch/arm/mach-spear3xx/spear310.c similarity index 98% rename from trunk/arch/arm/mach-spear/spear310.c rename to trunk/arch/arm/mach-spear3xx/spear310.c index 6ffbc63d516d..c13a434a8195 100644 --- a/trunk/arch/arm/mach-spear/spear310.c +++ b/trunk/arch/arm/mach-spear3xx/spear310.c @@ -18,7 +18,7 @@ #include #include #include -#include "generic.h" +#include #include #define SPEAR310_UART1_BASE UL(0xB2000000) @@ -217,7 +217,7 @@ static struct amba_pl011_data spear310_uart_data[] = { static struct of_dev_auxdata spear310_auxdata_lookup[] __initdata = { OF_DEV_AUXDATA("arm,pl022", SPEAR3XX_ICM1_SSP_BASE, NULL, &pl022_plat_data), - OF_DEV_AUXDATA("arm,pl080", SPEAR_ICM3_DMA_BASE, NULL, + OF_DEV_AUXDATA("arm,pl080", SPEAR3XX_ICM3_DMA_BASE, NULL, &pl080_plat_data), OF_DEV_AUXDATA("arm,pl011", SPEAR310_UART1_BASE, NULL, &spear310_uart_data[0]), diff --git a/trunk/arch/arm/mach-spear/spear320.c b/trunk/arch/arm/mach-spear3xx/spear320.c similarity index 97% rename from trunk/arch/arm/mach-spear/spear320.c rename to trunk/arch/arm/mach-spear3xx/spear320.c index 6eb3eec65f96..e1c77079a3e5 100644 --- a/trunk/arch/arm/mach-spear/spear320.c +++ b/trunk/arch/arm/mach-spear3xx/spear320.c @@ -19,8 +19,7 @@ #include #include #include -#include -#include "generic.h" +#include #include #define SPEAR320_UART1_BASE UL(0xA3000000) @@ -223,7 +222,7 @@ static struct amba_pl011_data spear320_uart_data[] = { static struct of_dev_auxdata spear320_auxdata_lookup[] __initdata = { OF_DEV_AUXDATA("arm,pl022", SPEAR3XX_ICM1_SSP_BASE, NULL, &pl022_plat_data), - OF_DEV_AUXDATA("arm,pl080", SPEAR_ICM3_DMA_BASE, NULL, + OF_DEV_AUXDATA("arm,pl080", SPEAR3XX_ICM3_DMA_BASE, NULL, &pl080_plat_data), OF_DEV_AUXDATA("arm,pl022", SPEAR320_SSP0_BASE, NULL, &spear320_ssp_data[0]), @@ -254,7 +253,7 @@ static const char * const spear320_dt_board_compat[] = { struct map_desc spear320_io_desc[] __initdata = { { - .virtual = (unsigned long)VA_SPEAR320_SOC_CONFIG_BASE, + .virtual = VA_SPEAR320_SOC_CONFIG_BASE, .pfn = __phys_to_pfn(SPEAR320_SOC_CONFIG_BASE), .length = SZ_16M, .type = MT_DEVICE diff --git a/trunk/arch/arm/mach-spear/spear3xx.c b/trunk/arch/arm/mach-spear3xx/spear3xx.c similarity index 87% rename from trunk/arch/arm/mach-spear/spear3xx.c rename to trunk/arch/arm/mach-spear3xx/spear3xx.c index 0227c97797cd..f9d754f90c59 100644 --- a/trunk/arch/arm/mach-spear/spear3xx.c +++ b/trunk/arch/arm/mach-spear3xx/spear3xx.c @@ -14,14 +14,11 @@ #define pr_fmt(fmt) "SPEAr3xx: " fmt #include -#include -#include +#include #include -#include -#include "pl080.h" -#include "generic.h" +#include +#include #include -#include /* ssp device registration */ struct pl022_ssp_controller pl022_plat_data = { @@ -68,13 +65,13 @@ struct pl08x_platform_data pl080_plat_data = { */ struct map_desc spear3xx_io_desc[] __initdata = { { - .virtual = (unsigned long)VA_SPEAR_ICM1_2_BASE, - .pfn = __phys_to_pfn(SPEAR_ICM1_2_BASE), + .virtual = VA_SPEAR3XX_ICM1_2_BASE, + .pfn = __phys_to_pfn(SPEAR3XX_ICM1_2_BASE), .length = SZ_16M, .type = MT_DEVICE }, { - .virtual = (unsigned long)VA_SPEAR_ICM3_SMI_CTRL_BASE, - .pfn = __phys_to_pfn(SPEAR_ICM3_SMI_CTRL_BASE), + .virtual = VA_SPEAR3XX_ICM3_SMI_CTRL_BASE, + .pfn = __phys_to_pfn(SPEAR3XX_ICM3_SMI_CTRL_BASE), .length = SZ_16M, .type = MT_DEVICE }, @@ -91,7 +88,7 @@ void __init spear3xx_timer_init(void) char pclk_name[] = "pll3_clk"; struct clk *gpt_clk, *pclk; - spear3xx_clk_init(MISC_BASE, VA_SPEAR320_SOC_CONFIG_BASE); + spear3xx_clk_init(); /* get the system timer clock */ gpt_clk = clk_get_sys("gpt0", NULL); diff --git a/trunk/arch/arm/mach-spear6xx/Kconfig b/trunk/arch/arm/mach-spear6xx/Kconfig new file mode 100644 index 000000000000..339f397dea70 --- /dev/null +++ b/trunk/arch/arm/mach-spear6xx/Kconfig @@ -0,0 +1,10 @@ +# +# SPEAr6XX Machine configuration file +# + +config MACH_SPEAR600 + def_bool y + depends on ARCH_SPEAR6XX + select USE_OF + help + Supports ST SPEAr600 boards configured via the device-tree diff --git a/trunk/arch/arm/mach-spear6xx/Makefile b/trunk/arch/arm/mach-spear6xx/Makefile new file mode 100644 index 000000000000..898831d93f37 --- /dev/null +++ b/trunk/arch/arm/mach-spear6xx/Makefile @@ -0,0 +1,6 @@ +# +# Makefile for SPEAr6XX machine series +# + +# common files +obj-y += spear6xx.o diff --git a/trunk/arch/arm/mach-spear6xx/Makefile.boot b/trunk/arch/arm/mach-spear6xx/Makefile.boot new file mode 100644 index 000000000000..4674a4c221db --- /dev/null +++ b/trunk/arch/arm/mach-spear6xx/Makefile.boot @@ -0,0 +1,3 @@ +zreladdr-y += 0x00008000 +params_phys-y := 0x00000100 +initrd_phys-y := 0x00800000 diff --git a/trunk/arch/arm/mach-spear6xx/include/mach/debug-macro.S b/trunk/arch/arm/mach-spear6xx/include/mach/debug-macro.S new file mode 100644 index 000000000000..0f3ea39edd96 --- /dev/null +++ b/trunk/arch/arm/mach-spear6xx/include/mach/debug-macro.S @@ -0,0 +1,14 @@ +/* + * arch/arm/mach-spear6xx/include/mach/debug-macro.S + * + * Debugging macro include header for SPEAr6xx machine family + * + * Copyright (C) 2009 ST Microelectronics + * Rajeev Kumar + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without any + * warranty of any kind, whether express or implied. + */ + +#include diff --git a/trunk/arch/arm/mach-spear6xx/include/mach/generic.h b/trunk/arch/arm/mach-spear6xx/include/mach/generic.h new file mode 100644 index 000000000000..65514b159370 --- /dev/null +++ b/trunk/arch/arm/mach-spear6xx/include/mach/generic.h @@ -0,0 +1,23 @@ +/* + * arch/arm/mach-spear6xx/include/mach/generic.h + * + * SPEAr6XX machine family specific generic header file + * + * Copyright (C) 2009 ST Microelectronics + * Rajeev Kumar + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without any + * warranty of any kind, whether express or implied. + */ + +#ifndef __MACH_GENERIC_H +#define __MACH_GENERIC_H + +#include + +void __init spear_setup_of_timer(void); +void spear_restart(char, const char *); +void __init spear6xx_clk_init(void); + +#endif /* __MACH_GENERIC_H */ diff --git a/trunk/arch/arm/mach-spear6xx/include/mach/hardware.h b/trunk/arch/arm/mach-spear6xx/include/mach/hardware.h new file mode 100644 index 000000000000..40a8c178f10d --- /dev/null +++ b/trunk/arch/arm/mach-spear6xx/include/mach/hardware.h @@ -0,0 +1 @@ +/* empty */ diff --git a/trunk/arch/arm/mach-spear/include/mach/irqs.h b/trunk/arch/arm/mach-spear6xx/include/mach/irqs.h similarity index 51% rename from trunk/arch/arm/mach-spear/include/mach/irqs.h rename to trunk/arch/arm/mach-spear6xx/include/mach/irqs.h index 92da0a8c6bce..37a5c411a866 100644 --- a/trunk/arch/arm/mach-spear/include/mach/irqs.h +++ b/trunk/arch/arm/mach-spear6xx/include/mach/irqs.h @@ -1,9 +1,10 @@ /* - * IRQ helper macros for spear machine family + * arch/arm/mach-spear6xx/include/mach/irqs.h * - * Copyright (C) 2009-2012 ST Microelectronics - * Rajeev Kumar - * Viresh Kumar + * IRQ helper macros for SPEAr6xx machine family + * + * Copyright (C) 2009 ST Microelectronics + * Rajeev Kumar * * This file is licensed under the terms of the GNU General Public * License version 2. This program is licensed "as is" without any @@ -13,11 +14,6 @@ #ifndef __MACH_IRQS_H #define __MACH_IRQS_H -#ifdef CONFIG_ARCH_SPEAR3XX -#define NR_IRQS 256 -#endif - -#ifdef CONFIG_ARCH_SPEAR6XX /* IRQ definitions */ /* VIC 1 */ #define IRQ_VIC_END 64 @@ -25,11 +21,5 @@ /* GPIO pins virtual irqs */ #define VIRTUAL_IRQS 24 #define NR_IRQS (IRQ_VIC_END + VIRTUAL_IRQS) -#endif - -#ifdef CONFIG_ARCH_SPEAR13XX -#define IRQ_GIC_END 160 -#define NR_IRQS IRQ_GIC_END -#endif -#endif /* __MACH_IRQS_H */ +#endif /* __MACH_IRQS_H */ diff --git a/trunk/arch/arm/mach-spear6xx/include/mach/misc_regs.h b/trunk/arch/arm/mach-spear6xx/include/mach/misc_regs.h new file mode 100644 index 000000000000..c34acc201d34 --- /dev/null +++ b/trunk/arch/arm/mach-spear6xx/include/mach/misc_regs.h @@ -0,0 +1,22 @@ +/* + * arch/arm/mach-spear6xx/include/mach/misc_regs.h + * + * Miscellaneous registers definitions for SPEAr6xx machine family + * + * Copyright (C) 2009 ST Microelectronics + * Viresh Kumar + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without any + * warranty of any kind, whether express or implied. + */ + +#ifndef __MACH_MISC_REGS_H +#define __MACH_MISC_REGS_H + +#include + +#define MISC_BASE IOMEM(VA_SPEAR6XX_ICM3_MISC_REG_BASE) +#define DMA_CHN_CFG (MISC_BASE + 0x0A0) + +#endif /* __MACH_MISC_REGS_H */ diff --git a/trunk/arch/arm/mach-spear6xx/include/mach/spear.h b/trunk/arch/arm/mach-spear6xx/include/mach/spear.h new file mode 100644 index 000000000000..cb8ed2f4dc85 --- /dev/null +++ b/trunk/arch/arm/mach-spear6xx/include/mach/spear.h @@ -0,0 +1,46 @@ +/* + * arch/arm/mach-spear6xx/include/mach/spear.h + * + * SPEAr6xx Machine family specific definition + * + * Copyright (C) 2009 ST Microelectronics + * Rajeev Kumar + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without any + * warranty of any kind, whether express or implied. + */ + +#ifndef __MACH_SPEAR6XX_H +#define __MACH_SPEAR6XX_H + +#include + +/* ICM1 - Low speed connection */ +#define SPEAR6XX_ICM1_BASE UL(0xD0000000) +#define VA_SPEAR6XX_ICM1_BASE UL(0xFD000000) +#define SPEAR6XX_ICM1_UART0_BASE UL(0xD0000000) +#define VA_SPEAR6XX_ICM1_UART0_BASE (VA_SPEAR6XX_ICM1_2_BASE | SPEAR6XX_ICM1_UART0_BASE) + +/* ML-1, 2 - Multi Layer CPU Subsystem */ +#define SPEAR6XX_ML_CPU_BASE UL(0xF0000000) +#define VA_SPEAR6XX_ML_CPU_BASE UL(0xF0000000) + +/* ICM3 - Basic Subsystem */ +#define SPEAR6XX_ICM3_SMI_CTRL_BASE UL(0xFC000000) +#define VA_SPEAR6XX_ICM3_SMI_CTRL_BASE UL(0xFC000000) +#define SPEAR6XX_ICM3_DMA_BASE UL(0xFC400000) +#define SPEAR6XX_ICM3_SYS_CTRL_BASE UL(0xFCA00000) +#define VA_SPEAR6XX_ICM3_SYS_CTRL_BASE (VA_SPEAR6XX_ICM3_SMI_CTRL_BASE | SPEAR6XX_ICM3_SYS_CTRL_BASE) +#define SPEAR6XX_ICM3_MISC_REG_BASE UL(0xFCA80000) +#define VA_SPEAR6XX_ICM3_MISC_REG_BASE (VA_SPEAR6XX_ICM3_SMI_CTRL_BASE | SPEAR6XX_ICM3_MISC_REG_BASE) + +/* Debug uart for linux, will be used for debug and uncompress messages */ +#define SPEAR_DBG_UART_BASE SPEAR6XX_ICM1_UART0_BASE +#define VA_SPEAR_DBG_UART_BASE VA_SPEAR6XX_ICM1_UART0_BASE + +/* Sysctl base for spear platform */ +#define SPEAR_SYS_CTRL_BASE SPEAR6XX_ICM3_SYS_CTRL_BASE +#define VA_SPEAR_SYS_CTRL_BASE VA_SPEAR6XX_ICM3_SYS_CTRL_BASE + +#endif /* __MACH_SPEAR6XX_H */ diff --git a/trunk/arch/arm/mach-spear6xx/include/mach/timex.h b/trunk/arch/arm/mach-spear6xx/include/mach/timex.h new file mode 100644 index 000000000000..ac1c5b005695 --- /dev/null +++ b/trunk/arch/arm/mach-spear6xx/include/mach/timex.h @@ -0,0 +1,19 @@ +/* + * arch/arm/mach-spear6xx/include/mach/timex.h + * + * SPEAr6XX machine family specific timex definitions + * + * Copyright (C) 2009 ST Microelectronics + * Rajeev Kumar + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without any + * warranty of any kind, whether express or implied. + */ + +#ifndef __MACH_TIMEX_H +#define __MACH_TIMEX_H + +#include + +#endif /* __MACH_TIMEX_H */ diff --git a/trunk/arch/arm/mach-spear6xx/include/mach/uncompress.h b/trunk/arch/arm/mach-spear6xx/include/mach/uncompress.h new file mode 100644 index 000000000000..77f0765e21e1 --- /dev/null +++ b/trunk/arch/arm/mach-spear6xx/include/mach/uncompress.h @@ -0,0 +1,19 @@ +/* + * arch/arm/mach-spear6xx/include/mach/uncompress.h + * + * Serial port stubs for kernel decompress status messages + * + * Copyright (C) 2009 ST Microelectronics + * Rajeev Kumar + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without any + * warranty of any kind, whether express or implied. + */ + +#ifndef __MACH_UNCOMPRESS_H +#define __MACH_UNCOMPRESS_H + +#include + +#endif /* __MACH_UNCOMPRESS_H */ diff --git a/trunk/arch/arm/mach-spear/spear6xx.c b/trunk/arch/arm/mach-spear6xx/spear6xx.c similarity index 93% rename from trunk/arch/arm/mach-spear/spear6xx.c rename to trunk/arch/arm/mach-spear6xx/spear6xx.c index ec8eefbbdfad..8904d8a52d84 100644 --- a/trunk/arch/arm/mach-spear/spear6xx.c +++ b/trunk/arch/arm/mach-spear6xx/spear6xx.c @@ -24,10 +24,9 @@ #include #include #include -#include "pl080.h" -#include "generic.h" +#include +#include #include -#include /* dmac device registration */ static struct pl08x_channel_data spear600_dma_info[] = { @@ -322,7 +321,7 @@ static struct pl08x_channel_data spear600_dma_info[] = { }, }; -static struct pl08x_platform_data spear6xx_pl080_plat_data = { +struct pl08x_platform_data pl080_plat_data = { .memcpy_channel = { .bus_id = "memcpy", .cctl_memcpy = @@ -351,18 +350,18 @@ static struct pl08x_platform_data spear6xx_pl080_plat_data = { */ struct map_desc spear6xx_io_desc[] __initdata = { { - .virtual = (unsigned long)VA_SPEAR6XX_ML_CPU_BASE, - .pfn = __phys_to_pfn(SPEAR_ICM3_ML1_2_BASE), + .virtual = VA_SPEAR6XX_ML_CPU_BASE, + .pfn = __phys_to_pfn(SPEAR6XX_ML_CPU_BASE), .length = 2 * SZ_16M, .type = MT_DEVICE }, { - .virtual = (unsigned long)VA_SPEAR_ICM1_2_BASE, - .pfn = __phys_to_pfn(SPEAR_ICM1_2_BASE), + .virtual = VA_SPEAR6XX_ICM1_BASE, + .pfn = __phys_to_pfn(SPEAR6XX_ICM1_BASE), .length = SZ_16M, .type = MT_DEVICE }, { - .virtual = (unsigned long)VA_SPEAR_ICM3_SMI_CTRL_BASE, - .pfn = __phys_to_pfn(SPEAR_ICM3_SMI_CTRL_BASE), + .virtual = VA_SPEAR6XX_ICM3_SMI_CTRL_BASE, + .pfn = __phys_to_pfn(SPEAR6XX_ICM3_SMI_CTRL_BASE), .length = SZ_16M, .type = MT_DEVICE }, @@ -379,7 +378,7 @@ void __init spear6xx_timer_init(void) char pclk_name[] = "pll3_clk"; struct clk *gpt_clk, *pclk; - spear6xx_clk_init(MISC_BASE); + spear6xx_clk_init(); /* get the system timer clock */ gpt_clk = clk_get_sys("gpt0", NULL); @@ -405,8 +404,8 @@ void __init spear6xx_timer_init(void) /* Add auxdata to pass platform data */ struct of_dev_auxdata spear6xx_auxdata_lookup[] __initdata = { - OF_DEV_AUXDATA("arm,pl080", SPEAR_ICM3_DMA_BASE, NULL, - &spear6xx_pl080_plat_data), + OF_DEV_AUXDATA("arm,pl080", SPEAR6XX_ICM3_DMA_BASE, NULL, + &pl080_plat_data), {} }; diff --git a/trunk/arch/arm/mach-ux500/timer.c b/trunk/arch/arm/mach-ux500/timer.c index a6af0b8732ba..d07bbe7f04a6 100644 --- a/trunk/arch/arm/mach-ux500/timer.c +++ b/trunk/arch/arm/mach-ux500/timer.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -32,7 +33,7 @@ static void __init ux500_twd_init(void) twd_local_timer = &u8500_twd_local_timer; if (of_have_populated_dt()) - twd_local_timer_of_register(); + clocksource_of_init(); else { err = twd_local_timer_register(twd_local_timer); if (err) diff --git a/trunk/arch/arm/mach-vexpress/v2m.c b/trunk/arch/arm/mach-vexpress/v2m.c index 915683cb67d6..d0ad78998cb6 100644 --- a/trunk/arch/arm/mach-vexpress/v2m.c +++ b/trunk/arch/arm/mach-vexpress/v2m.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -25,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -435,6 +435,7 @@ static void __init v2m_dt_timer_init(void) vexpress_clk_of_init(); + clocksource_of_init(); do { node = of_find_compatible_node(node, NULL, "arm,sp804"); } while (node && vexpress_get_site_by_node(node) != VEXPRESS_SITE_MB); @@ -445,8 +446,7 @@ static void __init v2m_dt_timer_init(void) irq_of_parse_and_map(node, 0)); } - if (arch_timer_of_register() != 0) - twd_local_timer_of_register(); + arch_timer_of_register(); if (arch_timer_sched_clock_init() != 0) versatile_sched_clock_init(vexpress_get_24mhz_clock_base(), diff --git a/trunk/arch/arm/plat-spear/Kconfig b/trunk/arch/arm/plat-spear/Kconfig new file mode 100644 index 000000000000..739d016eb273 --- /dev/null +++ b/trunk/arch/arm/plat-spear/Kconfig @@ -0,0 +1,47 @@ +# +# SPEAr Platform configuration file +# + +if PLAT_SPEAR + +choice + prompt "ST SPEAr Family" + default ARCH_SPEAR3XX + +config ARCH_SPEAR13XX + bool "ST SPEAr13xx with Device Tree" + select ARCH_HAVE_CPUFREQ + select ARM_GIC + select CPU_V7 + select GPIO_SPEAR_SPICS + select HAVE_SMP + select MIGHT_HAVE_CACHE_L2X0 + select PINCTRL + select USE_OF + help + Supports for ARM's SPEAR13XX family + +config ARCH_SPEAR3XX + bool "ST SPEAr3xx with Device Tree" + select ARM_VIC + select CPU_ARM926T + select PINCTRL + select USE_OF + help + Supports for ARM's SPEAR3XX family + +config ARCH_SPEAR6XX + bool "SPEAr6XX" + select ARM_VIC + select CPU_ARM926T + help + Supports for ARM's SPEAR6XX family + +endchoice + +# Adding SPEAr machine specific configuration files +source "arch/arm/mach-spear13xx/Kconfig" +source "arch/arm/mach-spear3xx/Kconfig" +source "arch/arm/mach-spear6xx/Kconfig" + +endif diff --git a/trunk/arch/arm/plat-spear/Makefile b/trunk/arch/arm/plat-spear/Makefile new file mode 100644 index 000000000000..01e88532a5db --- /dev/null +++ b/trunk/arch/arm/plat-spear/Makefile @@ -0,0 +1,9 @@ +# +# SPEAr Platform specific Makefile +# + +# Common support +obj-y := restart.o time.o + +obj-$(CONFIG_ARCH_SPEAR3XX) += pl080.o +obj-$(CONFIG_ARCH_SPEAR6XX) += pl080.o diff --git a/trunk/arch/arm/mach-spear/include/mach/debug-macro.S b/trunk/arch/arm/plat-spear/include/plat/debug-macro.S similarity index 100% rename from trunk/arch/arm/mach-spear/include/mach/debug-macro.S rename to trunk/arch/arm/plat-spear/include/plat/debug-macro.S diff --git a/trunk/arch/arm/mach-spear/pl080.h b/trunk/arch/arm/plat-spear/include/plat/pl080.h similarity index 100% rename from trunk/arch/arm/mach-spear/pl080.h rename to trunk/arch/arm/plat-spear/include/plat/pl080.h diff --git a/trunk/arch/arm/mach-spear/include/mach/timex.h b/trunk/arch/arm/plat-spear/include/plat/timex.h similarity index 100% rename from trunk/arch/arm/mach-spear/include/mach/timex.h rename to trunk/arch/arm/plat-spear/include/plat/timex.h diff --git a/trunk/arch/arm/mach-spear/include/mach/uncompress.h b/trunk/arch/arm/plat-spear/include/plat/uncompress.h similarity index 100% rename from trunk/arch/arm/mach-spear/include/mach/uncompress.h rename to trunk/arch/arm/plat-spear/include/plat/uncompress.h diff --git a/trunk/arch/arm/mach-spear/pl080.c b/trunk/arch/arm/plat-spear/pl080.c similarity index 100% rename from trunk/arch/arm/mach-spear/pl080.c rename to trunk/arch/arm/plat-spear/pl080.c diff --git a/trunk/arch/arm/mach-spear/restart.c b/trunk/arch/arm/plat-spear/restart.c similarity index 90% rename from trunk/arch/arm/mach-spear/restart.c rename to trunk/arch/arm/plat-spear/restart.c index 2b44500bb718..7d4616d5df11 100644 --- a/trunk/arch/arm/mach-spear/restart.c +++ b/trunk/arch/arm/plat-spear/restart.c @@ -14,7 +14,7 @@ #include #include #include -#include "generic.h" +#include #define SPEAR13XX_SYS_SW_RES (VA_MISC_BASE + 0x204) void spear_restart(char mode, const char *cmd) @@ -26,8 +26,7 @@ void spear_restart(char mode, const char *cmd) /* hardware reset, Use on-chip reset capability */ #ifdef CONFIG_ARCH_SPEAR13XX writel_relaxed(0x01, SPEAR13XX_SYS_SW_RES); -#endif -#if defined(CONFIG_ARCH_SPEAR3XX) || defined(CONFIG_ARCH_SPEAR6XX) +#else sysctl_soft_reset((void __iomem *)VA_SPEAR_SYS_CTRL_BASE); #endif } diff --git a/trunk/arch/arm/mach-spear/time.c b/trunk/arch/arm/plat-spear/time.c similarity index 99% rename from trunk/arch/arm/mach-spear/time.c rename to trunk/arch/arm/plat-spear/time.c index d449673e40f7..bd5c53cd6962 100644 --- a/trunk/arch/arm/mach-spear/time.c +++ b/trunk/arch/arm/plat-spear/time.c @@ -23,7 +23,7 @@ #include #include #include -#include "generic.h" +#include /* * We would use TIMER0 and TIMER1 as clockevent and clocksource. diff --git a/trunk/drivers/clk/spear/spear1310_clock.c b/trunk/drivers/clk/spear/spear1310_clock.c index aedbbe12f321..ed9af4278619 100644 --- a/trunk/drivers/clk/spear/spear1310_clock.c +++ b/trunk/drivers/clk/spear/spear1310_clock.c @@ -17,10 +17,12 @@ #include #include #include +#include #include "clk.h" +#define VA_SPEAR1310_RAS_BASE IOMEM(UL(0xFA400000)) /* PLL related registers and bit values */ -#define SPEAR1310_PLL_CFG (misc_base + 0x210) +#define SPEAR1310_PLL_CFG (VA_MISC_BASE + 0x210) /* PLL_CFG bit values */ #define SPEAR1310_CLCD_SYNT_CLK_MASK 1 #define SPEAR1310_CLCD_SYNT_CLK_SHIFT 31 @@ -33,15 +35,15 @@ #define SPEAR1310_PLL2_CLK_SHIFT 22 #define SPEAR1310_PLL1_CLK_SHIFT 20 -#define SPEAR1310_PLL1_CTR (misc_base + 0x214) -#define SPEAR1310_PLL1_FRQ (misc_base + 0x218) -#define SPEAR1310_PLL2_CTR (misc_base + 0x220) -#define SPEAR1310_PLL2_FRQ (misc_base + 0x224) -#define SPEAR1310_PLL3_CTR (misc_base + 0x22C) -#define SPEAR1310_PLL3_FRQ (misc_base + 0x230) -#define SPEAR1310_PLL4_CTR (misc_base + 0x238) -#define SPEAR1310_PLL4_FRQ (misc_base + 0x23C) -#define SPEAR1310_PERIP_CLK_CFG (misc_base + 0x244) +#define SPEAR1310_PLL1_CTR (VA_MISC_BASE + 0x214) +#define SPEAR1310_PLL1_FRQ (VA_MISC_BASE + 0x218) +#define SPEAR1310_PLL2_CTR (VA_MISC_BASE + 0x220) +#define SPEAR1310_PLL2_FRQ (VA_MISC_BASE + 0x224) +#define SPEAR1310_PLL3_CTR (VA_MISC_BASE + 0x22C) +#define SPEAR1310_PLL3_FRQ (VA_MISC_BASE + 0x230) +#define SPEAR1310_PLL4_CTR (VA_MISC_BASE + 0x238) +#define SPEAR1310_PLL4_FRQ (VA_MISC_BASE + 0x23C) +#define SPEAR1310_PERIP_CLK_CFG (VA_MISC_BASE + 0x244) /* PERIP_CLK_CFG bit values */ #define SPEAR1310_GPT_OSC24_VAL 0 #define SPEAR1310_GPT_APB_VAL 1 @@ -63,7 +65,7 @@ #define SPEAR1310_C3_CLK_MASK 1 #define SPEAR1310_C3_CLK_SHIFT 1 -#define SPEAR1310_GMAC_CLK_CFG (misc_base + 0x248) +#define SPEAR1310_GMAC_CLK_CFG (VA_MISC_BASE + 0x248) #define SPEAR1310_GMAC_PHY_IF_SEL_MASK 3 #define SPEAR1310_GMAC_PHY_IF_SEL_SHIFT 4 #define SPEAR1310_GMAC_PHY_CLK_MASK 1 @@ -71,7 +73,7 @@ #define SPEAR1310_GMAC_PHY_INPUT_CLK_MASK 2 #define SPEAR1310_GMAC_PHY_INPUT_CLK_SHIFT 1 -#define SPEAR1310_I2S_CLK_CFG (misc_base + 0x24C) +#define SPEAR1310_I2S_CLK_CFG (VA_MISC_BASE + 0x24C) /* I2S_CLK_CFG register mask */ #define SPEAR1310_I2S_SCLK_X_MASK 0x1F #define SPEAR1310_I2S_SCLK_X_SHIFT 27 @@ -89,21 +91,21 @@ #define SPEAR1310_I2S_SRC_CLK_MASK 2 #define SPEAR1310_I2S_SRC_CLK_SHIFT 0 -#define SPEAR1310_C3_CLK_SYNT (misc_base + 0x250) -#define SPEAR1310_UART_CLK_SYNT (misc_base + 0x254) -#define SPEAR1310_GMAC_CLK_SYNT (misc_base + 0x258) -#define SPEAR1310_SDHCI_CLK_SYNT (misc_base + 0x25C) -#define SPEAR1310_CFXD_CLK_SYNT (misc_base + 0x260) -#define SPEAR1310_ADC_CLK_SYNT (misc_base + 0x264) -#define SPEAR1310_AMBA_CLK_SYNT (misc_base + 0x268) -#define SPEAR1310_CLCD_CLK_SYNT (misc_base + 0x270) -#define SPEAR1310_RAS_CLK_SYNT0 (misc_base + 0x280) -#define SPEAR1310_RAS_CLK_SYNT1 (misc_base + 0x288) -#define SPEAR1310_RAS_CLK_SYNT2 (misc_base + 0x290) -#define SPEAR1310_RAS_CLK_SYNT3 (misc_base + 0x298) +#define SPEAR1310_C3_CLK_SYNT (VA_MISC_BASE + 0x250) +#define SPEAR1310_UART_CLK_SYNT (VA_MISC_BASE + 0x254) +#define SPEAR1310_GMAC_CLK_SYNT (VA_MISC_BASE + 0x258) +#define SPEAR1310_SDHCI_CLK_SYNT (VA_MISC_BASE + 0x25C) +#define SPEAR1310_CFXD_CLK_SYNT (VA_MISC_BASE + 0x260) +#define SPEAR1310_ADC_CLK_SYNT (VA_MISC_BASE + 0x264) +#define SPEAR1310_AMBA_CLK_SYNT (VA_MISC_BASE + 0x268) +#define SPEAR1310_CLCD_CLK_SYNT (VA_MISC_BASE + 0x270) +#define SPEAR1310_RAS_CLK_SYNT0 (VA_MISC_BASE + 0x280) +#define SPEAR1310_RAS_CLK_SYNT1 (VA_MISC_BASE + 0x288) +#define SPEAR1310_RAS_CLK_SYNT2 (VA_MISC_BASE + 0x290) +#define SPEAR1310_RAS_CLK_SYNT3 (VA_MISC_BASE + 0x298) /* Check Fractional synthesizer reg masks */ -#define SPEAR1310_PERIP1_CLK_ENB (misc_base + 0x300) +#define SPEAR1310_PERIP1_CLK_ENB (VA_MISC_BASE + 0x300) /* PERIP1_CLK_ENB register masks */ #define SPEAR1310_RTC_CLK_ENB 31 #define SPEAR1310_ADC_CLK_ENB 30 @@ -136,7 +138,7 @@ #define SPEAR1310_SYSROM_CLK_ENB 1 #define SPEAR1310_BUS_CLK_ENB 0 -#define SPEAR1310_PERIP2_CLK_ENB (misc_base + 0x304) +#define SPEAR1310_PERIP2_CLK_ENB (VA_MISC_BASE + 0x304) /* PERIP2_CLK_ENB register masks */ #define SPEAR1310_THSENS_CLK_ENB 8 #define SPEAR1310_I2S_REF_PAD_CLK_ENB 7 @@ -148,7 +150,7 @@ #define SPEAR1310_DDR_CORE_CLK_ENB 1 #define SPEAR1310_DDR_CTRL_CLK_ENB 0 -#define SPEAR1310_RAS_CLK_ENB (misc_base + 0x310) +#define SPEAR1310_RAS_CLK_ENB (VA_MISC_BASE + 0x310) /* RAS_CLK_ENB register masks */ #define SPEAR1310_SYNT3_CLK_ENB 17 #define SPEAR1310_SYNT2_CLK_ENB 16 @@ -170,7 +172,7 @@ #define SPEAR1310_ACLK_CLK_ENB 0 /* RAS Area Control Register */ -#define SPEAR1310_RAS_CTRL_REG0 (ras_base + 0x000) +#define SPEAR1310_RAS_CTRL_REG0 (VA_SPEAR1310_RAS_BASE + 0x000) #define SPEAR1310_SSP1_CLK_MASK 3 #define SPEAR1310_SSP1_CLK_SHIFT 26 #define SPEAR1310_TDM_CLK_MASK 1 @@ -195,12 +197,12 @@ #define SPEAR1310_PCI_CLK_MASK 1 #define SPEAR1310_PCI_CLK_SHIFT 0 -#define SPEAR1310_RAS_CTRL_REG1 (ras_base + 0x004) +#define SPEAR1310_RAS_CTRL_REG1 (VA_SPEAR1310_RAS_BASE + 0x004) #define SPEAR1310_PHY_CLK_MASK 0x3 #define SPEAR1310_RMII_PHY_CLK_SHIFT 0 #define SPEAR1310_SMII_RGMII_PHY_CLK_SHIFT 2 -#define SPEAR1310_RAS_SW_CLK_CTRL (ras_base + 0x0148) +#define SPEAR1310_RAS_SW_CLK_CTRL (VA_SPEAR1310_RAS_BASE + 0x0148) #define SPEAR1310_CAN1_CLK_ENB 25 #define SPEAR1310_CAN0_CLK_ENB 24 #define SPEAR1310_GPT64_CLK_ENB 23 @@ -383,7 +385,7 @@ static const char *ssp1_parents[] = { "ras_apb_clk", "gen_syn1_clk", static const char *pci_parents[] = { "ras_pll3_clk", "gen_syn2_clk", }; static const char *tdm_parents[] = { "ras_pll3_clk", "gen_syn1_clk", }; -void __init spear1310_clk_init(void __iomem *misc_base, void __iomem *ras_base) +void __init spear1310_clk_init(void) { struct clk *clk, *clk1; diff --git a/trunk/drivers/clk/spear/spear1340_clock.c b/trunk/drivers/clk/spear/spear1340_clock.c index 3ceb4507e95f..82abea366b78 100644 --- a/trunk/drivers/clk/spear/spear1340_clock.c +++ b/trunk/drivers/clk/spear/spear1340_clock.c @@ -17,17 +17,18 @@ #include #include #include +#include #include "clk.h" /* Clock Configuration Registers */ -#define SPEAR1340_SYS_CLK_CTRL (misc_base + 0x200) +#define SPEAR1340_SYS_CLK_CTRL (VA_MISC_BASE + 0x200) #define SPEAR1340_HCLK_SRC_SEL_SHIFT 27 #define SPEAR1340_HCLK_SRC_SEL_MASK 1 #define SPEAR1340_SCLK_SRC_SEL_SHIFT 23 #define SPEAR1340_SCLK_SRC_SEL_MASK 3 /* PLL related registers and bit values */ -#define SPEAR1340_PLL_CFG (misc_base + 0x210) +#define SPEAR1340_PLL_CFG (VA_MISC_BASE + 0x210) /* PLL_CFG bit values */ #define SPEAR1340_CLCD_SYNT_CLK_MASK 1 #define SPEAR1340_CLCD_SYNT_CLK_SHIFT 31 @@ -39,15 +40,15 @@ #define SPEAR1340_PLL2_CLK_SHIFT 22 #define SPEAR1340_PLL1_CLK_SHIFT 20 -#define SPEAR1340_PLL1_CTR (misc_base + 0x214) -#define SPEAR1340_PLL1_FRQ (misc_base + 0x218) -#define SPEAR1340_PLL2_CTR (misc_base + 0x220) -#define SPEAR1340_PLL2_FRQ (misc_base + 0x224) -#define SPEAR1340_PLL3_CTR (misc_base + 0x22C) -#define SPEAR1340_PLL3_FRQ (misc_base + 0x230) -#define SPEAR1340_PLL4_CTR (misc_base + 0x238) -#define SPEAR1340_PLL4_FRQ (misc_base + 0x23C) -#define SPEAR1340_PERIP_CLK_CFG (misc_base + 0x244) +#define SPEAR1340_PLL1_CTR (VA_MISC_BASE + 0x214) +#define SPEAR1340_PLL1_FRQ (VA_MISC_BASE + 0x218) +#define SPEAR1340_PLL2_CTR (VA_MISC_BASE + 0x220) +#define SPEAR1340_PLL2_FRQ (VA_MISC_BASE + 0x224) +#define SPEAR1340_PLL3_CTR (VA_MISC_BASE + 0x22C) +#define SPEAR1340_PLL3_FRQ (VA_MISC_BASE + 0x230) +#define SPEAR1340_PLL4_CTR (VA_MISC_BASE + 0x238) +#define SPEAR1340_PLL4_FRQ (VA_MISC_BASE + 0x23C) +#define SPEAR1340_PERIP_CLK_CFG (VA_MISC_BASE + 0x244) /* PERIP_CLK_CFG bit values */ #define SPEAR1340_SPDIF_CLK_MASK 1 #define SPEAR1340_SPDIF_OUT_CLK_SHIFT 15 @@ -65,13 +66,13 @@ #define SPEAR1340_C3_CLK_MASK 1 #define SPEAR1340_C3_CLK_SHIFT 1 -#define SPEAR1340_GMAC_CLK_CFG (misc_base + 0x248) +#define SPEAR1340_GMAC_CLK_CFG (VA_MISC_BASE + 0x248) #define SPEAR1340_GMAC_PHY_CLK_MASK 1 #define SPEAR1340_GMAC_PHY_CLK_SHIFT 2 #define SPEAR1340_GMAC_PHY_INPUT_CLK_MASK 2 #define SPEAR1340_GMAC_PHY_INPUT_CLK_SHIFT 0 -#define SPEAR1340_I2S_CLK_CFG (misc_base + 0x24C) +#define SPEAR1340_I2S_CLK_CFG (VA_MISC_BASE + 0x24C) /* I2S_CLK_CFG register mask */ #define SPEAR1340_I2S_SCLK_X_MASK 0x1F #define SPEAR1340_I2S_SCLK_X_SHIFT 27 @@ -89,21 +90,21 @@ #define SPEAR1340_I2S_SRC_CLK_MASK 2 #define SPEAR1340_I2S_SRC_CLK_SHIFT 0 -#define SPEAR1340_C3_CLK_SYNT (misc_base + 0x250) -#define SPEAR1340_UART0_CLK_SYNT (misc_base + 0x254) -#define SPEAR1340_UART1_CLK_SYNT (misc_base + 0x258) -#define SPEAR1340_GMAC_CLK_SYNT (misc_base + 0x25C) -#define SPEAR1340_SDHCI_CLK_SYNT (misc_base + 0x260) -#define SPEAR1340_CFXD_CLK_SYNT (misc_base + 0x264) -#define SPEAR1340_ADC_CLK_SYNT (misc_base + 0x270) -#define SPEAR1340_AMBA_CLK_SYNT (misc_base + 0x274) -#define SPEAR1340_CLCD_CLK_SYNT (misc_base + 0x27C) -#define SPEAR1340_SYS_CLK_SYNT (misc_base + 0x284) -#define SPEAR1340_GEN_CLK_SYNT0 (misc_base + 0x28C) -#define SPEAR1340_GEN_CLK_SYNT1 (misc_base + 0x294) -#define SPEAR1340_GEN_CLK_SYNT2 (misc_base + 0x29C) -#define SPEAR1340_GEN_CLK_SYNT3 (misc_base + 0x304) -#define SPEAR1340_PERIP1_CLK_ENB (misc_base + 0x30C) +#define SPEAR1340_C3_CLK_SYNT (VA_MISC_BASE + 0x250) +#define SPEAR1340_UART0_CLK_SYNT (VA_MISC_BASE + 0x254) +#define SPEAR1340_UART1_CLK_SYNT (VA_MISC_BASE + 0x258) +#define SPEAR1340_GMAC_CLK_SYNT (VA_MISC_BASE + 0x25C) +#define SPEAR1340_SDHCI_CLK_SYNT (VA_MISC_BASE + 0x260) +#define SPEAR1340_CFXD_CLK_SYNT (VA_MISC_BASE + 0x264) +#define SPEAR1340_ADC_CLK_SYNT (VA_MISC_BASE + 0x270) +#define SPEAR1340_AMBA_CLK_SYNT (VA_MISC_BASE + 0x274) +#define SPEAR1340_CLCD_CLK_SYNT (VA_MISC_BASE + 0x27C) +#define SPEAR1340_SYS_CLK_SYNT (VA_MISC_BASE + 0x284) +#define SPEAR1340_GEN_CLK_SYNT0 (VA_MISC_BASE + 0x28C) +#define SPEAR1340_GEN_CLK_SYNT1 (VA_MISC_BASE + 0x294) +#define SPEAR1340_GEN_CLK_SYNT2 (VA_MISC_BASE + 0x29C) +#define SPEAR1340_GEN_CLK_SYNT3 (VA_MISC_BASE + 0x304) +#define SPEAR1340_PERIP1_CLK_ENB (VA_MISC_BASE + 0x30C) #define SPEAR1340_RTC_CLK_ENB 31 #define SPEAR1340_ADC_CLK_ENB 30 #define SPEAR1340_C3_CLK_ENB 29 @@ -132,7 +133,7 @@ #define SPEAR1340_SYSROM_CLK_ENB 1 #define SPEAR1340_BUS_CLK_ENB 0 -#define SPEAR1340_PERIP2_CLK_ENB (misc_base + 0x310) +#define SPEAR1340_PERIP2_CLK_ENB (VA_MISC_BASE + 0x310) #define SPEAR1340_THSENS_CLK_ENB 8 #define SPEAR1340_I2S_REF_PAD_CLK_ENB 7 #define SPEAR1340_ACP_CLK_ENB 6 @@ -143,7 +144,7 @@ #define SPEAR1340_DDR_CORE_CLK_ENB 1 #define SPEAR1340_DDR_CTRL_CLK_ENB 0 -#define SPEAR1340_PERIP3_CLK_ENB (misc_base + 0x314) +#define SPEAR1340_PERIP3_CLK_ENB (VA_MISC_BASE + 0x314) #define SPEAR1340_PLGPIO_CLK_ENB 18 #define SPEAR1340_VIDEO_DEC_CLK_ENB 16 #define SPEAR1340_VIDEO_ENC_CLK_ENB 15 @@ -440,7 +441,7 @@ static const char *gen_synth0_1_parents[] = { "vco1div4_clk", "vco3div2_clk", static const char *gen_synth2_3_parents[] = { "vco1div4_clk", "vco2div2_clk", "pll2_clk", }; -void __init spear1340_clk_init(void __iomem *misc_base) +void __init spear1340_clk_init(void) { struct clk *clk, *clk1; diff --git a/trunk/drivers/clk/spear/spear3xx_clock.c b/trunk/drivers/clk/spear/spear3xx_clock.c index f9ec43fd1320..33d3ac588da7 100644 --- a/trunk/drivers/clk/spear/spear3xx_clock.c +++ b/trunk/drivers/clk/spear/spear3xx_clock.c @@ -15,20 +15,21 @@ #include #include #include +#include #include "clk.h" static DEFINE_SPINLOCK(_lock); -#define PLL1_CTR (misc_base + 0x008) -#define PLL1_FRQ (misc_base + 0x00C) -#define PLL2_CTR (misc_base + 0x014) -#define PLL2_FRQ (misc_base + 0x018) -#define PLL_CLK_CFG (misc_base + 0x020) +#define PLL1_CTR (MISC_BASE + 0x008) +#define PLL1_FRQ (MISC_BASE + 0x00C) +#define PLL2_CTR (MISC_BASE + 0x014) +#define PLL2_FRQ (MISC_BASE + 0x018) +#define PLL_CLK_CFG (MISC_BASE + 0x020) /* PLL_CLK_CFG register masks */ #define MCTR_CLK_SHIFT 28 #define MCTR_CLK_MASK 3 -#define CORE_CLK_CFG (misc_base + 0x024) +#define CORE_CLK_CFG (MISC_BASE + 0x024) /* CORE CLK CFG register masks */ #define GEN_SYNTH2_3_CLK_SHIFT 18 #define GEN_SYNTH2_3_CLK_MASK 1 @@ -38,7 +39,7 @@ static DEFINE_SPINLOCK(_lock); #define PCLK_RATIO_SHIFT 8 #define PCLK_RATIO_MASK 2 -#define PERIP_CLK_CFG (misc_base + 0x028) +#define PERIP_CLK_CFG (MISC_BASE + 0x028) /* PERIP_CLK_CFG register masks */ #define UART_CLK_SHIFT 4 #define UART_CLK_MASK 1 @@ -49,7 +50,7 @@ static DEFINE_SPINLOCK(_lock); #define GPT2_CLK_SHIFT 12 #define GPT_CLK_MASK 1 -#define PERIP1_CLK_ENB (misc_base + 0x02C) +#define PERIP1_CLK_ENB (MISC_BASE + 0x02C) /* PERIP1_CLK_ENB register masks */ #define UART_CLK_ENB 3 #define SSP_CLK_ENB 5 @@ -68,7 +69,7 @@ static DEFINE_SPINLOCK(_lock); #define USBH_CLK_ENB 25 #define C3_CLK_ENB 31 -#define RAS_CLK_ENB (misc_base + 0x034) +#define RAS_CLK_ENB (MISC_BASE + 0x034) #define RAS_AHB_CLK_ENB 0 #define RAS_PLL1_CLK_ENB 1 #define RAS_APB_CLK_ENB 2 @@ -81,20 +82,20 @@ static DEFINE_SPINLOCK(_lock); #define RAS_SYNT2_CLK_ENB 10 #define RAS_SYNT3_CLK_ENB 11 -#define PRSC0_CLK_CFG (misc_base + 0x044) -#define PRSC1_CLK_CFG (misc_base + 0x048) -#define PRSC2_CLK_CFG (misc_base + 0x04C) -#define AMEM_CLK_CFG (misc_base + 0x050) +#define PRSC0_CLK_CFG (MISC_BASE + 0x044) +#define PRSC1_CLK_CFG (MISC_BASE + 0x048) +#define PRSC2_CLK_CFG (MISC_BASE + 0x04C) +#define AMEM_CLK_CFG (MISC_BASE + 0x050) #define AMEM_CLK_ENB 0 -#define CLCD_CLK_SYNT (misc_base + 0x05C) -#define FIRDA_CLK_SYNT (misc_base + 0x060) -#define UART_CLK_SYNT (misc_base + 0x064) -#define GMAC_CLK_SYNT (misc_base + 0x068) -#define GEN0_CLK_SYNT (misc_base + 0x06C) -#define GEN1_CLK_SYNT (misc_base + 0x070) -#define GEN2_CLK_SYNT (misc_base + 0x074) -#define GEN3_CLK_SYNT (misc_base + 0x078) +#define CLCD_CLK_SYNT (MISC_BASE + 0x05C) +#define FIRDA_CLK_SYNT (MISC_BASE + 0x060) +#define UART_CLK_SYNT (MISC_BASE + 0x064) +#define GMAC_CLK_SYNT (MISC_BASE + 0x068) +#define GEN0_CLK_SYNT (MISC_BASE + 0x06C) +#define GEN1_CLK_SYNT (MISC_BASE + 0x070) +#define GEN2_CLK_SYNT (MISC_BASE + 0x074) +#define GEN3_CLK_SYNT (MISC_BASE + 0x078) /* pll rate configuration table, in ascending order of rates */ static struct pll_rate_tbl pll_rtbl[] = { @@ -210,17 +211,6 @@ static inline void spear310_clk_init(void) { } /* array of all spear 320 clock lookups */ #ifdef CONFIG_MACH_SPEAR320 - -#define SPEAR320_CONTROL_REG (soc_config_base + 0x0000) -#define SPEAR320_EXT_CTRL_REG (soc_config_base + 0x0018) - - #define SPEAR320_UARTX_PCLK_MASK 0x1 - #define SPEAR320_UART2_PCLK_SHIFT 8 - #define SPEAR320_UART3_PCLK_SHIFT 9 - #define SPEAR320_UART4_PCLK_SHIFT 10 - #define SPEAR320_UART5_PCLK_SHIFT 11 - #define SPEAR320_UART6_PCLK_SHIFT 12 - #define SPEAR320_RS485_PCLK_SHIFT 13 #define SMII_PCLK_SHIFT 18 #define SMII_PCLK_MASK 2 #define SMII_PCLK_VAL_PAD 0x0 @@ -245,7 +235,7 @@ static const char *smii0_parents[] = { "smii_125m_pad", "ras_pll2_clk", "ras_syn0_gclk", }; static const char *uartx_parents[] = { "ras_syn1_gclk", "ras_apb_clk", }; -static void __init spear320_clk_init(void __iomem *soc_config_base) +static void __init spear320_clk_init(void) { struct clk *clk; @@ -372,7 +362,7 @@ static void __init spear320_clk_init(void __iomem *soc_config_base) static inline void spear320_clk_init(void) { } #endif -void __init spear3xx_clk_init(void __iomem *misc_base, void __iomem *soc_config_base) +void __init spear3xx_clk_init(void) { struct clk *clk, *clk1; @@ -644,5 +634,5 @@ void __init spear3xx_clk_init(void __iomem *misc_base, void __iomem *soc_config_ else if (of_machine_is_compatible("st,spear310")) spear310_clk_init(); else if (of_machine_is_compatible("st,spear320")) - spear320_clk_init(soc_config_base); + spear320_clk_init(); } diff --git a/trunk/drivers/clk/spear/spear6xx_clock.c b/trunk/drivers/clk/spear/spear6xx_clock.c index 9406f2426d64..e862a333ad30 100644 --- a/trunk/drivers/clk/spear/spear6xx_clock.c +++ b/trunk/drivers/clk/spear/spear6xx_clock.c @@ -13,27 +13,28 @@ #include #include #include +#include #include "clk.h" static DEFINE_SPINLOCK(_lock); -#define PLL1_CTR (misc_base + 0x008) -#define PLL1_FRQ (misc_base + 0x00C) -#define PLL2_CTR (misc_base + 0x014) -#define PLL2_FRQ (misc_base + 0x018) -#define PLL_CLK_CFG (misc_base + 0x020) +#define PLL1_CTR (MISC_BASE + 0x008) +#define PLL1_FRQ (MISC_BASE + 0x00C) +#define PLL2_CTR (MISC_BASE + 0x014) +#define PLL2_FRQ (MISC_BASE + 0x018) +#define PLL_CLK_CFG (MISC_BASE + 0x020) /* PLL_CLK_CFG register masks */ #define MCTR_CLK_SHIFT 28 #define MCTR_CLK_MASK 3 -#define CORE_CLK_CFG (misc_base + 0x024) +#define CORE_CLK_CFG (MISC_BASE + 0x024) /* CORE CLK CFG register masks */ #define HCLK_RATIO_SHIFT 10 #define HCLK_RATIO_MASK 2 #define PCLK_RATIO_SHIFT 8 #define PCLK_RATIO_MASK 2 -#define PERIP_CLK_CFG (misc_base + 0x028) +#define PERIP_CLK_CFG (MISC_BASE + 0x028) /* PERIP_CLK_CFG register masks */ #define CLCD_CLK_SHIFT 2 #define CLCD_CLK_MASK 2 @@ -47,7 +48,7 @@ static DEFINE_SPINLOCK(_lock); #define GPT3_CLK_SHIFT 12 #define GPT_CLK_MASK 1 -#define PERIP1_CLK_ENB (misc_base + 0x02C) +#define PERIP1_CLK_ENB (MISC_BASE + 0x02C) /* PERIP1_CLK_ENB register masks */ #define UART0_CLK_ENB 3 #define UART1_CLK_ENB 4 @@ -73,13 +74,13 @@ static DEFINE_SPINLOCK(_lock); #define USBH0_CLK_ENB 25 #define USBH1_CLK_ENB 26 -#define PRSC0_CLK_CFG (misc_base + 0x044) -#define PRSC1_CLK_CFG (misc_base + 0x048) -#define PRSC2_CLK_CFG (misc_base + 0x04C) +#define PRSC0_CLK_CFG (MISC_BASE + 0x044) +#define PRSC1_CLK_CFG (MISC_BASE + 0x048) +#define PRSC2_CLK_CFG (MISC_BASE + 0x04C) -#define CLCD_CLK_SYNT (misc_base + 0x05C) -#define FIRDA_CLK_SYNT (misc_base + 0x060) -#define UART_CLK_SYNT (misc_base + 0x064) +#define CLCD_CLK_SYNT (MISC_BASE + 0x05C) +#define FIRDA_CLK_SYNT (MISC_BASE + 0x060) +#define UART_CLK_SYNT (MISC_BASE + 0x064) /* vco rate configuration table, in ascending order of rates */ static struct pll_rate_tbl pll_rtbl[] = { @@ -114,7 +115,7 @@ static struct gpt_rate_tbl gpt_rtbl[] = { {.mscale = 1, .nscale = 0}, /* 83 MHz */ }; -void __init spear6xx_clk_init(void __iomem *misc_base) +void __init spear6xx_clk_init(void) { struct clk *clk, *clk1; diff --git a/trunk/drivers/clocksource/bcm2835_timer.c b/trunk/drivers/clocksource/bcm2835_timer.c index 50c68fef944b..766611d29945 100644 --- a/trunk/drivers/clocksource/bcm2835_timer.c +++ b/trunk/drivers/clocksource/bcm2835_timer.c @@ -95,23 +95,13 @@ static irqreturn_t bcm2835_time_interrupt(int irq, void *dev_id) } } -static struct of_device_id bcm2835_time_match[] __initconst = { - { .compatible = "brcm,bcm2835-system-timer" }, - {} -}; - -static void __init bcm2835_timer_init(void) +static void __init bcm2835_timer_init(struct device_node *node) { - struct device_node *node; void __iomem *base; u32 freq; int irq; struct bcm2835_timer *timer; - node = of_find_matching_node(NULL, bcm2835_time_match); - if (!node) - panic("No bcm2835 timer node"); - base = of_iomap(node, 0); if (!base) panic("Can't remap registers"); diff --git a/trunk/drivers/clocksource/clksrc-of.c b/trunk/drivers/clocksource/clksrc-of.c index bdabdaa8d00f..37f5325bec95 100644 --- a/trunk/drivers/clocksource/clksrc-of.c +++ b/trunk/drivers/clocksource/clksrc-of.c @@ -16,6 +16,7 @@ #include #include +#include extern struct of_device_id __clksrc_of_table[]; @@ -26,10 +27,10 @@ void __init clocksource_of_init(void) { struct device_node *np; const struct of_device_id *match; - void (*init_func)(void); + clocksource_of_init_fn init_func; for_each_matching_node_and_match(np, __clksrc_of_table, &match) { init_func = match->data; - init_func(); + init_func(np); } } diff --git a/trunk/drivers/clocksource/tegra20_timer.c b/trunk/drivers/clocksource/tegra20_timer.c index 0bde03feb095..2e4d8a666c36 100644 --- a/trunk/drivers/clocksource/tegra20_timer.c +++ b/trunk/drivers/clocksource/tegra20_timer.c @@ -154,29 +154,12 @@ static struct irqaction tegra_timer_irq = { .dev_id = &tegra_clockevent, }; -static const struct of_device_id timer_match[] __initconst = { - { .compatible = "nvidia,tegra20-timer" }, - {} -}; - -static const struct of_device_id rtc_match[] __initconst = { - { .compatible = "nvidia,tegra20-rtc" }, - {} -}; - -static void __init tegra20_init_timer(void) +static void __init tegra20_init_timer(struct device_node *np) { - struct device_node *np; struct clk *clk; unsigned long rate; int ret; - np = of_find_matching_node(NULL, timer_match); - if (!np) { - pr_err("Failed to find timer DT node\n"); - BUG(); - } - timer_reg_base = of_iomap(np, 0); if (!timer_reg_base) { pr_err("Can't map timer registers\n"); @@ -200,30 +183,6 @@ static void __init tegra20_init_timer(void) of_node_put(np); - np = of_find_matching_node(NULL, rtc_match); - if (!np) { - pr_err("Failed to find RTC DT node\n"); - BUG(); - } - - rtc_base = of_iomap(np, 0); - if (!rtc_base) { - pr_err("Can't map RTC registers"); - BUG(); - } - - /* - * rtc registers are used by read_persistent_clock, keep the rtc clock - * enabled - */ - clk = clk_get_sys("rtc-tegra", NULL); - if (IS_ERR(clk)) - pr_warn("Unable to get rtc-tegra clock\n"); - else - clk_prepare_enable(clk); - - of_node_put(np); - switch (rate) { case 12000000: timer_writel(0x000b, TIMERUS_USEC_CFG); @@ -259,12 +218,34 @@ static void __init tegra20_init_timer(void) tegra_clockevent.irq = tegra_timer_irq.irq; clockevents_config_and_register(&tegra_clockevent, 1000000, 0x1, 0x1fffffff); -#ifdef CONFIG_HAVE_ARM_TWD - twd_local_timer_of_register(); -#endif +} +CLOCKSOURCE_OF_DECLARE(tegra20_timer, "nvidia,tegra20-timer", tegra20_init_timer); + +static void __init tegra20_init_rtc(struct device_node *np) +{ + struct clk *clk; + + rtc_base = of_iomap(np, 0); + if (!rtc_base) { + pr_err("Can't map RTC registers"); + BUG(); + } + + /* + * rtc registers are used by read_persistent_clock, keep the rtc clock + * enabled + */ + clk = clk_get_sys("rtc-tegra", NULL); + if (IS_ERR(clk)) + pr_warn("Unable to get rtc-tegra clock\n"); + else + clk_prepare_enable(clk); + + of_node_put(np); + register_persistent_clock(NULL, tegra_read_persistent_clock); } -CLOCKSOURCE_OF_DECLARE(tegra20, "nvidia,tegra20-timer", tegra20_init_timer); +CLOCKSOURCE_OF_DECLARE(tegra20_rtc, "nvidia,tegra20-rtc", tegra20_init_rtc); #ifdef CONFIG_PM static u32 usec_config; diff --git a/trunk/drivers/clocksource/vt8500_timer.c b/trunk/drivers/clocksource/vt8500_timer.c index 8efc86b5b5dd..64f553f04fa4 100644 --- a/trunk/drivers/clocksource/vt8500_timer.c +++ b/trunk/drivers/clocksource/vt8500_timer.c @@ -129,22 +129,10 @@ static struct irqaction irq = { .dev_id = &clockevent, }; -static struct of_device_id vt8500_timer_ids[] = { - { .compatible = "via,vt8500-timer" }, - { } -}; - -static void __init vt8500_timer_init(void) +static void __init vt8500_timer_init(struct device_node *np) { - struct device_node *np; int timer_irq; - np = of_find_matching_node(NULL, vt8500_timer_ids); - if (!np) { - pr_err("%s: Timer description missing from Device Tree\n", - __func__); - return; - } regbase = of_iomap(np, 0); if (!regbase) { pr_err("%s: Missing iobase description in Device Tree\n", @@ -177,4 +165,4 @@ static void __init vt8500_timer_init(void) 4, 0xf0000000); } -CLOCKSOURCE_OF_DECLARE(vt8500, "via,vt8500-timer", vt8500_timer_init) +CLOCKSOURCE_OF_DECLARE(vt8500, "via,vt8500-timer", vt8500_timer_init); diff --git a/trunk/drivers/mmc/host/sdhci-cns3xxx.c b/trunk/drivers/mmc/host/sdhci-cns3xxx.c index 6ba8502c1ee2..30bfdc4ae52a 100644 --- a/trunk/drivers/mmc/host/sdhci-cns3xxx.c +++ b/trunk/drivers/mmc/host/sdhci-cns3xxx.c @@ -16,6 +16,7 @@ #include #include #include +#include #include "sdhci-pltfm.h" static unsigned int sdhci_cns3xxx_get_max_clk(struct sdhci_host *host) diff --git a/trunk/include/linux/clocksource.h b/trunk/include/linux/clocksource.h index 27cfda427dd9..ac33184b14fd 100644 --- a/trunk/include/linux/clocksource.h +++ b/trunk/include/linux/clocksource.h @@ -332,15 +332,23 @@ extern int clocksource_mmio_init(void __iomem *, const char *, extern int clocksource_i8253_init(void); +struct device_node; +typedef void(*clocksource_of_init_fn)(struct device_node *); #ifdef CONFIG_CLKSRC_OF extern void clocksource_of_init(void); #define CLOCKSOURCE_OF_DECLARE(name, compat, fn) \ static const struct of_device_id __clksrc_of_table_##name \ __used __section(__clksrc_of_table) \ - = { .compatible = compat, .data = fn }; + = { .compatible = compat, \ + .data = (fn == (clocksource_of_init_fn)NULL) ? fn : fn } #else -#define CLOCKSOURCE_OF_DECLARE(name, compat, fn) +static inline void clocksource_of_init(void) {} +#define CLOCKSOURCE_OF_DECLARE(name, compat, fn) \ + static const struct of_device_id __clksrc_of_table_##name \ + __unused __section(__clksrc_of_table) \ + = { .compatible = compat, \ + .data = (fn == (clocksource_of_init_fn)NULL) ? fn : fn } #endif #endif /* _LINUX_CLOCKSOURCE_H */