#ifdef CONFIG_ARCH_NETWINDER /* * This is really ugly, but it seams to be the only * realiable way to do it, as the cpld state machine * is unpredictible. So we have a 25us penalty per * write access.
*/ staticvoid nw_en_write(void)
{ unsignedlong flags;
/* * we want to write a bit pattern XXX1 to Xilinx to enable * the write gate, which will be open for about the next 2ms.
*/
raw_spin_lock_irqsave(&nw_gpio_lock, flags);
nw_cpld_modify(CPLD_FLASH_WR_ENABLE, CPLD_FLASH_WR_ENABLE);
raw_spin_unlock_irqrestore(&nw_gpio_lock, flags);
/* * let the ISA bus to catch on...
*/
udelay(25);
} #else #define nw_en_write() do { } while (0) #endif
/* Let's map the flash area */
dc21285_map.virt = ioremap(DC21285_FLASH, 16*1024*1024); if (!dc21285_map.virt) {
printk("Failed to ioremap\n"); return -EIO;
}
if(machine_is_ebsa285()) { /* * Flash timing is determined with bits 19-16 of the * CSR_SA110_CNTL. The value is the number of wait cycles, or * 0 for 16 cycles (the default). Cycles are 20 ns. * Here we use 7 for 140 ns flash chips.
*/ /* access time */
*CSR_SA110_CNTL = ((*CSR_SA110_CNTL & ~0x000f0000) | (7 << 16)); /* burst time */
*CSR_SA110_CNTL = ((*CSR_SA110_CNTL & ~0x00f00000) | (7 << 20)); /* tristate time */
*CSR_SA110_CNTL = ((*CSR_SA110_CNTL & ~0x0f000000) | (7 << 24));
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.