Re: [RFC 2/7] bcm47xx-nvram: add new broadcom nvram driver with dt support

2014-08-27 Thread Florian Fainelli
On 08/26/2014 10:54 PM, Rafał Miłecki wrote:
 On 24 August 2014 23:24, Hauke Mehrtens ha...@hauke-m.de wrote:
 +On NorthStar ARM SoCs the NAND flash is available at 0x1c00 and the
 +NOR flash is at 0x1e00
 +
 +Example:
 +
 +nvram0: nvram@0 {
 +   compatible = brcm,bcm47xx-nvram;
 +   reg = 0x1c00 0x0100;
 +};
 
 Could we avoid that? Type of flash can easily be checked in the code.
 All we need to do is to read BCMA_IOST register of BCMA_CORE_NS_ROM
 core.

So there is a boot status register you can read to tell what type of
flash you booted from, but does that also give you the resource ranges
for these type of flashes? Presumably they will be mapped into different
addresses (at least bcm63xx is like that), that information needs to be
listed somewhere.
--
Florian

--
To unsubscribe from this list: send the line unsubscribe devicetree in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC 2/7] bcm47xx-nvram: add new broadcom nvram driver with dt support

2014-08-27 Thread Rafał Miłecki
On 27 August 2014 20:20, Florian Fainelli f.faine...@gmail.com wrote:
 On 08/26/2014 10:54 PM, Rafał Miłecki wrote:
 Could we avoid that? Type of flash can easily be checked in the code.
 All we need to do is to read BCMA_IOST register of BCMA_CORE_NS_ROM
 core.

 So there is a boot status register you can read to tell what type of
 flash you booted from, but does that also give you the resource ranges
 for these type of flashes? Presumably they will be mapped into different
 addresses (at least bcm63xx is like that), that information needs to be
 listed somewhere.

Take a look at find_nvram in nvram_rw.c. It scans the whole region
which is up to 0x0200 (SI_FLASH2_SZ) size.

In case of NAND limit is slightly different (nfl_boot_size function):
1) On ARM it's 0x80 or 0x260
2) On MIPS it's 0x20

-- 
Rafał
--
To unsubscribe from this list: send the line unsubscribe devicetree in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC 2/7] bcm47xx-nvram: add new broadcom nvram driver with dt support

2014-08-26 Thread Rafał Miłecki
On 24 August 2014 23:24, Hauke Mehrtens ha...@hauke-m.de wrote:
 +On NorthStar ARM SoCs the NAND flash is available at 0x1c00 and the
 +NOR flash is at 0x1e00
 +
 +Example:
 +
 +nvram0: nvram@0 {
 +   compatible = brcm,bcm47xx-nvram;
 +   reg = 0x1c00 0x0100;
 +};

Could we avoid that? Type of flash can easily be checked in the code.
All we need to do is to read BCMA_IOST register of BCMA_CORE_NS_ROM
core.
--
To unsubscribe from this list: send the line unsubscribe devicetree in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html