Patches by himba, 21 Aug 2004:

- fix some "use of label at end of compound statement" warnings
- Define type of LCD panel on lubbock board if CONFIG_LCD is used
This commit is contained in:
wdenk 2004-10-09 22:32:26 +00:00
parent 1d9f410500
commit 63cfcbb4e2
3 changed files with 257 additions and 258 deletions

View File

@ -2,6 +2,10 @@
Changes since U-Boot 1.1.1:
======================================================================
* Patches by himba, 21 Aug 2004:
- fix some "use of label at end of compound statement" warnings
- Define type of LCD panel on lubbock board if CONFIG_LCD is used
* Patch by Steven Scholz, 16 Aug 2004:
- Introducing the concept of SoCs "./cpu/$(CPU)/$(SOC)"
- creating subdirs for SoCs ./cpu/arm920t/imx and ./cpu/arm920t/s3c24x0

View File

@ -41,17 +41,16 @@ ulong flash_init(void)
int i, j;
ulong size = 0;
for (i = 0; i < CFG_MAX_FLASH_BANKS; i++)
{
for (i = 0; i < CFG_MAX_FLASH_BANKS; i++) {
ulong flashbase = 0;
flash_info[i].flash_id =
(INTEL_MANUFACT & FLASH_VENDMASK) |
(INTEL_ID_28F128J3 & FLASH_TYPEMASK);
flash_info[i].size = FLASH_BANK_SIZE;
flash_info[i].sector_count = CFG_MAX_FLASH_SECT;
memset (flash_info[i].protect, 0, CFG_MAX_FLASH_SECT);
switch (i)
{
switch (i) {
case 0:
flashbase = PHYS_FLASH_1;
break;
@ -62,9 +61,9 @@ ulong flash_init(void)
panic ("configured too many flash banks!\n");
break;
}
for (j = 0; j < flash_info[i].sector_count; j++)
{
flash_info[i].start[j] = flashbase + j*MAIN_SECT_SIZE;
for (j = 0; j < flash_info[i].sector_count; j++) {
flash_info[i].start[j] =
flashbase + j * MAIN_SECT_SIZE;
}
size += flash_info[i].size;
}
@ -78,8 +77,7 @@ ulong flash_init(void)
flash_protect (FLAG_PROTECT_SET,
CFG_ENV_ADDR,
CFG_ENV_ADDR + CFG_ENV_SIZE - 1,
&flash_info[0]);
CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]);
return size;
}
@ -90,10 +88,8 @@ void flash_print_info (flash_info_t *info)
{
int i, j;
for (j=0; j<CFG_MAX_FLASH_BANKS; j++)
{
switch (info->flash_id & FLASH_VENDMASK)
{
for (j = 0; j < CFG_MAX_FLASH_BANKS; j++) {
switch (info->flash_id & FLASH_VENDMASK) {
case (INTEL_MANUFACT & FLASH_VENDMASK):
printf ("Intel: ");
break;
@ -102,8 +98,7 @@ void flash_print_info (flash_info_t *info)
break;
}
switch (info->flash_id & FLASH_TYPEMASK)
{
switch (info->flash_id & FLASH_TYPEMASK) {
case (INTEL_ID_28F320J3A & FLASH_TYPEMASK):
printf ("28F320J3A (32Mbit)\n");
break;
@ -120,10 +115,8 @@ void flash_print_info (flash_info_t *info)
info->size >> 20, info->sector_count);
printf (" Sector Start Addresses:");
for (i = 0; i < info->sector_count; i++)
{
if ((i % 5) == 0)
{
for (i = 0; i < info->sector_count; i++) {
if ((i % 5) == 0) {
printf ("\n ");
}
printf (" %08lX%s", info->start[i],
@ -133,7 +126,7 @@ void flash_print_info (flash_info_t *info)
info++;
}
Done:
Done: ;
}
/*-----------------------------------------------------------------------
@ -189,7 +182,8 @@ int flash_erase (flash_info_t *info, int s_first, int s_last)
*addr = 0xD0; /* erase confirm */
while ((*addr & 0x80) != 0x80) {
if (get_timer_masked() > CFG_FLASH_ERASE_TOUT) {
if (get_timer_masked () >
CFG_FLASH_ERASE_TOUT) {
*addr = 0xB0; /* suspend erase */
*addr = 0xFF; /* reset to read mode */
rc = ERR_TIMOUT;
@ -255,8 +249,7 @@ static int write_word (flash_info_t *info, ulong dest, ushort data)
reset_timer_masked ();
/* wait while polling the status register */
while(((val = *addr) & 0x80) != 0x80)
{
while (((val = *addr) & 0x80) != 0x80) {
if (get_timer_masked () > CFG_FLASH_WRITE_TOUT) {
rc = ERR_TIMOUT;
/* suspend program command */
@ -313,8 +306,7 @@ int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt)
/*
* handle unaligned start bytes
*/
if ((l = addr - wp) != 0)
{
if ((l = addr - wp) != 0) {
data = 0;
for (i = 0, cp = wp; i < l; ++i, ++cp) {
data = (data >> 8) | (*(uchar *) cp << 8);

View File

@ -43,6 +43,9 @@
#define CONFIG_PXA250 1 /* This is an PXA250 CPU */
#define CONFIG_LUBBOCK 1 /* on an LUBBOCK Board */
#define CONFIG_LCD 1
#ifdef CONFIG_LCD
#define CONFIG_SHARP_LM8V31
#endif
#define CONFIG_MMC 1
#define BOARD_LATE_INIT 1