Falco/Slippy: Patch to refactor haswell/gma.c and mainboard/google/slippy/i915io.c

A large portion of documented registers have been initialized using macros. Only a few
undocumented registers are left out. i915io.c looks lot more cleaner by removing redundant
calls. However, some more work is required to correctly identify which calls are not required.

All the io_writes are replaced by gtt_writes.

Change-Id: I077a235652c7d5eb90346cd6e15cc48b5161e969
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/66204
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
(cherry picked from commit 39f3289f68b527575b0a120960ff67f78415815e)
Signed-off-by: Isaac Christensen <isaac.christensen@se-eng.com>
Reviewed-on: http://review.coreboot.org/6600
Tested-by: build bot (Jenkins)
diff --git a/src/drivers/intel/gma/i915.h b/src/drivers/intel/gma/i915.h
index 9ef3abd..72301e1 100644
--- a/src/drivers/intel/gma/i915.h
+++ b/src/drivers/intel/gma/i915.h
@@ -63,6 +63,12 @@
         TRANSCODER_EDP = 0xF,
 };
 
+enum plane {
+	PLANE_A = 0,
+	PLANE_B,
+	PLANE_C,
+};
+
 /* debug enums. These are for printks that, due to their place in the
  * middle of graphics device IO, might change timing.  Use with care
  * or not at all.
@@ -132,6 +138,7 @@
 	u32 clock;
 	int port;
 	int pipe;
+	int plane;
 	int bpp;
 	/* i2c on aux is ... interesting.
 	 * Before you do an i2c cycle, you need to set the address.
@@ -193,7 +200,6 @@
 void ironlake_edp_panel_on(struct intel_dp *intel_dp);
 void ironlake_edp_backlight_on(struct intel_dp *intel_dp);
 /* needed only on haswell. */
-void intel_prepare_ddi_buffers(int port, int use_fdi_mode);
 void intel_ddi_prepare_link_retrain(struct intel_dp *intel_dp, int port);
 int intel_dp_aux_ch(struct intel_dp *intel_dp,
 		    uint8_t *send, int send_bytes,
@@ -262,3 +268,12 @@
 
 int intel_dp_get_lane_align_status(struct intel_dp *intel_dp,
 				   u8 *recv);
+
+void intel_prepare_ddi(void);
+void intel_ddi_set_pipe_settings(struct intel_dp *intel_dp);
+
+void gtt_write(u32 reg, u32 data);
+u32 gtt_read(u32 reg);
+
+int i915lightup(unsigned int physbase, unsigned int mmio,
+		unsigned int gfx, unsigned int init_fb);