diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2007-07-05 18:01:31 +0200 |
---|---|---|
committer | Sascha Hauer <sha@octopus.labnet.pengutronix.de> | 2007-07-05 18:01:31 +0200 |
commit | babc8fa2ca15fe34f0d378c3c8fb929b2d729737 (patch) | |
tree | 2070029f7ec33422481f0f6c040cfbddb8d5c08d /board | |
parent | ae14552c24cfdda39c9b86b9c247087e9b352108 (diff) | |
download | barebox-babc8fa2ca15fe34f0d378c3c8fb929b2d729737.tar.gz barebox-babc8fa2ca15fe34f0d378c3c8fb929b2d729737.tar.xz |
svn_rev_193
add devices
Diffstat (limited to 'board')
-rw-r--r-- | board/phycore_mpc5200b_tiny/phycore_mpc5200b_tiny.c | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/board/phycore_mpc5200b_tiny/phycore_mpc5200b_tiny.c b/board/phycore_mpc5200b_tiny/phycore_mpc5200b_tiny.c index 52102ed2e6..65b0e2844a 100644 --- a/board/phycore_mpc5200b_tiny/phycore_mpc5200b_tiny.c +++ b/board/phycore_mpc5200b_tiny/phycore_mpc5200b_tiny.c @@ -28,13 +28,73 @@ */ #include <common.h> +#include <driver.h> +#include <cfi_flash.h> +#include <init.h> #include <mpc5xxx.h> #include <pci.h> +#include <asm/arch/fec.h> #ifdef CONFIG_VIDEO_OPENIP #include <openip.h> #endif +static struct cfi_platform_data cfi_info = { +}; + +struct device_d cfi_dev = { + .name = "cfi_flash", + .id = "nor0", + + .map_base = 0xff000000, + .size = 16 * 1024 * 1024, + + .platform_data = &cfi_info, +}; + +struct device_d sdram_dev = { + .name = "ram", + .id = "ram0", + + .map_base = 0x0, + .size = 64 * 1024 * 1024, +}; + +static struct mpc5xxx_fec_platform_data fec_info = { + .xcv_type = MII100, +}; + +struct device_d eth_dev = { + .name = "fec_mpc5xxx", + .id = "eth0", + + .platform_data = &fec_info, + + .type = DEVICE_TYPE_ETHER, +}; + +static int devices_init (void) +{ + register_device(&cfi_dev); + register_device(&sdram_dev); + register_device(ð_dev); + + return 0; +} + +device_initcall(devices_init); + +/* Do not collide with the env from our first stage loader for now */ +static char *env_spec = "nor0:0+128k"; + +static int init_env(void) +{ + add_env_spec(env_spec); + return 0; +} + +late_initcall(init_env); + #define CFG_RAMBOOT #include "mt46v32m16-75.h" |