Line 39... |
Line 39... |
void set_csc_tms (int cs, unsigned long csc, unsigned long tms) {
|
void set_csc_tms (int cs, unsigned long csc, unsigned long tms) {
|
struct dev_memarea *mem_dev = dev_list;
|
struct dev_memarea *mem_dev = dev_list;
|
|
|
while (mem_dev) {
|
while (mem_dev) {
|
if (mem_dev->chip_select == cs) {
|
if (mem_dev->chip_select == cs) {
|
mem_dev->addr_mask = 0xe0000000 | mc.ba_mask << 21;
|
mem_dev->addr_mask = mc.ba_mask << 22;
|
mem_dev->addr_compare = ((csc >> MC_CSC_SEL_OFFSET) /* & 0xff*/) << 21;
|
mem_dev->addr_compare = ((csc >> MC_CSC_SEL_OFFSET) /* & 0xff*/) << 22;
|
mem_dev->valid = (csc >> MC_CSC_EN_OFFSET) & 0x01;
|
mem_dev->valid = (csc >> MC_CSC_EN_OFFSET) & 0x01;
|
|
|
if ((csc >> MC_CSC_MEMTYPE_OFFSET) && 0x07 == MC_CSC_MEMTYPE_ASYNC) {
|
if ((csc >> MC_CSC_MEMTYPE_OFFSET) && 0x07 == MC_CSC_MEMTYPE_ASYNC) {
|
mem_dev->delayr = (tms & 0xff) + ((tms >> 8) & 0x0f);
|
mem_dev->delayr = (tms & 0xff) + ((tms >> 8) & 0x0f);
|
mem_dev->delayw = ((tms >> 12) & 0x0f) + ((tms >> 16) & 0x0f) + ((tms >> 20) & 0x3f);
|
mem_dev->delayw = ((tms >> 12) & 0x0f) + ((tms >> 16) & 0x0f) + ((tms >> 20) & 0x3f);
|
Line 164... |
Line 164... |
mem_dev = mem_dev->next;
|
mem_dev = mem_dev->next;
|
}
|
}
|
|
|
set_csc_tms (0, mc.csc[0], mc.tms[0]);
|
set_csc_tms (0, mc.csc[0], mc.tms[0]);
|
|
|
register_memoryarea(config.mc.baseaddr, MC_ADDR_SPACE, 4, mc_read_word, mc_write_word);
|
register_memoryarea(config.mc.baseaddr, MC_ADDR_SPACE, 4, 1, mc_read_word, mc_write_word);
|
}
|
}
|
}
|
}
|
|
|
inline void mc_clock()
|
inline void mc_clock()
|
{
|
{
|