Merge tag 'cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 8 Oct 2014 21:06:53 +0000 (17:06 -0400)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 8 Oct 2014 21:06:53 +0000 (17:06 -0400)
Pull ARM SoC cleanups from Arnd Bergmann:
 "This time around, the cleanup branch contains mostly code removal.  A
  number of board files for at91, imx and msm have become obsolete
  because of the DT conversion and are now ready to be removed.  The
  OMAP platform has traditionally had its own DMA engine abstraction and
  as this is being phased out, a lot of the original code is now unused
  and can be removed as well.

  S3C24xx can be simplified now that the restart code is a proper device
  driver.

  Finally, a number of cleanups in shmobile are done to prepare for the
  addition of new code in other branches"

* tag 'cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (43 commits)
  ARM: at91: Remove the support for the RSI EWS board
  arm: mach-omap2: Convert pr_warning to pr_warn
  ARM: OMAP: Remove unused pieces of legacy DMA API
  ARM: at91: remove board file for Acme Systems Fox G20
  ARM: orion5x: Convert pr_warning to pr_warn
  ARM: S3C24XX: remove separate restart code
  ARM: EXYNOS: Do not calculate boot address twice
  ARM: sunxi: Remove sun4i reboot code from mach directory
  ARM: imx: Remove mach-mxt_td60 board file
  ARM: shmobile: armadillo800eva legacy: Use rmobile_add_devices_to_domains()
  ARM: shmobile: r8a7740: Clean up pm domain table
  ARM: shmobile: r8a7740: Use rmobile_add_devices_to_domains()
  ARM: shmobile: sh7372: Make domain_devices[] static __initdata
  ARM: shmobile: mackerel: Make domain_devices[] static __initdata
  clocksource: tcb_clksrc: sanitize IRQ request
  ARM: at91/tclib: mask interruptions at shutdown and probe
  ARM: at91/tclib: move initialization from alloc to probe
  ARM: at91/tclib: prefer using of devm_* functions
  ARM: clps711x: Switch CLPS711X subarch to use clk and clocksource driver
  ARM: shmobile: r8a7791 is now called "R-Car M2-W"
  ...

111 files changed:
arch/arm/Kconfig
arch/arm/boot/dts/vf610-twr.dts
arch/arm/configs/imx_v4_v5_defconfig
arch/arm/mach-at91/Kconfig
arch/arm/mach-at91/Kconfig.non_dt
arch/arm/mach-at91/Makefile
arch/arm/mach-at91/board-dt-rm9200.c
arch/arm/mach-at91/board-dt-sam9.c
arch/arm/mach-at91/board-dt-sama5.c
arch/arm/mach-at91/board-foxg20.c [deleted file]
arch/arm/mach-at91/board-rsi-ews.c [deleted file]
arch/arm/mach-at91/irq.c
arch/arm/mach-at91/pm.c
arch/arm/mach-at91/setup.c
arch/arm/mach-clps711x/common.c
arch/arm/mach-clps711x/common.h
arch/arm/mach-exynos/include/mach/memory.h [deleted file]
arch/arm/mach-exynos/platsmp.c
arch/arm/mach-imx/Kconfig
arch/arm/mach-imx/Makefile
arch/arm/mach-imx/board-pcm038.h [deleted file]
arch/arm/mach-imx/common.h
arch/arm/mach-imx/cpuidle-imx6q.c
arch/arm/mach-imx/eukrea-baseboards.h
arch/arm/mach-imx/eukrea_mbimx27-baseboard.c [deleted file]
arch/arm/mach-imx/iomux-imx31.c
arch/arm/mach-imx/iomux-v1.c
arch/arm/mach-imx/iomux-v3.c
arch/arm/mach-imx/mach-cpuimx27.c [deleted file]
arch/arm/mach-imx/mach-mx1ads.c [deleted file]
arch/arm/mach-imx/mach-mxt_td60.c [deleted file]
arch/arm/mach-imx/mach-pcm038.c [deleted file]
arch/arm/mach-imx/pcm970-baseboard.c [deleted file]
arch/arm/mach-imx/platsmp.c
arch/arm/mach-msm/board-mahimahi.c [deleted file]
arch/arm/mach-msm/board-msm7x30.c
arch/arm/mach-msm/board-trout-gpio.c
arch/arm/mach-msm/board-trout.c
arch/arm/mach-msm/io.c
arch/arm/mach-omap2/display.c
arch/arm/mach-omap2/hdq1w.c
arch/arm/mach-omap2/i2c.c
arch/arm/mach-omap2/msdi.c
arch/arm/mach-omap2/mux.c
arch/arm/mach-omap2/omap_hwmod.c
arch/arm/mach-omap2/pdata-quirks.c
arch/arm/mach-omap2/pm34xx.c
arch/arm/mach-omap2/smartreflex-class3.c
arch/arm/mach-omap2/sr_device.c
arch/arm/mach-omap2/vc.c
arch/arm/mach-omap2/voltage.c
arch/arm/mach-omap2/wd_timer.c
arch/arm/mach-orion5x/dns323-setup.c
arch/arm/mach-orion5x/terastation_pro2-setup.c
arch/arm/mach-orion5x/ts209-setup.c
arch/arm/mach-orion5x/ts409-setup.c
arch/arm/mach-orion5x/ts78xx-setup.c
arch/arm/mach-s3c24xx/Kconfig
arch/arm/mach-s3c24xx/common.c
arch/arm/mach-s3c24xx/common.h
arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h
arch/arm/mach-s3c24xx/mach-amlm5900.c
arch/arm/mach-s3c24xx/mach-anubis.c
arch/arm/mach-s3c24xx/mach-at2440evb.c
arch/arm/mach-s3c24xx/mach-bast.c
arch/arm/mach-s3c24xx/mach-gta02.c
arch/arm/mach-s3c24xx/mach-h1940.c
arch/arm/mach-s3c24xx/mach-jive.c
arch/arm/mach-s3c24xx/mach-mini2440.c
arch/arm/mach-s3c24xx/mach-n30.c
arch/arm/mach-s3c24xx/mach-nexcoder.c
arch/arm/mach-s3c24xx/mach-osiris.c
arch/arm/mach-s3c24xx/mach-otom.c
arch/arm/mach-s3c24xx/mach-qt2410.c
arch/arm/mach-s3c24xx/mach-rx1950.c
arch/arm/mach-s3c24xx/mach-rx3715.c
arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
arch/arm/mach-s3c24xx/mach-smdk2410.c
arch/arm/mach-s3c24xx/mach-smdk2413.c
arch/arm/mach-s3c24xx/mach-smdk2416.c
arch/arm/mach-s3c24xx/mach-smdk2440.c
arch/arm/mach-s3c24xx/mach-smdk2443.c
arch/arm/mach-s3c24xx/mach-tct_hammer.c
arch/arm/mach-s3c24xx/mach-vr1000.c
arch/arm/mach-s3c24xx/mach-vstms.c
arch/arm/mach-s3c24xx/s3c2410.c
arch/arm/mach-s3c24xx/s3c2412.c
arch/arm/mach-s3c24xx/s3c2416.c
arch/arm/mach-s3c24xx/s3c2443.c
arch/arm/mach-s3c24xx/s3c244x.c
arch/arm/mach-s5pv210/include/mach/regs-clock.h [deleted file]
arch/arm/mach-s5pv210/pm.c
arch/arm/mach-s5pv210/regs-clock.h [new file with mode: 0644]
arch/arm/mach-s5pv210/s5pv210.c
arch/arm/mach-shmobile/Kconfig
arch/arm/mach-shmobile/Makefile
arch/arm/mach-shmobile/board-armadillo800eva.c
arch/arm/mach-shmobile/board-mackerel.c
arch/arm/mach-shmobile/pm-r8a7740.c
arch/arm/mach-shmobile/pm-rcar.c
arch/arm/mach-shmobile/pm-rmobile.c
arch/arm/mach-shmobile/pm-rmobile.h
arch/arm/mach-shmobile/setup-r8a7740.c
arch/arm/mach-shmobile/setup-sh7372.c
arch/arm/mach-sunxi/sunxi.c
arch/arm/plat-omap/dma.c
drivers/clocksource/tcb_clksrc.c
drivers/misc/atmel_tclib.c
drivers/pwm/pwm-atmel-tcb.c
include/linux/atmel_tc.h
include/linux/omap-dma.h

index 32cbbd5659023cffe04faf6c97eb7ee5be196585..314bdf1163f972699e6210e0a0e9b4e5202a5c6b 100644 (file)
@@ -650,6 +650,7 @@ config ARCH_SHMOBILE_LEGACY
        select ARCH_SHMOBILE
        select ARM_PATCH_PHYS_VIRT if MMU
        select CLKDEV_LOOKUP
+       select CPU_V7
        select GENERIC_CLOCKEVENTS
        select HAVE_ARM_SCU if SMP
        select HAVE_ARM_TWD if SMP
@@ -660,6 +661,7 @@ config ARCH_SHMOBILE_LEGACY
        select NO_IOPORT_MAP
        select PINCTRL
        select PM_GENERIC_DOMAINS if PM
+       select SH_CLK_CPG
        select SPARSE_IRQ
        help
          Support for Renesas ARM SoC platforms using a non-multiplatform
index b8a5e8c68f06eedde75d010df044959bfe543d2a..e4bffbae515f5e7317f3f0da259396bd91750002 100644 (file)
@@ -76,7 +76,6 @@
 
                simple-audio-card,cpu {
                        sound-dai = <&sai2>;
-                       master-clkdir-out;
                        frame-master;
                        bitclock-master;
                };
index 63bde0efc0419b9e4981a369d5b3068d5b560932..a3fb8662ff6c1c7f7bb9318fbc209c5a8df8c0bc 100644 (file)
@@ -22,7 +22,6 @@ CONFIG_ARCH_MULTI_V5=y
 # CONFIG_ARCH_MULTI_V7 is not set
 CONFIG_ARCH_MXC=y
 CONFIG_MXC_IRQ_PRIOR=y
-CONFIG_ARCH_MX1ADS=y
 CONFIG_MACH_SCB9328=y
 CONFIG_MACH_APF9328=y
 CONFIG_MACH_MX21ADS=y
@@ -30,10 +29,6 @@ CONFIG_MACH_MX25_3DS=y
 CONFIG_MACH_EUKREA_CPUIMX25SD=y
 CONFIG_MACH_IMX25_DT=y
 CONFIG_MACH_MX27ADS=y
-CONFIG_MACH_PCM038=y
-CONFIG_MACH_CPUIMX27=y
-CONFIG_MACH_EUKREA_CPUIMX27_USESDHC2=y
-CONFIG_MACH_EUKREA_CPUIMX27_USEUART4=y
 CONFIG_MACH_MX27_3DS=y
 CONFIG_MACH_IMX27_VISSTRIM_M10=y
 CONFIG_MACH_PCA100=y
index 6cc6f7aebdaea65004409a84fa1a7913a67c1bbb..dd28e1fedbdce67ac24269cedbb6e6558b67f6a2 100644 (file)
@@ -28,6 +28,11 @@ config OLD_CLK_AT91
        bool
        default AT91_PMC_UNIT && AT91_USE_OLD_CLK
 
+config OLD_IRQ_AT91
+       bool
+       select MULTI_IRQ_HANDLER
+       select SPARSE_IRQ
+
 config AT91_SAM9_ALT_RESET
        bool
        default !ARCH_AT91X40
@@ -45,18 +50,16 @@ config HAVE_AT91_SMD
 config SOC_AT91SAM9
        bool
        select AT91_SAM9_TIME
+       select ATMEL_AIC_IRQ if !OLD_IRQ_AT91
        select CPU_ARM926T
        select GENERIC_CLOCKEVENTS
-       select MULTI_IRQ_HANDLER
-       select SPARSE_IRQ
 
 config SOC_SAMA5
        bool
        select AT91_SAM9_TIME
+       select ATMEL_AIC5_IRQ
        select CPU_V7
        select GENERIC_CLOCKEVENTS
-       select MULTI_IRQ_HANDLER
-       select SPARSE_IRQ
        select USE_OF
 
 menu "Atmel AT91 System-on-Chip"
@@ -70,8 +73,7 @@ config ARCH_AT91X40
        depends on !MMU
        select CPU_ARM7TDMI
        select ARCH_USES_GETTIMEOFFSET
-       select MULTI_IRQ_HANDLER
-       select SPARSE_IRQ
+       select OLD_IRQ_AT91
 
        help
          Select this if you are using one of Atmel's AT91X40 SoC.
@@ -108,11 +110,10 @@ endif
 if SOC_SAM_V4_V5
 config SOC_AT91RM9200
        bool "AT91RM9200"
+       select ATMEL_AIC_IRQ if !OLD_IRQ_AT91
        select CPU_ARM920T
        select GENERIC_CLOCKEVENTS
        select HAVE_AT91_DBGU0
-       select MULTI_IRQ_HANDLER
-       select SPARSE_IRQ
        select HAVE_AT91_USB_CLK
 
 config SOC_AT91SAM9260
index 44ace320d2e107ee27a755d82f339996dae81c17..d8e88219edb486386ec1f93b264fd999c30cf5ef 100644 (file)
@@ -14,31 +14,37 @@ config ARCH_AT91RM9200
        bool "AT91RM9200"
        select SOC_AT91RM9200
        select AT91_USE_OLD_CLK
+       select OLD_IRQ_AT91
 
 config ARCH_AT91SAM9260
        bool "AT91SAM9260 or AT91SAM9XE or AT91SAM9G20"
        select SOC_AT91SAM9260
        select AT91_USE_OLD_CLK
+       select OLD_IRQ_AT91
 
 config ARCH_AT91SAM9261
        bool "AT91SAM9261 or AT91SAM9G10"
        select SOC_AT91SAM9261
        select AT91_USE_OLD_CLK
+       select OLD_IRQ_AT91
 
 config ARCH_AT91SAM9263
        bool "AT91SAM9263"
        select SOC_AT91SAM9263
        select AT91_USE_OLD_CLK
+       select OLD_IRQ_AT91
 
 config ARCH_AT91SAM9RL
        bool "AT91SAM9RL"
        select SOC_AT91SAM9RL
        select AT91_USE_OLD_CLK
+       select OLD_IRQ_AT91
 
 config ARCH_AT91SAM9G45
        bool "AT91SAM9G45"
        select SOC_AT91SAM9G45
        select AT91_USE_OLD_CLK
+       select OLD_IRQ_AT91
 
 endchoice
 
@@ -132,12 +138,6 @@ config MACH_ECO920
        bool "eco920"
        help
          Select this if you are using the eco920 board
-
-config MACH_RSI_EWS
-       bool "RSI Embedded Webserver"
-       depends on ARCH_AT91RM9200
-       help
-         Select this if you are using RSIs EWS board.
 endif
 
 # ----------------------------------------------------------
@@ -212,12 +212,6 @@ config MACH_CPU9G20
          Select this if you are using a Eukrea Electromatique's
          CPU9G20 Board <http://www.eukrea.com/>
 
-config MACH_ACMENETUSFOXG20
-       bool "Acme Systems srl FOX Board G20"
-       help
-         Select this if you are using Acme Systems
-         FOX Board G20 <http://www.acmesystems.it>
-
 config MACH_PORTUXG20
        bool "taskit PortuxG20"
        help
index 78e9cec282f451c6e17c03845107087bb7ae0892..40946f4e8921be361dbe866be5c2280083b18e96 100644 (file)
@@ -2,11 +2,12 @@
 # Makefile for the linux kernel.
 #
 
-obj-y          := irq.o gpio.o setup.o sysirq_mask.o
+obj-y          := gpio.o setup.o sysirq_mask.o
 obj-m          :=
 obj-n          :=
 obj-           :=
 
+obj-$(CONFIG_OLD_IRQ_AT91)     += irq.o
 obj-$(CONFIG_OLD_CLK_AT91)     += clock.o
 obj-$(CONFIG_AT91_SAM9_ALT_RESET) += at91sam9_alt_reset.o
 obj-$(CONFIG_AT91_SAM9G45_RESET) += at91sam9g45_reset.o
@@ -46,7 +47,6 @@ obj-$(CONFIG_MACH_ECBAT91)    += board-ecbat91.o
 obj-$(CONFIG_MACH_YL9200)      += board-yl-9200.o
 obj-$(CONFIG_MACH_CPUAT91)     += board-cpuat91.o
 obj-$(CONFIG_MACH_ECO920)      += board-eco920.o
-obj-$(CONFIG_MACH_RSI_EWS)     += board-rsi-ews.o
 
 # AT91SAM9260 board-specific support
 obj-$(CONFIG_MACH_AT91SAM9260EK) += board-sam9260ek.o
@@ -69,7 +69,6 @@ obj-$(CONFIG_MACH_AT91SAM9RLEK)       += board-sam9rlek.o
 # AT91SAM9G20 board-specific support
 obj-$(CONFIG_MACH_AT91SAM9G20EK) += board-sam9g20ek.o
 obj-$(CONFIG_MACH_CPU9G20)     += board-cpu9krea.o
-obj-$(CONFIG_MACH_ACMENETUSFOXG20) += board-foxg20.o
 obj-$(CONFIG_MACH_STAMP9G20)   += board-stamp9g20.o
 obj-$(CONFIG_MACH_PORTUXG20)   += board-stamp9g20.o
 obj-$(CONFIG_MACH_PCONTROL_G20)        += board-pcontrol-g20.o board-stamp9g20.o
index f4b6e91843e44565257982eb7297101bbdbcd4bb..226563f850b85a9b7f9e884b2223f7a1b15eb6f1 100644 (file)
 #include "at91_aic.h"
 #include "generic.h"
 
