RE: [PATCH v25 00/15] PCI: dwc: rcar-gen4: Add R-Car Gen4 PCIe support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Bjorn,

> From: Bjorn Helgaas, Sent: Thursday, October 19, 2023 12:11 PM
> 
> On Wed, Oct 18, 2023 at 05:56:16PM +0900, Yoshihiro Shimoda wrote:
> > Add R-Car S4-8 (R-Car Gen4) PCIe controller for both host and endpoint modes.
> > To support them, modify PCIe DesignWare common codes.
> >
> > Changes from v24:
> >
<snip URL>
> >  - Based on the latest pci.git / next branch.
> >  - Reordering the patches. (This is suggested by Bjorn.)
> >  - Drop "PCI: dwc: Disable two BARs to avoid unnecessary memory assignment"
> >    because break other platforms.
> 
> Does R-Car Gen4 still work without this patch?

Yes, R-Car Gen4 still work without this patch because I added this code into
the patch 12/15 again:

---
+static int rcar_gen4_pcie_host_init(struct dw_pcie_rp *pp)
+{
...
+	/*
+	 * According to the section 3.5.7.2 "RC Mode" in DWC PCIe Dual Mode
+	 * Rev.5.20a and 3.5.6.1 "RC mode" in DWC PCIe RC databook v5.20a, we
+	 * should disable two BARs to avoid unnecessary memory assignment
+	 * during device enumeration.
+	 */
+	dw_pcie_writel_dbi2(dw, PCI_BASE_ADDRESS_0, 0x0);
+	dw_pcie_writel_dbi2(dw, PCI_BASE_ADDRESS_1, 0x0);
---

I also mentioned about this on the cover-letter like below, but it may be difficult
to understand. I'm sorry about lack explanation... I should have explained one sentence
about that...

>> - Add specific-setting by using dbi2 again in the patch 12/15.
>> - Modify commend of the specific-setting in the patch 12/15. Serge suggested
>>   this on v23 but I missed to modify this on v24.

> The previous commit log said host mode didn't work:
> 
>   PCI: dwc: Disable two BARs to avoid unnecessary memory assignment
> 
>   According to the section 3.5.7.2 "RC Mode" in DWC PCIe Dual Mode
>   Rev.5.20a, we should disable two BARs to avoid unnecessary memory
>   assignment during device enumeration. Otherwise, Renesas R-Car Gen4
>   PCIe controllers cannot work correctly in host mode.
> 
> (from https://lore.kernel.org/all/20231011071423.249458-9-yoshihiro.shimoda.uh@xxxxxxxxxxx/)
> 
> I don't think we want to merge the driver unless it actually works.

I understood it.

Best regards,
Yoshihiro Shimoda

> Bjorn




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux