Patch by Guillaume Alexandre,, 04 Nov 2002:

Improve PCI access on 32-bits Compact PCI bus

Adjust VFD initialization on TRAB

Cleanup RRvision video code
This commit is contained in:
wdenk 2002-11-04 16:02:40 +00:00
parent 699b13a606
commit e95b61cfb0
8 changed files with 39 additions and 18 deletions

View File

@ -2,6 +2,9 @@
Changes since for U-Boot 0.1.0: Changes since for U-Boot 0.1.0:
====================================================================== ======================================================================
* Patch by Guillaume Alexandre,, 04 Nov 2002:
Improve PCI access on 32-bits Compact PCI bus
* Fix mdelay() on TRAB - this was still the debugging version with * Fix mdelay() on TRAB - this was still the debugging version with
seconds instead of ms. seconds instead of ms.

View File

@ -117,6 +117,8 @@ int misc_init_r (void)
{ {
pcippc2_fpga_init (); pcippc2_fpga_init ();
pcippc2_cpci3264_init ();
#if defined(CONFIG_WATCHDOG) #if defined(CONFIG_WATCHDOG)
pcippc2_wdt_init (); pcippc2_wdt_init ();
#endif #endif
@ -147,6 +149,25 @@ void doc_init (void)
doc_probe (pcippc2_fpga1_phys + HW_FPGA1_DOC); doc_probe (pcippc2_fpga1_phys + HW_FPGA1_DOC);
} }
void pcippc2_cpci3264_init (void)
{
pci_dev_t bdf = pci_find_device(FPGA_VENDOR_ID, FPGA_DEVICE_ID, 0);
if (bdf == -1)
{
puts("Unable to find FPGA !\n");
hang();
}
if((in32(pcippc2_fpga0_phys + HW_FPGA0_BOARD) & 0x01000000) == 0x01000000)
/* 32-bits Compact PCI bus - LSB bit */
{
iobarrier_rw();
out32(BRIDGE(CPCI, PCIDG), 0x40000000); /* 32-bits bridge, Pipeline */
iobarrier_rw();
}
}
#if defined(CONFIG_WATCHDOG) #if defined(CONFIG_WATCHDOG)
void pcippc2_wdt_init (void) void pcippc2_wdt_init (void)

View File

@ -40,6 +40,8 @@ extern u32 pcippc2_sdram_size (void);
extern void pcippc2_fpga_init (void); extern void pcippc2_fpga_init (void);
extern void pcippc2_cpci3264_init (void);
extern void cpc710_pci_init (void); extern void cpc710_pci_init (void);
extern void cpc710_pci_enable_timeout (void); extern void cpc710_pci_enable_timeout (void);

View File

@ -28,6 +28,7 @@
#define FPGA_DEVICE_ID 0x000d #define FPGA_DEVICE_ID 0x000d
#define HW_FPGA0_INT 0x0000 #define HW_FPGA0_INT 0x0000
#define HW_FPGA0_BOARD 0x0060
#define HW_FPGA0_UART1 0x0080 #define HW_FPGA0_UART1 0x0080
#define HW_FPGA0_UART2 0x0100 #define HW_FPGA0_UART2 0x0100
#define HW_FPGA0_RTC 0x2000 #define HW_FPGA0_RTC 0x2000

View File

