All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Álvaro Fernández Rojas" <noltari@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 7/8] mips: bmips: fix ioremap for BCM6358
Date: Sat, 15 Apr 2017 21:15:34 +0200	[thread overview]
Message-ID: <edbc949f-bfd9-e2dd-e48a-aeca61a621ad@gmail.com> (raw)
In-Reply-To: <a9e559e6-4177-1449-254b-d095348fa0c6@gmail.com>

Hi,

El 15/04/2017 a las 20:48, Daniel Schwierzeck escribió:
> 
> 
> Am 15.04.2017 um 20:08 schrieb Álvaro Fernández Rojas:
>> Hi again,
>>
>> El 15/04/2017 a las 19:18, Álvaro Fernández Rojas escribió:
>>> Hi Daniel,
>>>
>>> El 14/04/2017 a las 20:26, Daniel Schwierzeck escribió:
>>>>
>>>>
>>>> Am 13.04.2017 um 17:52 schrieb Álvaro Fernández Rojas:
>>>>> BCM6358 has its internal registers mapped to 0xfffe0000, which is changed to
>>>>> 0x1ffe0000 when ioremap is called.
>>>>>
>>>>> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
>>>>> ---
>>>>>  arch/mips/include/asm/mach-generic/ioremap.h | 15 ++++++++++++++-
>>>>>  1 file changed, 14 insertions(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/arch/mips/include/asm/mach-generic/ioremap.h b/arch/mips/include/asm/mach-generic/ioremap.h
>>>>> index 6b191d5..b6a920d 100644
>>>>> --- a/arch/mips/include/asm/mach-generic/ioremap.h
>>>>> +++ b/arch/mips/include/asm/mach-generic/ioremap.h
>>>>> @@ -16,15 +16,28 @@ static inline phys_addr_t fixup_bigphys_addr(phys_addr_t phys_addr,
>>>>>  	return phys_addr;
>>>>>  }
>>>>>  
>>>>> +static inline int is_mips_internal_registers(phys_addr_t offset)
>>>>> +{
>>>>> +#ifdef CONFIG_SOC_BMIPS_BCM6358
>>>>> +	if (offset >= 0xfffe0000)
>>>>> +		return 1;
>>>>> +#endif
>>>>> +
>>>>> +	return 0;
>>>>> +}
>>>>> +
>>>>>  static inline void __iomem *plat_ioremap(phys_addr_t offset, unsigned long size,
>>>>>  						unsigned long flags)
>>>>>  {
>>>>> +	if (is_mips_internal_registers(offset))
>>>>> +		return (void __iomem *)offset;
>>>>> +
>>>>>  	return NULL;
>>>>>  }
>>>>>  
>>>>>  static inline int plat_iounmap(const volatile void __iomem *addr)
>>>>>  {
>>>>> -	return 0;
>>>>> +	return is_mips_internal_registers((unsigned long)addr);
>>>>>  }
>>>>>  
>>>>>  #define _page_cachable_default	_CACHE_CACHABLE_NONCOHERENT
>>>>>
>>>>
>>>> please create a separate ioremap.h in arch/mips/include/asm/mach-bmips/
>>>> with the BMIPS specific code. Then this file will be automatically used
>>>> instead of the generic version. This is working like in Linux kernel.
>>> I will try, but I remember having tested that and I couldn't get it working...
>> Nope, it doesn't work...
>>
> 
> sorry, my fault. The correct path is arch/mips/mach-bmips/include/ioremap.h
> 
> Following commit on top of your series works for me:
> http://git.denx.de/?p=u-boot/u-boot-mips.git;a=commitdiff;h=5f98514bc09d4748ddf7ccc70bd4df0c7b36dd75
Great, it's working now :)

> 

  reply	other threads:[~2017-04-15 19:15 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1492098775-3518-1-git-send-email-noltari@gmail.com>
     [not found] ` <1492098775-3518-2-git-send-email-noltari@gmail.com>
2017-04-14 17:43   ` [U-Boot] [PATCH 1/8] cmd: cpu: fix NULL cpu feature prints Daniel Schwierzeck
2017-04-15 17:16     ` Álvaro Fernández Rojas
     [not found] ` <1492098775-3518-5-git-send-email-noltari@gmail.com>
2017-04-14 18:19   ` [U-Boot] [PATCH 4/8] serial: add serial driver for BCM6345 Daniel Schwierzeck
2017-04-15 17:17     ` Álvaro Fernández Rojas
     [not found] ` <1492098775-3518-8-git-send-email-noltari@gmail.com>
2017-04-14 18:26   ` [U-Boot] [PATCH 7/8] mips: bmips: fix ioremap for BCM6358 Daniel Schwierzeck
2017-04-15 17:18     ` Álvaro Fernández Rojas
2017-04-15 18:08       ` Álvaro Fernández Rojas
2017-04-15 18:48         ` Daniel Schwierzeck
2017-04-15 19:15           ` Álvaro Fernández Rojas [this message]
     [not found] ` <1492098775-3518-9-git-send-email-noltari@gmail.com>
2017-04-14 19:05   ` [U-Boot] [PATCH 8/8] mips: bmips: add support for raw .elf images Daniel Schwierzeck
2017-04-15 17:19     ` Álvaro Fernández Rojas
2017-04-15 18:10       ` Álvaro Fernández Rojas
2017-04-15 18:54         ` Daniel Schwierzeck
2017-04-15 19:14           ` Álvaro Fernández Rojas
2017-04-15 19:30             ` Álvaro Fernández Rojas
     [not found] ` <1492098775-3518-6-git-send-email-noltari@gmail.com>
2017-04-14 19:23   ` [U-Boot] [PATCH 5/8] mips: add support for Broadcom MIPS Daniel Schwierzeck
2017-04-15 17:24     ` Álvaro Fernández Rojas
2017-04-13 15:44 [U-Boot] [PATCH 0/8] Add support for Broadcom MIPS SoCs Álvaro Fernández Rojas
2017-04-13 15:44 ` [U-Boot] [PATCH 7/8] mips: bmips: fix ioremap for BCM6358 Álvaro Fernández Rojas

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=edbc949f-bfd9-e2dd-e48a-aeca61a621ad@gmail.com \
    --to=noltari@gmail.com \
    --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.