cyclic: use a flag in gd->flags for recursion protection
[platform/kernel/u-boot.git] / include / asm-generic / global_data.h
index 9006c76..8d348b0 100644 (file)
@@ -68,7 +68,7 @@ struct global_data {
         * @mem_clk: memory clock rate in Hz
         */
        unsigned long mem_clk;
-#if defined(CONFIG_LCD) || defined(CONFIG_DM_VIDEO)
+#if defined(CONFIG_VIDEO)
        /**
         * @fb_base: base address of frame buffer memory
         */
@@ -116,10 +116,14 @@ struct global_data {
        /**
         * @precon_buf_idx: pre-console buffer index
         *
-        * @precon_buf_idx indicates the current position of the buffer used to
-        * collect output before the console becomes available
+        * @precon_buf_idx indicates the current position of the
+        * buffer used to collect output before the console becomes
+        * available. When negative, the pre-console buffer is
+        * temporarily disabled (used when the pre-console buffer is
+        * being written out, to prevent adding its contents to
+        * itself).
         */
-       unsigned long precon_buf_idx;
+       long precon_buf_idx;
 #endif
        /**
         * @env_addr: address of environment structure
@@ -355,7 +359,7 @@ struct global_data {
         */
        struct membuff console_in;
 #endif
-#ifdef CONFIG_DM_VIDEO
+#ifdef CONFIG_VIDEO
        /**
         * @video_top: top of video frame buffer area
         */
@@ -642,6 +646,14 @@ enum gd_flags {
         * @GD_FLG_SMP_READY: SMP initialization is complete
         */
        GD_FLG_SMP_READY = 0x80000,
+       /**
+        * @GD_FLG_FDT_CHANGED: Device tree change has been detected by tests
+        */
+       GD_FLG_FDT_CHANGED = 0x100000,
+       /**
+        * GD_FLG_CYCLIC_RUNNING: cyclic_run is in progress
+        */
+       GD_FLG_CYCLIC_RUNNING = 0x200000,
 };
 
 #endif /* __ASSEMBLY__ */