diff options
author | Johannes Stezenbach <devnull@localhost> | 2004-04-12 21:10:22 +0000 |
---|---|---|
committer | Johannes Stezenbach <devnull@localhost> | 2004-04-12 21:10:22 +0000 |
commit | 6084d0fcb5e3ac907b4dc6a4421764f9e54a458f (patch) | |
tree | e1827d92cefada261bfd9498d148147edc1e4bb4 /linux/drivers/media/dvb/ttpci/av7110_hw.c | |
parent | d3f66cf78ea4d18a2ab9a1fad0c5c187699b9014 (diff) | |
download | mediapointer-dvb-s2-6084d0fcb5e3ac907b4dc6a4421764f9e54a458f.tar.gz mediapointer-dvb-s2-6084d0fcb5e3ac907b4dc6a4421764f9e54a458f.tar.bz2 |
speed up firmware loading
Diffstat (limited to 'linux/drivers/media/dvb/ttpci/av7110_hw.c')
-rw-r--r-- | linux/drivers/media/dvb/ttpci/av7110_hw.c | 54 |
1 files changed, 23 insertions, 31 deletions
diff --git a/linux/drivers/media/dvb/ttpci/av7110_hw.c b/linux/drivers/media/dvb/ttpci/av7110_hw.c index c5e74f7b7..f56e9dcfb 100644 --- a/linux/drivers/media/dvb/ttpci/av7110_hw.c +++ b/linux/drivers/media/dvb/ttpci/av7110_hw.c @@ -105,10 +105,8 @@ void av7110_reset_arm(struct av7110 *av7110) IER_DISABLE(av7110->dev, (MASK_19 | MASK_03)); saa7146_write(av7110->dev, ISR, (MASK_19 | MASK_03)); - //FIXME: are those mdelays really necessary? - mdelay(100); saa7146_setgpio(av7110->dev, RESET_LINE, SAA7146_GPIO_OUTHI); - mdelay(100); + dvb_delay(30); /* the firmware needs some time to initialize */ ARM_ResetMailBox(av7110); @@ -126,10 +124,10 @@ static int waitdebi(struct av7110 *av7110, int adr, int state) DEB_EE(("av7110: %p\n", av7110)); - for (k = 0; k < 1000; k++) { + for (k = 0; k < 100; k++) { if (irdebi(av7110, DEBINOSWAP, adr, 0, 2) == state) return 0; - udelay(50); + udelay(5); } return -1; } @@ -186,27 +184,24 @@ static int load_dram(struct av7110 *av7110, u32 *data, int len) /* we cannot write av7110 DRAM directly, so load a bootloader into * the DPRAM which implements a simple boot protocol */ static u8 bootcode[] = { - 0xea, 0x00, 0x00, 0x0e, 0xe1, 0xb0, 0xf0, 0x0e, /* 0x0000 */ - 0xe2, 0x5e, 0xf0, 0x04, 0xe2, 0x5e, 0xf0, 0x04, - 0xe2, 0x5e, 0xf0, 0x08, 0xe2, 0x5e, 0xf0, 0x04, - 0xe2, 0x5e, 0xf0, 0x04, 0xe2, 0x5e, 0xf0, 0x04, - 0x2c, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x0c, - 0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x34, - 0x00, 0x00, 0x00, 0x00, 0xa5, 0xa5, 0x5a, 0x5a, - 0x00, 0x1f, 0x15, 0x55, 0x00, 0x00, 0x00, 0x09, - 0xe5, 0x9f, 0xd0, 0x5c, 0xe5, 0x9f, 0x40, 0x54, /* 0x0040 */ - 0xe3, 0xa0, 0x00, 0x00, 0xe5, 0x84, 0x00, 0x00, - 0xe5, 0x84, 0x00, 0x04, 0xe1, 0xd4, 0x10, 0xb0, - 0xe3, 0x51, 0x00, 0x00, 0x0a, 0xff, 0xff, 0xfc, - 0xe1, 0xa0, 0x10, 0x0d, 0xe5, 0x94, 0x30, 0x04, - 0xe1, 0xd4, 0x20, 0xb2, 0xe2, 0x82, 0x20, 0x3f, - 0xe1, 0xb0, 0x23, 0x22, 0x03, 0xa0, 0x00, 0x02, - 0xe1, 0xc4, 0x00, 0xb0, 0x0a, 0xff, 0xff, 0xf4, - 0xe8, 0xb1, 0x1f, 0xe0, 0xe8, 0xa3, 0x1f, 0xe0, /* 0x0080 */ - 0xe8, 0xb1, 0x1f, 0xe0, 0xe8, 0xa3, 0x1f, 0xe0, - 0xe2, 0x52, 0x20, 0x01, 0x1a, 0xff, 0xff, 0xf9, - 0xe2, 0x2d, 0xdb, 0x05, 0xea, 0xff, 0xff, 0xec, - 0x2c, 0x00, 0x03, 0xf8, 0x2c, 0x00, 0x04, 0x00,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xff, 0xff, 0xf9, 0xe2, 0x2d, 0xdb, 0x05, 0xea, 0xff, 0xff, 0xec, + 0x2c, 0x00, 0x03, 0xf8, 0x2c, 0x00, 0x04, 0x00, 0x9e, 0x00, 0x08, 0x00, + 0x2c, 0x00, 0x00, 0x74, 0x2c, 0x00, 0x00, 0xc0 }; int av7110_bootarm(struct av7110 *av7110) @@ -255,9 +250,7 @@ int av7110_bootarm(struct av7110 *av7110) return -1; } saa7146_setgpio(dev, RESET_LINE, SAA7146_GPIO_OUTHI); - //FIXME: necessary? - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(HZ); + mdelay(1); DEB_D(("av7110_bootarm: load dram code\n")); if (load_dram(av7110, (u32 *)av7110->bin_root, av7110->size_root) < 0) @@ -275,8 +268,7 @@ int av7110_bootarm(struct av7110 *av7110) return -1; } saa7146_setgpio(dev, RESET_LINE, SAA7146_GPIO_OUTHI); - //FIXME: necessary? - mdelay(100); + dvb_delay(30); /* the firmware needs some time to initialize */ //ARM_ClearIrq(av7110); ARM_ResetMailBox(av7110); |