]> git.sur5r.net Git - u-boot/commitdiff
Merge branch 'master' of git://www.denx.de/git/u-boot-imx
authorTom Rini <trini@konsulko.com>
Sun, 10 Jan 2016 14:17:52 +0000 (09:17 -0500)
committerTom Rini <trini@konsulko.com>
Sun, 10 Jan 2016 14:17:52 +0000 (09:17 -0500)
39 files changed:
.mailmap
MAINTAINERS
Makefile
README
arch/arm/cpu/armv7/am33xx/board.c
arch/powerpc/cpu/mpc83xx/ecc.c
arch/powerpc/cpu/mpc83xx/pci.c
arch/powerpc/cpu/mpc83xx/qe_io.c
arch/powerpc/cpu/mpc83xx/spd_sdram.c
arch/powerpc/cpu/mpc83xx/speed.c
arch/powerpc/cpu/mpc83xx/spl_minimal.c
arch/sandbox/dts/test.dts
board/freescale/ls2080a/MAINTAINERS
board/freescale/mpc8572ds/MAINTAINERS
common/cmd_mem.c
common/fdt_support.c
common/usb_kbd.c
common/usb_storage.c
configs/chromebook_jerry_defconfig
doc/README.rockchip
drivers/bootcount/bootcount.c
drivers/mtd/spi/spi_flash.c
drivers/net/sandbox.c
drivers/pci/pcie_imx.c
drivers/pci/pcie_layerscape.c
drivers/serial/serial_zynq.c
drivers/spi/fsl_qspi.c
fs/fs.c
include/configs/chromebook_jerry.h
include/configs/cyrus.h
include/configs/vexpress_aemv8a.h
include/misc.h
include/usb.h
net/eth.c
net/net.c
scripts/get_maintainer.pl
test/dm/Makefile
tools/Makefile
tools/rkspi.c

index 2f32fe8ba59ab33e15ebb0fb3c29b152f9f7d8d2..c7bb0efde84d25154db917f4bc084f3b0a457445 100644 (file)
--- a/.mailmap
+++ b/.mailmap
@@ -28,4 +28,5 @@ Stefano Babic <sbabic@denx.de>
 TsiChung Liew <Tsi-Chung.Liew@freescale.com>
 Wolfgang Denk <wdenk>
 York Sun <yorksun@freescale.com>
+York Sun <york.sun@nxp.com>
 Ćukasz Majewski <l.majewski@samsung.com>
index 5b3c93a680a4871767230cd38797c3be2f490366..607bc9cbdbde5245d4a2362d226394b2cbf4accd 100644 (file)
@@ -239,7 +239,7 @@ S:  Maintained
 T:     git git://git.denx.de/u-boot-freebsd.git
 
 FREESCALE QORIQ
-M:     York Sun <yorksun@freescale.com>
+M:     York Sun <york.sun@nxp.com>
 S:     Maintained
 T:     git git://git.denx.de/u-boot-fsl-qoriq.git
 
@@ -308,13 +308,13 @@ F:        arch/powerpc/cpu/mpc83xx/
 F:     arch/powerpc/include/asm/arch-mpc83xx/
 
 POWERPC MPC85XX
-M:     York Sun <yorksun@freescale.com>
+M:     York Sun <york.sun@nxp.com>
 S:     Maintained
 T:     git git://git.denx.de/u-boot-mpc85xx.git
 F:     arch/powerpc/cpu/mpc85xx/
 
 POWERPC MPC86XX
-M:     York Sun <yorksun@freescale.com>
+M:     York Sun <york.sun@nxp.com>
 S:     Maintained
 T:     git git://git.denx.de/u-boot-mpc86xx.git
 F:     arch/powerpc/cpu/mpc86xx/
index aa19cc6eede5b210ad8b9dbcaff5ad7c4d8d955a..8fe7787cd5fecd03140a2a065d27fe915ccea04f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1136,7 +1136,7 @@ spl/u-boot-spl.pbl: spl/u-boot-spl.bin FORCE
        $(call if_changed,mkimage)
 
 ifeq ($(ARCH),arm)
-ifdef CONFIG_DM
+ifdef CONFIG_OF_CONTROL
 UBOOT_BINLOAD := u-boot-dtb.img
 else
 UBOOT_BINLOAD := u-boot.img
diff --git a/README b/README
index 43f307f30fd8ce3b1fd5a0ee098399e7ff2bb2f4..5ac2d445679b90c69a88e581014e27e119394022 100644 (file)
--- a/README
+++ b/README
@@ -34,12 +34,14 @@ In general, all boards for which a configuration option exists in the
 Makefile have been tested to some extent and can be considered
 "working". In fact, many of them are used in production systems.
 
-In case of problems see the CHANGELOG and CREDITS files to find out
-who contributed the specific port. The boards.cfg file lists board
-maintainers.
+In case of problems see the CHANGELOG file to find out who contributed
+the specific port. In addition, there are various MAINTAINERS files
+scattered throughout the U-Boot source identifying the people or
+companies responsible for various boards and subsystems.
 
-Note: There is no CHANGELOG file in the actual U-Boot source tree;
-it can be created dynamically from the Git log using:
+Note: As of August, 2010, there is no longer a CHANGELOG file in the
+actual U-Boot source tree; however, it can be created dynamically
+from the Git log using:
 
        make CHANGELOG
 
@@ -48,7 +50,7 @@ Where to get help:
 ==================
 
 In case you have questions about, problems with or contributions for
-U-Boot you should send a message to the U-Boot mailing list at
+U-Boot, you should send a message to the U-Boot mailing list at
 <u-boot@lists.denx.de>. There is also an archive of previous traffic
 on the mailing list - please search the archive before asking FAQ's.
 Please see http://lists.denx.de/pipermail/u-boot and
@@ -58,7 +60,7 @@ http://dir.gmane.org/gmane.comp.boot-loaders.u-boot
 Where to get source code:
 =========================
 
-The U-Boot source code is maintained in the git repository at
+The U-Boot source code is maintained in the Git repository at
 git://www.denx.de/git/u-boot.git ; you can browse it online at
 http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=summary
 
@@ -133,79 +135,24 @@ Directory Hierarchy:
 
 /arch                  Architecture specific files
   /arc                 Files generic to ARC architecture
-    /cpu               CPU specific files
-      /arc700          Files specific to ARC 700 CPUs
-    /lib               Architecture specific library files
   /arm                 Files generic to ARM architecture
