Merge branch 'master' of git://git.denx.de/u-boot-arm

* 'master' of git://git.denx.de/u-boot-arm:
  drivers/rtc: add Marvell Integrated RTC
  Armada100: Add Board Support for Marvell GuruPlug-Display
  Armada100: MFP macro naming correction
  arm: auto gen asm-offsets.h for mb86r0x
  spear: fix build errors for spear3xx/spear600 platforms
  cosmetic: arm: lib/board.c: Coding Style cleanup
  ARM: versatile: fix board support
  SMDKV310: Enable device tree support
  SMDKV310: MMC_SPL: Fix building when using "make O="
  arm: a320: enable tagged list support
  arm: a320: fix multiline comment style
  ARMv7: u8500_href: Add missing header to fix compiler warning
  Removed unused define, CONFIG_ARMV7.
  avr32: add grasshopper (ICnova AP7000) board
  AT91/SPI: fix atmel_dataflash_spi.c to allow building without warnings
  MAKEALL: remove AT91 boards that are in boards.cfg
  AT91: Makes AT91SAM9263-EK build correctly against u-boot-atmel/master
  AT91: Makes AT91SAM9263 SoC build correctly against u-boot-atmel/master
  AT91: Board fix for AT91SAM9261-EK
  AT91: SoC fix at91sam9261_matrix.h
  AT91: Makes AT91SAM9RL-EK build correctly against u-boot-atmel/master
  AT91: Makes AT91SAM9RL SoC build correctly against u-boot-atmel/master
  AT91: change common at91sam9261 files to compile with new scheme
  AT91: fix mistake in at91sam9260_devices.c(spi1_hw_init)
  a/a/c/arm920t/at91/reset.c: drop obsolete CONFIG_AT91RM9200_USART
  README: fix arm920t/at91 path
  net/eth.c: drop obsolete at91rm9200 support
  README.at91-soc: remove AT91(RM9200) joining notice
  a/a/c/arm920t/cpu.c: remove CONFIG_AT91_LEGACY warning
  MAKEALL: remove obsolete at91rm9200 soc
  ARM: remove obsolete at91rm9200
  omap4: clock init support for omap4460
  omap4: support TPS programming
  omap: reuse omap3 gpio support in omap4
  omap4: sdram init changes for omap4460
  omap4: add omap4460 revision detection
  mkimage: Add OMAP boot image support
  omap: add MMC and FAT support to SPL
  omap: add basic SPL support
  armv7: start.S: fixes and enhancements for SPL
  omap4: automatic sdram detection
  omap4: calculate EMIF register values
  omap4: add sdram init support
  omap4: add clock support
  omap4: add OMAP4430 revision check
  omap4: cleanup pin mux data
  omap4: utility function to identify the context of hw init
  DA8xx: fix LPSC constants
  DA8xx: switch an enum to defines for consistency
  DA8xx: add MMC/SD controller addresses
  DaVinci EMAC: declare function for all DA8xx CPUs
  DA8xx: add generic GPIO driver
  DaVinci: rename gpio_defs.h to gpio.h
  omap3evm: eth: Include functions only when necessary
  omap3evm: Update ethernet reset sequence for Rev.G board
  omap3evm: eth: split function setup_net_chip
  omap3: Include array definition only when it is used
  omap730p2: fix build breaks
  omap2420h4: fix build breaks
  omap1610inn: fix build breaks
  omap1510inn: fix build breaks
  omap5912osk: fix build breaks
  omap1610h2: fix build breaks
diff --git a/arch/powerpc/cpu/mpc512x/diu.c b/arch/powerpc/cpu/mpc512x/diu.c
index 9dc1e48..b7db249 100644
--- a/arch/powerpc/cpu/mpc512x/diu.c
+++ b/arch/powerpc/cpu/mpc512x/diu.c
@@ -56,5 +56,5 @@
 	unsigned int pixel_format = 0x88883316;
 
 	debug("mpc5121_diu_init\n");
-	return fsl_diu_init(xres, pixel_format, 0);
+	return fsl_diu_init(xres, yres, pixel_format, 0);
 }
diff --git a/board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c b/board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c
index 3011bb80..358a432 100644
--- a/board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c
+++ b/board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c
@@ -83,5 +83,5 @@
 	printf("DIU:   Switching to %s monitor @ %ux%u\n", name, xres, yres);
 	out_8(&pixis->brdcfg0, temp);
 
