Deleted Added
full compact
39c39
< __FBSDID("$FreeBSD: head/sys/arm/xscale/ixp425/ixp425_mem.c 166248 2007-01-26 01:37:32Z kevlo $");
---
> __FBSDID("$FreeBSD: head/sys/arm/xscale/ixp425/ixp425_mem.c 186352 2008-12-20 03:26:09Z sam $");
65,66d64
< #define MCU_REG_READ(x) (*(volatile uint32_t *)(IXP425_MCU_VBASE + (x)))
<
69a68
> #define MCU_REG_READ(x) (*(volatile uint32_t *)(IXP425_MCU_VBASE + (x)))
84a84
> #undef MCU_REG_READ
85a86,102
>
> uint32_t
> ixp435_ddram_size(void)
> {
> #define MCU_REG_READ(x) (*(volatile uint32_t *)(IXP425_MCU_VBASE + (x)))
> uint32_t sbr0;
>
> /*
> * Table 198, page 516 shows DDR-I/II SDRAM bank sizes
> * for SBR0 and SBR1. The manual states both banks must
> * be programmed to be the same size. We just assume
> * it's done right and calculate 2x for the memory size.
> */
> sbr0 = MCU_REG_READ(MCU_DDR_SBR0);
> return 2 * 16*(sbr0 & 0x7f) * 1024 * 1024;
> #undef MCU_REG_READ
> }