From 9196b44334c330cc13de2464c59181e4db71f549 Mon Sep 17 00:00:00 2001 From: Matvejchikov Ilya Date: Wed, 30 Jul 2008 23:21:19 +0400 Subject: 8260: Making the use of gd->pci_clk dependant on the CONFIG_PCI Signed-off-by: Matvejchikov Ilya --- cpu/mpc8260/speed.c | 47 +++++++++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 20 deletions(-) (limited to 'cpu') diff --git a/cpu/mpc8260/speed.c b/cpu/mpc8260/speed.c index 38cd0d9..8d280fb 100644 --- a/cpu/mpc8260/speed.c +++ b/cpu/mpc8260/speed.c @@ -162,6 +162,30 @@ int get_clocks (void) gd->cpu_clk = clkin; } +#ifdef CONFIG_PCI + gd->pci_clk = clkin; + + if (sccr & SCCR_PCI_MODE) { + uint pci_div; + uint pcidf = (sccr & SCCR_PCIDF_MSK) >> SCCR_PCIDF_SHIFT; + + if (sccr & SCCR_PCI_MODCK) { + pci_div = 2; + if (pcidf == 9) { + pci_div *= 5; + } else if (pcidf == 0xB) { + pci_div *= 6; + } else { + pci_div *= (pcidf + 1); + } + } else { + pci_div = pcidf + 1; + } + + gd->pci_clk = (gd->cpm_clk * 2) / pci_div; + } +#endif + return (0); } @@ -220,26 +244,9 @@ int prt_8260_clks (void) printf (" - cpu_clk %10ld, cpm_clk %10ld, bus_clk %10ld\n", gd->cpu_clk, gd->cpm_clk, gd->bus_clk); - - if (sccr & SCCR_PCI_MODE) { - uint pci_div; - uint pcidf = (sccr & SCCR_PCIDF_MSK) >> SCCR_PCIDF_SHIFT; - - if (sccr & SCCR_PCI_MODCK) { - pci_div = 2; - if (pcidf == 9) { - pci_div *= 5; - } else if (pcidf == 0xB) { - pci_div *= 6; - } else { - pci_div *= (pcidf + 1); - } - } else { - pci_div = pcidf + 1; - } - - printf (" - pci_clk %10ld\n", (gd->cpm_clk * 2) / pci_div); - } +#ifdef CONFIG_PCI + printf (" - pci_clk %10ld\n", gd->pci_clk); +#endif putc ('\n'); return (0); -- cgit v1.1 From 81d3f1fdddafd1eb53bbca8739f488d417eb3dd2 Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Sat, 2 Aug 2008 23:48:31 +0200 Subject: nios2: fix phys_addr_t and phys_size_t support Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- cpu/nios2/interrupts.c | 1 + 1 file changed, 1 insertion(+) (limited to 'cpu') diff --git a/cpu/nios2/interrupts.c b/cpu/nios2/interrupts.c index aeb5b65..ec5db31b 100644 --- a/cpu/nios2/interrupts.c +++ b/cpu/nios2/interrupts.c @@ -27,6 +27,7 @@ #include #include +#include #include #include #include -- cgit v1.1 From 4cd7e6528f61ec669755c3754bb4f9779874fab3 Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Sat, 2 Aug 2008 23:48:32 +0200 Subject: nios2/sysid: fix printf warning Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- cpu/nios2/sysid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cpu') diff --git a/cpu/nios2/sysid.c b/cpu/nios2/sysid.c index b5a2959..697ed03 100644 --- a/cpu/nios2/sysid.c +++ b/cpu/nios2/sysid.c @@ -40,7 +40,7 @@ void display_sysid (void) stamp = readl (&sysid->timestamp); localtime_r (&stamp, &t); asctime_r (&t, asc); - printf ("SYSID : %08x, %s", readl (&sysid->id), asc); + printf ("SYSID : %08lx, %s", readl (&sysid->id), asc); } -- cgit v1.1