1 /* pd67290.c - system configuration module for SPD67290
3 * See file CREDITS for list of people who contributed to this
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 2 of
9 * the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21 * (C) 2004 DENX Software Engineering, Heiko Schocher <hs@denx.de>
33 static struct pci_device_id supported[] = {
34 {PCI_VENDOR_ID_CIRRUS, PCI_DEVICE_ID_CIRRUS_6729},
38 /***************************************************************************
42 * RETURNS: -1 on error, 0 if OK
45 int SPD67290Init (void)
48 int idx = 0; /* general index */
49 ulong membaseCsr; /* base address of device memory space */
51 /* find PD67290 device */
52 if ((devno = pci_find_devices (supported, idx++)) < 0) {
53 printf ("No PD67290 device found !!\n");
56 /* - 0xfe000000 see MPC 8245 Users Manual Adress Map B */
57 membaseCsr = PCMCIA_IO_BASE - 0xfe000000;
59 /* set base address */
60 pci_write_config_dword (devno, PCI_BASE_ADDRESS_0, membaseCsr);
62 /* enable mapped memory and IO addresses */
63 pci_write_config_dword (devno,
66 PCI_COMMAND_IO | PCI_COMMAND_WAIT);