diff options
author | Nobuhiro Iwamatsu <iwamatsu@nigauri.org> | 2008-09-18 19:34:36 +0900 |
---|---|---|
committer | Nobuhiro Iwamatsu <iwamatsu@nigauri.org> | 2008-09-19 11:05:22 +0900 |
commit | b5d10a13525c07ec6374adf840d7c87553b5f189 (patch) | |
tree | 14029185164928df1b8a625d5af404e62c548b37 /drivers/pci/pci_sh7780.c | |
parent | 4a065abf926f128beb36d93449defa0d690e7fef (diff) | |
download | u-boot-imx-b5d10a13525c07ec6374adf840d7c87553b5f189.zip u-boot-imx-b5d10a13525c07ec6374adf840d7c87553b5f189.tar.gz u-boot-imx-b5d10a13525c07ec6374adf840d7c87553b5f189.tar.bz2 |
sh: Fix compile warning
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
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 2d04b4f..7555d96 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"); |