[PATCH 02/17] MIPS: malta: use CKSEG instead of KSEG macros

Ahmad Fatoum a.fatoum at pengutronix.de
Tue Jun 6 01:03:52 PDT 2023


On 05.06.23 22:10, Denis Orlov wrote:
> KSEG macro is not available when compiling with CONFIG_64BIT enabled, so
> use CKSEG instead.

If they're interchangeable, why do we need KSEG?

> 
> Signed-off-by: Denis Orlov <denorl2009 at gmail.com>
> ---
>  arch/mips/boards/qemu-malta/lowlevel.S | 4 ++--
>  arch/mips/mach-malta/pci.c             | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/mips/boards/qemu-malta/lowlevel.S b/arch/mips/boards/qemu-malta/lowlevel.S
> index 98821e0426..541d62fc2a 100644
> --- a/arch/mips/boards/qemu-malta/lowlevel.S
> +++ b/arch/mips/boards/qemu-malta/lowlevel.S
> @@ -56,14 +56,14 @@ __start:
>  	 */
>  
>  	/* move GT64120 registers to 0x1be00000 */
> -	li	t1, KSEG1ADDR(GT_DEF_BASE)
> +	li	t1, CKSEG1ADDR(GT_DEF_BASE)
>  	li	t0, GT_LD(MIPS_GT_BASE)
>  	sw	t0, GT_ISD_OFS(t1)
>  
>  	/*
>  	 * setup MEM-to-PCI0 mapping
>  	 */
> -	li	t1, KSEG1ADDR(MIPS_GT_BASE)
> +	li	t1, CKSEG1ADDR(MIPS_GT_BASE)
>  
>  	/* setup PCI0 io window */
>  	li	t0, GT_LD(0x18000000)
> diff --git a/arch/mips/mach-malta/pci.c b/arch/mips/mach-malta/pci.c
> index 113b94fe23..0ab239f509 100644
> --- a/arch/mips/mach-malta/pci.c
> +++ b/arch/mips/mach-malta/pci.c
> @@ -136,7 +136,7 @@ static int gt64xxx_pci0_pcibios_write(struct pci_bus *bus, unsigned int devfn,
>  static resource_size_t gt64xxx_res_start(struct pci_bus *bus,
>  					 resource_size_t res_addr)
>  {
> -	return KSEG0ADDR(res_addr);
> +	return CKSEG0ADDR(res_addr);
>  }
>  
>  struct pci_ops gt64xxx_pci0_ops = {

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




More information about the barebox mailing list