summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Waters <justin.waters@timesys.com>2013-05-14 16:19:57 -0400
committerJustin Waters <justin.waters@timesys.com>2013-05-14 16:19:57 -0400
commit266c19c9cd6808e0d2546ce084e97fa73a1e0a2c (patch)
treefcf8d5259327651441cab0d11465ccdbe77bc520
parent15473818068d8de6672d6a83a6888ed40b1f9811 (diff)
LogicPD Support for OMAP3/DM3/AM3 boards 2.4 Update
-rw-r--r--arch/arm/cpu/armv7/omap3/sys_info.c16
-rw-r--r--arch/arm/include/asm/arch-omap3/omap3.h1
-rw-r--r--board/ti/logic/logic-display.c18
-rw-r--r--drivers/mtd/nand/omap_gpmc.c24
-rw-r--r--include/configs/omap3logic.h19
5 files changed, 53 insertions, 25 deletions
diff --git a/arch/arm/cpu/armv7/omap3/sys_info.c b/arch/arm/cpu/armv7/omap3/sys_info.c
index 09bce91bba9..472f34c98e0 100644
--- a/arch/arm/cpu/armv7/omap3/sys_info.c
+++ b/arch/arm/cpu/armv7/omap3/sys_info.c
@@ -33,16 +33,24 @@
extern omap3_sysinfo sysinfo;
static struct ctrl *ctrl_base = (struct ctrl *)OMAP34XX_CTRL_BASE;
-static char *rev_s[CPU_3XX_MAX_REV] = {
+static char *rev_s[] = {
"1.0",
"2.0",
"2.1",
"3.0",
"3.1",
- "UNKNOWN",
- "UNKNOWN",
+ NULL,
+ NULL,
"3.1.2"};
+/* Return CPU revision string for known revisions or "unknown" */
+static char *get_rev_str(unsigned int rev)
+{
+ if (rev >= ARRAY_SIZE(rev_s) || !rev_s[rev])
+ return "Unknown";
+ return rev_s[rev];
+}
+
/*****************************************************************
* dieid_num_r(void) - read and set die ID
*****************************************************************/
@@ -428,7 +436,7 @@ int print_cpuinfo (void)
printf("%s%s-%s ES%s, CPU-OPP2, L3-%uMHz, Max CPU Clock %s\n",
cpu_family_s, cpu_s, sec_s,
- rev_s[get_cpu_rev()], l3_ick, max_clk);
+ get_rev_str(get_cpu_rev()), l3_ick, max_clk);
return 0;
}
diff --git a/arch/arm/include/asm/arch-omap3/omap3.h b/arch/arm/include/asm/arch-omap3/omap3.h
index 117ad1ee611..b38faed44d8 100644
--- a/arch/arm/include/asm/arch-omap3/omap3.h
+++ b/arch/arm/include/asm/arch-omap3/omap3.h
@@ -213,7 +213,6 @@ struct gpio {
#define CPU_3XX_ES30 3
#define CPU_3XX_ES31 4
#define CPU_3XX_ES312 7
-#define CPU_3XX_MAX_REV 8
#define CPU_3XX_ID_SHIFT 28
diff --git a/board/ti/logic/logic-display.c b/board/ti/logic/logic-display.c
index d0efb36e26b..8f684aae69f 100644
--- a/board/ti/logic/logic-display.c
+++ b/board/ti/logic/logic-display.c
@@ -138,6 +138,24 @@ struct logic_panel logic_panels[] = {
},
},
{
+ .name = "28",
+ .config = OMAP_DSS_LCD_TFT,
+ .acb = 0x0,
+ .data_lines = 16,
+ .timing = {
+ /* 480 x 272, LQ043T1DG28 */
+ .x_res = 480,
+ .y_res = 272,
+ .pixel_clock = 9000,
+ .hfp = 3,
+ .hsw = 42,
+ .hbp = 2,
+ .vfp = 2,
+ .vsw = 11,
+ .vbp = 4,
+ },
+ },
+ {
.name = "3",
.config = OMAP_DSS_LCD_TFT,
.acb = 0x28,
diff --git a/drivers/mtd/nand/omap_gpmc.c b/drivers/mtd/nand/omap_gpmc.c
index 6bb37a5660a..82f7d4c318d 100644
--- a/drivers/mtd/nand/omap_gpmc.c
+++ b/drivers/mtd/nand/omap_gpmc.c
@@ -64,9 +64,10 @@ void omap_dma_read_buf16(struct mtd_info *mtd, uint8_t *buf, int len)
return;
}
- /* Invalidate the datacache for the buffer, program the DMA and wait
- * for it to finish */
- invalidate_dcache_range((unsigned long)p, (unsigned long)(p + len));
+ /* Invalidate the data cache for the buffer, program the DMA and wait *
+ * for it to finish. buf is a word pointer, len is a byte count, so we *
+ * need to calculate the range using (len / 2) */
+ invalidate_dcache_range((unsigned long)p, (unsigned long)(p + (len / 2)));
/* Transfer the data(and wait to complete) */
@@ -657,7 +658,15 @@ void omap_nand_switch_ecc(enum omap_nand_ecc_mode mode)
nand->options |= NAND_OWN_BUFFERS;
- /* Reset ecc interface */
+#ifdef CONFIG_OMAP_DMA
+ omap3_dma_channel_init(DMA_CHANNEL_NAND, -1, CSDP_DATA_TYPE_32BIT, CCR_SRC_AMODE_CONSTANT, CCR_DST_AMODE_POST_INC);
+ if (nand->options & NAND_BUSWIDTH_16)
+ nand->read_buf = omap_dma_read_buf16;
+ else
+ printf("%s: Huh? not 16-bit for DMA\n", __FUNCTION__);
+#endif
+
+ /* Reset ecc interface */
nand->ecc.read_page = NULL;
nand->ecc.write_page = NULL;
nand->ecc.read_oob = NULL;
@@ -731,13 +740,6 @@ void omap_nand_switch_ecc(enum omap_nand_ecc_mode mode)
nand->ecc.hwctl = omap_enable_chip_hwecc;
nand->ecc.correct = omap_correct_chip_hwecc;
nand->ecc.read_oob = omap_read_oob_chipecc;
-#ifdef CONFIG_OMAP_DMA
- omap3_dma_channel_init(DMA_CHANNEL_NAND, -1, CSDP_DATA_TYPE_32BIT, CCR_SRC_AMODE_CONSTANT, CCR_DST_AMODE_POST_INC);
- if (nand->options & NAND_BUSWIDTH_16)
- nand->read_buf = omap_dma_read_buf16;
- else
- printf("%s: Huh? not 16-bit for DMA\n", __FUNCTION__);
-#endif
nand->ecc.mode = NAND_ECC_CHIP; /* internal to chip */
nand->ecc.layout = &chip_nand_oob;
if (nand->options & NAND_BUSWIDTH_16)
diff --git a/include/configs/omap3logic.h b/include/configs/omap3logic.h
index 882349f65ed..f2713a95b3a 100644
--- a/include/configs/omap3logic.h
+++ b/include/configs/omap3logic.h
@@ -305,14 +305,15 @@
" echo\n" \
" echo =================================== NOTICE ===================================\n" \
" echo \"The U-Boot environment was not found. If the display is not set properly \"\n"\
- " echo \"linux will not have video support.\"\n" \
+ " echo \"linux will not have video support.\"\n" \
" echo \n" \
" echo \"Valid display options are:\"\n" \
- " echo \" 2 == LQ121S1DG31 TFT SVGA (12.1) Sharp\"\n" \
+ " echo \" 2 == LQ121S1DG31 TFT SVGA (12.1) Sharp\"\n" \
" echo \" 3 == LQ036Q1DA01 TFT QVGA (3.6) Sharp w/ASIC\"\n" \
- " echo \" 5 == LQ064D343 TFT VGA (6.4) Sharp\"\n" \
- " echo \" 7 == LQ10D368 TFT VGA (10.4) Sharp\"\n" \
- " echo \" 15 == LQ043T1DG01 TFT WQVGA (4.3) Sharp (DEFAULT)\"\n" \
+ " echo \" 5 == LQ064D343 TFT VGA (6.4) Sharp\"\n" \
+ " echo \" 7 == LQ10D368 TFT VGA (10.4) Sharp\"\n" \
+ " echo \" 15 == LQ043T1DG01 TFT WQVGA (4.3) Sharp\"\n" \
+ " echo \" 28 == LQ043T1DG28 TFT WQVGA (4.3) Sharp (DEFAULT)\"\n" \
" echo \" vga[-16 OR -24] LCD VGA 640x480\"\n" \
" echo \" svga[-16 OR -24] LCD SVGA 800x600\"\n" \
" echo \" xga[-16 OR -24] LCD XGA 1024x768\"\n" \
@@ -320,9 +321,9 @@
" echo \" sxga[-16 OR -24] LCD SXGA 1280x1024\"\n" \
" echo \" uxga[-16 OR -24] LCD UXGA 1600x1200\"\n" \
" echo \n " \
- " echo \"Default `display` environment variable is now being set to: 15\"\n" \
- " setenv display 15\n" \
- " setenv preboot\n" \
+ " echo \"Default `display` environment variable is now being set to: 28\"\n" \
+ " setenv display 28\n" \
+ " setenv preboot\n" \
" echo \n " \
" echo \"At the U-Boot prompt type commands: `setenv display <num>`, then type\"\n" \
" echo \"`saveenv` to save the environment to NAND flash. This will avoid seeing\"\n" \
@@ -417,7 +418,7 @@
"disablecharging=no\0" \
"mmc_bootscript_addr=0x80FF0000\0" \
"disablecharging no\0" \
- "display=15\0" \
+ "display=28\0" \
"loadaddr=0x81000000\0" \
"kernel_location=mmc \0" \
"rootfs_location=mmc \0" \