summaryrefslogtreecommitdiff
path: root/cpu
diff options
context:
space:
mode:
authorwdenk <wdenk>2004-03-14 16:51:43 +0000
committerwdenk <wdenk>2004-03-14 16:51:43 +0000
commit4b248f3f71dc867b0b636b137b044cc762b68486 (patch)
tree70b5fc533011958b15296a393fef2ed2c13836d4 /cpu
parentaaf224ab4ec400abefa17982cbd2ae995adc9978 (diff)
downloadu-boot-imx-4b248f3f71dc867b0b636b137b044cc762b68486.zip
u-boot-imx-4b248f3f71dc867b0b636b137b044cc762b68486.tar.gz
u-boot-imx-4b248f3f71dc867b0b636b137b044cc762b68486.tar.bz2
* Patch by Pierre Aubert, 11 Mar 2004:
- add bitmap command and splash screen support in cfb console - add [optional] origin in the bitmap display command * Patch by Travis Sawyer, 11 Mar 2004: Fix ocotea board early init interrupt setup. * Patch by Thomas Viehweger, 11 Mar 2004: Remove redundand code; add PCI-specific bits to include/mpc8260.h
Diffstat (limited to 'cpu')
-rw-r--r--cpu/mpc8260/cpu_init.c9
-rw-r--r--cpu/mpc8xx/lcd.c18
2 files changed, 15 insertions, 12 deletions
diff --git a/cpu/mpc8260/cpu_init.c b/cpu/mpc8260/cpu_init.c
index fd09a8d..babcce4 100644
--- a/cpu/mpc8260/cpu_init.c
+++ b/cpu/mpc8260/cpu_init.c
@@ -98,7 +98,9 @@ static void config_8260_ioports (volatile immap_t * immr)
void cpu_init_f (volatile immap_t * immr)
{
DECLARE_GLOBAL_DATA_PTR;
-
+#if !defined(CONFIG_COGENT) /* done in start.S for the cogent */
+ uint sccr;
+#endif
volatile memctl8260_t *memctl = &immr->im_memctl;
extern void m8260_cpm_reset (void);
@@ -131,7 +133,10 @@ void cpu_init_f (volatile immap_t * immr)
#if !defined(CONFIG_COGENT) /* done in start.S for the cogent */
/* System clock control register (9-8) */
- immr->im_clkrst.car_sccr = CFG_SCCR;
+ sccr = immr->im_clkrst.car_sccr &
+ (SCCR_PCI_MODE | SCCR_PCI_MODCK | SCCR_PCIDF_MSK);
+ immr->im_clkrst.car_sccr = sccr |
+ (CFG_SCCR & ~(SCCR_PCI_MODE | SCCR_PCI_MODCK | SCCR_PCIDF_MSK) );
#endif /* !CONFIG_COGENT */
/*
diff --git a/cpu/mpc8xx/lcd.c b/cpu/mpc8xx/lcd.c
index 5405cb4..f7620ef 100644
--- a/cpu/mpc8xx/lcd.c
+++ b/cpu/mpc8xx/lcd.c
@@ -1205,7 +1205,7 @@ static void bitmap_plot (int x, int y)
* Display the BMP file located at address bmp_image.
* Only uncompressed
*/
-int lcd_display_bitmap(ulong bmp_image)
+int lcd_display_bitmap(ulong bmp_image, int x, int y)
{
volatile immap_t *immr = (immap_t *) CFG_IMMR;
volatile cpm8xx_t *cp = &(immr->im_cpm);
@@ -1277,16 +1277,14 @@ int lcd_display_bitmap(ulong bmp_image)
}
padded_line = (width&0x3) ? ((width&~0x3)+4) : (width);
- if (width>panel_info.vl_col)
- width = panel_info.vl_col;
- if (height>panel_info.vl_row)
- height = panel_info.vl_row;
+ if ((x + width)>panel_info.vl_col)
+ width = panel_info.vl_col - x;
+ if ((y + height)>panel_info.vl_row)
+ height = panel_info.vl_row - y;
bmap = (uchar *)bmp + le32_to_cpu (bmp->header.data_offset);
- fb = (uchar *)
- (lcd_base +
- (((height>=panel_info.vl_row) ? panel_info.vl_row : height)-1)
- * lcd_line_length);
+ fb = (uchar *) (lcd_base +
+ (y + height - 1) * lcd_line_length + x);
for (i = 0; i < height; ++i) {
WATCHDOG_RESET();
for (j = 0; j < width ; j++)
@@ -1317,7 +1315,7 @@ static void *lcd_logo (void)
if ((s = getenv("splashimage")) != NULL) {
addr = simple_strtoul(s, NULL, 16);
- if (lcd_display_bitmap (addr) == 0) {
+ if (lcd_display_bitmap (addr, 0, 0) == 0) {
return ((void *)lcd_base);
}
}