Re: [U-Boot] [PATCH 2/2] bcm: fastboot: implement 'reboot-bootloader'
On Aug 23, 2016 16:39, "Steve Rae" wrote: > > on bcm235xx and bcm281xx boards > > Signed-off-by: Steve Rae > --- > > board/broadcom/bcm23550_w1d/bcm23550_w1d.c | 30 ++ > board/broadcom/bcm28155_ap/bcm28155_ap.c | 30 ++ > 2 files changed, 60 insertions(+) > > diff --git a/board/broadcom/bcm23550_w1d/bcm23550_w1d.c b/board/broadcom/bcm23550_w1d/bcm23550_w1d.c > index 0cb059f..ec0956c 100644 > --- a/board/broadcom/bcm23550_w1d/bcm23550_w1d.c > +++ b/board/broadcom/bcm23550_w1d/bcm23550_w1d.c > @@ -26,6 +26,9 @@ > #define CONFIG_USB_SERIALNO "1234567890" > #endif > > +#define FB_REBOOT_FLAG_BITS0x05 > +#define FB_REBOOT_FLAG_LOCATION0x34051f80 > + > DECLARE_GLOBAL_DATA_PTR; > > /* > @@ -118,3 +121,30 @@ int board_usb_cleanup(int index, enum usb_init_type init) > return 0; > } > #endif > + > +int fb_set_reboot_flag(void) > +{ > + /* set 'reboot-bootloader' bits */ > + writel(readl(FB_REBOOT_FLAG_LOCATION) | FB_REBOOT_FLAG_BITS, > + FB_REBOOT_FLAG_LOCATION); > + printf("%s: 0x%08x @ 0x%08x\n", __func__, > + readl(FB_REBOOT_FLAG_LOCATION), FB_REBOOT_FLAG_LOCATION); > + return 0; > +} > + > +void fb_handle_reboot_flag(void) > +{ > + int run_fastboot = (readl(FB_REBOOT_FLAG_LOCATION) & > + FB_REBOOT_FLAG_BITS ? 1 : 0); > + > + if (run_fastboot) { > + printf("\n%s: performing: 'fastboot 0'\n", __func__); > + > + /* clear 'reboot-bootloader' bits */ > + writel(readl(FB_REBOOT_FLAG_LOCATION) & ~(FB_REBOOT_FLAG_BITS), > + FB_REBOOT_FLAG_LOCATION); > + > + /* process 'reboot-bootloader' request */ > + run_command("fastboot 0", 0); > + } > +} > diff --git a/board/broadcom/bcm28155_ap/bcm28155_ap.c b/board/broadcom/bcm28155_ap/bcm28155_ap.c > index b3a4a41..5ac9569 100644 > --- a/board/broadcom/bcm28155_ap/bcm28155_ap.c > +++ b/board/broadcom/bcm28155_ap/bcm28155_ap.c > @@ -26,6 +26,9 @@ > #define CONFIG_USB_SERIALNO "1234567890" > #endif > > +#define FB_REBOOT_FLAG_BITS0x05 > +#define FB_REBOOT_FLAG_LOCATION0x34053f98 > + > DECLARE_GLOBAL_DATA_PTR; > > /* > @@ -125,3 +128,30 @@ int board_usb_cleanup(int index, enum usb_init_type init) > return 0; > } > #endif > + > +int fb_set_reboot_flag(void) > +{ > + /* set 'reboot-bootloader' bits */ > + writel(readl(FB_REBOOT_FLAG_LOCATION) | FB_REBOOT_FLAG_BITS, > + FB_REBOOT_FLAG_LOCATION); > + printf("%s: 0x%08x @ 0x%08x\n", __func__, > + readl(FB_REBOOT_FLAG_LOCATION), FB_REBOOT_FLAG_LOCATION); > + return 0; > +} > + > +void fb_handle_reboot_flag(void) > +{ > + int run_fastboot = (readl(FB_REBOOT_FLAG_LOCATION) & > + FB_REBOOT_FLAG_BITS ? 1 : 0); > + > + if (run_fastboot) { > + printf("\n%s: performing: 'fastboot 0'\n", __func__); > + > + /* clear 'reboot-bootloader' bits */ > + writel(readl(FB_REBOOT_FLAG_LOCATION) & ~(FB_REBOOT_FLAG_BITS), > + FB_REBOOT_FLAG_LOCATION); > + > + /* process 'reboot-bootloader' request */ > + run_command("fastboot 0", 0); > + } > +} > -- > 1.8.5 > ping... ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] fastboot: more support for reboot-bootloader command
On Aug 25, 2016 01:30, "Paul Kocialkowski" wrote: > > Le mercredi 24 août 2016 à 16:52 -0700, Steve Rae a écrit : > > So, I wanted to: > > (1) simplify this to not depend on any env variable, and not depend on > > the CONFIG_BOOTCOMMAND (can this be accidentally wiped out in the > > environment?) > > I'm not sure it really simplifies much. fastboot is a boot command, so I think > it's a good fit for CONFIG_BOOTCOMMAND. This is where I expect it to be called. > > I don't think that the possibility of accidentally wiping it out is a very > legitimate concern (most boards expect a specific CONFIG_BOOTCOMMAND, I don't > see any problem with that). It's up to users to deal with env breakage. > > Also, I'm a bit worried about where the logic should be, because there are cases > where we want to trigger fastboot from e.g. a button press. Using an env > variable makes it easy to have button handling (which may also trigger other > modes, not only fastboot) in one place to just set env variables accordingly. > > I don't think such button handling should be in the function you're introducing. > Thus, it means that boards will need a second place from where to call fastboot, > which makes it less intuitive and much messier. > > With a clear separation between detection (the first half of what the function > you're introducing is doing) and fastboot execution, we can easily manage > different sources that trigger fastboot mode. > > Finally, some boards only rely on persistent env storage to set fastboot mode > (and otherwise don't have a specific bit preserved at reset that can be set for > it), so the way you're suggesting won't be a good fit for these boards at all, > which creates disparity between boards and makes the whole thing less intuitive > and more confusing. > > > (2) also allow for the "fastboot continue" command (although I think > > that the CONFIG_BOOTCOMMAND also handles this properly!) > > Yes, this is already handled properly. > > > IMO - this series seems to be a much more straightforward approach > > perhaps if I changed the function name to: > > fb_handle_reboot_bootloader_flag() or > > handle_fastboot_reboot_bootloader_flag() > > because it is not trying to handle all possible reboot modes, only the > > "fastboot reboot-bootloader" > > Would that help? > > That's not really my concern, and I like to keep functions names consistent. The > original name you suggested is a good match with fb_set_reboot_flag. > > Thanks > > > On Wed, Aug 24, 2016 at 3:07 AM, Paul Kocialkowski wrote: > > > > > > Hi, > > > > > > Le mardi 23 août 2016 à 16:38 -0700, Steve Rae a écrit : > > > > > > > > The "fastboot reboot-bootloader" command is defined to > > > > re-enter into fastboot mode after rebooting into the > > > > bootloader. > > > > > > > > There is current support for setting the reset flag > > > > via the __weak fb_set_reboot_flag() function. > > > > > > > > This commit adds a generic handler to implement code > > > > which could launch fastboot during the boot sequence > > > > via this __weak fb_handle_reboot_flag() function. > > > > The actual handling this reset flag should be implemented > > > > by board/SoC specific code. > > > > > > So far, we've been calling the fastboot command from CONFIG_BOOTCOMMAND > > > (more or > > > less directly) by setting an env variable (reboot-mode, dofastboot, etc), > > > which > > > I think is a good fit. Since fastboot is a standalone command, I think it > > > makes > > > sense to call it from the bootcommand instead of calling it from the > > > function > > > you introduce. > > > > > > IMO the fb_handle_reboot_flag function you're introducing should only detect > > > that fastboot mode is requested and set an env variable (like it's done > > > in misc_init_r in sniper and kc1) so that the bootcommand can pick it up and > > > act > > > accordingly. This clearly separates the logic and puts each side of it where > > > it > > > belongs. > > > > > > > > > > > Signed-off-by: Steve Rae > > > > cc: Alexey Firago > > > > cc: Paul Kocialkowski > > > > cc: Tom Rini > > > > cc: Angela Stegmaier > > > > cc: Dileep Katta > > > > --- > > > > > > > > common/main.c | 8 > > > > 1 file changed, 8 insertions(+) > > > > > > > > diff --git a/common/main.c b/common/main.c > > > > index 2116a9e..ea3fe42 100644 > > > > --- a/common/main.c > > > > +++ b/common/main.c > > > > @@ -20,6 +20,12 @@ DECLARE_GLOBAL_DATA_PTR; > > > > */ > > > > __weak void show_boot_progress(int val) {} > > > > > > > > +/* > > > > + * Board-specific Platform code must implement fb_handle_reboot_flag(), > > > > if > > > > + * this feature is desired > > > > + */ > > > > +__weak void fb_handle_reboot_flag(void) {} > > > > + > > > > static void run_preboot_environment_command(void) > > > > { > > > > #ifdef CONFIG_PREBOOT > > > > @@ -63,6 +69,8 @@ void main_loop(void) > > > > if (cli_process_fdt(&s)) > > > > cli_secure_boot_cmd(s); > > > > > > > > + fb
Re: [U-Boot] [PATCH] Kconfig: update FASTBOOT_FLASH_MMC_DEV
On Aug 27, 2016 15:16, "Steve Rae" wrote: > > handle FASTBOOT_FLASH_MMC_DEV default properly > > Signed-off-by: Steve Rae > --- > I was hoping that the FASTBOOT_FLASH_MMC_DEV Kconfig option could be > an integer (eg. 0, 1, or 2 etc.) or undefined (to signify that it > is not being used). However, it seems that (Kconfig experts please!) > this is not correct within Kconfig. > Therefore, I have implemented "-1" to signify that it is not used. > Is this the "best practice" for handling this scenario? > > cmd/fastboot/Kconfig| 4 +++- > common/Makefile | 4 +++- > drivers/usb/gadget/f_fastboot.c | 12 > 3 files changed, 14 insertions(+), 6 deletions(-) > > diff --git a/cmd/fastboot/Kconfig b/cmd/fastboot/Kconfig > index a93d1c0..fdd5475 100644 > --- a/cmd/fastboot/Kconfig > +++ b/cmd/fastboot/Kconfig > @@ -50,10 +50,12 @@ config FASTBOOT_FLASH > > config FASTBOOT_FLASH_MMC_DEV > int "Define FASTBOOT MMC FLASH default device" > + default -1 > help > The fastboot "flash" command requires additional information > regarding the non-volatile storage device. Define this to > - the eMMC device that fastboot should use to store the image. > + the eMMC device that fastboot should use to store the image, > + or define '-1' to disable storing to an eMMC device. > > endif # USB_FUNCTION_FASTBOOT > > diff --git a/common/Makefile b/common/Makefile > index 21619b3..56e95b3 100644 > --- a/common/Makefile > +++ b/common/Makefile > @@ -142,12 +142,14 @@ obj-$(CONFIG_IO_TRACE) += iotrace.o > obj-y += memsize.o > obj-y += stdio.o > > -# This option is not just y/n - it can have a numeric value > ifdef CONFIG_FASTBOOT_FLASH > obj-y += image-sparse.o > +# This option is not just y/n - it is a numeric value > ifdef CONFIG_FASTBOOT_FLASH_MMC_DEV > +ifneq ($(CONFIG_FASTBOOT_FLASH_MMC_DEV), -1) > obj-y += fb_mmc.o > endif > +endif > ifdef CONFIG_FASTBOOT_FLASH_NAND_DEV > obj-y += fb_nand.o > endif > diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c > index 2160b1c..5df6b8b 100644 > --- a/drivers/usb/gadget/f_fastboot.c > +++ b/drivers/usb/gadget/f_fastboot.c > @@ -21,7 +21,8 @@ > #include > #include > #include > -#ifdef CONFIG_FASTBOOT_FLASH_MMC_DEV > +#if defined(CONFIG_FASTBOOT_FLASH_MMC_DEV) && \ > + (CONFIG_FASTBOOT_FLASH_MMC_DEV != -1) > #include > #endif > #ifdef CONFIG_FASTBOOT_FLASH_NAND_DEV > @@ -594,7 +595,8 @@ static void cb_flash(struct usb_ep *ep, struct usb_request *req) > fb_response_str = response; > > fastboot_fail("no flash device defined"); > -#ifdef CONFIG_FASTBOOT_FLASH_MMC_DEV > +#if defined(CONFIG_FASTBOOT_FLASH_MMC_DEV) && \ > + (CONFIG_FASTBOOT_FLASH_MMC_DEV != -1) > fb_mmc_flash_write(cmd, (void *)CONFIG_FASTBOOT_BUF_ADDR, >download_bytes); > #endif > @@ -610,7 +612,8 @@ static void cb_flash(struct usb_ep *ep, struct usb_request *req) > static void cb_oem(struct usb_ep *ep, struct usb_request *req) > { > char *cmd = req->buf; > -#ifdef CONFIG_FASTBOOT_FLASH_MMC_DEV > +#if defined(CONFIG_FASTBOOT_FLASH_MMC_DEV) && \ > + (CONFIG_FASTBOOT_FLASH_MMC_DEV != -1) > if (strncmp("format", cmd + 4, 6) == 0) { > char cmdbuf[32]; > sprintf(cmdbuf, "gpt write mmc %x $partitions", > @@ -646,7 +649,8 @@ static void cb_erase(struct usb_ep *ep, struct usb_request *req) > fb_response_str = response; > > fastboot_fail("no flash device defined"); > -#ifdef CONFIG_FASTBOOT_FLASH_MMC_DEV > +#if defined(CONFIG_FASTBOOT_FLASH_MMC_DEV) && \ > + (CONFIG_FASTBOOT_FLASH_MMC_DEV != -1) > fb_mmc_erase(cmd); > #endif > #ifdef CONFIG_FASTBOOT_FLASH_NAND_DEV > -- > 1.8.5 > ping... ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 08/29] Convert CONFIG_CFB_CONSOLE to Kconfig
This converts the following to Kconfig: CONFIG_CFB_CONSOLE Signed-off-by: Simon Glass --- Changes in v2: None README | 39 - configs/A10-OLinuXino-Lime_defconfig | 1 + configs/A10s-OLinuXino-M_defconfig | 1 + configs/A13-OLinuXinoM_defconfig | 1 + configs/A13-OLinuXino_defconfig| 1 + configs/A20-OLinuXino-Lime2_defconfig | 1 + configs/A20-OLinuXino-Lime_defconfig | 1 + configs/A20-OLinuXino_MICRO_defconfig | 1 + configs/A20-Olimex-SOM-EVB_defconfig | 1 + configs/A33-OLinuXino_defconfig| 1 + configs/Ainol_AW1_defconfig| 1 + configs/Ampe_A76_defconfig | 1 + configs/Auxtek-T003_defconfig | 1 + configs/Auxtek-T004_defconfig | 1 + configs/Bananapi_defconfig | 1 + configs/Bananapro_defconfig| 1 + configs/CHIP_defconfig | 1 + configs/CSQ_CS908_defconfig| 1 + configs/Chuwi_V7_CW0825_defconfig | 1 + configs/Colombus_defconfig | 1 + configs/Cubieboard2_defconfig | 1 + configs/Cubieboard_defconfig | 1 + configs/Cubietruck_defconfig | 1 + configs/Empire_electronix_d709_defconfig | 1 + configs/Empire_electronix_m712_defconfig | 1 + configs/Hummingbird_A31_defconfig | 1 + configs/Hyundai_A7HD_defconfig | 1 + configs/Itead_Ibox_A20_defconfig | 1 + configs/Lamobo_R1_defconfig| 1 + configs/Linksprite_pcDuino3_Nano_defconfig | 1 + configs/Linksprite_pcDuino3_defconfig | 1 + configs/Linksprite_pcDuino_defconfig | 1 + configs/MIP405T_defconfig | 1 + configs/MIP405_defconfig | 1 + configs/MK808C_defconfig | 1 + configs/MPC8536DS_36BIT_defconfig | 1 + configs/MPC8536DS_SDCARD_defconfig | 1 + configs/MPC8536DS_SPIFLASH_defconfig | 1 + configs/MPC8536DS_defconfig| 1 + configs/MPC8544DS_defconfig| 1 + configs/MPC8572DS_36BIT_defconfig | 1 + configs/MPC8572DS_defconfig| 1 + configs/MPC8610HPCD_defconfig | 1 + configs/MPC8641HPCN_36BIT_defconfig| 1 + configs/MPC8641HPCN_defconfig | 1 + configs/MSI_Primo73_defconfig | 1 + configs/MSI_Primo81_defconfig | 1 + configs/Marsboard_A10_defconfig| 1 + configs/Mele_A1000G_quad_defconfig | 1 + configs/Mele_A1000_defconfig | 1 + configs/Mele_I7_defconfig | 1 + configs/Mele_M3_defconfig | 1 + configs/Mele_M5_defconfig | 1 + configs/Mele_M9_defconfig | 1 + configs/Mini-X_defconfig | 1 + configs/MiniFAP_defconfig | 1 + configs/Orangepi_defconfig | 1 + configs/Orangepi_mini_defconfig| 1 + configs/PIP405_defconfig | 1 + configs/Sinlinx_SinA31s_defconfig | 1 + configs/Sinlinx_SinA33_defconfig | 1 + configs/Sinovoip_BPI_M2_defconfig | 1 + configs/T1024QDS_DDR4_SECURE_BOOT_defconfig| 1 + configs/T1024QDS_DDR4_defconfig| 1 + configs/T1024QDS_NAND_defconfig| 3 +- configs/T1024QDS_SDCARD_defconfig | 3 +- configs/T1024QDS_SECURE_BOOT_defconfig | 1 + configs/T1024QDS_SPIFLASH_defconfig| 1 + configs/T1024QDS_defconfig | 1 + configs/T1040QDS_DDR4_defconfig| 1 + configs/T1040QDS_SECURE_BOOT_defconfig | 1 + configs/T1040QDS_defconfig | 1 + configs/T1042D4RDB_NAND_defconfig | 3 +- configs/T1042D4RDB_SDCARD_defconfig| 3 +- configs/T1042D4RDB_SECURE_BOOT_defconfig | 1 + configs/T1042D4RDB_SPIFLASH_defconfig | 1 + configs/T1042D4RDB_defconfig | 1 + configs/T1042RDB_PI_NAND_SECURE_BOOT_defconfig | 3 +- configs/T1042RDB_PI_NAND_defconfig | 3 +- configs/T1042RDB_PI_SDCARD_defconfig | 3 +- configs/T1042RDB_PI_SPIFLASH_defconfig | 1 + configs/T1042RDB_PI_defconfig | 1 + configs/TQM5200_
[U-Boot] [PATCH] Cash flash correction of do_load()
--- fs/fs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/fs.c b/fs/fs.c index 595ff1f..7607230 100644 --- a/fs/fs.c +++ b/fs/fs.c @@ -417,6 +417,8 @@ int do_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[], } puts("\n"); + flush_cache(addr, len_read); + setenv_hex("fileaddr", addr); setenv_hex("filesize", len_read); @@ -535,4 +537,3 @@ int do_fs_type(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return CMD_RET_SUCCESS; } - -- 2.8.4 (Apple Git-73) ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] arm: mvebu: theadorable: Configure board for PCIe 2.0 capability
On 25.08.2016 16:22, Stefan Roese wrote: Use a board-specific board_sat_r_get() function to configure the board for PCIe 2.0 capability (e.g. 5GB/s link speed). Otherwise the default of 2.5GB/s will be established. Signed-off-by: Stefan Roese Applied to u-boot-marvell/master Thanks, Stefan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 10/27] spl: Convert spl_mmc_load_image() to use linker list
Add a linker list declaration for this method and remove the explicit switch() code. Signed-off-by: Simon Glass --- Changes in v2: None common/spl/spl.c | 6 -- common/spl/spl_mmc.c | 6 +- include/spl.h| 3 --- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/common/spl/spl.c b/common/spl/spl.c index 2bba423..3162bf4 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -373,12 +373,6 @@ static int spl_load_image(u32 boot_device) return loader->load_image(&bootdev); switch (boot_device) { -#ifdef CONFIG_SPL_MMC_SUPPORT - case BOOT_DEVICE_MMC1: - case BOOT_DEVICE_MMC2: - case BOOT_DEVICE_MMC2_2: - return spl_mmc_load_image(&bootdev); -#endif #ifdef CONFIG_SPL_UBI case BOOT_DEVICE_NAND: case BOOT_DEVICE_ONENAND: diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c index 899caf4..5e8172e 100644 --- a/common/spl/spl_mmc.c +++ b/common/spl/spl_mmc.c @@ -267,7 +267,7 @@ int spl_mmc_do_fs_boot(struct mmc *mmc) } #endif -int spl_mmc_load_image(struct spl_boot_device *bootdev) +static int spl_mmc_load_image(struct spl_boot_device *bootdev) { struct mmc *mmc = NULL; u32 boot_mode; @@ -345,3 +345,7 @@ int spl_mmc_load_image(struct spl_boot_device *bootdev) return err; } + +SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_MMC1, spl_mmc_load_image); +SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_MMC2, spl_mmc_load_image); +SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_MMC2_2, spl_mmc_load_image); diff --git a/include/spl.h b/include/spl.h index 8f19310..dc57c66 100644 --- a/include/spl.h +++ b/include/spl.h @@ -193,9 +193,6 @@ int spl_nor_load_image(struct spl_boot_device *bootdev); /* UBI SPL functions */ int spl_ubi_load_image(struct spl_boot_device *bootdev); -/* MMC SPL functions */ -int spl_mmc_load_image(struct spl_boot_device *bootdev); - /* YMODEM SPL functions */ int spl_ymodem_load_image(struct spl_boot_device *bootdev); -- 2.8.0.rc3.226.g39d4020 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 27/27] spl: Make spl_boot_list a local variable
There is no need for this to be in the BSS region. By moving it we can delay use of BSS in SPL. This is useful for machines where the BSS region is not in writeable space. On 64-bit x86, SPL runs from SPI flash and it is easier to eliminate BSS use than link SPL to run with BSS at a particular cache-as-RAM (CAR) address. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- Changes in v2: - Add a memset() to clear the spl_image data common/spl/spl.c | 24 include/spl.h| 2 -- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/common/spl/spl.c b/common/spl/spl.c index f5c7ffe..76c0d8e 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -29,7 +29,6 @@ DECLARE_GLOBAL_DATA_PTR; #endif u32 *boot_params_ptr = NULL; -struct spl_image_info spl_image; /* Define board data structure */ static bd_t bdata __attribute__ ((section(".data"))); @@ -255,14 +254,6 @@ int spl_init(void) #define BOOT_DEVICE_NONE 0xdeadbeef #endif -static u32 spl_boot_list[] = { - BOOT_DEVICE_NONE, - BOOT_DEVICE_NONE, - BOOT_DEVICE_NONE, - BOOT_DEVICE_NONE, - BOOT_DEVICE_NONE, -}; - __weak void board_boot_order(u32 *spl_boot_list) { spl_boot_list[0] = spl_boot_device(); @@ -363,7 +354,7 @@ static struct spl_image_loader *spl_ll_find_loader(uint boot_device) return NULL; } -static int spl_load_image(u32 boot_device) +static int spl_load_image(struct spl_image_info *spl_image, u32 boot_device) { struct spl_boot_device bootdev; struct spl_image_loader *loader = spl_ll_find_loader(boot_device); @@ -371,7 +362,7 @@ static int spl_load_image(u32 boot_device) bootdev.boot_device = boot_device; bootdev.boot_device_name = NULL; if (loader) - return loader->load_image(&spl_image, &bootdev); + return loader->load_image(spl_image, &bootdev); #if defined(CONFIG_SPL_SERIAL_SUPPORT) && defined(CONFIG_SPL_LIBCOMMON_SUPPORT) puts("SPL: Unsupported Boot Device!\n"); @@ -381,6 +372,14 @@ static int spl_load_image(u32 boot_device) void board_init_r(gd_t *dummy1, ulong dummy2) { + u32 spl_boot_list[] = { + BOOT_DEVICE_NONE, + BOOT_DEVICE_NONE, + BOOT_DEVICE_NONE, + BOOT_DEVICE_NONE, + BOOT_DEVICE_NONE, + }; + struct spl_image_info spl_image; int i; debug(">>spl:board_init_r()\n"); @@ -406,11 +405,12 @@ void board_init_r(gd_t *dummy1, ulong dummy2) spl_board_init(); #endif + memset(&spl_image, '\0', sizeof(spl_image)); board_boot_order(spl_boot_list); for (i = 0; i < ARRAY_SIZE(spl_boot_list) && spl_boot_list[i] != BOOT_DEVICE_NONE; i++) { announce_boot_device(spl_boot_list[i]); - if (!spl_load_image(spl_boot_list[i])) + if (!spl_load_image(&spl_image, spl_boot_list[i])) break; } diff --git a/include/spl.h b/include/spl.h index 7514d8e..b51ba90 100644 --- a/include/spl.h +++ b/include/spl.h @@ -63,8 +63,6 @@ int spl_load_simple_fit(struct spl_image_info *spl_image, #define SPL_COPY_PAYLOAD_ONLY 1 -extern struct spl_image_info spl_image; - /* SPL common functions */ void preloader_console_init(void); u32 spl_boot_device(void); -- 2.8.0.rc3.226.g39d4020 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 11/27] spl: Convert spl_ubi_load_image() to use linker list
Add a linker list declaration for this method and remove the explicit switch() code. Signed-off-by: Simon Glass --- Changes in v2: None common/spl/spl.c | 6 -- common/spl/spl_ubi.c | 3 +++ include/spl.h| 3 --- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/common/spl/spl.c b/common/spl/spl.c index 3162bf4..d6615f1 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -373,11 +373,6 @@ static int spl_load_image(u32 boot_device) return loader->load_image(&bootdev); switch (boot_device) { -#ifdef CONFIG_SPL_UBI - case BOOT_DEVICE_NAND: - case BOOT_DEVICE_ONENAND: - return spl_ubi_load_image(&bootdev); -#else #ifdef CONFIG_SPL_NAND_SUPPORT case BOOT_DEVICE_NAND: return spl_nand_load_image(&bootdev); @@ -386,7 +381,6 @@ static int spl_load_image(u32 boot_device) case BOOT_DEVICE_ONENAND: return spl_onenand_load_image(&bootdev); #endif -#endif #ifdef CONFIG_SPL_NOR_SUPPORT case BOOT_DEVICE_NOR: return spl_nor_load_image(&bootdev); diff --git a/common/spl/spl_ubi.c b/common/spl/spl_ubi.c index d64e6cf..3ef00aa 100644 --- a/common/spl/spl_ubi.c +++ b/common/spl/spl_ubi.c @@ -76,3 +76,6 @@ out: #endif return ret; } +/* Use priorty 0 so that Ubi will override NAND and ONENAND methods */ +SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_NAND, spl_ubi_load_image); +SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_ONENAND, spl_ubi_load_image); diff --git a/include/spl.h b/include/spl.h index dc57c66..cdcd88f 100644 --- a/include/spl.h +++ b/include/spl.h @@ -190,9 +190,6 @@ int spl_onenand_load_image(struct spl_boot_device *bootdev); /* NOR SPL functions */ int spl_nor_load_image(struct spl_boot_device *bootdev); -/* UBI SPL functions */ -int spl_ubi_load_image(struct spl_boot_device *bootdev); - /* YMODEM SPL functions */ int spl_ymodem_load_image(struct spl_boot_device *bootdev); -- 2.8.0.rc3.226.g39d4020 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 24/27] spl: Update ext functions to take an spl_image parameter
Update the ext loader to avoid using the spl_image global variable. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- Changes in v2: None common/spl/spl_ext.c| 21 - common/spl/spl_mmc.c| 4 ++-- drivers/mtd/spi/sunxi_spi_spl.c | 9 + include/spl.h | 6 -- 4 files changed, 23 insertions(+), 17 deletions(-) diff --git a/common/spl/spl_ext.c b/common/spl/spl_ext.c index e5af24e..b93e1ea 100644 --- a/common/spl/spl_ext.c +++ b/common/spl/spl_ext.c @@ -10,9 +10,9 @@ #include #ifdef CONFIG_SPL_EXT_SUPPORT -int spl_load_image_ext(struct blk_desc *block_dev, - int partition, - const char *filename) +int spl_load_image_ext(struct spl_image_info *spl_image, + struct blk_desc *block_dev, int partition, + const char *filename) { s32 err; struct image_header *header; @@ -48,13 +48,13 @@ int spl_load_image_ext(struct blk_desc *block_dev, goto end; } - err = spl_parse_image_header(&spl_image, header); + err = spl_parse_image_header(spl_image, header); if (err < 0) { puts("spl: ext: failed to parse image header\n"); goto end; } - err = ext4fs_read((char *)spl_image.load_addr, filelen, &actlen); + err = ext4fs_read((char *)spl_image->load_addr, filelen, &actlen); end: #ifdef CONFIG_SPL_LIBCOMMON_SUPPORT @@ -67,7 +67,8 @@ end: } #ifdef CONFIG_SPL_OS_BOOT -int spl_load_image_ext_os(struct blk_desc *block_dev, int partition) +int spl_load_image_ext_os(struct spl_image_info *spl_image, + struct blk_desc *block_dev, int partition) { int err; __maybe_unused loff_t filelen, actlen; @@ -104,7 +105,8 @@ int spl_load_image_ext_os(struct blk_desc *block_dev, int partition) } file = getenv("falcon_image_file"); if (file) { - err = spl_load_image_ext(block_dev, partition, file); + err = spl_load_image_ext(spl_image, block_dev, +partition, file); if (err != 0) { puts("spl: falling back to default\n"); goto defaults; @@ -134,11 +136,12 @@ defaults: return -1; } - return spl_load_image_ext(block_dev, partition, + return spl_load_image_ext(spl_image, block_dev, partition, CONFIG_SPL_FS_LOAD_KERNEL_NAME); } #else -int spl_load_image_ext_os(struct blk_desc *block_dev, int partition) +int spl_load_image_ext_os(struct spl_image_info *spl_image, + struct blk_desc *block_dev, int partition) { return -ENOSYS; } diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c index 6536e66..5f5d9d0 100644 --- a/common/spl/spl_mmc.c +++ b/common/spl/spl_mmc.c @@ -245,13 +245,13 @@ static int spl_mmc_do_fs_boot(struct spl_image_info *spl_image, struct mmc *mmc) #endif #ifdef CONFIG_SPL_EXT_SUPPORT if (!spl_start_uboot()) { - err = spl_load_image_ext_os(&mmc->block_dev, + err = spl_load_image_ext_os(spl_image, &mmc->block_dev, CONFIG_SYS_MMCSD_FS_BOOT_PARTITION); if (!err) return err; } #ifdef CONFIG_SPL_FS_LOAD_PAYLOAD_NAME - err = spl_load_image_ext(&mmc->block_dev, + err = spl_load_image_ext(spl_image, &mmc->block_dev, CONFIG_SYS_MMCSD_FS_BOOT_PARTITION, CONFIG_SPL_FS_LOAD_PAYLOAD_NAME); if (!err) diff --git a/drivers/mtd/spi/sunxi_spi_spl.c b/drivers/mtd/spi/sunxi_spi_spl.c index 70d6d15..67c7edd 100644 --- a/drivers/mtd/spi/sunxi_spi_spl.c +++ b/drivers/mtd/spi/sunxi_spi_spl.c @@ -262,7 +262,8 @@ static void spi0_read_data(void *buf, u32 addr, u32 len) /*/ -static int spl_spi_load_image(struct spl_boot_device *bootdev) +static int spl_spi_load_image(struct spl_image_info *spl_image, + struct spl_boot_device *bootdev) { int err; struct image_header *header; @@ -271,12 +272,12 @@ static int spl_spi_load_image(struct spl_boot_device *bootdev) spi0_init(); spi0_read_data((void *)header, CONFIG_SYS_SPI_U_BOOT_OFFS, 0x40); - err = spl_parse_image_header(&spl_image, header); + err = spl_parse_image_header(spl_image, header); if (err) return err; - spi0_read_data((void *)spl_image.load_addr, CONFIG_SYS_SPI_U_BOOT_OFFS, - spl_image.size); + spi0_read_data((void *)spl_image->load_addr, CONFIG_SYS_SPI_U_BOOT_OFFS, + spl_image->size
[U-Boot] [PATCH v2 26/27] spl: Update spl_load_simple_fit() to take an spl_image param
Upda the SPL FIT code to use the spl_image parameter. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- Changes in v2: None common/spl/spl.c| 2 +- common/spl/spl_fat.c| 2 +- common/spl/spl_fit.c| 9 + common/spl/spl_mmc.c| 2 +- common/spl/spl_nand.c | 2 +- common/spl/spl_spi.c| 2 +- common/spl/spl_ymodem.c | 2 +- include/spl.h | 4 +++- 8 files changed, 14 insertions(+), 11 deletions(-) diff --git a/common/spl/spl.c b/common/spl/spl.c index 39b1229..f5c7ffe 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -199,7 +199,7 @@ static int spl_ram_load_image(struct spl_image_info *spl_image, debug("Found FIT\n"); load.bl_len = 1; load.read = spl_ram_load_read; - spl_load_simple_fit(&load, 0, header); + spl_load_simple_fit(spl_image, &load, 0, header); } else { debug("Legacy image\n"); /* diff --git a/common/spl/spl_fat.c b/common/spl/spl_fat.c index e2bb000..a14acce 100644 --- a/common/spl/spl_fat.c +++ b/common/spl/spl_fat.c @@ -82,7 +82,7 @@ int spl_load_image_fat(struct spl_image_info *spl_image, load.filename = (void *)filename; load.priv = NULL; - return spl_load_simple_fit(&load, 0, header); + return spl_load_simple_fit(spl_image, &load, 0, header); } else { err = spl_parse_image_header(spl_image, header); if (err) diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c index be86072..aae556f 100644 --- a/common/spl/spl_fit.c +++ b/common/spl/spl_fit.c @@ -123,7 +123,8 @@ static int get_aligned_image_size(struct spl_load_info *info, int data_size, return (data_size + info->bl_len - 1) / info->bl_len; } -int spl_load_simple_fit(struct spl_load_info *info, ulong sector, void *fit) +int spl_load_simple_fit(struct spl_image_info *spl_image, + struct spl_load_info *info, ulong sector, void *fit) { int sectors; ulong size, load; @@ -184,9 +185,9 @@ int spl_load_simple_fit(struct spl_load_info *info, ulong sector, void *fit) data_size = fdt_getprop_u32(fit, node, "data-size"); load = fdt_getprop_u32(fit, node, "load"); debug("data_offset=%x, data_size=%x\n", data_offset, data_size); - spl_image.load_addr = load; - spl_image.entry_point = load; - spl_image.os = IH_OS_U_BOOT; + spl_image->load_addr = load; + spl_image->entry_point = load; + spl_image->os = IH_OS_U_BOOT; /* * Work out where to place the image. We read it so that the first diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c index 16a6b49..c674e61 100644 --- a/common/spl/spl_mmc.c +++ b/common/spl/spl_mmc.c @@ -80,7 +80,7 @@ static int mmc_load_image_raw_sector(struct spl_image_info *spl_image, load.filename = NULL; load.bl_len = mmc->read_bl_len; load.read = h_spl_load_read; - ret = spl_load_simple_fit(&load, sector, header); + ret = spl_load_simple_fit(spl_image, &load, sector, header); } else { ret = mmc_load_legacy(spl_image, mmc, sector, header); } diff --git a/common/spl/spl_nand.c b/common/spl/spl_nand.c index 5cf712e..d1abda6 100644 --- a/common/spl/spl_nand.c +++ b/common/spl/spl_nand.c @@ -59,7 +59,7 @@ static int spl_nand_load_element(struct spl_image_info *spl_image, load.filename = NULL; load.bl_len = 1; load.read = spl_nand_fit_read; - return spl_load_simple_fit(&load, offset, header); + return spl_load_simple_fit(spl_image, &load, offset, header); } else { err = spl_parse_image_header(spl_image, header); if (err) diff --git a/common/spl/spl_spi.c b/common/spl/spl_spi.c index 4bf3d65..a3caafb 100644 --- a/common/spl/spl_spi.c +++ b/common/spl/spl_spi.c @@ -108,7 +108,7 @@ static int spl_spi_load_image(struct spl_image_info *spl_image, load.filename = NULL; load.bl_len = 1; load.read = spl_spi_fit_read; - err = spl_load_simple_fit(&load, + err = spl_load_simple_fit(spl_image, &load, CONFIG_SYS_SPI_U_BOOT_OFFS, header); } else { diff --git a/common/spl/spl_ymodem.c b/common/spl/spl_ymodem.c index 8fbf895..13e8e51 100644 --- a/common/spl/spl_ymodem.c +++ b/common/spl/spl_ymodem.c @@ -103,7 +103,7 @@ static int spl_ymodem_load_image(struct spl_image_info *spl_image, info.buf = buf; info.image_read = BUF_SIZE; load.read = ymodem_read_fit; - ret = spl_load_simple_fit(&load, 0, (void *)buf); + ret = spl_
[U-Boot] [PATCH v2 25/27] spl: Update fat functions to take an spl_image parameter
Update the fat loader to avoid using the spl_image global variable. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- Changes in v2: None common/spl/spl_fat.c | 21 - common/spl/spl_mmc.c | 4 ++-- common/spl/spl_sata.c | 11 +++ common/spl/spl_usb.c | 13 - include/spl.h | 6 -- 5 files changed, 33 insertions(+), 22 deletions(-) diff --git a/common/spl/spl_fat.c b/common/spl/spl_fat.c index 68702a2..e2bb000 100644 --- a/common/spl/spl_fat.c +++ b/common/spl/spl_fat.c @@ -54,9 +54,9 @@ static ulong spl_fit_read(struct spl_load_info *load, ulong file_offset, return actread; } -int spl_load_image_fat(struct blk_desc *block_dev, - int partition, - const char *filename) +int spl_load_image_fat(struct spl_image_info *spl_image, + struct blk_desc *block_dev, int partition, + const char *filename) { int err; struct image_header *header; @@ -84,12 +84,12 @@ int spl_load_image_fat(struct blk_desc *block_dev, return spl_load_simple_fit(&load, 0, header); } else { - err = spl_parse_image_header(&spl_image, header); + err = spl_parse_image_header(spl_image, header); if (err) goto end; err = file_fat_read(filename, - (u8 *)(uintptr_t)spl_image.load_addr, 0); + (u8 *)(uintptr_t)spl_image->load_addr, 0); } end: @@ -103,7 +103,8 @@ end: } #ifdef CONFIG_SPL_OS_BOOT -int spl_load_image_fat_os(struct blk_desc *block_dev, int partition) +int spl_load_image_fat_os(struct spl_image_info *spl_image, + struct blk_desc *block_dev, int partition) { int err; __maybe_unused char *file; @@ -123,7 +124,8 @@ int spl_load_image_fat_os(struct blk_desc *block_dev, int partition) } file = getenv("falcon_image_file"); if (file) { - err = spl_load_image_fat(block_dev, partition, file); + err = spl_load_image_fat(spl_image, block_dev, +partition, file); if (err != 0) { puts("spl: falling back to default\n"); goto defaults; @@ -148,11 +150,12 @@ defaults: return -1; } - return spl_load_image_fat(block_dev, partition, + return spl_load_image_fat(spl_image, block_dev, partition, CONFIG_SPL_FS_LOAD_KERNEL_NAME); } #else -int spl_load_image_fat_os(struct blk_desc *block_dev, int partition) +int spl_load_image_fat_os(struct spl_image_info *spl_image, + struct blk_desc *block_dev, int partition) { return -ENOSYS; } diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c index 5f5d9d0..16a6b49 100644 --- a/common/spl/spl_mmc.c +++ b/common/spl/spl_mmc.c @@ -230,13 +230,13 @@ static int spl_mmc_do_fs_boot(struct spl_image_info *spl_image, struct mmc *mmc) #ifdef CONFIG_SPL_FAT_SUPPORT if (!spl_start_uboot()) { - err = spl_load_image_fat_os(mmc_get_blk_desc(mmc), + err = spl_load_image_fat_os(spl_image, mmc_get_blk_desc(mmc), CONFIG_SYS_MMCSD_FS_BOOT_PARTITION); if (!err) return err; } #ifdef CONFIG_SPL_FS_LOAD_PAYLOAD_NAME - err = spl_load_image_fat(mmc_get_blk_desc(mmc), + err = spl_load_image_fat(spl_image, mmc_get_blk_desc(mmc), CONFIG_SYS_MMCSD_FS_BOOT_PARTITION, CONFIG_SPL_FS_LOAD_PAYLOAD_NAME); if (!err) diff --git a/common/spl/spl_sata.c b/common/spl/spl_sata.c index 19b5ba5..a3c07cd 100644 --- a/common/spl/spl_sata.c +++ b/common/spl/spl_sata.c @@ -41,12 +41,15 @@ static int spl_sata_load_image(struct spl_image_info *spl_image, } #ifdef CONFIG_SPL_OS_BOOT - if (spl_start_uboot() || spl_load_image_fat_os(stor_dev, - CONFIG_SYS_SATA_FAT_BOOT_PARTITION)) + if (spl_start_uboot() || + spl_load_image_fat_os(spl_image, stor_dev, + CONFIG_SYS_SATA_FAT_BOOT_PARTITION)) #endif - err = spl_load_image_fat(stor_dev, - CONFIG_SYS_SATA_FAT_BOOT_PARTITION, + { + err = spl_load_image_fat(spl_image, stor_dev, + CONFIG_SYS_SATA_FAT_BOOT_PARTITION, CONFIG_SPL_FS_LOAD_PAYLOAD_NAME); + } if (err) { puts("Error loading sata device\n"); return err; diff --git a/common/spl/spl_usb.c b/common
[U-Boot] [PATCH v2 23/27] spl: Pass spl_image as a parameter to load_image() methods
Rather than having a global variable, pass the spl_image as a parameter. This avoids BSS use, and makes it clearer what the function is actually doing. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- Changes in v2: None arch/arm/mach-sunxi/board.c | 3 +- arch/arm/mach-uniphier/boot-mode/spl_board.c | 9 ++--- arch/sandbox/cpu/spl.c | 3 +- common/spl/spl.c | 7 ++-- common/spl/spl_mmc.c | 54 +++- common/spl/spl_nand.c| 33 + common/spl/spl_net.c | 15 common/spl/spl_nor.c | 17 - common/spl/spl_onenand.c | 7 ++-- common/spl/spl_sata.c| 3 +- common/spl/spl_spi.c | 18 +- common/spl/spl_ubi.c | 7 ++-- common/spl/spl_usb.c | 3 +- common/spl/spl_ymodem.c | 9 ++--- include/spl.h| 4 ++- 15 files changed, 110 insertions(+), 82 deletions(-) diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c index 22f3e3c..7713813 100644 --- a/arch/arm/mach-sunxi/board.c +++ b/arch/arm/mach-sunxi/board.c @@ -134,7 +134,8 @@ static int gpio_init(void) } #ifdef CONFIG_SPL_BUILD -static int spl_board_load_image(struct spl_boot_device *bootdev) +static int spl_board_load_image(struct spl_image_info *spl_image, + struct spl_boot_device *bootdev) { debug("Returning to FEL sp=%x, lr=%x\n", fel_stash.sp, fel_stash.lr); return_to_fel(fel_stash.sp, fel_stash.lr); diff --git a/arch/arm/mach-uniphier/boot-mode/spl_board.c b/arch/arm/mach-uniphier/boot-mode/spl_board.c index e2b202e..854ab05 100644 --- a/arch/arm/mach-uniphier/boot-mode/spl_board.c +++ b/arch/arm/mach-uniphier/boot-mode/spl_board.c @@ -65,7 +65,8 @@ int uniphier_rom_get_mmc_funcptr(int (**send_cmd)(u32, u32), return 0; } -static int spl_board_load_image(struct spl_boot_device *bootdev) +static int spl_board_load_image(struct spl_image_info *spl_image, + struct spl_boot_device *bootdev) { int (*send_cmd)(u32 cmd, u32 arg); int (*card_blockaddr)(u32 rca); @@ -113,12 +114,12 @@ static int spl_board_load_image(struct spl_boot_device *bootdev) return ret; } - ret = spl_parse_image_header(&spl_image, (void *)CONFIG_SYS_TEXT_BASE); + ret = spl_parse_image_header(spl_image, (void *)CONFIG_SYS_TEXT_BASE); if (ret) return ret; - ret = (*load_image)(dev_addr, spl_image.load_addr, - spl_image.size / 512); + ret = (*load_image)(dev_addr, spl_image->load_addr, + spl_image->size / 512); if (ret) { printf("failed to load image\n"); return ret; diff --git a/arch/sandbox/cpu/spl.c b/arch/sandbox/cpu/spl.c index 2c45354..1ad7fb6 100644 --- a/arch/sandbox/cpu/spl.c +++ b/arch/sandbox/cpu/spl.c @@ -38,7 +38,8 @@ void spl_board_announce_boot_device(void) printf("%s\n", fname); } -static int spl_board_load_image(struct spl_boot_device *bootdev) +static int spl_board_load_image(struct spl_image_info *spl_image, + struct spl_boot_device *bootdev) { char fname[256]; int ret; diff --git a/common/spl/spl.c b/common/spl/spl.c index a5719f2..39b1229 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -185,7 +185,8 @@ static ulong spl_ram_load_read(struct spl_load_info *load, ulong sector, return count; } -static int spl_ram_load_image(struct spl_boot_device *bootdev) +static int spl_ram_load_image(struct spl_image_info *spl_image, + struct spl_boot_device *bootdev) { struct image_header *header; @@ -210,7 +211,7 @@ static int spl_ram_load_image(struct spl_boot_device *bootdev) header = (struct image_header *) (CONFIG_SYS_TEXT_BASE - sizeof(struct image_header)); - spl_parse_image_header(&spl_image, header); + spl_parse_image_header(spl_image, header); } return 0; @@ -370,7 +371,7 @@ static int spl_load_image(u32 boot_device) bootdev.boot_device = boot_device; bootdev.boot_device_name = NULL; if (loader) - return loader->load_image(&bootdev); + return loader->load_image(&spl_image, &bootdev); #if defined(CONFIG_SPL_SERIAL_SUPPORT) && defined(CONFIG_SPL_LIBCOMMON_SUPPORT) puts("SPL: Unsupported Boot Device!\n"); diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c index 5e8172e..6536e66 100644 --- a/common/spl/spl_mmc.c +++ b/common/spl/spl_mmc.c @@ -18,26 +18,26 @@ DECLARE_GLOBAL_DATA_PTR; -static int mmc_load_legacy(struct mmc
[U-Boot] [PATCH v2 17/27] spl: Convert spl_sata_load_image() to use linker list
Add a linker list declaration for this method and remove the explicit switch() code. Signed-off-by: Simon Glass --- Changes in v2: None common/spl/spl.c | 4 common/spl/spl_sata.c | 3 ++- include/spl.h | 3 --- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/common/spl/spl.c b/common/spl/spl.c index 5e7ced3..3f4e48a 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -389,10 +389,6 @@ static int spl_load_image(u32 boot_device) bootdev.boot_device_name = "usb_ether"; return spl_net_load_image(&bootdev); #endif -#ifdef CONFIG_SPL_SATA_SUPPORT - case BOOT_DEVICE_SATA: - return spl_sata_load_image(&bootdev); -#endif #ifdef CONFIG_SPL_BOARD_LOAD_IMAGE case BOOT_DEVICE_BOARD: return spl_board_load_image(&bootdev); diff --git a/common/spl/spl_sata.c b/common/spl/spl_sata.c index 77fd73c..1a21c05 100644 --- a/common/spl/spl_sata.c +++ b/common/spl/spl_sata.c @@ -20,7 +20,7 @@ DECLARE_GLOBAL_DATA_PTR; -int spl_sata_load_image(struct spl_boot_device *bootdev) +static int spl_sata_load_image(struct spl_boot_device *bootdev) { int err; struct blk_desc *stor_dev; @@ -53,3 +53,4 @@ int spl_sata_load_image(struct spl_boot_device *bootdev) return 0; } +SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_SATA, spl_sata_load_image); diff --git a/include/spl.h b/include/spl.h index 677e3a1..279896d 100644 --- a/include/spl.h +++ b/include/spl.h @@ -187,9 +187,6 @@ int spl_spi_load_image(struct spl_boot_device *bootdev); /* Ethernet SPL functions */ int spl_net_load_image(struct spl_boot_device *bootdev); -/* SATA SPL functions */ -int spl_sata_load_image(struct spl_boot_device *bootdev); - /* SPL FAT image functions */ int spl_load_image_fat(struct blk_desc *block_dev, int partition, const char *filename); -- 2.8.0.rc3.226.g39d4020 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 22/27] spl: Convert spl_board_load_image() to use linker list
Add a linker list declaration for this method and remove the explicit switch() code. Update existing users. Signed-off-by: Simon Glass --- Changes in v2: None arch/arm/mach-sunxi/board.c | 5 - arch/arm/mach-uniphier/boot-mode/spl_board.c | 3 ++- arch/sandbox/cpu/spl.c | 3 ++- common/spl/spl.c | 13 ++--- include/spl.h| 8 5 files changed, 10 insertions(+), 22 deletions(-) diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c index 8a385a2..22f3e3c 100644 --- a/arch/arm/mach-sunxi/board.c +++ b/arch/arm/mach-sunxi/board.c @@ -133,13 +133,16 @@ static int gpio_init(void) return 0; } -int spl_board_load_image(struct spl_boot_device *bootdev) +#ifdef CONFIG_SPL_BUILD +static int spl_board_load_image(struct spl_boot_device *bootdev) { debug("Returning to FEL sp=%x, lr=%x\n", fel_stash.sp, fel_stash.lr); return_to_fel(fel_stash.sp, fel_stash.lr); return 0; } +SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_BOARD, spl_board_load_image); +#endif void s_init(void) { diff --git a/arch/arm/mach-uniphier/boot-mode/spl_board.c b/arch/arm/mach-uniphier/boot-mode/spl_board.c index 4eadc2f..e2b202e 100644 --- a/arch/arm/mach-uniphier/boot-mode/spl_board.c +++ b/arch/arm/mach-uniphier/boot-mode/spl_board.c @@ -65,7 +65,7 @@ int uniphier_rom_get_mmc_funcptr(int (**send_cmd)(u32, u32), return 0; } -int spl_board_load_image(struct spl_boot_device *bootdev) +static int spl_board_load_image(struct spl_boot_device *bootdev) { int (*send_cmd)(u32 cmd, u32 arg); int (*card_blockaddr)(u32 rca); @@ -126,3 +126,4 @@ int spl_board_load_image(struct spl_boot_device *bootdev) return 0; } +SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_BOARD, spl_board_load_image); diff --git a/arch/sandbox/cpu/spl.c b/arch/sandbox/cpu/spl.c index 4cee293..2c45354 100644 --- a/arch/sandbox/cpu/spl.c +++ b/arch/sandbox/cpu/spl.c @@ -38,7 +38,7 @@ void spl_board_announce_boot_device(void) printf("%s\n", fname); } -int spl_board_load_image(struct spl_boot_device *bootdev) +static int spl_board_load_image(struct spl_boot_device *bootdev) { char fname[256]; int ret; @@ -50,6 +50,7 @@ int spl_board_load_image(struct spl_boot_device *bootdev) /* Hopefully this will not return */ return os_spl_to_uboot(fname); } +SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_BOARD, spl_board_load_image); void spl_board_init(void) { diff --git a/common/spl/spl.c b/common/spl/spl.c index 06a326d..a5719f2 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -372,19 +372,10 @@ static int spl_load_image(u32 boot_device) if (loader) return loader->load_image(&bootdev); - switch (boot_device) { -#ifdef CONFIG_SPL_BOARD_LOAD_IMAGE - case BOOT_DEVICE_BOARD: - return spl_board_load_image(&bootdev); -#endif - default: #if defined(CONFIG_SPL_SERIAL_SUPPORT) && defined(CONFIG_SPL_LIBCOMMON_SUPPORT) - puts("SPL: Unsupported Boot Device!\n"); + puts("SPL: Unsupported Boot Device!\n"); #endif - return -ENODEV; - } - - return -EINVAL; + return -ENODEV; } void board_init_r(gd_t *dummy1, ulong dummy2) diff --git a/include/spl.h b/include/spl.h index 24a6ec4..cfab92b 100644 --- a/include/spl.h +++ b/include/spl.h @@ -219,12 +219,4 @@ void spl_board_init(void); */ bool spl_was_boot_source(void); -/** - * Board-specific load method for boards that have a special way of loading - * U-Boot, which does not fit with the existing SPL code. - * - * @return 0 on success, negative errno value on failure. - */ -int spl_board_load_image(struct spl_boot_device *bootdev); - #endif -- 2.8.0.rc3.226.g39d4020 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 16/27] spl: Convert spl_usb_load_image() to use linker list
Add a linker list declaration for this method and remove the explicit switch() code. Signed-off-by: Simon Glass --- Changes in v2: None common/spl/spl.c | 4 common/spl/spl_usb.c | 3 ++- include/spl.h| 3 --- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/common/spl/spl.c b/common/spl/spl.c index 1d037f5..5e7ced3 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -389,10 +389,6 @@ static int spl_load_image(u32 boot_device) bootdev.boot_device_name = "usb_ether"; return spl_net_load_image(&bootdev); #endif -#ifdef CONFIG_SPL_USB_SUPPORT - case BOOT_DEVICE_USB: - return spl_usb_load_image(&bootdev); -#endif #ifdef CONFIG_SPL_SATA_SUPPORT case BOOT_DEVICE_SATA: return spl_sata_load_image(&bootdev); diff --git a/common/spl/spl_usb.c b/common/spl/spl_usb.c index f990336..2bc321a 100644 --- a/common/spl/spl_usb.c +++ b/common/spl/spl_usb.c @@ -22,7 +22,7 @@ DECLARE_GLOBAL_DATA_PTR; static int usb_stor_curr_dev = -1; /* current device */ #endif -int spl_usb_load_image(struct spl_boot_device *bootdev) +static int spl_usb_load_image(struct spl_boot_device *bootdev) { int err; struct blk_desc *stor_dev; @@ -61,3 +61,4 @@ int spl_usb_load_image(struct spl_boot_device *bootdev) return 0; } +SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_USB, spl_usb_load_image); diff --git a/include/spl.h b/include/spl.h index 3605911..677e3a1 100644 --- a/include/spl.h +++ b/include/spl.h @@ -187,9 +187,6 @@ int spl_spi_load_image(struct spl_boot_device *bootdev); /* Ethernet SPL functions */ int spl_net_load_image(struct spl_boot_device *bootdev); -/* USB SPL functions */ -int spl_usb_load_image(struct spl_boot_device *bootdev); - /* SATA SPL functions */ int spl_sata_load_image(struct spl_boot_device *bootdev); -- 2.8.0.rc3.226.g39d4020 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 21/27] spl: Convert spl_net_load_image() to use linker list
Add a linker list declaration for this method and remove the explicit switch() code. We need two variants - one for BOOT_DEVICE_CPGMAC and one for BOOT_DEVICE_USBETH. Signed-off-by: Simon Glass --- Changes in v2: None common/spl/spl.c | 12 common/spl/spl_net.c | 26 +- include/spl.h| 3 --- 3 files changed, 25 insertions(+), 16 deletions(-) diff --git a/common/spl/spl.c b/common/spl/spl.c index 9c8dcbb..06a326d 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -373,18 +373,6 @@ static int spl_load_image(u32 boot_device) return loader->load_image(&bootdev); switch (boot_device) { -#ifdef CONFIG_SPL_ETH_SUPPORT - case BOOT_DEVICE_CPGMAC: -#ifdef CONFIG_SPL_ETH_DEVICE - bootdev.boot_device_name = CONFIG_SPL_ETH_DEVICE; -#endif - return spl_net_load_image(&bootdev); -#endif -#ifdef CONFIG_SPL_USBETH_SUPPORT - case BOOT_DEVICE_USBETH: - bootdev.boot_device_name = "usb_ether"; - return spl_net_load_image(&bootdev); -#endif #ifdef CONFIG_SPL_BOARD_LOAD_IMAGE case BOOT_DEVICE_BOARD: return spl_board_load_image(&bootdev); diff --git a/common/spl/spl_net.c b/common/spl/spl_net.c index 730f88e..0cbd995 100644 --- a/common/spl/spl_net.c +++ b/common/spl/spl_net.c @@ -14,7 +14,8 @@ DECLARE_GLOBAL_DATA_PTR; -int spl_net_load_image(struct spl_boot_device *bootdev) +#if defined(CONFIG_SPL_ETH_SUPPORT) || defined(CONFIG_SPL_USBETH_SUPPORT) +static int spl_net_load_image(struct spl_boot_device *bootdev) { int rv; @@ -37,3 +38,26 @@ int spl_net_load_image(struct spl_boot_device *bootdev) return spl_parse_image_header(&spl_image, (struct image_header *)load_addr); } +#endif + +#ifdef CONFIG_SPL_ETH_SUPPORT +int spl_net_load_image_cpgmac(struct spl_boot_device *bootdev) +{ +#ifdef CONFIG_SPL_ETH_DEVICE + bootdev->boot_device_name = CONFIG_SPL_ETH_DEVICE; +#endif + + return spl_net_load_image(bootdev); +} +SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_CPGMAC, spl_net_load_image_cpgmac); +#endif + +#ifdef CONFIG_SPL_USBETH_SUPPORT +int spl_net_load_image_usb(struct spl_boot_device *bootdev) +{ + bootdev->boot_device_name = "usb_ether"; + + return spl_net_load_image(bootdev); +} +SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_USBETH, spl_net_load_image_usb); +#endif diff --git a/include/spl.h b/include/spl.h index 29dcf5b..24a6ec4 100644 --- a/include/spl.h +++ b/include/spl.h @@ -181,9 +181,6 @@ struct spl_image_loader { .load_image = __method, \ } -/* Ethernet SPL functions */ -int spl_net_load_image(struct spl_boot_device *bootdev); - /* SPL FAT image functions */ int spl_load_image_fat(struct blk_desc *block_dev, int partition, const char *filename); -- 2.8.0.rc3.226.g39d4020 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 20/27] spi: Move freescale-specific code into a private header
At present there are two SPI functions only used by freescale which are defined in the spi_flash.h header. One function name matches an existing generic SPL function. Move these into a private header to avoid confusion. Arcturus looks like it does not actually support SPI, so drop the SPI code from that board. Signed-off-by: Simon Glass --- Changes in v2: None board/Arcturus/ucp1020/spl.c | 2 -- board/freescale/common/spl.h | 13 + board/freescale/p1010rdb/spl.c | 3 ++- board/freescale/p1022ds/spl.c | 3 ++- board/freescale/p1_p2_rdb_pc/spl.c | 3 ++- board/freescale/t102xqds/spl.c | 7 --- board/freescale/t102xrdb/spl.c | 7 --- board/freescale/t104xrdb/spl.c | 7 --- board/freescale/t208xqds/spl.c | 7 --- board/freescale/t208xrdb/spl.c | 7 --- drivers/mtd/spi/fsl_espi_spl.c | 4 ++-- include/spi_flash.h| 3 --- 12 files changed, 41 insertions(+), 25 deletions(-) create mode 100644 board/freescale/common/spl.h diff --git a/board/Arcturus/ucp1020/spl.c b/board/Arcturus/ucp1020/spl.c index 9315bb7..9c19c87 100644 --- a/board/Arcturus/ucp1020/spl.c +++ b/board/Arcturus/ucp1020/spl.c @@ -119,8 +119,6 @@ void board_init_r(gd_t *gd, ulong dest_addr) #ifdef CONFIG_SPL_MMC_BOOT mmc_boot(); -#elif defined(CONFIG_SPL_SPI_BOOT) - spi_boot(); #elif defined(CONFIG_SPL_NAND_BOOT) nand_boot(); #endif diff --git a/board/freescale/common/spl.h b/board/freescale/common/spl.h new file mode 100644 index 000..88c987e --- /dev/null +++ b/board/freescale/common/spl.h @@ -0,0 +1,13 @@ +/* + * Copyright 2016 Google, Inc + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#ifndef __FREESCALE_BOARD_SPL_H +#define __FREESCALE_BOARD_SPL_H + +void fsl_spi_spl_load_image(uint32_t offs, unsigned int size, void *vdst); +void fsl_spi_boot(void) __noreturn; + +#endif diff --git a/board/freescale/p1010rdb/spl.c b/board/freescale/p1010rdb/spl.c index f858408..9844194 100644 --- a/board/freescale/p1010rdb/spl.c +++ b/board/freescale/p1010rdb/spl.c @@ -12,6 +12,7 @@ #include #include #include +#include "../common/spl.h" DECLARE_GLOBAL_DATA_PTR; @@ -103,7 +104,7 @@ void board_init_r(gd_t *gd, ulong dest_addr) #ifdef CONFIG_SPL_MMC_BOOT mmc_boot(); #elif defined(CONFIG_SPL_SPI_BOOT) - spi_boot(); + fsl_spi_boot(); #elif defined(CONFIG_SPL_NAND_BOOT) nand_boot(); #endif diff --git a/board/freescale/p1022ds/spl.c b/board/freescale/p1022ds/spl.c index 04db767..6a5fe74 100644 --- a/board/freescale/p1022ds/spl.c +++ b/board/freescale/p1022ds/spl.c @@ -14,6 +14,7 @@ #include "../common/ngpixis.h" #include #include +#include "../common/spl.h" DECLARE_GLOBAL_DATA_PTR; @@ -120,7 +121,7 @@ void board_init_r(gd_t *gd, ulong dest_addr) #ifdef CONFIG_SPL_MMC_BOOT mmc_boot(); #elif defined(CONFIG_SPL_SPI_BOOT) - spi_boot(); + fsl_spi_boot(); #elif defined(CONFIG_SPL_NAND_BOOT) nand_boot(); #endif diff --git a/board/freescale/p1_p2_rdb_pc/spl.c b/board/freescale/p1_p2_rdb_pc/spl.c index 76a3cf4..9e8f359 100644 --- a/board/freescale/p1_p2_rdb_pc/spl.c +++ b/board/freescale/p1_p2_rdb_pc/spl.c @@ -13,6 +13,7 @@ #include #include #include +#include "../common/spl.h" DECLARE_GLOBAL_DATA_PTR; @@ -117,7 +118,7 @@ void board_init_r(gd_t *gd, ulong dest_addr) #ifdef CONFIG_SPL_MMC_BOOT mmc_boot(); #elif defined(CONFIG_SPL_SPI_BOOT) - spi_boot(); + fsl_spi_boot(); #elif defined(CONFIG_SPL_NAND_BOOT) nand_boot(); #endif diff --git a/board/freescale/t102xqds/spl.c b/board/freescale/t102xqds/spl.c index d59d343..61bfb29 100644 --- a/board/freescale/t102xqds/spl.c +++ b/board/freescale/t102xqds/spl.c @@ -14,6 +14,7 @@ #include #include "../common/qixis.h" #include "t102xqds_qixis.h" +#include "../common/spl.h" DECLARE_GLOBAL_DATA_PTR; @@ -132,8 +133,8 @@ void board_init_r(gd_t *gd, ulong dest_addr) (uchar *)CONFIG_ENV_ADDR); #endif #ifdef CONFIG_SPL_SPI_BOOT - spi_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE, - (uchar *)CONFIG_ENV_ADDR); + fsl_spi_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE, + (uchar *)CONFIG_ENV_ADDR); #endif gd->env_addr = (ulong)(CONFIG_ENV_ADDR); @@ -146,7 +147,7 @@ void board_init_r(gd_t *gd, ulong dest_addr) #ifdef CONFIG_SPL_MMC_BOOT mmc_boot(); #elif defined(CONFIG_SPL_SPI_BOOT) - spi_boot(); + fsl_spi_boot(); #elif defined(CONFIG_SPL_NAND_BOOT) nand_boot(); #endif diff --git a/board/freescale/t102xrdb/spl.c b/board/freescale/t102xrdb/spl.c index bd3cbbf..6d8866e 100644 --- a/board/freescale/t102xrdb/spl.c +++ b/board/freescale/t102xrdb/spl.c @@ -13,6 +13,7 @@ #include #include #include "../common/sleep.h" +#include "../common/spl.h" DECLARE_GLOBAL_DATA_PTR; @@ -119,8 +120,8 @@ void board_init_r(gd_t *gd, ulong
[U-Boot] [PATCH v2 13/27] spl: Convert spl_onenand_load_image() to use linker list
Add a linker list declaration for this method and remove the explicit switch() code. Signed-off-by: Simon Glass --- Changes in v2: None common/spl/spl.c | 4 common/spl/spl_onenand.c | 4 +++- include/spl.h| 3 --- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/common/spl/spl.c b/common/spl/spl.c index 888432a..b838b3a 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -373,10 +373,6 @@ static int spl_load_image(u32 boot_device) return loader->load_image(&bootdev); switch (boot_device) { -#ifdef CONFIG_SPL_ONENAND_SUPPORT - case BOOT_DEVICE_ONENAND: - return spl_onenand_load_image(&bootdev); -#endif #ifdef CONFIG_SPL_NOR_SUPPORT case BOOT_DEVICE_NOR: return spl_nor_load_image(&bootdev); diff --git a/common/spl/spl_onenand.c b/common/spl/spl_onenand.c index f5e2f95..361a1b3 100644 --- a/common/spl/spl_onenand.c +++ b/common/spl/spl_onenand.c @@ -14,7 +14,7 @@ #include #include -int spl_onenand_load_image(struct spl_boot_device *bootdev) +static int spl_onenand_load_image(struct spl_boot_device *bootdev) { struct image_header *header; int ret; @@ -34,3 +34,5 @@ int spl_onenand_load_image(struct spl_boot_device *bootdev) return 0; } +/* Use priorty 1 so that Ubi can override this */ +SPL_LOAD_IMAGE_METHOD(1, BOOT_DEVICE_ONENAND, spl_onenand_load_image); diff --git a/include/spl.h b/include/spl.h index 86bddd8..b7a3592 100644 --- a/include/spl.h +++ b/include/spl.h @@ -181,9 +181,6 @@ struct spl_image_loader { .load_image = __method, \ } -/* OneNAND SPL functions */ -int spl_onenand_load_image(struct spl_boot_device *bootdev); - /* NOR SPL functions */ int spl_nor_load_image(struct spl_boot_device *bootdev); -- 2.8.0.rc3.226.g39d4020 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 18/27] spl: spi: Move the generic SPI loader into common/spl
All the other SPL loaders are in this directory, so move the SPI one in there too. There are two board-specific SPI loaders (fsl and sunxi). These remain in the drivers/mtd/spi directory, since they do not contain generic code. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- Changes in v2: None common/spl/Makefile| 1 + drivers/mtd/spi/spi_spl_load.c => common/spl/spl_spi.c | 0 drivers/mtd/spi/Makefile | 1 - 3 files changed, 1 insertion(+), 1 deletion(-) rename drivers/mtd/spi/spi_spl_load.c => common/spl/spl_spi.c (100%) diff --git a/common/spl/Makefile b/common/spl/Makefile index b15f0f6..275b06c 100644 --- a/common/spl/Makefile +++ b/common/spl/Makefile @@ -24,4 +24,5 @@ obj-$(CONFIG_SPL_USB_SUPPORT) += spl_usb.o obj-$(CONFIG_SPL_FAT_SUPPORT) += spl_fat.o obj-$(CONFIG_SPL_EXT_SUPPORT) += spl_ext.o obj-$(CONFIG_SPL_SATA_SUPPORT) += spl_sata.o +obj-$(CONFIG_SPL_SPI_LOAD) += spl_spi.o endif diff --git a/drivers/mtd/spi/spi_spl_load.c b/common/spl/spl_spi.c similarity index 100% rename from drivers/mtd/spi/spi_spl_load.c rename to common/spl/spl_spi.c diff --git a/drivers/mtd/spi/Makefile b/drivers/mtd/spi/Makefile index 6f47a66..f3dc409 100644 --- a/drivers/mtd/spi/Makefile +++ b/drivers/mtd/spi/Makefile @@ -8,7 +8,6 @@ obj-$(CONFIG_DM_SPI_FLASH) += sf-uclass.o ifdef CONFIG_SPL_BUILD -obj-$(CONFIG_SPL_SPI_LOAD) += spi_spl_load.o obj-$(CONFIG_SPL_SPI_BOOT) += fsl_espi_spl.o obj-$(CONFIG_SPL_SPI_SUNXI)+= sunxi_spi_spl.o endif -- 2.8.0.rc3.226.g39d4020 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 19/27] spl: Convert spl_spi_load_image() to use linker list
Add a linker list declaration for this method and remove the explicit switch() code. Also set up the sunxi function. Signed-off-by: Simon Glass --- Changes in v2: None common/spl/spl.c| 4 common/spl/spl_spi.c| 4 +++- drivers/mtd/spi/sunxi_spi_spl.c | 4 +++- include/spl.h | 3 --- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/common/spl/spl.c b/common/spl/spl.c index 3f4e48a..9c8dcbb 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -373,10 +373,6 @@ static int spl_load_image(u32 boot_device) return loader->load_image(&bootdev); switch (boot_device) { -#if defined(CONFIG_SPL_SPI_SUPPORT) || defined(CONFIG_SPL_SPI_FLASH_SUPPORT) - case BOOT_DEVICE_SPI: - return spl_spi_load_image(&bootdev); -#endif #ifdef CONFIG_SPL_ETH_SUPPORT case BOOT_DEVICE_CPGMAC: #ifdef CONFIG_SPL_ETH_DEVICE diff --git a/common/spl/spl_spi.c b/common/spl/spl_spi.c index e4cc0d0..b9294f2 100644 --- a/common/spl/spl_spi.c +++ b/common/spl/spl_spi.c @@ -65,7 +65,7 @@ static ulong spl_spi_fit_read(struct spl_load_info *load, ulong sector, * configured and available since this code loads the main U-Boot image * from SPI into SDRAM and starts it from there. */ -int spl_spi_load_image(struct spl_boot_device *bootdev) +static int spl_spi_load_image(struct spl_boot_device *bootdev) { int err = 0; struct spi_flash *flash; @@ -121,3 +121,5 @@ int spl_spi_load_image(struct spl_boot_device *bootdev) return err; } +/* Use priorty 1 so that boards can override this */ +SPL_LOAD_IMAGE_METHOD(1, BOOT_DEVICE_SPI, spl_spi_load_image); diff --git a/drivers/mtd/spi/sunxi_spi_spl.c b/drivers/mtd/spi/sunxi_spi_spl.c index 767959c..70d6d15 100644 --- a/drivers/mtd/spi/sunxi_spi_spl.c +++ b/drivers/mtd/spi/sunxi_spi_spl.c @@ -262,7 +262,7 @@ static void spi0_read_data(void *buf, u32 addr, u32 len) /*/ -int spl_spi_load_image(struct spl_boot_device *bootdev) +static int spl_spi_load_image(struct spl_boot_device *bootdev) { int err; struct image_header *header; @@ -281,3 +281,5 @@ int spl_spi_load_image(struct spl_boot_device *bootdev) spi0_deinit(); return 0; } +/* Use priorty 0 to override the default if it happens to be linked in */ +SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_SPI, spl_spi_load_image); diff --git a/include/spl.h b/include/spl.h index 279896d..29dcf5b 100644 --- a/include/spl.h +++ b/include/spl.h @@ -181,9 +181,6 @@ struct spl_image_loader { .load_image = __method, \ } -/* SPI SPL functions */ -int spl_spi_load_image(struct spl_boot_device *bootdev); - /* Ethernet SPL functions */ int spl_net_load_image(struct spl_boot_device *bootdev); -- 2.8.0.rc3.226.g39d4020 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 14/27] spl: Convert spl_nor_load_image() to use linker list
Add a linker list declaration for this method and remove the explicit switch() code. Signed-off-by: Simon Glass --- Changes in v2: None common/spl/spl.c | 4 common/spl/spl_nor.c | 3 ++- include/spl.h| 3 --- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/common/spl/spl.c b/common/spl/spl.c index b838b3a..2ea7c4e 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -373,10 +373,6 @@ static int spl_load_image(u32 boot_device) return loader->load_image(&bootdev); switch (boot_device) { -#ifdef CONFIG_SPL_NOR_SUPPORT - case BOOT_DEVICE_NOR: - return spl_nor_load_image(&bootdev); -#endif #ifdef CONFIG_SPL_YMODEM_SUPPORT case BOOT_DEVICE_UART: return spl_ymodem_load_image(&bootdev); diff --git a/common/spl/spl_nor.c b/common/spl/spl_nor.c index f10d679..b55fcc5 100644 --- a/common/spl/spl_nor.c +++ b/common/spl/spl_nor.c @@ -7,7 +7,7 @@ #include #include -int spl_nor_load_image(struct spl_boot_device *bootdev) +static int spl_nor_load_image(struct spl_boot_device *bootdev) { int ret; /* @@ -70,3 +70,4 @@ int spl_nor_load_image(struct spl_boot_device *bootdev) return 0; } +SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_NOR, spl_nor_load_image); diff --git a/include/spl.h b/include/spl.h index b7a3592..6338bcf 100644 --- a/include/spl.h +++ b/include/spl.h @@ -181,9 +181,6 @@ struct spl_image_loader { .load_image = __method, \ } -/* NOR SPL functions */ -int spl_nor_load_image(struct spl_boot_device *bootdev); - /* YMODEM SPL functions */ int spl_ymodem_load_image(struct spl_boot_device *bootdev); -- 2.8.0.rc3.226.g39d4020 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 12/27] spl: Convert spl_nand_load_image() to use linker list
Add a linker list declaration for this method and remove the explicit switch() code. Signed-off-by: Simon Glass --- Changes in v2: None common/spl/spl.c | 4 common/spl/spl_nand.c | 4 +++- include/spl.h | 3 --- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/common/spl/spl.c b/common/spl/spl.c index d6615f1..888432a 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -373,10 +373,6 @@ static int spl_load_image(u32 boot_device) return loader->load_image(&bootdev); switch (boot_device) { -#ifdef CONFIG_SPL_NAND_SUPPORT - case BOOT_DEVICE_NAND: - return spl_nand_load_image(&bootdev); -#endif #ifdef CONFIG_SPL_ONENAND_SUPPORT case BOOT_DEVICE_ONENAND: return spl_onenand_load_image(&bootdev); diff --git a/common/spl/spl_nand.c b/common/spl/spl_nand.c index 575de66..ed758e5 100644 --- a/common/spl/spl_nand.c +++ b/common/spl/spl_nand.c @@ -67,7 +67,7 @@ static int spl_nand_load_element(int offset, struct image_header *header) } } -int spl_nand_load_image(void) +static int spl_nand_load_image(struct spl_boot_device *bootdev) { int err; struct image_header *header; @@ -145,3 +145,5 @@ int spl_nand_load_image(void) return err; } #endif +/* Use priorty 1 so that Ubi can override this */ +SPL_LOAD_IMAGE_METHOD(1, BOOT_DEVICE_NAND, spl_nand_load_image); diff --git a/include/spl.h b/include/spl.h index cdcd88f..86bddd8 100644 --- a/include/spl.h +++ b/include/spl.h @@ -181,9 +181,6 @@ struct spl_image_loader { .load_image = __method, \ } -/* NAND SPL functions */ -int spl_nand_load_image(struct spl_boot_device *bootdev); - /* OneNAND SPL functions */ int spl_onenand_load_image(struct spl_boot_device *bootdev); -- 2.8.0.rc3.226.g39d4020 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 15/27] spl: Convert spl_ymodem_load_image() to use linker list
Add a linker list declaration for this method and remove the explicit switch() code. Signed-off-by: Simon Glass --- Changes in v2: None common/spl/spl.c| 4 common/spl/spl_ymodem.c | 3 ++- include/spl.h | 3 --- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/common/spl/spl.c b/common/spl/spl.c index 2ea7c4e..1d037f5 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -373,10 +373,6 @@ static int spl_load_image(u32 boot_device) return loader->load_image(&bootdev); switch (boot_device) { -#ifdef CONFIG_SPL_YMODEM_SUPPORT - case BOOT_DEVICE_UART: - return spl_ymodem_load_image(&bootdev); -#endif #if defined(CONFIG_SPL_SPI_SUPPORT) || defined(CONFIG_SPL_SPI_FLASH_SUPPORT) case BOOT_DEVICE_SPI: return spl_spi_load_image(&bootdev); diff --git a/common/spl/spl_ymodem.c b/common/spl/spl_ymodem.c index d82b138..168b951 100644 --- a/common/spl/spl_ymodem.c +++ b/common/spl/spl_ymodem.c @@ -68,7 +68,7 @@ static ulong ymodem_read_fit(struct spl_load_info *load, ulong offset, return size; } -int spl_ymodem_load_image(struct spl_boot_device *bootdev) +static int spl_ymodem_load_image(struct spl_boot_device *bootdev) { int size = 0; int err; @@ -132,3 +132,4 @@ end_stream: printf("Loaded %d bytes\n", size); return 0; } +SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_UART, spl_ymodem_load_image); diff --git a/include/spl.h b/include/spl.h index 6338bcf..3605911 100644 --- a/include/spl.h +++ b/include/spl.h @@ -181,9 +181,6 @@ struct spl_image_loader { .load_image = __method, \ } -/* YMODEM SPL functions */ -int spl_ymodem_load_image(struct spl_boot_device *bootdev); - /* SPI SPL functions */ int spl_spi_load_image(struct spl_boot_device *bootdev); -- 2.8.0.rc3.226.g39d4020 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 05/27] spl: Add function comments to spl_start_uboot()
Add some comments to describe this function. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- Changes in v2: None include/spl.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/include/spl.h b/include/spl.h index aebafa3..742e6c2 100644 --- a/include/spl.h +++ b/include/spl.h @@ -110,7 +110,18 @@ int spl_board_ubi_load_image(u32 boot_device); */ void __noreturn jump_to_image_linux(struct spl_image_info *spl_image, void *arg); + +/** + * spl_start_uboot() - Check if SPL should start the kernel or U-Boot + * + * This is called by the various SPL loaders to determine whether the board + * wants to load the kernel or U-Boot. This function should be provided by + * the board. + * + * @return 0 if SPL should start the kernel, 1 if U-Boot must be started + */ int spl_start_uboot(void); + void spl_display_print(void); /* NAND SPL functions */ -- 2.8.0.rc3.226.g39d4020 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 08/27] spl: Add a way to declare an SPL image loader
Add a linker list macro which can be used to declare an SPL image loader. Update spl_load_image() to search available loaders for the correct one. Signed-off-by: Simon Glass --- Changes in v2: - Fix typo - rename spL_find_loader() to spl_ll_find_loader() common/spl/spl.c | 20 include/spl.h| 32 2 files changed, 52 insertions(+) diff --git a/common/spl/spl.c b/common/spl/spl.c index 3716e6a..4c3784c 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -344,12 +344,32 @@ static void announce_boot_device(u32 boot_device) static inline void announce_boot_device(u32 boot_device) { } #endif +static struct spl_image_loader *spl_ll_find_loader(uint boot_device) +{ + struct spl_image_loader *drv = + ll_entry_start(struct spl_image_loader, spl_image_loader); + const int n_ents = + ll_entry_count(struct spl_image_loader, spl_image_loader); + struct spl_image_loader *entry; + + for (entry = drv; entry != drv + n_ents; entry++) { + if (boot_device == entry->boot_device) + return entry; + } + + /* Not found */ + return NULL; +} + static int spl_load_image(u32 boot_device) { struct spl_boot_device bootdev; + struct spl_image_loader *loader = spl_ll_find_loader(boot_device); bootdev.boot_device = boot_device; bootdev.boot_device_name = NULL; + if (loader) + return loader->load_image(&bootdev); switch (boot_device) { #ifdef CONFIG_SPL_RAM_DEVICE diff --git a/include/spl.h b/include/spl.h index 63ca68c..8f19310 100644 --- a/include/spl.h +++ b/include/spl.h @@ -149,6 +149,38 @@ struct spl_boot_device { const char *boot_device_name; }; +/** + * Holds information about a way of loading an SPL image + * + * @boot_device: Boot device that this loader supports + * @load_image: Function to call to load image + */ +struct spl_image_loader { + uint boot_device; + /** +* load_image() - Load an SPL image +* +* @bootdev: describes the boot device to load from +*/ + int (*load_image)(struct spl_boot_device *bootdev); +}; + +/* Declare an SPL image loader */ +#define SPL_LOAD_IMAGE(__name) \ + ll_entry_declare(struct spl_image_loader, __name, spl_image_loader) + +/* + * __priority is the priority of this method, 0 meaning it will be the top + * choice for this device, 9 meaning it is the bottom choice. + * __boot_device is the BOOT_DEVICE_... value + * __method is the load_image function to call + */ +#define SPL_LOAD_IMAGE_METHOD(__priority, __boot_device, __method) \ + SPL_LOAD_IMAGE(__method ## __priority ## __boot_device) = { \ + .boot_device = __boot_device, \ + .load_image = __method, \ + } + /* NAND SPL functions */ int spl_nand_load_image(struct spl_boot_device *bootdev); -- 2.8.0.rc3.226.g39d4020 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 07/27] spl: Convert boot_device into a struct
At present some spl_xxx_load_image() functions take a parameter and some don't. Of those that do, most take an integer but one takes a string. Convert this parameter into a struct so that we can pass all functions the same thing. This will allow us to use a common function signature. Signed-off-by: Simon Glass --- Changes in v2: None arch/arm/mach-sunxi/board.c | 2 +- arch/arm/mach-uniphier/boot-mode/spl_board.c | 2 +- arch/sandbox/cpu/spl.c | 2 +- common/spl/spl.c | 37 ++--- common/spl/spl_mmc.c | 6 ++--- common/spl/spl_nand.c| 2 +- common/spl/spl_net.c | 6 ++--- common/spl/spl_nor.c | 2 +- common/spl/spl_onenand.c | 2 +- common/spl/spl_sata.c| 2 +- common/spl/spl_ubi.c | 6 ++--- common/spl/spl_usb.c | 2 +- common/spl/spl_ymodem.c | 2 +- drivers/mtd/spi/spi_spl_load.c | 2 +- drivers/mtd/spi/sunxi_spi_spl.c | 2 +- include/spl.h| 40 16 files changed, 70 insertions(+), 47 deletions(-) diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c index 6d9518d..8a385a2 100644 --- a/arch/arm/mach-sunxi/board.c +++ b/arch/arm/mach-sunxi/board.c @@ -133,7 +133,7 @@ static int gpio_init(void) return 0; } -int spl_board_load_image(void) +int spl_board_load_image(struct spl_boot_device *bootdev) { debug("Returning to FEL sp=%x, lr=%x\n", fel_stash.sp, fel_stash.lr); return_to_fel(fel_stash.sp, fel_stash.lr); diff --git a/arch/arm/mach-uniphier/boot-mode/spl_board.c b/arch/arm/mach-uniphier/boot-mode/spl_board.c index 63ab41c..4eadc2f 100644 --- a/arch/arm/mach-uniphier/boot-mode/spl_board.c +++ b/arch/arm/mach-uniphier/boot-mode/spl_board.c @@ -65,7 +65,7 @@ int uniphier_rom_get_mmc_funcptr(int (**send_cmd)(u32, u32), return 0; } -int spl_board_load_image(void) +int spl_board_load_image(struct spl_boot_device *bootdev) { int (*send_cmd)(u32 cmd, u32 arg); int (*card_blockaddr)(u32 rca); diff --git a/arch/sandbox/cpu/spl.c b/arch/sandbox/cpu/spl.c index e8349c0..4cee293 100644 --- a/arch/sandbox/cpu/spl.c +++ b/arch/sandbox/cpu/spl.c @@ -38,7 +38,7 @@ void spl_board_announce_boot_device(void) printf("%s\n", fname); } -int spl_board_load_image(void) +int spl_board_load_image(struct spl_boot_device *bootdev) { char fname[256]; int ret; diff --git a/common/spl/spl.c b/common/spl/spl.c index cb96ef3..3716e6a 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -185,7 +185,7 @@ static ulong spl_ram_load_read(struct spl_load_info *load, ulong sector, return count; } -static int spl_ram_load_image(void) +static int spl_ram_load_image(struct spl_boot_device *bootdev) { struct image_header *header; @@ -346,66 +346,71 @@ static inline void announce_boot_device(u32 boot_device) { } static int spl_load_image(u32 boot_device) { + struct spl_boot_device bootdev; + + bootdev.boot_device = boot_device; + bootdev.boot_device_name = NULL; + switch (boot_device) { #ifdef CONFIG_SPL_RAM_DEVICE case BOOT_DEVICE_RAM: - return spl_ram_load_image(); + return spl_ram_load_image(&bootdev); #endif #ifdef CONFIG_SPL_MMC_SUPPORT case BOOT_DEVICE_MMC1: case BOOT_DEVICE_MMC2: case BOOT_DEVICE_MMC2_2: - return spl_mmc_load_image(boot_device); + return spl_mmc_load_image(&bootdev); #endif #ifdef CONFIG_SPL_UBI case BOOT_DEVICE_NAND: case BOOT_DEVICE_ONENAND: - return spl_ubi_load_image(boot_device); + return spl_ubi_load_image(&bootdev); #else #ifdef CONFIG_SPL_NAND_SUPPORT case BOOT_DEVICE_NAND: - return spl_nand_load_image(); + return spl_nand_load_image(&bootdev); #endif #ifdef CONFIG_SPL_ONENAND_SUPPORT case BOOT_DEVICE_ONENAND: - return spl_onenand_load_image(); + return spl_onenand_load_image(&bootdev); #endif #endif #ifdef CONFIG_SPL_NOR_SUPPORT case BOOT_DEVICE_NOR: - return spl_nor_load_image(); + return spl_nor_load_image(&bootdev); #endif #ifdef CONFIG_SPL_YMODEM_SUPPORT case BOOT_DEVICE_UART: - return spl_ymodem_load_image(); + return spl_ymodem_load_image(&bootdev); #endif #if defined(CONFIG_SPL_SPI_SUPPORT) || defined(CONFIG_SPL_SPI_FLASH_SUPPORT) case BOOT_DEVICE_SPI: - return spl_spi_load_image(); + return spl_spi_load_image(&bootdev); #endif #ifdef CONFIG_SPL_ETH_SUPPORT case BOOT_DEVICE_CPGMAC: #ifdef CONFIG_SPL_ETH_DEVICE -
[U-Boot] [PATCH v2 09/27] spl: Convert spl_ram_load_image() to use linker list
Add a linker list declaration for this method and remove the explicit switch() code. Signed-off-by: Simon Glass --- Changes in v2: None common/spl/spl.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/common/spl/spl.c b/common/spl/spl.c index 4c3784c..2bba423 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -215,6 +215,7 @@ static int spl_ram_load_image(struct spl_boot_device *bootdev) return 0; } +SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_RAM, spl_ram_load_image); #endif int spl_init(void) @@ -372,10 +373,6 @@ static int spl_load_image(u32 boot_device) return loader->load_image(&bootdev); switch (boot_device) { -#ifdef CONFIG_SPL_RAM_DEVICE - case BOOT_DEVICE_RAM: - return spl_ram_load_image(&bootdev); -#endif #ifdef CONFIG_SPL_MMC_SUPPORT case BOOT_DEVICE_MMC1: case BOOT_DEVICE_MMC2: -- 2.8.0.rc3.226.g39d4020 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 06/27] spl: Kconfig: Move SPL_DISPLAY_PRINT to Kconfig
Move this option to Kconfig and tidy up existing uses. Also add a function comment to the header file. Signed-off-by: Simon Glass --- Changes in v2: None arch/arm/cpu/armv7/omap4/Kconfig | 3 +++ arch/arm/cpu/armv7/omap5/Kconfig | 3 +++ common/spl/Kconfig| 9 + include/configs/ti_omap4_common.h | 1 - include/configs/ti_omap5_common.h | 1 - include/spl.h | 7 +++ 6 files changed, 22 insertions(+), 2 deletions(-) diff --git a/arch/arm/cpu/armv7/omap4/Kconfig b/arch/arm/cpu/armv7/omap4/Kconfig index c3dc95f..2091dd7 100644 --- a/arch/arm/cpu/armv7/omap4/Kconfig +++ b/arch/arm/cpu/armv7/omap4/Kconfig @@ -33,6 +33,9 @@ config SPL_POWER_SUPPORT config SPL_SERIAL_SUPPORT default y +config SPL_DISPLAY_PRINT + default y + choice prompt "OMAP4 board select" optional diff --git a/arch/arm/cpu/armv7/omap5/Kconfig b/arch/arm/cpu/armv7/omap5/Kconfig index ef68c53..caa420a 100644 --- a/arch/arm/cpu/armv7/omap5/Kconfig +++ b/arch/arm/cpu/armv7/omap5/Kconfig @@ -33,6 +33,9 @@ config SPL_POWER_SUPPORT config SPL_SERIAL_SUPPORT default y +config SPL_DISPLAY_PRINT + default y + choice prompt "OMAP5 board select" optional diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 2a8ddbc..84670b1 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -61,6 +61,15 @@ config SPL_SEPARATE_BSS location is used. Normally we put the device tree at the end of BSS but with this option enabled, it goes at _image_binary_end. +config SPL_DISPLAY_PRINT + depends on SPL + bool "Display a board-specific message in SPL" + help + If this option is enabled, U-Boot will call the function + spl_display_print() immediately after displaying the SPL console + banner ("U-Boot SPL ..."). This function should be provided by + the board. + config TPL bool depends on SPL && SUPPORT_TPL diff --git a/include/configs/ti_omap4_common.h b/include/configs/ti_omap4_common.h index 4115c78..8502c8a 100644 --- a/include/configs/ti_omap4_common.h +++ b/include/configs/ti_omap4_common.h @@ -151,7 +151,6 @@ * So moving TEXT_BASE down to non-HS limit. */ #define CONFIG_SPL_TEXT_BASE 0x4030 -#define CONFIG_SPL_DISPLAY_PRINT #define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds" #define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_SDRAM_BASE + \ (128 << 20)) diff --git a/include/configs/ti_omap5_common.h b/include/configs/ti_omap5_common.h index cbdf0bc..5623a37 100644 --- a/include/configs/ti_omap5_common.h +++ b/include/configs/ti_omap5_common.h @@ -154,7 +154,6 @@ #define CONFIG_SPL_TEXT_BASE 0x4030 #endif -#define CONFIG_SPL_DISPLAY_PRINT #define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds" #define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_SDRAM_BASE + \ (128 << 20)) diff --git a/include/spl.h b/include/spl.h index 742e6c2..b6990b4 100644 --- a/include/spl.h +++ b/include/spl.h @@ -122,6 +122,13 @@ void __noreturn jump_to_image_linux(struct spl_image_info *spl_image, */ int spl_start_uboot(void); +/** + * spl_display_print() - Display a board-specific message in SPL + * + * If CONFIG_SPL_DISPLAY_PRINT is enabled, U-Boot will call this function + * immediately after displaying the SPL console banner ("U-Boot SPL ..."). + * This function should be provided by the board. + */ void spl_display_print(void); /* NAND SPL functions */ -- 2.8.0.rc3.226.g39d4020 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 02/27] spl: Add a parameter to spl_set_header_raw_uboot()
Rather than act on the global variable, pass the required struct in as a parameter. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- Changes in v2: None common/spl/spl.c | 14 +++--- common/spl/spl_nand.c | 2 +- include/spl.h | 13 - 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/common/spl/spl.c b/common/spl/spl.c index e14ec80..1a4a5d8 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -82,13 +82,13 @@ __weak void spl_board_prepare_for_boot(void) /* Nothing to do! */ } -void spl_set_header_raw_uboot(void) +void spl_set_header_raw_uboot(struct spl_image_info *spl_image) { - spl_image.size = CONFIG_SYS_MONITOR_LEN; - spl_image.entry_point = CONFIG_SYS_UBOOT_START; - spl_image.load_addr = CONFIG_SYS_TEXT_BASE; - spl_image.os = IH_OS_U_BOOT; - spl_image.name = "U-Boot"; + spl_image->size = CONFIG_SYS_MONITOR_LEN; + spl_image->entry_point = CONFIG_SYS_UBOOT_START; + spl_image->load_addr = CONFIG_SYS_TEXT_BASE; + spl_image->os = IH_OS_U_BOOT; + spl_image->name = "U-Boot"; } int spl_parse_image_header(const struct image_header *header) @@ -153,7 +153,7 @@ int spl_parse_image_header(const struct image_header *header) /* Signature not found - assume u-boot.bin */ debug("mkimage signature not found - ih_magic = %x\n", header->ih_magic); - spl_set_header_raw_uboot(); + spl_set_header_raw_uboot(&spl_image); #endif } return 0; diff --git a/common/spl/spl_nand.c b/common/spl/spl_nand.c index 0e35e0f..8f9bd5da 100644 --- a/common/spl/spl_nand.c +++ b/common/spl/spl_nand.c @@ -20,7 +20,7 @@ int spl_nand_load_image(void) nand_spl_load_image(CONFIG_SYS_NAND_U_BOOT_OFFS, CONFIG_SYS_NAND_U_BOOT_SIZE, (void *)CONFIG_SYS_NAND_U_BOOT_DST); - spl_set_header_raw_uboot(); + spl_set_header_raw_uboot(&spl_image); nand_deselect(); return 0; diff --git a/include/spl.h b/include/spl.h index 6c397ca..ce449ff 100644 --- a/include/spl.h +++ b/include/spl.h @@ -67,7 +67,18 @@ extern struct spl_image_info spl_image; void preloader_console_init(void); u32 spl_boot_device(void); u32 spl_boot_mode(const u32 boot_device); -void spl_set_header_raw_uboot(void); + +/** + * spl_set_header_raw_uboot() - Set up a standard SPL image structure + * + * This sets up the given spl_image which the standard values obtained from + * config options: CONFIG_SYS_MONITOR_LEN, CONFIG_SYS_UBOOT_START, + * CONFIG_SYS_TEXT_BASE. + * + * @spl_image: Image to set up + */ +void spl_set_header_raw_uboot(struct spl_image_info *spl_image); + int spl_parse_image_header(const struct image_header *header); void spl_board_prepare_for_linux(void); void spl_board_prepare_for_boot(void); -- 2.8.0.rc3.226.g39d4020 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 03/27] spl: Add a parameter to spl_parse_image_header()
Instead of using the global spl_image variable, pass the required struct in as an argument. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- Changes in v2: None arch/arm/mach-uniphier/boot-mode/spl_board.c | 2 +- common/spl/spl.c | 41 ++-- common/spl/spl_ext.c | 2 +- common/spl/spl_fat.c | 2 +- common/spl/spl_mmc.c | 2 +- common/spl/spl_nand.c| 4 +-- common/spl/spl_net.c | 3 +- common/spl/spl_nor.c | 4 +-- common/spl/spl_onenand.c | 2 +- common/spl/spl_ubi.c | 4 +-- common/spl/spl_ymodem.c | 5 ++-- drivers/mtd/spi/spi_spl_load.c | 4 +-- drivers/mtd/spi/sunxi_spi_spl.c | 2 +- include/spl.h| 20 -- 14 files changed, 58 insertions(+), 39 deletions(-) diff --git a/arch/arm/mach-uniphier/boot-mode/spl_board.c b/arch/arm/mach-uniphier/boot-mode/spl_board.c index 86292b6..63ab41c 100644 --- a/arch/arm/mach-uniphier/boot-mode/spl_board.c +++ b/arch/arm/mach-uniphier/boot-mode/spl_board.c @@ -113,7 +113,7 @@ int spl_board_load_image(void) return ret; } - ret = spl_parse_image_header((void *)CONFIG_SYS_TEXT_BASE); + ret = spl_parse_image_header(&spl_image, (void *)CONFIG_SYS_TEXT_BASE); if (ret) return ret; diff --git a/common/spl/spl.c b/common/spl/spl.c index 1a4a5d8..6195c06 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -91,33 +91,34 @@ void spl_set_header_raw_uboot(struct spl_image_info *spl_image) spl_image->name = "U-Boot"; } -int spl_parse_image_header(const struct image_header *header) +int spl_parse_image_header(struct spl_image_info *spl_image, + const struct image_header *header) { u32 header_size = sizeof(struct image_header); if (image_get_magic(header) == IH_MAGIC) { - if (spl_image.flags & SPL_COPY_PAYLOAD_ONLY) { + if (spl_image->flags & SPL_COPY_PAYLOAD_ONLY) { /* * On some system (e.g. powerpc), the load-address and * entry-point is located at address 0. We can't load * to 0-0x40. So skip header in this case. */ - spl_image.load_addr = image_get_load(header); - spl_image.entry_point = image_get_ep(header); - spl_image.size = image_get_data_size(header); + spl_image->load_addr = image_get_load(header); + spl_image->entry_point = image_get_ep(header); + spl_image->size = image_get_data_size(header); } else { - spl_image.entry_point = image_get_load(header); + spl_image->entry_point = image_get_load(header); /* Load including the header */ - spl_image.load_addr = spl_image.entry_point - + spl_image->load_addr = spl_image->entry_point - header_size; - spl_image.size = image_get_data_size(header) + + spl_image->size = image_get_data_size(header) + header_size; } - spl_image.os = image_get_os(header); - spl_image.name = image_get_name(header); + spl_image->os = image_get_os(header); + spl_image->name = image_get_name(header); debug("spl: payload image: %.*s load addr: 0x%x size: %d\n", - (int)sizeof(spl_image.name), spl_image.name, - spl_image.load_addr, spl_image.size); + (int)sizeof(spl_image->name), spl_image->name, + spl_image->load_addr, spl_image->size); } else { #ifdef CONFIG_SPL_PANIC_ON_RAW_IMAGE /* @@ -135,13 +136,13 @@ int spl_parse_image_header(const struct image_header *header) ulong start, end; if (!bootz_setup((ulong)header, &start, &end)) { - spl_image.name = "Linux"; - spl_image.os = IH_OS_LINUX; - spl_image.load_addr = CONFIG_SYS_LOAD_ADDR; - spl_image.entry_point = CONFIG_SYS_LOAD_ADDR; - spl_image.size = end - start; + spl_image->name = "Linux"; + spl_image->os = IH_OS_LINUX; + spl_image->load_addr = CONFIG_SYS_LOAD_ADDR; + spl_image->entry_point = CONFIG_SYS_LOAD_ADDR; + spl_image->size = end - start; debug("spl:
[U-Boot] [PATCH v2 00/27] spl: Use linker list and parameters for SPL image loading
At present the SPL code uses a global spl_image variable which is shared amongst lots of files, some in common/spl and some elsewhere. There is no need for this to be global, and in fact a parameter makes it easier to understand what information the functions act on. It also reduces the BSS use in the SPL (at the expense of stack) which is useful on boards which don't have BSS available early on. There are many global functions for loading images from each boot device type, like spl_mmc_load_image() and spl_spi_load_image(). Mostly these take the same parameters (none or a u32). There are various rules for compiling in calls to these functions and in some cases somewhat different rules for compiling in the functions themselves. For example, spl_spi_load_image() is called if either of CONFIG_SPL_SPI_SUPPORT or CONFIG_SPL_SPI__FLASHSUPPORT is enabled, but included in the image if CONFIG_SPL_SPI_LOAD is enabled. There is work in progress to look at that problem (Andrew F. Davis has sent some patches [1]), and this series does not address it. But even with that fixed its seems better to use a linker list and a consistent function signature for loading images. This series converts spl_image into a parameter and moves the SPL load functions into a linker list, where each method is declared in the file that provides it. The existing dispatching code is dropped. There is a priorty value attached to each loader which should allow the existing ordering to be maintained. Code size is about 20 bytes larger on average which I think is acceptable. The BSS size drops by about 64 bytes, but really this just transfers to the stack. There is an obvious follow-on from this, to move boot_name_table[] into the same linker list struct (i.e. add a name field to struct spl_image_loader). The complication here is that we don't want naming if CONFIG_SPL_LIBCOMMON_SUPPORT is not enabled, since it bloats the code. In addition I think that common/spl/spl.c can be tidied up a little. Finally, my reading of the load functions is that they could do with some rationalisation once we have a way to init any device without subsystem-specific function calls. For example, spl_sata.c and spl_usb.c contain very similar code but for the init methods. [1] http://patchwork.ozlabs.org/patch/662945/ Changes in v2: - Fix typo - rename spL_find_loader() to spl_ll_find_loader() - Add a memset() to clear the spl_image data Simon Glass (27): spl: Move spl_board_load_image() into a generic header spl: Add a parameter to spl_set_header_raw_uboot() spl: Add a parameter to spl_parse_image_header() spl: Add a parameter to jump_to_image_linux() spl: Add function comments to spl_start_uboot() spl: Kconfig: Move SPL_DISPLAY_PRINT to Kconfig spl: Convert boot_device into a struct spl: Add a way to declare an SPL image loader spl: Convert spl_ram_load_image() to use linker list spl: Convert spl_mmc_load_image() to use linker list spl: Convert spl_ubi_load_image() to use linker list spl: Convert spl_nand_load_image() to use linker list spl: Convert spl_onenand_load_image() to use linker list spl: Convert spl_nor_load_image() to use linker list spl: Convert spl_ymodem_load_image() to use linker list spl: Convert spl_usb_load_image() to use linker list spl: Convert spl_sata_load_image() to use linker list spl: spi: Move the generic SPI loader into common/spl spl: Convert spl_spi_load_image() to use linker list spi: Move freescale-specific code into a private header spl: Convert spl_net_load_image() to use linker list spl: Convert spl_board_load_image() to use linker list spl: Pass spl_image as a parameter to load_image() methods spl: Update ext functions to take an spl_image parameter spl: Update fat functions to take an spl_image parameter spl: Update spl_load_simple_fit() to take an spl_image param spl: Make spl_boot_list a local variable arch/arm/cpu/armv7/omap4/Kconfig | 3 + arch/arm/cpu/armv7/omap5/Kconfig | 3 + arch/arm/include/asm/spl.h | 9 -- arch/arm/lib/spl.c | 4 +- arch/arm/mach-sunxi/board.c| 6 +- arch/arm/mach-uniphier/boot-mode/spl_board.c | 10 +- arch/microblaze/cpu/spl.c | 4 +- arch/powerpc/lib/spl.c | 4 +- arch/sandbox/cpu/spl.c | 4 +- arch/sandbox/include/asm/spl.h | 8 - board/Arcturus/ucp1020/spl.c | 2 - board/freescale/common/spl.h | 13 ++ board/freescale/p1010rdb/spl.c | 3 +- board/freescale/p1022ds/spl.c | 3 +- board/freescale/p1_p2_rdb_pc/spl.c | 3 +- board/freescale/t102xqds/spl.c | 7 +- board/freescale/t102xrdb/spl.c | 7 +- board/freescale/t104xrdb/spl.c
[U-Boot] [PATCH v2 01/27] spl: Move spl_board_load_image() into a generic header
At present this is only used on ARM and sandbox, but it is just as applicable to other architectures. Move the function prototype into the generic SPL header. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- Changes in v2: None arch/arm/include/asm/spl.h | 9 - arch/sandbox/include/asm/spl.h | 8 include/spl.h | 8 3 files changed, 8 insertions(+), 17 deletions(-) diff --git a/arch/arm/include/asm/spl.h b/arch/arm/include/asm/spl.h index 6f312d6..a0bda28 100644 --- a/arch/arm/include/asm/spl.h +++ b/arch/arm/include/asm/spl.h @@ -33,15 +33,6 @@ enum { }; #endif -/** - * Board specific load method for boards that have a special way of loading - * U-Boot, which does not fit with the existing SPL code. - * - * @return 0 on success, negative errno value on failure. - */ - -int spl_board_load_image(void); - /* Linker symbols. */ extern char __bss_start[], __bss_end[]; diff --git a/arch/sandbox/include/asm/spl.h b/arch/sandbox/include/asm/spl.h index 59f2401..eb3cb56 100644 --- a/arch/sandbox/include/asm/spl.h +++ b/arch/sandbox/include/asm/spl.h @@ -8,14 +8,6 @@ #define CONFIG_SPL_BOARD_LOAD_IMAGE -/** - * Board-specific load method for boards that have a special way of loading - * U-Boot, which does not fit with the existing SPL code. - * - * @return 0 on success, negative errno value on failure. - */ -int spl_board_load_image(void); - enum { BOOT_DEVICE_BOARD, }; diff --git a/include/spl.h b/include/spl.h index 8afa085..6c397ca 100644 --- a/include/spl.h +++ b/include/spl.h @@ -144,4 +144,12 @@ void spl_board_init(void); */ bool spl_was_boot_source(void); +/** + * Board-specific load method for boards that have a special way of loading + * U-Boot, which does not fit with the existing SPL code. + * + * @return 0 on success, negative errno value on failure. + */ +int spl_board_load_image(void); + #endif -- 2.8.0.rc3.226.g39d4020 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 04/27] spl: Add a parameter to jump_to_image_linux()
Instead of using the global spl_image variable, pass the required struct in as an argument. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- Changes in v2: None arch/arm/lib/spl.c| 4 ++-- arch/microblaze/cpu/spl.c | 4 ++-- arch/powerpc/lib/spl.c| 4 ++-- common/spl/spl.c | 3 ++- include/spl.h | 12 +++- 5 files changed, 19 insertions(+), 8 deletions(-) diff --git a/arch/arm/lib/spl.c b/arch/arm/lib/spl.c index 3587ad6..e606d47 100644 --- a/arch/arm/lib/spl.c +++ b/arch/arm/lib/spl.c @@ -47,7 +47,7 @@ void __weak board_init_f(ulong dummy) * arg: Pointer to paramter image in RAM */ #ifdef CONFIG_SPL_OS_BOOT -void __noreturn jump_to_image_linux(void *arg) +void __noreturn jump_to_image_linux(struct spl_image_info *spl_image, void *arg) { unsigned long machid = 0x; #ifdef CONFIG_MACH_TYPE @@ -58,7 +58,7 @@ void __noreturn jump_to_image_linux(void *arg) typedef void (*image_entry_arg_t)(int, int, void *) __attribute__ ((noreturn)); image_entry_arg_t image_entry = - (image_entry_arg_t)(uintptr_t) spl_image.entry_point; + (image_entry_arg_t)(uintptr_t) spl_image->entry_point; cleanup_before_linux(); image_entry(0, machid, arg); } diff --git a/arch/microblaze/cpu/spl.c b/arch/microblaze/cpu/spl.c index f4bb091..8e6d926 100644 --- a/arch/microblaze/cpu/spl.c +++ b/arch/microblaze/cpu/spl.c @@ -29,13 +29,13 @@ void spl_board_init(void) } #ifdef CONFIG_SPL_OS_BOOT -void __noreturn jump_to_image_linux(void *arg) +void __noreturn jump_to_image_linux(struct spl_image_info *spl_image, void *arg) { debug("Entering kernel arg pointer: 0x%p\n", arg); typedef void (*image_entry_arg_t)(char *, ulong, ulong) __attribute__ ((noreturn)); image_entry_arg_t image_entry = - (image_entry_arg_t)spl_image.entry_point; + (image_entry_arg_t)spl_image->entry_point; image_entry(NULL, 0, (ulong)arg); } diff --git a/arch/powerpc/lib/spl.c b/arch/powerpc/lib/spl.c index 0e486cc..080b978 100644 --- a/arch/powerpc/lib/spl.c +++ b/arch/powerpc/lib/spl.c @@ -17,14 +17,14 @@ DECLARE_GLOBAL_DATA_PTR; * arg: Pointer to paramter image in RAM */ #ifdef CONFIG_SPL_OS_BOOT -void __noreturn jump_to_image_linux(void *arg) +void __noreturn jump_to_image_linux(struct spl_image_info *spl_image, void *arg) { debug("Entering kernel arg pointer: 0x%p\n", arg); typedef void (*image_entry_arg_t)(void *, ulong r4, ulong r5, ulong r6, ulong r7, ulong r8, ulong r9) __attribute__ ((noreturn)); image_entry_arg_t image_entry = - (image_entry_arg_t)spl_image.entry_point; + (image_entry_arg_t)spl_image->entry_point; image_entry(arg, 0, 0, EPAPR_MAGIC, CONFIG_SYS_BOOTMAPSZ, 0, 0); } diff --git a/common/spl/spl.c b/common/spl/spl.c index 6195c06..cb96ef3 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -466,7 +466,8 @@ void board_init_r(gd_t *dummy1, ulong dummy2) case IH_OS_LINUX: debug("Jumping to Linux\n"); spl_board_prepare_for_linux(); - jump_to_image_linux((void *)CONFIG_SYS_SPL_ARGS_ADDR); + jump_to_image_linux(&spl_image, + (void *)CONFIG_SYS_SPL_ARGS_ADDR); #endif default: debug("Unsupported OS image.. Jumping nevertheless..\n"); diff --git a/include/spl.h b/include/spl.h index 8147e6d..aebafa3 100644 --- a/include/spl.h +++ b/include/spl.h @@ -99,7 +99,17 @@ int spl_parse_image_header(struct spl_image_info *spl_image, void spl_board_prepare_for_linux(void); void spl_board_prepare_for_boot(void); int spl_board_ubi_load_image(u32 boot_device); -void __noreturn jump_to_image_linux(void *arg); + +/** + * jump_to_image_linux() - Jump to a Linux kernel from SPL + * + * This jumps into a Linux kernel using the information in @spl_image. + * + * @spl_image: Image description to set up + * @arg: Argument to pass to Linux (typically a device tree pointer) + */ +void __noreturn jump_to_image_linux(struct spl_image_info *spl_image, + void *arg); int spl_start_uboot(void); void spl_display_print(void); -- 2.8.0.rc3.226.g39d4020 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 28/29] Convert CONFIG_USB_KEYBOARD to Kconfig
This converts the following to Kconfig: CONFIG_USB_KEYBOARD Signed-off-by: Simon Glass --- Changes in v2: - Add new patch to convert CONFIG_USB_KEYBOARD to Kconfig configs/Cyrus_P5020_defconfig | 1 + configs/Cyrus_P5040_defconfig | 1 + configs/MIP405_defconfig| 1 + configs/PIP405_defconfig| 1 + configs/VCMA9_defconfig | 1 + configs/at91rm9200ek_defconfig | 1 + configs/at91rm9200ek_ram_defconfig | 1 + configs/bayleybay_defconfig | 1 + configs/cgtqmx6eval_defconfig | 1 + configs/chromebook_link_defconfig | 1 + configs/chromebook_samus_defconfig | 1 + configs/chromebox_panther_defconfig | 1 + configs/conga-qeval20-qa3-e3845-internal-uart_defconfig | 1 + configs/conga-qeval20-qa3-e3845_defconfig | 1 + configs/coreboot-x86_defconfig | 1 + configs/cougarcanyon2_defconfig | 1 + configs/crownbay_defconfig | 1 + configs/dfi-bt700-q7x-151_defconfig | 1 + configs/dms-ba16-1g_defconfig | 1 + configs/dms-ba16_defconfig | 1 + configs/efi-x86_defconfig | 1 + configs/galileo_defconfig | 1 + configs/gwventana_defconfig | 1 + configs/minnowmax_defconfig | 1 + configs/mx6cuboxi_defconfig | 1 + configs/mx6qsabrelite_defconfig | 1 + configs/nitrogen6dl2g_defconfig | 1 + configs/nitrogen6dl_defconfig | 1 + configs/nitrogen6q2g_defconfig | 1 + configs/nitrogen6q_defconfig| 1 + configs/nitrogen6s1g_defconfig | 1 + configs/nitrogen6s_defconfig| 1 + configs/novena_defconfig| 1 + configs/qemu-x86_defconfig | 1 + configs/qemu-x86_efi_payload32_defconfig| 1 + configs/qemu-x86_efi_payload64_defconfig| 1 + configs/rpi_2_defconfig | 1 + configs/rpi_3_32b_defconfig | 1 + configs/rpi_3_defconfig | 1 + configs/rpi_defconfig | 1 + configs/seaboard_defconfig | 1 + configs/smdk2410_defconfig | 1 + configs/som-db5800-som-6867_defconfig | 1 + configs/tbs2910_defconfig | 1 + configs/theadorable-x86-dfi-bt700_defconfig | 1 + configs/ventana_defconfig | 1 + include/configs/MIP405.h| 1 - include/configs/MPC8610HPCD.h | 1 - include/configs/MPC8641HPCN.h | 1 - include/configs/PIP405.h| 1 - include/configs/VCMA9.h | 1 - include/configs/advantech_dms-ba16.h| 1 - include/configs/at91rm9200ek.h | 1 - include/configs/cgtqmx6eval.h | 1 - include/configs/cyrus.h | 1 - include/configs/ge_bx50v3.h | 1 - include/configs/gw_ventana.h| 1 - include/configs/mx6cuboxi.h | 1 - include/configs/nitrogen6x.h| 1 - include/configs/novena.h| 1 - include/configs/rpi.h | 1 - include/configs/seaboard.h | 1 - include/configs/smdk2410.h | 1 - include/configs/tbs2910.h | 1 - include/configs/ventana.h | 1 - include/configs/x86-common.h| 1 - 66 files changed, 46 insertions(+), 20 deletions(-) diff --git a/configs/Cyrus_P5020_defconfig b/configs/Cyrus_P5020_defconfig index 9dd8742..53342f2 100644 --- a/configs/Cyrus_P5020_defconfig +++ b/configs/Cyrus_P5020_defconfig @@ -27,4 +27,5 @@ CONFIG_SYS_NS16550=y CONFIG_FSL_ESPI=y CONFIG_USB=y CONFIG_USB_STORAGE=y +CONFIG_USB_KEYBOARD=y CONFIG_OF_LIBFDT=y diff --git a/configs/Cyrus_P5040_defconfig b/configs/Cyrus_P5040_defconfig index ff36be4..5929c08 100644 --- a/configs/Cyrus_P5040_defconfig +++ b/configs/Cyrus_P5040_defconfig @@ -27,4 +27,5 @@ CONFIG_SYS_NS16550=y CONFIG_FSL_ESPI=y CONFIG_USB=y CONFIG_USB_STORAGE=y +CONFIG_USB_KEYBOARD=y CONFIG_
[U-Boot] [PATCH v2 27/29] Convert CONFIG_SYS_CONSOLE_INFO_QUIET to Kconfig
This converts the following to Kconfig: CONFIG_SYS_CONSOLE_INFO_QUIET Signed-off-by: Simon Glass --- Changes in v2: - Make CONFIG_SYS_CONSOLE_INFO_QUIET the default if !CONFIG_MUX README | 3 --- common/Kconfig | 9 + configs/MIP405T_defconfig | 1 + configs/MIP405_defconfig| 1 + configs/PIP405_defconfig| 1 + configs/bayleybay_defconfig | 1 + configs/brppt1_mmc_defconfig| 1 + configs/brppt1_nand_defconfig | 1 + configs/brppt1_spi_defconfig| 1 + configs/brxre1_defconfig| 1 + configs/chromebook_link_defconfig | 1 + configs/chromebook_samus_defconfig | 1 + configs/chromebox_panther_defconfig | 1 + configs/conga-qeval20-qa3-e3845-internal-uart_defconfig | 1 + configs/conga-qeval20-qa3-e3845_defconfig | 1 + configs/coreboot-x86_defconfig | 1 + configs/cougarcanyon2_defconfig | 1 + configs/crownbay_defconfig | 1 + configs/dfi-bt700-q7x-151_defconfig | 1 + configs/ea20_defconfig | 1 + configs/efi-x86_defconfig | 1 + configs/galileo_defconfig | 1 + configs/icon_defconfig | 1 + configs/lwmon5_defconfig| 1 + configs/minnowmax_defconfig | 1 + configs/pxm2_defconfig | 1 + configs/qemu-x86_defconfig | 1 + configs/qemu-x86_efi_payload32_defconfig| 1 + configs/qemu-x86_efi_payload64_defconfig| 1 + configs/rpi_2_defconfig | 1 - configs/rpi_3_32b_defconfig | 1 - configs/rpi_3_defconfig | 1 - configs/rpi_defconfig | 1 - configs/rut_defconfig | 1 + configs/som-db5800-som-6867_defconfig | 1 + configs/theadorable-x86-dfi-bt700_defconfig | 1 + configs/theadorable_debug_defconfig | 1 + configs/theadorable_defconfig | 1 + include/configs/10m50_devboard.h| 1 - include/configs/3c120_devboard.h| 1 - include/configs/CPCI2DP.h | 2 -- include/configs/CPCI4052.h | 2 -- include/configs/M5249EVB.h | 1 - include/configs/MIP405.h| 1 - include/configs/MigoR.h | 2 -- include/configs/PIP405.h| 1 - include/configs/PLU405.h| 2 -- include/configs/PMC405DE.h | 1 - include/configs/VOM405.h| 2 -- include/configs/a3m071.h| 2 -- include/configs/amcc-common.h | 1 - include/configs/amcore.h| 1 - include/configs/ap325rxa.h | 1 - include/configs/ap_sh4a_4a.h| 1 - include/configs/armadillo-800eva.h | 1 - include/configs/bur_cfg_common.h| 1 - include/configs/clearfog.h | 1 - include/configs/db-88f6720.h| 1 - include/configs/db-88f6820-amc.h| 1 - include/configs/db-88f6820-gp.h | 1 - include/configs/db-mv784mp-gp.h | 1 - include/configs/ea20.h | 1 - include/configs/ecovec.h| 1 - include/configs/hrcon.h | 2 -- include/configs/kzm9g.h | 1 - include/configs/lsxl.h | 1 - include/configs/lwmon5.h| 2 -- include/configs/maxbcm.h| 1 - include/configs/ms7722se.h | 1 - include/configs/odroid.h| 1 - include/configs/openrisc-generic.h | 1 - include/configs/origen.h| 1 - include/configs/r0p7734.h | 1 - include/configs/rcar-gen2-common.h | 1 - include/configs/rcar-gen3-common.h | 1 - include/configs/s5pc210_universal.h | 1 - inclu
[U-Boot] [PATCH v2 26/29] Convert CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE to Kconfig
This converts the following to Kconfig: CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- Changes in v2: None README | 3 --- common/Kconfig | 9 + configs/MIP405T_defconfig | 1 + configs/MIP405_defconfig | 1 + configs/PIP405_defconfig | 1 + configs/aristainetos2_defconfig| 1 + configs/aristainetos2b_defconfig | 1 + configs/aristainetos_defconfig | 1 + configs/brppt1_mmc_defconfig | 1 + configs/brppt1_nand_defconfig | 1 + configs/brppt1_spi_defconfig | 1 + configs/brxre1_defconfig | 1 + configs/cgtqmx6eval_defconfig | 1 + configs/dms-ba16-1g_defconfig | 1 + configs/dms-ba16_defconfig | 1 + configs/ea20_defconfig | 1 + configs/ge_b450v3_defconfig| 1 + configs/ge_b650v3_defconfig| 1 + configs/ge_b850v3_defconfig| 1 + configs/marsboard_defconfig| 1 + configs/mx51evk_defconfig | 1 + configs/mx53loco_defconfig | 1 + configs/mx6dlsabreauto_defconfig | 1 + configs/mx6dlsabresd_defconfig | 1 + configs/mx6qpsabreauto_defconfig | 1 + configs/mx6qsabreauto_defconfig| 1 + configs/mx6qsabrelite_defconfig| 1 + configs/mx6qsabresd_defconfig | 1 + configs/mx6sabresd_spl_defconfig | 1 + configs/nitrogen6dl2g_defconfig| 1 + configs/nitrogen6dl_defconfig | 1 + configs/nitrogen6q2g_defconfig | 1 + configs/nitrogen6q_defconfig | 1 + configs/nitrogen6s1g_defconfig | 1 + configs/nitrogen6s_defconfig | 1 + configs/riotboard_defconfig| 1 + configs/socfpga_arria5_defconfig | 1 + configs/socfpga_cyclone5_defconfig | 1 + configs/socfpga_de0_nano_soc_defconfig | 1 + configs/socfpga_is1_defconfig | 1 + configs/socfpga_mcvevk_defconfig | 1 + configs/socfpga_sockit_defconfig | 1 + configs/socfpga_socrates_defconfig | 1 + configs/socfpga_sr1500_defconfig | 1 + configs/socfpga_vining_fpga_defconfig | 1 + configs/wandboard_defconfig| 1 + include/configs/MIP405.h | 1 - include/configs/MigoR.h| 1 - include/configs/PIP405.h | 1 - include/configs/advantech_dms-ba16.h | 1 - include/configs/ap325rxa.h | 1 - include/configs/ap_sh4a_4a.h | 1 - include/configs/aristainetos-common.h | 1 - include/configs/armadillo-800eva.h | 1 - include/configs/bur_cfg_common.h | 1 - include/configs/cgtqmx6eval.h | 1 - include/configs/ea20.h | 1 - include/configs/ecovec.h | 1 - include/configs/embestmx6boards.h | 1 - include/configs/ge_bx50v3.h| 2 -- include/configs/kzm9g.h| 1 - include/configs/ms7722se.h | 1 - include/configs/mx51evk.h | 1 - include/configs/mx53loco.h | 1 - include/configs/mx6sabre_common.h | 1 - include/configs/nitrogen6x.h | 1 - include/configs/r0p7734.h | 1 - include/configs/rcar-gen2-common.h | 1 - include/configs/rcar-gen3-common.h | 1 - include/configs/sh7752evb.h| 1 - include/configs/sh7753evb.h| 1 - include/configs/sh7757lcr.h| 1 - include/configs/sh7785lcr.h| 1 - include/configs/socfpga_common.h | 1 - include/configs/wandboard.h| 1 - scripts/config_whitelist.txt | 1 - 76 files changed, 53 insertions(+), 34 deletions(-) diff --git a/README b/README index f2e0809..752c8cb 100644 --- a/README +++ b/README @@ -3585,9 +3585,6 @@ Configuration Settings: - CONFIG_SYS_CONSOLE_INFO_QUIET Suppress display of console information at boot. -- CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE - Enable the call to overwrite_console(). - - CONFIG_SYS_MEMTEST_START, CONFIG_SYS_MEMTEST_END: Begin and End addresses of the area used by the simple memory test. diff --git a/common/Kconfig b/common/Kconfig index e02e797..b64e797 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -308,6 +308,15 @@ config SYS_CONSOLE_IS_IN_ENV environment variables can be updated after boot to change the input/output devices. +config SYS_CONSOLE_OVERWRITE_ROUTINE + bool "Allow board control over console overwriting" + help + If this is enabled, and the board-specific function + overwrite_console() returns 1, the stdin, stderr and stdout are + switched to the serial port, else the settings in the environment + are used. If this is not enabled, the console will not be switched + to serial. + config SYS_CONSOLE_ENV_OVERWRITE bool "Update environment variables during console init"
[U-Boot] [PATCH v2 29/29] Convert CONFIG_SYS_STDIO_DEREGISTER to Kconfig
This converts the following to Kconfig: CONFIG_SYS_STDIO_DEREGISTER This option should never be enabled in SPL, so use CONFIG_IS_ENABLED(SYS_STDIO_DEREGISTER) when checking the option. Signed-off-by: Simon Glass --- Changes in v2: - Make CONFIG_SYS_STDIO_DEREGISTER the default if USB_KEYBOARD - Drop Kconfig changes common/Kconfig | 9 + common/stdio.c | 6 +++--- common/usb_kbd.c| 2 +- configs/MPC8610HPCD_defconfig | 1 + configs/MPC8641HPCN_36BIT_defconfig | 1 + configs/MPC8641HPCN_defconfig | 1 + drivers/serial/serial-uclass.c | 2 +- include/configs/MIP405.h| 1 - include/configs/MPC8610HPCD.h | 1 - include/configs/MPC8641HPCN.h | 1 - include/configs/PIP405.h| 1 - include/configs/VCMA9.h | 1 - include/configs/cm_fx6.h| 1 - include/configs/cyrus.h | 1 - include/configs/gr_ep2s60.h | 1 - include/configs/novena.h| 1 - include/configs/rpi.h | 1 - include/configs/sandbox.h | 2 -- include/configs/sunxi-common.h | 1 - include/configs/tbs2910.h | 1 - include/configs/tegra-common.h | 4 include/configs/x86-common.h| 2 -- include/stdio_dev.h | 2 +- scripts/config_whitelist.txt| 1 - 24 files changed, 18 insertions(+), 27 deletions(-) diff --git a/common/Kconfig b/common/Kconfig index 4d27f09..5615e39 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -335,6 +335,15 @@ config SYS_CONSOLE_INFO_QUIET Enable this option to supress this output. It can be obtained by calling stdio_print_current_devices() from board code. +config SYS_STDIO_DEREGISTER + bool "Allow deregistering stdio devices" + default y if USB_KEYBOARD + help + Generally there is no need to deregister stdio devices since they + are never deactivated. But if a stdio device is used which can be + removed (for example a USB keyboard) then this option can be + enabled to ensure this is handled correctly. + endmenu config SYS_NO_FLASH diff --git a/common/stdio.c b/common/stdio.c index f99cfe7..c849a9a 100644 --- a/common/stdio.c +++ b/common/stdio.c @@ -37,7 +37,7 @@ char *stdio_names[MAX_FILES] = { "stdin", "stdout", "stderr" }; #defineCONFIG_SYS_DEVICE_NULLDEV 1 #endif -#ifdef CONFIG_SYS_STDIO_DEREGISTER +#if CONFIG_IS_ENABLED(SYS_STDIO_DEREGISTER) #defineCONFIG_SYS_DEVICE_NULLDEV 1 #endif @@ -177,7 +177,7 @@ int stdio_register(struct stdio_dev *dev) /* deregister the device "devname". * returns 0 if success, -1 if device is assigned and 1 if devname not found */ -#ifdef CONFIG_SYS_STDIO_DEREGISTER +#if CONFIG_IS_ENABLED(SYS_STDIO_DEREGISTER) int stdio_deregister_dev(struct stdio_dev *dev, int force) { int l; @@ -224,7 +224,7 @@ int stdio_deregister(const char *devname, int force) return stdio_deregister_dev(dev, force); } -#endif /* CONFIG_SYS_STDIO_DEREGISTER */ +#endif /* CONFIG_IS_ENABLED(SYS_STDIO_DEREGISTER) */ int stdio_init_tables(void) { diff --git a/common/usb_kbd.c b/common/usb_kbd.c index a9872a6..5f9a64a 100644 --- a/common/usb_kbd.c +++ b/common/usb_kbd.c @@ -570,7 +570,7 @@ int drv_usb_kbd_init(void) /* Deregister the keyboard. */ int usb_kbd_deregister(int force) { -#ifdef CONFIG_SYS_STDIO_DEREGISTER +#if CONFIG_IS_ENABLED(SYS_STDIO_DEREGISTER) struct stdio_dev *dev; struct usb_device *usb_kbd_dev; struct usb_kbd_pdata *data; diff --git a/configs/MPC8610HPCD_defconfig b/configs/MPC8610HPCD_defconfig index 6e2eb3d..3facbb0 100644 --- a/configs/MPC8610HPCD_defconfig +++ b/configs/MPC8610HPCD_defconfig @@ -5,6 +5,7 @@ CONFIG_TARGET_MPC8610HPCD=y CONFIG_OF_BOARD_SETUP=y CONFIG_OF_STDOUT_VIA_ALIAS=y CONFIG_BOOTDELAY=10 +CONFIG_SYS_STDIO_DEREGISTER=y CONFIG_HUSH_PARSER=y CONFIG_CMD_I2C=y CONFIG_CMD_USB=y diff --git a/configs/MPC8641HPCN_36BIT_defconfig b/configs/MPC8641HPCN_36BIT_defconfig index a113e37..77903bf 100644 --- a/configs/MPC8641HPCN_36BIT_defconfig +++ b/configs/MPC8641HPCN_36BIT_defconfig @@ -6,6 +6,7 @@ CONFIG_PHYS_64BIT=y CONFIG_OF_BOARD_SETUP=y CONFIG_OF_STDOUT_VIA_ALIAS=y CONFIG_BOOTDELAY=10 +CONFIG_SYS_STDIO_DEREGISTER=y CONFIG_HUSH_PARSER=y CONFIG_CMD_I2C=y CONFIG_CMD_USB=y diff --git a/configs/MPC8641HPCN_defconfig b/configs/MPC8641HPCN_defconfig index 80ab195..06e75a5 100644 --- a/configs/MPC8641HPCN_defconfig +++ b/configs/MPC8641HPCN_defconfig @@ -5,6 +5,7 @@ CONFIG_TARGET_MPC8641HPCN=y CONFIG_OF_BOARD_SETUP=y CONFIG_OF_STDOUT_VIA_ALIAS=y CONFIG_BOOTDELAY=10 +CONFIG_SYS_STDIO_DEREGISTER=y CONFIG_HUSH_PARSER=y CONFIG_CMD_I2C=y CONFIG_CMD_USB=y diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c index 19f38e1..43c028e 100644 --- a/drivers/serial/serial-uclass.c +++ b/drivers/serial/serial-uclass.c @@ -346,7 +346,7 @@ static int seri
[U-Boot] [PATCH v2 22/29] video: Drop CONFIG_CONSOLE_INFO_QUIET
This is not used in U-Boot. Drop it. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- Changes in v2: None include/configs/edminiv2.h | 1 - include/configs/km/km_arm.h | 1 - include/configs/mv-common.h | 1 - scripts/config_whitelist.txt | 1 - 4 files changed, 4 deletions(-) diff --git a/include/configs/edminiv2.h b/include/configs/edminiv2.h index 982d526..51e17c5 100644 --- a/include/configs/edminiv2.h +++ b/include/configs/edminiv2.h @@ -208,7 +208,6 @@ /* * Other required minimal configurations */ -#define CONFIG_CONSOLE_INFO_QUIET /* some code reduction */ #define CONFIG_ARCH_CPU_INIT /* call arch_cpu_init() */ #define CONFIG_ARCH_MISC_INIT /* call arch_misc_init() */ #define CONFIG_DISPLAY_CPUINFO /* Display cpu info */ diff --git a/include/configs/km/km_arm.h b/include/configs/km/km_arm.h index 25db704..e2fade0 100644 --- a/include/configs/km/km_arm.h +++ b/include/configs/km/km_arm.h @@ -146,7 +146,6 @@ /* * Other required minimal configurations */ -#define CONFIG_CONSOLE_INFO_QUIET /* some code reduction */ #define CONFIG_ARCH_CPU_INIT /* call arch_cpu_init() */ #define CONFIG_ARCH_MISC_INIT /* call arch_misc_init() */ #define CONFIG_DISPLAY_CPUINFO /* Display cpu info */ diff --git a/include/configs/mv-common.h b/include/configs/mv-common.h index dd223be..1af8913 100644 --- a/include/configs/mv-common.h +++ b/include/configs/mv-common.h @@ -83,7 +83,6 @@ #define CONFIG_SYS_LONGHELP #define CONFIG_AUTO_COMPLETE #define CONFIG_CMDLINE_EDITING -#define CONFIG_CONSOLE_INFO_QUIET /* some code reduction */ #define CONFIG_ARCH_CPU_INIT /* call arch_cpu_init() */ #define CONFIG_ARCH_MISC_INIT /* call arch_misc_init() */ #define CONFIG_BOARD_EARLY_INIT_F /* call board_init_f for early inits */ diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index 53976e5..43d58b9 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -673,7 +673,6 @@ CONFIG_COMMON_ENV_SETTINGS CONFIG_COMMON_ENV_UBI CONFIG_COMPACT_FLASH CONFIG_COMPAT -CONFIG_CONSOLE_INFO_QUIET CONFIG_CONSOLE_SCROLL_LINES CONFIG_CONS_EXTC_PINSEL CONFIG_CONS_EXTC_RATE -- 2.8.0.rc3.226.g39d4020 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 24/29] Convert CONFIG_CONSOLE_SCROLL_LINES to Kconfig
This converts the following to Kconfig: CONFIG_CONSOLE_SCROLL_LINES Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- Changes in v2: None README | 6 -- configs/bayleybay_defconfig | 1 + configs/chromebook_jerry_defconfig | 1 + configs/chromebook_link_defconfig | 1 + configs/chromebook_samus_defconfig | 1 + configs/chromebox_panther_defconfig | 1 + configs/colibri_t20_defconfig | 1 + configs/conga-qeval20-qa3-e3845-internal-uart_defconfig | 1 + configs/conga-qeval20-qa3-e3845_defconfig | 1 + configs/coreboot-x86_defconfig | 1 + configs/crownbay_defconfig | 1 + configs/dfi-bt700-q7x-151_defconfig | 1 + configs/firefly-rk3288_defconfig| 1 + configs/harmony_defconfig | 1 + configs/minnowmax_defconfig | 1 + configs/paz00_defconfig | 1 + configs/qemu-x86_defconfig | 1 + configs/qemu-x86_efi_payload32_defconfig| 1 + configs/qemu-x86_efi_payload64_defconfig| 1 + configs/rock2_defconfig | 1 + configs/seaboard_defconfig | 1 + configs/som-db5800-som-6867_defconfig | 1 + configs/theadorable-x86-dfi-bt700_defconfig | 1 + configs/ventana_defconfig | 1 + drivers/video/Kconfig | 10 ++ include/configs/chromebook_jerry.h | 1 - include/configs/colibri_pxa270.h| 1 - include/configs/colibri_t20.h | 1 - include/configs/evb_rk3288.h| 1 - include/configs/evb_rk3399.h| 1 - include/configs/fennec_rk3288.h | 1 - include/configs/firefly-rk3288.h| 1 - include/configs/harmony.h | 1 - include/configs/miniarm_rk3288.h| 1 - include/configs/paz00.h | 1 - include/configs/popmetal_rk3288.h | 1 - include/configs/rock2.h | 1 - include/configs/rpi.h | 1 - include/configs/seaboard.h | 1 - include/configs/ventana.h | 1 - include/configs/x86-common.h| 1 - include/lcd_console.h | 3 --- scripts/config_whitelist.txt| 1 - 43 files changed, 33 insertions(+), 26 deletions(-) diff --git a/README b/README index cf83fc3..8b9c04e 100644 --- a/README +++ b/README @@ -1743,12 +1743,6 @@ CBFS (Coreboot Filesystem) support here, since it is cheaper to change data cache settings on a per-section basis. - CONFIG_CONSOLE_SCROLL_LINES - - When the console need to be scrolled, this is the number of - lines to scroll by. It defaults to 1. Increasing this makes - the console jump but can help speed up operation when scrolling - is slow. CONFIG_LCD_ROTATION diff --git a/configs/bayleybay_defconfig b/configs/bayleybay_defconfig index 0a78639..542e516 100644 --- a/configs/bayleybay_defconfig +++ b/configs/bayleybay_defconfig @@ -59,4 +59,5 @@ CONFIG_VIDEO_VESA=y CONFIG_FRAMEBUFFER_SET_VESA_MODE=y CONFIG_FRAMEBUFFER_VESA_MODE_11A=y CONFIG_CFB_CONSOLE=y +CONFIG_CONSOLE_SCROLL_LINES=5 CONFIG_USE_PRIVATE_LIBGCC=y diff --git a/configs/chromebook_jerry_defconfig b/configs/chromebook_jerry_defconfig index f0c151d..0b64261 100644 --- a/configs/chromebook_jerry_defconfig +++ b/configs/chromebook_jerry_defconfig @@ -79,6 +79,7 @@ CONFIG_SYSRESET=y CONFIG_DM_VIDEO=y CONFIG_DISPLAY=y CONFIG_VIDEO_ROCKCHIP=y +CONFIG_CONSOLE_SCROLL_LINES=10 CONFIG_USE_TINY_PRINTF=y CONFIG_CMD_DHRYSTONE=y CONFIG_ERRNO_STR=y diff --git a/configs/chromebook_link_defconfig b/configs/chromebook_link_defconfig index d850b4e..73afd13 100644 --- a/configs/chromebook_link_defconfig +++ b/configs/chromebook_link_defconfig @@ -63,5 +63,6 @@ CONFIG_VIDEO_VESA=y CONFIG_FRAMEBUFFER_SET_VESA_MODE=y CONFIG_FRAMEBUFFER_VESA_MODE_11A=y CONFIG_CFB_CONSOLE=y +CONFIG_CONSOLE_SCROLL_LINES=5 CONFIG_USE_PRIVATE_LIBGCC=y CONFIG_TPM=y diff --git a/configs/chromebook_samus_defconfig b/configs/chromebook_samus_defconfig index e1b92ea..6152393 100644 --- a/configs/chromebook_samus_defconfig +++ b/configs/chromebook_samus_defconfig @@ -61,5 +61,6 @@ CONFIG_DM_VIDEO=y CONFIG_FRAMEBUFFER_SET_VESA_MODE=y
[U-Boot] [PATCH v2 23/29] Convert CONFIG_LCD to Kconfig
This converts the following to Kconfig: CONFIG_LCD Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- Changes in v2: None configs/TQM823L_LCD_defconfig | 3 ++- configs/TTTech_defconfig | 3 ++- configs/at91sam9261ek_dataflash_cs0_defconfig | 1 + configs/at91sam9261ek_dataflash_cs3_defconfig | 1 + configs/at91sam9261ek_nandflash_defconfig | 1 + configs/at91sam9263ek_dataflash_cs0_defconfig | 1 + configs/at91sam9263ek_dataflash_defconfig | 1 + configs/at91sam9263ek_nandflash_defconfig | 1 + configs/at91sam9263ek_norflash_boot_defconfig | 1 + configs/at91sam9263ek_norflash_defconfig | 1 + configs/at91sam9g10ek_dataflash_cs0_defconfig | 1 + configs/at91sam9g10ek_dataflash_cs3_defconfig | 1 + configs/at91sam9g10ek_nandflash_defconfig | 1 + configs/at91sam9m10g45ek_mmc_defconfig| 1 + configs/at91sam9m10g45ek_nandflash_defconfig | 1 + configs/at91sam9n12ek_mmc_defconfig | 1 + configs/at91sam9n12ek_nandflash_defconfig | 1 + configs/at91sam9n12ek_spiflash_defconfig | 1 + configs/at91sam9rlek_dataflash_defconfig | 1 + configs/at91sam9rlek_mmc_defconfig| 1 + configs/at91sam9rlek_nandflash_defconfig | 1 + configs/at91sam9x5ek_dataflash_defconfig | 1 + configs/at91sam9x5ek_mmc_defconfig| 1 + configs/at91sam9x5ek_nandflash_defconfig | 1 + configs/at91sam9x5ek_spiflash_defconfig | 1 + configs/brppt1_mmc_defconfig | 1 + configs/brppt1_nand_defconfig | 1 + configs/brppt1_spi_defconfig | 1 + configs/brxre1_defconfig | 1 + configs/cm_t3517_defconfig| 1 + configs/cm_t35_defconfig | 1 + configs/peach-pi_defconfig| 1 + configs/peach-pit_defconfig | 1 + configs/picosam9g45_defconfig | 1 + configs/pm9261_defconfig | 1 + configs/pm9263_defconfig | 1 + configs/rpi_2_defconfig | 1 + configs/rpi_3_32b_defconfig | 1 + configs/rpi_3_defconfig | 1 + configs/rpi_defconfig | 1 + configs/sama5d3xek_mmc_defconfig | 1 + configs/sama5d3xek_nandflash_defconfig| 1 + configs/sama5d3xek_spiflash_defconfig | 1 + configs/sama5d4ek_mmc_defconfig | 1 + configs/sama5d4ek_nandflash_defconfig | 1 + configs/sama5d4ek_spiflash_defconfig | 1 + configs/snow_defconfig| 1 + configs/spring_defconfig | 1 + configs/wtk_defconfig | 3 ++- configs/zipitz2_defconfig | 1 + drivers/video/Kconfig | 8 include/configs/M52277EVB.h | 1 - include/configs/at91sam9261ek.h | 1 - include/configs/at91sam9263ek.h | 1 - include/configs/at91sam9m10g45ek.h| 1 - include/configs/at91sam9n12ek.h | 1 - include/configs/at91sam9rlek.h| 1 - include/configs/at91sam9x5ek.h| 1 - include/configs/brppt1.h | 1 - include/configs/brxre1.h | 1 - include/configs/cm_t35.h | 1 - include/configs/cm_t3517.h| 1 - include/configs/exynos5-dt-common.h | 1 - include/configs/ma5d4evk.h| 1 - include/configs/peach-pi.h| 1 - include/configs/picosam9g45.h | 1 - include/configs/pm9261.h | 1 - include/configs/pm9263.h | 1 - include/configs/rpi.h | 1 - include/configs/sama5d2_xplained.h| 1 - include/configs/sama5d3xek.h | 1 - include/configs/sama5d4_xplained.h| 1 - include/configs/sama5d4ek.h | 1 - include/configs/smdk5250.h| 1 - include/configs/smdk5420.h| 1 - include/configs/zipitz2.h | 1 - scripts/config_whitelist.txt | 1 - 77 files changed, 61 insertions(+), 29 deletions(-) diff --git a/configs/TQM823L_LCD_defconfig b/configs/TQM823L_LCD_defconfig index 38f5119..9bc8c73 100644 --- a/configs/TQM823L_LCD_defconfig +++ b/configs/TQM823L_LCD_defconfig @@ -2,7 +2,7 @@ CONFIG_PPC=y CONFIG_8xx=y CONFIG_TARGET_TQM823L=y CONFIG_OF_BOARD_SETUP=y -CONFIG_SYS_EXTRA_OPTIONS="LCD,NEC_NL6448BC20" +CONFIG_SYS_EXTRA_OPTIONS="NEC_NL6448BC20" CONFIG_BOOTDELAY=5 CONFIG_HUSH_PARSER=y CONFIG_CMD_ASKENV=y @@ -10,4 +10,5 @@ CONFIG_CMD_ASKENV=y CONFIG_CMD_DHCP=y CONFIG_CMD_SNTP=y CONFIG_CMD_EXT2=y +CONFIG_LCD=y CONFIG_OF_LIBFDT=y diff --git a/configs/TTTech_defconfig b/configs/TTTech_defconfig index e545848..9649012 100644 --- a/configs/TTTech_defconfig +++ b/configs/TTTech_defconfig @@ -2,7 +2
[U-Boot] [PATCH v2 25/29] Convert CONFIG_SYS_CONSOLE_ENV_OVERWRITE to Kconfig
This converts the following to Kconfig: CONFIG_SYS_CONSOLE_ENV_OVERWRITE Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- Changes in v2: None README | 3 --- common/Kconfig | 9 + configs/socfpga_arria5_defconfig | 1 + configs/socfpga_cyclone5_defconfig | 1 + configs/socfpga_de0_nano_soc_defconfig | 1 + configs/socfpga_is1_defconfig | 1 + configs/socfpga_mcvevk_defconfig | 1 + configs/socfpga_sockit_defconfig | 1 + configs/socfpga_socrates_defconfig | 1 + configs/socfpga_sr1500_defconfig | 1 + configs/socfpga_vining_fpga_defconfig | 1 + include/configs/MIP405.h | 1 - include/configs/MigoR.h| 1 - include/configs/PIP405.h | 1 - include/configs/ap325rxa.h | 1 - include/configs/ap_sh4a_4a.h | 1 - include/configs/armadillo-800eva.h | 1 - include/configs/ecovec.h | 1 - include/configs/kzm9g.h| 1 - include/configs/ms7722se.h | 1 - include/configs/r0p7734.h | 1 - include/configs/rcar-gen2-common.h | 1 - include/configs/rcar-gen3-common.h | 1 - include/configs/sh7752evb.h| 1 - include/configs/sh7753evb.h| 1 - include/configs/sh7757lcr.h| 1 - include/configs/sh7785lcr.h| 1 - include/configs/socfpga_common.h | 1 - scripts/config_whitelist.txt | 1 - 29 files changed, 18 insertions(+), 21 deletions(-) diff --git a/README b/README index 8b9c04e..f2e0809 100644 --- a/README +++ b/README @@ -3588,9 +3588,6 @@ Configuration Settings: - CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE Enable the call to overwrite_console(). -- CONFIG_SYS_CONSOLE_ENV_OVERWRITE - Enable overwrite of previous console environment settings. - - CONFIG_SYS_MEMTEST_START, CONFIG_SYS_MEMTEST_END: Begin and End addresses of the area used by the simple memory test. diff --git a/common/Kconfig b/common/Kconfig index 8e600f7..e02e797 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -308,6 +308,15 @@ config SYS_CONSOLE_IS_IN_ENV environment variables can be updated after boot to change the input/output devices. +config SYS_CONSOLE_ENV_OVERWRITE + bool "Update environment variables during console init" + help + The console environment variables (stdout, stdin, stderr) can be + used to determine the correct console devices on start-up. This + option writes the console devices to these variables on console + start-up (after relocation). This causes the environment to be + updated to match the console devices actually chosen. + endmenu config SYS_NO_FLASH diff --git a/configs/socfpga_arria5_defconfig b/configs/socfpga_arria5_defconfig index 45dc5eb..44cc0a9 100644 --- a/configs/socfpga_arria5_defconfig +++ b/configs/socfpga_arria5_defconfig @@ -6,6 +6,7 @@ CONFIG_SPL_STACK_R_ADDR=0x0080 CONFIG_DEFAULT_DEVICE_TREE="socfpga_arria5_socdk" CONFIG_FIT=y CONFIG_SYS_CONSOLE_IS_IN_ENV=y +CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y CONFIG_VERSION_VARIABLE=y CONFIG_SPL=y CONFIG_SPL_SYS_MALLOC_SIMPLE=y diff --git a/configs/socfpga_cyclone5_defconfig b/configs/socfpga_cyclone5_defconfig index 76e2256..333ffdf 100644 --- a/configs/socfpga_cyclone5_defconfig +++ b/configs/socfpga_cyclone5_defconfig @@ -6,6 +6,7 @@ CONFIG_SPL_STACK_R_ADDR=0x0080 CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_socdk" CONFIG_FIT=y CONFIG_SYS_CONSOLE_IS_IN_ENV=y +CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y CONFIG_VERSION_VARIABLE=y CONFIG_SPL=y CONFIG_SPL_SYS_MALLOC_SIMPLE=y diff --git a/configs/socfpga_de0_nano_soc_defconfig b/configs/socfpga_de0_nano_soc_defconfig index 43930ac..4a6fd3a 100644 --- a/configs/socfpga_de0_nano_soc_defconfig +++ b/configs/socfpga_de0_nano_soc_defconfig @@ -6,6 +6,7 @@ CONFIG_SPL_STACK_R_ADDR=0x0080 CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_de0_nano_soc" CONFIG_FIT=y CONFIG_SYS_CONSOLE_IS_IN_ENV=y +CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y CONFIG_VERSION_VARIABLE=y CONFIG_SPL=y CONFIG_SPL_SYS_MALLOC_SIMPLE=y diff --git a/configs/socfpga_is1_defconfig b/configs/socfpga_is1_defconfig index dacdfeb..505b0c7 100644 --- a/configs/socfpga_is1_defconfig +++ b/configs/socfpga_is1_defconfig @@ -6,6 +6,7 @@ CONFIG_SPL_STACK_R_ADDR=0x0080 CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_is1" CONFIG_FIT=y CONFIG_SYS_CONSOLE_IS_IN_ENV=y +CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y CONFIG_VERSION_VARIABLE=y CONFIG_SPL=y CONFIG_SPL_STACK_R=y diff --git a/configs/socfpga_mcvevk_defconfig b/configs/socfpga_mcvevk_defconfig index 73e13a9..459323b 100644 --- a/configs/socfpga_mcvevk_defconfig +++ b/configs/socfpga_mcvevk_defconfig @@ -6,6 +6,7 @@ CONFIG_SPL_STACK_R_ADDR=0x0080 CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_mcvevk" CONFIG_FIT=y CONFIG_SYS_CONSOLE_IS_IN_ENV=y +CONFIG_SYS_CONSOLE_ENV_OVE
[U-Boot] [PATCH v2 21/29] video: Move video_get_info_str() prototype to a header file
This should be defined in a header file so that arguments are checked. Move it to video.h. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- Changes in v2: None board/liebherr/lwmon5/lwmon5.c | 1 + board/mosaixtech/icon/icon.c | 1 + board/mpl/common/common_util.c | 1 + board/tqc/tqm5200/tqm5200.c| 1 + drivers/video/cfb_console.c| 25 - include/video.h| 11 +++ 6 files changed, 23 insertions(+), 17 deletions(-) diff --git a/board/liebherr/lwmon5/lwmon5.c b/board/liebherr/lwmon5/lwmon5.c index 8ad6712..bb99a3b 100644 --- a/board/liebherr/lwmon5/lwmon5.c +++ b/board/liebherr/lwmon5/lwmon5.c @@ -13,6 +13,7 @@ #include #include #include +#include #include DECLARE_GLOBAL_DATA_PTR; diff --git a/board/mosaixtech/icon/icon.c b/board/mosaixtech/icon/icon.c index 1795464..7558234 100644 --- a/board/mosaixtech/icon/icon.c +++ b/board/mosaixtech/icon/icon.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/board/mpl/common/common_util.c b/board/mpl/common/common_util.c index 3c110fa..a6edb6d 100644 --- a/board/mpl/common/common_util.c +++ b/board/mpl/common/common_util.c @@ -15,6 +15,7 @@ #include #include #include +#include #ifdef CONFIG_PIP405 #include "../pip405/pip405.h" diff --git a/board/tqc/tqm5200/tqm5200.c b/board/tqc/tqm5200/tqm5200.c index 8b82c34..fef9d2b 100644 --- a/board/tqc/tqm5200/tqm5200.c +++ b/board/tqc/tqm5200/tqm5200.c @@ -18,6 +18,7 @@ #include #include #include +#include #ifdef CONFIG_VIDEO_SM501 #include diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index c788651..b02a153 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -64,6 +64,7 @@ #include #include #include +#include #include /* @@ -215,16 +216,6 @@ #endif #endif -#ifdef CONFIG_CONSOLE_EXTRA_INFO -/* - * setup a board string: type, speed, etc. - * - * line_number:location to place info string beside logo - * info: buffer for info string - */ -extern void video_get_info_str(int line_number,char *info); -#endif - DECLARE_GLOBAL_DATA_PTR; /* Locals */ @@ -801,7 +792,7 @@ static void parse_putc(const char c) video_set_cursor(); } -static void video_putc(struct stdio_dev *dev, const char c) +static void cfb_video_putc(struct stdio_dev *dev, const char c) { #ifdef CONFIG_CFB_CONSOLE_ANSI int i; @@ -1015,7 +1006,7 @@ static void video_putc(struct stdio_dev *dev, const char c) flush_cache(VIDEO_FB_ADRS, VIDEO_SIZE); } -static void video_puts(struct stdio_dev *dev, const char *s) +static void cfb_video_puts(struct stdio_dev *dev, const char *s) { int flush = cfb_do_flush_cache; int count = strlen(s); @@ -1024,7 +1015,7 @@ static void video_puts(struct stdio_dev *dev, const char *s) cfb_do_flush_cache = 0; while (count--) - video_putc(dev, *s++); + cfb_video_putc(dev, *s++); if (flush) { cfb_do_flush_cache = flush; @@ -1991,7 +1982,7 @@ void video_clear(void) #endif } -static int video_init(void) +static int cfg_video_init(void) { unsigned char color8; @@ -2117,7 +2108,7 @@ int drv_video_init(void) return 0; /* Init video chip - returns with framebuffer cleared */ - if (video_init() == -1) + if (cfg_video_init() == -1) return 0; if (board_cfb_skip()) @@ -2142,8 +2133,8 @@ int drv_video_init(void) memset(&console_dev, 0, sizeof(console_dev)); strcpy(console_dev.name, "vga"); console_dev.flags = DEV_FLAGS_OUTPUT; - console_dev.putc = video_putc; /* 'putc' function */ - console_dev.puts = video_puts; /* 'puts' function */ + console_dev.putc = cfb_video_putc; /* 'putc' function */ + console_dev.puts = cfb_video_puts; /* 'puts' function */ #if !defined(CONFIG_VGA_AS_SINGLE_DEVICE) if (have_keyboard && keyboard_ok) { diff --git a/include/video.h b/include/video.h index 0d5bd21..5b4e78b 100644 --- a/include/video.h +++ b/include/video.h @@ -245,6 +245,17 @@ int lg4573_spi_startup(unsigned int bus, unsigned int cs, unsigned int max_hz, unsigned int spi_mode); #endif +/* + * video_get_info_str() - obtain a board string: type, speed, etc. + * + * This is called if CONFIG_CONSOLE_EXTRA_INFO is enabled. + * + * line_number:location to place info string beside logo + * info: buffer for info string (empty if nothing to display on this + * line) + */ +void video_get_info_str(int line_number, char *info); + #endif /* CONFIG_DM_VIDEO */ #endif -- 2.8.0.rc3.226.g39d4020 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 19/29] video: Drop CONFIG_VIDEO_SW_CURSOR
Since all boards enable this, we may as well drop the option. This is a separate patch from the previous one, so it can be skipped if someone identifies a need. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- Changes in v2: None README | 1 - drivers/video/Kconfig | 10 -- drivers/video/cfb_console.c | 46 - 3 files changed, 12 insertions(+), 45 deletions(-) diff --git a/README b/README index 2dfdc52..cf83fc3 100644 --- a/README +++ b/README @@ -1674,7 +1674,6 @@ CBFS (Coreboot Filesystem) support CONFIG_VIDEO CONFIG_CMD_BMP CONFIG_CFB_CONSOLE - CONFIG_VIDEO_SW_CURSOR CONFIG_VGA_AS_SINGLE_DEVICE CONFIG_VIDEO_LOGO CONFIG_VIDEO_BMP_LOGO diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 80b585b..c70f6a1 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -481,16 +481,6 @@ config VGA_AS_SINGLE_DEVICE may be used if you have no keyboard device, or more than one (USB Keyboard, AT Keyboard). -config VIDEO_SW_CURSOR - bool "Enable a software cursor" - depends on CFB_CONSOLE - default y if CFB_CONSOLE - help - This draws a cursor after the last character. No blinking is - provided. This makes it possible to see the current cursor - position when entering text on the console. It is recommended to - enable this. - config VIDEO_CT69000 bool "Enable Chips & Technologies 69000 video driver" depends on VIDEO diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index 56d3c15..c788651 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -58,11 +58,6 @@ * info); * that fills a info buffer at i=row. * s.a: board/eltec/bab7xx. - * - * CONFIG_VIDEO_SW_CURSOR:- Draws a cursor after the last - * character. No blinking is provided. - * Uses the macros CURSOR_SET and - * CURSOR_OFF. */ #include @@ -141,21 +136,6 @@ #include #endif -#if !defined(CONFIG_VIDEO_SW_CURSOR) -/* no Cursor defined */ -#define CURSOR_ON -#define CURSOR_OFF -#define CURSOR_SET -#endif - -#if defined(CONFIG_VIDEO_SW_CURSOR) -void console_cursor(int state); - -#define CURSOR_ON console_cursor(1) -#define CURSOR_OFF console_cursor(0) -#define CURSOR_SET video_set_cursor() -#endif /* CONFIG_VIDEO_SW_CURSOR */ - #ifdef CONFIG_VIDEO_LOGO #ifdef CONFIG_VIDEO_BMP_LOGO #include @@ -529,14 +509,6 @@ static void video_putchar(int xx, int yy, unsigned char c) video_drawchars(xx, yy + video_logo_height, &c, 1); } -#if defined(CONFIG_VIDEO_SW_CURSOR) -static void video_set_cursor(void) -{ - if (cursor_state) - console_cursor(0); - console_cursor(1); -} - static void video_invertchar(int xx, int yy) { int firstx = xx * VIDEO_PIXEL_SIZE; @@ -552,7 +524,7 @@ static void video_invertchar(int xx, int yy) } } -void console_cursor(int state) +static void console_cursor(int state) { if (cursor_state != state) { if (cursor_state) { @@ -573,7 +545,13 @@ void console_cursor(int state) if (cfb_do_flush_cache) flush_cache(VIDEO_FB_ADRS, VIDEO_SIZE); } -#endif + +static void video_set_cursor(void) +{ + if (cursor_state) + console_cursor(0); + console_cursor(1); +} #ifndef VIDEO_HW_RECTFILL static void memsetl(int *p, int c, int v) @@ -779,7 +757,7 @@ static void parse_putc(const char c) static int nl = 1; if (console_cursor_is_visible()) - CURSOR_OFF; + console_cursor(0); switch (c) { case 13:/* back to first column */ @@ -820,7 +798,7 @@ static void parse_putc(const char c) } if (console_cursor_is_visible()) - CURSOR_SET; + video_set_cursor(); } static void video_putc(struct stdio_dev *dev, const char c) @@ -951,7 +929,7 @@ static void video_putc(struct stdio_dev *dev, const char c) if (flush) { if (!ansi_cursor_hidden) - CURSOR_OFF; + console_cursor(0); ansi_buf_size = 0; switch (cchar) { case 'A': @@ -1025,7 +1003,7 @@ static void video_putc(struct stdio_dev *dev, const char c) break; } if (!ansi_cursor_hidden) - CURSOR_SET; + video_set_cursor(); } } else {
[U-Boot] [PATCH v2 17/29] video: Drop CONFIG_VIDEO_HW_CURSOR
This is not used in U-Boot. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- Changes in v2: None drivers/video/cfb_console.c | 33 +- drivers/video/ct69000.c | 79 include/video_fb.h | 4 --- scripts/config_whitelist.txt | 1 - 4 files changed, 1 insertion(+), 116 deletions(-) diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index 3a8e20b..a99fc00 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -63,14 +63,6 @@ * character. No blinking is provided. * Uses the macros CURSOR_SET and * CURSOR_OFF. - * - * CONFIG_VIDEO_HW_CURSOR:- Uses the hardware cursor capability - * of the graphic chip. Uses the macro - * CURSOR_SET. ATTENTION: If booting an - * OS, the display driver must disable - * the hardware register of the graphic - * chip. Otherwise a blinking field is - * displayed. */ #include @@ -154,13 +146,8 @@ * CONFIG_VIDEO_SW_CURSOR: Draws a cursor after the last character. No *blinking is provided. Uses the macros CURSOR_SET *and CURSOR_OFF. - * CONFIG_VIDEO_HW_CURSOR: Uses the hardware cursor capability of the - *graphic chip. Uses the macro CURSOR_SET. - *ATTENTION: If booting an OS, the display driver - *must disable the hardware register of the graphic - *chip. Otherwise a blinking field is displayed */ -#if !defined(CONFIG_VIDEO_SW_CURSOR) && !defined(CONFIG_VIDEO_HW_CURSOR) +#if !defined(CONFIG_VIDEO_SW_CURSOR) /* no Cursor defined */ #define CURSOR_ON #define CURSOR_OFF @@ -168,10 +155,6 @@ #endif #if defined(CONFIG_VIDEO_SW_CURSOR) -#if defined(CONFIG_VIDEO_HW_CURSOR) -#error only one of CONFIG_VIDEO_SW_CURSOR or CONFIG_VIDEO_HW_CURSOR can be \ - defined -#endif void console_cursor(int state); #define CURSOR_ON console_cursor(1) @@ -179,17 +162,6 @@ void console_cursor(int state); #define CURSOR_SET video_set_cursor() #endif /* CONFIG_VIDEO_SW_CURSOR */ -#ifdef CONFIG_VIDEO_HW_CURSOR -#ifdef CURSOR_ON -#error only one of CONFIG_VIDEO_SW_CURSOR or CONFIG_VIDEO_HW_CURSOR can be \ - defined -#endif -#define CURSOR_ON -#define CURSOR_OFF -#define CURSOR_SET video_set_hw_cursor(console_col * VIDEO_FONT_WIDTH, \ - (console_row * VIDEO_FONT_HEIGHT) + video_logo_height) -#endif /* CONFIG_VIDEO_HW_CURSOR */ - #ifdef CONFIG_VIDEO_LOGO #ifdef CONFIG_VIDEO_BMP_LOGO #include @@ -2056,9 +2028,6 @@ static int video_init(void) return -1; video_fb_address = (void *) VIDEO_FB_ADRS; -#ifdef CONFIG_VIDEO_HW_CURSOR - video_init_hw_cursor(VIDEO_FONT_WIDTH, VIDEO_FONT_HEIGHT); -#endif cfb_do_flush_cache = cfb_fb_is_in_dram() && dcache_status(); diff --git a/drivers/video/ct69000.c b/drivers/video/ct69000.c index 349da5e..a74e4e6 100644 --- a/drivers/video/ct69000.c +++ b/drivers/video/ct69000.c @@ -804,85 +804,6 @@ video_dump_reg (void) #endif -#ifdef CONFIG_VIDEO_HW_CURSOR -/*** - * Set Hardware Cursor in Pixel - */ -void -video_set_hw_cursor (int x, int y) -{ - int sig_x = 0, sig_y = 0; - if (x < 0) { - x *= -1; - sig_x = 1; - } - if (y < 0) { - y *= -1; - sig_y = 1; - } - ctWrite_i (CT_XR_O, 0xa4, x & 0xff); - ctWrite_i (CT_XR_O, 0xa5, (x >> 8) & 0x7); - ctWrite_i (CT_XR_O, 0xa6, y & 0xff); - ctWrite_i (CT_XR_O, 0xa7, (y >> 8) & 0x7); -} - -/*** - * Init Hardware Cursor. To know the size of the Cursor, - * we have to know the Font size. - */ -void -video_init_hw_cursor (int font_width, int font_height) -{ - unsigned char xr_80; - unsigned long *curs, pattern; - int i; - int cursor_start; - GraphicDevice *pGD = (GraphicDevice *) & ctfb; - - cursor_start = pGD->dprBase; - xr_80 = ctRead_i (CT_XR_O, 0x80); - /* set start address */ - ctWrite_i (CT_XR_O, 0xa2, (cursor_start >> 8) & 0xf0); - ctWrite_i (CT_XR_O, 0xa3, (cursor_start >> 16) & 0x3f); - /* set cursor shape */ - curs = (unsigned long *) cursor_start; - i = 0; - while (i < 0x400) { - curs[i++] = 0x; /* AND mask */ - curs[i++] = 0x; /* AND mask */ - curs[i++] = 0; /* XOR mask */ - curs[i++] = 0; /* XOR mask */ - /* Transparent */ - } - pattern = 0x >> font_width; - i = 0; - while (i < (font_he
[U-Boot] [PATCH v2 18/29] Convert CONFIG_VIDEO_SW_CURSOR to Kconfig
This converts the following to Kconfig: CONFIG_VIDEO_SW_CURSOR Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- Changes in v2: None drivers/video/Kconfig | 10 ++ drivers/video/cfb_console.c | 6 -- include/configs/MIP405.h | 1 - include/configs/MPC8536DS.h | 1 - include/configs/MPC8544DS.h | 1 - include/configs/MPC8572DS.h | 1 - include/configs/MPC8610HPCD.h | 1 - include/configs/MPC8641HPCN.h | 1 - include/configs/P1022DS.h | 2 -- include/configs/PIP405.h | 1 - include/configs/T102xQDS.h| 1 - include/configs/T102xRDB.h| 1 - include/configs/T1040QDS.h| 1 - include/configs/T104xRDB.h| 1 - include/configs/TQM5200.h | 1 - include/configs/cm_fx6.h | 1 - include/configs/colibri_imx7.h| 1 - include/configs/digsy_mtc.h | 1 - include/configs/icon.h| 1 - include/configs/imx31_phycore.h | 1 - include/configs/ipek01.h | 1 - include/configs/lwmon5.h | 1 - include/configs/mpc5121ads.h | 1 - include/configs/mx6sxsabresd.h| 1 - include/configs/mx6ul_14x14_evk.h | 1 - include/configs/mx7dsabresd.h | 1 - include/configs/mxs.h | 1 - include/configs/nokia_rx51.h | 1 - include/configs/sequoia.h | 1 - include/configs/socrates.h| 1 - include/configs/sunxi-common.h| 1 - include/configs/tbs2910.h | 1 - include/configs/x86-common.h | 1 - scripts/config_whitelist.txt | 1 - 34 files changed, 10 insertions(+), 39 deletions(-) diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index c70f6a1..80b585b 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -481,6 +481,16 @@ config VGA_AS_SINGLE_DEVICE may be used if you have no keyboard device, or more than one (USB Keyboard, AT Keyboard). +config VIDEO_SW_CURSOR + bool "Enable a software cursor" + depends on CFB_CONSOLE + default y if CFB_CONSOLE + help + This draws a cursor after the last character. No blinking is + provided. This makes it possible to see the current cursor + position when entering text on the console. It is recommended to + enable this. + config VIDEO_CT69000 bool "Enable Chips & Technologies 69000 video driver" depends on VIDEO diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index a99fc00..56d3c15 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -141,12 +141,6 @@ #include #endif -/* - * Cursor definition: - * CONFIG_VIDEO_SW_CURSOR: Draws a cursor after the last character. No - *blinking is provided. Uses the macros CURSOR_SET - *and CURSOR_OFF. - */ #if !defined(CONFIG_VIDEO_SW_CURSOR) /* no Cursor defined */ #define CURSOR_ON diff --git a/include/configs/MIP405.h b/include/configs/MIP405.h index 0fc3131..257fa47 100644 --- a/include/configs/MIP405.h +++ b/include/configs/MIP405.h @@ -344,7 +344,6 @@ / #define CONFIG_VIDEO_LOGO #define CONFIG_CONSOLE_EXTRA_INFO -#define CONFIG_VIDEO_SW_CURSOR #undef CONFIG_VIDEO_ONBOARD / * USB support EXPERIMENTAL diff --git a/include/configs/MPC8536DS.h b/include/configs/MPC8536DS.h index 0900540..cba393a 100644 --- a/include/configs/MPC8536DS.h +++ b/include/configs/MPC8536DS.h @@ -507,7 +507,6 @@ #if defined(CONFIG_VIDEO) #define CONFIG_BIOSEMU -#define CONFIG_VIDEO_SW_CURSOR #define CONFIG_ATI_RADEON_FB #define CONFIG_VIDEO_LOGO #define CONFIG_SYS_ISA_IO_BASE_ADDRESS CONFIG_SYS_PCIE3_IO_VIRT diff --git a/include/configs/MPC8544DS.h b/include/configs/MPC8544DS.h index 76eb674..c3d69cb 100644 --- a/include/configs/MPC8544DS.h +++ b/include/configs/MPC8544DS.h @@ -280,7 +280,6 @@ extern unsigned long get_board_sys_clk(unsigned long dummy); #if defined(CONFIG_VIDEO) #define CONFIG_BIOSEMU -#define CONFIG_VIDEO_SW_CURSOR #define CONFIG_ATI_RADEON_FB #define CONFIG_VIDEO_LOGO #define CONFIG_SYS_ISA_IO_BASE_ADDRESS VIDEO_IO_OFFSET diff --git a/include/configs/MPC8572DS.h b/include/configs/MPC8572DS.h index 3f43d75..509728c 100644 --- a/include/configs/MPC8572DS.h +++ b/include/configs/MPC8572DS.h @@ -467,7 +467,6 @@ #if defined(CONFIG_VIDEO) #define CONFIG_BIOSEMU -#define CONFIG_VIDEO_SW_CURSOR #define CONFIG_ATI_RADEON_FB #define CONFIG_VIDEO_LOGO #define CONFIG_SYS_ISA_IO_BASE_ADDRESS VIDEO_IO_OFFSET diff --git a/include/configs/MPC8610HPCD.h b/include/configs/MPC8610HPCD.h index c5295f9..7882b35 100644 --- a/include/configs/MPC8610HPCD.h +++ b/include/configs/MPC8610HPCD.h @@ -26,7 +26,6 @@ #ifdef CONFIG_FSL_DIU_FB #define CONFIG_SYS_DIU_ADDR(CONFIG_SYS_CCSRBAR + 0x2c000) #define CONFIG_CMD_BMP -#define CONFIG_VIDEO_SW_CURSOR #define CONFIG_VID
[U-Boot] [PATCH v2 20/29] Convert CONFIG_CONSOLE_EXTRA_INFO to Kconfig
This converts the following to Kconfig: CONFIG_CONSOLE_EXTRA_INFO Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- Changes in v2: None configs/MIP405T_defconfig| 1 + configs/MIP405_defconfig | 1 + configs/MiniFAP_defconfig| 1 + configs/PIP405_defconfig | 1 + configs/TQM5200_B_HIGHBOOT_defconfig | 1 + configs/TQM5200_B_defconfig | 1 + configs/TQM5200_STK100_defconfig | 1 + configs/TQM5200_defconfig| 1 + configs/charon_defconfig | 1 + configs/icon_defconfig | 1 + configs/ipek01_defconfig | 1 + configs/lwmon5_defconfig | 1 + configs/socrates_defconfig | 1 + drivers/video/Kconfig| 10 ++ include/configs/MIP405.h | 1 - include/configs/PIP405.h | 1 - include/configs/TQM5200.h| 1 - include/configs/icon.h | 1 - include/configs/ipek01.h | 1 - include/configs/lwmon5.h | 1 - include/configs/socrates.h | 1 - scripts/config_whitelist.txt | 1 - 22 files changed, 23 insertions(+), 8 deletions(-) diff --git a/configs/MIP405T_defconfig b/configs/MIP405T_defconfig index f0547bb..bff1dd0 100644 --- a/configs/MIP405T_defconfig +++ b/configs/MIP405T_defconfig @@ -15,4 +15,5 @@ CONFIG_CMD_CACHE=y CONFIG_CMD_FAT=y CONFIG_SYS_NS16550=y CONFIG_CFB_CONSOLE=y +CONFIG_CONSOLE_EXTRA_INFO=y CONFIG_VIDEO_CT69000=y diff --git a/configs/MIP405_defconfig b/configs/MIP405_defconfig index ea66335..22ee85d 100644 --- a/configs/MIP405_defconfig +++ b/configs/MIP405_defconfig @@ -18,4 +18,5 @@ CONFIG_SYS_NS16550=y CONFIG_USB=y CONFIG_USB_STORAGE=y CONFIG_CFB_CONSOLE=y +CONFIG_CONSOLE_EXTRA_INFO=y CONFIG_VIDEO_CT69000=y diff --git a/configs/MiniFAP_defconfig b/configs/MiniFAP_defconfig index 1613855..d42d8a8 100644 --- a/configs/MiniFAP_defconfig +++ b/configs/MiniFAP_defconfig @@ -21,4 +21,5 @@ CONFIG_CMD_FAT=y CONFIG_USB=y CONFIG_USB_STORAGE=y CONFIG_CFB_CONSOLE=y +CONFIG_CONSOLE_EXTRA_INFO=y CONFIG_OF_LIBFDT=y diff --git a/configs/PIP405_defconfig b/configs/PIP405_defconfig index 8b4a7a8..f950ff0 100644 --- a/configs/PIP405_defconfig +++ b/configs/PIP405_defconfig @@ -18,4 +18,5 @@ CONFIG_SYS_NS16550=y CONFIG_USB=y CONFIG_USB_STORAGE=y CONFIG_CFB_CONSOLE=y +CONFIG_CONSOLE_EXTRA_INFO=y CONFIG_VIDEO_CT69000=y diff --git a/configs/TQM5200_B_HIGHBOOT_defconfig b/configs/TQM5200_B_HIGHBOOT_defconfig index 52d8772..c52bc53 100644 --- a/configs/TQM5200_B_HIGHBOOT_defconfig +++ b/configs/TQM5200_B_HIGHBOOT_defconfig @@ -21,4 +21,5 @@ CONFIG_CMD_FAT=y CONFIG_USB=y CONFIG_USB_STORAGE=y CONFIG_CFB_CONSOLE=y +CONFIG_CONSOLE_EXTRA_INFO=y CONFIG_OF_LIBFDT=y diff --git a/configs/TQM5200_B_defconfig b/configs/TQM5200_B_defconfig index 1f70551..834fd11 100644 --- a/configs/TQM5200_B_defconfig +++ b/configs/TQM5200_B_defconfig @@ -21,4 +21,5 @@ CONFIG_CMD_FAT=y CONFIG_USB=y CONFIG_USB_STORAGE=y CONFIG_CFB_CONSOLE=y +CONFIG_CONSOLE_EXTRA_INFO=y CONFIG_OF_LIBFDT=y diff --git a/configs/TQM5200_STK100_defconfig b/configs/TQM5200_STK100_defconfig index 12577e2..53ea06d 100644 --- a/configs/TQM5200_STK100_defconfig +++ b/configs/TQM5200_STK100_defconfig @@ -21,4 +21,5 @@ CONFIG_CMD_FAT=y CONFIG_USB=y CONFIG_USB_STORAGE=y CONFIG_CFB_CONSOLE=y +CONFIG_CONSOLE_EXTRA_INFO=y CONFIG_OF_LIBFDT=y diff --git a/configs/TQM5200_defconfig b/configs/TQM5200_defconfig index 978a07c..497db0a 100644 --- a/configs/TQM5200_defconfig +++ b/configs/TQM5200_defconfig @@ -20,4 +20,5 @@ CONFIG_CMD_FAT=y CONFIG_USB=y CONFIG_USB_STORAGE=y CONFIG_CFB_CONSOLE=y +CONFIG_CONSOLE_EXTRA_INFO=y CONFIG_OF_LIBFDT=y diff --git a/configs/charon_defconfig b/configs/charon_defconfig index 81d2384..004c4d2 100644 --- a/configs/charon_defconfig +++ b/configs/charon_defconfig @@ -20,4 +20,5 @@ CONFIG_CMD_FAT=y CONFIG_USB=y CONFIG_USB_STORAGE=y CONFIG_CFB_CONSOLE=y +CONFIG_CONSOLE_EXTRA_INFO=y CONFIG_OF_LIBFDT=y diff --git a/configs/icon_defconfig b/configs/icon_defconfig index 6218dd4..a61753b 100644 --- a/configs/icon_defconfig +++ b/configs/icon_defconfig @@ -19,4 +19,5 @@ CONFIG_CMD_EXT2=y CONFIG_CMD_FAT=y CONFIG_SYS_NS16550=y CONFIG_CFB_CONSOLE=y +CONFIG_CONSOLE_EXTRA_INFO=y CONFIG_OF_LIBFDT=y diff --git a/configs/ipek01_defconfig b/configs/ipek01_defconfig index bf8d34d..e93eaa2 100644 --- a/configs/ipek01_defconfig +++ b/configs/ipek01_defconfig @@ -15,4 +15,5 @@ CONFIG_CMD_FAT=y CONFIG_USB=y CONFIG_USB_STORAGE=y CONFIG_CFB_CONSOLE=y +CONFIG_CONSOLE_EXTRA_INFO=y CONFIG_OF_LIBFDT=y diff --git a/configs/lwmon5_defconfig b/configs/lwmon5_defconfig index 8d101fc..317c8b6 100644 --- a/configs/lwmon5_defconfig +++ b/configs/lwmon5_defconfig @@ -22,4 +22,5 @@ CONFIG_SYS_NS16550=y CONFIG_USB=y CONFIG_USB_STORAGE=y CONFIG_CFB_CONSOLE=y +CONFIG_CONSOLE_EXTRA_INFO=y CONFIG_OF_LIBFDT=y diff --git a/configs/socrates_defconfig b/configs/socrates_defconfig index 4ade2
[U-Boot] [PATCH v2 15/29] video: Drop the sed13806 driver
This is not used in U-Boot. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- Changes in v2: None README | 5 - drivers/video/Makefile | 1 - drivers/video/cfb_console.c | 9 -- drivers/video/sed13806.c | 286 --- include/sed13806.h | 81 scripts/config_whitelist.txt | 1 - 6 files changed, 383 deletions(-) delete mode 100644 drivers/video/sed13806.c delete mode 100644 include/sed13806.h diff --git a/README b/README index 74ecb79..2dfdc52 100644 --- a/README +++ b/README @@ -1665,11 +1665,6 @@ CBFS (Coreboot Filesystem) support instead. - Video support: - CONFIG_VIDEO_SED13806 - Enable Epson SED13806 driver. This driver supports 8bpp - and 16bpp modes defined by CONFIG_VIDEO_SED13806_8BPP - or CONFIG_VIDEO_SED13806_16BPP - CONFIG_FSL_DIU_FB Enable the Freescale DIU video driver. Reference boards for SOCs that have a DIU should define this macro to enable DIU diff --git a/drivers/video/Makefile b/drivers/video/Makefile index 412c948..ff3617b 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -49,7 +49,6 @@ obj-$(CONFIG_VIDEO_MVEBU) += mvebu_lcd.o obj-$(CONFIG_VIDEO_MXS) += mxsfb.o videomodes.o obj-$(CONFIG_VIDEO_OMAP3) += omap3_dss.o obj-$(CONFIG_VIDEO_SANDBOX_SDL) += sandbox_sdl.o -obj-$(CONFIG_VIDEO_SED13806) += sed13806.o obj-$(CONFIG_VIDEO_SM501) += sm501.o obj-$(CONFIG_VIDEO_SUNXI) += sunxi_display.o videomodes.o obj-$(CONFIG_VIDEO_TEGRA20) += tegra.o diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index aca..ac7c402 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -95,15 +95,6 @@ #define VIDEO_HW_BITBLT #endif -/* - * Defines for the SED13806 driver - */ -#ifdef CONFIG_VIDEO_SED13806 -#define VIDEO_FB_LITTLE_ENDIAN -#define VIDEO_HW_RECTFILL -#define VIDEO_HW_BITBLT -#endif - #if defined(CONFIG_VIDEO_MXS) #define VIDEO_FB_16BPP_WORD_SWAP #endif diff --git a/drivers/video/sed13806.c b/drivers/video/sed13806.c deleted file mode 100644 index cd7fac6..000 --- a/drivers/video/sed13806.c +++ /dev/null @@ -1,286 +0,0 @@ -/* - * (C) Copyright 2002 - * Stäubli Faverges - - * Pierre AUBERT p.aub...@staubli.com - * - * SPDX-License-Identifier:GPL-2.0+ - */ -/* Video support for Epson SED13806 chipset */ - -#include - -#include -#include - -#define readByte(ptrReg)\ -*(volatile unsigned char *)(sed13806.isaBase + ptrReg) - -#define writeByte(ptrReg,value) \ -*(volatile unsigned char *)(sed13806.isaBase + ptrReg) = value - -#define writeWord(ptrReg,value) \ -(*(volatile unsigned short *)(sed13806.isaBase + ptrReg) = ((value >> 8 ) & 0xff) | ((value << 8) & 0xff00)) - -GraphicDevice sed13806; - -/*- - * EpsonSetRegs -- - *- - */ -static void EpsonSetRegs (void) -{ -/* the content of the chipset register depends on the board (clocks, ...)*/ -const S1D_REGS *preg = board_get_regs (); -while (preg -> Index) { - writeByte (preg -> Index, preg -> Value); - preg ++; -} -} - -/*- - * video_hw_init -- - *- - */ -void *video_hw_init (void) -{ -unsigned int *vm, i; - -memset (&sed13806, 0, sizeof (GraphicDevice)); - -/* Initialization of the access to the graphic chipset - Retreive base address of the chipset - (see board/RPXClassic/eccx.c) */ -if ((sed13806.isaBase = board_video_init ()) == 0) { - return (NULL); -} - -sed13806.frameAdrs = sed13806.isaBase + FRAME_BUFFER_OFFSET; -sed13806.winSizeX = board_get_width (); -sed13806.winSizeY = board_get_height (); - -#if defined(CONFIG_VIDEO_SED13806_8BPP) -sed13806.gdfIndex = GDF__8BIT_INDEX; -sed13806.gdfBytesPP = 1; - -#elif defined(CONFIG_VIDEO_SED13806_16BPP) -sed13806.gdfIndex = GDF_16BIT_565RGB; -sed13806.gdfBytesPP = 2; - -#else -#error Unsupported SED13806 BPP -#endif - -sed13806.memSize = sed13806.winSizeX * sed13806.winSizeY * sed13806.gdfBytesPP; - -/* Load SED registers*/ -EpsonSetRegs (); - -/* (see board/RPXClassic/RPXClassic.c) */ -board_validate_screen (sed13806.isaBase); - -/* Clear video memory */ -i = sed13806.memSize/4; -vm = (unsigned int *)sed13806.frameAdrs; -while(i--) - *vm++ = 0; - - -return (&sed13806); -} -/*- - * Epson_w
[U-Boot] [PATCH v2 14/29] video: Drop the s3c-fb driver
This is not used in U-Boot. Signed-off-by: Simon Glass Acked-by: Minkyu Kang Reviewed-by: Tom Rini --- Changes in v2: None drivers/video/Makefile | 1 - drivers/video/cfb_console.c | 2 +- drivers/video/s3c-fb.c | 172 3 files changed, 1 insertion(+), 174 deletions(-) delete mode 100644 drivers/video/s3c-fb.c diff --git a/drivers/video/Makefile b/drivers/video/Makefile index 6bb9e28..412c948 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -48,7 +48,6 @@ obj-$(CONFIG_VIDEO_IPUV3) += mxc_ipuv3_fb.o ipu_common.o ipu_disp.o obj-$(CONFIG_VIDEO_MVEBU) += mvebu_lcd.o obj-$(CONFIG_VIDEO_MXS) += mxsfb.o videomodes.o obj-$(CONFIG_VIDEO_OMAP3) += omap3_dss.o -obj-$(CONFIG_VIDEO_S3C) += s3c-fb.o videomodes.o obj-$(CONFIG_VIDEO_SANDBOX_SDL) += sandbox_sdl.o obj-$(CONFIG_VIDEO_SED13806) += sed13806.o obj-$(CONFIG_VIDEO_SM501) += sm501.o diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index a087d2e..aca 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -104,7 +104,7 @@ #define VIDEO_HW_BITBLT #endif -#if defined(CONFIG_VIDEO_MXS) || defined(CONFIG_VIDEO_S3C) +#if defined(CONFIG_VIDEO_MXS) #define VIDEO_FB_16BPP_WORD_SWAP #endif diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c deleted file mode 100644 index bea3e69..000 --- a/drivers/video/s3c-fb.c +++ /dev/null @@ -1,172 +0,0 @@ -/* - * S3C24x0 LCD driver - * - * NOTE: Only 16/24 bpp operation with TFT LCD is supported. - * - * Copyright (C) 2014 Marek Vasut - * - * SPDX-License-Identifier:GPL-2.0+ - */ -#include -#include -#include - -#include -#include -#include - -#include "videomodes.h" - -static GraphicDevice panel; - -/* S3C requires the FB to be 4MiB aligned. */ -#define S3CFB_ALIGN(4 << 20) - -#define S3CFB_LCDCON1_CLKVAL(x)((x) << 8) -#define S3CFB_LCDCON1_PNRMODE_TFT (0x3 << 5) -#define S3CFB_LCDCON1_BPPMODE_TFT_16BPP(0xc << 1) -#define S3CFB_LCDCON1_BPPMODE_TFT_24BPP(0xd << 1) - -#define S3CFB_LCDCON2_VBPD(x) ((x) << 24) -#define S3CFB_LCDCON2_LINEVAL(x) ((x) << 14) -#define S3CFB_LCDCON2_VFPD(x) ((x) << 6) -#define S3CFB_LCDCON2_VSPW(x) ((x) << 0) - -#define S3CFB_LCDCON3_HBPD(x) ((x) << 19) -#define S3CFB_LCDCON3_HOZVAL(x)((x) << 8) -#define S3CFB_LCDCON3_HFPD(x) ((x) << 0) - -#define S3CFB_LCDCON4_HSPW(x) ((x) << 0) - -#define S3CFB_LCDCON5_BPP24BL (1 << 12) -#define S3CFB_LCDCON5_FRM565 (1 << 11) -#define S3CFB_LCDCON5_HWSWP(1 << 0) - -#definePS2KHZ(ps) (10UL / (ps)) - -/* - * Example: - * setenv videomode video=ctfb:x:800,y:480,depth:16,mode:0,\ - *pclk:30066,le:41,ri:89,up:45,lo:12, - *hs:1,vs:1,sync:100663296,vmode:0 - */ -static void s3c_lcd_init(GraphicDevice *panel, - struct ctfb_res_modes *mode, int bpp) -{ - uint32_t clk_divider; - struct s3c24x0_lcd *regs = s3c24x0_get_base_lcd(); - - /* Stop the controller. */ - clrbits_le32(®s->lcdcon1, 1); - - /* Calculate clock divider. */ - clk_divider = (get_HCLK() / PS2KHZ(mode->pixclock)) / 1000; - clk_divider = DIV_ROUND_UP(clk_divider, 2); - if (clk_divider) - clk_divider -= 1; - - /* Program LCD configuration. */ - switch (bpp) { - case 16: - writel(S3CFB_LCDCON1_BPPMODE_TFT_16BPP | - S3CFB_LCDCON1_PNRMODE_TFT | - S3CFB_LCDCON1_CLKVAL(clk_divider), - ®s->lcdcon1); - writel(S3CFB_LCDCON5_HWSWP | S3CFB_LCDCON5_FRM565, - ®s->lcdcon5); - break; - case 24: - writel(S3CFB_LCDCON1_BPPMODE_TFT_24BPP | - S3CFB_LCDCON1_PNRMODE_TFT | - S3CFB_LCDCON1_CLKVAL(clk_divider), - ®s->lcdcon1); - writel(S3CFB_LCDCON5_BPP24BL, ®s->lcdcon5); - break; - } - - writel(S3CFB_LCDCON2_LINEVAL(mode->yres - 1) | - S3CFB_LCDCON2_VBPD(mode->upper_margin - 1) | - S3CFB_LCDCON2_VFPD(mode->lower_margin - 1) | - S3CFB_LCDCON2_VSPW(mode->vsync_len - 1), - ®s->lcdcon2); - - writel(S3CFB_LCDCON3_HBPD(mode->right_margin - 1) | - S3CFB_LCDCON3_HFPD(mode->left_margin - 1) | - S3CFB_LCDCON3_HOZVAL(mode->xres - 1), - ®s->lcdcon3); - - writel(S3CFB_LCDCON4_HSPW(mode->hsync_len - 1), - ®s->lcdcon4); - - /* Write FB address. */ - writel(panel->frameAdrs >> 1, ®s->lcdsaddr1); - writel((panel->frameAdrs + - (mode->xres * mode->yres * panel->gdfBytesPP)) >> 1, - ®s->lcdsaddr2); - writel(mode->xres * bpp / 16, ®s->lcdsaddr3); - - /* Start
[U-Boot] [PATCH v2 16/29] Convert CONFIG_VGA_AS_SINGLE_DEVICE to Kconfig
This converts the following to Kconfig: CONFIG_VGA_AS_SINGLE_DEVICE Once we migrate to driver model for video, we should be able to drop this option. Signed-off-by: Simon Glass --- Changes in v2: None configs/Chuwi_V7_CW0825_defconfig | 2 +- configs/MSI_Primo81_defconfig | 2 +- configs/T1024QDS_NAND_defconfig | 2 +- configs/T1024QDS_SDCARD_defconfig | 2 +- configs/T1042D4RDB_NAND_defconfig | 2 +- configs/T1042D4RDB_SDCARD_defconfig | 2 +- configs/T1042RDB_PI_NAND_SECURE_BOOT_defconfig | 2 +- configs/T1042RDB_PI_NAND_defconfig | 2 +- configs/T1042RDB_PI_SDCARD_defconfig| 2 +- configs/bayleybay_defconfig | 3 +-- configs/chromebook_link_defconfig | 3 +-- configs/chromebox_panther_defconfig | 3 +-- configs/cm_fx6_defconfig| 1 - configs/conga-qeval20-qa3-e3845-internal-uart_defconfig | 3 +-- configs/conga-qeval20-qa3-e3845_defconfig | 3 +-- configs/coreboot-x86_defconfig | 1 - configs/crownbay_defconfig | 3 +-- configs/dfi-bt700-q7x-151_defconfig | 3 +-- configs/dms-ba16-1g_defconfig | 2 +- configs/dms-ba16_defconfig | 2 +- configs/gwventana_defconfig | 1 - configs/minnowmax_defconfig | 3 +-- configs/mx6cuboxi_defconfig | 1 - configs/mx6qsabrelite_defconfig | 1 - configs/nitrogen6dl2g_defconfig | 1 - configs/nitrogen6dl_defconfig | 1 - configs/nitrogen6q2g_defconfig | 1 - configs/nitrogen6q_defconfig| 1 - configs/nitrogen6s1g_defconfig | 1 - configs/nitrogen6s_defconfig| 1 - configs/novena_defconfig| 1 - configs/qemu-x86_defconfig | 3 +-- configs/qemu-x86_efi_payload32_defconfig| 3 +-- configs/qemu-x86_efi_payload64_defconfig| 3 +-- configs/som-db5800-som-6867_defconfig | 3 +-- configs/tbs2910_defconfig | 1 - configs/theadorable-x86-dfi-bt700_defconfig | 3 +-- configs/theadorable_debug_defconfig | 2 +- configs/theadorable_defconfig | 2 +- drivers/video/Kconfig | 10 ++ drivers/video/cfb_console.c | 6 -- include/configs/MIP405.h| 1 - include/configs/MPC8536DS.h | 1 - include/configs/MPC8544DS.h | 1 - include/configs/MPC8572DS.h | 1 - include/configs/MPC8610HPCD.h | 1 - include/configs/MPC8641HPCN.h | 1 - include/configs/P1022DS.h | 2 -- include/configs/PIP405.h| 1 - include/configs/T102xQDS.h | 1 - include/configs/T102xRDB.h | 1 - include/configs/T1040QDS.h | 1 - include/configs/T104xRDB.h | 1 - include/configs/TQM5200.h | 1 - include/configs/ac14xx.h| 4 include/configs/advantech_dms-ba16.h| 1 - include/configs/aria.h | 4 include/configs/aristainetos-common.h | 1 - include/configs/cgtqmx6eval.h | 1 - include/configs/cm_fx6.h| 1 - include/configs/colibri_imx7.h | 1 - include/configs/controlcenterd.h| 1 - include/configs/digsy_mtc.h | 1 - include/configs/ea20.h | 1 - include/configs/embestmx6boards.h | 1 - include/configs/ge_bx50v3.h | 1 - include/configs/gw_ventana.h| 1 - include/configs/icon.h | 1 - include/configs/imx31_phycore.h | 1 - include/configs/ipek01.h| 1 - include/configs/ls1021aqds.h| 1 - include/configs/ls1021atwr.h| 1 - include/configs/lwmon5.h| 1 - include/configs/m53evk.h|
[U-Boot] [PATCH v2 13/29] video: Drop the imx25lcdc driver
This is not used anywhere in U-Boot. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- Changes in v2: None drivers/video/Makefile| 1 - drivers/video/imx25lcdc.c | 121 -- 2 files changed, 122 deletions(-) delete mode 100644 drivers/video/imx25lcdc.c diff --git a/drivers/video/Makefile b/drivers/video/Makefile index 2df2015..6bb9e28 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -39,7 +39,6 @@ obj-$(CONFIG_VIDEO_BCM2835) += bcm2835.o obj-$(CONFIG_VIDEO_COREBOOT) += coreboot_fb.o obj-$(CONFIG_VIDEO_CT69000) += ct69000.o videomodes.o obj-$(CONFIG_VIDEO_DA8XX) += da8xx-fb.o videomodes.o -obj-$(CONFIG_VIDEO_IMX25LCDC) += imx25lcdc.o videomodes.o obj-$(CONFIG_VIDEO_LCD_ANX9804) += anx9804.o obj-$(CONFIG_VIDEO_LCD_HITACHI_TX18D42VM) += hitachi_tx18d42vm_lcd.o obj-$(CONFIG_VIDEO_LCD_SSD2828) += ssd2828.o diff --git a/drivers/video/imx25lcdc.c b/drivers/video/imx25lcdc.c deleted file mode 100644 index ef5767b..000 --- a/drivers/video/imx25lcdc.c +++ /dev/null @@ -1,121 +0,0 @@ -/* - * (C) Copyright 2011 - * Matthias Weisser - * - * SPDX-License-Identifier:GPL-2.0+ - * - * imx25lcdc.c - Graphic interface for i.MX25 lcd controller - */ - -#include - -#include -#include -#include -#include -#include "videomodes.h" - -/* - * 4MB (at the end of system RAM) - */ -#define VIDEO_MEM_SIZE 0x40 - -#define FB_SYNC_CLK_INV(1<<16) /* pixel clock inverted */ - -/* - * Graphic Device - */ -static GraphicDevice imx25fb; - -void *video_hw_init(void) -{ - struct lcdc_regs *lcdc = (struct lcdc_regs *)IMX_LCDC_BASE; - struct ccm_regs *ccm = (struct ccm_regs *)IMX_CCM_BASE; - GraphicDevice *pGD = &imx25fb; - char *s; - u32 *videomem; - - memset(pGD, 0, sizeof(GraphicDevice)); - - pGD->gdfIndex = GDF_16BIT_565RGB; - pGD->gdfBytesPP = 2; - pGD->memSize = VIDEO_MEM_SIZE; - pGD->frameAdrs = PHYS_SDRAM + PHYS_SDRAM_SIZE - VIDEO_MEM_SIZE; - - videomem = (u32 *)pGD->frameAdrs; - - s = getenv("videomode"); - if (s != NULL) { - struct ctfb_res_modes var_mode; - u32 lsr, lpcr, lhcr, lvcr; - unsigned long div; - int bpp; - - /* Disable all clocks of the LCDC */ - writel(readl(&ccm->cgr0) & ~((1<<7) | (1<<24)), &ccm->cgr0); - writel(readl(&ccm->cgr1) & ~(1<<29), &ccm->cgr1); - - bpp = video_get_params(&var_mode, s); - - if (bpp == 0) { - var_mode.xres = 320; - var_mode.yres = 240; - var_mode.pixclock = 154000; - var_mode.left_margin = 68; - var_mode.right_margin = 20; - var_mode.upper_margin = 4; - var_mode.lower_margin = 18; - var_mode.hsync_len = 40; - var_mode.vsync_len = 6; - var_mode.sync = 0; - var_mode.vmode = 0; - } - - /* Fill memory with white */ - memset(videomem, 0xFF, var_mode.xres * var_mode.yres * 2); - - imx25fb.winSizeX = var_mode.xres; - imx25fb.winSizeY = var_mode.yres; - - /* LCD base clock is 66.6MHZ. We do calculations in kHz */ - div = 66000 / (10L / var_mode.pixclock); - if (div > 63) - div = 63; - if (0 == div) - div = 1; - - lsr = ((var_mode.xres / 16) << 20) | - var_mode.yres; - lpcr = (1 << 31) | - (1 << 30) | - (5 << 25) | - (1 << 23) | - (1 << 22) | - (1 << 19) | - (1 << 7) | - div; - lhcr = (var_mode.right_margin << 0) | - (var_mode.left_margin << 8) | - (var_mode.hsync_len << 26); - - lvcr = (var_mode.lower_margin << 0) | - (var_mode.upper_margin << 8) | - (var_mode.vsync_len << 26); - - writel((uint32_t)videomem, &lcdc->lssar); - writel(lsr, &lcdc->lsr); - writel(var_mode.xres * 2 / 4, &lcdc->lvpwr); - writel(lpcr, &lcdc->lpcr); - writel(lhcr, &lcdc->lhcr); - writel(lvcr, &lcdc->lvcr); - writel(0x00040060, &lcdc->ldcr); - - writel(0xA90300, &lcdc->lpccr); - - /* Ensable all clocks of the LCDC */ - writel(readl(&ccm->cgr0) | ((1<<7) | (1<<24)), &ccm->cgr0); - writel(readl(&ccm->cgr1) | (1<<29), &ccm->cgr1); - } - - return pGD; -} -- 2.8.0.rc3.226.g39d4020 __
[U-Boot] [PATCH v2 11/29] Convert CONFIG_SYS_CONSOLE_BG_COL et al to Kconfig
This converts the following to Kconfig: CONFIG_SYS_CONSOLE_BG_COL CONFIG_SYS_CONSOLE_FG_COL Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- Changes in v2: None README | 5 --- configs/pxm2_defconfig | 2 + configs/rut_defconfig| 2 + drivers/video/Kconfig| 22 ++ drivers/video/cfb_console.c | 98 ++-- drivers/video/ct69000.c | 3 +- include/configs/pxm2.h | 2 - include/configs/rut.h| 2 - include/video_fb.h | 8 scripts/config_whitelist.txt | 2 - 10 files changed, 78 insertions(+), 68 deletions(-) diff --git a/README b/README index 5df8b6b..e1d4dfc 100644 --- a/README +++ b/README @@ -810,11 +810,6 @@ The following options need to be configured: port routines must be defined elsewhere (i.e. serial_init(), serial_getc(), ...) - CONFIG_SYS_CONSOLE_BG_COL: define the backgroundcolor, default - is 0x00. - CONFIG_SYS_CONSOLE_FG_COL: define the foregroundcolor, default - is 0xa0. - - Console Baudrate: CONFIG_BAUDRATE - in bps Select one of the baudrates listed in diff --git a/configs/pxm2_defconfig b/configs/pxm2_defconfig index bc7245c..bfac212 100644 --- a/configs/pxm2_defconfig +++ b/configs/pxm2_defconfig @@ -56,3 +56,5 @@ CONFIG_G_DNL_MANUFACTURER="Siemens AG" CONFIG_G_DNL_VENDOR_NUM=0x0908 CONFIG_G_DNL_PRODUCT_NUM=0x02d2 CONFIG_CFB_CONSOLE=y +CONFIG_SYS_CONSOLE_BG_COL=0xff +CONFIG_SYS_CONSOLE_FG_COL=0x00 diff --git a/configs/rut_defconfig b/configs/rut_defconfig index 870f928..eda5d7b 100644 --- a/configs/rut_defconfig +++ b/configs/rut_defconfig @@ -56,3 +56,5 @@ CONFIG_G_DNL_MANUFACTURER="Siemens AG" CONFIG_G_DNL_VENDOR_NUM=0x0908 CONFIG_G_DNL_PRODUCT_NUM=0x02d2 CONFIG_CFB_CONSOLE=y +CONFIG_SYS_CONSOLE_BG_COL=0xff +CONFIG_SYS_CONSOLE_FG_COL=0x00 diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 20ae11e..de6f419 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -498,4 +498,26 @@ config VIDEO_CT69000 - "videomode=bootargs" all the video parameters are parsed from the bootargs. (See drivers/video/videomodes.c) +config SYS_CONSOLE_BG_COL + hex "Background colour" + depends on CFB_CONSOLE || VIDEO_CT69000 + default 0x00 + help + Defines the background colour for the console. The value is from + 0x00 to 0xff and the meaning depends on the graphics card. + Typically, 0x00 means black and 0xff means white. Do not set + the background and foreground to the same colour or you will see + nothing. + +config SYS_CONSOLE_FG_COL + hex "Foreground colour" + depends on CFB_CONSOLE || VIDEO_CT69000 + default 0xa0 + help + Defines the foreground colour for the console. The value is from + 0x00 to 0xff and the meaning depends on the graphics card. + Typically, 0x00 means black and 0xff means white. Do not set + the background and foreground to the same colour or you will see + nothing. + endmenu diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index 30b53db..949187c 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -2093,70 +2093,72 @@ static int video_init(void) /* Init drawing pats */ switch (VIDEO_DATA_FORMAT) { case GDF__8BIT_INDEX: - video_set_lut(0x01, CONSOLE_FG_COL, CONSOLE_FG_COL, - CONSOLE_FG_COL); - video_set_lut(0x00, CONSOLE_BG_COL, CONSOLE_BG_COL, - CONSOLE_BG_COL); + video_set_lut(0x01, CONFIG_SYS_CONSOLE_FG_COL, + CONFIG_SYS_CONSOLE_FG_COL, + CONFIG_SYS_CONSOLE_FG_COL); + video_set_lut(0x00, CONFIG_SYS_CONSOLE_BG_COL, + CONFIG_SYS_CONSOLE_BG_COL, + CONFIG_SYS_CONSOLE_BG_COL); fgx = 0x01010101; bgx = 0x; break; case GDF__8BIT_332RGB: - color8 = ((CONSOLE_FG_COL & 0xe0) | - ((CONSOLE_FG_COL >> 3) & 0x1c) | - CONSOLE_FG_COL >> 6); + color8 = ((CONFIG_SYS_CONSOLE_FG_COL & 0xe0) | + ((CONFIG_SYS_CONSOLE_FG_COL >> 3) & 0x1c) | + CONFIG_SYS_CONSOLE_FG_COL >> 6); fgx = (color8 << 24) | (color8 << 16) | (color8 << 8) | color8; - color8 = ((CONSOLE_BG_COL & 0xe0) | - ((CONSOLE_BG_COL >> 3) & 0x1c) | - CONSOLE_BG_COL >> 6); + color8 = ((CONFIG_SYS_CONSOLE_BG_COL & 0xe0) | + ((CONFIG_SYS_CONSOLE_BG_COL >> 3) & 0x1c) | +
[U-Boot] [PATCH v2 10/29] Convert CONFIG_VIDEO_CT69000 to Kconfig
This converts the following to Kconfig: CONFIG_VIDEO_CT69000 Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- Changes in v2: None README | 23 --- configs/MIP405T_defconfig| 1 + configs/MIP405_defconfig | 1 + configs/PIP405_defconfig | 1 + drivers/video/Kconfig| 27 +++ include/configs/MIP405.h | 1 - include/configs/PIP405.h | 1 - scripts/config_whitelist.txt | 1 - 8 files changed, 30 insertions(+), 26 deletions(-) diff --git a/README b/README index d3b0a1b..5df8b6b 100644 --- a/README +++ b/README @@ -1670,35 +1670,12 @@ CBFS (Coreboot Filesystem) support instead. - Video support: - CONFIG_VIDEO_CT69000 - - Enable Chips & Technologies 69000 Video chip - CONFIG_VIDEO_SMI_LYNXEM Enable Silicon Motion SMI 712/710/810 Video chip. The video output is selected via environment 'videoout' (1 = LCD and 2 = CRT). If videoout is undefined, CRT is assumed. - For the CT69000 and SMI_LYNXEM drivers, videomode is - selected via environment 'videomode'. Two different ways - are possible: - - "videomode=num" 'num' is a standard LiLo mode numbers. - Following standard modes are supported (* is default): - - Colors640x480 800x600 1024x768 1152x864 1280x1024 - -+- - 8 bits | 0x301* 0x3030x3050x161 0x307 -15 bits | 0x310 0x3130x3160x162 0x319 -16 bits | 0x311 0x3140x3170x163 0x31A -24 bits | 0x312 0x3150x318 ? 0x31B - -+- - (i.e. setenv videomode 317; saveenv; reset;) - - - "videomode=bootargs" all the video parameters are parsed - from the bootargs. (See drivers/video/videomodes.c) - - CONFIG_VIDEO_SED13806 Enable Epson SED13806 driver. This driver supports 8bpp and 16bpp modes defined by CONFIG_VIDEO_SED13806_8BPP diff --git a/configs/MIP405T_defconfig b/configs/MIP405T_defconfig index 0129346..f0547bb 100644 --- a/configs/MIP405T_defconfig +++ b/configs/MIP405T_defconfig @@ -15,3 +15,4 @@ CONFIG_CMD_CACHE=y CONFIG_CMD_FAT=y CONFIG_SYS_NS16550=y CONFIG_CFB_CONSOLE=y +CONFIG_VIDEO_CT69000=y diff --git a/configs/MIP405_defconfig b/configs/MIP405_defconfig index 015d311..ea66335 100644 --- a/configs/MIP405_defconfig +++ b/configs/MIP405_defconfig @@ -18,3 +18,4 @@ CONFIG_SYS_NS16550=y CONFIG_USB=y CONFIG_USB_STORAGE=y CONFIG_CFB_CONSOLE=y +CONFIG_VIDEO_CT69000=y diff --git a/configs/PIP405_defconfig b/configs/PIP405_defconfig index 6393bca..8b4a7a8 100644 --- a/configs/PIP405_defconfig +++ b/configs/PIP405_defconfig @@ -18,3 +18,4 @@ CONFIG_SYS_NS16550=y CONFIG_USB=y CONFIG_USB_STORAGE=y CONFIG_CFB_CONSOLE=y +CONFIG_VIDEO_CT69000=y diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index b73d1a3..20ae11e 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -471,4 +471,31 @@ config CFB_CONSOLE_ANSI erase functions and limited graphics rendition control). Normal output from U-Boot will pass through this filter. +config VIDEO_CT69000 + bool "Enable Chips & Technologies 69000 video driver" + depends on VIDEO + help + This enables a frame buffer driver for the Chips & Technologies + ct69000, a fairly old graphics device (circa 2000) which is used + on some hardware. It operates over the ISA bus, and supports + some acceleration features. + + For the CT69000 and SMI_LYNXEM drivers, videomode is + selected via environment 'videomode'. Two different ways + are possible: + - "videomode=num" 'num' is a standard LiLo mode numbers. + Following standard modes are supported (* is default): + + Colors640x480 800x600 1024x768 1152x864 1280x1024 + -+- + 8 bits | 0x301* 0x3030x3050x161 0x307 +15 bits | 0x310 0x3130x3160x162 0x319 +16 bits | 0x311 0x3140x3170x163 0x31A +24 bits | 0x312 0x3150x318 ? 0x31B + -+- + (i.e. setenv videomode 317; saveenv; reset;) + + - "videomode=bootargs" all the video parameters are parsed + from the bootargs. (See drivers/video/videomodes.c) + endmenu diff --git a/include/configs/MIP405.h b/include/confi
[U-Boot] [PATCH v2 09/29] Convert CONFIG_CFB_CONSOLE_ANSI to Kconfig
This converts the following to Kconfig: CONFIG_CFB_CONSOLE_ANSI Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- Changes in v2: None README | 4 configs/T1042D4RDB_NAND_defconfig | 1 + configs/T1042D4RDB_SDCARD_defconfig| 1 + configs/T1042D4RDB_SECURE_BOOT_defconfig | 1 + configs/T1042D4RDB_SPIFLASH_defconfig | 1 + configs/T1042D4RDB_defconfig | 1 + configs/T1042RDB_PI_NAND_SECURE_BOOT_defconfig | 1 + configs/T1042RDB_PI_NAND_defconfig | 1 + configs/T1042RDB_PI_SDCARD_defconfig | 1 + configs/T1042RDB_PI_SPIFLASH_defconfig | 1 + configs/T1042RDB_PI_defconfig | 1 + configs/nokia_rx51_defconfig | 1 + configs/tbs2910_defconfig | 1 + drivers/video/Kconfig | 9 + include/configs/T104xRDB.h | 1 - include/configs/nokia_rx51.h | 1 - include/configs/tbs2910.h | 1 - scripts/config_whitelist.txt | 1 - 18 files changed, 21 insertions(+), 8 deletions(-) diff --git a/README b/README index ce6ea7a..d3b0a1b 100644 --- a/README +++ b/README @@ -810,10 +810,6 @@ The following options need to be configured: port routines must be defined elsewhere (i.e. serial_init(), serial_getc(), ...) - When CONFIG_CFB_CONSOLE_ANSI is defined, console will support - a limited number of ANSI escape sequences (cursor control, - erase functions and limited graphics rendition control). - CONFIG_SYS_CONSOLE_BG_COL: define the backgroundcolor, default is 0x00. CONFIG_SYS_CONSOLE_FG_COL: define the foregroundcolor, default diff --git a/configs/T1042D4RDB_NAND_defconfig b/configs/T1042D4RDB_NAND_defconfig index 00b8471..fff6c4d 100644 --- a/configs/T1042D4RDB_NAND_defconfig +++ b/configs/T1042D4RDB_NAND_defconfig @@ -39,4 +39,5 @@ CONFIG_USB=y CONFIG_USB_STORAGE=y CONFIG_VIDEO=y CONFIG_CFB_CONSOLE=y +CONFIG_CFB_CONSOLE_ANSI=y CONFIG_OF_LIBFDT=y diff --git a/configs/T1042D4RDB_SDCARD_defconfig b/configs/T1042D4RDB_SDCARD_defconfig index bcc41a8..657a2cb 100644 --- a/configs/T1042D4RDB_SDCARD_defconfig +++ b/configs/T1042D4RDB_SDCARD_defconfig @@ -39,4 +39,5 @@ CONFIG_USB=y CONFIG_USB_STORAGE=y CONFIG_VIDEO=y CONFIG_CFB_CONSOLE=y +CONFIG_CFB_CONSOLE_ANSI=y CONFIG_OF_LIBFDT=y diff --git a/configs/T1042D4RDB_SECURE_BOOT_defconfig b/configs/T1042D4RDB_SECURE_BOOT_defconfig index dabd474..5b2c36f 100644 --- a/configs/T1042D4RDB_SECURE_BOOT_defconfig +++ b/configs/T1042D4RDB_SECURE_BOOT_defconfig @@ -32,6 +32,7 @@ CONFIG_FSL_ESPI=y CONFIG_USB=y CONFIG_USB_STORAGE=y CONFIG_CFB_CONSOLE=y +CONFIG_CFB_CONSOLE_ANSI=y CONFIG_RSA=y CONFIG_SPL_RSA=y CONFIG_OF_LIBFDT=y diff --git a/configs/T1042D4RDB_SPIFLASH_defconfig b/configs/T1042D4RDB_SPIFLASH_defconfig index 5d6dbbc..9d8fa4f 100644 --- a/configs/T1042D4RDB_SPIFLASH_defconfig +++ b/configs/T1042D4RDB_SPIFLASH_defconfig @@ -40,4 +40,5 @@ CONFIG_FSL_ESPI=y CONFIG_USB=y CONFIG_USB_STORAGE=y CONFIG_CFB_CONSOLE=y +CONFIG_CFB_CONSOLE_ANSI=y CONFIG_OF_LIBFDT=y diff --git a/configs/T1042D4RDB_defconfig b/configs/T1042D4RDB_defconfig index 9c271b4..f5ca856 100644 --- a/configs/T1042D4RDB_defconfig +++ b/configs/T1042D4RDB_defconfig @@ -30,4 +30,5 @@ CONFIG_FSL_ESPI=y CONFIG_USB=y CONFIG_USB_STORAGE=y CONFIG_CFB_CONSOLE=y +CONFIG_CFB_CONSOLE_ANSI=y CONFIG_OF_LIBFDT=y diff --git a/configs/T1042RDB_PI_NAND_SECURE_BOOT_defconfig b/configs/T1042RDB_PI_NAND_SECURE_BOOT_defconfig index 931c93c..c915b17 100644 --- a/configs/T1042RDB_PI_NAND_SECURE_BOOT_defconfig +++ b/configs/T1042RDB_PI_NAND_SECURE_BOOT_defconfig @@ -43,6 +43,7 @@ CONFIG_USB=y CONFIG_USB_STORAGE=y CONFIG_VIDEO=y CONFIG_CFB_CONSOLE=y +CONFIG_CFB_CONSOLE_ANSI=y CONFIG_RSA=y CONFIG_SPL_RSA=y CONFIG_OF_LIBFDT=y diff --git a/configs/T1042RDB_PI_NAND_defconfig b/configs/T1042RDB_PI_NAND_defconfig index 3af01b8..ffd0ec1 100644 --- a/configs/T1042RDB_PI_NAND_defconfig +++ b/configs/T1042RDB_PI_NAND_defconfig @@ -39,4 +39,5 @@ CONFIG_USB=y CONFIG_USB_STORAGE=y CONFIG_VIDEO=y CONFIG_CFB_CONSOLE=y +CONFIG_CFB_CONSOLE_ANSI=y CONFIG_OF_LIBFDT=y diff --git a/configs/T1042RDB_PI_SDCARD_defconfig b/configs/T1042RDB_PI_SDCARD_defconfig index c90a708..9a41b6a 100644 --- a/configs/T1042RDB_PI_SDCARD_defconfig +++ b/configs/T1042RDB_PI_SDCARD_defconfig @@ -39,4 +39,5 @@ CONFIG_USB=y CONFIG_USB_STORAGE=y CONFIG_VIDEO=y CONFIG_CFB_CONSOLE=y +CONFIG_CFB_CONSOLE_ANSI=y CONFIG_OF_LIBFDT=y diff --git a/configs/T1042RDB_PI_SPIFLASH_defconfig b/configs/T1042RDB_PI_SPIFLASH_defconfig index 6d8bc36..4f964c1 100644 --- a/configs/T1042RDB_PI_SPIFLASH_defconfig +++ b/configs/T1042RDB_PI_SPIFLASH_defconfig @@ -40,4 +40,5 @@ CONFIG_FSL_ESPI=y CONFIG_USB=y CONFIG_USB_STORAGE=y CONFIG_CFB_CONSOLE
[U-Boot] [PATCH v2 07/29] Convert CONFIG_VIDEO to Kconfig
This converts the following to Kconfig: CONFIG_VIDEO Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- Changes in v2: None README | 5 - configs/MIP405T_defconfig | 1 + configs/MIP405_defconfig| 1 + configs/MPC8536DS_36BIT_defconfig | 1 + configs/MPC8536DS_SDCARD_defconfig | 1 + configs/MPC8536DS_SPIFLASH_defconfig| 1 + configs/MPC8536DS_defconfig | 1 + configs/MPC8544DS_defconfig | 1 + configs/MPC8572DS_36BIT_defconfig | 1 + configs/MPC8572DS_defconfig | 1 + configs/MPC8610HPCD_defconfig | 1 + configs/MPC8641HPCN_36BIT_defconfig | 1 + configs/MPC8641HPCN_defconfig | 1 + configs/MiniFAP_defconfig | 1 + configs/PIP405_defconfig| 1 + configs/T1024QDS_DDR4_SECURE_BOOT_defconfig | 1 + configs/T1024QDS_DDR4_defconfig | 1 + configs/T1024QDS_NAND_defconfig | 1 + configs/T1024QDS_SDCARD_defconfig | 1 + configs/T1024QDS_SECURE_BOOT_defconfig | 1 + configs/T1024QDS_SPIFLASH_defconfig | 1 + configs/T1024QDS_defconfig | 1 + configs/T1040QDS_DDR4_defconfig | 1 + configs/T1040QDS_SECURE_BOOT_defconfig | 1 + configs/T1040QDS_defconfig | 1 + configs/T1042D4RDB_NAND_defconfig | 1 + configs/T1042D4RDB_SDCARD_defconfig | 1 + configs/T1042D4RDB_SECURE_BOOT_defconfig| 1 + configs/T1042D4RDB_SPIFLASH_defconfig | 1 + configs/T1042D4RDB_defconfig| 1 + configs/T1042RDB_PI_NAND_SECURE_BOOT_defconfig | 1 + configs/T1042RDB_PI_NAND_defconfig | 1 + configs/T1042RDB_PI_SDCARD_defconfig| 1 + configs/T1042RDB_PI_SPIFLASH_defconfig | 1 + configs/T1042RDB_PI_defconfig | 1 + configs/TQM5200_B_HIGHBOOT_defconfig| 1 + configs/TQM5200_B_defconfig | 1 + configs/TQM5200_STK100_defconfig| 1 + configs/TQM5200_defconfig | 1 + configs/aristainetos2_defconfig | 1 + configs/aristainetos2b_defconfig| 1 + configs/aristainetos_defconfig | 1 + configs/bayleybay_defconfig | 1 + configs/cgtqmx6eval_defconfig | 1 + configs/charon_defconfig| 1 + configs/chromebook_link_defconfig | 1 + configs/chromebox_panther_defconfig | 1 + configs/cm-bf548_defconfig | 1 + configs/cm_fx6_defconfig| 1 + configs/colibri_imx7_defconfig | 1 + configs/conga-qeval20-qa3-e3845-internal-uart_defconfig | 1 + configs/conga-qeval20-qa3-e3845_defconfig | 1 + configs/controlcenterd_36BIT_SDCARD_DEVELOP_defconfig | 1 + configs/controlcenterd_36BIT_SDCARD_defconfig | 1 + configs/coreboot-x86_defconfig | 1 + configs/crownbay_defconfig | 1 + configs/dfi-bt700-q7x-151_defconfig | 1 + configs/digsy_mtc_RAMBOOT_defconfig | 1 + configs/digsy_mtc_defconfig | 1 + configs/digsy_mtc_rev5_RAMBOOT_defconfig| 1 + configs/digsy_mtc_rev5_defconfig| 1 + configs/dms-ba16-1g_defconfig | 1 + configs/dms-ba16_defconfig | 1 + configs/ea20_defconfig | 1 + configs/eb_cpu5282_defconfig| 1 + configs/eb_cpu5282_internal_defconfig | 1 + configs/fo300_defconfig | 1 + configs/gwventana_defconfig | 1 + configs/icon_defconfig | 1 + configs/imx31_phycore_eet_defconfig | 1 + configs/ipek01_defconfig| 1 + configs/ls1021aqds_ddr4_nor_defconfig | 1 + configs/ls1021aqds_ddr4_nor_lpuart_defconfig| 1 + configs/ls1021aqds_nand_defconfig | 1 + configs/ls1021aqds_nor_SECURE_BOOT_defconfig| 1 + configs/ls1021aqds_nor_defconfig| 1 + configs/ls1021aqds_nor_lpuart_defconfig | 1 + configs/l
[U-Boot] [PATCH v2 12/29] video: Drop the smiLynxEM driver
This is not used in U-Boot anymore. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- Changes in v2: None README | 6 - drivers/video/Makefile | 1 - drivers/video/cfb_console.c | 13 - drivers/video/smiLynxEM.c| 835 --- scripts/config_whitelist.txt | 1 - 5 files changed, 856 deletions(-) delete mode 100644 drivers/video/smiLynxEM.c diff --git a/README b/README index e1d4dfc..74ecb79 100644 --- a/README +++ b/README @@ -1665,12 +1665,6 @@ CBFS (Coreboot Filesystem) support instead. - Video support: - CONFIG_VIDEO_SMI_LYNXEM - Enable Silicon Motion SMI 712/710/810 Video chip. The - video output is selected via environment 'videoout' - (1 = LCD and 2 = CRT). If videoout is undefined, CRT is - assumed. - CONFIG_VIDEO_SED13806 Enable Epson SED13806 driver. This driver supports 8bpp and 16bpp modes defined by CONFIG_VIDEO_SED13806_8BPP diff --git a/drivers/video/Makefile b/drivers/video/Makefile index 3f045fe..2df2015 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -53,7 +53,6 @@ obj-$(CONFIG_VIDEO_S3C) += s3c-fb.o videomodes.o obj-$(CONFIG_VIDEO_SANDBOX_SDL) += sandbox_sdl.o obj-$(CONFIG_VIDEO_SED13806) += sed13806.o obj-$(CONFIG_VIDEO_SM501) += sm501.o -obj-$(CONFIG_VIDEO_SMI_LYNXEM) += smiLynxEM.o videomodes.o obj-$(CONFIG_VIDEO_SUNXI) += sunxi_display.o videomodes.o obj-$(CONFIG_VIDEO_TEGRA20) += tegra.o obj-$(CONFIG_VIDEO_VCXK) += bus_vcxk.o diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index 949187c..a087d2e 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -27,7 +27,6 @@ * * (for SMI LynxE graphic chip) * - * CONFIG_VIDEO_SMI_LYNXEM- use graphic driver for SMI 710,712,810 * VIDEO_FB_LITTLE_ENDIAN - framebuffer organisation default: big endian * VIDEO_HW_RECTFILL - graphic driver supports hardware rectangle fill * VIDEO_HW_BITBLT - graphic driver supports hardware bit blt @@ -87,18 +86,6 @@ #include /* - * Console device defines with SMI graphic - * Any other graphic must change this section - */ - -#ifdef CONFIG_VIDEO_SMI_LYNXEM - -#define VIDEO_FB_LITTLE_ENDIAN -#define VIDEO_HW_RECTFILL -#define VIDEO_HW_BITBLT -#endif - -/* * Defines for the CT69000 driver */ #ifdef CONFIG_VIDEO_CT69000 diff --git a/drivers/video/smiLynxEM.c b/drivers/video/smiLynxEM.c deleted file mode 100644 index 1880ccc..000 --- a/drivers/video/smiLynxEM.c +++ /dev/null @@ -1,835 +0,0 @@ -/* - * (C) Copyright 1997-2002 ELTEC Elektronik AG - * Frank Gottschling - * - * SPDX-License-Identifier:GPL-2.0+ - */ - -/* - * smiLynxEM.c - * - * Silicon Motion graphic interface for sm810/sm710/sm712 accelerator - * - * modification history - * - * 04-18-2002 Rewritten for U-Boot . - * - * 18-03-2004 - Unify videomodes handling with the ct69000 - *- The video output can be set via the variable "videoout" - * in the environment. - * videoout=1 output on LCD - * videoout=2 output on CRT (default value) - * - */ - -#include - -#include -#include -#include "videomodes.h" -/* - * Export Graphic Device - */ -GraphicDevice smi; - -/* - * SMI 710/712 have 4MB internal RAM; SMI 810 2MB internal + 2MB external - */ -#define VIDEO_MEM_SIZE 0x40 - - -/* - * ISA mapped regs - */ -#define SMI_INDX_C4(pGD->isaBase + 0x03c4)/* index reg */ -#define SMI_DATA_C5(pGD->isaBase + 0x03c5)/* data reg */ -#define SMI_INDX_D4(pGD->isaBase + 0x03d4)/* index reg */ -#define SMI_DATA_D5(pGD->isaBase + 0x03d5)/* data reg */ -#define SMI_ISR1 (pGD->isaBase + 0x03ca) -#define SMI_INDX_CE(pGD->isaBase + 0x03ce)/* index reg */ -#define SMI_DATA_CF(pGD->isaBase + 0x03cf)/* data reg */ -#define SMI_LOCK_REG (pGD->isaBase + 0x03c3)/* unlock/lock ext crt reg */ -#define SMI_MISC_REG (pGD->isaBase + 0x03c2)/* misc reg */ -#define SMI_LUT_MASK (pGD->isaBase + 0x03c6)/* lut mask reg */ -#define SMI_LUT_START (pGD->isaBase + 0x03c8)/* lut start index */ -#define SMI_LUT_RGB(pGD->isaBase + 0x03c9)/* lut colors auto incr.*/ -#define SMI_INDX_ATTR (pGD->isaBase + 0x03c0)/* attributes index reg */ - -/* - * Video processor control - */ -typedef struct { - unsigned int control; - unsigned int colorKey; - unsigned int colorKeyMask; - unsigned int start; - unsigned short offset; - unsigned short width; - unsigned int fifoPrio; - unsigned int fifoERL; - unsigned int YUVtoRGB; -} SmiVideoProc; - -/* - * Video window control - */ -typedef struct { - unsigned short top;
[U-Boot] [PATCH v2 06/29] config: Drop CONFIG_CONSOLE_DEV
This is not really a config. Rename it to avoid confusion. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- Changes in v2: None include/configs/advantech_dms-ba16.h | 4 ++-- include/configs/aristainetos-common.h | 2 +- include/configs/aristainetos.h| 2 +- include/configs/aristainetos2.h | 2 +- include/configs/aristainetos2b.h | 2 +- include/configs/cgtqmx6eval.h | 4 ++-- include/configs/el6x_common.h | 2 +- include/configs/embestmx6boards.h | 2 +- include/configs/ge_bx50v3.h | 4 ++-- include/configs/mx6cuboxi.h | 4 ++-- include/configs/mx6qsabreauto.h | 2 +- include/configs/mx6sabre_common.h | 2 +- include/configs/mx6sabresd.h | 2 +- include/configs/o2dnt-common.h| 6 +++--- include/configs/pcm058.h | 2 +- include/configs/tqma6.h | 2 +- include/configs/tqma6_mba6.h | 2 +- include/configs/tqma6_wru4.h | 2 +- include/configs/zc5202.h | 2 +- include/configs/zc5601.h | 2 +- scripts/config_whitelist.txt | 1 - 21 files changed, 26 insertions(+), 27 deletions(-) diff --git a/include/configs/advantech_dms-ba16.h b/include/configs/advantech_dms-ba16.h index 22410ce..4f07f23 100644 --- a/include/configs/advantech_dms-ba16.h +++ b/include/configs/advantech_dms-ba16.h @@ -16,7 +16,7 @@ #define CONFIG_DEFAULT_FDT_FILE"imx6q-dms-ba16.dtb" #define CONFIG_MXC_UART_BASE UART4_BASE -#define CONFIG_CONSOLE_DEV "ttymxc3" +#define CONSOLE_DEV"ttymxc3" #define CONFIG_EXTRA_BOOTARGS "panic=10" #define CONFIG_BOOT_DIR"" @@ -117,7 +117,7 @@ "fdt_addr=0x1800\0" \ "boot_fdt=yes\0" \ "ip_dyn=yes\0" \ - "console=" CONFIG_CONSOLE_DEV "\0" \ + "console=" CONSOLE_DEV "\0" \ "fdt_high=0x\0" \ "initrd_high=0x\0" \ "sddev=0\0" \ diff --git a/include/configs/aristainetos-common.h b/include/configs/aristainetos-common.h index 7d6a7bf..c31d9ad 100644 --- a/include/configs/aristainetos-common.h +++ b/include/configs/aristainetos-common.h @@ -57,7 +57,7 @@ "rescue_sys_length=f1\0" \ "panel=lb07wv8\0" \ "splashpos=m,m\0" \ - "console=" CONFIG_CONSOLE_DEV "\0" \ + "console=" CONSOLE_DEV "\0" \ "fdt_high=0x\0" \ "initrd_high=0x\0" \ "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0" \ diff --git a/include/configs/aristainetos.h b/include/configs/aristainetos.h index be93deb..1799cc1 100644 --- a/include/configs/aristainetos.h +++ b/include/configs/aristainetos.h @@ -18,7 +18,7 @@ #define CONFIG_BOARDNAME "aristainetos" #define CONFIG_MXC_UART_BASE UART5_BASE -#define CONFIG_CONSOLE_DEV "ttymxc4" +#define CONSOLE_DEV"ttymxc4" #define CONFIG_FEC_XCV_TYPERMII diff --git a/include/configs/aristainetos2.h b/include/configs/aristainetos2.h index 152f5e9..8fa3eb5 100644 --- a/include/configs/aristainetos2.h +++ b/include/configs/aristainetos2.h @@ -19,7 +19,7 @@ #define CONFIG_BOARD_LATE_INIT #define CONFIG_MXC_UART_BASE UART2_BASE -#define CONFIG_CONSOLE_DEV "ttymxc1" +#define CONSOLE_DEV"ttymxc1" #define CONFIG_FEC_XCV_TYPERGMII #define CONFIG_PHY_MICREL_KSZ9031 diff --git a/include/configs/aristainetos2b.h b/include/configs/aristainetos2b.h index 78791db..df9b5c9 100644 --- a/include/configs/aristainetos2b.h +++ b/include/configs/aristainetos2b.h @@ -19,7 +19,7 @@ #define CONFIG_BOARD_LATE_INIT #define CONFIG_MXC_UART_BASE UART2_BASE -#define CONFIG_CONSOLE_DEV "ttymxc1" +#define CONSOLE_DEV"ttymxc1" #define CONFIG_FEC_XCV_TYPERGMII #define CONFIG_PHY_MICREL_KSZ9031 diff --git a/include/configs/cgtqmx6eval.h b/include/configs/cgtqmx6eval.h index 637bed2..6a25f2b 100644 --- a/include/configs/cgtqmx6eval.h +++ b/include/configs/cgtqmx6eval.h @@ -133,7 +133,7 @@ /* Command definition */ #define CONFIG_MXC_UART_BASE UART2_BASE -#define CONFIG_CONSOLE_DEV "ttymxc1" +#define CONSOLE_DEV"ttymxc1" #define CONFIG_MMCROOT "/dev/mmcblk0p2" #define CONFIG_SYS_MMC_ENV_DEV 0 @@ -145,7 +145,7 @@ "fdt_addr_r=0x1800\0" \ "boot_fdt=try\0" \ "ip_dyn=yes\0" \ - "console=" CONFIG_CONSOLE_DEV "\0" \ + "console=" CONSOLE_DEV "\0" \ "dfuspi=dfu 0 sf 0:0:1000:0\0" \ "dfu_alt_info_spl=spl raw 0x400\0" \ "dfu_alt_info_img=u-boot raw 0x1\0" \ diff --git a/include/configs/el6x_common.h b/include/configs/el6x_common.h index 81b79b2..7e9bcb1 100644 --- a/include/configs/el6x_common.h +++ b/include/configs/el6x_common.h @@ -73,7 +73,7 @@ "board="__stringify(CONFIG_BOARD_NAME)"\0" \ "cma_size="__stringify(EL6Q_CMA_SIZE)"\0" \ "chp_size="__stringify(EL6Q_COHERENT_POOL_SIZE)"\0" \ - "co
[U-Boot] [PATCH v2 05/29] config: Drop CONFIG_CONSOLE
This is not really a config. Rename it to avoid confusion. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- Changes in v2: None include/configs/MPC8349ITX.h | 6 +++--- scripts/config_whitelist.txt | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/configs/MPC8349ITX.h b/include/configs/MPC8349ITX.h index 177718e..0fbc1fd 100644 --- a/include/configs/MPC8349ITX.h +++ b/include/configs/MPC8349ITX.h @@ -358,7 +358,7 @@ boards, we say we have two, but don't display a message if we find only one. */ #define CONFIG_SYS_BAUDRATE_TABLE \ {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200} -#define CONFIG_CONSOLE ttyS0 +#define CONSOLEttyS0 #define CONFIG_BAUDRATE115200 #define CONFIG_SYS_NS16550_COM1(CONFIG_SYS_IMMR + 0x4500) @@ -740,10 +740,10 @@ boards, we say we have two, but don't display a message if we find only one. */ __stringify(CONFIG_GATEWAYIP) ":" \ __stringify(CONFIG_NETMASK) ":" \ CONFIG_HOSTNAME ":" CONFIG_NETDEV ":off"\ - " console=" __stringify(CONFIG_CONSOLE) "," __stringify(CONFIG_BAUDRATE) + " console=" __stringify(CONSOLE) "," __stringify(CONFIG_BAUDRATE) #define CONFIG_EXTRA_ENV_SETTINGS \ - "console=" __stringify(CONFIG_CONSOLE) "\0" \ + "console=" __stringify(CONSOLE) "\0"\ "netdev=" CONFIG_NETDEV "\0"\ "uboot=" CONFIG_UBOOTPATH "\0" \ "tftpflash=tftpboot $loadaddr $uboot; " \ diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index 196cd6c..40e621e 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -675,7 +675,6 @@ CONFIG_COMMON_ENV_SETTINGS CONFIG_COMMON_ENV_UBI CONFIG_COMPACT_FLASH CONFIG_COMPAT -CONFIG_CONSOLE CONFIG_CONSOLE_DEV CONFIG_CONSOLE_EXTRA_INFO CONFIG_CONSOLE_INFO_QUIET -- 2.8.0.rc3.226.g39d4020 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 01/29] Remove some merge markers
These two files have patch merge markers in them, within comments or strings. Remove then, so that a search for merge markers does not show up matches in these files. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- Changes in v2: None drivers/net/ax88180.c | 6 +- drivers/usb/host/isp116x-hcd.c | 6 +++--- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/net/ax88180.c b/drivers/net/ax88180.c index 43a67a5..261fde0 100644 --- a/drivers/net/ax88180.c +++ b/drivers/net/ax88180.c @@ -698,11 +698,7 @@ static void ax88180_read_mac_addr (struct eth_device *dev) } } -/* -=== -<< Exported SubProgram Bodies >> -=== -*/ +/* Exported SubProgram Bodies */ int ax88180_initialize (bd_t * bis) { struct eth_device *dev; diff --git a/drivers/usb/host/isp116x-hcd.c b/drivers/usb/host/isp116x-hcd.c index 0556f32..32874d7 100644 --- a/drivers/usb/host/isp116x-hcd.c +++ b/drivers/usb/host/isp116x-hcd.c @@ -428,10 +428,10 @@ static int isp116x_interrupt(struct isp116x *isp116x) isp116x_write_reg16(isp116x, HCuPINTENB, 0); irqstat = isp116x_read_reg16(isp116x, HCuPINT); isp116x_write_reg16(isp116x, HCuPINT, irqstat); - DBG(">> irqstat %x <<", irqstat); + DBG("-- irqstat %x --", irqstat); if (irqstat & HCuPINT_ATL) { - DBG(">> HCuPINT_ATL <<"); + DBG("-- HCuPINT_ATL --"); udelay(500); ret = 1; } @@ -439,7 +439,7 @@ static int isp116x_interrupt(struct isp116x *isp116x) if (irqstat & HCuPINT_OPR) { intstat = isp116x_read_reg32(isp116x, HCINTSTAT); isp116x_write_reg32(isp116x, HCINTSTAT, intstat); - DBG(">> HCuPINT_OPR %x <<", intstat); + DBG("-- HCuPINT_OPR %x --", intstat); if (intstat & HCINT_UE) { ERR("unrecoverable error, controller disabled"); -- 2.8.0.rc3.226.g39d4020 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 03/29] Convert CONSOLE_PRE_CONSOLE_BUFFER options to Kconfig
Move these option to Kconfig and tidy up existing uses. Signed-off-by: Simon Glass --- Changes in v2: - Change CONFIG_PRE_CON_BUF_SZ default to 4096 - Change CONFIG_PRE_CON_BUF_SZ to 'int' type - Drop the depend clause on the CONFIG_PRE_CON_BUF_SZ default - Move CONFIG_PRE_CON_BUF_ADDR default to common/Kconfig README| 17 board/sunxi/Kconfig | 3 +++ common/Kconfig| 42 +++ common/console.c | 6 +++--- configs/tbs2910_defconfig | 2 ++ include/asm-generic/global_data.h | 2 +- include/configs/sunxi-common.h| 6 -- include/configs/tbs2910.h | 4 scripts/config_whitelist.txt | 3 --- 9 files changed, 51 insertions(+), 34 deletions(-) diff --git a/README b/README index 1b6f8ec..26a53e2 100644 --- a/README +++ b/README @@ -872,23 +872,6 @@ The following options need to be configured: must be defined, to setup the maximum idle timeout for the SMC. -- Pre-Console Buffer: - Prior to the console being initialised (i.e. serial UART - initialised etc) all console output is silently discarded. - Defining CONFIG_PRE_CONSOLE_BUFFER will cause U-Boot to - buffer any console messages prior to the console being - initialised to a buffer of size CONFIG_PRE_CON_BUF_SZ - bytes located at CONFIG_PRE_CON_BUF_ADDR. The buffer is - a circular buffer, so if more than CONFIG_PRE_CON_BUF_SZ - bytes are output before the console is initialised, the - earlier bytes are discarded. - - Note that when printing the buffer a copy is made on the - stack so CONFIG_PRE_CON_BUF_SZ must fit on the stack. - - 'Sane' compilers will generate smaller code if - CONFIG_PRE_CON_BUF_SZ is a power of 2 - - Autoboot Command: CONFIG_BOOTCOMMAND Only needed when CONFIG_BOOTDELAY is enabled; diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig index b139d1c..c0ffeb3 100644 --- a/board/sunxi/Kconfig +++ b/board/sunxi/Kconfig @@ -3,6 +3,9 @@ if ARCH_SUNXI config IDENT_STRING default " Allwinner Technology" +config PRE_CONSOLE_BUFFER + default y + config SPL_GPIO_SUPPORT default y diff --git a/common/Kconfig b/common/Kconfig index bbd5633..6ee67ac 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -246,6 +246,48 @@ config SILENT_CONSOLE_UPDATE_ON_RELOC (e.g. NAND). This option makes the value of the 'silent' environment variable take effect at relocation. +config PRE_CONSOLE_BUFFER + bool "Buffer characters before the console is available" + help + Prior to the console being initialised (i.e. serial UART + initialised etc) all console output is silently discarded. + Defining CONFIG_PRE_CONSOLE_BUFFER will cause U-Boot to + buffer any console messages prior to the console being + initialised to a buffer. The buffer is a circular buffer, so + if it overflows, earlier output is discarded. + + Note that this is not currently supported in SPL. It would be + useful to be able to share the pre-console buffer with SPL. + +config PRE_CON_BUF_SZ + int "Sets the size of the pre-console buffer" + depends on PRE_CONSOLE_BUFFER + default 4096 + help + The size of the pre-console buffer affects how much console output + can be held before it overflows and starts discarding earlier + output. Normally there is very little output at this early stage, + unless debugging is enabled, so allow enough for ~10 lines of + text. + + This is a useful feature if you are using a video console and + want to see the full boot output on the console. Without this + option only the post-relocation output will be displayed. + +config PRE_CON_BUF_ADDR + hex "Address of the pre-console buffer" + depends on PRE_CONSOLE_BUFFER + default 0x2f00 if ARCH_SUNXI && MACH_SUN9I + default 0x4f00 if ARCH_SUNXI && !MACH_SUN9I + help + This sets the start address of the pre-console buffer. This must + be in available memory and is accessed before relocation and + possibly before DRAM is set up. Therefore choose an address + carefully. + + We should consider removing this option and allocating the memory + in board_init_f_init_reserve() instead. + endmenu config SYS_NO_FLASH diff --git a/common/console.c b/common/console.c index 12293f3..31a9b3e 100644 --- a/common/console.c +++ b/common/console.c @@ -201,7 +201,7 @@ static void console_putc(int file, const char c) } } -#ifdef CONFIG_PRE_CONSOLE_BUFFER +#if CONFIG_IS_ENABLED(PRE_CONSOLE_BUFFER) static void console_puts_noseri
[U-Boot] [PATCH v2 02/29] Convert SILENT_CONSOLE options to Kconfig
Move these option to Kconfig and tidy up existing uses. The Power PC boards don't have a suitable common element: the common header files don't appear to line up with the Kconfig files as far as I can tell. This results in a lot of defconfig changes. Signed-off-by: Simon Glass --- Changes in v2: - Drop the changes to Kconfig defaults README | 5 --- common/Kconfig | 45 ++ configs/T1024QDS_DDR4_SECURE_BOOT_defconfig| 1 + configs/T1024QDS_DDR4_defconfig| 1 + configs/T1024QDS_NAND_defconfig| 1 + configs/T1024QDS_SDCARD_defconfig | 1 + configs/T1024QDS_SECURE_BOOT_defconfig | 1 + configs/T1024QDS_SPIFLASH_defconfig| 1 + configs/T1024QDS_defconfig | 1 + configs/T1024RDB_NAND_defconfig| 1 + configs/T1024RDB_SDCARD_defconfig | 1 + configs/T1024RDB_SECURE_BOOT_defconfig | 1 + configs/T1024RDB_SPIFLASH_defconfig| 1 + configs/T1024RDB_defconfig | 1 + configs/T1040D4RDB_NAND_defconfig | 1 + configs/T1040D4RDB_SDCARD_defconfig| 1 + configs/T1040D4RDB_SECURE_BOOT_defconfig | 1 + configs/T1040D4RDB_SPIFLASH_defconfig | 1 + configs/T1040D4RDB_defconfig | 1 + configs/T1040QDS_DDR4_defconfig| 1 + configs/T1040QDS_SECURE_BOOT_defconfig | 1 + configs/T1040QDS_defconfig | 1 + configs/T1040RDB_NAND_defconfig| 1 + configs/T1040RDB_SDCARD_defconfig | 1 + configs/T1040RDB_SECURE_BOOT_defconfig | 1 + configs/T1040RDB_SPIFLASH_defconfig| 1 + configs/T1040RDB_defconfig | 1 + configs/T1042D4RDB_NAND_defconfig | 1 + configs/T1042D4RDB_SDCARD_defconfig| 1 + configs/T1042D4RDB_SECURE_BOOT_defconfig | 1 + configs/T1042D4RDB_SPIFLASH_defconfig | 1 + configs/T1042D4RDB_defconfig | 1 + configs/T1042RDB_PI_NAND_SECURE_BOOT_defconfig | 1 + configs/T1042RDB_PI_NAND_defconfig | 1 + configs/T1042RDB_PI_SDCARD_defconfig | 1 + configs/T1042RDB_PI_SPIFLASH_defconfig | 1 + configs/T1042RDB_PI_defconfig | 1 + configs/T1042RDB_SECURE_BOOT_defconfig | 1 + configs/T1042RDB_defconfig | 1 + configs/a4m072_defconfig | 1 + configs/arndale_defconfig | 1 + configs/bct-brettl2_defconfig | 1 + configs/bf518f-ezbrd_defconfig | 1 + configs/bf526-ezbrd_defconfig | 1 + configs/bf527-ad7160-eval_defconfig| 1 + configs/bf527-ezkit-v2_defconfig | 1 + configs/bf527-ezkit_defconfig | 1 + configs/bf527-sdp_defconfig| 1 + configs/bf533-ezkit_defconfig | 1 + configs/bf533-stamp_defconfig | 1 + configs/bf537-pnav_defconfig | 1 + configs/bf537-stamp_defconfig | 1 + configs/bf538f-ezkit_defconfig | 1 + configs/bf548-ezkit_defconfig | 1 + configs/bf561-acvilon_defconfig| 1 + configs/bf561-ezkit_defconfig | 1 + configs/br4_defconfig | 1 + configs/chromebook_jerry_defconfig | 1 + configs/cm-bf527_defconfig | 1 + configs/cm-bf533_defconfig | 1 + configs/cm-bf537e_defconfig| 1 + configs/cm-bf537u_defconfig| 1 + configs/cm-bf548_defconfig | 1 + configs/cm-bf561_defconfig | 1 + configs/cm5200_defconfig | 1 + configs/espresso7420_defconfig | 1 + configs/evb-rk3288_defconfig | 1 + configs/fennec-rk3288_defconfig| 1 + configs/firefly-rk3288_defconfig | 1 + configs/fo300_defconfig| 1 + configs/ibf-dsp561_defconfig | 1 + configs/ip04_defconfig | 1 + configs/ls1021aqds_ddr4_nor_defconfig | 1 + configs/ls1021aqds_ddr4_nor_lpuart_defconfig | 1 + configs/ls1021aqds_nand_defconfig | 1 + configs/ls1021aqds_nor_SECURE_BOOT_defconfig | 1 + configs/ls1021aqds_nor_defconfig | 1 + configs/ls1021aqds_nor_lpuart_defconfig| 1 + configs/ls1021aqds_qspi_defconfi
[U-Boot] [PATCH v2 00/29] Kconfig: Move console options to Kconfig
This series moves a number of console-related CONFIG options to Kconfig. Those that are not currently used are removed. A few unused video drivers are also removed and there are a few minor adjustments to improve the code. But mostly this follows the output of the moveconfig tool. It is tested with buildman -K to make sure no CONFIGs change overall, and also for building. Changes in v2: - Drop the changes to Kconfig defaults - Change CONFIG_PRE_CON_BUF_SZ default to 4096 - Change CONFIG_PRE_CON_BUF_SZ to 'int' type - Drop the depend clause on the CONFIG_PRE_CON_BUF_SZ default - Move CONFIG_PRE_CON_BUF_ADDR default to common/Kconfig - Make CONSOLE_MUX default y if DM_VIDEO || VIDEO || LCD - Make CONFIG_SYS_CONSOLE_INFO_QUIET the default if !CONFIG_MUX - Add new patch to convert CONFIG_USB_KEYBOARD to Kconfig - Make CONFIG_SYS_STDIO_DEREGISTER the default if USB_KEYBOARD - Drop Kconfig changes Simon Glass (29): Remove some merge markers Convert SILENT_CONSOLE options to Kconfig Convert CONSOLE_PRE_CONSOLE_BUFFER options to Kconfig Convert CONFIG_SYS_CONSOLE_IS_IN_ENV et al to Kconfig config: Drop CONFIG_CONSOLE config: Drop CONFIG_CONSOLE_DEV Convert CONFIG_VIDEO to Kconfig Convert CONFIG_CFB_CONSOLE to Kconfig Convert CONFIG_CFB_CONSOLE_ANSI to Kconfig Convert CONFIG_VIDEO_CT69000 to Kconfig Convert CONFIG_SYS_CONSOLE_BG_COL et al to Kconfig video: Drop the smiLynxEM driver video: Drop the imx25lcdc driver video: Drop the s3c-fb driver video: Drop the sed13806 driver Convert CONFIG_VGA_AS_SINGLE_DEVICE to Kconfig video: Drop CONFIG_VIDEO_HW_CURSOR Convert CONFIG_VIDEO_SW_CURSOR to Kconfig video: Drop CONFIG_VIDEO_SW_CURSOR Convert CONFIG_CONSOLE_EXTRA_INFO to Kconfig video: Move video_get_info_str() prototype to a header file video: Drop CONFIG_CONSOLE_INFO_QUIET Convert CONFIG_LCD to Kconfig Convert CONFIG_CONSOLE_SCROLL_LINES to Kconfig Convert CONFIG_SYS_CONSOLE_ENV_OVERWRITE to Kconfig Convert CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE to Kconfig Convert CONFIG_SYS_CONSOLE_INFO_QUIET to Kconfig Convert CONFIG_USB_KEYBOARD to Kconfig Convert CONFIG_SYS_STDIO_DEREGISTER to Kconfig README | 131 board/liebherr/lwmon5/lwmon5.c | 1 + board/mosaixtech/icon/icon.c | 1 + board/mpl/common/common_util.c | 1 + board/sunxi/Kconfig| 3 + board/tqc/tqm5200/tqm5200.c| 1 + common/Kconfig | 143 common/console.c | 6 +- common/stdio.c | 6 +- common/usb_kbd.c | 2 +- configs/A10-OLinuXino-Lime_defconfig | 2 + configs/A10s-OLinuXino-M_defconfig | 2 + configs/A13-OLinuXinoM_defconfig | 2 + configs/A13-OLinuXino_defconfig| 2 + configs/A20-OLinuXino-Lime2_defconfig | 2 + configs/A20-OLinuXino-Lime_defconfig | 2 + configs/A20-OLinuXino_MICRO_defconfig | 2 + configs/A20-Olimex-SOM-EVB_defconfig | 2 + configs/A33-OLinuXino_defconfig| 2 + configs/Ainol_AW1_defconfig| 2 + configs/Ampe_A76_defconfig | 2 + configs/Auxtek-T003_defconfig | 2 + configs/Auxtek-T004_defconfig | 2 + configs/B4420QDS_NAND_defconfig| 1 + configs/B4420QDS_SPIFLASH_defconfig| 1 + configs/B4420QDS_defconfig | 1 + configs/B4860QDS_NAND_defconfig| 1 + configs/B4860QDS_SECURE_BOOT_defconfig | 1 + configs/B4860QDS_SPIFLASH_defconfig| 1 + configs/B4860QDS_SRIO_PCIE_BOOT_defconfig | 1 + configs/B4860QDS_defconfig | 1 + configs/BSC9131RDB_NAND_SYSCLK100_defconfig| 1 + configs/BSC9131RDB_NAND_defconfig | 1 + configs/BSC9131RDB_SPIFLASH_SYSCLK100_defconfig| 1 + configs/BSC9131RDB_SPIFLASH_defconfig | 1 + configs/BSC9132QDS_NAND_DDRCLK100_SECURE_defconfig | 1 + configs/BSC9132QDS_NAND_DDRCLK100_defconfig| 1 + configs/BSC9132QDS_NAND_DDRCLK133_SECURE_defconfig | 1 + configs/BSC9132QDS_NAND_DDRCLK133_defconfig| 1 + configs/BSC9132QDS_NOR_DDRCLK100_SECURE_defconfig | 1 + configs/BSC9132QDS_NOR_DDRCLK100_defconfig | 1 + configs/BSC9132QDS_NOR_DDRCLK133_SECURE_defconfig | 1 + configs/BSC9132QDS_NOR_DDRCLK133_defconfig | 1 + .../BSC9132QDS_SDCARD_DDRCLK100_SECURE_defconfig | 1 + configs/BSC9132QDS_SDCARD_DDRCLK100_defconfig | 1 + .../BSC9132QDS_SDCARD_DDRCLK133_SECURE_defconfig | 1 + configs/BSC9132QDS_SDCARD_DDRCLK133_defconfig |
[U-Boot] [PATCH] mx6sabresd: Make SPL DDR configuration to match the DCD table
From: Fabio Estevam When using SPL on i.mx6 we frequently notice some DDR initialization mismatches between the SPL code and the non-SPL code. This causes stability issues like the ones reported at 7dbda25ecd6d7c ("mx6ul_14x14_evk: Pass refsel and refr fields to avoid hang") and also: http://lists.denx.de/pipermail/u-boot/2016-September/266355.html . As the non-SPL code have been tested for long time and proves to be reliable, let's configure the DDR in the exact same way as the non-SPL case. The idea is simple: just use the DCD table and write directly to the DDR registers. This method makes it easier for people converting from non-SPL to SPL code. Other benefit is that the SPL binary size is reduced from 44 kB to 33.9 kB. Signed-off-by: Fabio Estevam --- board/freescale/mx6sabresd/mx6sabresd.c | 327 +--- 1 file changed, 175 insertions(+), 152 deletions(-) diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c index f836ecb..234197d 100644 --- a/board/freescale/mx6sabresd/mx6sabresd.c +++ b/board/freescale/mx6sabresd/mx6sabresd.c @@ -682,125 +682,6 @@ int checkboard(void) #include #include -const struct mx6dq_iomux_ddr_regs mx6_ddr_ioregs = { - .dram_sdclk_0 = 0x00020030, - .dram_sdclk_1 = 0x00020030, - .dram_cas = 0x00020030, - .dram_ras = 0x00020030, - .dram_reset = 0x00020030, - .dram_sdcke0 = 0x3000, - .dram_sdcke1 = 0x3000, - .dram_sdba2 = 0x, - .dram_sdodt0 = 0x3030, - .dram_sdodt1 = 0x3030, - .dram_sdqs0 = 0x0030, - .dram_sdqs1 = 0x0030, - .dram_sdqs2 = 0x0030, - .dram_sdqs3 = 0x0030, - .dram_sdqs4 = 0x0030, - .dram_sdqs5 = 0x0030, - .dram_sdqs6 = 0x0030, - .dram_sdqs7 = 0x0030, - .dram_dqm0 = 0x00020030, - .dram_dqm1 = 0x00020030, - .dram_dqm2 = 0x00020030, - .dram_dqm3 = 0x00020030, - .dram_dqm4 = 0x00020030, - .dram_dqm5 = 0x00020030, - .dram_dqm6 = 0x00020030, - .dram_dqm7 = 0x00020030, -}; - -const struct mx6dq_iomux_ddr_regs mx6dqp_ddr_ioregs = { - .dram_sdclk_0 = 0x0030, - .dram_sdclk_1 = 0x0030, - .dram_cas = 0x0030, - .dram_ras = 0x0030, - .dram_reset = 0x0030, - .dram_sdcke0 = 0x3000, - .dram_sdcke1 = 0x3000, - .dram_sdba2 = 0x, - .dram_sdodt0 = 0x3030, - .dram_sdodt1 = 0x3030, - .dram_sdqs0 = 0x0030, - .dram_sdqs1 = 0x0030, - .dram_sdqs2 = 0x0030, - .dram_sdqs3 = 0x0030, - .dram_sdqs4 = 0x0030, - .dram_sdqs5 = 0x0030, - .dram_sdqs6 = 0x0030, - .dram_sdqs7 = 0x0030, - .dram_dqm0 = 0x0030, - .dram_dqm1 = 0x0030, - .dram_dqm2 = 0x0030, - .dram_dqm3 = 0x0030, - .dram_dqm4 = 0x0030, - .dram_dqm5 = 0x0030, - .dram_dqm6 = 0x0030, - .dram_dqm7 = 0x0030, -}; - -const struct mx6dq_iomux_grp_regs mx6_grp_ioregs = { - .grp_ddr_type = 0x000C, - .grp_ddrmode_ctl = 0x0002, - .grp_ddrpke = 0x, - .grp_addds = 0x0030, - .grp_ctlds = 0x0030, - .grp_ddrmode = 0x0002, - .grp_b0ds = 0x0030, - .grp_b1ds = 0x0030, - .grp_b2ds = 0x0030, - .grp_b3ds = 0x0030, - .grp_b4ds = 0x0030, - .grp_b5ds = 0x0030, - .grp_b6ds = 0x0030, - .grp_b7ds = 0x0030, -}; - -const struct mx6_mmdc_calibration mx6_mmcd_calib = { - .p0_mpwldectrl0 = 0x001F001F, - .p0_mpwldectrl1 = 0x001F001F, - .p1_mpwldectrl0 = 0x00440044, - .p1_mpwldectrl1 = 0x00440044, - .p0_mpdgctrl0 = 0x434B0350, - .p0_mpdgctrl1 = 0x034C0359, - .p1_mpdgctrl0 = 0x434B0350, - .p1_mpdgctrl1 = 0x03650348, - .p0_mprddlctl = 0x4436383B, - .p1_mprddlctl = 0x39393341, - .p0_mpwrdlctl = 0x35373933, - .p1_mpwrdlctl = 0x48254A36, -}; - -const struct mx6_mmdc_calibration mx6dqp_mmcd_calib = { - .p0_mpwldectrl0 = 0x001B001E, - .p0_mpwldectrl1 = 0x002E0029, - .p1_mpwldectrl0 = 0x001B002A, - .p1_mpwldectrl1 = 0x0019002C, - .p0_mpdgctrl0 = 0x43240334, - .p0_mpdgctrl1 = 0x0324031A, - .p1_mpdgctrl0 = 0x43340344, - .p1_mpdgctrl1 = 0x03280276, - .p0_mprddlctl = 0x44383A3E, - .p1_mprddlctl = 0x3C3C3846, - .p0_mpwrdlctl = 0x2E303230, - .p1_mpwrdlctl = 0x38283E34, -}; - -/* MT41K128M16JT-125 */ -static struct mx6_ddr3_cfg mem_ddr = { - .mem_speed = 1600, - .density = 2, - .width = 16, - .banks = 8, - .rowaddr = 14, - .coladdr = 10, - .pagesz = 2, - .trcd = 1375, - .trcmin = 4875, - .trasmin = 3500, -}; - st
Re: [U-Boot] [RFC PATCH 1/2] dm: Add support for scsi/sata based devices
Hi Michal, On 8 September 2016 at 07:57, Michal Simek wrote: > All sata based drivers are bind and corresponding block > device is created. Based on this find_scsi_device() is able > to get back block device based on scsi_curr_dev pointer. > > intr_scsi() is commented now but it can be replaced by calling > find_scsi_device() and scsi_scan(). > > scsi_dev_desc[] is commented out but common/scsi.c heavily depends on > it. That's why CONFIG_SYS_SCSI_MAX_DEVICE is hardcoded to 1 and symbol > is reassigned to a block description allocated by uclass. > There is only one block description by device now but it doesn't need to > be correct when more devices are present. > > scsi_bind() ensures corresponding block device creation. > uclass post_probe (scsi_post_probe()) is doing low level init. > > SCSI/SATA DM based drivers requires to have 64bit base address as > the first entry in platform data structure to setup mmio_base. > > Signed-off-by: Michal Simek > --- > > cmd/scsi.c | 38 ++ > common/board_r.c| 4 ++-- > common/scsi.c | 17 - > drivers/block/ahci-uclass.c | 38 ++ > drivers/block/ahci.c| 30 ++ > include/ahci.h | 2 +- > include/sata.h | 3 +++ > include/scsi.h | 15 ++- > 8 files changed, 134 insertions(+), 13 deletions(-) Thanks for looking at this. I've taken a look and have a few comments. It's confusing that you are changing both scsi and sata. Do you need to add a DM_SCSI also? As far as I can see, they are separate subsystems. I think you need a uclass which implements the scsi_scan() function. The existing code could be refactored so that the common parts are called from both scsi.c and your scsi-uclass.c. It should look for devices, and then create a block device for each. Since you don't know how many block devices to create, I don't think you can avoid creating them 'on the fly' in scsi_scan(). For an example, see usb_stor_probe_device(). Also we will need a sandbox device at some point so we can run tests. Minor point - please put #idef CONFIG_DM_SATA first and the legacy path in the #else cause. Mostly you do this but in a few cases it is not consistent. A few more notes below. > > diff --git a/cmd/scsi.c b/cmd/scsi.c > index 387ca1a262ab..dc1176610672 100644 > --- a/cmd/scsi.c > +++ b/cmd/scsi.c > @@ -10,6 +10,7 @@ > */ > #include > #include > +#include > #include > > static int scsi_curr_dev; /* current device */ > @@ -25,6 +26,23 @@ int do_scsiboot(cmd_tbl_t *cmdtp, int flag, int argc, char > *const argv[]) > /* > * scsi command intepreter > */ > +#ifdef CONFIG_DM_SATA > +struct udevice *find_scsi_device(int dev_num) > +{ > + struct udevice *bdev; > + int ret; > + > + ret = blk_get_device(IF_TYPE_SCSI, dev_num, &bdev); > + > + if (ret) { > + printf("SCSI Device %d not found\n", dev_num); > + return NULL; > + } > + > + return bdev; > +} > +#endif > + > int do_scsi(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) > { > switch (argc) { > @@ -35,7 +53,18 @@ int do_scsi(cmd_tbl_t *cmdtp, int flag, int argc, char > *const argv[]) > if (strncmp(argv[1], "res", 3) == 0) { > printf("\nReset SCSI\n"); > scsi_bus_reset(); > + > +#if defined(CONFIG_DM_SATA) > + struct udevice *bdev; > + > + bdev = find_scsi_device(scsi_curr_dev); > + if (!bdev) > + return CMD_RET_FAILURE; > + > + scsi_scan(1, bdev); > +#else > scsi_scan(1); > +#endif > return 0; > } > if (strncmp(argv[1], "inf", 3) == 0) { > @@ -51,7 +80,16 @@ int do_scsi(cmd_tbl_t *cmdtp, int flag, int argc, char > *const argv[]) > return 0; > } > if (strncmp(argv[1], "scan", 4) == 0) { > +#if defined(CONFIG_DM_SATA) > + struct udevice *bdev; > + > + bdev = find_scsi_device(scsi_curr_dev); > + if (!bdev) > + return CMD_RET_FAILURE; > + scsi_scan(1, bdev); > +#else > scsi_scan(1); > +#endif > return 0; > } > if (strncmp(argv[1], "part", 4) == 0) { > diff --git a/common/board_r.c b/common/board_r.c > index d959ad3c6f90..f3ea457507de 100644 > --- a/common/board_r.c > +++ b/common/board_r.c > @@ -620,7 +620,7 @@ static int initr_ambapp_print(void) > } > #endif > > -#if defined(CONFIG_SCSI) > +#if defined(CONFIG_SCSI) && !defined(CONFIG_DM_SATA) > static int initr_scsi(void) > { > puts("SCSI: "); > @@ -923,
Re: [U-Boot] [RFC PATCH 2/2] block: Move ceva driver to DM
Hi Michal, On 8 September 2016 at 07:57, Michal Simek wrote: > This patch also includes ARM64 zynqmp changes: > - Remove platform non DM initialization > - Remove hardcoded sata base address > > Signed-off-by: Michal Simek > --- > > There are probably more things to test and to check but > on my platform I can connect only one HDD. But IP itself > have two ports which are not handled properly. > I have tried to reuse as much infrastructure as is available. > There need to be cleanup for SATA/SCSI/AHCI names. > > There is also sata cmd and it is a question if make sense to keep it in > the tree because it is subset of scsi commands. > > scsi scan needs to be called first and maybe make sense to call it > automatically as was done before. > > Simon: Please check if I did it at least partially right. > > TODO: > CONFIG_DM_SATA should be moved to Kconfig > > LOG: > > ZynqMP> scsi scan > SATA link 0 timeout. > Target spinup took 0 ms. > AHCI 0001.0301 32 slots 2 ports 6 Gbps 0x3 impl SATA mode > flags: 64bit ncq pm clo only pmp fbss pio slum part ccc apst > scanning bus for devices... > Device 0: (1:0) Vendor: ATA Prod.: KINGSTON SVP200S Rev: 501A > Type: Hard Disk > Capacity: 57241.8 MB = 55.9 GB (117231408 x 512) > Found 1 device(s). > ZynqMP> ls sata 0 >4096 . >4096 .. >4096 bin >4096 boot >4096 dev > 12288 etc >4096 home >4096 lib >4096 lost+found >4096 media >4096 mnt >4096 opt >4096 proc >4096 root >4096 run > > --- > arch/arm/include/asm/arch-zynqmp/hardware.h | 2 -- > board/xilinx/zynqmp/zynqmp.c| 11 --- > drivers/block/sata_ceva.c | 49 > +++-- > include/configs/xilinx_zynqmp.h | 7 +++-- > 4 files changed, 52 insertions(+), 17 deletions(-) Looks good to me - this is how a driver should be organised. Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Please pull u-boot-marvell/master
On Sat, Sep 24, 2016 at 10:13:43AM +0200, Stefan Roese wrote: > Hi Tom, > > please pull the first batch of Marvell / MVEBU patches in this > merge window. > > Thanks, > Stefan > > The following changes since commit 8824cfc19a6e4ae23ca8006bb22b7b6f839b09a8: > > usb: ehci-generic: support reset control for generic EHCI (2016-09-23 > 22:25:44 -0400) > > are available in the git repository at: > > git://www.denx.de/git/u-boot-marvell.git > > for you to fetch changes up to 42f75050667bf1a0a3fbe7d8dd6d2ec5fc127935: > > arm: mvebu: NAND support for DB-88F6820-AMC (2016-09-24 10:07:48 +0200) > Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Please pull u-boot-marvell/master
Hi Tom, please pull the first batch of Marvell / MVEBU patches in this merge window. Thanks, Stefan The following changes since commit 8824cfc19a6e4ae23ca8006bb22b7b6f839b09a8: usb: ehci-generic: support reset control for generic EHCI (2016-09-23 22:25:44 -0400) are available in the git repository at: git://www.denx.de/git/u-boot-marvell.git for you to fetch changes up to 42f75050667bf1a0a3fbe7d8dd6d2ec5fc127935: arm: mvebu: NAND support for DB-88F6820-AMC (2016-09-24 10:07:48 +0200) Chris Packham (3): arm: mvebu: create generic 88F6820 config option arm: mvebu: add DB-88F6820-AMC board arm: mvebu: NAND support for DB-88F6820-AMC Stefan Roese (1): arm: mvebu: theadorable: Configure board for PCIe 2.0 capability arch/arm/dts/Makefile | 1 + arch/arm/dts/armada-385-amc.dts | 163 ++ arch/arm/mach-mvebu/Kconfig | 13 +- arch/arm/mach-mvebu/serdes/a38x/sys_env_lib.c | 2 +- board/Marvell/db-88f6820-amc/MAINTAINERS | 6 + board/Marvell/db-88f6820-amc/Makefile | 7 ++ board/Marvell/db-88f6820-amc/db-88f6820-amc.c | 129 board/Marvell/db-88f6820-amc/kwbimage.cfg | 12 ++ board/theadorable/theadorable.c | 6 + configs/db-88f6820-amc_defconfig | 45 +++ include/configs/db-88f6820-amc.h | 127 11 files changed, 507 insertions(+), 4 deletions(-) create mode 100644 arch/arm/dts/armada-385-amc.dts create mode 100644 board/Marvell/db-88f6820-amc/MAINTAINERS create mode 100644 board/Marvell/db-88f6820-amc/Makefile create mode 100644 board/Marvell/db-88f6820-amc/db-88f6820-amc.c create mode 100644 board/Marvell/db-88f6820-amc/kwbimage.cfg create mode 100644 configs/db-88f6820-amc_defconfig create mode 100644 include/configs/db-88f6820-amc.h ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 3/3] arm: mvebu: NAND support for DB-88F6820-AMC
On 22.09.2016 02:56, Chris Packham wrote: Enable the NAND interface on this board. Signed-off-by: Chris Packham Applied to u-boot-marvell/master Thanks, Stefan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/3] arm: mvebu: add DB-88F6820-AMC board
On 22.09.2016 02:56, Chris Packham wrote: This board is a plug in card for Marvell's switch system development kits. Form-factor aside it is similar to the DB-88F6820-GP with the following differences. - TCLK is 200MHz - SPI1 is used - No SATA - No MMC - NAND flash Reviewed-by: Simon Glass Signed-off-by: Chris Packham --- I've used my work email address for the MAINTAINERS entry. Mainly because it gives a better chance at finding someone else to contact rather than a random gmail address. I've also left the copyright assignments to Stefan and Gregory since the code was derived from the -GP board. Changes in v2: - move CONFIG_SPL_xxx_SUPPORT to defconfig - collect review from Simon Applied to u-boot-marvell/master Thanks, Stefan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/3] arm: mvebu: create generic 88F6820 config option
On 22.09.2016 02:56, Chris Packham wrote: 88F6820 is a specific Armada-38x chip that is used on the DB-88F6820-GP board. Rather than having DB_88F6820_GP and TARGET_DB_88F6820_GP which selects the former. Rename DB_88F6820_GP to 88F6820 so that other boards using the 88F6820 can be added. Signed-off-by: Chris Packham --- Changes in v2: None Changed for clearfog here as well while applying. Applied to u-boot-marvell/master Thanks, Stefan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 02/15 v3] spi: Add driver for Marvell Armada 3700 SoC
On 23.09.2016 16:44, Jagan Teki wrote: On Fri, Sep 23, 2016 at 7:58 PM, Stefan Roese wrote: The SPI IP core in the Marvell Armada 3700 is similar to the one in the other Armada SoCs. But the differences are big enough that it makes sense to introduce a new driver instead of cluttering the old kirkwood driver with #ifdef's. Signed-off-by: Stefan Roese Cc: Nadav Haklai Cc: Kostya Porotchkin Cc: Wilson Ding Cc: Victor Gu Cc: Hua Jing Cc: Terry Zhou Cc: Hanna Hawa Cc: Haim Boot Cc: Jagan Teki --- v3: - Really use hz now in equation - Add comment that the DT property for the input clock is deprecated and the clock infrastructure should be used, once available for mvebu in U-Boot v2: - Evaluated hz and used values provided by the DT in mvebu_spi_set_speed() as suggested by Jagan drivers/spi/Kconfig | 7 + drivers/spi/Makefile | 1 + drivers/spi/mvebu_a3700_spi.c | 297 ++ 3 files changed, 305 insertions(+) create mode 100644 drivers/spi/mvebu_a3700_spi.c diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index 5da66a6..8724f87 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -68,6 +68,13 @@ config ICH_SPI access the SPI NOR flash on platforms embedding this Intel ICH IP core. +config MVEBU_A3700_SPI + bool "Marvell Armada 3700 SPI driver" + help + Enable the Marvell Armada 3700 SPI driver. This driver can be + used to access the SPI NOR flash on platforms embedding this + Marvell IP core. + config PIC32_SPI bool "Microchip PIC32 SPI driver" depends on MACH_PIC32 diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile index b1d9e20..247c5f6 100644 --- a/drivers/spi/Makefile +++ b/drivers/spi/Makefile @@ -37,6 +37,7 @@ obj-$(CONFIG_KIRKWOOD_SPI) += kirkwood_spi.o obj-$(CONFIG_LPC32XX_SSP) += lpc32xx_ssp.o obj-$(CONFIG_MPC52XX_SPI) += mpc52xx_spi.o obj-$(CONFIG_MPC8XXX_SPI) += mpc8xxx_spi.o +obj-$(CONFIG_MVEBU_A3700_SPI) += mvebu_a3700_spi.o obj-$(CONFIG_MXC_SPI) += mxc_spi.o obj-$(CONFIG_MXS_SPI) += mxs_spi.o obj-$(CONFIG_OMAP3_SPI) += omap3_spi.o diff --git a/drivers/spi/mvebu_a3700_spi.c b/drivers/spi/mvebu_a3700_spi.c new file mode 100644 index 000..0a55f3f --- /dev/null +++ b/drivers/spi/mvebu_a3700_spi.c @@ -0,0 +1,297 @@ +/* + * Copyright (C) 2015 Marvell International Ltd. + * + * Copyright (C) 2016 Stefan Roese + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#include +#include +#include +#include +#include +#include + +DECLARE_GLOBAL_DATA_PTR; + +#define SPI_TIMEOUT1 Can you remove this - sorry, never looked previously. Done. Reviewed-by: Jagan Teki Added. Thanks, Stefan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot