• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

修訂b6c6b594c325009f1d2fb6029cbd0131b549de3d (tree)
時間2016-04-17 19:24:47
作者Yoshinori Sato <ysato@user...>
CommiterYoshinori Sato

Log Message

PCI: SH4 PCI address fix.

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>

Change Summary

差異

--- a/drivers/pci/pci-uclass.c
+++ b/drivers/pci/pci-uclass.c
@@ -843,9 +843,14 @@ static int decode_regions(struct pci_controller *hose, const void *blob,
843843 #endif
844844 if (gd->pci_ram_top && gd->pci_ram_top < base + size)
845845 size = gd->pci_ram_top - base;
846+#ifndef CONFIG_SH4_PCI
846847 pci_set_region(hose->regions + hose->region_count++, base, base,
847848 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
849854 return 0;
850855 }
851856
--- a/drivers/pci/pci_common.c
+++ b/drivers/pci/pci_common.c
@@ -225,9 +225,8 @@ int __pci_hose_phys_to_bus(struct pci_controller *hose,
225225 continue;
226226
227227 #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;
231230 #endif
232231
233232 bus_addr = phys_addr - res->phys_start + res->bus_start;