-
-static const struct of_device_id irq_of_match[] __initconst = {
-       { .compatible = "atmel,at91rm9200-aic", .data = at91_aic_of_init },
-       { /*sentinel*/ }
-};
-
-static void __init at91rm9200_dt_init_irq(void)
-{
-       of_irq_init(irq_of_match);
-}
-
 static void __init at91rm9200_dt_timer_init(void)
 {
 #if defined(CONFIG_COMMON_CLK)
@@ -52,8 +41,6 @@ static const char *at91rm9200_dt_board_compat[] __initdata = {
 DT_MACHINE_START(at91rm9200_dt, "Atmel AT91RM9200 (Device Tree)")
        .init_time      = at91rm9200_dt_timer_init,
        .map_io         = at91_map_io,
-       .handle_irq     = at91_aic_handle_irq,
        .init_early     = at91rm9200_dt_initialize,
-       .init_irq       = at91rm9200_dt_init_irq,
        .dt_compat      = at91rm9200_dt_board_compat,
 MACHINE_END
index 575b0be66ca8958028c656e3289b26368fb401a4..dfa8d48146fe57d93c6c522f1ca36cf32a1df565 100644 (file)
@@ -34,17 +34,6 @@ static void __init sam9_dt_timer_init(void)
        at91sam926x_pit_init();
 }
 
-static const struct of_device_id irq_of_match[] __initconst = {
-
-       { .compatible = "atmel,at91rm9200-aic", .data = at91_aic_of_init },
-       { /*sentinel*/ }
-};
-
-static void __init at91_dt_init_irq(void)
-{
-       of_irq_init(irq_of_match);
-}
-
 static const char *at91_dt_board_compat[] __initdata = {
        "atmel,at91sam9",
        NULL
@@ -54,8 +43,6 @@ DT_MACHINE_START(at91sam_dt, "Atmel AT91SAM (Device Tree)")
        /* Maintainer: Atmel */
        .init_time      = sam9_dt_timer_init,
        .map_io         = at91_map_io,
-       .handle_irq     = at91_aic_handle_irq,
        .init_early     = at91_dt_initialize,
-       .init_irq       = at91_dt_init_irq,
        .dt_compat      = at91_dt_board_compat,
 MACHINE_END
index 075ec0576adaf8b3d5b234a1aad729cb9aaeced7..d6fe04bcaabd3ba5a688955b86ea1b270a8a25ab 100644 (file)
@@ -35,17 +35,6 @@ static void __init sama5_dt_timer_init(void)
        at91sam926x_pit_init();
 }
 
-static const struct of_device_id irq_of_match[] __initconst = {
-
-       { .compatible = "atmel,sama5d3-aic", .data = at91_aic5_of_init },
-       { /*sentinel*/ }
-};
-
-static void __init at91_dt_init_irq(void)
-{
-       of_irq_init(irq_of_match);
-}
-
 static int ksz9021rn_phy_fixup(struct phy_device *phy)
 {
        int value;
@@ -82,9 +71,7 @@ DT_MACHINE_START(sama5_dt, "Atmel SAMA5 (Device Tree)")
        /* Maintainer: Atmel */
        .init_time      = sama5_dt_timer_init,
        .map_io         = at91_map_io,
-       .handle_irq     = at91_aic5_handle_irq,
        .init_early     = at91_dt_initialize,
-       .init_irq       = at91_dt_init_irq,
        .init_machine   = sama5_dt_device_init,
        .dt_compat      = sama5_dt_board_compat,
 MACHINE_END
diff --git a/arch/arm/mach-at91/board-foxg20.c b/arch/arm/mach-at91/board-foxg20.c
deleted file mode 100644 (file)
index 8b22c60..0000000
+++ /dev/null
@@ -1,272 +0,0 @@
-/*
- *  Copyright (C) 2005 SAN People
- *  Copyright (C) 2008 Atmel
- *  Copyright (C) 2010 Lee McLoughlin - lee@lmmrtech.com
- *  Copyright (C) 2010 Sergio Tanzilli - tanzilli@acmesystems.it
- *
- * 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
- */
-
-#include <linux/types.h>
-#include <linux/init.h>
-#include <linux/mm.h>
-#include <linux/module.h>
-#include <linux/platform_device.h>
-#include <linux/spi/spi.h>
-#include <linux/spi/at73c213.h>
-#include <linux/gpio.h>
-#include <linux/gpio_keys.h>
-#include <linux/input.h>
-#include <linux/clk.h>
-#include <linux/w1-gpio.h>
-
-#include <mach/hardware.h>
-#include <asm/setup.h>
-#include <asm/mach-types.h>
-#include <asm/irq.h>
-
-#include <asm/mach/arch.h>
-#include <asm/mach/map.h>
-#include <asm/mach/irq.h>
-
-#include <mach/at91sam9_smc.h>
-
-#include "at91_aic.h"
-#include "board.h"
-#include "sam9_smc.h"
-#include "generic.h"
-#include "gpio.h"
-
-/*
- * The FOX Board G20 hardware comes as the "Netus G20" board with
- * just the cpu, ram, dataflash and two header connectors.
- * This is plugged into the FOX Board which provides the ethernet,
- * usb, rtc, leds, switch, ...
- *
- * For more info visit: http://www.acmesystems.it/foxg20
- */
-
-
-static void __init foxg20_init_early(void)
-{
-       /* Initialize processor: 18.432 MHz crystal */
-       at91_initialize(18432000);
-}
-
-/*
- * USB Host port
- */
-static struct at91_usbh_data __initdata foxg20_usbh_data = {
-       .ports          = 2,
-       .vbus_pin       = {-EINVAL, -EINVAL},
-       .overcurrent_pin= {-EINVAL, -EINVAL},
-};
-
-/*
- * USB Device port
- */
-static struct at91_udc_data __initdata foxg20_udc_data = {
-       .vbus_pin       = AT91_PIN_PC6,
-       .pullup_pin     = -EINVAL,              /* pull-up driven by UDC */
-};
-
-
-/*
- * SPI devices.
- */
-static struct spi_board_info foxg20_spi_devices[] = {
-#if !IS_ENABLED(CONFIG_MMC_ATMELMCI)
-       {
-               .modalias       = "mtd_dataflash",
-               .chip_select    = 1,
-               .max_speed_hz   = 15 * 1000 * 1000,
-               .bus_num        = 0,
-       },
-#endif
-};
-
-
-/*
- * MACB Ethernet device
- */
-static struct macb_platform_data __initdata foxg20_macb_data = {
-       .phy_irq_pin    = AT91_PIN_PA7,
-       .is_rmii        = 1,
-};
-
-/*
- * MCI (SD/MMC)
- * det_pin, wp_pin and vcc_pin are not connected
- */
-static struct mci_platform_data __initdata foxg20_mci0_data = {
-       .slot[1] = {
-               .bus_width      = 4,
-               .detect_pin     = -EINVAL,
-               .wp_pin         = -EINVAL,
-       },
-};
-
-
-/*
- * LEDs
- */
-static struct gpio_led foxg20_leds[] = {
-       {       /* user led, red */
-               .name                   = "user_led",
-               .gpio                   = AT91_PIN_PC7,
-               .active_low             = 0,
-               .default_trigger        = "heartbeat",
-       },
-};
-
-
-/*
- * GPIO Buttons
- */
-#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
-static struct gpio_keys_button foxg20_buttons[] = {
-       {
-               .gpio           = AT91_PIN_PC4,
-               .code           = BTN_1,
-               .desc           = "Button 1",
-               .active_low     = 1,
-               .wakeup         = 1,
-       },
-};
-
-static struct gpio_keys_platform_data foxg20_button_data = {
-       .buttons        = foxg20_buttons,
-       .nbuttons       = ARRAY_SIZE(foxg20_buttons),
-};
-
-static struct platform_device foxg20_button_device = {
-       .name           = "gpio-keys",
-       .id             = -1,
-       .num_resources  = 0,
-       .dev            = {
-               .platform_data  = &foxg20_button_data,
-       }
-};
-
-static void __init foxg20_add_device_buttons(void)
-{
-       at91_set_gpio_input(AT91_PIN_PC4, 1);   /* btn1 */
-       at91_set_deglitch(AT91_PIN_PC4, 1);
-
-       platform_device_register(&foxg20_button_device);
-}
-#else
-static void __init foxg20_add_device_buttons(void) {}
-#endif
-
-
-#if defined(CONFIG_W1_MASTER_GPIO) || defined(CONFIG_W1_MASTER_GPIO_MODULE)
-static struct w1_gpio_platform_data w1_gpio_pdata = {
-       /* If you choose to use a pin other than PB16 it needs to be 3.3V */
-       .pin            = AT91_PIN_PB16,
-       .is_open_drain  = 1,
-       .ext_pullup_enable_pin  = -EINVAL,
-};
-
-static struct platform_device w1_device = {
-       .name                   = "w1-gpio",
-       .id                     = -1,
-       .dev.platform_data      = &w1_gpio_pdata,
-};
-
-static void __init at91_add_device_w1(void)
-{
-       at91_set_GPIO_periph(w1_gpio_pdata.pin, 1);
-       at91_set_multi_drive(w1_gpio_pdata.pin, 1);
-       platform_device_register(&w1_device);
-}
-
-#endif
-
-
-static struct i2c_board_info __initdata foxg20_i2c_devices[] = {
-       {
-               I2C_BOARD_INFO("24c512", 0x50),
-       },
-};
-
-
-static void __init foxg20_board_init(void)
-{
-       /* Serial */
-       /* DBGU on ttyS0. (Rx & Tx only) */
-       at91_register_uart(0, 0, 0);
-
-       /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
-       at91_register_uart(AT91SAM9260_ID_US0, 1,
-                               ATMEL_UART_CTS
-                               | ATMEL_UART_RTS
-                               | ATMEL_UART_DTR
-                               | ATMEL_UART_DSR
-                               | ATMEL_UART_DCD
-                               | ATMEL_UART_RI);
-
-       /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
-       at91_register_uart(AT91SAM9260_ID_US1, 2,
-               ATMEL_UART_CTS
-               | ATMEL_UART_RTS);
-
-       /* USART2 on ttyS3. (Rx & Tx only) */
-       at91_register_uart(AT91SAM9260_ID_US2, 3, 0);
-
-       /* USART3 on ttyS4. (Rx, Tx, RTS, CTS) */
-       at91_register_uart(AT91SAM9260_ID_US3, 4,
-               ATMEL_UART_CTS
-               | ATMEL_UART_RTS);
-
-       /* USART4 on ttyS5. (Rx & Tx only) */
-       at91_register_uart(AT91SAM9260_ID_US4, 5, 0);
-
-       /* USART5 on ttyS6. (Rx & Tx only) */
-       at91_register_uart(AT91SAM9260_ID_US5, 6, 0);
-
-       /* Set the internal pull-up resistor on DRXD */
-       at91_set_A_periph(AT91_PIN_PB14, 1);
-       at91_add_device_serial();
-       /* USB Host */
-       at91_add_device_usbh(&foxg20_usbh_data);
-       /* USB Device */
-       at91_add_device_udc(&foxg20_udc_data);
-       /* SPI */
-       at91_add_device_spi(foxg20_spi_devices, ARRAY_SIZE(foxg20_spi_devices));
-       /* Ethernet */
-       at91_add_device_eth(&foxg20_macb_data);
-       /* MMC */
-       at91_add_device_mci(0, &foxg20_mci0_data);
-       /* I2C */
-       at91_add_device_i2c(foxg20_i2c_devices, ARRAY_SIZE(foxg20_i2c_devices));
-       /* LEDs */
-       at91_gpio_leds(foxg20_leds, ARRAY_SIZE(foxg20_leds));
-       /* Push Buttons */
-       foxg20_add_device_buttons();
-#if defined(CONFIG_W1_MASTER_GPIO) || defined(CONFIG_W1_MASTER_GPIO_MODULE)
-       at91_add_device_w1();
-#endif
-}
-
-MACHINE_START(ACMENETUSFOXG20, "Acme Systems srl FOX Board G20")
-       /* Maintainer: Sergio Tanzilli */
-       .init_time      = at91sam926x_pit_init,
-       .map_io         = at91_map_io,
-       .handle_irq     = at91_aic_handle_irq,
-       .init_early     = foxg20_init_early,
-       .init_irq       = at91_init_irq_default,
-       .init_machine   = foxg20_board_init,
-MACHINE_END
diff --git a/arch/arm/mach-at91/board-rsi-ews.c b/arch/arm/mach-at91/board-rsi-ews.c
deleted file mode 100644 (file)
index f28e8b7..0000000
+++ /dev/null
@@ -1,232 +0,0 @@
-/*
- * board-rsi-ews.c
- *
- *  Copyright (C)
- *  2005 SAN People,
- *  2008-2011 R-S-I Elektrotechnik GmbH & Co. KG
- *
- * Licensed under GPLv2 or later.
- */
-
-#include <linux/types.h>
-#include <linux/init.h>
-#include <linux/mm.h>
-#include <linux/module.h>
-#include <linux/platform_device.h>
-#include <linux/spi/spi.h>
-#include <linux/mtd/physmap.h>
-
-#include <asm/setup.h>
-#include <asm/mach-types.h>
-#include <asm/irq.h>
-
-#include <asm/mach/arch.h>
-#include <asm/mach/map.h>
-#include <asm/mach/irq.h>
-
-#include <mach/hardware.h>
-
-#include <linux/gpio.h>
-
-#include "at91_aic.h"
-#include "board.h"
-#include "generic.h"
-#include "gpio.h"
-
-static void __init rsi_ews_init_early(void)
-{
-       /* Initialize processor: 18.432 MHz crystal */
-       at91_initialize(18432000);
-}
-
-/*
- * Ethernet
- */
-static struct macb_platform_data rsi_ews_eth_data __initdata = {
-       .phy_irq_pin    = AT91_PIN_PC4,
-       .is_rmii        = 1,
-};
-
-/*
- * USB Host
- */
-static struct at91_usbh_data rsi_ews_usbh_data __initdata = {
-       .ports          = 1,
-       .vbus_pin       = {-EINVAL, -EINVAL},
-       .overcurrent_pin= {-EINVAL, -EINVAL},
-};
-
-/*
- * SD/MC
- */
-static struct mci_platform_data __initdata rsi_ews_mci0_data = {
-       .slot[0] = {
-               .bus_width      = 4,
-               .detect_pin     = AT91_PIN_PB27,
-               .wp_pin         = AT91_PIN_PB29,
-       },
-};
-
-/*
- * I2C
- */
-static struct i2c_board_info rsi_ews_i2c_devices[] __initdata = {
-       {
-               I2C_BOARD_INFO("ds1337", 0x68),
-       },
-       {
-               I2C_BOARD_INFO("24c01", 0x50),
-       }
-};
-
-/*
- * LEDs
- */
-static struct gpio_led rsi_ews_leds[] = {
-       {
-               .name                   = "led0",
-               .gpio                   = AT91_PIN_PB6,
-               .active_low             = 0,
-       },
-       {
-               .name                   = "led1",
-               .gpio                   = AT91_PIN_PB7,
-               .active_low             = 0,
-       },
-       {
-               .name                   = "led2",
-               .gpio                   = AT91_PIN_PB8,
-               .active_low             = 0,
-       },
-       {
-               .name                   = "led3",
-               .gpio                   = AT91_PIN_PB9,
-               .active_low             = 0,
-       },
-};
-
-/*
- * DataFlash
- */
-static struct spi_board_info rsi_ews_spi_devices[] = {
-       {       /* DataFlash chip 1*/
-               .modalias       = "mtd_dataflash",
-               .chip_select    = 0,
-               .max_speed_hz   = 5 * 1000 * 1000,
-       },
-       {       /* DataFlash chip 2*/
-               .modalias       = "mtd_dataflash",
-               .chip_select    = 1,
-               .max_speed_hz   = 5 * 1000 * 1000,
-       },
-};
-
-/*
- * NOR flash
- */
-static struct mtd_partition rsiews_nor_partitions[] = {
-       {
-               .name           = "boot",
-               .offset         = 0,
-               .size           = 3 * SZ_128K,
-               .mask_flags     = MTD_WRITEABLE
-       },
-       {
-               .name           = "kernel",
-               .offset         = MTDPART_OFS_NXTBLK,
-               .size           = SZ_2M - (3 * SZ_128K)
-       },
-       {
-               .name           = "root",
-               .offset         = MTDPART_OFS_NXTBLK,
-               .size           = SZ_8M
-       },
-       {
-               .name           = "kernelupd",
-               .offset         = MTDPART_OFS_NXTBLK,
-               .size           = 3 * SZ_512K,
-               .mask_flags     = MTD_WRITEABLE
-       },
-       {
-               .name           = "rootupd",
-               .offset         = MTDPART_OFS_NXTBLK,
-               .size           = 9 * SZ_512K,
-               .mask_flags     = MTD_WRITEABLE
-       },
-};
-
-static struct physmap_flash_data rsiews_nor_data = {
-       .width          = 2,
-       .parts          = rsiews_nor_partitions,
-       .nr_parts       = ARRAY_SIZE(rsiews_nor_partitions),
-};
-
-#define NOR_BASE       AT91_CHIPSELECT_0
-#define NOR_SIZE       SZ_16M
-
-static struct resource nor_flash_resources[] = {
-       {
-               .start  = NOR_BASE,
-               .end    = NOR_BASE + NOR_SIZE - 1,
-               .flags  = IORESOURCE_MEM,
-       }
-};
-
-static struct platform_device rsiews_nor_flash = {
-       .name           = "physmap-flash",
-       .id             = 0,
-       .dev            = {
-                               .platform_data  = &rsiews_nor_data,
-       },
-       .resource       = nor_flash_resources,
-       .num_resources  = ARRAY_SIZE(nor_flash_resources),
-};
-
-/*
- * Init Func
- */
-static void __init rsi_ews_board_init(void)
-{
-       /* Serial */
-       /* DBGU on ttyS0. (Rx & Tx only) */
-       /* This one is for debugging */
-       at91_register_uart(0, 0, 0);
-
-       /* USART1 on ttyS2. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
-       /* Dialin/-out modem interface */
-       at91_register_uart(AT91RM9200_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS
-                          | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
-                          | ATMEL_UART_RI);
-
-       /* USART3 on ttyS4. (Rx, Tx, RTS) */
-       /* RS485 communication */
-       at91_register_uart(AT91RM9200_ID_US3, 4, ATMEL_UART_RTS);
-       at91_add_device_serial();
-       at91_set_gpio_output(AT91_PIN_PA21, 0);
-       /* Ethernet */
-       at91_add_device_eth(&rsi_ews_eth_data);
-       /* USB Host */
-       at91_add_device_usbh(&rsi_ews_usbh_data);
-       /* I2C */
-       at91_add_device_i2c(rsi_ews_i2c_devices,
-                       ARRAY_SIZE(rsi_ews_i2c_devices));
-       /* SPI */
-       at91_add_device_spi(rsi_ews_spi_devices,
-                       ARRAY_SIZE(rsi_ews_spi_devices));
-       /* MMC */
-       at91_add_device_mci(0, &rsi_ews_mci0_data);
-       /* NOR Flash */
-       platform_device_register(&rsiews_nor_flash);
-       /* LEDs */
-       at91_gpio_leds(rsi_ews_leds, ARRAY_SIZE(rsi_ews_leds));
-}
-
-MACHINE_START(RSI_EWS, "RSI EWS")
-       /* Maintainer: Josef Holzmayr <holzmayr@rsi-elektrotechnik.de> */
-       .init_time      = at91rm9200_timer_init,
-       .map_io         = at91_map_io,
-       .handle_irq     = at91_aic_handle_irq,
-       .init_early     = rsi_ews_init_early,
-       .init_irq       = at91_init_irq_default,
-       .init_machine   = rsi_ews_board_init,
-MACHINE_END
index 3d192c5aee665e60b24e5fae09171e6315b32b19..cdb3ec9efd2ba291ee8ce928abaf7fdf838dcce7 100644 (file)
@@ -48,11 +48,6 @@ void __iomem *at91_aic_base;
 static struct irq_domain *at91_aic_domain;
 static struct device_node *at91_aic_np;
 static unsigned int n_irqs = NR_AIC_IRQS;
-static unsigned long at91_aic_caps = 0;
-
-/* AIC5 introduces a Source Select Register */
-#define AT91_AIC_CAP_AIC5      (1 << 0)
-#define has_aic5()             (at91_aic_caps & AT91_AIC_CAP_AIC5)
 
 #ifdef CONFIG_PM
 
@@ -92,50 +87,14 @@ static int at91_aic_set_wake(struct irq_data *d, unsigned value)
 
 void at91_irq_suspend(void)
 {
-       int bit = -1;
-
-       if (has_aic5()) {
-               /* disable enabled irqs */
-               while ((bit = find_next_bit(backups, n_irqs, bit + 1)) < n_irqs) {
-                       at91_aic_write(AT91_AIC5_SSR,
-                                      bit & AT91_AIC5_INTSEL_MSK);
-                       at91_aic_write(AT91_AIC5_IDCR, 1);
-               }
-               /* enable wakeup irqs */
-               bit = -1;
-               while ((bit = find_next_bit(wakeups, n_irqs, bit + 1)) < n_irqs) {
-                       at91_aic_write(AT91_AIC5_SSR,
-                                      bit & AT91_AIC5_INTSEL_MSK);
-                       at91_aic_write(AT91_AIC5_IECR, 1);
-               }
-       } else {
-               at91_aic_write(AT91_AIC_IDCR, *backups);
-               at91_aic_write(AT91_AIC_IECR, *wakeups);
-       }
+       at91_aic_write(AT91_AIC_IDCR, *backups);
+       at91_aic_write(AT91_AIC_IECR, *wakeups);
 }
 
 void at91_irq_resume(void)
 {
-       int bit = -1;
-
-       if (has_aic5()) {
-               /* disable wakeup irqs */
-               while ((bit = find_next_bit(wakeups, n_irqs, bit + 1)) < n_irqs) {
-                       at91_aic_write(AT91_AIC5_SSR,
-                                      bit & AT91_AIC5_INTSEL_MSK);
-                       at91_aic_write(AT91_AIC5_IDCR, 1);
-               }
-               /* enable irqs disabled for suspend */
-               bit = -1;
-               while ((bit = find_next_bit(backups, n_irqs, bit + 1)) < n_irqs) {
-                       at91_aic_write(AT91_AIC5_SSR,
-                                      bit & AT91_AIC5_INTSEL_MSK);
-                       at91_aic_write(AT91_AIC5_IECR, 1);
-               }
-       } else {
-               at91_aic_write(AT91_AIC_IDCR, *wakeups);
-               at91_aic_write(AT91_AIC_IECR, *backups);
-       }
+       at91_aic_write(AT91_AIC_IDCR, *wakeups);
+       at91_aic_write(AT91_AIC_IECR, *backups);
 }
 
 #else
@@ -169,21 +128,6 @@ at91_aic_handle_irq(struct pt_regs *regs)
                handle_IRQ(irqnr, regs);
 }
 
-asmlinkage void __exception_irq_entry
-at91_aic5_handle_irq(struct pt_regs *regs)
-{
-       u32 irqnr;
-       u32 irqstat;
-
-       irqnr = at91_aic_read(AT91_AIC5_IVR);
-       irqstat = at91_aic_read(AT91_AIC5_ISR);
-
-       if (!irqstat)
-               at91_aic_write(AT91_AIC5_EOICR, 0);
-       else
-               handle_IRQ(irqnr, regs);
-}
-
 static void at91_aic_mask_irq(struct irq_data *d)
 {
        /* Disable interrupt on AIC */
@@ -192,15 +136,6 @@ static void at91_aic_mask_irq(struct irq_data *d)
        clear_backup(d->hwirq);
 }
 
-static void __maybe_unused at91_aic5_mask_irq(struct irq_data *d)
-{
-       /* Disable interrupt on AIC5 */
-       at91_aic_write(AT91_AIC5_SSR, d->hwirq & AT91_AIC5_INTSEL_MSK);
-       at91_aic_write(AT91_AIC5_IDCR, 1);
-       /* Update ISR cache */
-       clear_backup(d->hwirq);
-}
-
 static void at91_aic_unmask_irq(struct irq_data *d)
 {
        /* Enable interrupt on AIC */
@@ -209,15 +144,6 @@ static void at91_aic_unmask_irq(struct irq_data *d)
        set_backup(d->hwirq);
 }
 
-static void __maybe_unused at91_aic5_unmask_irq(struct irq_data *d)
-{
-       /* Enable interrupt on AIC5 */
-       at91_aic_write(AT91_AIC5_SSR, d->hwirq & AT91_AIC5_INTSEL_MSK);
-       at91_aic_write(AT91_AIC5_IECR, 1);
-       /* Update ISR cache */
-       set_backup(d->hwirq);
-}
-
 static void at91_aic_eoi(struct irq_data *d)
 {
        /*
@@ -227,11 +153,6 @@ static void at91_aic_eoi(struct irq_data *d)
        at91_aic_write(AT91_AIC_EOICR, 0);
 }
 
-static void __maybe_unused at91_aic5_eoi(struct irq_data *d)
-{
-       at91_aic_write(AT91_AIC5_EOICR, 0);
-}
-
 static unsigned long *at91_extern_irq;
 
 u32 at91_get_extern_irq(void)
@@ -282,16 +203,8 @@ static int at91_aic_set_type(struct irq_data *d, unsigned type)
        if (srctype < 0)
                return srctype;
 
-       if (has_aic5()) {
-               at91_aic_write(AT91_AIC5_SSR,
-                              d->hwirq & AT91_AIC5_INTSEL_MSK);
-               smr = at91_aic_read(AT91_AIC5_SMR) & ~AT91_AIC_SRCTYPE;
-               at91_aic_write(AT91_AIC5_SMR, smr | srctype);
-       } else {
-               smr = at91_aic_read(AT91_AIC_SMR(d->hwirq))
-                     & ~AT91_AIC_SRCTYPE;
-               at91_aic_write(AT91_AIC_SMR(d->hwirq), smr | srctype);
-       }
+       smr = at91_aic_read(AT91_AIC_SMR(d->hwirq)) & ~AT91_AIC_SRCTYPE;
+       at91_aic_write(AT91_AIC_SMR(d->hwirq), smr | srctype);
 
        return 0;
 }
@@ -331,177 +244,6 @@ static void __init at91_aic_hw_init(unsigned int spu_vector)
        at91_aic_write(AT91_AIC_ICCR, 0xFFFFFFFF);
 }
 
-static void __init __maybe_unused at91_aic5_hw_init(unsigned int spu_vector)
-{
-       int i;
-
-       /*
-        * Perform 8 End Of Interrupt Command to make sure AIC
-        * will not Lock out nIRQ
-        */
-       for (i = 0; i < 8; i++)
-               at91_aic_write(AT91_AIC5_EOICR, 0);
-
-       /*
-        * Spurious Interrupt ID in Spurious Vector Register.
-        * When there is no current interrupt, the IRQ Vector Register
-        * reads the value stored in AIC_SPU
-        */
-       at91_aic_write(AT91_AIC5_SPU, spu_vector);
-
-       /* No debugging in AIC: Debug (Protect) Control Register */
-       at91_aic_write(AT91_AIC5_DCR, 0);
-
-       /* Disable and clear all interrupts initially */
-       for (i = 0; i < n_irqs; i++) {
-               at91_aic_write(AT91_AIC5_SSR, i & AT91_AIC5_INTSEL_MSK);
-               at91_aic_write(AT91_AIC5_IDCR, 1);
-               at91_aic_write(AT91_AIC5_ICCR, 1);
-       }
-}
-
-#if defined(CONFIG_OF)
-static unsigned int *at91_aic_irq_priorities;
-
-static int at91_aic_irq_map(struct irq_domain *h, unsigned int virq,
-                                                       irq_hw_number_t hw)
-{
-       /* Put virq number in Source Vector Register */
-       at91_aic_write(AT91_AIC_SVR(hw), virq);
-
-       /* Active Low interrupt, with priority */
-       at91_aic_write(AT91_AIC_SMR(hw),
-                      AT91_AIC_SRCTYPE_LOW | at91_aic_irq_priorities[hw]);
-
-       irq_set_chip_and_handler(virq, &at91_aic_chip, handle_fasteoi_irq);
-       set_irq_flags(virq, IRQF_VALID | IRQF_PROBE);
-
-       return 0;
-}
-
-static int at91_aic5_irq_map(struct irq_domain *h, unsigned int virq,
-               irq_hw_number_t hw)
-{
-       at91_aic_write(AT91_AIC5_SSR, hw & AT91_AIC5_INTSEL_MSK);
-
-       /* Put virq number in Source Vector Register */
-       at91_aic_write(AT91_AIC5_SVR, virq);
-
-       /* Active Low interrupt, with priority */
-       at91_aic_write(AT91_AIC5_SMR,
-                      AT91_AIC_SRCTYPE_LOW | at91_aic_irq_priorities[hw]);
-
-       irq_set_chip_and_handler(virq, &at91_aic_chip, handle_fasteoi_irq);
-       set_irq_flags(virq, IRQF_VALID | IRQF_PROBE);
-
-       return 0;
-}
-
-static int at91_aic_irq_domain_xlate(struct irq_domain *d, struct device_node *ctrlr,
-                               const u32 *intspec, unsigned int intsize,
-                               irq_hw_number_t *out_hwirq, unsigned int *out_type)
-{
-       if (WARN_ON(intsize < 3))
-               return -EINVAL;
-       if (WARN_ON(intspec[0] >= n_irqs))
-               return -EINVAL;
-       if (WARN_ON((intspec[2] < AT91_AIC_IRQ_MIN_PRIORITY)
-                   || (intspec[2] > AT91_AIC_IRQ_MAX_PRIORITY)))
-               return -EINVAL;
-
-       *out_hwirq = intspec[0];
-       *out_type = intspec[1] & IRQ_TYPE_SENSE_MASK;
-       at91_aic_irq_priorities[*out_hwirq] = intspec[2];
-
-       return 0;
-}
-
-static struct irq_domain_ops at91_aic_irq_ops = {
-       .map    = at91_aic_irq_map,
-       .xlate  = at91_aic_irq_domain_xlate,
-};
-
-int __init at91_aic_of_common_init(struct device_node *node,
-                                   struct device_node *parent)
-{
-       struct property *prop;
-       const __be32 *p;
-       u32 val;
-
-       at91_extern_irq = kzalloc(BITS_TO_LONGS(n_irqs)
-                                 * sizeof(*at91_extern_irq), GFP_KERNEL);
-       if (!at91_extern_irq)
-               return -ENOMEM;
-
-       if (at91_aic_pm_init()) {
-               kfree(at91_extern_irq);
-               return -ENOMEM;
-       }
-
-       at91_aic_irq_priorities = kzalloc(n_irqs
-                                         * sizeof(*at91_aic_irq_priorities),
-                                         GFP_KERNEL);
-       if (!at91_aic_irq_priorities)
-               return -ENOMEM;
-
-       at91_aic_base = of_iomap(node, 0);
-       at91_aic_np = node;
-
-       at91_aic_domain = irq_domain_add_linear(at91_aic_np, n_irqs,
-                                               &at91_aic_irq_ops, NULL);
-       if (!at91_aic_domain)
-               panic("Unable to add AIC irq domain (DT)\n");
-
-       of_property_for_each_u32(node, "atmel,external-irqs", prop, p, val) {
-               if (val >= n_irqs)
-                       pr_warn("AIC: external irq %d >= %d skip it\n",
-                               val, n_irqs);
-               else
-                       set_bit(val, at91_extern_irq);
-       }
-
-       irq_set_default_host(at91_aic_domain);
-
-       return 0;
-}
-
-int __init at91_aic_of_init(struct device_node *node,
-                                    struct device_node *parent)
-{
-       int err;
-
-       err = at91_aic_of_common_init(node, parent);
-       if (err)
-               return err;
-
-       at91_aic_hw_init(n_irqs);
-
-       return 0;
-}
-
-int __init at91_aic5_of_init(struct device_node *node,
-                                    struct device_node *parent)
-{
-       int err;
-
-       at91_aic_caps |= AT91_AIC_CAP_AIC5;
-       n_irqs = NR_AIC5_IRQS;
-       at91_aic_chip.irq_ack           = at91_aic5_mask_irq;
-       at91_aic_chip.irq_mask          = at91_aic5_mask_irq;
-       at91_aic_chip.irq_unmask        = at91_aic5_unmask_irq;
-       at91_aic_chip.irq_eoi           = at91_aic5_eoi;
-       at91_aic_irq_ops.map            = at91_aic5_irq_map;
-
-       err = at91_aic_of_common_init(node, parent);
-       if (err)
-               return err;
-
-       at91_aic5_hw_init(n_irqs);
-
-       return 0;
-}
-#endif
-
 /*
  * Initialize the AIC interrupt controller.
  */
index e95554532987e431ae509d47aa8f4f0dc70833e6..5920373809c52dd5195200e99171f16ce1647bcb 100644 (file)
@@ -206,16 +206,19 @@ static int at91_pm_enter(suspend_state_t state)
                at91_pinctrl_gpio_suspend();
        else
                at91_gpio_suspend();
-       at91_irq_suspend();
 
-       pr_debug("AT91: PM - wake mask %08x, pm state %d\n",
-                       /* remember all the always-wake irqs */
-                       (at91_pmc_read(AT91_PMC_PCSR)
-                                       | (1 << AT91_ID_FIQ)
-                                       | (1 << AT91_ID_SYS)
-                                       | (at91_get_extern_irq()))
-                               & at91_aic_read(AT91_AIC_IMR),
-                       state);
+       if (IS_ENABLED(CONFIG_OLD_IRQ_AT91) && at91_aic_base) {
+               at91_irq_suspend();
+
+               pr_debug("AT91: PM - wake mask %08x, pm state %d\n",
+                               /* remember all the always-wake irqs */
+                               (at91_pmc_read(AT91_PMC_PCSR)
+                                               | (1 << AT91_ID_FIQ)
+                                               | (1 << AT91_ID_SYS)
+                                               | (at91_get_extern_irq()))
+                                       & at91_aic_read(AT91_AIC_IMR),
+                               state);
+       }
 
        switch (state) {
                /*
@@ -280,12 +283,17 @@ static int at91_pm_enter(suspend_state_t state)
                        goto error;
        }
 
-       pr_debug("AT91: PM - wakeup %08x\n",
-                       at91_aic_read(AT91_AIC_IPR) & at91_aic_read(AT91_AIC_IMR));
+       if (IS_ENABLED(CONFIG_OLD_IRQ_AT91) && at91_aic_base)
+               pr_debug("AT91: PM - wakeup %08x\n",
+                        at91_aic_read(AT91_AIC_IPR) &
+                        at91_aic_read(AT91_AIC_IMR));
 
 error:
        target_state = PM_SUSPEND_ON;
-       at91_irq_resume();
+
+       if (IS_ENABLED(CONFIG_OLD_IRQ_AT91) && at91_aic_base)
+               at91_irq_resume();
+
        if (of_have_populated_dt())
                at91_pinctrl_gpio_resume();
        else
index f7a07a58ebb6aa10da5f9aae0dac80bd745d1e15..0bf893a574f984ec7844eb0626e9ed90dee389ce 100644 (file)
@@ -49,7 +49,8 @@ void __init at91_init_irq_default(void)
 void __init at91_init_interrupts(unsigned int *priority)
 {
        /* Initialize the AIC interrupt controller */
-       at91_aic_init(priority, at91_boot_soc.extern_irq);
+       if (IS_ENABLED(CONFIG_OLD_IRQ_AT91))
+               at91_aic_init(priority, at91_boot_soc.extern_irq);
 
        /* Enable GPIO interrupts */
        at91_gpio_irq_setup();
index 2a6323b157824410fa6f6d165d7f81724c999f90..671acc5a32823c0caed2bce69cce25dc6b98000c 100644 (file)
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-#include <linux/io.h>
+
 #include <linux/init.h>
 #include <linux/sizes.h>
-#include <linux/interrupt.h>
-#include <linux/irq.h>
-#include <linux/clk.h>
-#include <linux/clkdev.h>
-#include <linux/clockchips.h>
-#include <linux/clocksource.h>
-#include <linux/clk-provider.h>
-#include <linux/sched_clock.h>
 
 #include <asm/mach/map.h>
-#include <asm/mach/time.h>
 #include <asm/system_misc.h>
 
 #include <mach/hardware.h>
 
 #include "common.h"
 
-static struct clk *clk_pll, *clk_bus, *clk_uart, *clk_timerl, *clk_timerh,
-                 *clk_tint, *clk_spi;
-
 /*
  * This maps the generic CLPS711x registers
  */
@@ -64,129 +52,11 @@ void __init clps711x_init_irq(void)
        clps711x_intc_init(CLPS711X_PHYS_BASE, SZ_16K);
 }
 
-static u64 notrace clps711x_sched_clock_read(void)
-{
-       return ~readw_relaxed(CLPS711X_VIRT_BASE + TC1D);
-}
-
-static void clps711x_clockevent_set_mode(enum clock_event_mode mode,
-                                        struct clock_event_device *evt)
-{
-       disable_irq(IRQ_TC2OI);
-
-       switch (mode) {
-       case CLOCK_EVT_MODE_PERIODIC:
-               enable_irq(IRQ_TC2OI);
-               break;
-       case CLOCK_EVT_MODE_ONESHOT:
-               /* Not supported */
-       case CLOCK_EVT_MODE_SHUTDOWN:
-       case CLOCK_EVT_MODE_UNUSED:
-       case CLOCK_EVT_MODE_RESUME:
-               /* Left event sources disabled, no more interrupts appear */
-               break;
-       }
-}
-
-static struct clock_event_device clockevent_clps711x = {
-       .name           = "clps711x-clockevent",
-       .rating         = 300,
-       .features       = CLOCK_EVT_FEAT_PERIODIC,
-       .set_mode       = clps711x_clockevent_set_mode,
-};
-
-static irqreturn_t clps711x_timer_interrupt(int irq, void *dev_id)
-{
-       clockevent_clps711x.event_handler(&clockevent_clps711x);
-
-       return IRQ_HANDLED;
-}
-
-static struct irqaction clps711x_timer_irq = {
-       .name           = "clps711x-timer",
-       .flags          = IRQF_TIMER | IRQF_IRQPOLL,
-       .handler        = clps711x_timer_interrupt,
-};
-
-static void add_fixed_clk(struct clk *clk, const char *name, int rate)
-{
-       clk = clk_register_fixed_rate(NULL, name, NULL, CLK_IS_ROOT, rate);
-       clk_register_clkdev(clk, name, NULL);
-}
-
 void __init clps711x_timer_init(void)
 {
-       int osc, ext, pll, cpu, bus, timl, timh, uart, spi;
-       u32 tmp;
-
-       osc = 3686400;
-       ext = 13000000;
-
-       tmp = clps_readl(PLLR) >> 24;
-       if (tmp)
-               pll = (osc * tmp) / 2;
-       else
-               pll = 73728000; /* Default value */
-
-       tmp = clps_readl(SYSFLG2);
-       if (tmp & SYSFLG2_CKMODE) {
-               cpu = ext;
-               bus = cpu;
-               spi = 135400;
-               pll = 0;
-       } else {
-               cpu = pll;
-               if (cpu >= 36864000)
-                       bus = cpu / 2;
-               else
-                       bus = 36864000 / 2;
-               spi = cpu / 576;
-       }
-
-       uart = bus / 10;
-
-       if (tmp & SYSFLG2_CKMODE) {
-               tmp = clps_readl(SYSCON2);
-               if (tmp & SYSCON2_OSTB)
-                       timh = ext / 26;
-               else
-                       timh = 541440;
-       } else
-               timh = DIV_ROUND_CLOSEST(cpu, 144);
-
-       timl = DIV_ROUND_CLOSEST(timh, 256);
-
-       /* All clocks are fixed */
-       add_fixed_clk(clk_pll, "pll", pll);
-       add_fixed_clk(clk_bus, "bus", bus);
-       add_fixed_clk(clk_uart, "uart", uart);
-       add_fixed_clk(clk_timerl, "timer_lf", timl);
-       add_fixed_clk(clk_timerh, "timer_hf", timh);
-       add_fixed_clk(clk_tint, "tint", 64);
-       add_fixed_clk(clk_spi, "spi", spi);
-
-       pr_info("CPU frequency set at %i Hz.\n", cpu);
-
-       /* Start Timer1 in free running mode (Low frequency) */
-       tmp = clps_readl(SYSCON1) & ~(SYSCON1_TC1S | SYSCON1_TC1M);
-       clps_writel(tmp, SYSCON1);
-
-       sched_clock_register(clps711x_sched_clock_read, 16, timl);
-
-       clocksource_mmio_init(CLPS711X_VIRT_BASE + TC1D,
-                             "clps711x_clocksource", timl, 300, 16,
-                             clocksource_mmio_readw_down);
-
-       /* Set Timer2 prescaler */
-       clps_writew(DIV_ROUND_CLOSEST(timh, HZ), TC2D);
-
-       /* Start Timer2 in prescale mode (High frequency)*/
-       tmp = clps_readl(SYSCON1) | SYSCON1_TC2M | SYSCON1_TC2S;
-       clps_writel(tmp, SYSCON1);
-
-       clockevents_config_and_register(&clockevent_clps711x, timh, 0, 0);
-
-       setup_irq(IRQ_TC2OI, &clps711x_timer_irq);
+       clps711x_clk_init(CLPS711X_VIRT_BASE);
+       clps711x_clksrc_init(CLPS711X_VIRT_BASE + TC1D,
+                            CLPS711X_VIRT_BASE + TC2D, IRQ_TC2OI);
 }
 
 void clps711x_restart(enum reboot_mode mode, const char *cmd)
index f8818996389840c3ae952b9b2743e83cd109f8f0..370200b263339dc1d9f3d806fc62b9fb33fe06a2 100644 (file)
@@ -16,3 +16,8 @@ extern void clps711x_restart(enum reboot_mode mode, const char *cmd);
 
 /* drivers/irqchip/irq-clps711x.c */
 void clps711x_intc_init(phys_addr_t, resource_size_t);
+/* drivers/clk/clk-clps711x.c */
+void clps711x_clk_init(void __iomem *base);
+/* drivers/clocksource/clps711x-timer.c */
+void clps711x_clksrc_init(void __iomem *tc1_base, void __iomem *tc2_base,
+                         unsigned int irq);
diff --git a/arch/arm/mach-exynos/include/mach/memory.h b/arch/arm/mach-exynos/include/mach/memory.h
deleted file mode 100644 (file)
index e19df1f..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
- *             http://www.samsung.com
- *
- * EXYNOS4 - Memory definitions
- *
- * This program 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 __ASM_ARCH_MEMORY_H
-#define __ASM_ARCH_MEMORY_H __FILE__
-
-#define PLAT_PHYS_OFFSET               UL(0x40000000)
-
-#ifndef CONFIG_ARM_LPAE
-/* Maximum of 256MiB in one bank */
-#define MAX_PHYSMEM_BITS       32
-#define SECTION_SIZE_BITS      28
-#else
-#define MAX_PHYSMEM_BITS       36
-#define SECTION_SIZE_BITS      31
-#endif
-
-#endif /* __ASM_ARCH_MEMORY_H */
index a9f1cf759949c3a8bde14405ea47ce996f3e3408..41ae28d69e6f7e2012fe86d006e6d8151f26927d 100644 (file)
@@ -224,7 +224,7 @@ static int exynos_boot_secondary(unsigned int cpu, struct task_struct *idle)
                                ret = PTR_ERR(boot_reg);
                                goto fail;
                        }
-                       __raw_writel(boot_addr, cpu_boot_reg(core_id));
+                       __raw_writel(boot_addr, boot_reg);
                }
 
                call_firmware_op(cpu_boot, core_id);
@@ -313,7 +313,7 @@ static void __init exynos_smp_prepare_cpus(unsigned int max_cpus)
 
                        if (IS_ERR(boot_reg))
                                break;
-                       __raw_writel(boot_addr, cpu_boot_reg(core_id));
+                       __raw_writel(boot_addr, boot_reg);
                }
        }
 }
index be9a51afe05a02ff374f6c4d73db362907fa49ea..4e9b4f63d42b275daf245b26ac752623684a8d8a 100644 (file)
@@ -108,17 +108,6 @@ config SOC_IMX35
 if ARCH_MULTI_V4T
 
 comment "MX1 platforms:"
-config MACH_MXLADS
-       bool
-
-config ARCH_MX1ADS
-       bool "MX1ADS platform"
-       select IMX_HAVE_PLATFORM_IMX_I2C
-       select IMX_HAVE_PLATFORM_IMX_UART
-       select MACH_MXLADS
-       select SOC_IMX1
-       help
-         Say Y here if you are using Motorola MX1ADS/MXLADS boards
 
 config MACH_SCB9328
        bool "Synertronixx scb9328"
@@ -223,86 +212,6 @@ config MACH_MX27ADS
          Include support for MX27ADS platform. This includes specific
          configurations for the board and its peripherals.
 
-config MACH_PCM038
-       bool "Phytec phyCORE-i.MX27 CPU module (pcm038)"
-       select IMX_HAVE_PLATFORM_IMX2_WDT
-       select IMX_HAVE_PLATFORM_IMX_I2C
-       select IMX_HAVE_PLATFORM_IMX_UART
-       select IMX_HAVE_PLATFORM_MXC_EHCI
-       select IMX_HAVE_PLATFORM_MXC_NAND
-       select IMX_HAVE_PLATFORM_MXC_W1
-       select IMX_HAVE_PLATFORM_SPI_IMX
-       select USB_ULPI_VIEWPORT if USB_ULPI
-       select SOC_IMX27
-       help
-         Include support for phyCORE-i.MX27 (aka pcm038) platform. This
-         includes specific configurations for the module and its peripherals.
-
-choice
-       prompt "Baseboard"
-       depends on MACH_PCM038
-       default MACH_PCM970_BASEBOARD
-
-config MACH_PCM970_BASEBOARD
-       bool "PHYTEC PCM970 development board"
-       select IMX_HAVE_PLATFORM_IMX_FB
-       select IMX_HAVE_PLATFORM_MXC_MMC
-       help
-         This adds board specific devices that can be found on Phytec's
-         PCM970 evaluation board.
-
-endchoice
-
-config MACH_CPUIMX27
-       bool "Eukrea CPUIMX27 module"
-       select IMX_HAVE_PLATFORM_FSL_USB2_UDC
-       select IMX_HAVE_PLATFORM_IMX2_WDT
-       select IMX_HAVE_PLATFORM_IMX_I2C
-       select IMX_HAVE_PLATFORM_IMX_UART
-       select IMX_HAVE_PLATFORM_MXC_EHCI
-       select IMX_HAVE_PLATFORM_MXC_NAND
-       select IMX_HAVE_PLATFORM_MXC_W1
-       select USB_ULPI_VIEWPORT if USB_ULPI
-       select SOC_IMX27
-       help
-         Include support for Eukrea CPUIMX27 platform. This includes
-         specific configurations for the module and its peripherals.
-
-config MACH_EUKREA_CPUIMX27_USESDHC2
-       bool "CPUIMX27 integrates SDHC2 module"
-       depends on MACH_CPUIMX27
-       select IMX_HAVE_PLATFORM_MXC_MMC
-       help
-         This adds support for the internal SDHC2 used on CPUIMX27
-         for wifi or eMMC.
-
-config MACH_EUKREA_CPUIMX27_USEUART4
-       bool "CPUIMX27 integrates UART4 module"
-       depends on MACH_CPUIMX27
-       help
-         This adds support for the internal UART4 used on CPUIMX27
-         for bluetooth.
-
-choice
-       prompt "Baseboard"
-       depends on MACH_CPUIMX27
-       default MACH_EUKREA_MBIMX27_BASEBOARD
-
-config MACH_EUKREA_MBIMX27_BASEBOARD
-       bool "Eukrea MBIMX27 development board"
-       select IMX_HAVE_PLATFORM_IMX_FB
-       select IMX_HAVE_PLATFORM_IMX_KEYPAD
-       select IMX_HAVE_PLATFORM_IMX_SSI
-       select IMX_HAVE_PLATFORM_IMX_UART
-       select IMX_HAVE_PLATFORM_MXC_MMC
-       select IMX_HAVE_PLATFORM_SPI_IMX
-       select LEDS_GPIO_REGISTER
-       help
-         This adds board specific devices that can be found on Eukrea's
-         MBIMX27 evaluation board.
-
-endchoice
-
 config MACH_MX27_3DS
        bool "MX27PDK platform"
        select IMX_HAVE_PLATFORM_FSL_USB2_UDC
@@ -359,18 +268,6 @@ config MACH_PCA100
          Include support for phyCARD-s (aka pca100) platform. This
          includes specific configurations for the module and its peripherals.
 
-config MACH_MXT_TD60
-       bool "Maxtrack i-MXT TD60"
-       select IMX_HAVE_PLATFORM_IMX_FB
-       select IMX_HAVE_PLATFORM_IMX_I2C
-       select IMX_HAVE_PLATFORM_IMX_UART
-       select IMX_HAVE_PLATFORM_MXC_MMC
-       select IMX_HAVE_PLATFORM_MXC_NAND
-       select SOC_IMX27
-       help
-         Include support for i-MXT (aka td60) platform. This
-         includes specific configurations for the module and its peripherals.
-
 config MACH_IMX27_DT
        bool "Support i.MX27 platforms from device tree"
        select SOC_IMX27
index 23c02932bf843e1c4862f7c18b16b49f4a0d4551..4147729775d23ff4fa986a4f8db7f8cabeab51bf 100644 (file)
@@ -41,7 +41,6 @@ obj-y += ssi-fiq-ksym.o
 endif
 
 # i.MX1 based machines
-obj-$(CONFIG_ARCH_MX1ADS) += mach-mx1ads.o
 obj-$(CONFIG_MACH_SCB9328) += mach-scb9328.o
 obj-$(CONFIG_MACH_APF9328) += mach-apf9328.o
 
@@ -56,14 +55,9 @@ obj-$(CONFIG_MACH_IMX25_DT) += imx25-dt.o
 
 # i.MX27 based machines
 obj-$(CONFIG_MACH_MX27ADS) += mach-mx27ads.o
-obj-$(CONFIG_MACH_PCM038) += mach-pcm038.o
-obj-$(CONFIG_MACH_PCM970_BASEBOARD) += pcm970-baseboard.o
 obj-$(CONFIG_MACH_MX27_3DS) += mach-mx27_3ds.o
 obj-$(CONFIG_MACH_IMX27_VISSTRIM_M10) += mach-imx27_visstrim_m10.o
-obj-$(CONFIG_MACH_CPUIMX27) += mach-cpuimx27.o
-obj-$(CONFIG_MACH_EUKREA_MBIMX27_BASEBOARD) += eukrea_mbimx27-baseboard.o
 obj-$(CONFIG_MACH_PCA100) += mach-pca100.o
-obj-$(CONFIG_MACH_MXT_TD60) += mach-mxt_td60.o
 obj-$(CONFIG_MACH_IMX27_DT) += imx27-dt.o
 
 # i.MX31 based machines