-    /cpu               CPU specific files
-      /arm720t         Files specific to ARM 720 CPUs
-      /arm920t         Files specific to ARM 920 CPUs
-       /at91           Files specific to Atmel AT91RM9200 CPU
-       /imx            Files specific to Freescale MC9328 i.MX CPUs
-       /s3c24x0        Files specific to Samsung S3C24X0 CPUs
-      /arm926ejs       Files specific to ARM 926 CPUs
-      /arm1136         Files specific to ARM 1136 CPUs
-      /pxa             Files specific to Intel XScale PXA CPUs
-      /sa1100          Files specific to Intel StrongARM SA1100 CPUs
-    /lib               Architecture specific library files
   /avr32               Files generic to AVR32 architecture
-    /cpu               CPU specific files
-    /lib               Architecture specific library files
   /blackfin            Files generic to Analog Devices Blackfin architecture
-    /cpu               CPU specific files
-    /lib               Architecture specific library files
   /m68k                        Files generic to m68k architecture
-    /cpu               CPU specific files
-      /mcf52x2         Files specific to Freescale ColdFire MCF52x2 CPUs
-      /mcf5227x                Files specific to Freescale ColdFire MCF5227x CPUs
-      /mcf532x         Files specific to Freescale ColdFire MCF5329 CPUs
-      /mcf5445x                Files specific to Freescale ColdFire MCF5445x CPUs
-      /mcf547x_8x      Files specific to Freescale ColdFire MCF547x_8x CPUs
-    /lib               Architecture specific library files
   /microblaze          Files generic to microblaze architecture
-    /cpu               CPU specific files
-    /lib               Architecture specific library files
   /mips                        Files generic to MIPS architecture
-    /cpu               CPU specific files
-      /mips32          Files specific to MIPS32 CPUs
-      /mips64          Files specific to MIPS64 CPUs
-    /lib               Architecture specific library files
   /nds32               Files generic to NDS32 architecture
-    /cpu               CPU specific files
-      /n1213           Files specific to Andes Technology N1213 CPUs
-    /lib               Architecture specific library files
   /nios2               Files generic to Altera NIOS2 architecture
-    /cpu               CPU specific files
-    /lib               Architecture specific library files
   /openrisc            Files generic to OpenRISC architecture
-    /cpu               CPU specific files
-    /lib               Architecture specific library files
   /powerpc             Files generic to PowerPC architecture
-    /cpu               CPU specific files
-      /mpc5xx          Files specific to Freescale MPC5xx CPUs
-      /mpc5xxx         Files specific to Freescale MPC5xxx CPUs
-      /mpc8xx          Files specific to Freescale MPC8xx CPUs
-      /mpc8260         Files specific to Freescale MPC8260 CPUs
-      /mpc85xx         Files specific to Freescale MPC85xx CPUs
-      /ppc4xx          Files specific to AMCC PowerPC 4xx CPUs
-    /lib               Architecture specific library files
+  /sandbox             Files generic to HW-independent "sandbox"
   /sh                  Files generic to SH architecture
-    /cpu               CPU specific files
-      /sh2             Files specific to sh2 CPUs
-      /sh3             Files specific to sh3 CPUs
-      /sh4             Files specific to sh4 CPUs
-    /lib               Architecture specific library files
   /sparc               Files generic to SPARC architecture
-    /cpu               CPU specific files
-      /leon2           Files specific to Gaisler LEON2 SPARC CPU
-      /leon3           Files specific to Gaisler LEON3 SPARC CPU
-    /lib               Architecture specific library files
   /x86                 Files generic to x86 architecture
-    /cpu               CPU specific files
-    /lib               Architecture specific library files
 /api                   Machine/arch independent API for external apps
 /board                 Board dependent files
 /common                        Misc architecture independent functions
