mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-09-11 05:02:26 -04:00
integrator: use io-accessors for board init
Casting around to *(volatile ulong *) doesn't look good, so include the <asm/io.h> macros and use good old readl() instead. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
a4c15c01bf
commit
7c045d0bfe
@ -35,6 +35,7 @@
|
|||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <netdev.h>
|
#include <netdev.h>
|
||||||
|
#include <asm/io.h>
|
||||||
|
|
||||||
DECLARE_GLOBAL_DATA_PTR;
|
DECLARE_GLOBAL_DATA_PTR;
|
||||||
|
|
||||||
@ -101,15 +102,15 @@ int dram_init (void)
|
|||||||
#ifdef CONFIG_CM_SPD_DETECT
|
#ifdef CONFIG_CM_SPD_DETECT
|
||||||
{
|
{
|
||||||
extern void dram_query(void);
|
extern void dram_query(void);
|
||||||
unsigned long cm_reg_sdram;
|
u32 cm_reg_sdram;
|
||||||
unsigned long sdram_shift;
|
u32 sdram_shift;
|
||||||
|
|
||||||
dram_query(); /* Assembler accesses to CM registers */
|
dram_query(); /* Assembler accesses to CM registers */
|
||||||
/* Queries the SPD values */
|
/* Queries the SPD values */
|
||||||
|
|
||||||
/* Obtain the SDRAM size from the CM SDRAM register */
|
/* Obtain the SDRAM size from the CM SDRAM register */
|
||||||
|
|
||||||
cm_reg_sdram = *(volatile ulong *)(CM_BASE + OS_SDRAM);
|
cm_reg_sdram = readl(CM_BASE + OS_SDRAM);
|
||||||
/* Register SDRAM size
|
/* Register SDRAM size
|
||||||
*
|
*
|
||||||
* 0xXXXXXXbbb000bb 16 MB
|
* 0xXXXXXXbbb000bb 16 MB
|
||||||
|
Loading…
x
Reference in New Issue
Block a user