diff --git a/arch/arm/mach-imx/board-pcm038.h b/arch/arm/mach-imx/board-pcm038.h
deleted file mode 100644 (file)
index 6f371e3..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2008 Juergen Beisert (kernel@pengutronix.de)
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-
-#ifndef __ASM_ARCH_MXC_BOARD_PCM038_H__
-#define __ASM_ARCH_MXC_BOARD_PCM038_H__
-
-#ifndef __ASSEMBLY__
-/*
- * This CPU module needs a baseboard to work. After basic initializing
- * its own devices, it calls the baseboard's init function.
- * TODO: Add your own baseboard init function and call it from
- * inside pcm038_init().
- *
- * This example here is for the development board. Refer pcm970-baseboard.c
- */
-
-extern void pcm970_baseboard_init(void);
-
-#endif
-
-#endif /* __ASM_ARCH_MXC_BOARD_PCM038_H__ */
index 22ba8973bcb957a341c7c35f805e959b44137b96..1dabf435c592220f1929c4495ad39101392079a7 100644 (file)
@@ -98,11 +98,9 @@ void imx_set_cpu_arg(int cpu, u32 arg);
 void v7_secondary_startup(void);
 void imx_scu_map_io(void);
 void imx_smp_prepare(void);
-void imx_scu_standby_enable(void);
 #else
 static inline void imx_scu_map_io(void) {}
 static inline void imx_smp_prepare(void) {}
-static inline void imx_scu_standby_enable(void) {}
 #endif
 void imx_src_init(void);
 void imx_gpc_init(void);
index 10844d3bb926bcb5edec39e719c02355360d79e4..aa935787b74354fe1be5d35d6a9a6900effb8560 100644 (file)
@@ -66,10 +66,6 @@ static struct cpuidle_driver imx6q_cpuidle_driver = {
 
 int __init imx6q_cpuidle_init(void)
 {
-       /* Need to enable SCU standby for entering WAIT modes */
-       if (!cpu_is_imx6sx())
-               imx_scu_standby_enable();
-
        /* Set INT_MEM_CLK_LPM bit to get a reliable WAIT mode support */
        imx6q_set_int_mem_clk_lpm(true);
 
index a21d3313f9942eeb5233e74490d2f68c78ae1b4b..bb2c90d6591470ac12be2d11104adf33a35bd3a1 100644 (file)
  * This CPU module needs a baseboard to work. After basic initializing
  * its own devices, it calls baseboard's init function.
  * TODO: Add your own baseboard init function and call it from
- * inside eukrea_cpuimx25_init() eukrea_cpuimx27_init()
- * eukrea_cpuimx35_init() eukrea_cpuimx51_init()
- * or eukrea_cpuimx51sd_init().
+ * inside eukrea_cpuimx25_init() or eukrea_cpuimx35_init()
  *
  * This example here is for the development board. Refer
  * mach-mx25/eukrea_mbimxsd-baseboard.c for cpuimx25
- * mach-imx/eukrea_mbimx27-baseboard.c for cpuimx27
  * mach-mx3/eukrea_mbimxsd-baseboard.c for cpuimx35
- * mach-mx5/eukrea_mbimx51-baseboard.c for cpuimx51
- * mach-mx5/eukrea_mbimxsd-baseboard.c for cpuimx51sd
  */
 
 extern void eukrea_mbimxsd25_baseboard_init(void);
-extern void eukrea_mbimx27_baseboard_init(void);
 extern void eukrea_mbimxsd35_baseboard_init(void);
-extern void eukrea_mbimx51_baseboard_init(void);
-extern void eukrea_mbimxsd51_baseboard_init(void);
 
 #endif
 
diff --git a/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c b/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c
deleted file mode 100644 (file)
index b2f08bf..0000000
+++ /dev/null
@@ -1,351 +0,0 @@
-/*
- * Copyright (C) 2009-2010 Eric Benard - eric@eukrea.com
- *
- * Based on pcm970-baseboard.c which is :
- * Copyright (C) 2008 Juergen Beisert (kernel@pengutronix.de)
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-
-#include <linux/gpio.h>
-#include <linux/irq.h>
-#include <linux/platform_device.h>
-#include <linux/spi/spi.h>
-#include <linux/spi/ads7846.h>
-#include <linux/backlight.h>
-#include <video/platform_lcd.h>
-
-#include <asm/mach/arch.h>
-
-#include "common.h"
-#include "devices-imx27.h"
-#include "hardware.h"
-#include "iomux-mx27.h"
-
-static const int eukrea_mbimx27_pins[] __initconst = {
-       /* UART2 */
-       PE3_PF_UART2_CTS,
-       PE4_PF_UART2_RTS,
-       PE6_PF_UART2_TXD,
-       PE7_PF_UART2_RXD,
-       /* UART3 */
-       PE8_PF_UART3_TXD,
-       PE9_PF_UART3_RXD,
-       PE10_PF_UART3_CTS,
-       PE11_PF_UART3_RTS,
-       /* UART4 */
-#if !defined(CONFIG_MACH_EUKREA_CPUIMX27_USEUART4)
-       PB26_AF_UART4_RTS,
-       PB28_AF_UART4_TXD,
-       PB29_AF_UART4_CTS,
-       PB31_AF_UART4_RXD,
-#endif
-       /* SDHC1*/
-       PE18_PF_SD1_D0,
-       PE19_PF_SD1_D1,
-       PE20_PF_SD1_D2,
-       PE21_PF_SD1_D3,
-       PE22_PF_SD1_CMD,
-       PE23_PF_SD1_CLK,
-       /* display */
-       PA5_PF_LSCLK,
-       PA6_PF_LD0,
-       PA7_PF_LD1,
-       PA8_PF_LD2,
-       PA9_PF_LD3,
-       PA10_PF_LD4,
-       PA11_PF_LD5,
-       PA12_PF_LD6,
-       PA13_PF_LD7,
-       PA14_PF_LD8,
-       PA15_PF_LD9,
-       PA16_PF_LD10,
-       PA17_PF_LD11,
-       PA18_PF_LD12,
-       PA19_PF_LD13,
-       PA20_PF_LD14,
-       PA21_PF_LD15,
-       PA22_PF_LD16,
-       PA23_PF_LD17,
-       PA28_PF_HSYNC,
-       PA29_PF_VSYNC,
-       PA30_PF_CONTRAST,
-       PA31_PF_OE_ACD,
-       /* SPI1 */
-       PD29_PF_CSPI1_SCLK,
-       PD30_PF_CSPI1_MISO,
-       PD31_PF_CSPI1_MOSI,
-       /* SSI4 */
-#if defined(CONFIG_SND_SOC_EUKREA_TLV320) \
-       || defined(CONFIG_SND_SOC_EUKREA_TLV320_MODULE)
-       PC16_PF_SSI4_FS,
-       PC17_PF_SSI4_RXD | GPIO_PUEN,
-       PC18_PF_SSI4_TXD | GPIO_PUEN,
-       PC19_PF_SSI4_CLK,
-#endif
-};
-
-static const uint32_t eukrea_mbimx27_keymap[] = {
-       KEY(0, 0, KEY_UP),
-       KEY(0, 1, KEY_DOWN),
-       KEY(1, 0, KEY_RIGHT),
-       KEY(1, 1, KEY_LEFT),
-};
-
-static const struct matrix_keymap_data
-eukrea_mbimx27_keymap_data __initconst = {
-       .keymap         = eukrea_mbimx27_keymap,
-       .keymap_size    = ARRAY_SIZE(eukrea_mbimx27_keymap),
-};
-
-static const struct gpio_led eukrea_mbimx27_gpio_leds[] __initconst = {
-       {
-               .name                   = "led1",
-               .default_trigger        = "heartbeat",
-               .active_low             = 1,
-               .gpio                   = GPIO_PORTF | 16,
-       },
-       {
-               .name                   = "led2",
-               .default_trigger        = "none",
-               .active_low             = 1,
-               .gpio                   = GPIO_PORTF | 19,
-       },
-};
-
-static const struct gpio_led_platform_data
-               eukrea_mbimx27_gpio_led_info __initconst = {
-       .leds           = eukrea_mbimx27_gpio_leds,
-       .num_leds       = ARRAY_SIZE(eukrea_mbimx27_gpio_leds),
-};
-
-static struct imx_fb_videomode eukrea_mbimx27_modes[] = {
-       {
-               .mode = {
-                       .name           = "CMO-QVGA",
-                       .refresh        = 60,
-                       .xres           = 320,
-                       .yres           = 240,
-                       .pixclock       = 156000,
-                       .hsync_len      = 30,
-                       .left_margin    = 38,
-                       .right_margin   = 20,
-                       .vsync_len      = 3,
-                       .upper_margin   = 15,
-                       .lower_margin   = 4,
-               },
-               .pcr            = 0xFAD08B80,
-               .bpp            = 16,
-       }, {
-               .mode = {
-                       .name           = "DVI-VGA",
-                       .refresh        = 60,
-                       .xres           = 640,
-                       .yres           = 480,
-                       .pixclock       = 32000,
-                       .hsync_len      = 1,
-                       .left_margin    = 35,
-                       .right_margin   = 0,
-                       .vsync_len      = 1,
-                       .upper_margin   = 7,
-                       .lower_margin   = 0,
-               },
-               .pcr            = 0xFA208B80,
-               .bpp            = 16,
-       }, {
-               .mode = {
-                       .name           = "DVI-SVGA",
-                       .refresh        = 60,
-                       .xres           = 800,
-                       .yres           = 600,
-                       .pixclock       = 25000,
-                       .hsync_len      = 1,
-                       .left_margin    = 35,
-                       .right_margin   = 0,
-                       .vsync_len      = 1,
-                       .upper_margin   = 7,
-                       .lower_margin   = 0,
-               },
-               .pcr            = 0xFA208B80,
-               .bpp            = 16,
-       },
-};
-
-static const struct imx_fb_platform_data eukrea_mbimx27_fb_data __initconst = {
-       .mode = eukrea_mbimx27_modes,
-       .num_modes = ARRAY_SIZE(eukrea_mbimx27_modes),
-
-       .pwmr           = 0x00A903FF,
-       .lscr1          = 0x00120300,
-       .dmacr          = 0x00040060,
-};
-
-static void eukrea_mbimx27_bl_set_intensity(int intensity)
-{
-       if (intensity)
-               gpio_direction_output(GPIO_PORTE | 5, 1);
-       else
-               gpio_direction_output(GPIO_PORTE | 5, 0);
-}
-
-static struct generic_bl_info eukrea_mbimx27_bl_info = {
-       .name                   = "eukrea_mbimx27-bl",
-       .max_intensity          = 0xff,
-       .default_intensity      = 0xff,
-       .set_bl_intensity       = eukrea_mbimx27_bl_set_intensity,
-};
-
-static struct platform_device eukrea_mbimx27_bl_dev = {
-       .name                   = "generic-bl",
-       .id                     = 1,
-       .dev = {
-               .platform_data  = &eukrea_mbimx27_bl_info,
-       },
-};
-
-static void eukrea_mbimx27_lcd_power_set(struct plat_lcd_data *pd,
-                                  unsigned int power)
-{
-       if (power)
-               gpio_direction_output(GPIO_PORTA | 25, 1);
-       else
-               gpio_direction_output(GPIO_PORTA | 25, 0);
-}
-
-static struct plat_lcd_data eukrea_mbimx27_lcd_power_data = {
-       .set_power              = eukrea_mbimx27_lcd_power_set,
-};
-
-static struct platform_device eukrea_mbimx27_lcd_powerdev = {
-       .name                   = "platform-lcd",
-       .dev.platform_data      = &eukrea_mbimx27_lcd_power_data,
-};
-
-static const struct imxuart_platform_data uart_pdata __initconst = {
-       .flags = IMXUART_HAVE_RTSCTS,
-};
-
-#define ADS7846_PENDOWN (GPIO_PORTD | 25)
-
-static void __maybe_unused ads7846_dev_init(void)
-{
-       if (gpio_request(ADS7846_PENDOWN, "ADS7846 pendown") < 0) {
-               printk(KERN_ERR "can't get ads7846 pen down GPIO\n");
-               return;
-       }
-       gpio_direction_input(ADS7846_PENDOWN);
-}
-
-static int ads7846_get_pendown_state(void)
-{
-       return !gpio_get_value(ADS7846_PENDOWN);
-}
-
-static struct ads7846_platform_data ads7846_config __initdata = {
-       .get_pendown_state      = ads7846_get_pendown_state,
-       .keep_vref_on           = 1,
-};
-
-static struct spi_board_info __maybe_unused
-               eukrea_mbimx27_spi_board_info[] __initdata = {
-       [0] = {
-               .modalias       = "ads7846",
-               .bus_num        = 0,
-               .chip_select    = 0,
-               .max_speed_hz   = 1500000,
-               /* irq number is run-time assigned */
-               .platform_data  = &ads7846_config,
-               .mode           = SPI_MODE_2,
-       },
-};
-
-static int eukrea_mbimx27_spi_cs[] = {GPIO_PORTD | 28};
-
-static const struct spi_imx_master eukrea_mbimx27_spi0_data __initconst = {
-       .chipselect     = eukrea_mbimx27_spi_cs,
-       .num_chipselect = ARRAY_SIZE(eukrea_mbimx27_spi_cs),
-};
-
-static struct i2c_board_info eukrea_mbimx27_i2c_devices[] = {
-       {
-               I2C_BOARD_INFO("tlv320aic23", 0x1a),
-       },
-};
-
-static const struct imxmmc_platform_data sdhc_pdata __initconst = {
-       .dat3_card_detect = 1,
-};
-
-static const
-struct imx_ssi_platform_data eukrea_mbimx27_ssi_pdata __initconst = {
-       .flags = IMX_SSI_DMA | IMX_SSI_USE_I2S_SLAVE,
-};
-
-/*
- * system init for baseboard usage. Will be called by cpuimx27 init.
- *
- * Add platform devices present on this baseboard and init
- * them from CPU side as far as required to use them later on
- */
-void __init eukrea_mbimx27_baseboard_init(void)
-{
-       mxc_gpio_setup_multiple_pins(eukrea_mbimx27_pins,
-               ARRAY_SIZE(eukrea_mbimx27_pins), "MBIMX27");
-
-       imx27_add_imx_uart1(&uart_pdata);
-       imx27_add_imx_uart2(&uart_pdata);
-#if !defined(CONFIG_MACH_EUKREA_CPUIMX27_USEUART4)
-       imx27_add_imx_uart3(&uart_pdata);
-#endif
-
-       imx27_add_imx_fb(&eukrea_mbimx27_fb_data);
-       imx27_add_mxc_mmc(0, &sdhc_pdata);
-
-       i2c_register_board_info(0, eukrea_mbimx27_i2c_devices,
-                               ARRAY_SIZE(eukrea_mbimx27_i2c_devices));
-
-       imx27_add_imx_ssi(0, &eukrea_mbimx27_ssi_pdata);
-
-#if defined(CONFIG_TOUCHSCREEN_ADS7846) \
-       || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
-       /* ADS7846 Touchscreen controller init */
-       mxc_gpio_mode(GPIO_PORTD | 25 | GPIO_GPIO | GPIO_IN);
-       ads7846_dev_init();
-#endif
-
-       /* SPI_CS0 init */
-       mxc_gpio_mode(GPIO_PORTD | 28 | GPIO_GPIO | GPIO_OUT);
-       imx27_add_spi_imx0(&eukrea_mbimx27_spi0_data);
-       eukrea_mbimx27_spi_board_info[0].irq = gpio_to_irq(IMX_GPIO_NR(4, 25));
-       spi_register_board_info(eukrea_mbimx27_spi_board_info,
-                       ARRAY_SIZE(eukrea_mbimx27_spi_board_info));
-
-       /* Leds configuration */
-       mxc_gpio_mode(GPIO_PORTF | 16 | GPIO_GPIO | GPIO_OUT);
-       mxc_gpio_mode(GPIO_PORTF | 19 | GPIO_GPIO | GPIO_OUT);
-       /* Backlight */
-       mxc_gpio_mode(GPIO_PORTE | 5 | GPIO_GPIO | GPIO_OUT);
-       gpio_request(GPIO_PORTE | 5, "backlight");
-       platform_device_register(&eukrea_mbimx27_bl_dev);
-       /* LCD Reset */
-       mxc_gpio_mode(GPIO_PORTA | 25 | GPIO_GPIO | GPIO_OUT);
-       gpio_request(GPIO_PORTA | 25, "lcd_enable");
-       platform_device_register(&eukrea_mbimx27_lcd_powerdev);
-
-       imx27_add_imx_keypad(&eukrea_mbimx27_keymap_data);
-
-       gpio_led_register_device(-1, &eukrea_mbimx27_gpio_led_info);
-       imx_add_platform_device("eukrea_tlv320", 0, NULL, 0, NULL, 0);
-}
index 7c66805d2cc0d4a54063f08630232d872824b647..1657fe64cd0fc6a0373ced554d1c4d0b3602b303 100644 (file)
@@ -64,7 +64,6 @@ int mxc_iomux_mode(unsigned int pin_mode)
 
        return ret;
 }