+/configs               Board default configuration files
 /disk                  Code for disk drive partition handling
 /doc                   Documentation (don't expect too much)
 /drivers               Commonly used device drivers
@@ -213,13 +160,12 @@ Directory Hierarchy:
 /examples              Example code for standalone applications, etc.
 /fs                    Filesystem code (cramfs, ext2, jffs2, etc.)
 /include               Header Files
-/lib                   Files generic to all architectures
-  /libfdt              Library files to support flattened device trees
-  /lzma                        Library files to support LZMA decompression
-  /lzo                 Library files to support LZO decompression
+/lib                   Library routines generic to all architectures
+/Licenses              Various license files
 /net                   Networking code
 /post                  Power On Self Test
-/spl                   Secondary Program Loader framework
+/scripts               Various build scripts and Makefiles
+/test                  Various unit test files
 /tools                 Tools to build S-Record or U-Boot images, etc.
 
 Software Configuration:
@@ -239,11 +185,11 @@ There are two classes of configuration variables:
   you don't know what you're doing; they have names beginning with
   "CONFIG_SYS_".
 
-Later we will add a configuration tool - probably similar to or even
-identical to what's used for the Linux kernel. Right now, we have to
-do the configuration by hand, which means creating some symbolic
-links and editing some configuration files. We use the TQM8xxL boards
-as an example here.
+Previously, all configuration was done by hand, which involved creating
+symbolic links and editing configuration files manually. More recently,
+U-Boot has added the Kbuild infrastructure used by the Linux kernel,
+allowing you to use the "make menuconfig" command to configure your
+build.
 
 
 Selection of Processor Architecture and Board Type:
@@ -257,10 +203,9 @@ Example: For a TQM823L module type:
        cd u-boot
        make TQM823L_defconfig
 
-For the Cogent platform, you need to specify the CPU type as well;
-e.g. "make cogent_mpc8xx_defconfig". And also configure the cogent
-directory according to the instructions in cogent/README.
-
+Note: If you're looking for the default configuration file for a board
+you're sure used to be there but is now missing, check the file
+doc/README.scrapyard for a list of no longer supported boards.
 
 Sandbox Environment:
 --------------------
@@ -277,13 +222,25 @@ Board Initialisation Flow:
 --------------------------
 
 This is the intended start-up flow for boards. This should apply for both
-SPL and U-Boot proper (i.e. they both follow the same rules). At present SPL
-mostly uses a separate code path, but the funtion names and roles of each
-function are the same. Some boards or architectures may not conform to this.
-At least most ARM boards which use CONFIG_SPL_FRAMEWORK conform to this.
+SPL and U-Boot proper (i.e. they both follow the same rules).
+
+Note: "SPL" stands for "Secondary Program Loader," which is explained in
+more detail later in this file.
+
+At present, SPL mostly uses a separate code path, but the function names
+and roles of each function are the same. Some boards or architectures
+may not conform to this.  At least most ARM boards which use
+CONFIG_SPL_FRAMEWORK conform to this.
+
+Execution typically starts with an architecture-specific (and possibly
+CPU-specific) start.S file, such as:
+
+       - arch/arm/cpu/armv7/start.S
+       - arch/powerpc/cpu/mpc83xx/start.S
+       - arch/mips/cpu/start.S
 
-Execution starts with start.S with three functions called during init after
-that. The purpose and limitations of each is described below.
+and so on. From there, three functions are called; the purpose and
+limitations of each of these functions are described below.
 
 lowlevel_init():
        - purpose: essential init to permit execution to reach board_init_f()
@@ -6630,7 +6587,8 @@ it:
 
 * A CHANGELOG entry as plaintext (separate from the patch)
 
-* For major contributions, your entry to the CREDITS file
+* For major contributions, add a MAINTAINERS file with your
+  information and associated file and directory references.
 
 * When you add support for a new board, don't forget to add a
   maintainer e-mail address to the boards.cfg file, too.
index 466348f9402d2a23f4eacecd26e09ada6b34ed9a..e8d5be32b4b7b5ddcbcc2a288875b37718023033 100644 (file)
@@ -64,8 +64,31 @@ U_BOOT_DEVICES(am33xx_uarts) = {
 #   endif
 #  endif
 };
+
+#ifdef CONFIG_DM_GPIO
+static const struct omap_gpio_platdata am33xx_gpio[] = {
+       { 0, AM33XX_GPIO0_BASE },
+       { 1, AM33XX_GPIO1_BASE },
+       { 2, AM33XX_GPIO2_BASE },
+       { 3, AM33XX_GPIO3_BASE },
+#ifdef CONFIG_AM43XX
+       { 4, AM33XX_GPIO4_BASE },
+       { 5, AM33XX_GPIO5_BASE },
 #endif
+};
 
+U_BOOT_DEVICES(am33xx_gpios) = {
+       { "gpio_omap", &am33xx_gpio[0] },
+       { "gpio_omap", &am33xx_gpio[1] },
+       { "gpio_omap", &am33xx_gpio[2] },
+       { "gpio_omap", &am33xx_gpio[3] },
+#ifdef CONFIG_AM43XX
+       { "gpio_omap", &am33xx_gpio[4] },
+       { "gpio_omap", &am33xx_gpio[5] },
+#endif
+};
+#endif
+#endif
 
 #ifndef CONFIG_DM_GPIO
 static const struct gpio_bank gpio_bank_am33xx[] = {
index 985a024425525637a3b3529ef0cb23da2d197780..2a486e4a0c46b7231beeba3eaa32ae5e97d9a064 100644 (file)
@@ -37,7 +37,7 @@ void ecc_print_status(void)
        printf("Memory Error Disable:\n");
        printf("  Multiple-Bit Error Disable: %d\n",
               (ddr->err_disable & ECC_ERROR_DISABLE_MBED) ? 1 : 0);
-       printf("  Sinle-Bit Error Disable: %d\n",
+       printf("  Single-Bit Error Disable: %d\n",
               (ddr->err_disable & ECC_ERROR_DISABLE_SBED) ? 1 : 0);
        printf("  Memory Select Error Disable: %d\n\n",
               (ddr->err_disable & ECC_ERROR_DISABLE_MSED) ? 1 : 0);
@@ -273,7 +273,7 @@ int do_ecc(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
                        count = simple_strtoul(argv[3], NULL, 16);
 
                        if ((u32) addr % 8) {
-                               printf("Address not alligned on "
+                               printf("Address not aligned on "
                                       "double word boundary\n");
                                return 1;
                        }
@@ -312,7 +312,7 @@ int do_ecc(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
                        count = simple_strtoul(argv[3], NULL, 16);
 
                        if ((u32) addr % 8) {
-                               printf("Address not alligned on "
+                               printf("Address not aligned on "
                                       "double word boundary\n");
                                return 1;
                        }
index 30606fbe5827b66859259c53037d2cfe13e73607..c7ea94cab56104ff30c86c8c9818f97f12941ec0 100644 (file)
@@ -123,7 +123,7 @@ void mpc83xx_pci_init(int num_buses, struct pci_region **reg)
        int i;
 
        if (num_buses > MAX_BUSES) {
-               printf("%d PCI buses requsted, %d supported\n",
+               printf("%d PCI buses requested, %d supported\n",
                       num_buses, MAX_BUSES);
 
                num_buses = MAX_BUSES;
index 4fae19c73629a214dbb03e96640011f798be63d3..106704d65d4bd3c0589fe6e7c0c52cb339f8f0f1 100644 (file)
@@ -23,7 +23,7 @@ void qe_config_iopin(u8 port, u8 pin, int dir, int open_drain, int assign)
        volatile immap_t        *im = (volatile immap_t *)CONFIG_SYS_IMMR;
        volatile qepio83xx_t    *par_io = (volatile qepio83xx_t *)&im->qepio;
 
-       /* Caculate pin location and 2bit mask and dir */
+       /* Calculate pin location and 2bit mask and dir */
        pin_2bit_mask = (u32)(0x3 << (NUM_OF_PINS-(pin%(NUM_OF_PINS/2)+1)*2));
        pin_2bit_dir = (u32)(dir << (NUM_OF_PINS-(pin%(NUM_OF_PINS/2)+1)*2));
 
index f62e1b79d36a25957c8298b85baaa098b14212ed..21ab0153fc7b1f9b4baad8b679ec0d02e5ec33e1 100644 (file)
@@ -599,7 +599,7 @@ long int spd_sdram()
 
        /*
         * Empirically set ~MCAS-to-preamble override for DDR 2.
-        * Your milage will vary.
+        * Your mileage will vary.
         */
        cpo = 0;
        if (spd.mem_type == SPD_MEMTYPE_DDR2) {
@@ -843,7 +843,7 @@ long int spd_sdram()
 
 #if defined(CONFIG_DDR_ECC) && !defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER)
 /*
- * Use timebase counter, get_timer() is not availabe
+ * Use timebase counter, get_timer() is not available
  * at this point of initialization yet.
  */
 static __inline__ unsigned long get_tbms (void)
index 1865626c2139f229749378fd1523297baaa9178d..2e91f51fcee9e7ce9e77dffbdaedf7cb7513543d 100644 (file)
@@ -170,7 +170,7 @@ int get_clocks(void)
                tsec1_clk = csb_clk / 3;
                break;
        default:
-               /* unkown SCCR_TSEC1CM value */
+               /* unknown SCCR_TSEC1CM value */
                return -2;
        }
 #endif
@@ -191,7 +191,7 @@ int get_clocks(void)
                usbdr_clk = csb_clk / 3;
                break;
        default:
-               /* unkown SCCR_USBDRCM value */
+               /* unknown SCCR_USBDRCM value */
                return -3;
        }
 #endif
@@ -212,7 +212,7 @@ int get_clocks(void)
                tsec2_clk = csb_clk / 3;
                break;
        default:
-               /* unkown SCCR_TSEC2CM value */
+               /* unknown SCCR_TSEC2CM value */
                return -4;
        }
 #elif defined(CONFIG_MPC8313)
@@ -239,7 +239,7 @@ int get_clocks(void)
                usbmph_clk = csb_clk / 3;
                break;
        default:
-               /* unkown SCCR_USBMPHCM value */
+               /* unknown SCCR_USBMPHCM value */
                return -5;
        }
 
@@ -266,7 +266,7 @@ int get_clocks(void)
                enc_clk = csb_clk / 3;
                break;
        default:
-               /* unkown SCCR_ENCCM value */
+               /* unknown SCCR_ENCCM value */
                return -7;
        }
 #endif
@@ -286,7 +286,7 @@ int get_clocks(void)
                sdhc_clk = csb_clk / 3;
                break;
        default:
-               /* unkown SCCR_SDHCCM value */
+               /* unknown SCCR_SDHCCM value */
                return -8;
        }
 #endif
@@ -305,7 +305,7 @@ int get_clocks(void)
                tdm_clk = csb_clk / 3;
                break;
        default:
-               /* unkown SCCR_TDMCM value */
+               /* unknown SCCR_TDMCM value */
                return -8;
        }
 #endif
@@ -345,7 +345,7 @@ int get_clocks(void)
                pciexp1_clk = csb_clk / 3;
                break;
        default:
-               /* unkown SCCR_PCIEXP1CM value */
+               /* unknown SCCR_PCIEXP1CM value */
                return -9;
        }
 
@@ -363,7 +363,7 @@ int get_clocks(void)
                pciexp2_clk = csb_clk / 3;
                break;
        default:
-               /* unkown SCCR_PCIEXP2CM value */
+               /* unknown SCCR_PCIEXP2CM value */
                return -10;
        }
 #endif
@@ -383,7 +383,7 @@ int get_clocks(void)
                sata_clk = csb_clk / 3;
                break;
        default:
-               /* unkown SCCR_SATACM value */
+               /* unknown SCCR_SATA1CM value */
                return -11;
        }
 #endif