@ -42,13 +42,13 @@ extern int do_mdm_init; /* defined in common/main.c */
* is that timers are not available yet, so we use a manually timed * is that timers are not available yet, so we use a manually timed
* loop. * loop.
*/ */
#define KBD_MDELAY 1000 #define KBD_MDELAY 5000
static void mdelay_no_timer (int msec) static void udelay_no_timer (int usec)
{ {
DECLARE_GLOBAL_DATA_PTR; DECLARE_GLOBAL_DATA_PTR;
int i; int i;
int delay = msec * 3; int delay = usec * 3;
for (i = 0; i < delay; i ++) gd->bd->bi_arch_number = 145; for (i = 0; i < delay; i ++) gd->bd->bi_arch_number = 145;
} }
@ -102,12 +102,12 @@ int board_init ()
gd->bd->bi_boot_params = 0x0c000100; gd->bd->bi_boot_params = 0x0c000100;
#ifdef CONFIG_MODEM_SUPPORT #ifdef CONFIG_MODEM_SUPPORT
/* This stuff is needed to get interrupts on stop-position /* This stuff is needed by the CPLD to read keyboard data.
* contact events.
* (Copied from the LCD initialization routine.) * (Copied from the LCD initialization routine.)
*/ */
if (rLCDCON1 == 0) if (rLCDCON1 == 0) {
{ extern void init_grid_ctrl(void);
rPCCON = (rPCCON & 0xFFFFFF00)| 0x000000AA; rPCCON = (rPCCON & 0xFFFFFF00)| 0x000000AA;
rPDCON = (rPDCON & 0xFFFFFF03)| 0x000000A8; rPDCON = (rPDCON & 0xFFFFFF03)| 0x000000A8;
#if 0 #if 0
@ -118,9 +118,11 @@ int board_init ()
rLCDCON4 = 0x00000001; rLCDCON4 = 0x00000001;
rLCDCON5 = 0x00000440; rLCDCON5 = 0x00000440;
rLCDCON1 = 0x00000B75; rLCDCON1 = 0x00000B75;
init_grid_ctrl();
} }
mdelay_no_timer (KBD_MDELAY); udelay_no_timer (KBD_MDELAY);
if (key_pressed()) { if (key_pressed()) {
disable_putc(); /* modem doesn't understand banner etc */ disable_putc(); /* modem doesn't understand banner etc */

View File

@ -72,7 +72,7 @@ int trab_vfd (ulong bitmap)
return 0; return 0;
case VFD_REMOTE_LOGO_BMPNR: case VFD_REMOTE_LOGO_BMPNR:
transfer_pic(1, &vfd_remote_logo_bitmap[0], transfer_pic(1, &vfd_remote_logo_bitmap[0],
VFD_TEST_LOGO_HEIGHT, VFD_TEST_LOGO_WIDTH); VFD_REMOTE_LOGO_HEIGHT, VFD_REMOTE_LOGO_WIDTH);
return 0; return 0;
#endif #endif
default: default:

View File

@ -835,14 +835,6 @@ static void video_ctrl_init (void *memptr)
{ {
volatile immap_t *immr = (immap_t *) CFG_IMMR; volatile immap_t *immr = (immap_t *) CFG_IMMR;
debug ("[RRvision] PD3 -> clk output: ");
immr->im_ioport.iop_pdpar |= 0x1000 ;
#if 0 /* This is supposed to be an output XXX XXX */
immr->im_ioport.iop_pddir |= 0x1000 ;
#else
immr->im_ioport.iop_pddir &= ~(0x1000);
#endif
udelay (1000);
debug ("PDPAR=%04X PDDIR=%04X PDDAT=%04X\n", debug ("PDPAR=%04X PDDIR=%04X PDDAT=%04X\n",
immr->im_ioport.iop_pdpar, immr->im_ioport.iop_pdpar,
immr->im_ioport.iop_pddir, immr->im_ioport.iop_pddir,

View File

@ -135,7 +135,7 @@
"ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname)::off\0" \ "ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname)::off\0" \
"add_misc=setenv bootargs $(bootargs) console=ttyS0 panic=1\0" \ "add_misc=setenv bootargs $(bootargs) console=ttyS0 panic=1\0" \
"load=tftp 0xC100000 /tftpboot/TRAB/u-boot.bin\0" \ "load=tftp 0xC100000 /tftpboot/TRAB/u-boot.bin\0" \
"update=protect off 1:0-7;era 1:0-7;cp.b 0xc100000 0 $(filesize);" \ "update=protect off 1:0-8;era 1:0-8;cp.b 0xc100000 0 $(filesize);" \
"setenv filesize;saveenv\0" \ "setenv filesize;saveenv\0" \
"loadfile=/tftpboot/TRAB/pImage\0" \ "loadfile=/tftpboot/TRAB/pImage\0" \
"loadaddr=c400000\0" \ "loadaddr=c400000\0" \