-EXPORT_SYMBOL(mxc_iomux_mode);
 
 /*
  * This function configures the pad value for a IOMUX pin.
@@ -90,7 +89,6 @@ void mxc_iomux_set_pad(enum iomux_pins pin, u32 config)
 
        spin_unlock(&gpio_mux_lock);
 }
-EXPORT_SYMBOL(mxc_iomux_set_pad);
 
 /*
  * allocs a single pin:
@@ -116,7 +114,6 @@ int mxc_iomux_alloc_pin(unsigned int pin, const char *label)
 
        return 0;
 }
-EXPORT_SYMBOL(mxc_iomux_alloc_pin);
 
 int mxc_iomux_setup_multiple_pins(const unsigned int *pin_list, unsigned count,
                const char *label)
@@ -137,7 +134,6 @@ setup_error:
        mxc_iomux_release_multiple_pins(pin_list, i);
        return ret;
 }
-EXPORT_SYMBOL(mxc_iomux_setup_multiple_pins);
 
 void mxc_iomux_release_pin(unsigned int pin)
 {
@@ -146,7 +142,6 @@ void mxc_iomux_release_pin(unsigned int pin)
        if (pad < (PIN_MAX + 1))
                clear_bit(pad, mxc_pin_alloc_map);
 }
-EXPORT_SYMBOL(mxc_iomux_release_pin);
 
 void mxc_iomux_release_multiple_pins(const unsigned int *pin_list, int count)
 {
@@ -158,7 +153,6 @@ void mxc_iomux_release_multiple_pins(const unsigned int *pin_list, int count)
                p++;
        }
 }
-EXPORT_SYMBOL(mxc_iomux_release_multiple_pins);
 
 /*
  * This function enables/disables the general purpose function for a particular
@@ -178,4 +172,3 @@ void mxc_iomux_set_gpr(enum iomux_gp_func gp, bool en)
        __raw_writel(l, IOMUXGPR);
        spin_unlock(&gpio_mux_lock);
 }
-EXPORT_SYMBOL(mxc_iomux_set_gpr);
index 2b156d1d9e216bf2d6b7a5c38064f8c79efb26e5..ecd543664644135084e37d88002ecee88fa2d15a 100644 (file)
@@ -153,7 +153,6 @@ int mxc_gpio_mode(int gpio_mode)
 
        return 0;
 }
-EXPORT_SYMBOL(mxc_gpio_mode);
 
 static int imx_iomuxv1_setup_multiple(const int *list, unsigned count)
 {
@@ -178,7 +177,6 @@ int mxc_gpio_setup_multiple_pins(const int *pin_list, unsigned count,
        ret = imx_iomuxv1_setup_multiple(pin_list, count);
        return ret;
 }
-EXPORT_SYMBOL(mxc_gpio_setup_multiple_pins);
 
 int __init imx_iomuxv1_init(void __iomem *base, int numports)
 {
index 9dae74bf47fcb5d96ad2c900a1fe9fead266bf2d..d61f9606fc56e45c6cc0ecc2a93b20ff94f0e362 100644 (file)
@@ -55,7 +55,6 @@ int mxc_iomux_v3_setup_pad(iomux_v3_cfg_t pad)
 
        return 0;
 }
-EXPORT_SYMBOL(mxc_iomux_v3_setup_pad);
 
 int mxc_iomux_v3_setup_multiple_pads(iomux_v3_cfg_t *pad_list, unsigned count)
 {
@@ -71,7 +70,6 @@ int mxc_iomux_v3_setup_multiple_pads(iomux_v3_cfg_t *pad_list, unsigned count)
        }
        return 0;
 }
-EXPORT_SYMBOL(mxc_iomux_v3_setup_multiple_pads);
 
 void mxc_iomux_v3_init(void __iomem *iomux_v3_base)
 {
diff --git a/arch/arm/mach-imx/mach-cpuimx27.c b/arch/arm/mach-imx/mach-cpuimx27.c
deleted file mode 100644 (file)
index e6d4b99..0000000
+++ /dev/null
@@ -1,321 +0,0 @@
-/*
- * Copyright (C) 2009 Eric Benard - eric@eukrea.com
- *
- * Based on pcm038.c which is :
- * Copyright 2007 Robert Schwebel <r.schwebel@pengutronix.de>, Pengutronix
- * Copyright (C) 2008 Juergen Beisert (kernel@pengutronix.de)
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-
-#include <linux/i2c.h>
-#include <linux/io.h>
-#include <linux/mtd/plat-ram.h>
-#include <linux/mtd/physmap.h>
-#include <linux/platform_device.h>
-#include <linux/serial_8250.h>
-#include <linux/usb/otg.h>
-#include <linux/usb/ulpi.h>
-
-#include <asm/mach-types.h>
-#include <asm/mach/arch.h>
-#include <asm/mach/time.h>
-#include <asm/mach/map.h>
-
-#include "common.h"
-#include "devices-imx27.h"
-#include "ehci.h"
-#include "eukrea-baseboards.h"
-#include "hardware.h"
-#include "iomux-mx27.h"
-#include "ulpi.h"
-
-static const int eukrea_cpuimx27_pins[] __initconst = {
-       /* UART1 */
-       PE12_PF_UART1_TXD,
-       PE13_PF_UART1_RXD,
-       PE14_PF_UART1_CTS,
-       PE15_PF_UART1_RTS,
-       /* UART4 */
-#if defined(CONFIG_MACH_EUKREA_CPUIMX27_USEUART4)
-       PB26_AF_UART4_RTS,
-       PB28_AF_UART4_TXD,
-       PB29_AF_UART4_CTS,
-       PB31_AF_UART4_RXD,
-#endif
-       /* FEC */
-       PD0_AIN_FEC_TXD0,
-       PD1_AIN_FEC_TXD1,
-       PD2_AIN_FEC_TXD2,
-       PD3_AIN_FEC_TXD3,
-       PD4_AOUT_FEC_RX_ER,
-       PD5_AOUT_FEC_RXD1,
-       PD6_AOUT_FEC_RXD2,
-       PD7_AOUT_FEC_RXD3,
-       PD8_AF_FEC_MDIO,
-       PD9_AIN_FEC_MDC,
-       PD10_AOUT_FEC_CRS,
-       PD11_AOUT_FEC_TX_CLK,
-       PD12_AOUT_FEC_RXD0,
-       PD13_AOUT_FEC_RX_DV,
-       PD14_AOUT_FEC_RX_CLK,
-       PD15_AOUT_FEC_COL,
-       PD16_AIN_FEC_TX_ER,
-       PF23_AIN_FEC_TX_EN,
-       /* I2C1 */
-       PD17_PF_I2C_DATA,
-       PD18_PF_I2C_CLK,
-       /* SDHC2 */
-#if defined(CONFIG_MACH_EUKREA_CPUIMX27_USESDHC2)
-       PB4_PF_SD2_D0,
-       PB5_PF_SD2_D1,
-       PB6_PF_SD2_D2,
-       PB7_PF_SD2_D3,
-       PB8_PF_SD2_CMD,
-       PB9_PF_SD2_CLK,
-#endif
-#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE)
-       /* Quad UART's IRQ */
-       GPIO_PORTB | 22 | GPIO_GPIO | GPIO_IN,
-       GPIO_PORTB | 23 | GPIO_GPIO | GPIO_IN,
-       GPIO_PORTB | 27 | GPIO_GPIO | GPIO_IN,
-       GPIO_PORTB | 30 | GPIO_GPIO | GPIO_IN,
-#endif
-       /* OTG */
-       PC7_PF_USBOTG_DATA5,
-       PC8_PF_USBOTG_DATA6,
-       PC9_PF_USBOTG_DATA0,
-       PC10_PF_USBOTG_DATA2,
-       PC11_PF_USBOTG_DATA1,
-       PC12_PF_USBOTG_DATA4,
-       PC13_PF_USBOTG_DATA3,
-       PE0_PF_USBOTG_NXT,
-       PE1_PF_USBOTG_STP,
-       PE2_PF_USBOTG_DIR,
-       PE24_PF_USBOTG_CLK,
-       PE25_PF_USBOTG_DATA7,
-       /* USBH2 */
-       PA0_PF_USBH2_CLK,
-       PA1_PF_USBH2_DIR,
-       PA2_PF_USBH2_DATA7,
-       PA3_PF_USBH2_NXT,
-       PA4_PF_USBH2_STP,
-       PD19_AF_USBH2_DATA4,
-       PD20_AF_USBH2_DATA3,
-       PD21_AF_USBH2_DATA6,
-       PD22_AF_USBH2_DATA0,
-       PD23_AF_USBH2_DATA2,
-       PD24_AF_USBH2_DATA1,
-       PD26_AF_USBH2_DATA5,
-};
-
-static struct physmap_flash_data eukrea_cpuimx27_flash_data = {
-       .width = 2,
-};
-
-static struct resource eukrea_cpuimx27_flash_resource = {
-       .start = 0xc0000000,
-       .end   = 0xc3ffffff,
-       .flags = IORESOURCE_MEM,
-};
-
-static struct platform_device eukrea_cpuimx27_nor_mtd_device = {
-       .name = "physmap-flash",
-       .id = 0,
-       .dev = {
-               .platform_data = &eukrea_cpuimx27_flash_data,
-       },
-       .num_resources = 1,
-       .resource = &eukrea_cpuimx27_flash_resource,
-};
-
-static const struct imxuart_platform_data uart_pdata __initconst = {
-       .flags = IMXUART_HAVE_RTSCTS,
-};
-
-static const struct mxc_nand_platform_data
-cpuimx27_nand_board_info __initconst = {
-       .width = 1,
-       .hw_ecc = 1,
-};
-
-static struct platform_device *platform_devices[] __initdata = {
-       &eukrea_cpuimx27_nor_mtd_device,
-};
-
-static const struct imxi2c_platform_data cpuimx27_i2c1_data __initconst = {
-       .bitrate = 100000,
-};
-
-static struct i2c_board_info eukrea_cpuimx27_i2c_devices[] = {
-       {
-               I2C_BOARD_INFO("pcf8563", 0x51),
-       },
-};
-
-#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE)
-static struct plat_serial8250_port serial_platform_data[] = {
-       {
-               .mapbase = (unsigned long)(MX27_CS3_BASE_ADDR + 0x200000),
-               /* irq number is run-time assigned */
-               .uartclk = 14745600,
-               .regshift = 1,
-               .iotype = UPIO_MEM,
-               .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP,
-       }, {
-               .mapbase = (unsigned long)(MX27_CS3_BASE_ADDR + 0x400000),
-               /* irq number is run-time assigned */
-               .uartclk = 14745600,
-               .regshift = 1,
-               .iotype = UPIO_MEM,
-               .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP,
-       }, {
-               .mapbase = (unsigned long)(MX27_CS3_BASE_ADDR + 0x800000),
-               /* irq number is run-time assigned */
-               .uartclk = 14745600,
-               .regshift = 1,
-               .iotype = UPIO_MEM,
-               .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP,
-       }, {
-               .mapbase = (unsigned long)(MX27_CS3_BASE_ADDR + 0x1000000),
-               /* irq number is run-time assigned */
-               .uartclk = 14745600,
-               .regshift = 1,
-               .iotype = UPIO_MEM,
-               .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP,
-       }, {
-       }
-};
-
-static struct platform_device serial_device = {
-       .name = "serial8250",
-       .id = 0,
-       .dev = {
-               .platform_data = serial_platform_data,
-       },
-};
-#endif
-
-static int eukrea_cpuimx27_otg_init(struct platform_device *pdev)
-{
-       return mx27_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_DIFF_UNI);
-}
-
-static struct mxc_usbh_platform_data otg_pdata __initdata = {
-       .init   = eukrea_cpuimx27_otg_init,
-       .portsc = MXC_EHCI_MODE_ULPI,
-};
-
-static int eukrea_cpuimx27_usbh2_init(struct platform_device *pdev)
-{
-       return mx27_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_DIFF_UNI);
-}
-
-static struct mxc_usbh_platform_data usbh2_pdata __initdata = {
-       .init   = eukrea_cpuimx27_usbh2_init,
-       .portsc = MXC_EHCI_MODE_ULPI,
-};
-
-static const struct fsl_usb2_platform_data otg_device_pdata __initconst = {
-       .operating_mode = FSL_USB2_DR_DEVICE,
-       .phy_mode       = FSL_USB2_PHY_ULPI,
-};
-
-static bool otg_mode_host __initdata;
-
-static int __init eukrea_cpuimx27_otg_mode(char *options)
-{
-       if (!strcmp(options, "host"))
-               otg_mode_host = true;
-       else if (!strcmp(options, "device"))
-               otg_mode_host = false;
-       else
-               pr_info("otg_mode neither \"host\" nor \"device\". "
-                       "Defaulting to device\n");
-       return 1;
-}
-__setup("otg_mode=", eukrea_cpuimx27_otg_mode);
-
-static void __init eukrea_cpuimx27_init(void)
-{
-       imx27_soc_init();
-
-       mxc_gpio_setup_multiple_pins(eukrea_cpuimx27_pins,
-               ARRAY_SIZE(eukrea_cpuimx27_pins), "CPUIMX27");
-
-       imx27_add_imx_uart0(&uart_pdata);
-
-       imx27_add_mxc_nand(&cpuimx27_nand_board_info);
-
-       i2c_register_board_info(0, eukrea_cpuimx27_i2c_devices,
-                               ARRAY_SIZE(eukrea_cpuimx27_i2c_devices));
-
-       imx27_add_imx_i2c(0, &cpuimx27_i2c1_data);
-
-       imx27_add_fec(NULL);
-       platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
-       imx27_add_imx2_wdt();
-       imx27_add_mxc_w1();
-
-#if defined(CONFIG_MACH_EUKREA_CPUIMX27_USESDHC2)
-       /* SDHC2 can be used for Wifi */
-       imx27_add_mxc_mmc(1, NULL);
-#endif
-#if defined(CONFIG_MACH_EUKREA_CPUIMX27_USEUART4)
-       /* in which case UART4 is also used for Bluetooth */
-       imx27_add_imx_uart3(&uart_pdata);
-#endif
-
-#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE)
-       serial_platform_data[0].irq = IMX_GPIO_NR(2, 23);
-       serial_platform_data[1].irq = IMX_GPIO_NR(2, 22);
-       serial_platform_data[2].irq = IMX_GPIO_NR(2, 27);
-       serial_platform_data[3].irq = IMX_GPIO_NR(2, 30);
-       platform_device_register(&serial_device);
-#endif
-
-       if (otg_mode_host) {
-               otg_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
-                               ULPI_OTG_DRVVBUS_EXT);
-               if (otg_pdata.otg)
-                       imx27_add_mxc_ehci_otg(&otg_pdata);
-       } else {
-               imx27_add_fsl_usb2_udc(&otg_device_pdata);
-       }
-
-       usbh2_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
-                       ULPI_OTG_DRVVBUS_EXT);
-       if (usbh2_pdata.otg)
-               imx27_add_mxc_ehci_hs(2, &usbh2_pdata);
-
-#ifdef CONFIG_MACH_EUKREA_MBIMX27_BASEBOARD
-       eukrea_mbimx27_baseboard_init();
-#endif
-}
-
-static void __init eukrea_cpuimx27_timer_init(void)
-{
-       mx27_clocks_init(26000000);
-}
-
-MACHINE_START(EUKREA_CPUIMX27, "EUKREA CPUIMX27")
-       .atag_offset = 0x100,
-       .map_io = mx27_map_io,
-       .init_early = imx27_init_early,
-       .init_irq = mx27_init_irq,
-       .init_time      = eukrea_cpuimx27_timer_init,
-       .init_machine = eukrea_cpuimx27_init,
-       .restart        = mxc_restart,
-MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mx1ads.c b/arch/arm/mach-imx/mach-mx1ads.c
deleted file mode 100644 (file)
index 77fda3d..0000000
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * arch/arm/mach-imx/mach-mx1ads.c
- *
- * Initially based on:
- *     linux-2.6.7-imx/arch/arm/mach-imx/scb9328.c
- *     Copyright (c) 2004 Sascha Hauer <sascha@saschahauer.de>
- *
- * 2004 (c) MontaVista Software, Inc.
- *
- * 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 <linux/i2c.h>
-#include <linux/i2c/pcf857x.h>
-#include <linux/init.h>
-#include <linux/kernel.h>
-#include <linux/platform_device.h>
-#include <linux/mtd/physmap.h>
-
-#include <asm/mach-types.h>
-#include <asm/mach/arch.h>
-#include <asm/mach/time.h>
-
-#include "common.h"
-#include "devices-imx1.h"
-#include "hardware.h"
-#include "iomux-mx1.h"
-
-static const int mx1ads_pins[] __initconst = {
-       /* UART1 */
-       PC9_PF_UART1_CTS,
-       PC10_PF_UART1_RTS,
-       PC11_PF_UART1_TXD,
-       PC12_PF_UART1_RXD,
-       /* UART2 */
-       PB28_PF_UART2_CTS,
-       PB29_PF_UART2_RTS,
-       PB30_PF_UART2_TXD,
-       PB31_PF_UART2_RXD,
-       /* I2C */
-       PA15_PF_I2C_SDA,
-       PA16_PF_I2C_SCL,
-       /* SPI */
-       PC13_PF_SPI1_SPI_RDY,
-       PC14_PF_SPI1_SCLK,
-       PC15_PF_SPI1_SS,
-       PC16_PF_SPI1_MISO,
-       PC17_PF_SPI1_MOSI,
-};
-
-/*
- * UARTs platform data
- */
-
-static const struct imxuart_platform_data uart0_pdata __initconst = {
-       .flags = IMXUART_HAVE_RTSCTS,
-};
-       
-static const struct imxuart_platform_data uart1_pdata __initconst = {
-       .flags = IMXUART_HAVE_RTSCTS,
-};
-
-/*
- * Physmap flash
- */
-
-static const struct physmap_flash_data mx1ads_flash_data __initconst = {
-       .width          = 4,            /* bankwidth in bytes */
-};
-
-static const struct resource flash_resource __initconst = {
-       .start  = MX1_CS0_PHYS,
-       .end    = MX1_CS0_PHYS + SZ_32M - 1,
-       .flags  = IORESOURCE_MEM,
-};
-
-/*
- * I2C
- */
-static struct pcf857x_platform_data pcf857x_data[] = {
-       {
-               .gpio_base = 4 * 32,
-       }, {
-               .gpio_base = 4 * 32 + 16,
-       }
-};
-
-static const struct imxi2c_platform_data mx1ads_i2c_data __initconst = {
-       .bitrate = 100000,
-};
-
-static struct i2c_board_info mx1ads_i2c_devices[] = {
-       {
-               I2C_BOARD_INFO("pcf8575", 0x22),
-               .platform_data = &pcf857x_data[0],
-       }, {
-               I2C_BOARD_INFO("pcf8575", 0x24),
-               .platform_data = &pcf857x_data[1],
-       },
-};
-
-/*
- * Board init
- */
-static void __init mx1ads_init(void)
-{
-       imx1_soc_init();
-
-       mxc_gpio_setup_multiple_pins(mx1ads_pins,
-               ARRAY_SIZE(mx1ads_pins), "mx1ads");
-
-       /* UART */
-       imx1_add_imx_uart0(&uart0_pdata);
-       imx1_add_imx_uart1(&uart1_pdata);
-
-       /* Physmap flash */
-       platform_device_register_resndata(NULL, "physmap-flash", 0,
-                       &flash_resource, 1,
-                       &mx1ads_flash_data, sizeof(mx1ads_flash_data));
-
-       /* I2C */
-       i2c_register_board_info(0, mx1ads_i2c_devices,
-                               ARRAY_SIZE(mx1ads_i2c_devices));
-
-       imx1_add_imx_i2c(&mx1ads_i2c_data);
-}
-
-static void __init mx1ads_timer_init(void)
-{
-       mx1_clocks_init(32000);
-}
-
-MACHINE_START(MX1ADS, "Freescale MX1ADS")
-       /* Maintainer: Sascha Hauer, Pengutronix */
-       .atag_offset = 0x100,
-       .map_io = mx1_map_io,
-       .init_early = imx1_init_early,
-       .init_irq = mx1_init_irq,
-       .init_time      = mx1ads_timer_init,
-       .init_machine = mx1ads_init,
-       .restart        = mxc_restart,
-MACHINE_END
-
-MACHINE_START(MXLADS, "Freescale MXLADS")
-       .atag_offset = 0x100,
-       .map_io = mx1_map_io,
-       .init_early = imx1_init_early,
-       .init_irq = mx1_init_irq,
-       .init_time      = mx1ads_timer_init,
-       .init_machine = mx1ads_init,
-       .restart        = mxc_restart,
-MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mxt_td60.c b/arch/arm/mach-imx/mach-mxt_td60.c
deleted file mode 100644 (file)
index 0b5d1ca..0000000
+++ /dev/null
@@ -1,273 +0,0 @@
-/*
- *  Copyright (C) 2000 Deep Blue Solutions Ltd
- *  Copyright (C) 2002 Shane Nay (shane@minirl.com)
- *  Copyright 2006-2007 Freescale Semiconductor, Inc. All Rights Reserved.
- *
- * 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.
- */
-
-#include <linux/platform_device.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/map.h>
-#include <linux/mtd/partitions.h>
-#include <linux/mtd/physmap.h>
-#include <linux/i2c.h>
-#include <linux/irq.h>
-#include <asm/mach-types.h>
-#include <asm/mach/arch.h>
-#include <asm/mach/time.h>
-#include <asm/mach/map.h>
-#include <linux/gpio.h>
-#include <linux/platform_data/pca953x.h>
-
-#include "common.h"
-#include "devices-imx27.h"
-#include "hardware.h"
-#include "iomux-mx27.h"
-
-static const int mxt_td60_pins[] __initconst = {
-       /* UART0 */
-       PE12_PF_UART1_TXD,
-       PE13_PF_UART1_RXD,
-       PE14_PF_UART1_CTS,
-       PE15_PF_UART1_RTS,
-       /* UART1 */
-       PE3_PF_UART2_CTS,
-       PE4_PF_UART2_RTS,
-       PE6_PF_UART2_TXD,
-       PE7_PF_UART2_RXD,
-       /* UART2 */
-       PE8_PF_UART3_TXD,
-       PE9_PF_UART3_RXD,
-       PE10_PF_UART3_CTS,
-       PE11_PF_UART3_RTS,
-       /* FEC */
-       PD0_AIN_FEC_TXD0,
-       PD1_AIN_FEC_TXD1,
-       PD2_AIN_FEC_TXD2,
-       PD3_AIN_FEC_TXD3,
-       PD4_AOUT_FEC_RX_ER,
-       PD5_AOUT_FEC_RXD1,
-       PD6_AOUT_FEC_RXD2,
-       PD7_AOUT_FEC_RXD3,
-       PD8_AF_FEC_MDIO,
-       PD9_AIN_FEC_MDC,
-       PD10_AOUT_FEC_CRS,
-       PD11_AOUT_FEC_TX_CLK,
-       PD12_AOUT_FEC_RXD0,
-       PD13_AOUT_FEC_RX_DV,
-       PD14_AOUT_FEC_RX_CLK,
-       PD15_AOUT_FEC_COL,
-       PD16_AIN_FEC_TX_ER,
-       PF23_AIN_FEC_TX_EN,
-       /* I2C1 */
-       PD17_PF_I2C_DATA,
-       PD18_PF_I2C_CLK,
-       /* I2C2 */
-       PC5_PF_I2C2_SDA,
-       PC6_PF_I2C2_SCL,
-       /* FB */
-       PA5_PF_LSCLK,
-       PA6_PF_LD0,
-       PA7_PF_LD1,
-       PA8_PF_LD2,
-       PA9_PF_LD3,
-       PA10_PF_LD4,
-       PA11_PF_LD5,
-       PA12_PF_LD6,
-       PA13_PF_LD7,
-       PA14_PF_LD8,
-       PA15_PF_LD9,
-       PA16_PF_LD10,
-       PA17_PF_LD11,
-       PA18_PF_LD12,
-       PA19_PF_LD13,
-       PA20_PF_LD14,
-       PA21_PF_LD15,
-       PA22_PF_LD16,
-       PA23_PF_LD17,
-       PA25_PF_CLS,
-       PA27_PF_SPL_SPR,
-       PA28_PF_HSYNC,
-       PA29_PF_VSYNC,
-       PA30_PF_CONTRAST,
-       PA31_PF_OE_ACD,
-       /* OWIRE */
-       PE16_AF_OWIRE,
-       /* SDHC1*/
-       PE18_PF_SD1_D0,
-       PE19_PF_SD1_D1,
-       PE20_PF_SD1_D2,
-       PE21_PF_SD1_D3,
-       PE22_PF_SD1_CMD,
-       PE23_PF_SD1_CLK,
-       PF8_AF_ATA_IORDY,
-       /* SDHC2*/
-       PB4_PF_SD2_D0,
-       PB5_PF_SD2_D1,
-       PB6_PF_SD2_D2,
-       PB7_PF_SD2_D3,
-       PB8_PF_SD2_CMD,
-       PB9_PF_SD2_CLK,
-};
-
-static const struct mxc_nand_platform_data
-mxt_td60_nand_board_info __initconst = {
-       .width = 1,
-       .hw_ecc = 1,
-};
-
-static const struct imxi2c_platform_data mxt_td60_i2c0_data __initconst = {
-       .bitrate = 100000,
-};
-
-/* PCA9557 */
-static int mxt_td60_pca9557_setup(struct i2c_client *client,
-                               unsigned gpio_base, unsigned ngpio,
-                               void *context)
-{
-       static int mxt_td60_gpio_value[] = {
-               -1, -1, -1, -1, -1, -1, -1, 1
-       };
-       int n;
-
-       for (n = 0; n < ARRAY_SIZE(mxt_td60_gpio_value); ++n) {
-               gpio_request(gpio_base + n, "MXT_TD60 GPIO Exp");
-               if (mxt_td60_gpio_value[n] < 0)
-                       gpio_direction_input(gpio_base + n);
-               else
-                       gpio_direction_output(gpio_base + n,
-                                               mxt_td60_gpio_value[n]);
-               gpio_export(gpio_base + n, 0);
-       }
-
-       return 0;
-}
-
-static struct pca953x_platform_data mxt_td60_pca9557_pdata = {
-       .gpio_base      = 240, /* place PCA9557 after all MX27 gpio pins */
-       .invert         = 0, /* Do not invert */
-       .setup          = mxt_td60_pca9557_setup,
-};
-
-static struct i2c_board_info mxt_td60_i2c_devices[] = {
-       {
-               I2C_BOARD_INFO("pca9557", 0x18),
-               .platform_data = &mxt_td60_pca9557_pdata,
-       },
-};
-
-static const struct imxi2c_platform_data mxt_td60_i2c1_data __initconst = {
-       .bitrate = 100000,
-};
-
-static struct i2c_board_info mxt_td60_i2c2_devices[] = {
-};
-
-static struct imx_fb_videomode mxt_td60_modes[] = {
-       {
-               .mode = {
-                       .name           = "Chimei LW700AT9003",
-                       .refresh        = 60,
-                       .xres           = 800,
-                       .yres           = 480,
-                       .pixclock       = 30303,
-                       .hsync_len      = 64,
-                       .left_margin    = 0x67,
-                       .right_margin   = 0x68,
-                       .vsync_len      = 16,
-                       .upper_margin   = 0x0f,
-                       .lower_margin   = 0x0f,
-               },
-               .bpp            = 16,
-               .pcr            = 0xFA208B83,
-       },
-};
-
-static const struct imx_fb_platform_data mxt_td60_fb_data __initconst = {
-       .mode = mxt_td60_modes,
-       .num_modes = ARRAY_SIZE(mxt_td60_modes),
-
-       /*
-        * - HSYNC active high
-        * - VSYNC active high
-        * - clk notenabled while idle
-        * - clock inverted
-        * - data not inverted
-        * - data enable low active
-        * - enable sharp mode
-        */
-       .pwmr           = 0x00A903FF,
-       .lscr1          = 0x00120300,
-       .dmacr          = 0x00020010,
-};
-
-static int mxt_td60_sdhc1_init(struct device *dev, irq_handler_t detect_irq,
-                               void *data)
-{
-       return request_irq(gpio_to_irq(IMX_GPIO_NR(6, 8)), detect_irq,
-                          IRQF_TRIGGER_FALLING, "sdhc1-card-detect", data);
-}
-
-static void mxt_td60_sdhc1_exit(struct device *dev, void *data)
-{
-       free_irq(gpio_to_irq(IMX_GPIO_NR(6, 8)), data);
-}
-
-static const struct imxmmc_platform_data sdhc1_pdata __initconst = {
-       .init = mxt_td60_sdhc1_init,
-       .exit = mxt_td60_sdhc1_exit,
-};
-
-static const struct imxuart_platform_data uart_pdata __initconst = {
-       .flags = IMXUART_HAVE_RTSCTS,
-};
-
-static void __init mxt_td60_board_init(void)
-{
-       imx27_soc_init();
-
-       mxc_gpio_setup_multiple_pins(mxt_td60_pins, ARRAY_SIZE(mxt_td60_pins),
-                       "MXT_TD60");
-
-       imx27_add_imx_uart0(&uart_pdata);
-       imx27_add_imx_uart1(&uart_pdata);
-       imx27_add_imx_uart2(&uart_pdata);
-       imx27_add_mxc_nand(&mxt_td60_nand_board_info);
-
-       i2c_register_board_info(0, mxt_td60_i2c_devices,
-                               ARRAY_SIZE(mxt_td60_i2c_devices));
-
-       i2c_register_board_info(1, mxt_td60_i2c2_devices,
-                               ARRAY_SIZE(mxt_td60_i2c2_devices));
-
-       imx27_add_imx_i2c(0, &mxt_td60_i2c0_data);
-       imx27_add_imx_i2c(1, &mxt_td60_i2c1_data);
-       imx27_add_imx_fb(&mxt_td60_fb_data);
-       imx27_add_mxc_mmc(0, &sdhc1_pdata);
-       imx27_add_fec(NULL);
-}
-
-static void __init mxt_td60_timer_init(void)
-{
-       mx27_clocks_init(26000000);
-}
-
-MACHINE_START(MXT_TD60, "Maxtrack i-MXT TD60")
-       /* maintainer: Maxtrack Industrial */
-       .atag_offset = 0x100,
-       .map_io = mx27_map_io,
-       .init_early = imx27_init_early,
-       .init_irq = mx27_init_irq,
-       .init_time      = mxt_td60_timer_init,
-       .init_machine = mxt_td60_board_init,
-       .restart        = mxc_restart,
-MACHINE_END
diff --git a/arch/arm/mach-imx/mach-pcm038.c b/arch/arm/mach-imx/mach-pcm038.c
deleted file mode 100644 (file)
index ee862ad..0000000
+++ /dev/null
@@ -1,358 +0,0 @@
-/*
- * Copyright 2007 Robert Schwebel <r.schwebel@pengutronix.de>, Pengutronix
- * Copyright (C) 2008 Juergen Beisert (kernel@pengutronix.de)
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-
-#include <linux/i2c.h>
-#include <linux/platform_data/at24.h>
-#include <linux/io.h>
-#include <linux/mtd/plat-ram.h>
-#include <linux/mtd/physmap.h>
-#include <linux/platform_device.h>
-#include <linux/regulator/machine.h>
-#include <linux/mfd/mc13783.h>
-#include <linux/spi/spi.h>
-#include <linux/irq.h>
-#include <linux/gpio.h>
-
-#include <asm/mach-types.h>
-#include <asm/mach/arch.h>
-#include <asm/mach/time.h>
-
-#include "board-pcm038.h"
-#include "common.h"
-#include "devices-imx27.h"
-#include "ehci.h"
-#include "hardware.h"
-#include "iomux-mx27.h"
-#include "ulpi.h"
-
-static const int pcm038_pins[] __initconst = {
-       /* UART1 */
-       PE12_PF_UART1_TXD,
-       PE13_PF_UART1_RXD,
-       PE14_PF_UART1_CTS,
-       PE15_PF_UART1_RTS,
-       /* UART2 */
-       PE3_PF_UART2_CTS,
-       PE4_PF_UART2_RTS,
-       PE6_PF_UART2_TXD,
-       PE7_PF_UART2_RXD,
-       /* UART3 */
-       PE8_PF_UART3_TXD,
-       PE9_PF_UART3_RXD,
-       PE10_PF_UART3_CTS,
-       PE11_PF_UART3_RTS,
-       /* FEC */
-       PD0_AIN_FEC_TXD0,
-       PD1_AIN_FEC_TXD1,
-       PD2_AIN_FEC_TXD2,
-       PD3_AIN_FEC_TXD3,
-       PD4_AOUT_FEC_RX_ER,
-       PD5_AOUT_FEC_RXD1,
-       PD6_AOUT_FEC_RXD2,
-       PD7_AOUT_FEC_RXD3,
-       PD8_AF_FEC_MDIO,
-       PD9_AIN_FEC_MDC,
-       PD10_AOUT_FEC_CRS,
-       PD11_AOUT_FEC_TX_CLK,
-       PD12_AOUT_FEC_RXD0,
-       PD13_AOUT_FEC_RX_DV,
-       PD14_AOUT_FEC_RX_CLK,
-       PD15_AOUT_FEC_COL,
-       PD16_AIN_FEC_TX_ER,
-       PF23_AIN_FEC_TX_EN,
-       /* I2C2 */
-       PC5_PF_I2C2_SDA,
-       PC6_PF_I2C2_SCL,
-       /* SPI1 */
-       PD25_PF_CSPI1_RDY,
-       PD29_PF_CSPI1_SCLK,
-       PD30_PF_CSPI1_MISO,
-       PD31_PF_CSPI1_MOSI,
-       /* SSI1 */
-       PC20_PF_SSI1_FS,
-       PC21_PF_SSI1_RXD,
-       PC22_PF_SSI1_TXD,
-       PC23_PF_SSI1_CLK,
-       /* SSI4 */
-       PC16_PF_SSI4_FS,
-       PC17_PF_SSI4_RXD,
-       PC18_PF_SSI4_TXD,
-       PC19_PF_SSI4_CLK,
-       /* USB host */
-       PA0_PF_USBH2_CLK,
-       PA1_PF_USBH2_DIR,
-       PA2_PF_USBH2_DATA7,
-       PA3_PF_USBH2_NXT,
-       PA4_PF_USBH2_STP,
-       PD19_AF_USBH2_DATA4,
-       PD20_AF_USBH2_DATA3,
-       PD21_AF_USBH2_DATA6,
-       PD22_AF_USBH2_DATA0,
-       PD23_AF_USBH2_DATA2,
-       PD24_AF_USBH2_DATA1,
-       PD26_AF_USBH2_DATA5,
-};
-
-/*
- * Phytec's PCM038 comes with 2MiB battery buffered SRAM,
- * 16 bit width
- */
-
-static struct platdata_mtd_ram pcm038_sram_data = {
-       .bankwidth = 2,
-};
-
-static struct resource pcm038_sram_resource = {
-       .start = MX27_CS1_BASE_ADDR,
-       .end   = MX27_CS1_BASE_ADDR + 512 * 1024 - 1,
-       .flags = IORESOURCE_MEM,
-};
-
-static struct platform_device pcm038_sram_mtd_device = {
-       .name = "mtd-ram",
-       .id = 0,
-       .dev = {
-               .platform_data = &pcm038_sram_data,
-       },
-       .num_resources = 1,
-       .resource = &pcm038_sram_resource,
-};
-
-/*
- * Phytec's phyCORE-i.MX27 comes with 32MiB flash,
- * 16 bit width
- */
-static struct physmap_flash_data pcm038_flash_data = {
-       .width = 2,
-};
-
-static struct resource pcm038_flash_resource = {
-       .start = 0xc0000000,
-       .end   = 0xc1ffffff,
-       .flags = IORESOURCE_MEM,
-};
-
-static struct platform_device pcm038_nor_mtd_device = {
-       .name = "physmap-flash",
-       .id = 0,
-       .dev = {
-               .platform_data = &pcm038_flash_data,
-       },
-       .num_resources = 1,
-       .resource = &pcm038_flash_resource,
-};
-
-static const struct imxuart_platform_data uart_pdata __initconst = {
-       .flags = IMXUART_HAVE_RTSCTS,
-};
-
-static const struct mxc_nand_platform_data
-pcm038_nand_board_info __initconst = {
-       .width = 1,
-       .hw_ecc = 1,
-};
-
-static struct platform_device *platform_devices[] __initdata = {
-       &pcm038_nor_mtd_device,
-       &pcm038_sram_mtd_device,
-};
-
-/* On pcm038 there's a sram attached to CS1, we enable the chipselect here and
- * setup other stuffs to access the sram. */
-static void __init pcm038_init_sram(void)
-{
-       __raw_writel(0x0000d843, MX27_IO_ADDRESS(MX27_WEIM_CSCRxU(1)));
-       __raw_writel(0x22252521, MX27_IO_ADDRESS(MX27_WEIM_CSCRxL(1)));
-       __raw_writel(0x22220a00, MX27_IO_ADDRESS(MX27_WEIM_CSCRxA(1)));
-}
-
-static const struct imxi2c_platform_data pcm038_i2c1_data __initconst = {
-       .bitrate = 100000,
-};
-
-static struct at24_platform_data board_eeprom = {
-       .byte_len = 4096,
-       .page_size = 32,
-       .flags = AT24_FLAG_ADDR16,
-};
-
-static struct i2c_board_info pcm038_i2c_devices[] = {
-       {
-               I2C_BOARD_INFO("at24", 0x52), /* E0=0, E1=1, E2=0 */
-               .platform_data = &board_eeprom,
-       }, {
-               I2C_BOARD_INFO("pcf8563", 0x51),
-       }, {
-               I2C_BOARD_INFO("lm75", 0x4a),
-       }
-};
-
-static int pcm038_spi_cs[] = {GPIO_PORTD + 28};
-
-static const struct spi_imx_master pcm038_spi0_data __initconst = {
-       .chipselect = pcm038_spi_cs,
-       .num_chipselect = ARRAY_SIZE(pcm038_spi_cs),
-};
-
-static struct regulator_consumer_supply sdhc1_consumers[] = {
-       {
-               .dev_name = "imx21-mmc.1",
-               .supply = "sdhc_vcc",
-       },
-};
-
-static struct regulator_init_data sdhc1_data = {
-       .constraints = {
-               .min_uV = 3000000,
-               .max_uV = 3400000,
-               .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
-                       REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS,
-               .valid_modes_mask = REGULATOR_MODE_NORMAL |
-                       REGULATOR_MODE_FAST,
-               .always_on = 0,
-               .boot_on = 0,
-       },
-       .num_consumer_supplies = ARRAY_SIZE(sdhc1_consumers),
-       .consumer_supplies = sdhc1_consumers,
-};
-
-static struct regulator_consumer_supply cam_consumers[] = {
-       {
-               .dev_name = NULL,
-               .supply = "imx_cam_vcc",
-       },
-};
-
-static struct regulator_init_data cam_data = {
-       .constraints = {
-               .min_uV = 3000000,
-               .max_uV = 3400000,
-               .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
-                       REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS,
-               .valid_modes_mask = REGULATOR_MODE_NORMAL |
-                       REGULATOR_MODE_FAST,
-               .always_on = 0,
-               .boot_on = 0,
-       },
-       .num_consumer_supplies = ARRAY_SIZE(cam_consumers),
-       .consumer_supplies = cam_consumers,
-};
-
-static struct mc13xxx_regulator_init_data pcm038_regulators[] = {
-       {
-               .id = MC13783_REG_VCAM,
-               .init_data = &cam_data,
-       }, {
-               .id = MC13783_REG_VMMC1,
-               .init_data = &sdhc1_data,
-       },
-};
-
-static struct mc13xxx_platform_data pcm038_pmic = {
-       .regulators = {
-               .regulators = pcm038_regulators,
-               .num_regulators = ARRAY_SIZE(pcm038_regulators),
-       },
-       .flags = MC13XXX_USE_ADC | MC13XXX_USE_TOUCHSCREEN,
-};
-
-static struct spi_board_info pcm038_spi_board_info[] __initdata = {
-       {
-               .modalias = "mc13783",
-               /* irq number is run-time assigned */
-               .max_speed_hz = 300000,
-               .bus_num = 0,
-               .chip_select = 0,
-               .platform_data = &pcm038_pmic,
-               .mode = SPI_CS_HIGH,
-       }
-};
-
-static int pcm038_usbh2_init(struct platform_device *pdev)
-{
-       return mx27_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED |
-                       MXC_EHCI_INTERFACE_DIFF_UNI);
-}
-
-static const struct mxc_usbh_platform_data usbh2_pdata __initconst = {
-       .init   = pcm038_usbh2_init,
-       .portsc = MXC_EHCI_MODE_ULPI,
-};
-
-static void __init pcm038_init(void)
-{
-       imx27_soc_init();
-
-       mxc_gpio_setup_multiple_pins(pcm038_pins, ARRAY_SIZE(pcm038_pins),
-                       "PCM038");
-
-       pcm038_init_sram();
-
-       imx27_add_imx_uart0(&uart_pdata);
-       imx27_add_imx_uart1(&uart_pdata);
-       imx27_add_imx_uart2(&uart_pdata);
-
-       mxc_gpio_mode(PE16_AF_OWIRE);
-       imx27_add_mxc_nand(&pcm038_nand_board_info);
-
-       /* only the i2c master 1 is used on this CPU card */
-       i2c_register_board_info(1, pcm038_i2c_devices,
-                               ARRAY_SIZE(pcm038_i2c_devices));
-
-       imx27_add_imx_i2c(1, &pcm038_i2c1_data);
-
-       /* PE18 for user-LED D40 */
-       mxc_gpio_mode(GPIO_PORTE | 18 | GPIO_GPIO | GPIO_OUT);
-
-       mxc_gpio_mode(GPIO_PORTD | 28 | GPIO_GPIO | GPIO_OUT);
-
-       /* MC13783 IRQ */
-       mxc_gpio_mode(GPIO_PORTB | 23 | GPIO_GPIO | GPIO_IN);
-
-       imx27_add_spi_imx0(&pcm038_spi0_data);
-       pcm038_spi_board_info[0].irq = gpio_to_irq(IMX_GPIO_NR(2, 23));
-       spi_register_board_info(pcm038_spi_board_info,
-                               ARRAY_SIZE(pcm038_spi_board_info));
-
-       imx27_add_mxc_ehci_hs(2, &usbh2_pdata);
-
-       imx27_add_fec(NULL);
-       platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
-       imx27_add_imx2_wdt();
-       imx27_add_mxc_w1();
-
-#ifdef CONFIG_MACH_PCM970_BASEBOARD
-       pcm970_baseboard_init();
-#endif
-}
-
-static void __init pcm038_timer_init(void)
-{
-       mx27_clocks_init(26000000);
-}
-
-MACHINE_START(PCM038, "phyCORE-i.MX27")
-       .atag_offset = 0x100,
-       .map_io = mx27_map_io,
-       .init_early = imx27_init_early,
-       .init_irq = mx27_init_irq,
-       .init_time      = pcm038_timer_init,
-       .init_machine = pcm038_init,
-       .restart        = mxc_restart,
-MACHINE_END
diff --git a/arch/arm/mach-imx/pcm970-baseboard.c b/arch/arm/mach-imx/pcm970-baseboard.c
deleted file mode 100644 (file)
index 51c6082..0000000
+++ /dev/null
@@ -1,231 +0,0 @@
-/*
- * Copyright (C) 2008 Juergen Beisert (kernel@pengutronix.de)
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-
-#include <linux/gpio.h>
-#include <linux/irq.h>
-#include <linux/platform_device.h>
-#include <linux/can/platform/sja1000.h>
-
-#include <asm/mach/arch.h>
-
-#include "common.h"
-#include "devices-imx27.h"
-#include "hardware.h"
-#include "iomux-mx27.h"
-
-static const int pcm970_pins[] __initconst = {
-       /* SDHC */
-       PB4_PF_SD2_D0,
-       PB5_PF_SD2_D1,
-       PB6_PF_SD2_D2,
-       PB7_PF_SD2_D3,
-       PB8_PF_SD2_CMD,
-       PB9_PF_SD2_CLK,
-       /* display */
-       PA5_PF_LSCLK,
-       PA6_PF_LD0,
-       PA7_PF_LD1,
-       PA8_PF_LD2,
-       PA9_PF_LD3,
-       PA10_PF_LD4,
-       PA11_PF_LD5,
-       PA12_PF_LD6,
-       PA13_PF_LD7,
-       PA14_PF_LD8,
-       PA15_PF_LD9,
-       PA16_PF_LD10,
-       PA17_PF_LD11,
-       PA18_PF_LD12,
-       PA19_PF_LD13,
-       PA20_PF_LD14,
-       PA21_PF_LD15,
-       PA22_PF_LD16,
-       PA23_PF_LD17,
-       PA24_PF_REV,
-       PA25_PF_CLS,
-       PA26_PF_PS,
-       PA27_PF_SPL_SPR,
-       PA28_PF_HSYNC,
-       PA29_PF_VSYNC,
-       PA30_PF_CONTRAST,
-       PA31_PF_OE_ACD,
-       /*
-        * it seems the data line misses a pullup, so we must enable
-        * the internal pullup as a local workaround
-        */
-       PD17_PF_I2C_DATA | GPIO_PUEN,
-       PD18_PF_I2C_CLK,
-       /* Camera */
-       PB10_PF_CSI_D0,
-       PB11_PF_CSI_D1,
-       PB12_PF_CSI_D2,
-       PB13_PF_CSI_D3,
-       PB14_PF_CSI_D4,
-       PB15_PF_CSI_MCLK,
-       PB16_PF_CSI_PIXCLK,
-       PB17_PF_CSI_D5,
-       PB18_PF_CSI_D6,
-       PB19_PF_CSI_D7,
-       PB20_PF_CSI_VSYNC,
-       PB21_PF_CSI_HSYNC,
-};
-
-static int pcm970_sdhc2_get_ro(struct device *dev)
-{
-       return gpio_get_value(GPIO_PORTC + 28);
-}
-
-static int pcm970_sdhc2_init(struct device *dev, irq_handler_t detect_irq, void *data)
-{
-       int ret;
-
-       ret = request_irq(gpio_to_irq(IMX_GPIO_NR(3, 29)), detect_irq,
-                         IRQF_TRIGGER_FALLING, "imx-mmc-detect", data);
-       if (ret)
-               return ret;
-
-       ret = gpio_request(GPIO_PORTC + 28, "imx-mmc-ro");
-       if (ret) {
-               free_irq(gpio_to_irq(IMX_GPIO_NR(3, 29)), data);
-               return ret;
-       }
-
-       gpio_direction_input(GPIO_PORTC + 28);
-
-       return 0;
-}
-
-static void pcm970_sdhc2_exit(struct device *dev, void *data)
-{
-       free_irq(gpio_to_irq(IMX_GPIO_NR(3, 29)), data);
-       gpio_free(GPIO_PORTC + 28);
-}
-
-static const struct imxmmc_platform_data sdhc_pdata __initconst = {
-       .get_ro = pcm970_sdhc2_get_ro,
-       .init = pcm970_sdhc2_init,
-       .exit = pcm970_sdhc2_exit,
-};
-
-static struct imx_fb_videomode pcm970_modes[] = {
-       {
-               .mode = {
-                       .name           = "Sharp-LQ035Q7",
-                       .refresh        = 60,
-                       .xres           = 240,
-                       .yres           = 320,
-                       .pixclock       = 188679, /* in ps (5.3MHz) */
-                       .hsync_len      = 7,
-                       .left_margin    = 5,
-                       .right_margin   = 16,
-                       .vsync_len      = 1,
-                       .upper_margin   = 7,
-                       .lower_margin   = 9,
-               },
-               /*
-                * - HSYNC active high
-                * - VSYNC active high
-                * - clk notenabled while idle
-                * - clock not inverted
-                * - data not inverted
-                * - data enable low active
-                * - enable sharp mode
-                */
-               .pcr            = 0xF00080C0,
-               .bpp            = 16,
-       }, {
-               .mode = {
-                       .name           = "TX090",
-                       .refresh        = 60,
-                       .xres           = 240,
-                       .yres           = 320,
-                       .pixclock       = 38255,
-                       .left_margin    = 144,
-                       .right_margin   = 0,
-                       .upper_margin   = 7,
-                       .lower_margin   = 40,
-                       .hsync_len      = 96,
-                       .vsync_len      = 1,
-               },
-               /*
-                * - HSYNC active low (1 << 22)
-                * - VSYNC active low (1 << 23)
-                * - clk notenabled while idle
-                * - clock not inverted
-                * - data not inverted
-                * - data enable low active
-                * - enable sharp mode
-                */
-               .pcr = 0xF0008080 | (1<<22) | (1<<23) | (1<<19),
-               .bpp = 32,
-       },
-};
-
-static const struct imx_fb_platform_data pcm038_fb_data __initconst = {
-       .mode = pcm970_modes,
-       .num_modes = ARRAY_SIZE(pcm970_modes),
-
-       .pwmr           = 0x00A903FF,
-       .lscr1          = 0x00120300,
-       .dmacr          = 0x00020010,
-};
-
-static struct resource pcm970_sja1000_resources[] = {
-       {
-               .start   = MX27_CS4_BASE_ADDR,
-               .end     = MX27_CS4_BASE_ADDR + 0x100 - 1,
-               .flags   = IORESOURCE_MEM,
-       }, {
-               /* irq number is run-time assigned */
-               .flags   = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE,
-       },
-};
-
-static struct sja1000_platform_data pcm970_sja1000_platform_data = {
-       .osc_freq       = 16000000,
-       .ocr            = OCR_TX1_PULLDOWN | OCR_TX0_PUSHPULL,
-       .cdr            = CDR_CBP,
-};
-
-static struct platform_device pcm970_sja1000 = {
-       .name = "sja1000_platform",
-       .dev = {
-               .platform_data = &pcm970_sja1000_platform_data,
-       },
-       .resource = pcm970_sja1000_resources,
-       .num_resources = ARRAY_SIZE(pcm970_sja1000_resources),
-};
-
-/*
- * system init for baseboard usage. Will be called by pcm038 init.
- *
- * Add platform devices present on this baseboard and init
- * them from CPU side as far as required to use them later on
- */
-void __init pcm970_baseboard_init(void)
-{
-       mxc_gpio_setup_multiple_pins(pcm970_pins, ARRAY_SIZE(pcm970_pins),
-                       "PCM970");
-
-       imx27_add_imx_fb(&pcm038_fb_data);
-       mxc_gpio_mode(GPIO_PORTC | 28 | GPIO_GPIO | GPIO_IN);
-       imx27_add_mxc_mmc(1, &sdhc_pdata);
-       pcm970_sja1000_resources[1].start = gpio_to_irq(IMX_GPIO_NR(5, 19));
-       pcm970_sja1000_resources[1].end = gpio_to_irq(IMX_GPIO_NR(5, 19));
-       platform_device_register(&pcm970_sja1000);
-}
index 5b57c17c06bda86ca93b6c3f9d53534cfdc88b6f..771bd25c1025fc94cb1209b8a3d14c644cf123dd 100644 (file)
@@ -20,8 +20,6 @@
 #include "common.h"
 #include "hardware.h"
 
-#define SCU_STANDBY_ENABLE     (1 << 5)
-
 u32 g_diag_reg;
 static void __iomem *scu_base;
 
@@ -45,14 +43,6 @@ void __init imx_scu_map_io(void)
        scu_base = IMX_IO_ADDRESS(base);
 }
 
