PLU405 board update
This commit is contained in:
parent
c2642d14c9
commit
12537cc5a9
@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk
|
|||||||
|
|
||||||
LIB = lib$(BOARD).a
|
LIB = lib$(BOARD).a
|
||||||
|
|
||||||
OBJS = $(BOARD).o flash.o
|
OBJS = $(BOARD).o flash.o ../common/misc.o ../common/auto_update.o
|
||||||
|
|
||||||
$(LIB): $(OBJS) $(SOBJS)
|
$(LIB): $(OBJS) $(SOBJS)
|
||||||
$(AR) crv $@ $(OBJS)
|
$(AR) crv $@ $(OBJS)
|
||||||
|
@ -26,13 +26,13 @@
|
|||||||
#include <command.h>
|
#include <command.h>
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
|
|
||||||
/* ------------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
#define FPGA_DEBUG
|
#define FPGA_DEBUG
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
|
extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
|
||||||
|
extern void lxt971_no_sleep(void);
|
||||||
|
|
||||||
/* fpga configuration data - gzip compressed and generated by bin2c */
|
/* fpga configuration data - gzip compressed and generated by bin2c */
|
||||||
const unsigned char fpgadata[] =
|
const unsigned char fpgadata[] =
|
||||||
@ -46,6 +46,23 @@ const unsigned char fpgadata[] =
|
|||||||
#include "../common/fpga.c"
|
#include "../common/fpga.c"
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* include common auto-update code (for esd boards)
|
||||||
|
*/
|
||||||
|
#include "../common/auto_update.h"
|
||||||
|
|
||||||
|
au_image_t au_image[] = {
|
||||||
|
{"plu405/preinst.img", 0, -1, AU_SCRIPT},
|
||||||
|
{"plu405/u-boot.img", 0xfffc0000, 0x00040000, AU_FIRMWARE},
|
||||||
|
{"plu405/pImage_$(bd_type)", 0x00000000, 0x00100000, AU_NAND},
|
||||||
|
{"plu405/pImage.initrd", 0x00100000, 0x00200000, AU_NAND},
|
||||||
|
{"plu405/yaffsmt2.img", 0x00300000, 0x01c00000, AU_NAND},
|
||||||
|
{"plu405/postinst.img", 0, 0, AU_SCRIPT},
|
||||||
|
};
|
||||||
|
|
||||||
|
int N_AU_IMAGES = (sizeof(au_image) / sizeof(au_image[0]));
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes */
|
/* Prototypes */
|
||||||
int gunzip(void *, int, unsigned char *, unsigned long *);
|
int gunzip(void *, int, unsigned char *, unsigned long *);
|
||||||
|
|
||||||
@ -81,8 +98,6 @@ int board_early_init_f (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ------------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
int misc_init_f (void)
|
int misc_init_f (void)
|
||||||
{
|
{
|
||||||
return 0; /* dummy implementation */
|
return 0; /* dummy implementation */
|
||||||
@ -99,7 +114,6 @@ int misc_init_r (void)
|
|||||||
int index;
|
int index;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
#if 1 /* test-only */
|
|
||||||
dst = malloc(CFG_FPGA_MAX_SIZE);
|
dst = malloc(CFG_FPGA_MAX_SIZE);
|
||||||
if (gunzip (dst, CFG_FPGA_MAX_SIZE, (uchar *)fpgadata, &len) != 0) {
|
if (gunzip (dst, CFG_FPGA_MAX_SIZE, (uchar *)fpgadata, &len) != 0) {
|
||||||
printf ("GUNZIP ERROR - must RESET board to recover\n");
|
printf ("GUNZIP ERROR - must RESET board to recover\n");
|
||||||
@ -179,7 +193,6 @@ int misc_init_r (void)
|
|||||||
*/
|
*/
|
||||||
*duart0_mcr = 0x08;
|
*duart0_mcr = 0x08;
|
||||||
*duart1_mcr = 0x08;
|
*duart1_mcr = 0x08;
|
||||||
#endif
|
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
@ -188,7 +201,6 @@ int misc_init_r (void)
|
|||||||
/*
|
/*
|
||||||
* Check Board Identity:
|
* Check Board Identity:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int checkboard (void)
|
int checkboard (void)
|
||||||
{
|
{
|
||||||
unsigned char str[64];
|
unsigned char str[64];
|
||||||
@ -204,10 +216,14 @@ int checkboard (void)
|
|||||||
|
|
||||||
putc ('\n');
|
putc ('\n');
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Disable sleep mode in LXT971
|
||||||
|
*/
|
||||||
|
lxt971_no_sleep();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ------------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
long int initdram (int board_type)
|
long int initdram (int board_type)
|
||||||
{
|
{
|
||||||
@ -224,7 +240,6 @@ long int initdram (int board_type)
|
|||||||
return (4*1024*1024 << ((val & 0x000e0000) >> 17));
|
return (4*1024*1024 << ((val & 0x000e0000) >> 17));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ------------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
int testdram (void)
|
int testdram (void)
|
||||||
{
|
{
|
||||||
@ -234,7 +249,6 @@ int testdram (void)
|
|||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ------------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
#ifdef CONFIG_IDE_RESET
|
#ifdef CONFIG_IDE_RESET
|
||||||
void ide_set_reset(int on)
|
void ide_set_reset(int on)
|
||||||
@ -266,3 +280,15 @@ void nand_init(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef CONFIG_AUTO_UPDATE_SHOW
|
||||||
|
void board_auto_update_show(int au_active)
|
||||||
|
{
|
||||||
|
if (au_active) {
|
||||||
|
printf("\n Dies ist die board-funktion: Updating!!!\n");
|
||||||
|
} else {
|
||||||
|
printf("\n Dies ist die board-funktion: Updating done!!!\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user