summaryrefslogtreecommitdiffstats
path: root/board
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2010-04-06 08:44:32 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2010-04-06 08:44:32 +0200
commiteed255609dc6b657599c09b2b02aadc20ea54882 (patch)
tree628095d169f1875a4a551ca9100913db1e408d3f /board
parent9c3df274acbd5b08502833516fb327c98c359937 (diff)
parentf5ad08466d4958f3db3f9fc47a36f003051802b6 (diff)
downloadbarebox-eed255609dc6b657599c09b2b02aadc20ea54882.tar.gz
barebox-eed255609dc6b657599c09b2b02aadc20ea54882.tar.xz
Merge branch 'next'
Diffstat (limited to 'board')
-rw-r--r--board/imx21ads/imx21ads.c83
-rw-r--r--board/pcm043/pcm043.c15
2 files changed, 91 insertions, 7 deletions
diff --git a/board/imx21ads/imx21ads.c b/board/imx21ads/imx21ads.c
index bc638e3baf..9eba19afbd 100644
--- a/board/imx21ads/imx21ads.c
+++ b/board/imx21ads/imx21ads.c
@@ -34,6 +34,10 @@
#include <fcntl.h>
#include <asm/mach-types.h>
#include <mach/imx-nand.h>
+#include <mach/imxfb.h>
+
+#define MX21ADS_IO_REG 0xCC800000
+#define MX21ADS_IO_LCDON (1 << 9)
static struct device_d cfi_dev = {
.name = "cfi_flash",
@@ -70,6 +74,45 @@ static struct device_d cs8900_dev = {
// IRQ is connected to UART3_RTS
};
+/* Sharp LQ035Q7DB02 QVGA display */
+static struct imx_fb_videomode imx_fb_modedata = {
+ .mode = {
+ .name = "Sharp-LQ035Q7",
+ .refresh = 60,
+ .xres = 240,
+ .yres = 320,
+ .pixclock = 188679,
+ .left_margin = 6,
+ .right_margin = 16,
+ .upper_margin = 8,
+ .lower_margin = 10,
+ .hsync_len = 2,
+ .vsync_len = 1,
+ .sync = 0,
+ .vmode = FB_VMODE_NONINTERLACED,
+ .flag = 0,
+ },
+ .pcr = 0xfb108bc7,
+ .bpp = 16,
+};
+
+static struct imx_fb_platform_data imx_fb_data = {
+ .mode = &imx_fb_modedata,
+ .cmap_greyscale = 0,
+ .cmap_inverse = 0,
+ .cmap_static = 0,
+ .pwmr = 0x00a903ff,
+ .lscr1 = 0x00120300,
+ .dmacr = 0x00020008,
+};
+
+static struct device_d imxfb_dev = {
+ .name = "imxfb",
+ .map_base = 0x10021000,
+ .size = 0x1000,
+ .platform_data = &imx_fb_data,
+};
+
static int imx21ads_timing_init(void)
{
u32 temp;
@@ -111,6 +154,33 @@ static int mx21ads_devices_init(void)
{
int i;
unsigned int mode[] = {
+ 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,
PE12_PF_UART1_TXD,
PE13_PF_UART1_RXD,
PE14_PF_UART1_CTS,
@@ -125,6 +195,7 @@ static int mx21ads_devices_init(void)
register_device(&sdram_dev);
register_device(&nand_dev);
register_device(&cs8900_dev);
+ register_device(&imxfb_dev);
armlinux_add_dram(&sdram_dev);
armlinux_set_bootparams((void *)0xc0000100);
@@ -135,6 +206,18 @@ static int mx21ads_devices_init(void)
device_initcall(mx21ads_devices_init);
+static int mx21ads_enable_display(void)
+{
+ u16 tmp;
+
+ tmp = readw(MX21ADS_IO_REG);
+ tmp |= MX21ADS_IO_LCDON;
+ writew(tmp, MX21ADS_IO_REG);
+ return 0;
+}
+
+late_initcall(mx21ads_enable_display);
+
static struct device_d mx21ads_serial_device = {
.name = "imx_serial",
.map_base = IMX_UART1_BASE,
diff --git a/board/pcm043/pcm043.c b/board/pcm043/pcm043.c
index 7b0bad1fb3..2ce7e3a587 100644
--- a/board/pcm043/pcm043.c
+++ b/board/pcm043/pcm043.c
@@ -145,7 +145,7 @@ static struct device_d imx_ipu_fb_dev = {
};
#ifdef CONFIG_MMU
-static void pcm043_mmu_init(void)
+static int pcm043_mmu_init(void)
{
mmu_init();
@@ -159,20 +159,21 @@ static void pcm043_mmu_init(void)
#else
arm_create_section(0x0, TEXT_BASE, 1, PMD_SECT_DEF_UNCACHED);
#endif
+
mmu_enable();
+
+#ifdef CONFIG_CACHE_L2X0
+ l2x0_init((void __iomem *)0x30000000, 0x00030024, 0x00000000);
+#endif
+ return 0;
}
-#else
-static void pcm043_mmu_init(void)
-{
-}
+postcore_initcall(pcm043_mmu_init);
#endif
static int imx35_devices_init(void)
{
uint32_t reg;
- pcm043_mmu_init();
-
/* CS0: Nor Flash */
writel(0x0000cf03, CSCR_U(0));
writel(0x10000d03, CSCR_L(0));