# HG changeset patch # User Paul Boddie # Date 1433524053 -7200 # Node ID ed647dd06e43ce41b9c69ffc204f0676b7f46a67 # Parent 25fff749a843f033423860bc06be15cf01df216c Added some comments. diff -r 25fff749a843 -r ed647dd06e43 include/nanonote.h --- a/include/nanonote.h Fri Jun 05 15:59:32 2015 +0200 +++ b/include/nanonote.h Fri Jun 05 19:07:33 2015 +0200 @@ -15,6 +15,7 @@ /* * GPIO definition + * See: http://en.qi-hardware.com/wiki/Hardware_basics */ #define GPIO_LCD_CS (2 * 32 + 21) #define GPIO_AMP_EN (3 * 32 + 4) diff -r 25fff749a843 -r ed647dd06e43 stage1.c --- a/stage1.c Fri Jun 05 15:59:32 2015 +0200 +++ b/stage1.c Fri Jun 05 19:07:33 2015 +0200 @@ -21,6 +21,10 @@ #include "jz4740.h" #include "board-nanonote.h" #include "usb_boot_defines.h" +#include "nanonote.h" + +/* These arguments are initialised by usbboot and are defined in... + /etc/xburst-tools/usbboot.cfg. */ struct fw_args *fw_args; volatile u32 CPU_ID; @@ -38,7 +42,9 @@ void load_args(void) { - fw_args = (struct fw_args *)0x80002008; /* get the fw args from memory */ + /* Get the fw args from memory. See head.S for the memory layout. */ + + fw_args = (struct fw_args *)0x80002008; CPU_ID = fw_args->cpu_id ; CFG_EXTAL = (u32)fw_args->ext_clk * 1000000; CFG_CPU_SPEED = (u32)fw_args->cpu_speed * CFG_EXTAL ;