diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/fsl_pci_init.c | 23 | ||||
-rw-r--r-- | drivers/pcmcia/marubun_pcmcia.c | 12 | ||||
-rw-r--r-- | drivers/serial/serial_sh.c | 8 |
3 files changed, 33 insertions, 10 deletions
diff --git a/drivers/pci/fsl_pci_init.c b/drivers/pci/fsl_pci_init.c index 1e77884..68e45e1 100644 --- a/drivers/pci/fsl_pci_init.c +++ b/drivers/pci/fsl_pci_init.c @@ -112,6 +112,29 @@ fsl_pci_init(struct pci_controller *hose) pci_hose_read_config_word(hose, dev, PCI_LTSSM, <ssm); enabled = ltssm >= PCI_LTSSM_L0; +#ifdef CONFIG_FSL_PCIE_RESET + if (ltssm == 1) { + int i; + debug("....PCIe link error. " + "LTSSM=0x%02x.", ltssm); + pci->pdb_stat |= 0x08000000; /* assert PCIe reset */ + temp32 = pci->pdb_stat; + udelay(100); + debug(" Asserting PCIe reset @%x = %x\n", + &pci->pdb_stat, pci->pdb_stat); + pci->pdb_stat &= ~0x08000000; /* clear reset */ + asm("sync;isync"); + for (i=0; i<100 && ltssm < PCI_LTSSM_L0; i++) { + pci_hose_read_config_word(hose, dev, PCI_LTSSM, + <ssm); + udelay(1000); + debug("....PCIe link error. " + "LTSSM=0x%02x.\n", ltssm); + } + enabled = ltssm >= PCI_LTSSM_L0; + } +#endif + if (!enabled) { debug("....PCIE link error. Skipping scan." "LTSSM=0x%02x\n", ltssm); diff --git a/drivers/pcmcia/marubun_pcmcia.c b/drivers/pcmcia/marubun_pcmcia.c index 89b2015..7b112af 100644 --- a/drivers/pcmcia/marubun_pcmcia.c +++ b/drivers/pcmcia/marubun_pcmcia.c @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA - * - */ + * + */ #include <common.h> #include <config.h> @@ -34,7 +34,7 @@ #endif #if defined(CONFIG_PCMCIA) \ - && (defined(CONFIG_MARUBUN_PCCARD)) + && (defined(CONFIG_MARUBUN_PCCARD)) /* MR-SHPC-01 register */ #define MRSHPC_MODE (CFG_MARUBUN_MRSHPC + 4) @@ -79,14 +79,14 @@ int pcmcia_on (void) outw(0x0b00,MRSHPC_MW0CR2); /* common mode & bus width 16bit SWAP = 1 */ else outw(0x0300,MRSHPC_MW0CR2); /* common mode & bus width 16bit SWAP = 0 */ - + /* attribute window open */ outw(0x8a85,MRSHPC_MW1CR1); /* window 0xb8500000 */ if ((inw(MRSHPC_CSR) & 0x4000) != 0) outw(0x0a00,MRSHPC_MW1CR2); /* attribute mode & bus width 16bit SWAP = 1 */ else outw(0x0200,MRSHPC_MW1CR2); /* attribute mode & bus width 16bit SWAP = 0 */ - + /* I/O window open */ outw(0x8a86,MRSHPC_IOWCR1); /* I/O window 0xb8600000 */ outw(0x0008,MRSHPC_CDCR); /* I/O card mode */ @@ -94,7 +94,7 @@ int pcmcia_on (void) outw(0x0a00,MRSHPC_IOWCR2); /* bus width 16bit SWAP = 1 */ else outw(0x0200,MRSHPC_IOWCR2); /* bus width 16bit SWAP = 0 */ - + outw(0x0000,MRSHPC_ISR); outw(0x2000,MRSHPC_ICR); outb(0x00,(CFG_MARUBUN_MW2 + 0x206)); diff --git a/drivers/serial/serial_sh.c b/drivers/serial/serial_sh.c index 7818632..ee44ba2 100644 --- a/drivers/serial/serial_sh.c +++ b/drivers/serial/serial_sh.c @@ -1,7 +1,7 @@ /* * SuperH SCIF device driver. * Copyright (c) 2007 Nobuhiro Iwamatsu - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -31,7 +31,7 @@ #endif #define SCSMR (vu_short *)(SCIF_BASE + 0x0) -#define SCBRR (vu_char *)(SCIF_BASE + 0x4) +#define SCBRR (vu_char *)(SCIF_BASE + 0x4) #define SCSCR (vu_short *)(SCIF_BASE + 0x8) #define SCFTDR (vu_char *)(SCIF_BASE + 0xC) #define SCFSR (vu_short *)(SCIF_BASE + 0x10) @@ -51,7 +51,7 @@ #endif #define SCR_RE (1 << 4) -#define SCR_TE (1 << 5) +#define SCR_TE (1 << 5) #define FCR_RFRST (1 << 1) /* RFCL */ #define FCR_TFRST (1 << 2) /* TFCL */ #define FSR_DR (1 << 0) @@ -69,7 +69,7 @@ void serial_setbrg (void) DECLARE_GLOBAL_DATA_PTR; int divisor = gd->baudrate * 32; - *SCBRR = (CONFIG_SYS_CLK_FREQ + (divisor / 2)) / + *SCBRR = (CONFIG_SYS_CLK_FREQ + (divisor / 2)) / (gd->baudrate * 32) - 1; } |