]> rtime.felk.cvut.cz Git - can-eth-gw-linux.git/commitdiff
ARM: OMAP2+: PRCM: consolidate PRCM-related timeout macros
authorPaul Walmsley <paul@pwsan.com>
Tue, 30 Oct 2012 02:57:44 +0000 (20:57 -0600)
committerPaul Walmsley <paul@pwsan.com>
Thu, 8 Nov 2012 22:09:26 +0000 (15:09 -0700)
Consolidate all of the copies of MAX_MODULE_HARDRESET_WAIT and
MAX_MODULE_SOFTRESET_WAIT into one place, arch/arm/mach-omap2/prm.h.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Tested-by: Vaibhav Hiremath <hvaibhav@ti.com>
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/omap_hwmod.c
arch/arm/mach-omap2/prcm-common.h
arch/arm/mach-omap2/prm.h
arch/arm/mach-omap2/prm2xxx_3xxx.h
arch/arm/mach-omap2/wd_timer.c

index 89c57129357a41eeb1d0e6c73745e1d1c7591f74..38ba58c97628efd6a99d61377eeff545d09e9cc4 100644 (file)
@@ -35,6 +35,7 @@
 #include "mux.h"
 #include "control.h"
 #include "display.h"
+#include "prm.h"
 
 #define DISPC_CONTROL          0x0040
 #define DISPC_CONTROL2         0x0238
@@ -512,7 +513,6 @@ static void dispc_disable_outputs(void)
        }
 }
 
