diff options
author | Stefan Roese <sr@denx.de> | 2008-09-22 15:26:49 +0200 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2008-09-22 15:26:49 +0200 |
commit | 5289feadb7857e2eaf81848aa632afa4a07bc0cc (patch) | |
tree | e35f1a35b711e5b2e6a881cfc01feae63b74f0ad /drivers/pci/pci_sh7780.c | |
parent | 023824549a370bd185d7129d9a6c86f9be7b86a8 (diff) | |
parent | 3a9a000d9fba5a127786c8a859d654ba3721917b (diff) |
Merge branch 'master' of /home/stefan/git/u-boot/u-boot
Diffstat (limited to 'drivers/pci/pci_sh7780.c')
-rw-r--r-- | drivers/pci/pci_sh7780.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/pci/pci_sh7780.c b/drivers/pci/pci_sh7780.c index 2d04b4fc61..7555d96060 100644 --- a/drivers/pci/pci_sh7780.c +++ b/drivers/pci/pci_sh7780.c @@ -25,9 +25,10 @@ #include <common.h> +#include <pci.h> #include <asm/processor.h> +#include <asm/pci.h> #include <asm/io.h> -#include <pci.h> #define SH7780_VENDOR_ID 0x1912 #define SH7780_DEVICE_ID 0x0002 @@ -41,10 +42,10 @@ #define SH7780_PCICR_PRST 0x00000002 #define SH7780_PCICR_CFIN 0x00000001 -#define p4_in(addr) *((vu_long *)addr) -#define p4_out(data,addr) *(vu_long *)(addr) = (data) -#define p4_inw(addr) *((vu_short *)addr) -#define p4_outw(data,addr) *(vu_short *)(addr) = (data) +#define p4_in(addr) (*(vu_long *)addr) +#define p4_out(data, addr) (*(vu_long *)addr) = (data) +#define p4_inw(addr) (*(vu_short *)addr) +#define p4_outw(data, addr) (*(vu_short *)addr) = (data) int pci_sh4_read_config_dword(struct pci_controller *hose, pci_dev_t dev, int offset, u32 *value) @@ -72,9 +73,9 @@ int pci_sh7780_init(struct pci_controller *hose) p4_out(0x01, SH7780_PCIECR); if (p4_inw(SH7780_PCIVID) != SH7780_VENDOR_ID - && p4_inw(SH7780_PCIDID) != SH7780_DEVICE_ID){ + && p4_inw(SH7780_PCIDID) != SH7780_DEVICE_ID) { printf("PCI: Unknown PCI host bridge.\n"); - return; + return -1; } printf("PCI: SH7780 PCI host bridge found.\n"); |