-void imx_scu_standby_enable(void)
-{
-       u32 val = readl_relaxed(scu_base);
-
-       val |= SCU_STANDBY_ENABLE;
-       writel_relaxed(val, scu_base);
-}
-
 static int imx_boot_secondary(unsigned int cpu, struct task_struct *idle)
 {
        imx_set_cpu_jump(cpu, v7_secondary_startup);
diff --git a/arch/arm/mach-msm/board-mahimahi.c b/arch/arm/mach-msm/board-mahimahi.c
deleted file mode 100644 (file)
index 873c3ca..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-/* linux/arch/arm/mach-msm/board-mahimahi.c
- *
- * Copyright (C) 2009 Google, Inc.
- * Copyright (C) 2009 HTC Corporation.
- * Author: Dima Zavin <dima@android.com>
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * 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.
- *
- */
-
-#include <linux/delay.h>
-#include <linux/gpio.h>
-#include <linux/init.h>
-#include <linux/input.h>
-#include <linux/io.h>
-#include <linux/kernel.h>
-#include <linux/platform_device.h>
-#include <linux/memblock.h>
-
-#include <asm/mach-types.h>
-#include <asm/mach/arch.h>
-#include <asm/mach/map.h>
-#include <asm/setup.h>
-
-#include <mach/hardware.h>
-
-#include "board-mahimahi.h"
-#include "devices.h"
-#include "proc_comm.h"
-#include "common.h"
-
-static uint debug_uart;
-
-module_param_named(debug_uart, debug_uart, uint, 0);
-
-static struct platform_device *devices[] __initdata = {
-#if !defined(CONFIG_MSM_SERIAL_DEBUGGER)
-       &msm_device_uart1,
-#endif
-       &msm_device_uart_dm1,
-       &msm_device_nand,
-};
-
-static void __init mahimahi_init(void)
-{
-       platform_add_devices(devices, ARRAY_SIZE(devices));
-}
-
-static void __init mahimahi_fixup(struct tag *tags, char **cmdline)
-{
-       memblock_add(PHYS_OFFSET, 219*SZ_1M);
-       memblock_add(MSM_HIGHMEM_BASE, MSM_HIGHMEM_SIZE);
-}
-
-static void __init mahimahi_map_io(void)
-{
-       msm_map_common_io();
-       msm_clock_init();
-}
-
-static void __init mahimahi_init_late(void)
-{
-       smd_debugfs_init();
-}
-
-void msm_timer_init(void);
-
-MACHINE_START(MAHIMAHI, "mahimahi")
-       .atag_offset    = 0x100,
-       .fixup          = mahimahi_fixup,
-       .map_io         = mahimahi_map_io,
-       .init_irq       = msm_init_irq,
-       .init_machine   = mahimahi_init,
-       .init_late      = mahimahi_init_late,
-       .init_time      = msm_timer_init,
-MACHINE_END
index 245884319d2e30edc28fd00ee5e3e512ef4cf4f8..8f5ecdc4f3ce39a4def36c02bc4f23cebf0c3dee 100644 (file)
@@ -124,7 +124,7 @@ struct msm_gpiomux_config msm_gpiomux_configs[GPIOMUX_NGPIOS] = {
 static struct platform_device *devices[] __initdata = {
        &msm_clock_7x30,
        &msm_device_gpio_7x30,
-#if defined(CONFIG_SERIAL_MSM) || defined(CONFIG_MSM_SERIAL_DEBUGGER)
+#if defined(CONFIG_SERIAL_MSM)
         &msm_device_uart2,
 #endif
        &msm_device_smd,
index 2c25050209ceddd98a280c30d7525b60bc3fc344..722ad63b7edc2570f3783ad518c96283216d95ed 100644 (file)
@@ -94,7 +94,7 @@ static int trout_gpio_to_irq(struct gpio_chip *chip, unsigned offset)
        }
 
 static struct msm_gpio_chip msm_gpio_banks[] = {
-#if defined(CONFIG_MSM_DEBUG_UART1)
+#if defined(CONFIG_DEBUG_MSM_UART) && (CONFIG_DEBUG_UART_PHYS == 0xa9a00000)
        /* H2W pins <-> UART1 */
        TROUT_GPIO_BANK("MISC2", 0x00,   TROUT_GPIO_MISC2_BASE, 0x40),
 #else
index f72b07de215276a6f87804e27a1ad8e5cbddcdec..ba3edd3a46cbc6400bb2c7a89adb0a48ee5d58ce 100644 (file)
@@ -88,7 +88,7 @@ static void __init trout_map_io(void)
        msm_map_common_io();
        iotable_init(trout_io_desc, ARRAY_SIZE(trout_io_desc));
 
-#ifdef CONFIG_MSM_DEBUG_UART3
+#if defined(CONFIG_DEBUG_MSM_UART) && (CONFIG_DEBUG_UART_PHYS == 0xa9c00000)
        /* route UART3 to the "H2W" extended usb connector */
        writeb(0x80, TROUT_CPLD_BASE + 0x00);
 #endif
index 34e09474636ddeead9dbec440f9991ea54b04e53..b042dca1f6333c8b102c6d089e1897cb92b5ecc3 100644 (file)
@@ -57,8 +57,7 @@ static struct map_desc msm_io_desc[] __initdata = {
                .length =   MSM_SHARED_RAM_SIZE,
                .type =     MT_DEVICE,
        },
-#if defined(CONFIG_DEBUG_MSM_UART1) || defined(CONFIG_DEBUG_MSM_UART2) || \
-               defined(CONFIG_DEBUG_MSM_UART3)
+#if defined(CONFIG_DEBUG_MSM_UART)
        {
                /* Must be last: virtual and pfn filled in by debug_ll_addr() */
                .length = SZ_4K,
@@ -76,8 +75,7 @@ void __init msm_map_common_io(void)
         * pages are peripheral interface or not.
         */
        asm("mcr p15, 0, %0, c15, c2, 4" : : "r" (0));
-#if defined(CONFIG_DEBUG_MSM_UART1) || defined(CONFIG_DEBUG_MSM_UART2) || \
-               defined(CONFIG_DEBUG_MSM_UART3)
+#if defined(CONFIG_DEBUG_MSM_UART)
 #ifdef CONFIG_MMU
        debug_ll_addr(&msm_io_desc[size - 1].pfn,
                      &msm_io_desc[size - 1].virtual);
index bf852d7ae95137492abfdf3657527a77740d14d4..7a050f9c37ff2bf9bd5e8c0ccd75f8f16510b86f 100644 (file)
@@ -544,7 +544,7 @@ int omap_dss_reset(struct omap_hwmod *oh)
                        MAX_MODULE_SOFTRESET_WAIT, c);
 
        if (c == MAX_MODULE_SOFTRESET_WAIT)
-               pr_warning("dss_core: waiting for reset to finish failed\n");
+               pr_warn("dss_core: waiting for reset to finish failed\n");
        else
                pr_debug("dss_core: softreset done\n");
 
index f78b4a161959373715f17621096f3e23b7cfe7d3..f3897d82e53e9ef2c894f8a6a826258608fce1b4 100644 (file)
@@ -67,8 +67,8 @@ int omap_hdq1w_reset(struct omap_hwmod *oh)
                          MAX_MODULE_SOFTRESET_WAIT, c);
 
        if (c == MAX_MODULE_SOFTRESET_WAIT)
-               pr_warning("%s: %s: softreset failed (waited %d usec)\n",
-                          __func__, oh->name, MAX_MODULE_SOFTRESET_WAIT);
+               pr_warn("%s: %s: softreset failed (waited %d usec)\n",
+                       __func__, oh->name, MAX_MODULE_SOFTRESET_WAIT);
        else
                pr_debug("%s: %s: softreset in %d usec\n", __func__,
                         oh->name, c);
index b456b4471f3559238137155c41afe7a36fab136f..b9d8e47ffe8ee597ec9499c5c013f2cacbbfde4f 100644 (file)
@@ -99,7 +99,7 @@ int omap_i2c_reset(struct omap_hwmod *oh)
                                MAX_MODULE_SOFTRESET_WAIT, c);
 
        if (c == MAX_MODULE_SOFTRESET_WAIT)
-               pr_warning("%s: %s: softreset failed (waited %d usec)\n",
+               pr_warn("%s: %s: softreset failed (waited %d usec)\n",
                        __func__, oh->name, MAX_MODULE_SOFTRESET_WAIT);
        else
                pr_debug("%s: %s: softreset in %d usec\n", __func__,
index 828e0db3d943ce2fc2800c18d7ceaf5a3a87cdc4..8bdf182422bd3f1a314bafeebd0d78c6cd200a26 100644 (file)
@@ -76,8 +76,8 @@ int omap_msdi_reset(struct omap_hwmod *oh)
                          MAX_MODULE_SOFTRESET_WAIT, c);
 
        if (c == MAX_MODULE_SOFTRESET_WAIT)
-               pr_warning("%s: %s: softreset failed (waited %d usec)\n",
-                          __func__, oh->name, MAX_MODULE_SOFTRESET_WAIT);
+               pr_warn("%s: %s: softreset failed (waited %d usec)\n",
+                       __func__, oh->name, MAX_MODULE_SOFTRESET_WAIT);
        else
                pr_debug("%s: %s: softreset in %d usec\n", __func__,
                         oh->name, c);
index ac8a249779f222512e05c30b6a35ad6cdc344260..78064b0d4db56be1154a1262107e26801ee0eeee 100644 (file)
@@ -814,7 +814,7 @@ int __init omap_mux_late_init(void)
                        "hwmod_io", omap_mux_late_init);
 
        if (ret)
-               pr_warning("mux: Failed to setup hwmod io irq %d\n", ret);
+               pr_warn("mux: Failed to setup hwmod io irq %d\n", ret);
 
        return 0;
 }
index 9e91a4e7519a63709ea38056373491f2665c8327..faa65833a0d44c08197f0b699c51766dacb19745 100644 (file)
@@ -769,8 +769,8 @@ static int _init_main_clk(struct omap_hwmod *oh)
 
        oh->_clk = clk_get(NULL, oh->main_clk);
        if (IS_ERR(oh->_clk)) {
-               pr_warning("omap_hwmod: %s: cannot clk_get main_clk %s\n",
-                          oh->name, oh->main_clk);
+               pr_warn("omap_hwmod: %s: cannot clk_get main_clk %s\n",
+                       oh->name, oh->main_clk);
                return -EINVAL;
        }
        /*
@@ -814,8 +814,8 @@ static int _init_interface_clks(struct omap_hwmod *oh)
 
                c = clk_get(NULL, os->clk);
                if (IS_ERR(c)) {
-                       pr_warning("omap_hwmod: %s: cannot clk_get interface_clk %s\n",
-                                  oh->name, os->clk);
+                       pr_warn("omap_hwmod: %s: cannot clk_get interface_clk %s\n",
+                               oh->name, os->clk);
                        ret = -EINVAL;
                        continue;
                }
@@ -851,8 +851,8 @@ static int _init_opt_clks(struct omap_hwmod *oh)
        for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++) {
                c = clk_get(NULL, oc->clk);
                if (IS_ERR(c)) {
-                       pr_warning("omap_hwmod: %s: cannot clk_get opt_clk %s\n",
-                                  oh->name, oc->clk);
+                       pr_warn("omap_hwmod: %s: cannot clk_get opt_clk %s\n",
+                               oh->name, oc->clk);
                        ret = -EINVAL;
                        continue;
                }
@@ -1576,7 +1576,7 @@ static int _init_clkdm(struct omap_hwmod *oh)
 
        oh->clkdm = clkdm_lookup(oh->clkdm_name);
        if (!oh->clkdm) {
-               pr_warning("omap_hwmod: %s: could not associate to clkdm %s\n",
+               pr_warn("omap_hwmod: %s: could not associate to clkdm %s\n",
                        oh->name, oh->clkdm_name);
                return 0;
        }
@@ -1616,7 +1616,7 @@ static int _init_clocks(struct omap_hwmod *oh, void *data)
        if (!ret)
                oh->_state = _HWMOD_STATE_CLKS_INITED;
        else
-               pr_warning("omap_hwmod: %s: cannot _init_clocks\n", oh->name);
+               pr_warn("omap_hwmod: %s: cannot _init_clocks\n", oh->name);
 
        return ret;
 }
@@ -1739,7 +1739,7 @@ static int _deassert_hardreset(struct omap_hwmod *oh, const char *name)
        _disable_clocks(oh);
 
        if (ret == -EBUSY)
-               pr_warning("omap_hwmod: %s: failed to hardreset\n", oh->name);
+               pr_warn("omap_hwmod: %s: failed to hardreset\n", oh->name);
 
        if (!ret) {
                /*
@@ -1953,8 +1953,8 @@ static int _ocp_softreset(struct omap_hwmod *oh)
 
        c = _wait_softreset_complete(oh);
        if (c == MAX_MODULE_SOFTRESET_WAIT) {
-               pr_warning("omap_hwmod: %s: softreset failed (waited %d usec)\n",
-                          oh->name, MAX_MODULE_SOFTRESET_WAIT);
+               pr_warn("omap_hwmod: %s: softreset failed (waited %d usec)\n",
+                       oh->name, MAX_MODULE_SOFTRESET_WAIT);
                ret = -ETIMEDOUT;
                goto dis_opt_clks;
        } else {
@@ -2618,8 +2618,8 @@ static int __init _setup_reset(struct omap_hwmod *oh)
        if (oh->rst_lines_cnt == 0) {
                r = _enable(oh);
                if (r) {
-                       pr_warning("omap_hwmod: %s: cannot be enabled for reset (%d)\n",
-                                  oh->name, oh->_state);
+                       pr_warn("omap_hwmod: %s: cannot be enabled for reset (%d)\n",
+                               oh->name, oh->_state);
                        return -EINVAL;
                }
        }
index 05a8c8b0744985dafd3d224749f14473a018c8de..b3d3d30ffba0901b77b1cd027c8bc6b056edb93f 100644 (file)
@@ -244,8 +244,8 @@ static void __init nokia_n900_legacy_init(void)
                        /* set IBE to 1 */
                        rx51_secure_update_aux_cr(BIT(6), 0);
                } else {
-                       pr_warning("RX-51: Not enabling ARM errata 430973 workaround\n");
-                       pr_warning("Thumb binaries may crash randomly without this workaround\n");
+                       pr_warn("RX-51: Not enabling ARM errata 430973 workaround\n");
+                       pr_warn("Thumb binaries may crash randomly without this workaround\n");
                }
 
                pr_info("RX-51: Registring OMAP3 HWRNG device\n");
index 3f80929a5f7e80eacaaa2f8f369f1dda4c232731..175564c88a3035dcdaba4d1be9d2d00e5437078e 100644 (file)
@@ -465,7 +465,7 @@ int __init omap3_pm_init(void)
        int ret;
 
        if (!omap3_has_io_chain_ctrl())
-               pr_warning("PM: no software I/O chain control; some wakeups may be lost\n");
+               pr_warn("PM: no software I/O chain control; some wakeups may be lost\n");
 
        pm_errata_configure();
 
index 7a42e1960c3b5fe4aed135fa17d7717e735e044d..d3a588cf3a6ebf6b8e4bfae0a3a3e88ff47461e3 100644 (file)
@@ -20,8 +20,8 @@ static int sr_class3_enable(struct omap_sr *sr)
        unsigned long volt = voltdm_get_voltage(sr->voltdm);
 
        if (!volt) {
-               pr_warning("%s: Curr voltage unknown. Cannot enable %s\n",
-                               __func__, sr->name);
+               pr_warn("%s: Curr voltage unknown. Cannot enable %s\n",
+                       __func__, sr->name);
                return -ENODATA;
        }
 
index 1b91ef0c182a0a0bd53a59501b6cb7e6bbc3aa7c..d7cff2632d1e4150923c2756eb8f5d08faeb3a64 100644 (file)
@@ -154,7 +154,7 @@ static int __init sr_dev_init(struct omap_hwmod *oh, void *user)
 
        pdev = omap_device_build(name, i, oh, sr_data, sizeof(*sr_data));
        if (IS_ERR(pdev))
