[U-Boot-Users] [PATCH 11/18] Remove CONFIG_OF_FLAT_TREE related code from mpc85xx since we now use libfdt
Kumar Gala
galak at kernel.crashing.org
Thu Nov 29 22:21:01 CET 2007
Signed-off-by: Kumar Gala <galak at kernel.crashing.org>
---
cpu/mpc85xx/cpu.c | 96 -----------------------------------------------------
cpu/mpc85xx/pci.c | 27 ---------------
2 files changed, 0 insertions(+), 123 deletions(-)
diff --git a/cpu/mpc85xx/cpu.c b/cpu/mpc85xx/cpu.c
index bbc5444..50ff3b4 100644
--- a/cpu/mpc85xx/cpu.c
+++ b/cpu/mpc85xx/cpu.c
@@ -30,11 +30,6 @@
#include <command.h>
#include <asm/cache.h>
-#if defined(CONFIG_OF_FLAT_TREE)
-#include <ft_build.h>
-#endif
-
-
int checkcpu (void)
{
sys_info_t sysinfo;
@@ -258,94 +253,3 @@ int dma_xfer(void *dest, uint count, void *src) {
return dma_check();
}
#endif
-
-
-#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, "/qe at e0080000/" OF_CPU "/bus-frequency", &len);
- if (p != NULL)
- *p = cpu_to_be32(clock);
-
- p = ft_get_prop(blob, "/" OF_SOC "/serial at 4500/clock-frequency", &len);
- if (p != NULL)
- *p = cpu_to_be32(clock);
-
- p = ft_get_prop(blob, "/" OF_SOC "/serial at 4600/clock-frequency", &len);
- if (p != NULL)
- *p = cpu_to_be32(clock);
-
-#if defined(CONFIG_HAS_ETH0)
- p = ft_get_prop(blob, "/" OF_SOC "/ethernet at 24000/mac-address", &len);
- if (p)
- memcpy(p, bd->bi_enetaddr, 6);
-
- p = ft_get_prop(blob, "/" OF_SOC "/ethernet at 24000/local-mac-address", &len);
- if (p)
- memcpy(p, bd->bi_enetaddr, 6);
-#endif
-
-#if defined(CONFIG_HAS_ETH1)
- p = ft_get_prop(blob, "/" OF_SOC "/ethernet at 25000/mac-address", &len);
- if (p)
- memcpy(p, bd->bi_enet1addr, 6);
-
- p = ft_get_prop(blob, "/" OF_SOC "/ethernet at 25000/local-mac-address", &len);
- if (p)
- memcpy(p, bd->bi_enet1addr, 6);
-#endif
-
-#if defined(CONFIG_HAS_ETH2)
- p = ft_get_prop(blob, "/" OF_SOC "/ethernet at 26000/mac-address", &len);
- if (p)
- memcpy(p, bd->bi_enet2addr, 6);
-
- p = ft_get_prop(blob, "/" OF_SOC "/ethernet at 26000/local-mac-address", &len);
- if (p)
- memcpy(p, bd->bi_enet2addr, 6);
-
-#ifdef CONFIG_UEC_ETH
- p = ft_get_prop(blob, "/" OF_QE "/ucc at 2000/mac-address", &len);
- if (p)
- memcpy(p, bd->bi_enet2addr, 6);
-
- p = ft_get_prop(blob, "/" OF_QE "/ucc at 2000/local-mac-address", &len);
- if (p)
- memcpy(p, bd->bi_enet2addr, 6);
-
-#endif
-#endif
-
-#if defined(CONFIG_HAS_ETH3)
- p = ft_get_prop(blob, "/" OF_SOC "/ethernet at 27000/mac-address", &len);
- if (p)
- memcpy(p, bd->bi_enet3addr, 6);
-
- p = ft_get_prop(blob, "/" OF_SOC "/ethernet at 27000/local-mac-address", &len);
- if (p)
- memcpy(p, bd->bi_enet3addr, 6);
-
-#ifdef CONFIG_UEC_ETH
- p = ft_get_prop(blob, "/" OF_QE "/ucc at 3000/mac-address", &len);
- if (p)
- memcpy(p, bd->bi_enet3addr, 6);
-
- p = ft_get_prop(blob, "/" OF_QE "/ucc at 3000/local-mac-address", &len);
- if (p)
- memcpy(p, bd->bi_enet3addr, 6);
-
-#endif
-#endif
-
-}
-#endif
diff --git a/cpu/mpc85xx/pci.c b/cpu/mpc85xx/pci.c
index 35e96d9..d9f49c8 100644
--- a/cpu/mpc85xx/pci.c
+++ b/cpu/mpc85xx/pci.c
@@ -29,10 +29,6 @@
#include <asm/cpm_85xx.h>
#include <pci.h>
-#if defined(CONFIG_OF_FLAT_TREE)
-#include <ft_build.h>
-#endif
-
#if defined(CONFIG_PCI)
static struct pci_controller *pci_hose;
@@ -216,27 +212,4 @@ pci_mpc85xx_init(struct pci_controller *board_hose)
hose->last_busno = pci_hose_scan(hose);
#endif
}
-
-#ifdef CONFIG_OF_FLAT_TREE
-void
-ft_pci_setup(void *blob, bd_t *bd)
-{
- u32 *p;
- int len;
-
- p = (u32 *)ft_get_prop(blob, "/" OF_SOC "/pci at 8000/bus-range", &len);
- if (p != NULL) {
- p[0] = pci_hose[0].first_busno;
- p[1] = pci_hose[0].last_busno;
- }
-
-#ifdef CONFIG_MPC85XX_PCI2
- p = (u32 *)ft_get_prop(blob, "/" OF_SOC "/pci at 9000/bus-range", &len);
- if (p != NULL) {
- p[0] = pci_hose[1].first_busno;
- p[1] = pci_hose[1].last_busno;
- }
-#endif
-}
-#endif /* CONFIG_OF_FLAT_TREE */
#endif /* CONFIG_PCI */
--
1.5.3.4
More information about the U-Boot
mailing list