powerpc/mpc85xxcds: Fix PCI speed

The CDS uses PCICLK as SYSCLK. The PCICLK should be 33333333Hz or 66666666Hz.

Signed-off-by: Ebony Zhu <ebony.zhu@freescale.com>
Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
This commit is contained in:
chenhui zhao 2011-09-15 14:52:34 +08:00 committed by Kumar Gala
parent a6d0bfa86f
commit 568336ecc7
4 changed files with 12 additions and 12 deletions

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2004 Freescale Semiconductor. * Copyright 2004, 2011 Freescale Semiconductor.
* *
* See file CREDITS for list of people who contributed to this * See file CREDITS for list of people who contributed to this
* project. * project.
@ -61,12 +61,12 @@ get_clock_freq(void)
uint pci1_speed = (cadmus->cm_pci >> 2) & 0x3; /* PSPEED in [4:5] */ uint pci1_speed = (cadmus->cm_pci >> 2) & 0x3; /* PSPEED in [4:5] */
if (pci1_speed == 0) { if (pci1_speed == 0) {
return 33000000; return 33333333;
} else if (pci1_speed == 1) { } else if (pci1_speed == 1) {
return 66000000; return 66666666;
} else { } else {
/* Really, unknown. Be safe? */ /* Really, unknown. Be safe? */
return 33000000; return 33333333;
} }
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2004 Freescale Semiconductor. * Copyright 2004, 2011 Freescale Semiconductor.
* *
* (C) Copyright 2002 Scott McNutt <smcnutt@artesyncp.com> * (C) Copyright 2002 Scott McNutt <smcnutt@artesyncp.com>
* *
@ -200,6 +200,7 @@ const iop_conf_t iop_conf_tab[4][32] = {
int checkboard (void) int checkboard (void)
{ {
volatile ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR); volatile ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
char buf[32];
/* PCI slot in USER bits CSR[6:7] by convention. */ /* PCI slot in USER bits CSR[6:7] by convention. */
uint pci_slot = get_pci_slot (); uint pci_slot = get_pci_slot ();
@ -222,8 +223,7 @@ int checkboard (void)
printf("PCI1: %d bit, %s MHz, %s\n", printf("PCI1: %d bit, %s MHz, %s\n",
(pci1_32) ? 32 : 64, (pci1_32) ? 32 : 64,
(pci1_speed == 33000000) ? "33" : strmhz(buf, pci1_speed),
(pci1_speed == 66000000) ? "66" : "unknown",
pci1_clk_sel ? "sync" : "async"); pci1_clk_sel ? "sync" : "async");
if (pci_dual) { if (pci_dual) {

View File

@ -214,6 +214,7 @@ void pci_init_board(void)
u32 devdisr, pordevsr, io_sel; u32 devdisr, pordevsr, io_sel;
u32 porpllsr, pci_agent, pci_speed, pci_32, pci_arb, pci_clk_sel; u32 porpllsr, pci_agent, pci_speed, pci_32, pci_arb, pci_clk_sel;
int first_free_busno = 0; int first_free_busno = 0;
char buf[32];
devdisr = in_be32(&gur->devdisr); devdisr = in_be32(&gur->devdisr);
pordevsr = in_be32(&gur->pordevsr); pordevsr = in_be32(&gur->pordevsr);
@ -238,8 +239,7 @@ void pci_init_board(void)
pci_agent = fsl_setup_hose(&pci1_hose, pci_info.regs); pci_agent = fsl_setup_hose(&pci1_hose, pci_info.regs);
printf("PCI1: %d bit, %s MHz, %s, %s, %s (base address %lx)\n", printf("PCI1: %d bit, %s MHz, %s, %s, %s (base address %lx)\n",
(pci_32) ? 32 : 64, (pci_32) ? 32 : 64,
(pci_speed == 33333000) ? "33" : strmhz(buf, pci_speed),
(pci_speed == 66666000) ? "66" : "unknown",
pci_clk_sel ? "sync" : "async", pci_clk_sel ? "sync" : "async",
pci_agent ? "agent" : "host", pci_agent ? "agent" : "host",
pci_arb ? "arbiter" : "external-arbiter", pci_arb ? "arbiter" : "external-arbiter",

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2004 Freescale Semiconductor. * Copyright 2004, 2011 Freescale Semiconductor.
* *
* See file CREDITS for list of people who contributed to this * See file CREDITS for list of people who contributed to this
* project. * project.
@ -198,6 +198,7 @@ const iop_conf_t iop_conf_tab[4][32] = {
int checkboard (void) int checkboard (void)
{ {
volatile ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR); volatile ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
char buf[32];
/* PCI slot in USER bits CSR[6:7] by convention. */ /* PCI slot in USER bits CSR[6:7] by convention. */
uint pci_slot = get_pci_slot (); uint pci_slot = get_pci_slot ();
@ -220,8 +221,7 @@ int checkboard (void)
printf("PCI1: %d bit, %s MHz, %s\n", printf("PCI1: %d bit, %s MHz, %s\n",
(pci1_32) ? 32 : 64, (pci1_32) ? 32 : 64,
(pci1_speed == 33000000) ? "33" : strmhz(buf, pci1_speed),
(pci1_speed == 66000000) ? "66" : "unknown",
pci1_clk_sel ? "sync" : "async"); pci1_clk_sel ? "sync" : "async");
if (pci_dual) { if (pci_dual) {