* Fix minor NAND JFFS2 related issue

* Fixes for SL811 USB controller:
  - implement workaround for broken memory stick
  - improve error handling

* Increase packet send timeout to 10 ms in cpu/mpc8xx/scc.c to better
  cope with congested networks.
This commit is contained in:
wdenk 2004-05-03 20:45:30 +00:00
parent 08f1080c9c
commit 2729af9d54
8 changed files with 1183 additions and 1163 deletions

View File

@ -1,3 +1,16 @@
======================================================================
Changes since U-Boot 1.1.1:
======================================================================
* Fix minor NAND JFFS2 related issue
* Fixes for SL811 USB controller:
- implement workaround for broken memory stick
- improve error handling
* Increase packet send timeout to 1 ms in cpu/mpc8xx/scc.c to better
cope with congested networks.
======================================================================
Changes for U-Boot 1.1.1:
======================================================================

23
README
View File

@ -2044,31 +2044,16 @@ configurations; the following names are supported:
Note: for some board special configuration names may exist; check if
additional information is available from the board vendor; for
instance, the TQM8xxL systems run normally at 50 MHz and use a
SCC for 10baseT ethernet; there are also systems with 80 MHz
CPU clock, and an optional Fast Ethernet module is available
for CPU's with FEC. You can select such additional "features"
instance, the TQM823L systems are available without (standard)
or with LCD support. You can select such additional "features"
when chosing the configuration, i. e.
make TQM860L_config
- will configure for a plain TQM860L, i. e. 50MHz, no FEC
make TQM860L_FEC_config
- will configure for a TQM860L at 50MHz with FEC for ethernet
make TQM860L_80MHz_config
- will configure for a TQM860L at 80 MHz, with normal 10baseT
interface
make TQM860L_FEC_80MHz_config
- will configure for a TQM860L at 80 MHz with FEC for ethernet
make TQM823L_config
- will configure for a plain TQM823L, i. e. no LCD support
make TQM823L_LCD_config
- will configure for a TQM823L with U-Boot console on LCD
make TQM823L_LCD_80MHz_config
- will configure for a TQM823L at 80 MHz with U-Boot console on LCD
etc.

View File

@ -115,7 +115,8 @@ int checkboard (void)
{
volatile immap_t *immap = (immap_t *) CFG_IMMR;
volatile memctl8xx_t *memctl = &immap->im_memctl;
uchar *latch, rev, mod;
volatile uchar *latch;
uchar rev, mod;
/*
* Init ChipSelect #4 (CAN + HW-Latch)
@ -123,7 +124,7 @@ int checkboard (void)
memctl->memc_or4 = 0xFFFF8926;
memctl->memc_br4 = 0x90000401;
latch = (uchar *) 0x90000200;
latch = (volatile uchar *) 0x90000200;
rev = (*latch & 0xF8) >> 3;
mod = (*latch & 0x03);
printf ("Board: KUP4X Rev %d.%d SN: %s\n", rev, mod,

View File

@ -1105,6 +1105,9 @@ int usb_stor_get_info(struct usb_device *dev,struct us_data *ss,block_dev_desc_t
unsigned long *capacity,*blksz;
ccb *pccb=&usb_ccb;
/* For some mysterious reason the 256MB flash disk of Ours Technology, Inc
* doesn't survive this reset */
if (dev->descriptor.idVendor != 0xea0 || dev->descriptor.idProduct != 0x6828)
ss->transport_reset(ss);
pccb->pdata=usb_stor_buf;

View File

@ -45,7 +45,7 @@
#define TX_BUF_CNT 2
#define TOUT_LOOP 100
#define TOUT_LOOP 10000 /* 10 ms to have a packet sent */
static char txbuf[DBUF_LENGTH];

View File

@ -229,8 +229,8 @@ int usb_lowlevel_stop(void)
int sl811_send_packet(int dir_to_host, int data1, __u8 *buffer, int len)
{
__u8 ctrl = SL811_USB_CTRL_ARM | SL811_USB_CTRL_ENABLE;
__u16 status;
int err = 0;
__u16 status = 0;
int err = 0, timeout = get_timer(0) + 5*CFG_HZ;
if (len > 239)
return -1;
@ -240,19 +240,26 @@ int sl811_send_packet(int dir_to_host, int data1, __u8 *buffer, int len)
if (data1)
ctrl |= SL811_USB_CTRL_TOGGLE_1;
sl811_write(SL811_INTRSTS, 0xff);
while (err < 3) {
sl811_write(SL811_ADDR_A, 0x10);
sl811_write(SL811_LEN_A, len);
if (!dir_to_host && len)
sl811_write_buf(0x10, buffer, len);
while (err < 3) {
if (sl811_read(SL811_SOFCNTDIV)*64 < len * 8 * 2)
ctrl |= SL811_USB_CTRL_SOF;
else
ctrl &= ~SL811_USB_CTRL_SOF;
sl811_write(SL811_CTRL_A, ctrl);
while (!(sl811_read(SL811_INTRSTS) & SL811_INTR_DONE_A))
; /* do nothing */
while (!(sl811_read(SL811_INTRSTS) & SL811_INTR_DONE_A)) {
if (timeout < get_timer(0)) {
printf("USB transmit timed out\n");
return -USB_ST_CRC_ERR;
}
}
sl811_write(SL811_INTRSTS, 0xff);
status = sl811_read(SL811_STS_A);
@ -275,7 +282,16 @@ int sl811_send_packet(int dir_to_host, int data1, __u8 *buffer, int len)
err++;
}
return -1;
err = 0;
if (status & SL811_USB_STS_ERROR)
err |= USB_ST_BUF_ERR;
if (status & SL811_USB_STS_TIMEOUT)
err |= USB_ST_CRC_ERR;
if (status & SL811_USB_STS_STALL)
err |= USB_ST_STALLED;
return -err;
}
int submit_bulk_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
@ -299,7 +315,7 @@ int submit_bulk_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
buf+done,
max > len - done ? len - done : max);
if (res < 0) {
dev->status = res;
dev->status = -res;
return res;
}
@ -345,8 +361,10 @@ int submit_control_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
while (done < len) {
int res = sl811_send_packet(dir_in, data1, buf+done,
max > len - done ? len - done : max);
if (res < 0)
return res;
if (res < 0) {
dev->status = -res;
return 0;
}
done += res;
if (dir_in && res < max) /* short packet */
@ -375,7 +393,7 @@ int submit_control_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
int submit_int_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
int len, int interval)
{
PDEBUG(7, "dev = %p pipe = %#lx buf = %p size = %d int = %d\n", dev, pipe,
PDEBUG(0, "dev = %p pipe = %#lx buf = %p size = %d int = %d\n", dev, pipe,
buffer, len, interval);
return -1;
}

View File

@ -874,7 +874,7 @@ jffs2_1pass_resolve_inode(struct b_lists * pL, u32 ino)
while (b2) {
jNode = (struct jffs2_raw_inode *) get_node_mem(b2->offset);
if (jNode->ino == jDirFoundIno) {
src = (unsigned char *) (b2->offset + sizeof(struct jffs2_raw_inode));
src = (unsigned char *)jNode + sizeof(struct jffs2_raw_inode);
#if 0
putLabeledWord("\t\t dsize = ", jNode->dsize);

View File

@ -24,6 +24,6 @@
#ifndef __VERSION_H__
#define __VERSION_H__
#define U_BOOT_VERSION "U-Boot 1.1.1"
#define U_BOOT_VERSION "U-Boot 1.1.2"
#endif /* __VERSION_H__ */