-	return fsl_diu_init(xres, pixel_format, gamma_fix);
+	return fsl_diu_init(xres, yres, pixel_format, gamma_fix);
 }
diff --git a/board/freescale/p1022ds/diu.c b/board/freescale/p1022ds/diu.c
index 7d1f6aa..cef81ce 100644
--- a/board/freescale/p1022ds/diu.c
+++ b/board/freescale/p1022ds/diu.c
@@ -139,7 +139,7 @@
 	clrsetbits_be32(&gur->pmuxcr, PMUXCR_ELBCDIU_MASK, PMUXCR_ELBCDIU_DIU);
 	pmuxcr = in_be32(&gur->pmuxcr);
 
-	return fsl_diu_init(xres, pixel_format, 0);
+	return fsl_diu_init(xres, yres, pixel_format, 0);
 }
 
 /*
diff --git a/drivers/video/fsl_diu_fb.c b/drivers/video/fsl_diu_fb.c
index 0709849..e1d6c26 100644
--- a/drivers/video/fsl_diu_fb.c
+++ b/drivers/video/fsl_diu_fb.c
@@ -78,13 +78,9 @@
 	unsigned int flag;
 };
 
-#define FB_SYNC_VERT_HIGH_ACT	2	/* vertical sync high active	*/
-#define FB_SYNC_COMP_HIGH_ACT	8	/* composite sync high active   */
-#define FB_VMODE_NONINTERLACED  0	/* non interlaced */
-
 /* This setting is used for the ifm pdm360ng with PRIMEVIEW PM070WL3 */
