From e2ffd59b4d93c9149de1caaa087371b0cfc512c9 Mon Sep 17 00:00:00 2001 From: wdenk Date: Fri, 31 Dec 2004 09:32:47 +0000 Subject: * Code cleanup, mostly for GCC-3.3.x * Cleanup confusing use of CONFIG_ETH*ADDR - ust his only to pre-define a MAC address; use CONFIG_HAS_ETH* to enable support for additional ethernet addresses. * Cleanup drivers/i82365.c - avoid duplication of code * Fix bogus "cannot span across banks" flash error message * Add support for CompactFlash for the CPC45 Board. --- board/cpc45/cpc45.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'board/cpc45/cpc45.c') diff --git a/board/cpc45/cpc45.c b/board/cpc45/cpc45.c index 92ccd42..51b0085 100644 --- a/board/cpc45/cpc45.c +++ b/board/cpc45/cpc45.c @@ -24,11 +24,13 @@ #include #include #include +#include #include #include 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. @@ -180,6 +182,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 +239,37 @@ int sysControlDisplay (int digit, /* number of digit 0..7 */ return (0); } + +#if (CONFIG_COMMANDS & CFG_CMD_PCMCIA) + +#ifdef CFG_PCMCIA_MEM_ADDR +volatile unsigned char *pcmcia_mem = (unsigned char*)CFG_PCMCIA_MEM_ADDR; +#endif + +int pcmcia_init(void) +{ + u_int rc; + + debug ("Enable PCMCIA " PCMCIA_SLOT_MSG "\n"); + + rc = i82365_init(); + + return rc; +} + +#endif /* CFG_CMD_PCMCIA */ + +# ifdef CONFIG_IDE_LED +void ide_led (uchar led, uchar status) +{ + u_char val; + /* We have one PCMCIA slot and use LED H4 for the IDE Interface */ + val = readb(BCSR_BASE + 0x04); + if (status) { /* led on */ + val |= B_CTRL_LED0; + } else { + val &= ~B_CTRL_LED0; + } + writeb(val, BCSR_BASE + 0x04); +} +# endif -- cgit v1.1