diff mbox

[U-Boot] nios2: display altera sysid at startup

Message ID 1450253267-19625-1-git-send-email-thomas@wytron.com.tw
State Accepted
Delegated to: Thomas Chou
Headers show

Commit Message

Thomas Chou Dec. 16, 2015, 8:07 a.m. UTC
Display altera sysid at startup, which was once removed during
the move.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
---
 arch/nios2/cpu/cpu.c | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Marek Vasut Dec. 16, 2015, 10:25 a.m. UTC | #1
On Wednesday, December 16, 2015 at 09:07:47 AM, Thomas Chou wrote:
> Display altera sysid at startup, which was once removed during
> the move.
> 
> Signed-off-by: Thomas Chou <thomas@wytron.com.tw>

What if the sysid block isn't part of the design ?

Best regards,
Marek Vasut
Thomas Chou Dec. 16, 2015, 1:10 p.m. UTC | #2
Hi Marek,

On 2015年12月16日 18:25, Marek Vasut wrote:
> On Wednesday, December 16, 2015 at 09:07:47 AM, Thomas Chou wrote:
>> Display altera sysid at startup, which was once removed during
>> the move.
>>
>> Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
>
> What if the sysid block isn't part of the design ?

If the sysid block is not present, nothing will display and it is not an 
error.

Best regards,
Thomas
Marek Vasut Dec. 16, 2015, 1:23 p.m. UTC | #3
On Wednesday, December 16, 2015 at 02:10:26 PM, Thomas Chou wrote:
> Hi Marek,

Hi!

> On 2015年12月16日 18:25, Marek Vasut wrote:
> > On Wednesday, December 16, 2015 at 09:07:47 AM, Thomas Chou wrote:
> >> Display altera sysid at startup, which was once removed during
> >> the move.
> >> 
> >> Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
> > 
> > What if the sysid block isn't part of the design ?
> 
> If the sysid block is not present, nothing will display and it is not an
> error.

Won't this cause bus stall if you try to access unpopulated location ?

Best regards,
Marek Vasut
Thomas Chou Dec. 16, 2015, 1:44 p.m. UTC | #4
Hi Marek,

On 2015年12月16日 21:23, Marek Vasut wrote:
> On Wednesday, December 16, 2015 at 02:10:26 PM, Thomas Chou wrote:
>> Hi Marek,
>
> Hi!
>
>> On 2015年12月16日 18:25, Marek Vasut wrote:
>>> On Wednesday, December 16, 2015 at 09:07:47 AM, Thomas Chou wrote:
>>>> Display altera sysid at startup, which was once removed during
>>>> the move.
>>>>
>>>> Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
>>>
>>> What if the sysid block isn't part of the design ?
>>
>> If the sysid block is not present, nothing will display and it is not an
>> error.
>
> Won't this cause bus stall if you try to access unpopulated location ?

It will be accessed though DT binding. As long as DT is correct, it 
won't access unpopulated location.

With the Altera Avalon bus, even a unpopulated access will not stall.

Best regards,
Thomas
Marek Vasut Dec. 16, 2015, 2:01 p.m. UTC | #5
On Wednesday, December 16, 2015 at 02:44:04 PM, Thomas Chou wrote:
> Hi Marek,
> 
> On 2015年12月16日 21:23, Marek Vasut wrote:
> > On Wednesday, December 16, 2015 at 02:10:26 PM, Thomas Chou wrote:
> >> Hi Marek,
> > 
> > Hi!
> > 
> >> On 2015年12月16日 18:25, Marek Vasut wrote:
> >>> On Wednesday, December 16, 2015 at 09:07:47 AM, Thomas Chou wrote:
> >>>> Display altera sysid at startup, which was once removed during
> >>>> the move.
> >>>> 
> >>>> Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
> >>> 
> >>> What if the sysid block isn't part of the design ?
> >> 
> >> If the sysid block is not present, nothing will display and it is not an
> >> error.
> > 
> > Won't this cause bus stall if you try to access unpopulated location ?
> 
> It will be accessed though DT binding. As long as DT is correct, it
> won't access unpopulated location.
> 
> With the Altera Avalon bus, even a unpopulated access will not stall.

OK! Thanks for clarifying.

Acked-by: Marek Vasut <marex@denx.de>

Best regards,
Marek Vasut
diff mbox

Patch

diff --git a/arch/nios2/cpu/cpu.c b/arch/nios2/cpu/cpu.c
index f6d5cd3..be7f99c 100644
--- a/arch/nios2/cpu/cpu.c
+++ b/arch/nios2/cpu/cpu.c
@@ -21,6 +21,14 @@  int print_cpuinfo(void)
 }
 #endif /* CONFIG_DISPLAY_CPUINFO */
 
+#ifdef CONFIG_ALTERA_SYSID
+int checkboard(void)
+{
+	display_sysid();
+	return 0;
+}
+#endif
+
 int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
 	disable_interrupts();