-static struct fb_videomode fsl_diu_mode_800 = {
-	.name		= "800x600-60",
+static struct fb_videomode fsl_diu_mode_800_480 = {
+	.name		= "800x480-60",
 	.refresh	= 60,
 	.xres		= 800,
 	.yres		= 480,
@@ -99,13 +95,30 @@
 	.vmode		= FB_VMODE_NONINTERLACED
 };
 
+/* For the SHARP LQ084S3LG01, used on the P1022DS board */
+static struct fb_videomode fsl_diu_mode_800_600 = {
+	.name		= "800x600-60",
+	.refresh	= 60,
+	.xres		= 800,
+	.yres		= 600,
+	.pixclock	= 25000,
+	.left_margin	= 88,
+	.right_margin	= 40,
+	.upper_margin	= 23,
+	.lower_margin	= 1,
+	.hsync_len	= 128,
+	.vsync_len	= 4,
+	.sync		= FB_SYNC_COMP_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+	.vmode		= FB_VMODE_NONINTERLACED
+};
+
 /*
  * These parameters give default parameters
  * for video output 1024x768,
  * FIXME - change timing to proper amounts
  * hsync 31.5kHz, vsync 60Hz
  */
-static struct fb_videomode fsl_diu_mode_1024 = {
+static struct fb_videomode fsl_diu_mode_1024_768 = {
 	.name		= "1024x768-60",
 	.refresh	= 60,
 	.xres		= 1024,
@@ -121,7 +134,7 @@
 	.vmode		= FB_VMODE_NONINTERLACED
 };
 
-static struct fb_videomode fsl_diu_mode_1280 = {
+static struct fb_videomode fsl_diu_mode_1280_1024 = {
 	.name		= "1280x1024-60",
 	.refresh	= 60,
 	.xres		= 1280,
@@ -263,7 +276,7 @@
 	return ad;
 }
 
-int fsl_diu_init(int xres, u32 pixel_format, int gamma_fix)
+int fsl_diu_init(u16 xres, u16 yres, u32 pixel_format, int gamma_fix)
 {
 	struct fb_videomode *fsl_diu_mode_db;
 	struct diu_ad *ad;
@@ -274,15 +287,23 @@
 	struct diu_addr gamma;
 	struct diu_addr cursor;
 
-	switch (xres) {
-	case 800:
-		fsl_diu_mode_db = &fsl_diu_mode_800;
+/* Convert the X,Y resolution pair into a single number */
+#define RESOLUTION(x, y) (((u32)(x) << 16) | (y))
+
+	switch (RESOLUTION(xres, yres)) {
+	case RESOLUTION(800, 480):
+		fsl_diu_mode_db = &fsl_diu_mode_800_480;
 		break;
-	case 1280:
-		fsl_diu_mode_db = &fsl_diu_mode_1280;
+	case RESOLUTION(800, 600):
+		fsl_diu_mode_db = &fsl_diu_mode_800_600;
+	case RESOLUTION(1024, 768):
+		fsl_diu_mode_db = &fsl_diu_mode_1024_768;
+	case RESOLUTION(1280, 1024):
+		fsl_diu_mode_db = &fsl_diu_mode_1280_1024;
 		break;
 	default:
-		fsl_diu_mode_db = &fsl_diu_mode_1024;
+		printf("DIU:   Unsupported resolution %ux%u\n", xres, yres);
+		return -1;
 	}
 
 	/* The AD struct for the dummy framebuffer and the FB itself */
diff --git a/drivers/video/mb862xx.c b/drivers/video/mb862xx.c
index edf34aa..1a4ba82 100644
--- a/drivers/video/mb862xx.c
+++ b/drivers/video/mb862xx.c
@@ -189,13 +189,22 @@
 }
 
 #if defined(CONFIG_VIDEO_CORALP)
+/* use CCF and MMR parameters for Coral-P Eval. Board as default */
+#ifndef CONFIG_SYS_MB862xx_CCF
+#define CONFIG_SYS_MB862xx_CCF	0x00090000
+#endif
+#ifndef CONFIG_SYS_MB862xx_MMR
+#define CONFIG_SYS_MB862xx_MMR	0x11d7fa13
+#endif
+
 unsigned int pci_video_init (void)
 {
 	GraphicDevice *dev = &mb862xx;
 	pci_dev_t devbusfn;
+	u16 device;
 
 	if ((devbusfn = pci_find_devices (supported, 0)) < 0) {
-		puts ("PCI video controller not found!\n");
+		puts("controller not present\n");
 		return 0;
 	}
 
@@ -212,10 +221,25 @@
 
 	dev->pciBase = dev->frameAdrs;
 
+	puts("Coral-");
+
+	pci_read_config_word(devbusfn, PCI_DEVICE_ID, &device);
+	switch (device) {
+	case PCI_DEVICE_ID_CORAL_P:
+		puts("P\n");
+		break;
+	case PCI_DEVICE_ID_CORAL_PA:
+		puts("PA\n");
+		break;
+	default:
+		puts("Unknown\n");
+		return 0;
+	}
+
-	/* Setup clocks and memory mode for Coral-P Eval. Board */
-	HOST_WR_REG (GC_CCF, 0x00090000);
+	/* Setup clocks and memory mode for Coral-P(A) */
+	HOST_WR_REG(GC_CCF, CONFIG_SYS_MB862xx_CCF);
 	udelay (200);
-	HOST_WR_REG (GC_MMR, 0x11d7fa13);
+	HOST_WR_REG(GC_MMR, CONFIG_SYS_MB862xx_MMR);
 	udelay (100);
 	return dev->frameAdrs;
 }
@@ -235,8 +259,6 @@
 	if (!pci_video_init ())
 		return 0;
 
-	puts ("CoralP\n");
-
 	tmp = 0;
 	videomode = 0x310;
 	/* get video mode via environment */
diff --git a/drivers/video/mb86r0xgdc.c b/drivers/video/mb86r0xgdc.c
index 3bdc1db..5425c9d 100644
--- a/drivers/video/mb86r0xgdc.c
+++ b/drivers/video/mb86r0xgdc.c
@@ -77,8 +77,7 @@
 	}
 
 	/* Fill memory with white */
-	for (i = 0; i < var_mode.xres * var_mode.yres / 2; i++)
-		*videomem++ = 0xFFFFFFFF;
+	memset(videomem, 0xFF, var_mode.xres * var_mode.yres * 2);
 
 	mb86r0x.winSizeX = var_mode.xres;
 	mb86r0x.winSizeY = var_mode.yres;
diff --git a/include/fsl_diu_fb.h b/include/fsl_diu_fb.h
index 4c89f4b..a58e7e2 100644
--- a/include/fsl_diu_fb.h
+++ b/include/fsl_diu_fb.h
@@ -24,7 +24,7 @@
  * MA 02111-1307 USA
  */
 
-int fsl_diu_init(int xres, u32 pixel_format, int gamma_fix);
+int fsl_diu_init(u16 xres, u16 yres, u32 pixel_format, int gamma_fix);
 
 /* Prototypes for external board-specific functions */
 int platform_diu_init(unsigned int xres, unsigned int yres, const char *port);