@@ -413,7 +413,7 @@ int get_clocks(void)
 
        corecnf_tab_index = ((corepll & 0x1F) << 2) | ((corepll & 0x60) >> 5);
        if (corecnf_tab_index > (sizeof(corecnf_tab) / sizeof(corecnf_t))) {
-               /* corecnf_tab_index is too high, possibly worng value */
+               /* corecnf_tab_index is too high, possibly wrong value */
                return -11;
        }
        switch (corecnf_tab[corecnf_tab_index].core_csb_ratio) {
@@ -435,7 +435,7 @@ int get_clocks(void)
                core_clk = 3 * csb_clk;
                break;
        default:
-               /* unkown core to csb ratio */
+               /* unknown core to csb ratio */
                return -13;
        }
 
index 784f4ab8b3e5bee98faa4a61ad38e58fc2a973d1..845861eea7facf9ffba9ea2e1ffe140e2715fe29 100644 (file)
@@ -47,7 +47,7 @@ void cpu_init_f (volatile immap_t * im)
                           (CONFIG_SYS_SPCR_OPT << SPCR_OPT_SHIFT);
 #endif
 
-       /* Enable Time Base & Decrimenter (so we will have udelay()) */
+       /* Enable Time Base & Decrementer (so we will have udelay()) */
        im->sysconf.spcr |= SPCR_TBEN;
 
        /* DDR control driver register */
index b6d9a15da4a78782da6c5ebf95d6d37e1041c065..2e0d320b1e48d4c9b37a4d600c91d63b98afec76 100644 (file)
                        0x38 8>;
        };
 
+       timer {
+               compatible = "sandbox,timer";
+               clock-frequency = <1000000>;
+       };
+
        uart0: serial {
                compatible = "sandbox,serial";
                u-boot,dm-pre-reloc;
index 03ca168f1544ef5bed948af067f3d3a9d78cf401..975ea2da48dbbc5382cd98d8067e68a7e257d33b 100644 (file)
@@ -1,5 +1,5 @@
 LS2080A BOARD
-M:     York Sun <yorksun@freescale.com>
+M:     York Sun <york.sun@nxp.com>
 S:     Maintained
 F:     board/freescale/ls2080a/
 F:     include/configs/ls2080a_emu.h
index 4c9b968cd0c5186e9cd3d6fc57dfda841f63d854..46c2903a0cb36fef00c56e8e0e5c16d62bd2889e 100644 (file)
@@ -1,5 +1,5 @@
 MPC8572DS BOARD
-M:     York Sun <yorksun@freescale.com>
+M:     York Sun <york.sun@nxp.com>
 S:     Maintained
 F:     board/freescale/mpc8572ds/
 F:     include/configs/MPC8572DS.h
index 9fb25840f10a2ec451b67b3c76c31127854e7e76..efa39296ef7a170e0f6463cd1a29c23bd446904b 100644 (file)
@@ -931,7 +931,7 @@ static ulong mem_test_alt(vu_long *buf, ulong start_addr, ulong end_addr,
                addr[offset] = 0;
        }
 
-       return 0;
+       return errs;
 }
 
 static ulong mem_test_quick(vu_long *buf, ulong start_addr, ulong end_addr,
@@ -990,7 +990,7 @@ static ulong mem_test_quick(vu_long *buf, ulong start_addr, ulong end_addr,
                val += incr;
        }
 
-       return 0;
+       return errs;
 }
 
 /*
index 66464dbfd8b74f267dec13d1692a2b21d48838d5..a539389a9e88b5eb75a36b73de45c5214ea256a1 100644 (file)
@@ -952,8 +952,7 @@ void fdt_del_node_and_alias(void *blob, const char *alias)
 /* Max address size we deal with */
 #define OF_MAX_ADDR_CELLS      4
 #define OF_BAD_ADDR    FDT_ADDR_T_NONE
