> Now I am trying to port ppcboot to a simple custom board,
> with ppc405cr, 32M RAM, 4M EEPROM, JTAG, UART.
> I can not understand some Marcos in the header file include/configs/xxx.h.
> #define CFG_INIT_DCACHE_CS 4 /* use cs # 4 for data cache
> memory */
> there is no OCM in 405CR, so ppcboot needs data cache for initial stacks
> and data.
> but what does the "chip select" mean?
> As I know, chip select should be used on some peripheral devices, like
> Flash, NVRAM,
> why is it needed for data cache which is inside the CPU core?
> Is the CS only a concept inside ppcboot? or something according to
> the hardware?
You are right, the PPC405CR doesn't have the OCM, so the data cache has to
be used for the initial stack. The Chip-Select is required to specify a
memory region, so the PPC doesn't generate "bus-errors" upon accessing this
cached memory region. Please use an unconnected CS (if possible) for this