-#define MAX_MODULE_SOFTRESET_WAIT      10000
 int omap_dss_reset(struct omap_hwmod *oh)
 {
        struct omap_hwmod_opt_clk *oc;
index 3da8900598c88444d6729ffb8368e4f2509a6081..ab7bf181a1052feb452f26efe34ca2089a291398 100644 (file)
 #include "omap_device.h"
 #include "hdq1w.h"
 
+#include "prm.h"
 #include "common.h"
 
-/* Maximum microseconds to wait for OMAP module to softreset */
-#define MAX_MODULE_SOFTRESET_WAIT      10000
-
 /**
  * omap_hdq1w_reset - reset the OMAP HDQ1W module
  * @oh: struct omap_hwmod *
index ad55b943108fcfc17de50d471ce9afd034105d55..be092e8e5d85aa7a7ef9abda038aff2ccce35d74 100644 (file)
  */
 
 #include "soc.h"
-#include "common.h"
 #include "omap_hwmod.h"
 #include "omap_device.h"
 
+#include "prm.h"
+#include "common.h"
 #include "mux.h"
 #include "i2c.h"
 
@@ -32,9 +33,6 @@
 #define OMAP2_I2C_CON_OFFSET                   0x24
 #define OMAP4_I2C_CON_OFFSET                   0xA4
 
-/* Maximum microseconds to wait for OMAP module to softreset */
-#define MAX_MODULE_SOFTRESET_WAIT      10000
-
 #define MAX_OMAP_I2C_HWMOD_NAME_LEN    16
 
 static void __init omap2_i2c_mux_pins(int bus_id)
index 627e97e307432aec72cee47c10426675fe1b935f..aafdd4ca9f4fc0ac4f7ea2fbf9b83bfce21888d1 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/err.h>
 #include <linux/platform_data/gpio-omap.h>
 
+#include "prm.h"
 #include "common.h"
 #include "control.h"
 #include "omap_hwmod.h"
@@ -43,9 +44,6 @@
 #define MSDI_CON_CLKD_MASK                     (0x3f << 0)
 #define MSDI_CON_CLKD_SHIFT                    0
 
-/* Maximum microseconds to wait for OMAP module to softreset */
-#define MAX_MODULE_SOFTRESET_WAIT      10000
-
 /* MSDI_TARGET_RESET_CLKD: clock divisor to use throughout the reset */
 #define MSDI_TARGET_RESET_CLKD         0x3ff
 
index 37eeb45612f89ccd840b2d195fc1d60a29a0eb58..54b68121734cbf8f733e55bd1d953564204427fc 100644 (file)
 #include "cm3xxx.h"
 #include "cminst44xx.h"
 #include "cm33xx.h"
+#include "prm.h"
 #include "prm3xxx.h"
 #include "prm44xx.h"
 #include "prm33xx.h"
 #include "mux.h"
 #include "pm.h"
 
-/* Maximum microseconds to wait for OMAP module to softreset */
-#define MAX_MODULE_SOFTRESET_WAIT      10000
-
 /* Name of the OMAP hwmod for the MPU */
 #define MPU_INITIATOR_NAME             "mpu"
 
index b25a32a5e548b3ae89d32e074a7f570ede25904f..c7d355fafd24ef27b363e44fbc3220ffd13ab7c8 100644 (file)
 #define OMAP3430_EN_CORE_MASK                          (1 << 0)
 
 
-/*
- * MAX_MODULE_HARDRESET_WAIT: Maximum microseconds to wait for an OMAP
- * submodule to exit hardreset
- */
-#define MAX_MODULE_HARDRESET_WAIT              10000
 
 /*
  * Maximum time(us) it takes to output the signal WUCLKOUT of the last
  * microseconds on OMAP4, so this timeout may be too high.
  */
 #define MAX_IOPAD_LATCH_TIME                   100
-
 # ifndef __ASSEMBLER__
 
 /**
index fb7dee29ce7672352685489122e61d5e8176da11..a1a266ce90dac1e2e0874128f2ea260b3b979dff 100644 (file)
@@ -20,6 +20,23 @@ extern void __iomem *prm_base;
 extern void omap2_set_globals_prm(void __iomem *prm);
 # endif
 
+
+/*
+ * MAX_MODULE_SOFTRESET_WAIT: Maximum microseconds to wait for OMAP
+ * module to softreset
+ */
+#define MAX_MODULE_SOFTRESET_WAIT              10000
+
+/*
+ * MAX_MODULE_HARDRESET_WAIT: Maximum microseconds to wait for an OMAP
+ * submodule to exit hardreset
+ */
+#define MAX_MODULE_HARDRESET_WAIT              10000
+
+/*
+ * Register bitfields
+ */
+
 /*
  * 24XX: PM_PWSTST_CORE, PM_PWSTST_GFX, PM_PWSTST_MPU, PM_PWSTST_DSP
  *
index 3330b1bf789d0de1f27ff827b7dc9b0ed669fd11..78532d6fecd71e6e04ff0f7283a458d1285eb1d7 100644 (file)
@@ -241,11 +241,4 @@ extern int omap2_clkdm_clear_all_wkdeps(struct clockdomain *clkdm);
 #define OMAP_LOGICRETSTATE_MASK                                (1 << 2)
 
 
-/*
- * MAX_MODULE_HARDRESET_WAIT: Maximum microseconds to wait for an OMAP
- * submodule to exit hardreset
- */
-#define MAX_MODULE_HARDRESET_WAIT              10000
-
-
 #endif
index 5a8629ff0ab0e8c0cbe5013ac6c381b8f2b8ba7c..7c2b4ed38f0261d7b6776103f2f531feb7991f44 100644 (file)
@@ -1,6 +1,8 @@
 /*
  * OMAP2+ MPU WD_TIMER-specific code
  *
+ * Copyright (C) 2012 Texas Instruments, Inc.
+ *
  * 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
@@ -30,9 +32,6 @@
 #define OMAP_WDT_WPS           0x34
 #define OMAP_WDT_SPR           0x48
 
-/* Maximum microseconds to wait for OMAP module to softreset */
-#define MAX_MODULE_SOFTRESET_WAIT      10000
-
 int omap2_wd_timer_disable(struct omap_hwmod *oh)
 {
        void __iomem *base;