修訂 | b6c6b594c325009f1d2fb6029cbd0131b549de3d (tree) |
---|---|
時間 | 2016-04-17 19:24:47 |
作者 | Yoshinori Sato <ysato@user...> |
Commiter | Yoshinori Sato |
PCI: SH4 PCI address fix.
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
@@ -843,9 +843,14 @@ static int decode_regions(struct pci_controller *hose, const void *blob, | ||
843 | 843 | #endif |
844 | 844 | if (gd->pci_ram_top && gd->pci_ram_top < base + size) |
845 | 845 | size = gd->pci_ram_top - base; |
846 | +#ifndef CONFIG_SH4_PCI | |
846 | 847 | pci_set_region(hose->regions + hose->region_count++, base, base, |
847 | 848 | size, PCI_REGION_MEM | PCI_REGION_SYS_MEMORY); |
848 | - | |
849 | +#else | |
850 | + /* SH4 use 29bit physical address */ | |
851 | + pci_set_region(hose->regions + hose->region_count++, base & ~0xe0000000, | |
852 | + base, size, PCI_REGION_MEM | PCI_REGION_SYS_MEMORY); | |
853 | +#endif | |
849 | 854 | return 0; |
850 | 855 | } |
851 | 856 |
@@ -225,9 +225,8 @@ int __pci_hose_phys_to_bus(struct pci_controller *hose, | ||
225 | 225 | continue; |
226 | 226 | |
227 | 227 | #if defined(CONFIG_SH4_PCI) |
228 | - /* from Logic address to Physical address */ | |
229 | - if( (phys_addr & 0xF0000000) == 0x80000000) | |
230 | - phys_addr &= ~0x80000000; | |
228 | + /* SH4 use 29bit physical address */ | |
229 | + phys_addr &= ~0xe0000000; | |
231 | 230 | #endif |
232 | 231 | |
233 | 232 | bus_addr = phys_addr - res->phys_start + res->bus_start; |