All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: "Pali Rohár" <pali@kernel.org>
Cc: u-boot@lists.denx.de
Subject: Re: [PATCH] pci: pci_mvebu: Use global MBUS_PCI_MEM_SIZE macro
Date: Wed, 10 Nov 2021 14:52:32 +0100	[thread overview]
Message-ID: <298f79b5-6e80-a65d-b7b3-b4a4d1e68997@denx.de> (raw)
In-Reply-To: <20211106111612.29267-1-pali@kernel.org>

On 06.11.21 12:16, Pali Rohár wrote:
> Header file mach/cpu.h already defines MBUS_PCI_MEM_SIZE macro which
> defines size of MBUS_PCI_MEM_BASE window. So use global MBUS_PCI_MEM_SIZE
> macro instead of locally defined PCIE_MEM_SIZE macro. Both macros have same
> definition.
> 
> Signed-off-by: Pali Rohár <pali@kernel.org>

Applied to u-boot-marvell/master

Thanks,
Stefan

> ---
>   drivers/pci/pci_mvebu.c | 11 +++++------
>   1 file changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/pci/pci_mvebu.c b/drivers/pci/pci_mvebu.c
> index c575e9412b2a..14cd82db6ff8 100644
> --- a/drivers/pci/pci_mvebu.c
> +++ b/drivers/pci/pci_mvebu.c
> @@ -97,7 +97,6 @@ struct mvebu_pcie {
>    * and 64K of I/O space when registered.
>    */
>   static void __iomem *mvebu_pcie_membase = (void __iomem *)MBUS_PCI_MEM_BASE;
> -#define PCIE_MEM_SIZE	(128 << 20)
>   static void __iomem *mvebu_pcie_iobase = (void __iomem *)MBUS_PCI_IO_BASE;
>   
>   static inline bool mvebu_pcie_link_up(struct mvebu_pcie *pcie)
> @@ -433,14 +432,14 @@ static int mvebu_pcie_probe(struct udevice *dev)
>   	mvebu_pcie_set_local_dev_nr(pcie, 1);
>   
>   	pcie->mem.start = (u32)mvebu_pcie_membase;
> -	pcie->mem.end = pcie->mem.start + PCIE_MEM_SIZE - 1;
> -	mvebu_pcie_membase += PCIE_MEM_SIZE;
> +	pcie->mem.end = pcie->mem.start + MBUS_PCI_MEM_SIZE - 1;
> +	mvebu_pcie_membase += MBUS_PCI_MEM_SIZE;
>   
>   	if (mvebu_mbus_add_window_by_id(pcie->mem_target, pcie->mem_attr,
>   					(phys_addr_t)pcie->mem.start,
> -					PCIE_MEM_SIZE)) {
> +					MBUS_PCI_MEM_SIZE)) {
>   		printf("PCIe unable to add mbus window for mem at %08x+%08x\n",
> -		       (u32)pcie->mem.start, PCIE_MEM_SIZE);
> +		       (u32)pcie->mem.start, MBUS_PCI_MEM_SIZE);
>   	}
>   
>   	pcie->io.start = (u32)mvebu_pcie_iobase;
> @@ -459,7 +458,7 @@ static int mvebu_pcie_probe(struct udevice *dev)
>   
>   	/* PCI memory space */
>   	pci_set_region(hose->regions + 0, pcie->mem.start,
> -		       pcie->mem.start, PCIE_MEM_SIZE, PCI_REGION_MEM);
> +		       pcie->mem.start, MBUS_PCI_MEM_SIZE, PCI_REGION_MEM);
>   	pci_set_region(hose->regions + 1,
>   		       0, 0,
>   		       gd->ram_size,
> 

Viele Grüße,
Stefan Roese

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de

      parent reply	other threads:[~2021-11-10 13:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-06 11:16 [PATCH] pci: pci_mvebu: Use global MBUS_PCI_MEM_SIZE macro Pali Rohár
2021-11-10  5:51 ` Stefan Roese
2021-11-10 13:52 ` Stefan Roese [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=298f79b5-6e80-a65d-b7b3-b4a4d1e68997@denx.de \
    --to=sr@denx.de \
    --cc=pali@kernel.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.