-#define OF_CHECK_COUNTS(na, ns)        ((na) > 0 && (na) <= OF_MAX_ADDR_CELLS && \
-                       (ns) > 0)
+#define OF_CHECK_COUNTS(na)    ((na) > 0 && (na) <= OF_MAX_ADDR_CELLS)
 
 /* Debug utility */
 #ifdef DEBUG
@@ -1121,7 +1120,7 @@ static u64 __of_translate_address(void *blob, int node_offset, const fdt32_t *in
 
        /* Cound address cells & copy address locally */
        bus->count_cells(blob, parent, &na, &ns);
-       if (!OF_CHECK_COUNTS(na, ns)) {
+       if (!OF_CHECK_COUNTS(na)) {
                printf("%s: Bad cell count for %s\n", __FUNCTION__,
                       fdt_get_name(blob, node_offset, NULL));
                goto bail;
@@ -1148,7 +1147,7 @@ static u64 __of_translate_address(void *blob, int node_offset, const fdt32_t *in
                /* Get new parent bus and counts */
                pbus = &of_busses[0];
                pbus->count_cells(blob, parent, &pna, &pns);
-               if (!OF_CHECK_COUNTS(pna, pns)) {
+               if (!OF_CHECK_COUNTS(pna)) {
                        printf("%s: Bad cell count for %s\n", __FUNCTION__,
                                fdt_get_name(blob, node_offset, NULL));
                        break;
index 9617a4848ad3b0d2dd3fd82d787403ccb6287b4b..cbb1995de3398431878811f92f6e79551b947965 100644 (file)
@@ -611,6 +611,41 @@ static int usb_kbd_probe(struct udevice *dev)
        return ret;
 }
 
+static int usb_kbd_remove(struct udevice *dev)
+{
+       struct usb_device *udev = dev_get_parent_priv(dev);
+       struct usb_kbd_pdata *data;
+       struct stdio_dev *sdev;
+       int ret;
+
+       sdev = stdio_get_by_name(DEVNAME);
+       if (!sdev) {
+               ret = -ENXIO;
+               goto err;
+       }
+       data = udev->privptr;
+       if (stdio_deregister_dev(sdev, true)) {
+               ret = -EPERM;
+               goto err;
+       }
+#ifdef CONFIG_CONSOLE_MUX
+       if (iomux_doenv(stdin, getenv("stdin"))) {
+               ret = -ENOLINK;
+               goto err;
+       }
+#endif
+#ifdef CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE
+       destroy_int_queue(udev, data->intq);
+#endif
+       free(data->new);
+       free(data);
+
+       return 0;
+err:
+       printf("%s: warning, ret=%d", __func__, ret);
+       return ret;
+}
+
 static const struct udevice_id usb_kbd_ids[] = {
        { .compatible = "usb-keyboard" },
        { }
@@ -621,6 +656,7 @@ U_BOOT_DRIVER(usb_kbd) = {
        .id     = UCLASS_KEYBOARD,
        .of_match = usb_kbd_ids,
        .probe = usb_kbd_probe,
+       .remove = usb_kbd_remove,
 };
 
 static const struct usb_device_id kbd_id_table[] = {
index 4fa6538db58af627ffce1ae39b29e84ab2c6b510..e61a8c8adfd02e82c320169dc6da9e28f515d8ef 100644 (file)
@@ -65,7 +65,7 @@ static const unsigned char us_direction[256/8] = {
 static ccb usb_ccb __attribute__((aligned(ARCH_DMA_MINALIGN)));
 static __u32 CBWTag;
 
-#define USB_MAX_STOR_DEV 5
+#define USB_MAX_STOR_DEV 7
 static int usb_max_devs; /* number of highest available usb device */
 
 static block_dev_desc_t usb_dev_desc[USB_MAX_STOR_DEV];
index da4770771f08c63bacf811aeecbb39c4d42a8e69..a515d8d580032ceeaf846a8f2a3cdc9d3568c6e0 100644 (file)
@@ -27,7 +27,9 @@ CONFIG_RESET=y
 CONFIG_DM_MMC=y
 CONFIG_ROCKCHIP_DWMMC=y
 CONFIG_PINCTRL=y
+# CONFIG_PINCTRL_FULL is not set
 CONFIG_SPL_PINCTRL=y
+# CONFIG_SPL_PINCTRL_FULL is not set
 CONFIG_ROCKCHIP_PINCTRL=y
 CONFIG_DM_PMIC=y
 CONFIG_PMIC_ACT8846=y
@@ -41,5 +43,7 @@ CONFIG_DEBUG_UART_CLOCK=24000000
 CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_SYS_NS16550=y
 CONFIG_USE_PRIVATE_LIBGCC=y
+CONFIG_USE_TINY_PRINTF=y
 CONFIG_CMD_DHRYSTONE=y
 CONFIG_ERRNO_STR=y
+CONFIG_ROCKCHIP_SPI=y
index b455f6fee703272f8ae00c035479dc540286c9a6..9a2ebca95df668cc11af1858d8877b1bc00df6a3 100644 (file)
@@ -135,9 +135,10 @@ Booting from SPI
 
 To write an image that boots from SPI flash (e.g. for the Haier Chromebook):
 
-   ./chromebook_jerry/tools/mkimage -n rk3036 -T rkspi -d chromebook_jerry/spl/u-boot-spl-dtb.bin out
-   dd if=spl.bin of=out.bin bs=128K conv=sync
-   cat chromebook_jerry/u-boot-dtb.img out.bin
+   ./chromebook_jerry/tools/mkimage -n rk3288 -T rkspi \
+       -d chromebook_jerry/spl/u-boot-spl-dtb.bin spl.bin && \
+   dd if=spl.bin of=spl-out.bin bs=128K conv=sync && \
+   cat spl-out.bin chromebook_jerry/u-boot-dtb.img >out.bin && \
    dd if=out.bin of=out.bin.pad bs=4M conv=sync
 
 This converts the SPL image to the required SPI format by adding the Rockchip
index e0343f71d7ffeeea70cad7c81fcfbc07b23c8801..d5ce450c153132c082b2aa7c991e79a1aa2c7fad 100644 (file)
 
 #if defined(CONFIG_MPC8260)
 #include <asm/cpm_8260.h>
-
 #define CONFIG_SYS_BOOTCOUNT_ADDR      (CONFIG_SYS_IMMR + CPM_BOOTCOUNT_ADDR)
 #endif /* defined(CONFIG_MPC8260) */
 
 #if defined(CONFIG_QE)
 #include <linux/immap_qe.h>
-
 #define CONFIG_SYS_BOOTCOUNT_ADDR      (CONFIG_SYS_IMMR + 0x110000 + \
                                         QE_MURAM_SIZE - 2 * sizeof(u32))
-#endif /* defined(CONFIG_MPC8360) */
+#endif /* defined(CONFIG_QE) */
 
 #if defined(CONFIG_4xx)
 #define CONFIG_SYS_BOOTCOUNT_ADDR      (CONFIG_SYS_OCM_DATA_ADDR + \
@@ -60,7 +58,7 @@ __weak void bootcount_store(ulong a)
 #else
        raw_bootcount_store(reg, a);
        raw_bootcount_store(reg + 4, BOOTCOUNT_MAGIC);
-#endif
+#endif /* defined(CONFIG_SYS_BOOTCOUNT_SINGLEWORD */
 }
 
 __weak ulong bootcount_load(void)
@@ -79,6 +77,6 @@ __weak ulong bootcount_load(void)
                return 0;
        else
                return raw_bootcount_load(reg);
-#endif
+#endif /* defined(CONFIG_SYS_BOOTCOUNT_SINGLEWORD) */
 }
-#endif
+#endif /* defined(CONFIG_SYS_BOOTCOUNT_ADDR) */
index 7ffa136f5a47a6853d587a032597fe68b96f8bfe..b7b7f0044e74ce57c8c460e35cae1c2c6d65fb67 100644 (file)
@@ -767,8 +767,8 @@ int stm_unlock(struct spi_flash *flash, u32 ofs, size_t len)
                return ret;
 
        /* Cannot unlock; would unlock larger region than requested */
-       if (stm_is_locked_sr(flash, status_old, ofs - flash->erase_size,
-                            flash->erase_size))
+       if (stm_is_locked_sr(flash, ofs - flash->erase_size, flash->erase_size,
+                            status_old))
                return -EINVAL;
        /*
         * Need largest pow such that:
index 6763a248f28d0b327c8b14ff757206cf10a26432..d538d379bbec77cb54c7072b63480218f3d456dd 100644 (file)
@@ -157,7 +157,7 @@ static int sb_eth_recv(struct udevice *dev, int flags, uchar **packetp)
        struct eth_sandbox_priv *priv = dev_get_priv(dev);
 
        if (skip_timeout) {
-               sandbox_timer_add_offset(10000UL);
+               sandbox_timer_add_offset(11000UL);
                skip_timeout = false;
        }
 
index f1e189edd5c85ee3e2c59349af4a0792b374a83e..c14bb0aa829d2a34e99afdfc54437e3eb4656f3f 100644 (file)
@@ -381,7 +381,7 @@ static int imx_pcie_read_config(struct pci_controller *hose, pci_dev_t d,
        ret = imx_pcie_addr_valid(d);
        if (ret) {
                *val = 0xffffffff;
-               return ret;
+               return 0;
        }
 
        va_address = get_bus_address(d, where);
index 58e88ae45e37650ebf7288c219c554846d8d4bef..99f9c83fa41f607789b29b81890a9c8394b6a0e8 100644 (file)
@@ -314,7 +314,7 @@ static int ls_pcie_read_config(struct pci_controller *hose, pci_dev_t d,
 
        if (ls_pcie_addr_valid(hose, d)) {
                *val = 0xffffffff;
-               return -EINVAL;
+               return 0;
        }
 
        if (PCI_BUS(d) == hose->first_busno) {
index b2b98dea156112773d344f3598d3375fa22b7ec4..3430482f8d8b9e9a63c9dda792a07035d58a6401 100644 (file)
@@ -192,7 +192,7 @@ U_BOOT_DRIVER(serial_zynq) = {
 };
 
 #ifdef CONFIG_DEBUG_UART_ZYNQ
-void _debug_uart_init(void)
+static inline void _debug_uart_init(void)
 {
        struct uart_zynq *regs = (struct uart_zynq *)CONFIG_DEBUG_UART_BASE;
 
index feec3e80b6aeb0a05ff69c1fb8c0b206aa54b930..542b6cfe355b3e3212f7cb59d5c49792e1333e4c 100644 (file)
@@ -25,7 +25,7 @@ DECLARE_GLOBAL_DATA_PTR;
 #define TX_BUFFER_SIZE         0x40
 #endif
 
-#define OFFSET_BITS_MASK       GENMASK(24, 0)
+#define OFFSET_BITS_MASK       GENMASK(23, 0)
 
 #define FLASH_STATUS_WEL       0x02
 
diff --git a/fs/fs.c b/fs/fs.c
index b2d6a532330cb2cc14d77a5490971b6bcebd1d0b..a2f1bf5d464f9abfcd5da40bb10d7c0efa75cdac 100644 (file)
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -427,6 +427,7 @@ int do_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
        }
        puts("\n");
 
+       setenv_hex("fileaddr", addr);
        setenv_hex("filesize", len_read);
 
        return 0;
index 058325c0b4941237e000b92053ee3f3377ebd4b3..e29d77695be0dcc30f2d35bc26680d759a5e077a 100644 (file)
@@ -13,5 +13,6 @@
 #define CONFIG_SPL_SPI_SUPPORT
 #define CONFIG_SPL_SPI_FLASH_SUPPORT
 #define CONFIG_SPL_SPI_LOAD
+#define CONFIG_SPI_FLASH_GIGADEVICE
 
 #endif
index bc7cac4b90eac3e3420169509061778146719648..99b3aef2289365b9ffda35e99bd52c43ef6af02e 100644 (file)
 #define CONFIG_CMD_EXT2
 #define CONFIG_EHCI_IS_TDI
 #define CONFIG_USB_KEYBOARD
+#define CONFIG_SYS_STDIO_DEREGISTER
 #define CONFIG_SYS_USB_EVENT_POLL
  /* _VIA_CONTROL_EP  */
 #define CONFIG_CONSOLE_MUX
index c767f90e885e70f4faf710541ef6c03ab4237dd7..814934aa9220ec4a5bc981ccde03486fd18954e1 100644 (file)
 #define CONFIG_EXTRA_ENV_SETTINGS      \
                                "kernel_name=norkern\0" \
                                "kernel_alt_name=Image\0"       \
-                               "kernel_addr=0x80000000\0" \
+                               "kernel_addr=0x80080000\0" \
                                "initrd_name=ramdisk.img\0"     \
                                "initrd_addr=0x84000000\0"      \
                                "fdt_name=board.dtb\0" \
 #elif CONFIG_TARGET_VEXPRESS64_BASE_FVP
 #define CONFIG_EXTRA_ENV_SETTINGS      \
                                "kernel_name=Image\0"           \
-                               "kernel_addr=0x80000000\0"      \
+                               "kernel_addr=0x80080000\0"      \
                                "initrd_name=ramdisk.img\0"     \
                                "initrd_addr=0x88000000\0"      \
                                "fdt_name=devtree.dtb\0"        \
index 7e9badfabd0119f34980d4b800cb86b29ecaa8a3..2b788143b54cc975e2e86d0af92f29ec72e90374 100644 (file)
@@ -32,7 +32,7 @@ int misc_write(struct udevice *dev, int offset, void *buf, int size);
  *
  * @dev: the device
  * @request: command to be sent to the device
- * @buf: pointer to buffer related to the requset
+ * @buf: pointer to buffer related to the request
  * @return: 0 if OK, -ve on error
  */
 int misc_ioctl(struct udevice *dev, unsigned long request, void *buf);
@@ -70,7 +70,7 @@ struct misc_ops {
         *
         * @dev: the device
         * @request: command to be sent to the device
-        * @buf: pointer to buffer related to the requset
+        * @buf: pointer to buffer related to the request
         * @return: 0 if OK, -ve on error
         */
        int (*ioctl)(struct udevice *dev, unsigned long request, void *buf);
index 253936456595b18e0cb477a0c999f96cf4e2004a..0b410b6cd10b6cece52ba0748be4ff83b768f573 100644 (file)
@@ -227,7 +227,7 @@ int board_usb_cleanup(int index, enum usb_init_type init);
 
 #ifdef CONFIG_USB_STORAGE
 
-#define USB_MAX_STOR_DEV 5
+#define USB_MAX_STOR_DEV 7
 block_dev_desc_t *usb_stor_get_dev(int index);
 int usb_stor_scan(int mode);
 int usb_stor_info(void);
index 6cf3a353a347d7a91e1e344d204bd82a27ccc7b4..45fe6e3c1c08408d6245d4803df6a5f7ed8f4ced 100644 (file)
--- a/net/eth.c
+++ b/net/eth.c
@@ -337,14 +337,30 @@ U_BOOT_ENV_CALLBACK(ethaddr, on_ethaddr);
 
 int eth_init(void)
 {
-       struct udevice *current;
+       char *ethact = getenv("ethact");
+       char *ethrotate = getenv("ethrotate");
+       struct udevice *current = NULL;
        struct udevice *old_current;
        int ret = -ENODEV;
 
-       current = eth_get_dev();
+       /*
+        * When 'ethrotate' variable is set to 'no' and 'ethact' variable
+        * is already set to an ethernet device, we should stick to 'ethact'.
+        */
+       if ((ethrotate != NULL) && (strcmp(ethrotate, "no") == 0)) {
+               if (ethact) {
+                       current = eth_get_dev_by_name(ethact);
+                       if (!current)
+                               return -EINVAL;
+               }
+       }
+
        if (!current) {
-               printf("No ethernet found.\n");
-               return -ENODEV;
+               current = eth_get_dev();
+               if (!current) {
+                       printf("No ethernet found.\n");
+                       return -ENODEV;
+               }
        }
 
        old_current = current;
@@ -761,8 +777,6 @@ int eth_write_hwaddr(struct eth_device *dev, const char *base_name,
        } else if (is_valid_ethaddr(dev->enetaddr)) {
                eth_setenv_enetaddr_by_index(base_name, eth_number,
                                             dev->enetaddr);
-               printf("\nWarning: %s using MAC address from net device\n",
-                      dev->name);
        } else if (is_zero_ethaddr(dev->enetaddr)) {
 #ifdef CONFIG_NET_RANDOM_ETHADDR
                net_random_ethaddr(dev->enetaddr);
@@ -1039,6 +1053,17 @@ int eth_receive(void *packet, int length)
 static void eth_current_changed(void)
 {
        char *act = getenv("ethact");
+       char *ethrotate;
+
+       /*
+        * The call to eth_get_dev() below has a side effect of rotating
+        * ethernet device if uc_priv->current == NULL. This is not what
+        * we want when 'ethrotate' variable is 'no'.
+        */
+       ethrotate = getenv("ethrotate");
+       if ((ethrotate != NULL) && (strcmp(ethrotate, "no") == 0))
+               return;
+
        /* update current ethernet name */
        if (eth_get_dev()) {
                if (act == NULL || strcmp(act, eth_get_name()) != 0)
index 4d5746a7b356d84319b91346c02661f6768e570d..fba111edfba263846f00e178852740efc3b08349 100644 (file)
--- a/net/net.c
+++ b/net/net.c
@@ -542,6 +542,9 @@ restart:
 #ifdef CONFIG_SHOW_ACTIVITY
                show_activity(1);
 #endif
+               if (arp_timeout_check() > 0)
+                       time_start = get_timer(0);
+
                /*
                 *      Check the ethernet for a new packet.  The ethernet
                 *      receive routine will process it.
@@ -570,10 +573,6 @@ restart:
                        goto done;
                }
 
-               if (arp_timeout_check() > 0) {
-                   time_start = get_timer(0);
-               }
-
                /*
                 *      Check for a timeout, and run the timeout handler
                 *      if we have one.
index 4707dfd18e6f5e1045c03e139b3c5a2d94ad5916..83a4e5bad2428e63f113042225a182a3232c8d5e 100755 (executable)
@@ -298,7 +298,7 @@ sub read_maintainers {
     while (<$maint>) {
        my $line = $_;
 
-       if ($line =~ m/^(\C):\s*(.*)/) {
+       if ($line =~ m/^([A-Z]):\s*(.*)/) {
            my $type = $1;
            my $value = $2;
 
@@ -533,7 +533,7 @@ sub range_is_maintained {
 
     for (my $i = $start; $i < $end; $i++) {
        my $line = $typevalue[$i];
-       if ($line =~ m/^(\C):\s*(.*)/) {
+       if ($line =~ m/^([A-Z]):\s*(.*)/) {
            my $type = $1;
            my $value = $2;
            if ($type eq 'S') {
@@ -551,7 +551,7 @@ sub range_has_maintainer {
 
     for (my $i = $start; $i < $end; $i++) {
        my $line = $typevalue[$i];
-       if ($line =~ m/^(\C):\s*(.*)/) {
+       if ($line =~ m/^([A-Z]):\s*(.*)/) {
            my $type = $1;
            my $value = $2;
            if ($type eq 'M') {
@@ -600,7 +600,7 @@ sub get_maintainers {
 
            for ($i = $start; $i < $end; $i++) {
                my $line = $typevalue[$i];
-               if ($line =~ m/^(\C):\s*(.*)/) {
+               if ($line =~ m/^([A-Z]):\s*(.*)/) {
                    my $type = $1;
                    my $value = $2;
                    if ($type eq 'X') {
@@ -615,7 +615,7 @@ sub get_maintainers {
            if (!$exclude) {
                for ($i = $start; $i < $end; $i++) {
                    my $line = $typevalue[$i];
-                   if ($line =~ m/^(\C):\s*(.*)/) {
+                   if ($line =~ m/^([A-Z]):\s*(.*)/) {
                        my $type = $1;
                        my $value = $2;
                        if ($type eq 'F') {
@@ -917,7 +917,7 @@ sub find_first_section {
 
     while ($index < @typevalue) {
        my $tv = $typevalue[$index];
-       if (($tv =~ m/^(\C):\s*(.*)/)) {
+       if (($tv =~ m/^([A-Z]):\s*(.*)/)) {
            last;
        }
        $index++;
@@ -931,7 +931,7 @@ sub find_starting_index {
 
     while ($index > 0) {
        my $tv = $typevalue[$index];
-       if (!($tv =~ m/^(\C):\s*(.*)/)) {
+       if (!($tv =~ m/^([A-Z]):\s*(.*)/)) {
            last;
        }
        $index--;
@@ -945,7 +945,7 @@ sub find_ending_index {
 
     while ($index < @typevalue) {
        my $tv = $typevalue[$index];
-       if (!($tv =~ m/^(\C):\s*(.*)/)) {
+       if (!($tv =~ m/^([A-Z]):\s*(.*)/)) {
            last;
        }
        $index++;
@@ -971,7 +971,7 @@ sub get_maintainer_role {
 
     for ($i = $start + 1; $i < $end; $i++) {
        my $tv = $typevalue[$i];
-       if ($tv =~ m/^(\C):\s*(.*)/) {
+       if ($tv =~ m/^([A-Z]):\s*(.*)/) {
            my $ptype = $1;
            my $pvalue = $2;
            if ($ptype eq "S") {
@@ -1030,7 +1030,7 @@ sub add_categories {
 
     for ($i = $start + 1; $i < $end; $i++) {
        my $tv = $typevalue[$i];
-       if ($tv =~ m/^(\C):\s*(.*)/) {
+       if ($tv =~ m/^([A-Z]):\s*(.*)/) {
            my $ptype = $1;
            my $pvalue = $2;
            if ($ptype eq "L") {
@@ -1072,7 +1072,7 @@ sub add_categories {
                if ($name eq "") {
                    if ($i > 0) {
                        my $tv = $typevalue[$i - 1];
-                       if ($tv =~ m/^(\C):\s*(.*)/) {
+                       if ($tv =~ m/^([A-Z]):\s*(.*)/) {
                            if ($1 eq "P") {
                                $name = $2;
                                $pvalue = format_email($name, $address, $email_usename);
index 681c6aec71468c4958212e320185a427dc0c0ecf..3ff1b75e6f840600b5bbb97cbead84b03497aab8 100644 (file)
@@ -27,8 +27,8 @@ obj-y += regmap.o
 obj-$(CONFIG_REMOTEPROC) += remoteproc.o
 obj-$(CONFIG_RESET) += reset.o
 obj-$(CONFIG_DM_RTC) += rtc.o
-obj-$(CONFIG_DM_SPI_FLASH) += sf.o
-obj-$(CONFIG_DM_SPI) += spi.o
+#obj-$(CONFIG_DM_SPI_FLASH) += sf.o
+#obj-$(CONFIG_DM_SPI) += spi.o
 obj-y += syscon.o
 obj-$(CONFIG_DM_USB) += usb.o
 obj-$(CONFIG_DM_PMIC) += pmic.o
index 9cfd80b67095d449812d4341446cbf488b93ca0d..d49e40dd56175962cebac31864f57e261ed42bde 100644 (file)
@@ -64,7 +64,7 @@ RSA_OBJS-$(CONFIG_FIT_SIGNATURE) := $(addprefix lib/rsa/, \
                                        rsa-sign.o rsa-verify.o rsa-checksum.o \
                                        rsa-mod-exp.o)
 
-ROCKCHIP_OBS = lib/rc4.o rkcommon.o rkimage.o rksd.o
+ROCKCHIP_OBS = lib/rc4.o rkcommon.o rkimage.o rksd.o rkspi.o
 
 # common objs for dumpimage and mkimage
 dumpimage-mkimage-objs := aisimage.o \
index 800e235168ff5d041469c4c57bc0b5a7c44bc781..a0b0051d3805919ae72e67b2aa186fafdb77c0c4 100644 (file)
@@ -54,7 +54,7 @@ static void rkspi_set_header(void *buf, struct stat *sbuf, int ifd,
         * boot ROM. Its rationale is unknown.
         */
        for (sector = size / RKSPI_SECT_LEN - 1; sector >= 0; sector--) {
-               printf("sector %u\n", sector);
+               debug("sector %u\n", sector);
                memmove(buf + sector * RKSPI_SECT_LEN * 2,
                        buf + sector * RKSPI_SECT_LEN,
                        RKSPI_SECT_LEN);