sh: add support for SH7785 PCIC
PATCH 1/1 sh: add support for SH7785 PCIC
modified to check for SH7785 PCIC Device ID.
Signed-off-by Yoshihiro Shimoda <[email protected]>
--- drivers/pci/pci_sh7780.c | 16 +++++++++++++--- 1 files changed, 13 insertions(+), 3 deletions(-)
drivers/pci/pci_sh7780.c +13 -3
@@ -31,6 +31,7 @@#define SH7780_VENDOR_ID 0x1912#define SH7780_DEVICE_ID 0x0002 +#define SH7785_DEVICE_ID 0x0007#define SH7780_PCICR_PREFIX 0xA5000000#define SH7780_PCICR_PFCS 0x00000800#define SH7780_PCICR_FTO 0x00000400
@@ -71,9 +72,18 @@ 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 ){ -printf ("PCI: Unknown PCI host bridge.\n" ); +if (p4_inw (SH7780_PCIVID ) !=SH7780_VENDOR_ID ) { +printf ("PCI: Unknown PCI host bridge. VID=%x\n" , +p4_inw (SH7780_PCIVID )); +return ; + } +switch (p4_inw (SH7780_PCIDID )) { +case SH7780_DEVICE_ID : +case SH7785_DEVICE_ID : +break ; +default : +printf ("PCI: Unknown PCI host bridge. DID=%x\n" , +p4_inw (SH7780_PCIDID ));return ; }printf ("PCI: SH7780 PCI host bridge found.\n" );