summaryrefslogtreecommitdiffstats
path: root/cpu
diff options
context:
space:
mode:
authorHaavard Skinnemoen <haavard.skinnemoen@atmel.com>2008-08-06 15:12:38 +0200
committerHaavard Skinnemoen <haavard.skinnemoen@atmel.com>2008-08-06 15:12:38 +0200
commit7772c13ba07eaabd42499998f3713b23350fc119 (patch)
tree32718a8e67114d0ea5dbdb1fdcf58aad09dd52dc /cpu
parentb2b15ebb66f0e7958dff8916077da0aceb2982a8 (diff)
parent0eb5717a85b6cba3f67c11fa89bdde38dcd081b5 (diff)
downloadtalos-obmc-uboot-7772c13ba07eaabd42499998f3713b23350fc119.tar.gz
talos-obmc-uboot-7772c13ba07eaabd42499998f3713b23350fc119.zip
Merge branch 'favr-32' of git://git.denx.de/u-boot-avr32
Conflicts: MAINTAINERS MAKEALL Makefile
Diffstat (limited to 'cpu')
-rw-r--r--cpu/mpc8260/speed.c47
-rw-r--r--cpu/nios2/interrupts.c1
-rw-r--r--cpu/nios2/sysid.c2
3 files changed, 29 insertions, 21 deletions
diff --git a/cpu/mpc8260/speed.c b/cpu/mpc8260/speed.c
index 38cd0d9a70..8d280fbb7b 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);
diff --git a/cpu/nios2/interrupts.c b/cpu/nios2/interrupts.c
index aeb5b65b33..ec5db31b0f 100644
--- a/cpu/nios2/interrupts.c
+++ b/cpu/nios2/interrupts.c
@@ -27,6 +27,7 @@
#include <nios2.h>
#include <nios2-io.h>
+#include <asm/types.h>
#include <asm/io.h>
#include <asm/ptrace.h>
#include <common.h>
diff --git a/cpu/nios2/sysid.c b/cpu/nios2/sysid.c
index b5a29593ea..697ed03a2c 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);
}
OpenPOWER on IntegriCloud