-               pr_warning("%s: Could not build omap_device for %s: %s.\n\n",
+               pr_warn("%s: Could not build omap_device for %s: %s\n",
                        __func__, name, oh->name);
 exit:
        i++;
index a4628a9e760c9a604e00da1b189a76816c57111a..be9ef834fa81d56666f247dae2a598ef422ee15d 100644 (file)
@@ -198,7 +198,7 @@ int omap_vc_bypass_scale(struct voltagedomain *voltdm,
                loop_cnt++;
 
                if (retries_cnt > 10) {
-                       pr_warning("%s: Retry count exceeded\n", __func__);
+                       pr_warn("%s: Retry count exceeded\n", __func__);
                        return -ETIMEDOUT;
                }
 
index 3ac8fe1d8213a8c499e8b38b28ced0040bb08bb7..3783b8625f0f21816bef3cc9851cf8048b957b32 100644 (file)
@@ -55,7 +55,7 @@ static LIST_HEAD(voltdm_list);
 unsigned long voltdm_get_voltage(struct voltagedomain *voltdm)
 {
        if (!voltdm || IS_ERR(voltdm)) {
-               pr_warning("%s: VDD specified does not exist!\n", __func__);
+               pr_warn("%s: VDD specified does not exist!\n", __func__);
                return 0;
        }
 
@@ -77,7 +77,7 @@ int voltdm_scale(struct voltagedomain *voltdm,
        unsigned long volt = 0;
 
        if (!voltdm || IS_ERR(voltdm)) {
-               pr_warning("%s: VDD specified does not exist!\n", __func__);
+               pr_warn("%s: VDD specified does not exist!\n", __func__);
                return -EINVAL;
        }
 
@@ -96,8 +96,8 @@ int voltdm_scale(struct voltagedomain *voltdm,
        }
 
        if (!volt) {
-               pr_warning("%s: not scaling. OPP voltage for %lu, not found.\n",
-                          __func__, target_volt);
+               pr_warn("%s: not scaling. OPP voltage for %lu, not found.\n",
+                       __func__, target_volt);
                return -EINVAL;
        }
 
@@ -122,7 +122,7 @@ void voltdm_reset(struct voltagedomain *voltdm)
        unsigned long target_volt;
 
        if (!voltdm || IS_ERR(voltdm)) {
-               pr_warning("%s: VDD specified does not exist!\n", __func__);
+               pr_warn("%s: VDD specified does not exist!\n", __func__);
                return;
        }
 
@@ -152,7 +152,7 @@ void omap_voltage_get_volttable(struct voltagedomain *voltdm,
                                struct omap_volt_data **volt_data)
 {
        if (!voltdm || IS_ERR(voltdm)) {
-               pr_warning("%s: VDD specified does not exist!\n", __func__);
+               pr_warn("%s: VDD specified does not exist!\n", __func__);
                return;
        }
 
@@ -180,12 +180,12 @@ struct omap_volt_data *omap_voltage_get_voltdata(struct voltagedomain *voltdm,
        int i;
 
        if (!voltdm || IS_ERR(voltdm)) {
-               pr_warning("%s: VDD specified does not exist!\n", __func__);
+               pr_warn("%s: VDD specified does not exist!\n", __func__);
                return ERR_PTR(-EINVAL);
        }
 
        if (!voltdm->volt_data) {
-               pr_warning("%s: voltage table does not exist for vdd_%s\n",
+               pr_warn("%s: voltage table does not exist for vdd_%s\n",
                        __func__, voltdm->name);
                return ERR_PTR(-ENODATA);
        }
@@ -214,7 +214,7 @@ int omap_voltage_register_pmic(struct voltagedomain *voltdm,
                               struct omap_voltdm_pmic *pmic)
 {
        if (!voltdm || IS_ERR(voltdm)) {
-               pr_warning("%s: VDD specified does not exist!\n", __func__);
+               pr_warn("%s: VDD specified does not exist!\n", __func__);
                return -EINVAL;
        }
 
@@ -237,7 +237,7 @@ void omap_change_voltscale_method(struct voltagedomain *voltdm,
                                  int voltscale_method)
 {
        if (!voltdm || IS_ERR(voltdm)) {
-               pr_warning("%s: VDD specified does not exist!\n", __func__);
+               pr_warn("%s: VDD specified does not exist!\n", __func__);
                return;
        }
 
@@ -279,7 +279,7 @@ int __init omap_voltage_late_init(void)
 
                sys_ck = clk_get(NULL, voltdm->sys_clk.name);
                if (IS_ERR(sys_ck)) {
-                       pr_warning("%s: Could not get sys clk.\n", __func__);
+                       pr_warn("%s: Could not get sys clk.\n", __func__);
                        return -EINVAL;
                }
                voltdm->sys_clk.rate = clk_get_rate(sys_ck);
index 97d6607d447a5cf6b5cc815787dc418fa8822675..ff0a68cf7439c31ac8743939b3c503fe8786d066 100644 (file)
@@ -93,8 +93,8 @@ int omap2_wd_timer_reset(struct omap_hwmod *oh)
                udelay(oh->class->sysc->srst_udelay);
 
        if (c == MAX_MODULE_SOFTRESET_WAIT)
-               pr_warning("%s: %s: softreset failed (waited %d usec)\n",
-                          __func__, oh->name, MAX_MODULE_SOFTRESET_WAIT);
+               pr_warn("%s: %s: softreset failed (waited %d usec)\n",
+                       __func__, oh->name, MAX_MODULE_SOFTRESET_WAIT);
        else
                pr_debug("%s: %s: softreset in %d usec\n", __func__,
                         oh->name, c);
index 56edeab17b68dedf77f538fd5fdb1d2465598dab..09d2a26985da7b3758a35f15075a92d7e90e214e 100644 (file)
@@ -550,7 +550,7 @@ static int __init dns323_identify_rev(void)
                        break;
        }
        if (i >= 1000) {
-               pr_warning("DNS-323: Timeout accessing PHY, assuming rev B1\n");
+               pr_warn("DNS-323: Timeout accessing PHY, assuming rev B1\n");
                return DNS323_REV_B1;
        }
        writel((3 << 21)        /* phy ID reg */ |
@@ -562,7 +562,7 @@ static int __init dns323_identify_rev(void)
                        break;
        }
        if (i >= 1000) {
-               pr_warning("DNS-323: Timeout reading PHY, assuming rev B1\n");
+               pr_warn("DNS-323: Timeout reading PHY, assuming rev B1\n");
                return DNS323_REV_B1;
        }
        pr_debug("DNS-323: Ethernet PHY ID 0x%x\n", reg & 0xffff);
@@ -577,8 +577,8 @@ static int __init dns323_identify_rev(void)
        case 0x0e10: /* MV88E1118 */
                return DNS323_REV_C1;
        default:
-               pr_warning("DNS-323: Unknown PHY ID 0x%04x, assuming rev B1\n",
-                          reg & 0xffff);
+               pr_warn("DNS-323: Unknown PHY ID 0x%04x, assuming rev B1\n",
+                       reg & 0xffff);
        }
        return DNS323_REV_B1;
 }
index 6208d125c1b946602ce12977ca45607a264685f6..12086745c9fd915f1b22cb60e922e281a733b68d 100644 (file)
@@ -349,7 +349,7 @@ static void __init tsp2_init(void)
                        gpio_free(TSP2_RTC_GPIO);
        }
        if (tsp2_i2c_rtc.irq == 0)
-               pr_warning("tsp2_init: failed to get RTC IRQ\n");
+               pr_warn("tsp2_init: failed to get RTC IRQ\n");
        i2c_register_board_info(0, &tsp2_i2c_rtc, 1);
 
        /* register Terastation Pro II specific power-off method */
index 9136797addb271816579c78505bd06630397d4d4..c725b7cb98758ea748aea9b512cafe169e7169fd 100644 (file)
@@ -314,7 +314,7 @@ static void __init qnap_ts209_init(void)
                        gpio_free(TS209_RTC_GPIO);
        }
        if (qnap_ts209_i2c_rtc.irq == 0)
-               pr_warning("qnap_ts209_init: failed to get RTC IRQ\n");
+               pr_warn("qnap_ts209_init: failed to get RTC IRQ\n");
        i2c_register_board_info(0, &qnap_ts209_i2c_rtc, 1);
 
        /* register tsx09 specific power-off method */
index 5c079d312015c7762817a8dacf81674ff160a1a6..cf2ab531cabcf693781c71cce084145e3bb1ac1d 100644 (file)
@@ -302,7 +302,7 @@ static void __init qnap_ts409_init(void)
                        gpio_free(TS409_RTC_GPIO);
        }
        if (qnap_ts409_i2c_rtc.irq == 0)
-               pr_warning("qnap_ts409_init: failed to get RTC IRQ\n");
+               pr_warn("qnap_ts409_init: failed to get RTC IRQ\n");
        i2c_register_board_info(0, &qnap_ts409_i2c_rtc, 1);
        platform_device_register(&ts409_leds);
 
index db16dae441e252607bcb2d13f6e172b7410cc19d..1b704d35cf5b2922959ede312995777f510996c7 100644 (file)
@@ -403,8 +403,8 @@ static void ts78xx_fpga_supports(void)
                /* enable devices if magic matches */
                switch ((ts78xx_fpga.id >> 8) & 0xffffff) {
                case TS7800_FPGA_MAGIC:
-                       pr_warning("unrecognised FPGA revision 0x%.2x\n",
-                                       ts78xx_fpga.id & 0xff);
+                       pr_warn("unrecognised FPGA revision 0x%.2x\n",
+                               ts78xx_fpga.id & 0xff);
                        ts78xx_fpga.supports.ts_rtc.present = 1;
                        ts78xx_fpga.supports.ts_nand.present = 1;
                        ts78xx_fpga.supports.ts_rng.present = 1;
index ad5316ae524e63d9899de99721cdff92e254b18e..9eb22297cbe1950d20c00f130a3bdefdb9cda354 100644 (file)
@@ -32,7 +32,6 @@ config CPU_S3C2410
        select S3C2410_DMA if S3C24XX_DMA
        select ARM_S3C2410_CPUFREQ if ARM_S3C24XX_CPUFREQ
        select S3C2410_PM if PM
-       select SAMSUNG_WDT_RESET
        help
          Support for S3C2410 and S3C2410A family from the S3C24XX line
          of Samsung Mobile CPUs.
@@ -76,7 +75,6 @@ config CPU_S3C2442
 config CPU_S3C244X
        def_bool y
        depends on CPU_S3C2440 || CPU_S3C2442
-       select SAMSUNG_WDT_RESET
 
 config CPU_S3C2443
        bool "SAMSUNG S3C2443"
index 44fa95df926286bebedf3070f196c263cad3ee0b..bf50328107bd811b2fa892be4fe87b9eb3d5e78f 100644 (file)
@@ -51,7 +51,6 @@
 #include <plat/devs.h>
 #include <plat/cpu-freq.h>
 #include <plat/pwm-core.h>
-#include <plat/watchdog-reset.h>
 
 #include "common.h"
 
@@ -513,7 +512,6 @@ struct platform_device s3c2443_device_dma = {
 void __init s3c2410_init_clocks(int xtal)
 {
        s3c2410_common_clk_init(NULL, xtal, 0, S3C24XX_VA_CLKPWR);
-       samsung_wdt_reset_init(S3C24XX_VA_WATCHDOG);
 }
 #endif
 
@@ -535,7 +533,6 @@ void __init s3c2416_init_clocks(int xtal)
 void __init s3c2440_init_clocks(int xtal)
 {
        s3c2410_common_clk_init(NULL, xtal, 1, S3C24XX_VA_CLKPWR);
-       samsung_wdt_reset_init(S3C24XX_VA_WATCHDOG);
 }
 #endif
 
@@ -543,7 +540,6 @@ void __init s3c2440_init_clocks(int xtal)
 void __init s3c2442_init_clocks(int xtal)
 {
        s3c2410_common_clk_init(NULL, xtal, 2, S3C24XX_VA_CLKPWR);
-       samsung_wdt_reset_init(S3C24XX_VA_WATCHDOG);
 }
 #endif
 
index ac3ff12a06016504b5f782c88f58e0aff5651ee2..c7ac7e61a22e55c3fd8c1fb7272562e209e7dab5 100644 (file)
@@ -22,7 +22,6 @@ extern  int s3c2410a_init(void);
 extern void s3c2410_map_io(void);
 extern void s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no);
 extern void s3c2410_init_clocks(int xtal);
-extern void s3c2410_restart(enum reboot_mode mode, const char *cmd);
 extern void s3c2410_init_irq(void);
 #else
 #define s3c2410_init_clocks NULL
@@ -38,7 +37,6 @@ extern void s3c2412_map_io(void);
 extern void s3c2412_init_uarts(struct s3c2410_uartcfg *cfg, int no);
 extern void s3c2412_init_clocks(int xtal);
 extern  int s3c2412_baseclk_add(void);
-extern void s3c2412_restart(enum reboot_mode mode, const char *cmd);
 extern void s3c2412_init_irq(void);
 #else
 #define s3c2412_init_clocks NULL
@@ -53,7 +51,6 @@ extern void s3c2416_map_io(void);
 extern void s3c2416_init_uarts(struct s3c2410_uartcfg *cfg, int no);
 extern void s3c2416_init_clocks(int xtal);
 extern  int s3c2416_baseclk_add(void);
-extern void s3c2416_restart(enum reboot_mode mode, const char *cmd);
 extern void s3c2416_init_irq(void);
 
 extern struct syscore_ops s3c2416_irq_syscore_ops;
@@ -67,7 +64,6 @@ extern struct syscore_ops s3c2416_irq_syscore_ops;
 #if defined(CONFIG_CPU_S3C2440) || defined(CONFIG_CPU_S3C2442)
 extern void s3c244x_map_io(void);
 extern void s3c244x_init_uarts(struct s3c2410_uartcfg *cfg, int no);
-extern void s3c244x_restart(enum reboot_mode mode, const char *cmd);
 #else
 #define s3c244x_init_uarts NULL
 #endif
@@ -98,7 +94,6 @@ extern void s3c2443_map_io(void);
 extern void s3c2443_init_uarts(struct s3c2410_uartcfg *cfg, int no);
 extern void s3c2443_init_clocks(int xtal);
 extern  int s3c2443_baseclk_add(void);
-extern void s3c2443_restart(enum reboot_mode mode, const char *cmd);
 extern void s3c2443_init_irq(void);
 #else
 #define s3c2443_init_clocks NULL
index c3feff3c0488156fd1c89d833e7f979371e46229..ffe37bdb9f59370e3fd8256ec2df27e8fb4502a2 100644 (file)
@@ -42,8 +42,6 @@
 #define S3C2443_URSTCON                        S3C2443_CLKREG(0x88)
 #define S3C2443_UCLKCON                        S3C2443_CLKREG(0x8C)
 
-#define S3C2443_SWRST_RESET            (0x533c2443)
-
 #define S3C2443_PLLCON_OFF             (1<<24)
 
 #define S3C2443_CLKSRC_EPLLREF_XTAL    (2<<7)
index 5157e250dd133ccdba63d6a730c30fdbd8a252d7..3e63777a109f7cee820a8837440a6210217de6ad 100644 (file)
@@ -247,5 +247,4 @@ MACHINE_START(AML_M5900, "AML_M5900")
        .init_irq       = s3c2410_init_irq,
        .init_machine   = amlm5900_init,
        .init_time      = amlm5900_init_time,
-       .restart        = s3c2410_restart,
 MACHINE_END
index e053581cab0b53b4c22af8af8fcc0e71b8524701..d03df0df01fa204cea8f172e6cf681984d3b664d 100644 (file)
@@ -430,5 +430,4 @@ MACHINE_START(ANUBIS, "Simtec-Anubis")
        .init_machine   = anubis_init,
        .init_irq       = s3c2440_init_irq,
        .init_time      = anubis_init_time,
-       .restart        = s3c244x_restart,
 MACHINE_END
index 9db768f448a508c72419a1382eb229b8985534f2..9ae170fef2a7b89ca53c60f4ca3b2c48e5975c29 100644 (file)
@@ -218,5 +218,4 @@ MACHINE_START(AT2440EVB, "AT2440EVB")
        .init_machine   = at2440evb_init,
        .init_irq       = s3c2440_init_irq,
        .init_time      = at2440evb_init_time,
-       .restart        = s3c244x_restart,
 MACHINE_END
index f9112b801a33c42aafd4280020ddf74730273af2..ed07cf392d4bb9e2d6321a6c2c85ce0d91c52a3a 100644 (file)
@@ -591,5 +591,4 @@ MACHINE_START(BAST, "Simtec-BAST")
        .init_irq       = s3c2410_init_irq,
        .init_machine   = bast_init,
        .init_time      = bast_init_time,
-       .restart        = s3c2410_restart,
 MACHINE_END
index fc3a08d0cb3f5fb20d0e2a7bbab05ca9c7e65026..6d1e0b9c5b27cc0ece0eb3f61a69111d62dec931 100644 (file)
@@ -597,5 +597,4 @@ MACHINE_START(NEO1973_GTA02, "GTA02")
        .init_irq       = s3c2442_init_irq,
        .init_machine   = gta02_machine_init,
        .init_time      = gta02_init_time,
-       .restart        = s3c244x_restart,
 MACHINE_END
index c9a99bbad5459007cdfdc91ae15d6f848bacc60b..d35ddc1d99916ff5bd078b377fedb16765118cce 100644 (file)
@@ -747,5 +747,4 @@ MACHINE_START(H1940, "IPAQ-H1940")
        .init_irq       = s3c2410_init_irq,
        .init_machine   = h1940_init,
        .init_time      = h1940_init_time,
-       .restart        = s3c2410_restart,
 MACHINE_END
index 7804d3c6991b769eb68aa630bd495bbd53c7e820..7d99fe8f6157612767b667d8a2360178d4c065ab 100644 (file)
@@ -670,5 +670,4 @@ MACHINE_START(JIVE, "JIVE")
        .map_io         = jive_map_io,
        .init_machine   = jive_machine_init,
        .init_time      = jive_init_time,
-       .restart        = s3c2412_restart,
 MACHINE_END
index 5cc40ec1d2541f603c010c9db1af95de40a60dac..a8521684a7f543fedf47ea365d0f02dd57bb313d 100644 (file)
@@ -695,5 +695,4 @@ MACHINE_START(MINI2440, "MINI2440")
        .init_machine   = mini2440_init,
        .init_irq       = s3c2440_init_irq,
        .init_time      = mini2440_init_time,
-       .restart        = s3c244x_restart,
 MACHINE_END
index 3ac2a54348d6f102a0c1e0cb3cf9c28627813637..171c1f11fd224bde7c97196c54294028805a3c0c 100644 (file)
@@ -599,7 +599,6 @@ MACHINE_START(N30, "Acer-N30")
        .init_machine   = n30_init,
        .init_irq       = s3c2410_init_irq,
        .map_io         = n30_map_io,
-       .restart        = s3c2410_restart,
 MACHINE_END
 
 MACHINE_START(N35, "Acer-N35")
@@ -610,5 +609,4 @@ MACHINE_START(N35, "Acer-N35")
        .init_machine   = n30_init,
        .init_irq       = s3c2410_init_irq,
        .map_io         = n30_map_io,
-       .restart        = s3c2410_restart,
 MACHINE_END
index c82c281ce351faa84c00d73d389e3d5fbb92811a..2a61d13dcd6cdbd6101d819bc801a9d5e75ac064 100644 (file)
@@ -159,5 +159,4 @@ MACHINE_START(NEXCODER_2440, "NexVision - Nexcoder 2440")
        .init_machine   = nexcoder_init,
        .init_irq       = s3c2440_init_irq,
        .init_time      = nexcoder_init_time,
-       .restart        = s3c244x_restart,
 MACHINE_END
index 189147b80ecae6fce32db6109d21f3b0b570e862..2f6fdc32683524b45933f3173ee3fd7d6aacbda1 100644 (file)
@@ -412,5 +412,4 @@ MACHINE_START(OSIRIS, "Simtec-OSIRIS")
        .init_irq       = s3c2440_init_irq,
        .init_machine   = osiris_init,
        .init_time      = osiris_init_time,
-       .restart        = s3c244x_restart,
 MACHINE_END
index 45833001186dfe262ef16f6f4ba6bfe59769d48f..345a484b93cc5be58553ee4af6e570bdb3cbec11 100644 (file)
@@ -122,5 +122,4 @@ MACHINE_START(OTOM, "Nex Vision - Otom 1.1")
        .init_machine   = otom11_init,
        .init_irq       = s3c2410_init_irq,
        .init_time      = otom11_init_time,
-       .restart        = s3c2410_restart,
 MACHINE_END
index 228c9094519d821ca82f8293a1aa16f6176e4779..984516e8307aa599272cdc3bee33142567e0069a 100644 (file)
@@ -352,5 +352,4 @@ MACHINE_START(QT2410, "QT2410")
        .init_irq       = s3c2410_init_irq,
        .init_machine   = qt2410_machine_init,
        .init_time      = qt2410_init_time,
-       .restart        = s3c2410_restart,
 MACHINE_END
index e2c6541909c1deedcf661748dd75e68afd412130..c3f2682d0c62a6454e7de8800c3b665b967adc92 100644 (file)
@@ -812,5 +812,4 @@ MACHINE_START(RX1950, "HP iPAQ RX1950")
        .init_irq       = s3c2442_init_irq,
        .init_machine = rx1950_init_machine,
        .init_time      = rx1950_init_time,
-       .restart        = s3c244x_restart,
 MACHINE_END
index 6e749ec3a2ea53327cae39c9489e5423a2e47bdb..cf55196f89ca34ae4139ede777bc6a35af05fead 100644 (file)
@@ -215,5 +215,4 @@ MACHINE_START(RX3715, "IPAQ-RX3715")
        .init_irq       = s3c2440_init_irq,
        .init_machine   = rx3715_init_machine,
        .init_time      = rx3715_init_time,
-       .restart        = s3c244x_restart,
 MACHINE_END
index e4dcb9aa2ca29e508e179362ff2a2aebf67d7fdb..f886478b88c55b726ee907959524b8a409b35f52 100644 (file)
@@ -51,5 +51,4 @@ DT_MACHINE_START(S3C2416_DT, "Samsung S3C2416 (Flattened Device Tree)")
        .map_io         = s3c2416_dt_map_io,
        .init_irq       = irqchip_init,
        .init_machine   = s3c2416_dt_machine_init,
-       .restart        = s3c2416_restart,
 MACHINE_END
index 419fadd6e4468423505b2a521ab9271b9d6bed9f..27dd6605e395d42a95989885ec2db906fd4b1084 100644 (file)
@@ -124,5 +124,4 @@ MACHINE_START(SMDK2410, "SMDK2410") /* @TODO: request a new identifier and switc
        .init_irq       = s3c2410_init_irq,
        .init_machine   = smdk2410_init,
        .init_time      = smdk2410_init_time,
-       .restart        = s3c2410_restart,
 MACHINE_END
index 10726bf8492019133b8589c27f0a9402ecee9e8d..586e4a3b8d5d106387c451b8cfb6f64432d45013 100644 (file)
@@ -138,7 +138,6 @@ MACHINE_START(S3C2413, "S3C2413")
        .map_io         = smdk2413_map_io,
        .init_machine   = smdk2413_machine_init,
        .init_time      = samsung_timer_init,
-       .restart        = s3c2412_restart,
 MACHINE_END
 
 MACHINE_START(SMDK2412, "SMDK2412")
@@ -150,7 +149,6 @@ MACHINE_START(SMDK2412, "SMDK2412")
        .map_io         = smdk2413_map_io,
        .init_machine   = smdk2413_machine_init,
        .init_time      = samsung_timer_init,
-       .restart        = s3c2412_restart,
 MACHINE_END
 
 MACHINE_START(SMDK2413, "SMDK2413")
@@ -162,5 +160,4 @@ MACHINE_START(SMDK2413, "SMDK2413")
        .map_io         = smdk2413_map_io,
        .init_machine   = smdk2413_machine_init,
        .init_time      = smdk2413_init_time,
-       .restart        = s3c2412_restart,
 MACHINE_END
index 24189e8e85605939a5bd51d34ce86a5f082c2ec6..86394f72d29ef22770437e70248b50668840ca21 100644 (file)
@@ -262,5 +262,4 @@ MACHINE_START(SMDK2416, "SMDK2416")
        .map_io         = smdk2416_map_io,
        .init_machine   = smdk2416_machine_init,
        .init_time      = smdk2416_init_time,
-       .restart        = s3c2416_restart,
 MACHINE_END
index 5fb89c0ae17aaa9b4c4cf87e463552828628adaa..9bb96bfbb420185a510d938d348684c98c5f5188 100644 (file)
@@ -185,5 +185,4 @@ MACHINE_START(S3C2440, "SMDK2440")
        .map_io         = smdk2440_map_io,
        .init_machine   = smdk2440_machine_init,
        .init_time      = smdk2440_init_time,
-       .restart        = s3c244x_restart,
 MACHINE_END
index 0ed77614dcfe724baffe334093120df774740954..87fe5c5b80739fb9c36627943e813260a619406f 100644 (file)
@@ -150,5 +150,4 @@ MACHINE_START(SMDK2443, "SMDK2443")
        .map_io         = smdk2443_map_io,
        .init_machine   = smdk2443_machine_init,
        .init_time      = smdk2443_init_time,
-       .restart        = s3c2443_restart,
 MACHINE_END
index c616ca2d409e9316755b4ae92065e8379fa24349..2deb62f92fb2c30408477fc614bbb02602852f70 100644 (file)
@@ -157,5 +157,4 @@ MACHINE_START(TCT_HAMMER, "TCT_HAMMER")
        .init_irq       = s3c2410_init_irq,
        .init_machine   = tct_hammer_init,
        .init_time      = tct_hammer_init_time,
-       .restart        = s3c2410_restart,
 MACHINE_END
index f88c584c30017ab7f438b00d13be80a1b9a83979..89f32bd3f01b53e442cd963037bf18613f652e5b 100644 (file)
@@ -340,5 +340,4 @@ MACHINE_START(VR1000, "Thorcom-VR1000")
        .init_machine   = vr1000_init,
        .init_irq       = s3c2410_init_irq,
        .init_time      = vr1000_init_time,
-       .restart        = s3c2410_restart,
 MACHINE_END
index 9d4f6475069887ff1b4c5addd0d276aea265d114..b4460d5f70112354e702ad799929db0d87d47aa3 100644 (file)
@@ -165,5 +165,4 @@ MACHINE_START(VSTMS, "VSTMS")
        .init_machine   = vstms_init,
        .map_io         = vstms_map_io,
        .init_time      = vstms_init_time,
-       .restart        = s3c2412_restart,
 MACHINE_END
index 5ffe828cd659f2c6a41de1838e10e06928c95e9a..2a6985a4a0ff8952b32e1d144d12416432e2c4d0 100644 (file)
@@ -42,7 +42,6 @@
 #include <plat/cpu.h>
 #include <plat/devs.h>
 #include <plat/pm.h>
-#include <plat/watchdog-reset.h>
 
 #include <plat/gpio-core.h>
 #include <plat/gpio-cfg.h>
@@ -135,15 +134,3 @@ int __init s3c2410a_init(void)
        s3c2410_dev.bus = &s3c2410a_subsys;
        return s3c2410_init();
 }
-
-void s3c2410_restart(enum reboot_mode mode, const char *cmd)
-{
-       if (mode == REBOOT_SOFT) {
-               soft_restart(0);
-       }
-
-       samsung_wdt_reset();
-
-       /* we'll take a jump through zero as a poor second */
-       soft_restart(0);
-}
index 569f3f5a6c71ea861141bbb0c94af18e882c99e4..ecf2c77ab88b17c508417a928909af0bb0ec286d 100644 (file)
@@ -48,9 +48,6 @@
 #include "regs-dsc.h"
 #include "s3c2412-power.h"
 
-#define S3C2412_SWRST                  (S3C24XX_VA_CLKPWR + 0x30)
-#define S3C2412_SWRST_RESET            (0x533C2412)
-
 #ifndef CONFIG_CPU_S3C2412_ONLY
 void __iomem *s3c24xx_va_gpio2 = S3C24XX_VA_GPIO;
 
@@ -128,26 +125,6 @@ static void s3c2412_idle(void)
        cpu_do_idle();
 }
 
-void s3c2412_restart(enum reboot_mode mode, const char *cmd)
-{
-       if (mode == REBOOT_SOFT)
-               soft_restart(0);
-
-       /* errata "Watch-dog/Software Reset Problem" specifies that
-        * this reset must be done with the SYSCLK sourced from
-        * EXTCLK instead of FOUT to avoid a glitch in the reset
-        * mechanism.
-        *
-        * See the watchdog section of the S3C2412 manual for more
-        * information on this fix.
-        */
-
-       __raw_writel(0x00, S3C2412_CLKSRC);
-       __raw_writel(S3C2412_SWRST_RESET, S3C2412_SWRST);
-
-       mdelay(1);
-}
-
 /* s3c2412_map_io
  *
  * register the standard cpu IO areas, and any passed in from the
index 9fe260ae11e17b2cdfcce03a862c570c43ba756c..bfd4da86deb8e94d20698ceef91f06fd305a1ff2 100644 (file)
@@ -81,14 +81,6 @@ static struct device s3c2416_dev = {
        .bus            = &s3c2416_subsys,
 };
 
-void s3c2416_restart(enum reboot_mode mode, const char *cmd)
-{
-       if (mode == REBOOT_SOFT)
-               soft_restart(0);
-
-       __raw_writel(S3C2443_SWRST_RESET, S3C2443_SWRST);
-}
-
 int __init s3c2416_init(void)
 {
        printk(KERN_INFO "S3C2416: Initializing architecture\n");
index c7a804d0348e79be54d800b2207a008991a6dd49..87b6b89d8ee7df0e72d2b251b7ae6a4275db097e 100644 (file)
@@ -61,14 +61,6 @@ static struct device s3c2443_dev = {
        .bus            = &s3c2443_subsys,
 };
 
-void s3c2443_restart(enum reboot_mode mode, const char *cmd)
-{
-       if (mode == REBOOT_SOFT)
-               soft_restart(0);
-
-       __raw_writel(S3C2443_SWRST_RESET, S3C2443_SWRST);
-}
-
 int __init s3c2443_init(void)
 {
        printk("S3C2443: Initialising architecture\n");
index d1c3e65785a1305f6c8565385ddb6fde6064ca5d..177f97802745fa133f4bef1ed001541a023d850c 100644 (file)
@@ -42,7 +42,6 @@
 #include <plat/cpu.h>
 #include <plat/pm.h>
 #include <plat/nand-core.h>
-#include <plat/watchdog-reset.h>
 
 #include "common.h"
 #include "regs-dsc.h"
@@ -137,14 +136,3 @@ struct syscore_ops s3c244x_pm_syscore_ops = {
        .suspend        = s3c244x_suspend,
        .resume         = s3c244x_resume,
 };
-
-void s3c244x_restart(enum reboot_mode mode, const char *cmd)
-{
-       if (mode == REBOOT_SOFT)
-               soft_restart(0);
-
-       samsung_wdt_reset();
-
-       /* we'll take a jump through zero as a poor second */
-       soft_restart(0);
-}
diff --git a/arch/arm/mach-s5pv210/include/mach/regs-clock.h b/arch/arm/mach-s5pv210/include/mach/regs-clock.h
deleted file mode 100644 (file)
index b14ffcd..0000000
+++ /dev/null
@@ -1,202 +0,0 @@
-/* linux/arch/arm/mach-s5pv210/include/mach/regs-clock.h
- *
- * Copyright (c) 2010 Samsung Electronics Co., Ltd.
- *             http://www.samsung.com/
- *
- * S5PV210 - Clock register definitions
- *
- * This program 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 __ASM_ARCH_REGS_CLOCK_H
-#define __ASM_ARCH_REGS_CLOCK_H __FILE__
-
-#include <plat/map-base.h>
-
-#define S5P_CLKREG(x)          (S3C_VA_SYS + (x))
-
-#define S5P_APLL_LOCK          S5P_CLKREG(0x00)
-#define S5P_MPLL_LOCK          S5P_CLKREG(0x08)
-#define S5P_EPLL_LOCK          S5P_CLKREG(0x10)
-#define S5P_VPLL_LOCK          S5P_CLKREG(0x20)
-
-#define S5P_APLL_CON           S5P_CLKREG(0x100)
-#define S5P_MPLL_CON           S5P_CLKREG(0x108)
-#define S5P_EPLL_CON           S5P_CLKREG(0x110)
-#define S5P_EPLL_CON1          S5P_CLKREG(0x114)
-#define S5P_VPLL_CON           S5P_CLKREG(0x120)
-
-#define S5P_CLK_SRC0           S5P_CLKREG(0x200)
-#define S5P_CLK_SRC1           S5P_CLKREG(0x204)
-#define S5P_CLK_SRC2           S5P_CLKREG(0x208)
-#define S5P_CLK_SRC3           S5P_CLKREG(0x20C)
-#define S5P_CLK_SRC4           S5P_CLKREG(0x210)
-#define S5P_CLK_SRC5           S5P_CLKREG(0x214)
-#define S5P_CLK_SRC6           S5P_CLKREG(0x218)
-
-#define S5P_CLK_SRC_MASK0      S5P_CLKREG(0x280)
-#define S5P_CLK_SRC_MASK1      S5P_CLKREG(0x284)
-
-#define S5P_CLK_DIV0           S5P_CLKREG(0x300)
-#define S5P_CLK_DIV1           S5P_CLKREG(0x304)
-#define S5P_CLK_DIV2           S5P_CLKREG(0x308)
-#define S5P_CLK_DIV3           S5P_CLKREG(0x30C)
-#define S5P_CLK_DIV4           S5P_CLKREG(0x310)
-#define S5P_CLK_DIV5           S5P_CLKREG(0x314)
-#define S5P_CLK_DIV6           S5P_CLKREG(0x318)
-#define S5P_CLK_DIV7           S5P_CLKREG(0x31C)
-
-#define S5P_CLKGATE_MAIN0      S5P_CLKREG(0x400)
-#define S5P_CLKGATE_MAIN1      S5P_CLKREG(0x404)
-#define S5P_CLKGATE_MAIN2      S5P_CLKREG(0x408)
-
-#define S5P_CLKGATE_PERI0      S5P_CLKREG(0x420)
-#define S5P_CLKGATE_PERI1      S5P_CLKREG(0x424)
-
-#define S5P_CLKGATE_SCLK0      S5P_CLKREG(0x440)
-#define S5P_CLKGATE_SCLK1      S5P_CLKREG(0x444)
-#define S5P_CLKGATE_IP0                S5P_CLKREG(0x460)
-#define S5P_CLKGATE_IP1                S5P_CLKREG(0x464)
-#define S5P_CLKGATE_IP2                S5P_CLKREG(0x468)
-#define S5P_CLKGATE_IP3                S5P_CLKREG(0x46C)
-#define S5P_CLKGATE_IP4                S5P_CLKREG(0x470)
-
-#define S5P_CLKGATE_BLOCK      S5P_CLKREG(0x480)
-#define S5P_CLKGATE_BUS0       S5P_CLKREG(0x484)
-#define S5P_CLKGATE_BUS1       S5P_CLKREG(0x488)
-#define S5P_CLK_OUT            S5P_CLKREG(0x500)
-
-/* DIV/MUX STATUS */
-#define S5P_CLKDIV_STAT0       S5P_CLKREG(0x1000)
-#define S5P_CLKDIV_STAT1       S5P_CLKREG(0x1004)
-#define S5P_CLKMUX_STAT0       S5P_CLKREG(0x1100)
-#define S5P_CLKMUX_STAT1       S5P_CLKREG(0x1104)
-
-/* CLKSRC0 */
-#define S5P_CLKSRC0_MUX200_SHIFT       (16)
-#define S5P_CLKSRC0_MUX200_MASK                (0x1 << S5P_CLKSRC0_MUX200_SHIFT)
-#define S5P_CLKSRC0_MUX166_MASK                (0x1<<20)
-#define S5P_CLKSRC0_MUX133_MASK                (0x1<<24)
-
-/* CLKSRC2 */
-#define S5P_CLKSRC2_G3D_SHIFT           (0)
-#define S5P_CLKSRC2_G3D_MASK            (0x3 << S5P_CLKSRC2_G3D_SHIFT)
-#define S5P_CLKSRC2_MFC_SHIFT           (4)
-#define S5P_CLKSRC2_MFC_MASK            (0x3 << S5P_CLKSRC2_MFC_SHIFT)
-
-/* CLKSRC6*/
-#define S5P_CLKSRC6_ONEDRAM_SHIFT       (24)
-#define S5P_CLKSRC6_ONEDRAM_MASK        (0x3 << S5P_CLKSRC6_ONEDRAM_SHIFT)
-
-/* CLKDIV0 */
-#define S5P_CLKDIV0_APLL_SHIFT         (0)
-#define S5P_CLKDIV0_APLL_MASK          (0x7 << S5P_CLKDIV0_APLL_SHIFT)
-#define S5P_CLKDIV0_A2M_SHIFT          (4)
-#define S5P_CLKDIV0_A2M_MASK           (0x7 << S5P_CLKDIV0_A2M_SHIFT)
-#define S5P_CLKDIV0_HCLK200_SHIFT      (8)
-#define S5P_CLKDIV0_HCLK200_MASK       (0x7 << S5P_CLKDIV0_HCLK200_SHIFT)
-#define S5P_CLKDIV0_PCLK100_SHIFT      (12)
-#define S5P_CLKDIV0_PCLK100_MASK       (0x7 << S5P_CLKDIV0_PCLK100_SHIFT)
-#define S5P_CLKDIV0_HCLK166_SHIFT      (16)
-#define S5P_CLKDIV0_HCLK166_MASK       (0xF << S5P_CLKDIV0_HCLK166_SHIFT)
-#define S5P_CLKDIV0_PCLK83_SHIFT       (20)
-#define S5P_CLKDIV0_PCLK83_MASK                (0x7 << S5P_CLKDIV0_PCLK83_SHIFT)
-#define S5P_CLKDIV0_HCLK133_SHIFT      (24)
-#define S5P_CLKDIV0_HCLK133_MASK       (0xF << S5P_CLKDIV0_HCLK133_SHIFT)
-#define S5P_CLKDIV0_PCLK66_SHIFT       (28)
-#define S5P_CLKDIV0_PCLK66_MASK                (0x7 << S5P_CLKDIV0_PCLK66_SHIFT)
-
-/* CLKDIV2 */
-#define S5P_CLKDIV2_G3D_SHIFT           (0)
-#define S5P_CLKDIV2_G3D_MASK            (0xF << S5P_CLKDIV2_G3D_SHIFT)
-#define S5P_CLKDIV2_MFC_SHIFT           (4)
-#define S5P_CLKDIV2_MFC_MASK            (0xF << S5P_CLKDIV2_MFC_SHIFT)
-
-/* CLKDIV6 */
-#define S5P_CLKDIV6_ONEDRAM_SHIFT       (28)
-#define S5P_CLKDIV6_ONEDRAM_MASK        (0xF << S5P_CLKDIV6_ONEDRAM_SHIFT)
-
-#define S5P_SWRESET            S5P_CLKREG(0x2000)
-
-#define S5P_ARM_MCS_CON                S5P_CLKREG(0x6100)
-
-/* Registers related to power management */
-#define S5P_PWR_CFG            S5P_CLKREG(0xC000)
-#define S5P_EINT_WAKEUP_MASK   S5P_CLKREG(0xC004)
-#define S5P_WAKEUP_MASK                S5P_CLKREG(0xC008)
-#define S5P_PWR_MODE           S5P_CLKREG(0xC00C)
-#define S5P_NORMAL_CFG         S5P_CLKREG(0xC010)
-#define S5P_IDLE_CFG           S5P_CLKREG(0xC020)
-#define S5P_STOP_CFG           S5P_CLKREG(0xC030)
-#define S5P_STOP_MEM_CFG       S5P_CLKREG(0xC034)
-#define S5P_SLEEP_CFG          S5P_CLKREG(0xC040)
-
-#define S5P_OSC_FREQ           S5P_CLKREG(0xC100)
-#define S5P_OSC_STABLE         S5P_CLKREG(0xC104)
-#define S5P_PWR_STABLE         S5P_CLKREG(0xC108)
-#define S5P_MTC_STABLE         S5P_CLKREG(0xC110)
-#define S5P_CLAMP_STABLE       S5P_CLKREG(0xC114)
-
-#define S5P_WAKEUP_STAT                S5P_CLKREG(0xC200)
-#define S5P_BLK_PWR_STAT       S5P_CLKREG(0xC204)
-
-#define S5P_OTHERS             S5P_CLKREG(0xE000)
-#define S5P_OM_STAT            S5P_CLKREG(0xE100)
-#define S5P_HDMI_PHY_CONTROL   S5P_CLKREG(0xE804)
-#define S5P_USB_PHY_CONTROL    S5P_CLKREG(0xE80C)
-#define S5P_DAC_PHY_CONTROL    S5P_CLKREG(0xE810)
-
-#define S5P_INFORM0            S5P_CLKREG(0xF000)
-#define S5P_INFORM1            S5P_CLKREG(0xF004)
-#define S5P_INFORM2            S5P_CLKREG(0xF008)
-#define S5P_INFORM3            S5P_CLKREG(0xF00C)
-#define S5P_INFORM4            S5P_CLKREG(0xF010)
-#define S5P_INFORM5            S5P_CLKREG(0xF014)
-#define S5P_INFORM6            S5P_CLKREG(0xF018)
-#define S5P_INFORM7            S5P_CLKREG(0xF01C)
-
-#define S5P_RST_STAT           S5P_CLKREG(0xA000)
-#define S5P_OSC_CON            S5P_CLKREG(0x8000)
-#define S5P_MDNIE_SEL          S5P_CLKREG(0x7008)
-#define S5P_MIPI_PHY_CON0      S5P_CLKREG(0x7200)
-#define S5P_MIPI_PHY_CON1      S5P_CLKREG(0x7204)
-
-#define S5P_IDLE_CFG_TL_MASK   (3 << 30)
-#define S5P_IDLE_CFG_TM_MASK   (3 << 28)
-#define S5P_IDLE_CFG_TL_ON     (2 << 30)
-#define S5P_IDLE_CFG_TM_ON     (2 << 28)
-#define S5P_IDLE_CFG_DIDLE     (1 << 0)
-
-#define S5P_CFG_WFI_CLEAN              (~(3 << 8))
-#define S5P_CFG_WFI_IDLE               (1 << 8)
-#define S5P_CFG_WFI_STOP               (2 << 8)
-#define S5P_CFG_WFI_SLEEP              (3 << 8)
-
-#define S5P_OTHER_SYS_INT              24
-#define S5P_OTHER_STA_TYPE             23
-#define S5P_OTHER_SYSC_INTOFF          (1 << 0)
-#define STA_TYPE_EXPON                 0
-#define STA_TYPE_SFR                   1
-
-#define S5P_PWR_STA_EXP_SCALE          0
-#define S5P_PWR_STA_CNT                        4
-
-#define S5P_PWR_STABLE_COUNT           85500
-
-#define S5P_SLEEP_CFG_OSC_EN           (1 << 0)
-#define S5P_SLEEP_CFG_USBOSC_EN                (1 << 1)
-
-/* OTHERS Resgister */
-#define S5P_OTHERS_RET_IO              (1 << 31)
-#define S5P_OTHERS_RET_CF              (1 << 30)
-#define S5P_OTHERS_RET_MMC             (1 << 29)
-#define S5P_OTHERS_RET_UART            (1 << 28)
-#define S5P_OTHERS_USB_SIG_MASK                (1 << 16)
-
-/* S5P_DAC_CONTROL */
-#define S5P_DAC_ENABLE                 (1)
-#define S5P_DAC_DISABLE                        (0)
-
-#endif /* __ASM_ARCH_REGS_CLOCK_H */
index 123163dd2ab0b394c100eda6c828cf644fb3e495..21b4b13c5ab787f0707c00c5125b285f73dcdd60 100644 (file)
@@ -24,9 +24,8 @@
 
 #include <plat/pm-common.h>
 
-#include <mach/regs-clock.h>
-
 #include "common.h"
+#include "regs-clock.h"
 
 static struct sleep_save s5pv210_core_save[] = {
        /* Clock ETC */
diff --git a/arch/arm/mach-s5pv210/regs-clock.h b/arch/arm/mach-s5pv210/regs-clock.h
new file mode 100644 (file)
index 0000000..4640f0f
--- /dev/null
@@ -0,0 +1,201 @@
+/*
+ * Copyright (c) 2010 Samsung Electronics Co., Ltd.
+ *             http://www.samsung.com/
+ *
+ * S5PV210 - Clock register definitions
+ *
+ * This program 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 __ASM_ARCH_REGS_CLOCK_H
+#define __ASM_ARCH_REGS_CLOCK_H __FILE__
+
+#include <plat/map-base.h>
+
+#define S5P_CLKREG(x)          (S3C_VA_SYS + (x))
+
+#define S5P_APLL_LOCK          S5P_CLKREG(0x00)
+#define S5P_MPLL_LOCK          S5P_CLKREG(0x08)
+#define S5P_EPLL_LOCK          S5P_CLKREG(0x10)
+#define S5P_VPLL_LOCK          S5P_CLKREG(0x20)
+
+#define S5P_APLL_CON           S5P_CLKREG(0x100)
+#define S5P_MPLL_CON           S5P_CLKREG(0x108)
+#define S5P_EPLL_CON           S5P_CLKREG(0x110)
+#define S5P_EPLL_CON1          S5P_CLKREG(0x114)
+#define S5P_VPLL_CON           S5P_CLKREG(0x120)
+
+#define S5P_CLK_SRC0           S5P_CLKREG(0x200)
+#define S5P_CLK_SRC1           S5P_CLKREG(0x204)
+#define S5P_CLK_SRC2           S5P_CLKREG(0x208)
+#define S5P_CLK_SRC3           S5P_CLKREG(0x20C)
+#define S5P_CLK_SRC4           S5P_CLKREG(0x210)
+#define S5P_CLK_SRC5           S5P_CLKREG(0x214)
+#define S5P_CLK_SRC6           S5P_CLKREG(0x218)
+
+#define S5P_CLK_SRC_MASK0      S5P_CLKREG(0x280)
+#define S5P_CLK_SRC_MASK1      S5P_CLKREG(0x284)
+
+#define S5P_CLK_DIV0           S5P_CLKREG(0x300)
+#define S5P_CLK_DIV1           S5P_CLKREG(0x304)
+#define S5P_CLK_DIV2           S5P_CLKREG(0x308)
+#define S5P_CLK_DIV3           S5P_CLKREG(0x30C)
+#define S5P_CLK_DIV4           S5P_CLKREG(0x310)
+#define S5P_CLK_DIV5           S5P_CLKREG(0x314)
+#define S5P_CLK_DIV6           S5P_CLKREG(0x318)
+#define S5P_CLK_DIV7           S5P_CLKREG(0x31C)
+
+#define S5P_CLKGATE_MAIN0      S5P_CLKREG(0x400)
+#define S5P_CLKGATE_MAIN1      S5P_CLKREG(0x404)
+#define S5P_CLKGATE_MAIN2      S5P_CLKREG(0x408)
+
+#define S5P_CLKGATE_PERI0      S5P_CLKREG(0x420)
+#define S5P_CLKGATE_PERI1      S5P_CLKREG(0x424)
+
+#define S5P_CLKGATE_SCLK0      S5P_CLKREG(0x440)
+#define S5P_CLKGATE_SCLK1      S5P_CLKREG(0x444)
+#define S5P_CLKGATE_IP0                S5P_CLKREG(0x460)
+#define S5P_CLKGATE_IP1                S5P_CLKREG(0x464)
+#define S5P_CLKGATE_IP2                S5P_CLKREG(0x468)
+#define S5P_CLKGATE_IP3                S5P_CLKREG(0x46C)
+#define S5P_CLKGATE_IP4                S5P_CLKREG(0x470)
+
+#define S5P_CLKGATE_BLOCK      S5P_CLKREG(0x480)
+#define S5P_CLKGATE_BUS0       S5P_CLKREG(0x484)
+#define S5P_CLKGATE_BUS1       S5P_CLKREG(0x488)
+#define S5P_CLK_OUT            S5P_CLKREG(0x500)
+
+/* DIV/MUX STATUS */
+#define S5P_CLKDIV_STAT0       S5P_CLKREG(0x1000)
+#define S5P_CLKDIV_STAT1       S5P_CLKREG(0x1004)
+#define S5P_CLKMUX_STAT0       S5P_CLKREG(0x1100)
+#define S5P_CLKMUX_STAT1       S5P_CLKREG(0x1104)
+
+/* CLKSRC0 */
+#define S5P_CLKSRC0_MUX200_SHIFT       (16)
+#define S5P_CLKSRC0_MUX200_MASK                (0x1 << S5P_CLKSRC0_MUX200_SHIFT)
+#define S5P_CLKSRC0_MUX166_MASK                (0x1<<20)
+#define S5P_CLKSRC0_MUX133_MASK                (0x1<<24)
+
+/* CLKSRC2 */
+#define S5P_CLKSRC2_G3D_SHIFT           (0)
+#define S5P_CLKSRC2_G3D_MASK            (0x3 << S5P_CLKSRC2_G3D_SHIFT)
+#define S5P_CLKSRC2_MFC_SHIFT           (4)
+#define S5P_CLKSRC2_MFC_MASK            (0x3 << S5P_CLKSRC2_MFC_SHIFT)
+
+/* CLKSRC6*/
+#define S5P_CLKSRC6_ONEDRAM_SHIFT       (24)
+#define S5P_CLKSRC6_ONEDRAM_MASK        (0x3 << S5P_CLKSRC6_ONEDRAM_SHIFT)
+
+/* CLKDIV0 */
+#define S5P_CLKDIV0_APLL_SHIFT         (0)
+#define S5P_CLKDIV0_APLL_MASK          (0x7 << S5P_CLKDIV0_APLL_SHIFT)
+#define S5P_CLKDIV0_A2M_SHIFT          (4)
+#define S5P_CLKDIV0_A2M_MASK           (0x7 << S5P_CLKDIV0_A2M_SHIFT)
+#define S5P_CLKDIV0_HCLK200_SHIFT      (8)
+#define S5P_CLKDIV0_HCLK200_MASK       (0x7 << S5P_CLKDIV0_HCLK200_SHIFT)
+#define S5P_CLKDIV0_PCLK100_SHIFT      (12)
+#define S5P_CLKDIV0_PCLK100_MASK       (0x7 << S5P_CLKDIV0_PCLK100_SHIFT)
+#define S5P_CLKDIV0_HCLK166_SHIFT      (16)
+#define S5P_CLKDIV0_HCLK166_MASK       (0xF << S5P_CLKDIV0_HCLK166_SHIFT)
+#define S5P_CLKDIV0_PCLK83_SHIFT       (20)
+#define S5P_CLKDIV0_PCLK83_MASK                (0x7 << S5P_CLKDIV0_PCLK83_SHIFT)
+#define S5P_CLKDIV0_HCLK133_SHIFT      (24)
+#define S5P_CLKDIV0_HCLK133_MASK       (0xF << S5P_CLKDIV0_HCLK133_SHIFT)
+#define S5P_CLKDIV0_PCLK66_SHIFT       (28)
+#define S5P_CLKDIV0_PCLK66_MASK                (0x7 << S5P_CLKDIV0_PCLK66_SHIFT)
+
+/* CLKDIV2 */
+#define S5P_CLKDIV2_G3D_SHIFT           (0)
+#define S5P_CLKDIV2_G3D_MASK            (0xF << S5P_CLKDIV2_G3D_SHIFT)
+#define S5P_CLKDIV2_MFC_SHIFT           (4)
+#define S5P_CLKDIV2_MFC_MASK            (0xF << S5P_CLKDIV2_MFC_SHIFT)
+
+/* CLKDIV6 */
+#define S5P_CLKDIV6_ONEDRAM_SHIFT       (28)
+#define S5P_CLKDIV6_ONEDRAM_MASK        (0xF << S5P_CLKDIV6_ONEDRAM_SHIFT)
+
+#define S5P_SWRESET            S5P_CLKREG(0x2000)
+
+#define S5P_ARM_MCS_CON                S5P_CLKREG(0x6100)
+
+/* Registers related to power management */
+#define S5P_PWR_CFG            S5P_CLKREG(0xC000)
+#define S5P_EINT_WAKEUP_MASK   S5P_CLKREG(0xC004)
+#define S5P_WAKEUP_MASK                S5P_CLKREG(0xC008)
+#define S5P_PWR_MODE           S5P_CLKREG(0xC00C)
+#define S5P_NORMAL_CFG         S5P_CLKREG(0xC010)
+#define S5P_IDLE_CFG           S5P_CLKREG(0xC020)
+#define S5P_STOP_CFG           S5P_CLKREG(0xC030)
+#define S5P_STOP_MEM_CFG       S5P_CLKREG(0xC034)
+#define S5P_SLEEP_CFG          S5P_CLKREG(0xC040)
+
+#define S5P_OSC_FREQ           S5P_CLKREG(0xC100)
+#define S5P_OSC_STABLE         S5P_CLKREG(0xC104)
+#define S5P_PWR_STABLE         S5P_CLKREG(0xC108)
+#define S5P_MTC_STABLE         S5P_CLKREG(0xC110)
+#define S5P_CLAMP_STABLE       S5P_CLKREG(0xC114)
+
+#define S5P_WAKEUP_STAT                S5P_CLKREG(0xC200)
+#define S5P_BLK_PWR_STAT       S5P_CLKREG(0xC204)
+
+#define S5P_OTHERS             S5P_CLKREG(0xE000)
+#define S5P_OM_STAT            S5P_CLKREG(0xE100)
+#define S5P_HDMI_PHY_CONTROL   S5P_CLKREG(0xE804)
+#define S5P_USB_PHY_CONTROL    S5P_CLKREG(0xE80C)
+#define S5P_DAC_PHY_CONTROL    S5P_CLKREG(0xE810)
+
+#define S5P_INFORM0            S5P_CLKREG(0xF000)
+#define S5P_INFORM1            S5P_CLKREG(0xF004)
+#define S5P_INFORM2            S5P_CLKREG(0xF008)
+#define S5P_INFORM3            S5P_CLKREG(0xF00C)
+#define S5P_INFORM4            S5P_CLKREG(0xF010)
+#define S5P_INFORM5            S5P_CLKREG(0xF014)
+#define S5P_INFORM6            S5P_CLKREG(0xF018)
+#define S5P_INFORM7            S5P_CLKREG(0xF01C)
+
+#define S5P_RST_STAT           S5P_CLKREG(0xA000)
+#define S5P_OSC_CON            S5P_CLKREG(0x8000)
+#define S5P_MDNIE_SEL          S5P_CLKREG(0x7008)
+#define S5P_MIPI_PHY_CON0      S5P_CLKREG(0x7200)
+#define S5P_MIPI_PHY_CON1      S5P_CLKREG(0x7204)
+
+#define S5P_IDLE_CFG_TL_MASK   (3 << 30)
+#define S5P_IDLE_CFG_TM_MASK   (3 << 28)
+#define S5P_IDLE_CFG_TL_ON     (2 << 30)
+#define S5P_IDLE_CFG_TM_ON     (2 << 28)
+#define S5P_IDLE_CFG_DIDLE     (1 << 0)
+
+#define S5P_CFG_WFI_CLEAN              (~(3 << 8))
+#define S5P_CFG_WFI_IDLE               (1 << 8)
+#define S5P_CFG_WFI_STOP               (2 << 8)
+#define S5P_CFG_WFI_SLEEP              (3 << 8)
+
+#define S5P_OTHER_SYS_INT              24
+#define S5P_OTHER_STA_TYPE             23
+#define S5P_OTHER_SYSC_INTOFF          (1 << 0)
+#define STA_TYPE_EXPON                 0
+#define STA_TYPE_SFR                   1
+
+#define S5P_PWR_STA_EXP_SCALE          0
+#define S5P_PWR_STA_CNT                        4
+
+#define S5P_PWR_STABLE_COUNT           85500
+
+#define S5P_SLEEP_CFG_OSC_EN           (1 << 0)
+#define S5P_SLEEP_CFG_USBOSC_EN                (1 << 1)
+
+/* OTHERS Resgister */
+#define S5P_OTHERS_RET_IO              (1 << 31)
+#define S5P_OTHERS_RET_CF              (1 << 30)
+#define S5P_OTHERS_RET_MMC             (1 << 29)
+#define S5P_OTHERS_RET_UART            (1 << 28)
+#define S5P_OTHERS_USB_SIG_MASK                (1 << 16)
+
+/* S5P_DAC_CONTROL */
+#define S5P_DAC_ENABLE                 (1)
+#define S5P_DAC_DISABLE                        (0)
+
+#endif /* __ASM_ARCH_REGS_CLOCK_H */
index 53feff33d12992b745db2bbdf6fcfbf3f115069d..43eb1eaea0c927f8e24e94f27831d92931172ab1 100644 (file)
@@ -18,9 +18,9 @@
 #include <asm/system_misc.h>
 
 #include <plat/map-base.h>
-#include <mach/regs-clock.h>
 
 #include "common.h"
+#include "regs-clock.h"
 
 static int __init s5pv210_fdt_map_sys(unsigned long node, const char *uname,
                                        int depth, void *data)
index 1e6c51c7c2d5694d0581603f355bb6e4fbc16108..efc49dabbf2fc7f4d4da053fd0121363c13e2cc2 100644 (file)
@@ -1,6 +1,30 @@
 config ARCH_SHMOBILE
        bool
 
+config PM_RCAR
+       bool
+
+config PM_RMOBILE
+       bool
+
+config ARCH_RCAR_GEN1
+       bool
+       select PM_RCAR if PM || SMP
+       select RENESAS_INTC_IRQPIN
+       select SYS_SUPPORTS_SH_TMU
+
+config ARCH_RCAR_GEN2
+       bool
+       select PM_RCAR if PM || SMP
+       select RENESAS_IRQC
+       select SYS_SUPPORTS_SH_CMT
+
+config ARCH_RMOBILE
+       bool
+       select PM_RMOBILE if PM && !ARCH_SHMOBILE_MULTI
+       select SYS_SUPPORTS_SH_CMT
+       select SYS_SUPPORTS_SH_TMU
+
 menuconfig ARCH_SHMOBILE_MULTI
        bool "Renesas ARM SoCs" if ARCH_MULTI_V7
        depends on MMU
@@ -28,18 +52,15 @@ config ARCH_R7S72100
 
 config ARCH_R8A7779
        bool "R-Car H1 (R8A77790)"
-       select RENESAS_INTC_IRQPIN
-       select SYS_SUPPORTS_SH_TMU
+       select ARCH_RCAR_GEN1
 
 config ARCH_R8A7790
        bool "R-Car H2 (R8A77900)"
-       select RENESAS_IRQC
-       select SYS_SUPPORTS_SH_CMT
+       select ARCH_RCAR_GEN2
 
 config ARCH_R8A7791
-       bool "R-Car M2 (R8A77910)"
-       select RENESAS_IRQC
-       select SYS_SUPPORTS_SH_CMT
+       bool "R-Car M2-W (R8A77910)"
+       select ARCH_RCAR_GEN2
 
 comment "Renesas ARM SoCs Board Type"
 
@@ -71,84 +92,60 @@ comment "Renesas ARM SoCs System Type"
 
 config ARCH_SH7372
        bool "SH-Mobile AP4 (SH7372)"
+       select ARCH_RMOBILE
        select ARCH_WANT_OPTIONAL_GPIOLIB
        select ARM_CPU_SUSPEND if PM || CPU_IDLE
-       select CPU_V7
-       select SH_CLK_CPG
        select SH_INTC
-       select SYS_SUPPORTS_SH_CMT
-       select SYS_SUPPORTS_SH_TMU
 
 config ARCH_SH73A0
        bool "SH-Mobile AG5 (R8A73A00)"
+       select ARCH_RMOBILE
        select ARCH_WANT_OPTIONAL_GPIOLIB
        select ARM_GIC
-       select CPU_V7
        select I2C
-       select SH_CLK_CPG
        select SH_INTC
        select RENESAS_INTC_IRQPIN
-       select SYS_SUPPORTS_SH_CMT
-       select SYS_SUPPORTS_SH_TMU
 
 config ARCH_R8A73A4
        bool "R-Mobile APE6 (R8A73A40)"
+       select ARCH_RMOBILE
        select ARCH_WANT_OPTIONAL_GPIOLIB
        select ARM_GIC
-       select CPU_V7
-       select SH_CLK_CPG
        select RENESAS_IRQC
-       select SYS_SUPPORTS_SH_CMT
-       select SYS_SUPPORTS_SH_TMU
 
 config ARCH_R8A7740
        bool "R-Mobile A1 (R8A77400)"
+       select ARCH_RMOBILE
        select ARCH_WANT_OPTIONAL_GPIOLIB
        select ARM_GIC
-       select CPU_V7
-       select SH_CLK_CPG
        select RENESAS_INTC_IRQPIN
-       select SYS_SUPPORTS_SH_CMT
-       select SYS_SUPPORTS_SH_TMU
 
 config ARCH_R8A7778
        bool "R-Car M1A (R8A77781)"
+       select ARCH_RCAR_GEN1
        select ARCH_WANT_OPTIONAL_GPIOLIB
-       select CPU_V7
-       select SH_CLK_CPG
        select ARM_GIC
-       select SYS_SUPPORTS_SH_TMU
-       select RENESAS_INTC_IRQPIN
 
 config ARCH_R8A7779
        bool "R-Car H1 (R8A77790)"
+       select ARCH_RCAR_GEN1
        select ARCH_WANT_OPTIONAL_GPIOLIB
        select ARM_GIC
-       select CPU_V7
-       select SH_CLK_CPG
-       select RENESAS_INTC_IRQPIN
-       select SYS_SUPPORTS_SH_TMU
 
 config ARCH_R8A7790
        bool "R-Car H2 (R8A77900)"
+       select ARCH_RCAR_GEN2
        select ARCH_WANT_OPTIONAL_GPIOLIB
        select ARM_GIC
-       select CPU_V7
        select MIGHT_HAVE_PCI
-       select SH_CLK_CPG
-       select RENESAS_IRQC
-       select SYS_SUPPORTS_SH_CMT
        select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE
 
 config ARCH_R8A7791
-       bool "R-Car M2 (R8A77910)"
+       bool "R-Car M2-W (R8A77910)"
+       select ARCH_RCAR_GEN2
        select ARCH_WANT_OPTIONAL_GPIOLIB
        select ARM_GIC
-       select CPU_V7
        select MIGHT_HAVE_PCI
-       select SH_CLK_CPG
-       select RENESAS_IRQC
-       select SYS_SUPPORTS_SH_CMT
        select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE
 
 config ARCH_R7S72100
index fe3878a1a69a04a063ac7c4c129d93d0193ff987..7b259ce60bebbbdc912f6f6c937ca48d9c127863 100644 (file)
@@ -8,15 +8,14 @@ ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/arch/arm/mach-shmobile/incl
 obj-y                          := timer.o console.o
 
 # CPU objects
-obj-$(CONFIG_ARCH_SH7372)      += setup-sh7372.o intc-sh7372.o
-obj-$(CONFIG_ARCH_SH73A0)      += setup-sh73a0.o intc-sh73a0.o
+obj-$(CONFIG_ARCH_SH7372)      += setup-sh7372.o intc-sh7372.o pm-sh7372.o
+obj-$(CONFIG_ARCH_SH73A0)      += setup-sh73a0.o intc-sh73a0.o pm-sh73a0.o
 obj-$(CONFIG_ARCH_R8A73A4)     += setup-r8a73a4.o
-obj-$(CONFIG_ARCH_R8A7740)     += setup-r8a7740.o
+obj-$(CONFIG_ARCH_R8A7740)     += setup-r8a7740.o pm-r8a7740.o
 obj-$(CONFIG_ARCH_R8A7778)     += setup-r8a7778.o
-obj-$(CONFIG_ARCH_R8A7779)     += setup-r8a7779.o
-obj-$(CONFIG_ARCH_R8A7790)     += setup-r8a7790.o
-obj-$(CONFIG_ARCH_R8A7790)     += setup-r8a7790.o setup-rcar-gen2.o
-obj-$(CONFIG_ARCH_R8A7791)     += setup-r8a7791.o setup-rcar-gen2.o
+obj-$(CONFIG_ARCH_R8A7779)     += setup-r8a7779.o pm-r8a7779.o
+obj-$(CONFIG_ARCH_R8A7790)     += setup-r8a7790.o pm-r8a7790.o
+obj-$(CONFIG_ARCH_R8A7791)     += setup-r8a7791.o pm-r8a7791.o
 obj-$(CONFIG_ARCH_EMEV2)       += setup-emev2.o
 obj-$(CONFIG_ARCH_R7S72100)    += setup-r7s72100.o
 
@@ -36,8 +35,9 @@ endif
 
 # CPU reset vector handling objects
 cpu-y                          := platsmp.o headsmp.o
-cpu-$(CONFIG_ARCH_R8A7790)     += platsmp-apmu.o
-cpu-$(CONFIG_ARCH_R8A7791)     += platsmp-apmu.o
+
+# Shared SoC family objects
+obj-$(CONFIG_ARCH_RCAR_GEN2)   += setup-rcar-gen2.o platsmp-apmu.o $(cpu-y)
 
 # SMP objects
 smp-y                          := $(cpu-y)
@@ -51,15 +51,11 @@ smp-$(CONFIG_ARCH_EMEV2)    += smp-emev2.o headsmp-scu.o platsmp-scu.o
 obj-$(CONFIG_SUSPEND)          += suspend.o
 obj-$(CONFIG_CPU_IDLE)         += cpuidle.o
 obj-$(CONFIG_CPU_FREQ)         += cpufreq.o
-obj-$(CONFIG_ARCH_SH7372)      += pm-sh7372.o sleep-sh7372.o pm-rmobile.o
-obj-$(CONFIG_ARCH_SH73A0)      += pm-sh73a0.o
-obj-$(CONFIG_ARCH_R8A7740)     += pm-r8a7740.o pm-rmobile.o
-obj-$(CONFIG_ARCH_R8A7779)     += pm-r8a7779.o pm-rcar.o
-obj-$(CONFIG_ARCH_R8A7790)     += pm-r8a7790.o pm-rcar.o $(cpu-y)
-obj-$(CONFIG_ARCH_R8A7791)     += pm-r8a7791.o pm-rcar.o $(cpu-y)
+obj-$(CONFIG_PM_RCAR)          += pm-rcar.o
+obj-$(CONFIG_PM_RMOBILE)       += pm-rmobile.o
 
-# IRQ objects
-obj-$(CONFIG_ARCH_SH7372)      += entry-intc.o
+# special sh7372 handling for IRQ objects and low level sleep code
+obj-$(CONFIG_ARCH_SH7372)      += entry-intc.o sleep-sh7372.o
 
 # Board objects
 ifdef CONFIG_ARCH_SHMOBILE_MULTI
index 6dbaad611a92897020b7aa4cc9cbe28933934922..e709835344038a5a1fbace09bcf68d554c27aa8b 100644 (file)
@@ -1231,6 +1231,10 @@ clock_error:
 #define GPIO_PORT8CR   IOMEM(0xe6050008)
 static void __init eva_init(void)
 {
+       static struct pm_domain_device domain_devices[] __initdata = {
+               { "A4LC", &lcdc0_device },
+               { "A4LC", &hdmi_lcdc_device },
+       };
        struct platform_device *usb = NULL;
 
        regulator_register_always_on(0, "fixed-3.3V", fixed3v3_power_consumers,
@@ -1316,8 +1320,8 @@ static void __init eva_init(void)
        platform_add_devices(eva_devices,
                             ARRAY_SIZE(eva_devices));
 
-       rmobile_add_device_to_domain("A4LC", &lcdc0_device);
-       rmobile_add_device_to_domain("A4LC", &hdmi_lcdc_device);
+       rmobile_add_devices_to_domains(domain_devices,
+                                      ARRAY_SIZE(domain_devices));
        if (usb)
                rmobile_add_device_to_domain("A3SP", usb);
 
index 79f448e93abbfbad9908b1e18604ea83f446c65e..d47b2623267b971d55726b1e97fc7e85f9b0f79f 100644 (file)
@@ -1420,7 +1420,7 @@ static const struct pinctrl_map mackerel_pinctrl_map[] = {
 #define USCCR1         IOMEM(0xE6058144)
 static void __init mackerel_init(void)
 {
-       struct pm_domain_device domain_devices[] = {
+       static struct pm_domain_device domain_devices[] __initdata = {
                { "A4LC", &lcdc_device, },
                { "A4LC", &hdmi_lcdc_device, },
                { "A4LC", &meram_device, },
index a0d44d537fa0bc87327e662cf74e3e8de0a02be0..3d507149a6c423bc588c129d70f21610b9d2f4ae 100644 (file)
@@ -34,23 +34,21 @@ static int r8a7740_pd_a3sp_suspend(void)
 
 static struct rmobile_pm_domain r8a7740_pm_domains[] = {
        {
+               .genpd.name     = "A4LC",
+               .bit_shift      = 1,
+       }, {
                .genpd.name     = "A4S",
                .bit_shift      = 10,
                .gov            = &pm_domain_always_on_gov,
                .no_debug       = true,
                .suspend        = r8a7740_pd_a4s_suspend,
-       },
-       {
+       }, {
                .genpd.name     = "A3SP",
                .bit_shift      = 11,
                .gov            = &pm_domain_always_on_gov,
                .no_debug       = true,
                .suspend        = r8a7740_pd_a3sp_suspend,
        },
-       {
-               .genpd.name     = "A4LC",
-               .bit_shift      = 1,
-       },
 };
 
 void __init r8a7740_init_pm_domains(void)
index 34b8a5674f85e9d9c7437be76f243026269b2857..00022ee56f80dc3075e59a6a93e05acb09a38c80 100644 (file)
@@ -31,8 +31,6 @@
 #define SYSCISR_RETRIES 1000
 #define SYSCISR_DELAY_US 1
 
-#if defined(CONFIG_PM) || defined(CONFIG_SMP)
-
 static void __iomem *rcar_sysc_base;
 static DEFINE_SPINLOCK(rcar_sysc_lock); /* SMP CPUs + I/O devices */
 
@@ -137,5 +135,3 @@ void __iomem *rcar_sysc_init(phys_addr_t base)
 
        return rcar_sysc_base;
 }
-
-#endif /* CONFIG_PM || CONFIG_SMP */
index ebdd16e94a84f5d674f691edfc99e6712d7cee28..a88079af7914afe0db35514b558d13e952c36e88 100644 (file)
@@ -27,7 +27,6 @@
 #define PSTR_RETRIES   100
 #define PSTR_DELAY_US  10
 
-#ifdef CONFIG_PM
 static int rmobile_pd_power_down(struct generic_pm_domain *genpd)
 {
        struct rmobile_pm_domain *rmobile_pd = to_rmobile_pd(genpd);
@@ -151,4 +150,3 @@ void rmobile_add_devices_to_domains(struct pm_domain_device data[],
                rmobile_add_device_to_domain_td(data[j].domain_name,
                                                data[j].pdev, &latencies);
 }
-#endif /* CONFIG_PM */
index 690553a06887897a6c29ffb396ba60bafb29be8e..8f66b343162b041145241429c766d4fefec88c71 100644 (file)
@@ -36,7 +36,7 @@ struct pm_domain_device {
        struct platform_device *pdev;
 };
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_RMOBILE
 extern void rmobile_init_domains(struct rmobile_pm_domain domains[], int num);
 extern void rmobile_add_device_to_domain_td(const char *domain_name,
                                            struct platform_device *pdev,
@@ -58,6 +58,6 @@ extern void rmobile_add_devices_to_domains(struct pm_domain_device data[],
 
 static inline void rmobile_add_devices_to_domains(struct pm_domain_device d[],
                                                  int size) {}
-#endif /* CONFIG_PM */
+#endif /* CONFIG_PM_RMOBILE */
 
 #endif /* PM_RMOBILE_H */
index 3d5eacaba3e6109db5e033ed362af7f987ec40de..30df532fcaa02b2be8b455423e08828f8db5a2d6 100644 (file)
@@ -747,6 +747,19 @@ static void r8a7740_i2c_workaround(struct platform_device *pdev)
 
 void __init r8a7740_add_standard_devices(void)
 {
+       static struct pm_domain_device domain_devices[] __initdata = {
+               { "A3SP", &scif0_device },
+               { "A3SP", &scif1_device },
+               { "A3SP", &scif2_device },
+               { "A3SP", &scif3_device },
+               { "A3SP", &scif4_device },
+               { "A3SP", &scif5_device },
+               { "A3SP", &scif6_device },
+               { "A3SP", &scif7_device },
+               { "A3SP", &scif8_device },
+               { "A3SP", &i2c1_device },
+       };
+
        /* I2C work-around */
        r8a7740_i2c_workaround(&i2c0_device);
        r8a7740_i2c_workaround(&i2c1_device);
@@ -762,17 +775,8 @@ void __init r8a7740_add_standard_devices(void)
                             ARRAY_SIZE(r8a7740_late_devices));
 
        /* add devices to PM domain  */
-
-       rmobile_add_device_to_domain("A3SP",    &scif0_device);
-       rmobile_add_device_to_domain("A3SP",    &scif1_device);
-       rmobile_add_device_to_domain("A3SP",    &scif2_device);
-       rmobile_add_device_to_domain("A3SP",    &scif3_device);
-       rmobile_add_device_to_domain("A3SP",    &scif4_device);
-       rmobile_add_device_to_domain("A3SP",    &scif5_device);
-       rmobile_add_device_to_domain("A3SP",    &scif6_device);
-       rmobile_add_device_to_domain("A3SP",    &scif7_device);
-       rmobile_add_device_to_domain("A3SP",    &scif8_device);
-       rmobile_add_device_to_domain("A3SP",    &i2c1_device);
+       rmobile_add_devices_to_domains(domain_devices,
+                                      ARRAY_SIZE(domain_devices));
 }
 
 void __init r8a7740_add_early_devices(void)
index 9cdfcdfd38fc4b6625a96f1515e7ce0e9834f988..a04fa5fd00fd430d5ab1dba67dad94cba6e6224f 100644 (file)
@@ -927,7 +927,7 @@ static struct platform_device *sh7372_late_devices[] __initdata = {
 
 void __init sh7372_add_standard_devices(void)
 {
-       struct pm_domain_device domain_devices[] = {
+       static struct pm_domain_device domain_devices[] __initdata = {
                { "A3RV", &vpu_device, },
                { "A4MP", &spu0_device, },
                { "A4MP", &spu1_device, },
index 42d4753683ce6857fb118d256f13c81f88e6063b..d7598aeed803c149c9b5a8dda30fc5363e6c7190 100644 (file)
 
 #include <linux/clk-provider.h>
 #include <linux/clocksource.h>
-#include <linux/delay.h>
-#include <linux/kernel.h>
 #include <linux/init.h>
-#include <linux/of_address.h>
-#include <linux/of_irq.h>
-#include <linux/of_platform.h>
-#include <linux/io.h>
-#include <linux/reboot.h>
 
 #include <asm/mach/arch.h>
-#include <asm/mach/map.h>
-#include <asm/system_misc.h>
-
-#define SUN4I_WATCHDOG_CTRL_REG                0x00
-#define SUN4I_WATCHDOG_CTRL_RESTART            BIT(0)
-#define SUN4I_WATCHDOG_MODE_REG                0x04
-#define SUN4I_WATCHDOG_MODE_ENABLE             BIT(0)
-#define SUN4I_WATCHDOG_MODE_RESET_ENABLE       BIT(1)
-
-#define SUN6I_WATCHDOG1_IRQ_REG                0x00
-#define SUN6I_WATCHDOG1_CTRL_REG       0x10
-#define SUN6I_WATCHDOG1_CTRL_RESTART           BIT(0)
-#define SUN6I_WATCHDOG1_CONFIG_REG     0x14
-#define SUN6I_WATCHDOG1_CONFIG_RESTART         BIT(0)
-#define SUN6I_WATCHDOG1_CONFIG_IRQ             BIT(1)
-#define SUN6I_WATCHDOG1_MODE_REG       0x18
-#define SUN6I_WATCHDOG1_MODE_ENABLE            BIT(0)
-
-static void __iomem *wdt_base;
-
-static void sun4i_restart(enum reboot_mode mode, const char *cmd)
-{
-       if (!wdt_base)
-               return;
-
-       /* Enable timer and set reset bit in the watchdog */
-       writel(SUN4I_WATCHDOG_MODE_ENABLE | SUN4I_WATCHDOG_MODE_RESET_ENABLE,
-              wdt_base + SUN4I_WATCHDOG_MODE_REG);
-
-       /*
-        * Restart the watchdog. The default (and lowest) interval
-        * value for the watchdog is 0.5s.
-        */
-       writel(SUN4I_WATCHDOG_CTRL_RESTART, wdt_base + SUN4I_WATCHDOG_CTRL_REG);
-
-       while (1) {
-               mdelay(5);
-               writel(SUN4I_WATCHDOG_MODE_ENABLE | SUN4I_WATCHDOG_MODE_RESET_ENABLE,
-                      wdt_base + SUN4I_WATCHDOG_MODE_REG);
-       }
-}
-
-static struct of_device_id sunxi_restart_ids[] = {
-       { .compatible = "allwinner,sun4i-a10-wdt" },
-       { /*sentinel*/ }
-};
-
-static void sunxi_setup_restart(void)
-{
-       struct device_node *np;
-
-       np = of_find_matching_node(NULL, sunxi_restart_ids);
-       if (WARN(!np, "unable to setup watchdog restart"))
-               return;
-
-       wdt_base = of_iomap(np, 0);
-       WARN(!wdt_base, "failed to map watchdog base address");
-}
-
-static void __init sunxi_dt_init(void)
-{
-       sunxi_setup_restart();
-
-       of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
-}
 
 static const char * const sunxi_board_dt_compat[] = {
        "allwinner,sun4i-a10",
@@ -96,9 +24,7 @@ static const char * const sunxi_board_dt_compat[] = {
 };
 
 DT_MACHINE_START(SUNXI_DT, "Allwinner A1X (Device Tree)")
-       .init_machine   = sunxi_dt_init,
        .dt_compat      = sunxi_board_dt_compat,
-       .restart        = sun4i_restart,
 MACHINE_END
 
 static const char * const sun6i_board_dt_compat[] = {
@@ -126,9 +52,7 @@ static const char * const sun7i_board_dt_compat[] = {
 };
 
 DT_MACHINE_START(SUN7I_DT, "Allwinner sun7i (A20) Family")
-       .init_machine   = sunxi_dt_init,
        .dt_compat      = sun7i_board_dt_compat,
-       .restart        = sun4i_restart,
 MACHINE_END
 
 static const char * const sun8i_board_dt_compat[] = {
index c2baa8ede54316e5cb79f16c565a48c9c45ab1cd..24770e5a5081d3704321757a94cc5456717db7b9 100644 (file)
@@ -64,7 +64,9 @@ enum { DMA_CHAIN_STARTED, DMA_CHAIN_NOTSTARTED };
 
 static struct omap_system_dma_plat_info *p;
 static struct omap_dma_dev_attr *d;
-
+static void omap_clear_dma(int lch);
+static int omap_dma_set_prio_lch(int lch, unsigned char read_prio,
+                                unsigned char write_prio);
 static int enable_1510_mode;
 static u32 errata;
 
@@ -284,66 +286,6 @@ void omap_set_dma_transfer_params(int lch, int data_type, int elem_count,
 }
 EXPORT_SYMBOL(omap_set_dma_transfer_params);
 
-void omap_set_dma_color_mode(int lch, enum omap_dma_color_mode mode, u32 color)
-{
-       BUG_ON(omap_dma_in_1510_mode());
-
-       if (dma_omap1()) {
-               u16 w;
-
-               w = p->dma_read(CCR2, lch);
-               w &= ~0x03;
-
-               switch (mode) {
-               case OMAP_DMA_CONSTANT_FILL:
-                       w |= 0x01;
-                       break;
-               case OMAP_DMA_TRANSPARENT_COPY:
-                       w |= 0x02;
-                       break;
-               case OMAP_DMA_COLOR_DIS:
-                       break;
-               default:
-                       BUG();
-               }
-               p->dma_write(w, CCR2, lch);
-
-               w = p->dma_read(LCH_CTRL, lch);
-               w &= ~0x0f;
-               /* Default is channel type 2D */
-               if (mode) {
-                       p->dma_write(color, COLOR, lch);
-                       w |= 1;         /* Channel type G */
-               }
-               p->dma_write(w, LCH_CTRL, lch);
-       }
-
-       if (dma_omap2plus()) {
-               u32 val;
-
-               val = p->dma_read(CCR, lch);
-               val &= ~((1 << 17) | (1 << 16));
-
-               switch (mode) {
-               case OMAP_DMA_CONSTANT_FILL:
-                       val |= 1 << 16;
-                       break;
-               case OMAP_DMA_TRANSPARENT_COPY:
-                       val |= 1 << 17;
-                       break;
-               case OMAP_DMA_COLOR_DIS:
-                       break;
-               default:
-                       BUG();
-               }
-               p->dma_write(val, CCR, lch);
-
-               color &= 0xffffff;
-               p->dma_write(color, COLOR, lch);
-       }
-}
-EXPORT_SYMBOL(omap_set_dma_color_mode);
-
 void omap_set_dma_write_mode(int lch, enum omap_dma_write_mode mode)
 {
        if (dma_omap2plus()) {
@@ -417,16 +359,6 @@ void omap_set_dma_params(int lch, struct omap_dma_channel_params *params)
 }
 EXPORT_SYMBOL(omap_set_dma_params);
 
-void omap_set_dma_src_index(int lch, int eidx, int fidx)
-{
-       if (dma_omap2plus())
-               return;
-
-       p->dma_write(eidx, CSEI, lch);
-       p->dma_write(fidx, CSFI, lch);
-}
-EXPORT_SYMBOL(omap_set_dma_src_index);
-
 void omap_set_dma_src_data_pack(int lch, int enable)
 {
        u32 l;
@@ -510,16 +442,6 @@ void omap_set_dma_dest_params(int lch, int dest_port, int dest_amode,
 }
 EXPORT_SYMBOL(omap_set_dma_dest_params);
 
-void omap_set_dma_dest_index(int lch, int eidx, int fidx)
-{
-       if (dma_omap2plus())
-               return;
-
-       p->dma_write(eidx, CDEI, lch);
-       p->dma_write(fidx, CDFI, lch);
-}
-EXPORT_SYMBOL(omap_set_dma_dest_index);
-
 void omap_set_dma_dest_data_pack(int lch, int enable)
 {
        u32 l;
@@ -843,7 +765,7 @@ EXPORT_SYMBOL(omap_dma_set_global_params);
  * Both of the above can be set with one of the following values :
  *     DMA_CH_PRIO_HIGH/DMA_CH_PRIO_LOW
  */
-int
+static int
 omap_dma_set_prio_lch(int lch, unsigned char read_prio,
                      unsigned char write_prio)
 {
@@ -864,13 +786,13 @@ omap_dma_set_prio_lch(int lch, unsigned char read_prio,
 
        return 0;
 }
-EXPORT_SYMBOL(omap_dma_set_prio_lch);
+
 
 /*
  * Clears any DMA state so the DMA engine is ready to restart with new buffers
  * through omap_start_dma(). Any buffers in flight are discarded.
  */
-void omap_clear_dma(int lch)
+static void omap_clear_dma(int lch)
 {
        unsigned long flags;
 
@@ -878,7 +800,6 @@ void omap_clear_dma(int lch)
        p->clear_dma(lch);
        local_irq_restore(flags);
 }
-EXPORT_SYMBOL(omap_clear_dma);
 
 void omap_start_dma(int lch)
 {
@@ -1167,652 +1088,6 @@ void omap_dma_link_lch(int lch_head, int lch_queue)
 }
 EXPORT_SYMBOL(omap_dma_link_lch);
 
-/*
- * Once the DMA queue is stopped, we can destroy it.
- */
-void omap_dma_unlink_lch(int lch_head, int lch_queue)
-{
-       if (omap_dma_in_1510_mode()) {
-               if (lch_head == lch_queue) {
-                       p->dma_write(p->dma_read(CCR, lch_head) & ~(3 << 8),
-                                                               CCR, lch_head);
-                       return;
-               }
-               printk(KERN_ERR "DMA linking is not supported in 1510 mode\n");
-               BUG();
-               return;
-       }
-
-       if (dma_chan[lch_head].next_lch != lch_queue ||
-           dma_chan[lch_head].next_lch == -1) {
-               pr_err("omap_dma: trying to unlink non linked channels\n");
-               dump_stack();
-       }
-
-       if ((dma_chan[lch_head].flags & OMAP_DMA_ACTIVE) ||
-           (dma_chan[lch_queue].flags & OMAP_DMA_ACTIVE)) {
-               pr_err("omap_dma: You need to stop the DMA channels before unlinking\n");
-               dump_stack();
-       }
-
-       dma_chan[lch_head].next_lch = -1;
-}
-EXPORT_SYMBOL(omap_dma_unlink_lch);
-
-#ifndef CONFIG_ARCH_OMAP1
-/* Create chain of DMA channesls */
-static void create_dma_lch_chain(int lch_head, int lch_queue)
-{
-       u32 l;
-
-       /* Check if this is the first link in chain */
-       if (dma_chan[lch_head].next_linked_ch == -1) {
-               dma_chan[lch_head].next_linked_ch = lch_queue;
-               dma_chan[lch_head].prev_linked_ch = lch_queue;
-               dma_chan[lch_queue].next_linked_ch = lch_head;
-               dma_chan[lch_queue].prev_linked_ch = lch_head;
-       }
-
-       /* a link exists, link the new channel in circular chain */
-       else {
-               dma_chan[lch_queue].next_linked_ch =
-                                       dma_chan[lch_head].next_linked_ch;
-               dma_chan[lch_queue].prev_linked_ch = lch_head;
-               dma_chan[lch_head].next_linked_ch = lch_queue;
-               dma_chan[dma_chan[lch_queue].next_linked_ch].prev_linked_ch =
-                                       lch_queue;
-       }
-
-       l = p->dma_read(CLNK_CTRL, lch_head);
-       l &= ~(0x1f);
-       l |= lch_queue;
-       p->dma_write(l, CLNK_CTRL, lch_head);
-
-       l = p->dma_read(CLNK_CTRL, lch_queue);
-       l &= ~(0x1f);
-       l |= (dma_chan[lch_queue].next_linked_ch);
-       p->dma_write(l, CLNK_CTRL, lch_queue);
-}
-
-/**
- * @brief omap_request_dma_chain : Request a chain of DMA channels
- *
- * @param dev_id - Device id using the dma channel
- * @param dev_name - Device name
- * @param callback - Call back function
- * @chain_id -
- * @no_of_chans - Number of channels requested
- * @chain_mode - Dynamic or static chaining : OMAP_DMA_STATIC_CHAIN
- *                                           OMAP_DMA_DYNAMIC_CHAIN
- * @params - Channel parameters
- *
- * @return - Success : 0
- *          Failure: -EINVAL/-ENOMEM
- */
-int omap_request_dma_chain(int dev_id, const char *dev_name,
-                          void (*callback) (int lch, u16 ch_status,
-                                            void *data),
-                          int *chain_id, int no_of_chans, int chain_mode,
-                          struct omap_dma_channel_params params)
-{
-       int *channels;
-       int i, err;
-
-       /* Is the chain mode valid ? */
-       if (chain_mode != OMAP_DMA_STATIC_CHAIN
-                       && chain_mode != OMAP_DMA_DYNAMIC_CHAIN) {
-               printk(KERN_ERR "Invalid chain mode requested\n");
-               return -EINVAL;
-       }
-
-       if (unlikely((no_of_chans < 1
-                       || no_of_chans > dma_lch_count))) {
-               printk(KERN_ERR "Invalid Number of channels requested\n");
-               return -EINVAL;
-       }
-
-       /*
-        * Allocate a queue to maintain the status of the channels
-        * in the chain
-        */
-       channels = kmalloc(sizeof(*channels) * no_of_chans, GFP_KERNEL);
-       if (channels == NULL) {
-               printk(KERN_ERR "omap_dma: No memory for channel queue\n");
-               return -ENOMEM;
-       }
-
-       /* request and reserve DMA channels for the chain */
-       for (i = 0; i < no_of_chans; i++) {
-               err = omap_request_dma(dev_id, dev_name,
-                                       callback, NULL, &channels[i]);
-               if (err < 0) {
-                       int j;
-                       for (j = 0; j < i; j++)
-                               omap_free_dma(channels[j]);
-                       kfree(channels);
-                       printk(KERN_ERR "omap_dma: Request failed %d\n", err);
-                       return err;
-               }
-               dma_chan[channels[i]].prev_linked_ch = -1;
-               dma_chan[channels[i]].state = DMA_CH_NOTSTARTED;
-
-               /*
-                * Allowing client drivers to set common parameters now,
-                * so that later only relevant (src_start, dest_start
-                * and element count) can be set
-                */
-               omap_set_dma_params(channels[i], &params);
-       }
-
-       *chain_id = channels[0];
-       dma_linked_lch[*chain_id].linked_dmach_q = channels;
-       dma_linked_lch[*chain_id].chain_mode = chain_mode;
-       dma_linked_lch[*chain_id].chain_state = DMA_CHAIN_NOTSTARTED;
-       dma_linked_lch[*chain_id].no_of_lchs_linked = no_of_chans;
-
-       for (i = 0; i < no_of_chans; i++)
-               dma_chan[channels[i]].chain_id = *chain_id;
-
-       /* Reset the Queue pointers */
-       OMAP_DMA_CHAIN_QINIT(*chain_id);
-
-       /* Set up the chain */
-       if (no_of_chans == 1)
-               create_dma_lch_chain(channels[0], channels[0]);
-       else {
-               for (i = 0; i < (no_of_chans - 1); i++)
-                       create_dma_lch_chain(channels[i], channels[i + 1]);
-       }
-
-       return 0;
-}
-EXPORT_SYMBOL(omap_request_dma_chain);
-
-/**
- * @brief omap_modify_dma_chain_param : Modify the chain's params - Modify the
- * params after setting it. Dont do this while dma is running!!
- *
- * @param chain_id - Chained logical channel id.
- * @param params
- *
- * @return - Success : 0
- *          Failure : -EINVAL
- */
-int omap_modify_dma_chain_params(int chain_id,
-                               struct omap_dma_channel_params params)
-{
-       int *channels;
-       u32 i;
-
-       /* Check for input params */
-       if (unlikely((chain_id < 0
-                       || chain_id >= dma_lch_count))) {
-               printk(KERN_ERR "Invalid chain id\n");
-               return -EINVAL;
-       }
-
-       /* Check if the chain exists */
-       if (dma_linked_lch[chain_id].linked_dmach_q == NULL) {
-               printk(KERN_ERR "Chain doesn't exists\n");
-               return -EINVAL;
-       }
-       channels = dma_linked_lch[chain_id].linked_dmach_q;
-
-       for (i = 0; i < dma_linked_lch[chain_id].no_of_lchs_linked; i++) {
-               /*
-                * Allowing client drivers to set common parameters now,
-                * so that later only relevant (src_start, dest_start
-                * and element count) can be set
-                */
-               omap_set_dma_params(channels[i], &params);
-       }
-
-       return 0;
-}
-EXPORT_SYMBOL(omap_modify_dma_chain_params);
-
-/**
- * @brief omap_free_dma_chain - Free all the logical channels in a chain.
- *
- * @param chain_id
- *
- * @return - Success : 0
- *          Failure : -EINVAL
- */
-int omap_free_dma_chain(int chain_id)
-{
-       int *channels;
-       u32 i;
-
-       /* Check for input params */
-       if (unlikely((chain_id < 0 || chain_id >= dma_lch_count))) {
-               printk(KERN_ERR "Invalid chain id\n");
-               return -EINVAL;
-       }
-
-       /* Check if the chain exists */
-       if (dma_linked_lch[chain_id].linked_dmach_q == NULL) {
-               printk(KERN_ERR "Chain doesn't exists\n");
-               return -EINVAL;
-       }
-
-       channels = dma_linked_lch[chain_id].linked_dmach_q;
-       for (i = 0; i < dma_linked_lch[chain_id].no_of_lchs_linked; i++) {
-               dma_chan[channels[i]].next_linked_ch = -1;
-               dma_chan[channels[i]].prev_linked_ch = -1;
-               dma_chan[channels[i]].chain_id = -1;
-               dma_chan[channels[i]].state = DMA_CH_NOTSTARTED;
-               omap_free_dma(channels[i]);
-       }
-
-       kfree(channels);
-
-       dma_linked_lch[chain_id].linked_dmach_q = NULL;
-       dma_linked_lch[chain_id].chain_mode = -1;
-       dma_linked_lch[chain_id].chain_state = -1;
-
-       return (0);
-}
-EXPORT_SYMBOL(omap_free_dma_chain);
-
-/**
- * @brief omap_dma_chain_status - Check if the chain is in
- * active / inactive state.
- * @param chain_id
- *
- * @return - Success : OMAP_DMA_CHAIN_ACTIVE/OMAP_DMA_CHAIN_INACTIVE
- *          Failure : -EINVAL
- */
-int omap_dma_chain_status(int chain_id)
-{
-       /* Check for input params */
-       if (unlikely((chain_id < 0 || chain_id >= dma_lch_count))) {
-               printk(KERN_ERR "Invalid chain id\n");
-               return -EINVAL;
-       }
-
-       /* Check if the chain exists */
-       if (dma_linked_lch[chain_id].linked_dmach_q == NULL) {
-               printk(KERN_ERR "Chain doesn't exists\n");
-               return -EINVAL;
-       }
-       pr_debug("CHAINID=%d, qcnt=%d\n", chain_id,
-                       dma_linked_lch[chain_id].q_count);
-
-       if (OMAP_DMA_CHAIN_QEMPTY(chain_id))
-               return OMAP_DMA_CHAIN_INACTIVE;
-
-       return OMAP_DMA_CHAIN_ACTIVE;
-}
-EXPORT_SYMBOL(omap_dma_chain_status);
-
-/**
- * @brief omap_dma_chain_a_transfer - Get a free channel from a chain,
- * set the params and start the transfer.
- *
- * @param chain_id
- * @param src_start - buffer start address
- * @param dest_start - Dest address
- * @param elem_count
- * @param frame_count
- * @param callbk_data - channel callback parameter data.
- *
- * @return  - Success : 0
- *           Failure: -EINVAL/-EBUSY
- */
-int omap_dma_chain_a_transfer(int chain_id, int src_start, int dest_start,
-                       int elem_count, int frame_count, void *callbk_data)
-{
-       int *channels;
-       u32 l, lch;
-       int start_dma = 0;
-
-       /*
-        * if buffer size is less than 1 then there is
-        * no use of starting the chain
-        */
-       if (elem_count < 1) {
-               printk(KERN_ERR "Invalid buffer size\n");
-               return -EINVAL;
-       }
-
-       /* Check for input params */
-       if (unlikely((chain_id < 0
-                       || chain_id >= dma_lch_count))) {
-               printk(KERN_ERR "Invalid chain id\n");
-               return -EINVAL;
-       }
-
-       /* Check if the chain exists */
-       if (dma_linked_lch[chain_id].linked_dmach_q == NULL) {
-               printk(KERN_ERR "Chain doesn't exist\n");
-               return -EINVAL;
-       }
-
-       /* Check if all the channels in chain are in use */
-       if (OMAP_DMA_CHAIN_QFULL(chain_id))
-               return -EBUSY;
-
-       /* Frame count may be negative in case of indexed transfers */
-       channels = dma_linked_lch[chain_id].linked_dmach_q;
-
-       /* Get a free channel */
-       lch = channels[dma_linked_lch[chain_id].q_tail];
-
-       /* Store the callback data */
-       dma_chan[lch].data = callbk_data;
-
-       /* Increment the q_tail */
-       OMAP_DMA_CHAIN_INCQTAIL(chain_id);
-
-       /* Set the params to the free channel */
-       if (src_start != 0)
-               p->dma_write(src_start, CSSA, lch);
-       if (dest_start != 0)
-               p->dma_write(dest_start, CDSA, lch);
-
-       /* Write the buffer size */
-       p->dma_write(elem_count, CEN, lch);
-       p->dma_write(frame_count, CFN, lch);
-
-       /*
-        * If the chain is dynamically linked,
-        * then we may have to start the chain if its not active
-        */
-       if (dma_linked_lch[chain_id].chain_mode == OMAP_DMA_DYNAMIC_CHAIN) {
-
-               /*
-                * In Dynamic chain, if the chain is not started,
-                * queue the channel
-                */
-               if (dma_linked_lch[chain_id].chain_state ==
-                                               DMA_CHAIN_NOTSTARTED) {
-                       /* Enable the link in previous channel */
-                       if (dma_chan[dma_chan[lch].prev_linked_ch].state ==
-                                                               DMA_CH_QUEUED)
-                               enable_lnk(dma_chan[lch].prev_linked_ch);
-                       dma_chan[lch].state = DMA_CH_QUEUED;
-               }
-
-               /*
-                * Chain is already started, make sure its active,
-                * if not then start the chain
-                */
-               else {
-                       start_dma = 1;
-
-                       if (dma_chan[dma_chan[lch].prev_linked_ch].state ==
-                                                       DMA_CH_STARTED) {
-                               enable_lnk(dma_chan[lch].prev_linked_ch);
-                               dma_chan[lch].state = DMA_CH_QUEUED;
-                               start_dma = 0;
-                               if (0 == ((1 << 7) & p->dma_read(
-                                       CCR, dma_chan[lch].prev_linked_ch))) {
-                                       disable_lnk(dma_chan[lch].
-                                                   prev_linked_ch);
-                                       pr_debug("\n prev ch is stopped\n");
-                                       start_dma = 1;
-                               }
-                       }
-
-                       else if (dma_chan[dma_chan[lch].prev_linked_ch].state
-                                                       == DMA_CH_QUEUED) {
-                               enable_lnk(dma_chan[lch].prev_linked_ch);
-                               dma_chan[lch].state = DMA_CH_QUEUED;
-                               start_dma = 0;
-                       }
-                       omap_enable_channel_irq(lch);
-
-                       l = p->dma_read(CCR, lch);
-
-                       if ((0 == (l & (1 << 24))))
-                               l &= ~(1 << 25);
-                       else
-                               l |= (1 << 25);
-                       if (start_dma == 1) {
-                               if (0 == (l & (1 << 7))) {
-                                       l |= (1 << 7);
-                                       dma_chan[lch].state = DMA_CH_STARTED;
-                                       pr_debug("starting %d\n", lch);
-                                       p->dma_write(l, CCR, lch);
-                               } else
-                                       start_dma = 0;
-                       } else {
-                               if (0 == (l & (1 << 7)))
-                                       p->dma_write(l, CCR, lch);
-                       }
-                       dma_chan[lch].flags |= OMAP_DMA_ACTIVE;
-               }
-       }
-
-       return 0;
-}
-EXPORT_SYMBOL(omap_dma_chain_a_transfer);
-
-/**
- * @brief omap_start_dma_chain_transfers - Start the chain
- *
- * @param chain_id
- *
- * @return - Success : 0
- *          Failure : -EINVAL/-EBUSY
- */
-int omap_start_dma_chain_transfers(int chain_id)
-{
-       int *channels;
-       u32 l, i;
-
-       if (unlikely((chain_id < 0 || chain_id >= dma_lch_count))) {
-               printk(KERN_ERR "Invalid chain id\n");
-               return -EINVAL;
-       }
-
-       channels = dma_linked_lch[chain_id].linked_dmach_q;
-
-       if (dma_linked_lch[channels[0]].chain_state == DMA_CHAIN_STARTED) {
-               printk(KERN_ERR "Chain is already started\n");
-               return -EBUSY;
-       }
-
-       if (dma_linked_lch[chain_id].chain_mode == OMAP_DMA_STATIC_CHAIN) {
-               for (i = 0; i < dma_linked_lch[chain_id].no_of_lchs_linked;
-                                                                       i++) {
-                       enable_lnk(channels[i]);
-                       omap_enable_channel_irq(channels[i]);
-               }
-       } else {
-               omap_enable_channel_irq(channels[0]);
-       }
-
-       l = p->dma_read(CCR, channels[0]);
-       l |= (1 << 7);
-       dma_linked_lch[chain_id].chain_state = DMA_CHAIN_STARTED;
-       dma_chan[channels[0]].state = DMA_CH_STARTED;
-
-       if ((0 == (l & (1 << 24))))
-               l &= ~(1 << 25);
-       else
-               l |= (1 << 25);
-       p->dma_write(l, CCR, channels[0]);
-
-       dma_chan[channels[0]].flags |= OMAP_DMA_ACTIVE;
-
-       return 0;
-}
-EXPORT_SYMBOL(omap_start_dma_chain_transfers);
-
-/**
- * @brief omap_stop_dma_chain_transfers - Stop the dma transfer of a chain.
- *
- * @param chain_id
- *
- * @return - Success : 0
- *          Failure : EINVAL
- */
-int omap_stop_dma_chain_transfers(int chain_id)
-{
-       int *channels;
-       u32 l, i;
-       u32 sys_cf = 0;
-
-       /* Check for input params */
-       if (unlikely((chain_id < 0 || chain_id >= dma_lch_count))) {
-               printk(KERN_ERR "Invalid chain id\n");
-               return -EINVAL;
-       }
-
-       /* Check if the chain exists */
-       if (dma_linked_lch[chain_id].linked_dmach_q == NULL) {
-               printk(KERN_ERR "Chain doesn't exists\n");
-               return -EINVAL;
-       }
-       channels = dma_linked_lch[chain_id].linked_dmach_q;
-
-       if (IS_DMA_ERRATA(DMA_ERRATA_i88)) {
-               sys_cf = p->dma_read(OCP_SYSCONFIG, 0);
-               l = sys_cf;
-               /* Middle mode reg set no Standby */
-               l &= ~((1 << 12)|(1 << 13));
-               p->dma_write(l, OCP_SYSCONFIG, 0);
-       }
-
-       for (i = 0; i < dma_linked_lch[chain_id].no_of_lchs_linked; i++) {
-
-               /* Stop the Channel transmission */
-               l = p->dma_read(CCR, channels[i]);
-               l &= ~(1 << 7);
-               p->dma_write(l, CCR, channels[i]);
-
-               /* Disable the link in all the channels */
-               disable_lnk(channels[i]);
-               dma_chan[channels[i]].state = DMA_CH_NOTSTARTED;
-
-       }
-       dma_linked_lch[chain_id].chain_state = DMA_CHAIN_NOTSTARTED;
-
-       /* Reset the Queue pointers */
-       OMAP_DMA_CHAIN_QINIT(chain_id);
-
-       if (IS_DMA_ERRATA(DMA_ERRATA_i88))
-               p->dma_write(sys_cf, OCP_SYSCONFIG, 0);
-
-       return 0;
-}
-EXPORT_SYMBOL(omap_stop_dma_chain_transfers);
-
-/* Get the index of the ongoing DMA in chain */
-/**
- * @brief omap_get_dma_chain_index - Get the element and frame index
- * of the ongoing DMA in chain
- *
- * @param chain_id
- * @param ei - Element index
- * @param fi - Frame index
- *
- * @return - Success : 0
- *          Failure : -EINVAL
- */
-int omap_get_dma_chain_index(int chain_id, int *ei, int *fi)
-{
-       int lch;
-       int *channels;
-
-       /* Check for input params */
-       if (unlikely((chain_id < 0 || chain_id >= dma_lch_count))) {
-               printk(KERN_ERR "Invalid chain id\n");
-               return -EINVAL;
-       }
-
-       /* Check if the chain exists */
-       if (dma_linked_lch[chain_id].linked_dmach_q == NULL) {
-               printk(KERN_ERR "Chain doesn't exists\n");
-               return -EINVAL;
-       }
-       if ((!ei) || (!fi))
-               return -EINVAL;
-
-       channels = dma_linked_lch[chain_id].linked_dmach_q;
-
-       /* Get the current channel */
-       lch = channels[dma_linked_lch[chain_id].q_head];
-
-       *ei = p->dma_read(CCEN, lch);
-       *fi = p->dma_read(CCFN, lch);
-
-       return 0;
-}
-EXPORT_SYMBOL(omap_get_dma_chain_index);
-
-/**
- * @brief omap_get_dma_chain_dst_pos - Get the destination position of the
- * ongoing DMA in chain
- *
- * @param chain_id
- *
- * @return - Success : Destination position
- *          Failure : -EINVAL
- */
-int omap_get_dma_chain_dst_pos(int chain_id)
-{
-       int lch;
-       int *channels;
-
-       /* Check for input params */
-       if (unlikely((chain_id < 0 || chain_id >= dma_lch_count))) {
-               printk(KERN_ERR "Invalid chain id\n");
-               return -EINVAL;
-       }
-
-       /* Check if the chain exists */
-       if (dma_linked_lch[chain_id].linked_dmach_q == NULL) {
-               printk(KERN_ERR "Chain doesn't exists\n");
-               return -EINVAL;
-       }
-
-       channels = dma_linked_lch[chain_id].linked_dmach_q;
-
-       /* Get the current channel */
-       lch = channels[dma_linked_lch[chain_id].q_head];
-
-       return p->dma_read(CDAC, lch);
-}
-EXPORT_SYMBOL(omap_get_dma_chain_dst_pos);
-
-/**
- * @brief omap_get_dma_chain_src_pos - Get the source position
- * of the ongoing DMA in chain
- * @param chain_id
- *
- * @return - Success : Destination position
- *          Failure : -EINVAL
- */
-int omap_get_dma_chain_src_pos(int chain_id)
-{
-       int lch;
-       int *channels;
-
-       /* Check for input params */
-       if (unlikely((chain_id < 0 || chain_id >= dma_lch_count))) {
-               printk(KERN_ERR "Invalid chain id\n");
-               return -EINVAL;
-       }
-
-       /* Check if the chain exists */
-       if (dma_linked_lch[chain_id].linked_dmach_q == NULL) {
-               printk(KERN_ERR "Chain doesn't exists\n");
-               return -EINVAL;
-       }
-
-       channels = dma_linked_lch[chain_id].linked_dmach_q;
-
-       /* Get the current channel */
-       lch = channels[dma_linked_lch[chain_id].q_head];
-
-       return p->dma_read(CSAC, lch);
-}
-EXPORT_SYMBOL(omap_get_dma_chain_src_pos);
-#endif /* ifndef CONFIG_ARCH_OMAP1 */
-
 /*----------------------------------------------------------------------------*/
 
 #ifdef CONFIG_ARCH_OMAP1
index a8d7ea14f1835b3d8c6d45e20937051fd79f7cbb..8bdbc45c6dad2a04c3863c753df6afb3bca54d04 100644 (file)
@@ -178,12 +178,6 @@ static irqreturn_t ch2_irq(int irq, void *handle)
        return IRQ_NONE;
 }
 
-static struct irqaction tc_irqaction = {
-       .name           = "tc_clkevt",
-       .flags          = IRQF_TIMER,
-       .handler        = ch2_irq,
-};
-
 static int __init setup_clkevents(struct atmel_tc *tc, int clk32k_divisor_idx)
 {
        int ret;
@@ -198,15 +192,16 @@ static int __init setup_clkevents(struct atmel_tc *tc, int clk32k_divisor_idx)
 
        clkevt.regs = tc->regs;
        clkevt.clk = t2_clk;
-       tc_irqaction.dev_id = &clkevt;
 
        timer_clock = clk32k_divisor_idx;
 
        clkevt.clkevt.cpumask = cpumask_of(0);
 
-       ret = setup_irq(irq, &tc_irqaction);
-       if (ret)
+       ret = request_irq(irq, ch2_irq, IRQF_TIMER, "tc_clkevt", &clkevt);
+       if (ret) {
+               clk_disable_unprepare(t2_clk);
                return ret;
+       }
 
        clockevents_config_and_register(&clkevt.clkevt, 32768, 1, 0xffff);
 
@@ -279,7 +274,7 @@ static int __init tcb_clksrc_init(void)
        int i;
        int ret;
 
-       tc = atmel_tc_alloc(CONFIG_ATMEL_TCB_CLKSRC_BLOCK, clksrc.name);
+       tc = atmel_tc_alloc(CONFIG_ATMEL_TCB_CLKSRC_BLOCK);
        if (!tc) {
                pr_debug("can't alloc TC for clocksource\n");
                return -ENODEV;
index c8d8e38d0d8ae6dc47cc0d85b581388896ae5361..0ca05c3ec8d68ac78d5268b8accca776647d12c0 100644 (file)
@@ -35,60 +35,31 @@ static LIST_HEAD(tc_list);
 /**
  * atmel_tc_alloc - allocate a specified TC block
  * @block: which block to allocate
- * @name: name to be associated with the iomem resource
  *
  * Caller allocates a block.  If it is available, a pointer to a
  * pre-initialized struct atmel_tc is returned. The caller can access
  * the registers directly through the "regs" field.
  */
-struct atmel_tc *atmel_tc_alloc(unsigned block, const char *name)
+struct atmel_tc *atmel_tc_alloc(unsigned block)
 {
        struct atmel_tc         *tc;
        struct platform_device  *pdev = NULL;
-       struct resource         *r;
-       size_t                  size;
 
        spin_lock(&tc_list_lock);
        list_for_each_entry(tc, &tc_list, node) {
-               if (tc->pdev->dev.of_node) {
-                       if (of_alias_get_id(tc->pdev->dev.of_node, "tcb")
-                                       == block) {
-                               pdev = tc->pdev;
-                               break;
-                       }
-               } else if (tc->pdev->id == block) {
+               if (tc->allocated)
+                       continue;
+
+               if ((tc->pdev->dev.of_node && tc->id == block) ||
+                   (tc->pdev->id == block)) {
                        pdev = tc->pdev;
+                       tc->allocated = true;
                        break;
                }
        }
-
-       if (!pdev || tc->iomem)
-               goto fail;
-
-       r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       if (!r)
-               goto fail;
-
-       size = resource_size(r);
-       r = request_mem_region(r->start, size, name);
-       if (!r)
-               goto fail;
-
-       tc->regs = ioremap(r->start, size);
-       if (!tc->regs)
-               goto fail_ioremap;
-
-       tc->iomem = r;
-
-out:
        spin_unlock(&tc_list_lock);
-       return tc;
 
-fail_ioremap:
-       release_mem_region(r->start, size);
-fail:
-       tc = NULL;
-       goto out;
+       return pdev ? tc : NULL;
 }
 EXPORT_SYMBOL_GPL(atmel_tc_alloc);
 
@@ -96,19 +67,14 @@ EXPORT_SYMBOL_GPL(atmel_tc_alloc);
  * atmel_tc_free - release a specified TC block
  * @tc: Timer/counter block that was returned by atmel_tc_alloc()
  *
- * This reverses the effect of atmel_tc_alloc(), unmapping the I/O
- * registers, invalidating the resource returned by that routine and
- * making the TC available to other drivers.
+ * This reverses the effect of atmel_tc_alloc(), invalidating the resource
+ * returned by that routine and making the TC available to other drivers.
  */
 void atmel_tc_free(struct atmel_tc *tc)
 {
        spin_lock(&tc_list_lock);
-       if (tc->regs) {
-               iounmap(tc->regs);
-               release_mem_region(tc->iomem->start, resource_size(tc->iomem));
-               tc->regs = NULL;
-               tc->iomem = NULL;
-       }
+       if (tc->allocated)
+               tc->allocated = false;
        spin_unlock(&tc_list_lock);
 }
 EXPORT_SYMBOL_GPL(atmel_tc_free);
@@ -142,25 +108,27 @@ static int __init tc_probe(struct platform_device *pdev)
        struct atmel_tc *tc;
        struct clk      *clk;
        int             irq;
-
-       if (!platform_get_resource(pdev, IORESOURCE_MEM, 0))
-               return -EINVAL;
+       struct resource *r;
+       unsigned int    i;
 
        irq = platform_get_irq(pdev, 0);
        if (irq < 0)
                return -EINVAL;
 
-       tc = kzalloc(sizeof(struct atmel_tc), GFP_KERNEL);
+       tc = devm_kzalloc(&pdev->dev, sizeof(struct atmel_tc), GFP_KERNEL);
        if (!tc)
                return -ENOMEM;
 
        tc->pdev = pdev;
 
-       clk = clk_get(&pdev->dev, "t0_clk");
-       if (IS_ERR(clk)) {
-               kfree(tc);
-               return -EINVAL;
-       }
+       clk = devm_clk_get(&pdev->dev, "t0_clk");
+       if (IS_ERR(clk))
+               return PTR_ERR(clk);
+
+       r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+       tc->regs = devm_ioremap_resource(&pdev->dev, r);
+       if (IS_ERR(tc->regs))
+               return PTR_ERR(tc->regs);
 
        /* Now take SoC information if available */
        if (pdev->dev.of_node) {
@@ -168,13 +136,17 @@ static int __init tc_probe(struct platform_device *pdev)
                match = of_match_node(atmel_tcb_dt_ids, pdev->dev.of_node);
                if (match)
                        tc->tcb_config = match->data;
+
+               tc->id = of_alias_get_id(tc->pdev->dev.of_node, "tcb");
+       } else {
+               tc->id = pdev->id;
        }
 
        tc->clk[0] = clk;
-       tc->clk[1] = clk_get(&pdev->dev, "t1_clk");
+       tc->clk[1] = devm_clk_get(&pdev->dev, "t1_clk");
        if (IS_ERR(tc->clk[1]))
                tc->clk[1] = clk;
-       tc->clk[2] = clk_get(&pdev->dev, "t2_clk");
+       tc->clk[2] = devm_clk_get(&pdev->dev, "t2_clk");
        if (IS_ERR(tc->clk[2]))
                tc->clk[2] = clk;
 
@@ -186,18 +158,33 @@ static int __init tc_probe(struct platform_device *pdev)
        if (tc->irq[2] < 0)
                tc->irq[2] = irq;
 
+       for (i = 0; i < 3; i++)
+               writel(ATMEL_TC_ALL_IRQ, tc->regs + ATMEL_TC_REG(i, IDR));
+
        spin_lock(&tc_list_lock);
        list_add_tail(&tc->node, &tc_list);
        spin_unlock(&tc_list_lock);
 
+       platform_set_drvdata(pdev, tc);
+
        return 0;
 }
 
+static void tc_shutdown(struct platform_device *pdev)
+{
+       int i;
+       struct atmel_tc *tc = platform_get_drvdata(pdev);
+
+       for (i = 0; i < 3; i++)
+               writel(ATMEL_TC_ALL_IRQ, tc->regs + ATMEL_TC_REG(i, IDR));
+}
+
 static struct platform_driver tc_driver = {
        .driver = {
                .name   = "atmel_tcb",
                .of_match_table = of_match_ptr(atmel_tcb_dt_ids),
        },
+       .shutdown = tc_shutdown,
 };
 
 static int __init tc_init(void)
index f3dcd02390f1b5da7d9cf43d3b053d3e6840bc0f..d56e5b7174313761698290a90d8646f1d5d600aa 100644 (file)
@@ -379,7 +379,7 @@ static int atmel_tcb_pwm_probe(struct platform_device *pdev)
                return err;
        }
 
-       tc = atmel_tc_alloc(tcblock, "tcb-pwm");
+       tc = atmel_tc_alloc(tcblock);
        if (tc == NULL) {
                dev_err(&pdev->dev, "failed to allocate Timer Counter Block\n");
                return -ENOMEM;
index 89a931babecf86ebbf95c6a0e8b648840d06ad06..b87c1c7c242a7eea1eff286b3f292e5fa8ccd2d4 100644 (file)
@@ -44,12 +44,13 @@ struct atmel_tcb_config {
 /**
  * struct atmel_tc - information about a Timer/Counter Block
  * @pdev: physical device
- * @iomem: resource associated with the I/O register
  * @regs: mapping through which the I/O registers can be accessed
+ * @id: block id
  * @tcb_config: configuration data from SoC
  * @irq: irq for each of the three channels
  * @clk: internal clock source for each of the three channels
  * @node: list node, for tclib internal use
+ * @allocated: if already used, for tclib internal use
  *
  * On some platforms, each TC channel has its own clocks and IRQs,
  * while on others, all TC channels share the same clock and IRQ.
@@ -61,15 +62,16 @@ struct atmel_tcb_config {
  */
 struct atmel_tc {
        struct platform_device  *pdev;
-       struct resource         *iomem;
        void __iomem            *regs;
+       int                     id;
        const struct atmel_tcb_config *tcb_config;
        int                     irq[3];
        struct clk              *clk[3];
        struct list_head        node;
+       bool                    allocated;
 };
 
-extern struct atmel_tc *atmel_tc_alloc(unsigned block, const char *name);
+extern struct atmel_tc *atmel_tc_alloc(unsigned block);
 extern void atmel_tc_free(struct atmel_tc *tc);
 
 /* platform-specific ATMEL_TC_TIMER_CLOCKx divisors (0 means 32KiHz) */
@@ -258,5 +260,10 @@ extern const u8 atmel_tc_divisors[5];
 #define     ATMEL_TC_LDRAS     (1 <<  5)       /* RA loading */
 #define     ATMEL_TC_LDRBS     (1 <<  6)       /* RB loading */
 #define     ATMEL_TC_ETRGS     (1 <<  7)       /* external trigger */
+#define     ATMEL_TC_ALL_IRQ   (ATMEL_TC_COVFS | ATMEL_TC_LOVRS | \
+                                ATMEL_TC_CPAS | ATMEL_TC_CPBS | \
+                                ATMEL_TC_CPCS | ATMEL_TC_LDRAS | \
+                                ATMEL_TC_LDRBS | ATMEL_TC_ETRGS) \
+                                /* all IRQs */
 
 #endif
index 6f06f8bc612c6628bfc4f12aebfde9f1e552b280..e5a70132a240f66803a0c27a30eb2375111d97e0 100644 (file)
@@ -306,15 +306,12 @@ extern void omap_set_dma_transfer_params(int lch, int data_type,
                                         int elem_count, int frame_count,
                                         int sync_mode,
                                         int dma_trigger, int src_or_dst_synch);
-extern void omap_set_dma_color_mode(int lch, enum omap_dma_color_mode mode,
-                                   u32 color);
 extern void omap_set_dma_write_mode(int lch, enum omap_dma_write_mode mode);
 extern void omap_set_dma_channel_mode(int lch, enum omap_dma_channel_mode mode);
 
 extern void omap_set_dma_src_params(int lch, int src_port, int src_amode,
                                    unsigned long src_start,
                                    int src_ei, int src_fi);
-extern void omap_set_dma_src_index(int lch, int eidx, int fidx);
 extern void omap_set_dma_src_data_pack(int lch, int enable);
 extern void omap_set_dma_src_burst_mode(int lch,
                                        enum omap_dma_burst_mode burst_mode);
@@ -322,7 +319,6 @@ extern void omap_set_dma_src_burst_mode(int lch,
 extern void omap_set_dma_dest_params(int lch, int dest_port, int dest_amode,
                                     unsigned long dest_start,
                                     int dst_ei, int dst_fi);
-extern void omap_set_dma_dest_index(int lch, int eidx, int fidx);
 extern void omap_set_dma_dest_data_pack(int lch, int enable);
 extern void omap_set_dma_dest_burst_mode(int lch,
                                         enum omap_dma_burst_mode burst_mode);
@@ -331,52 +327,19 @@ extern void omap_set_dma_params(int lch,
                                struct omap_dma_channel_params *params);
 
 extern void omap_dma_link_lch(int lch_head, int lch_queue);
-extern void omap_dma_unlink_lch(int lch_head, int lch_queue);
 
 extern int omap_set_dma_callback(int lch,
                        void (*callback)(int lch, u16 ch_status, void *data),
                        void *data);
 extern dma_addr_t omap_get_dma_src_pos(int lch);
 extern dma_addr_t omap_get_dma_dst_pos(int lch);
-extern void omap_clear_dma(int lch);
 extern int omap_get_dma_active_status(int lch);
 extern int omap_dma_running(void);
 extern void omap_dma_set_global_params(int arb_rate, int max_fifo_depth,
                                       int tparams);
-extern int omap_dma_set_prio_lch(int lch, unsigned char read_prio,
-                                unsigned char write_prio);
-extern void omap_set_dma_dst_endian_type(int lch, enum end_type etype);
-extern void omap_set_dma_src_endian_type(int lch, enum end_type etype);
-extern int omap_get_dma_index(int lch, int *ei, int *fi);
-
 void omap_dma_global_context_save(void);
 void omap_dma_global_context_restore(void);
 
-extern void omap_dma_disable_irq(int lch);
-
-/* Chaining APIs */
-#ifndef CONFIG_ARCH_OMAP1
-extern int omap_request_dma_chain(int dev_id, const char *dev_name,
-                                 void (*callback) (int lch, u16 ch_status,
-                                                   void *data),
-                                 int *chain_id, int no_of_chans,
-                                 int chain_mode,
-                                 struct omap_dma_channel_params params);
-extern int omap_free_dma_chain(int chain_id);
-extern int omap_dma_chain_a_transfer(int chain_id, int src_start,
-                                    int dest_start, int elem_count,
-                                    int frame_count, void *callbk_data);
-extern int omap_start_dma_chain_transfers(int chain_id);
-extern int omap_stop_dma_chain_transfers(int chain_id);
-extern int omap_get_dma_chain_index(int chain_id, int *ei, int *fi);
-extern int omap_get_dma_chain_dst_pos(int chain_id);
-extern int omap_get_dma_chain_src_pos(int chain_id);
-
-extern int omap_modify_dma_chain_params(int chain_id,
-                                       struct omap_dma_channel_params params);
-extern int omap_dma_chain_status(int chain_id);
-#endif
-
 #if defined(CONFIG_ARCH_OMAP1) && IS_ENABLED(CONFIG_FB_OMAP)
 #include <mach/lcd_dma.h>
 #else
This page took 0.152046 seconds and 5 git commands to generate.