diff options
author | Stefan Roese <sr@denx.de> | 2006-11-29 11:18:37 +0100 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2006-11-29 11:18:37 +0100 |
commit | b690b7da0fdaa6055e94a82fdb468a1aa8771246 (patch) | |
tree | aa24a15300f3c94e06beab022d33a7155b1ff2b9 | |
parent | 58e3b14c18ed3288ceef8d086946dbf3df64ccf2 (diff) | |
parent | e59581c56ab5d6e0207ddac3b2c1d55cb36ec706 (diff) | |
download | u-boot-imx-b690b7da0fdaa6055e94a82fdb468a1aa8771246.zip u-boot-imx-b690b7da0fdaa6055e94a82fdb468a1aa8771246.tar.gz u-boot-imx-b690b7da0fdaa6055e94a82fdb468a1aa8771246.tar.bz2 |
Merge with git+ssh://sr@pollux.denx.org/home/sr/git/u-boot/denx/.git
-rw-r--r-- | board/icecube/icecube.c | 12 | ||||
-rw-r--r-- | cpu/mpc5xxx/cpu.c | 28 | ||||
-rw-r--r-- | cpu/ppc4xx/cpu.c | 4 | ||||
-rw-r--r-- | include/asm-ppc/processor.h | 1 | ||||
-rw-r--r-- | include/configs/IceCube.h | 13 |
5 files changed, 58 insertions, 0 deletions
diff --git a/board/icecube/icecube.c b/board/icecube/icecube.c index f958b32..ddad1bb 100644 --- a/board/icecube/icecube.c +++ b/board/icecube/icecube.c @@ -29,6 +29,10 @@ #include <pci.h> #include <asm/processor.h> +#if defined(CONFIG_OF_FLAT_TREE) +#include <ft_build.h> +#endif + #if defined(CONFIG_LITE5200B) #include "mt46v32m16.h" #else @@ -332,3 +336,11 @@ void ide_set_reset (int idereset) } } #endif /* defined (CFG_CMD_IDE) && defined (CONFIG_IDE_RESET) */ + +#if defined(CONFIG_OF_FLAT_TREE) && defined(CONFIG_OF_BOARD_SETUP) +void +ft_board_setup(void *blob, bd_t *bd) +{ + ft_cpu_setup(blob, bd); +} +#endif diff --git a/cpu/mpc5xxx/cpu.c b/cpu/mpc5xxx/cpu.c index 6b6f828..20e6735 100644 --- a/cpu/mpc5xxx/cpu.c +++ b/cpu/mpc5xxx/cpu.c @@ -31,6 +31,10 @@ #include <mpc5xxx.h> #include <asm/processor.h> +#if defined(CONFIG_OF_FLAT_TREE) +#include <ft_build.h> +#endif + DECLARE_GLOBAL_DATA_PTR; int checkcpu (void) @@ -102,3 +106,27 @@ unsigned long get_tbclk (void) } /* ------------------------------------------------------------------------- */ + +#ifdef CONFIG_OF_FLAT_TREE +void +ft_cpu_setup(void *blob, bd_t *bd) +{ + u32 *p; + ulong clock; + int len; + + clock = bd->bi_busfreq; + p = ft_get_prop(blob, "/cpus/" OF_CPU "/bus-frequency", &len); + if (p != NULL) + *p = cpu_to_be32(clock); + + p = ft_get_prop(blob, "/" OF_SOC "/bus-frequency", &len); + if (p != NULL) + *p = cpu_to_be32(clock); + + p = ft_get_prop(blob, "/" OF_SOC "/ethernet@3000/mac-address", &len); + if (p != NULL) + memcpy(p, bd->bi_enetaddr, 6); + +} +#endif diff --git a/cpu/ppc4xx/cpu.c b/cpu/ppc4xx/cpu.c index 447383f..9c5c910 100644 --- a/cpu/ppc4xx/cpu.c +++ b/cpu/ppc4xx/cpu.c @@ -340,6 +340,10 @@ int checkcpu (void) puts("SP Rev. B"); break; + case PVR_440SP_RC: + puts("SP Rev. C"); + break; + case PVR_440SPe_RA: puts("SPe Rev. A"); break; diff --git a/include/asm-ppc/processor.h b/include/asm-ppc/processor.h index 388dea4..6619686 100644 --- a/include/asm-ppc/processor.h +++ b/include/asm-ppc/processor.h @@ -749,6 +749,7 @@ #define PVR_405EP_RB 0x51210950 #define PVR_440SP_RA 0x53221850 #define PVR_440SP_RB 0x53221891 +#define PVR_440SP_RC 0x53221892 #define PVR_440SPe_RA 0x53421890 #define PVR_440SPe_RB 0x53421891 #define PVR_601 0x00010000 diff --git a/include/configs/IceCube.h b/include/configs/IceCube.h index 1152f83..0d38254 100644 --- a/include/configs/IceCube.h +++ b/include/configs/IceCube.h @@ -172,6 +172,19 @@ #undef CFG_IPBSPEED_133 /* define for 133MHz speed */ #endif #endif /* CONFIG_MPC5200 */ + +/* pass open firmware flat tree */ +#define CONFIG_OF_FLAT_TREE 1 +#define CONFIG_OF_BOARD_SETUP 1 + +/* maximum size of the flat tree (8K) */ +#define OF_FLAT_TREE_MAX_SIZE 8192 + +#define OF_CPU "PowerPC,5200@0" +#define OF_SOC "soc5200@f0000000" +#define OF_TBCLK (bd->bi_busfreq / 8) +#define OF_STDOUT_PATH "/soc5200@f0000000/serial@2000" + /* * I2C configuration */ |