]> git.sur5r.net Git - u-boot/blobdiff - board/cpc45/cpc45.c
powerpc/83xx/km: MV88e6122 errata fix for 1.9V
[u-boot] / board / cpc45 / cpc45.c
index 92ccd42e7f714516fb96153889b88c80e9806cc4..22008066e6b723ecc22868603be601c135379b61 100644 (file)
 #include <common.h>
 #include <mpc824x.h>
 #include <asm/processor.h>
+#include <asm/io.h>
 #include <pci.h>
 #include <i2c.h>
+#include <netdev.h>
 
 int sysControlDisplay(int digit, uchar ascii_code);
 extern void Plx9030Init(void);
+extern void SPD67290Init(void);
 
        /* We have to clear the initial data area here. Couldn't have done it
         * earlier because DRAM had not been initialized.
@@ -59,7 +62,7 @@ int checkboard(void)
        return 0;
 }
 
-long int initdram (int board_type)
+phys_size_t initdram (int board_type)
 {
        int m, row, col, bank, i, ref;
        unsigned long start, end;
@@ -69,7 +72,7 @@ long int initdram (int board_type)
        uint8_t mber = 0;
        unsigned int tmp;
 
-       i2c_init(CFG_I2C_SPEED, CFG_I2C_SLAVE);
+       i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
 
        if (i2c_reg_read (0x50, 2) != 0x04)
                return 0;       /* Memory type */
@@ -86,7 +89,7 @@ long int initdram (int board_type)
        CONFIG_READ_WORD(MCCR2, mccr2);
        mccr2 &= 0xffff0000;
 
-       start = CFG_SDRAM_BASE;
+       start = CONFIG_SYS_SDRAM_BASE;
        end = start + (1 << (col + row + 3) ) * bank - 1;
 
        for (i = 0; i < m; i++) {
@@ -180,6 +183,10 @@ static struct pci_config_table pci_cpc45_config_table[] = {
          pci_cfgfunc_config_device, { PCI_PLX9030_IOADDR,
                                       PCI_PLX9030_MEMADDR,
                                       PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER }},
+       { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0x0E, PCI_ANY_ID,
+         pci_cfgfunc_config_device, { PCMCIA_IO_BASE,
+                                      PCMCIA_IO_BASE,
+                                      PCI_COMMAND_MEMORY | PCI_COMMAND_IO }},
 #endif /*CONFIG_PCI_PNP*/
        { }
 };
@@ -233,3 +240,27 @@ int sysControlDisplay (int digit,  /* number of digit 0..7 */
 
        return (0);
 }
+
+#if defined(CONFIG_CMD_PCMCIA)
+
+#ifdef CONFIG_SYS_PCMCIA_MEM_ADDR
+volatile unsigned char *pcmcia_mem = (unsigned char*)CONFIG_SYS_PCMCIA_MEM_ADDR;
+#endif
+
+int pcmcia_init(void)
+{
+       u_int rc;
+
+       debug ("Enable PCMCIA " PCMCIA_SLOT_MSG "\n");
+
+       rc = i82365_init();
+
+       return rc;
+}
+
+#endif
+
+int board_eth_init(bd_t *bis)
+{
+       return pci_eth_init(bis);
+}