From 6b80de790cf95c5e2e3fab57b33a9db1004e4ccb Mon Sep 17 00:00:00 2001 From: T Karthik Reddy Date: Thu, 17 Dec 2020 03:15:56 -0700 Subject: microblaze: Add nor device to distro boot Add parallel nor device to distroboot for microblaze. Signed-off-by: T Karthik Reddy Signed-off-by: Michal Simek --- include/configs/microblaze-generic.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h index bc0bf04973..59b20cf116 100644 --- a/include/configs/microblaze-generic.h +++ b/include/configs/microblaze-generic.h @@ -81,6 +81,20 @@ # define BOOT_TARGET_DEVICES_QSPI(func) #endif +#if defined(CONFIG_MTD_NOR_FLASH) +# define BOOT_TARGET_DEVICES_NOR(func) func(NOR, nor, na) +#else +# define BOOT_TARGET_DEVICES_NOR(func) +#endif + +#define BOOTENV_DEV_NOR(devtypeu, devtypel, instance) \ + "bootcmd_nor=cp.b ${script_offset_nor} ${scriptaddr} ${script_size_f} && " \ + "echo NOR: Trying to boot script at ${scriptaddr} && " \ + "source ${scriptaddr}; echo NOR: SCRIPT FAILED: continuing...;\0" + +#define BOOTENV_DEV_NAME_NOR(devtypeu, devtypel, instance) \ + "nor " + #define BOOTENV_DEV_QSPI(devtypeu, devtypel, instance) \ "bootcmd_qspi=sf probe 0 0 0 && " \ "sf read ${scriptaddr} ${script_offset_f} ${script_size_f} && " \ @@ -101,7 +115,8 @@ #define BOOT_TARGET_DEVICES(func) \ BOOT_TARGET_DEVICES_JTAG(func) \ - BOOT_TARGET_DEVICES_QSPI(func) \ + BOOT_TARGET_DEVICES_QSPI(func) \ + BOOT_TARGET_DEVICES_NOR(func) \ BOOT_TARGET_DEVICES_DHCP(func) \ BOOT_TARGET_DEVICES_PXE(func) -- cgit From 17da310ac41424f056af3a88a0ff081925a027ff Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Mon, 14 Dec 2020 09:14:03 +0100 Subject: video: Fix video sync kernel-doc format Place description below function parameters to make kernel-doc stript happy. Also rename dev to vid to be aligned with function parameters. Fixes: 1acafc73bfc7 ("dm: video: Add a video uclass") Signed-off-by: Michal Simek Reviewed-by: Simon Glass --- include/video.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/video.h b/include/video.h index 9d09d2409a..7313b17f7c 100644 --- a/include/video.h +++ b/include/video.h @@ -151,13 +151,13 @@ int video_clear(struct udevice *dev); /** * video_sync() - Sync a device's frame buffer with its hardware * + * @vid: Device to sync + * @force: True to force a sync even if there was one recently (this is + * very expensive on sandbox) + * * Some frame buffers are cached or have a secondary frame buffer. This * function syncs these up so that the current contents of the U-Boot frame * buffer are displayed to the user. - * - * @dev: Device to sync - * @force: True to force a sync even if there was one recently (this is - * very expensive on sandbox) */ void video_sync(struct udevice *vid, bool force); -- cgit From 9de731f295c5f1aa0f55f30b076b94f9cb72428e Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Mon, 14 Dec 2020 08:47:52 +0100 Subject: video: Let video_sync to return error value This patch is preparation for follow up one to support cases where synchronization can fail. Suggested-by: Simon Glass Signed-off-by: Michal Simek Reviewed-by: Simon Glass --- include/video.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/video.h b/include/video.h index 7313b17f7c..1bfe6843a8 100644 --- a/include/video.h +++ b/include/video.h @@ -155,11 +155,13 @@ int video_clear(struct udevice *dev); * @force: True to force a sync even if there was one recently (this is * very expensive on sandbox) * + * @return: 0 always + * * Some frame buffers are cached or have a secondary frame buffer. This * function syncs these up so that the current contents of the U-Boot frame * buffer are displayed to the user. */ -void video_sync(struct udevice *vid, bool force); +int video_sync(struct udevice *vid, bool force); /** * video_sync_all() - Sync all devices' frame buffers with there hardware -- cgit From 9d69c2d9a8eb27bfa2ac0ac1a0fc779f5eccb49b Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Thu, 3 Dec 2020 09:30:00 +0100 Subject: video: Introduce video_sync operation Some drivers like LCD connected via SPI requires explicit sync function which copy framebuffer content over SPI to controller to display. This hook doesn't exist yet that's why introduce it via video operations. Signed-off-by: Michal Simek Reviewed-by: Simon Glass --- include/video.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/video.h b/include/video.h index 1bfe6843a8..12fc525ab4 100644 --- a/include/video.h +++ b/include/video.h @@ -114,8 +114,16 @@ struct video_priv { u8 bg_col_idx; }; -/* Placeholder - there are no video operations at present */ +/** + * struct video_ops - structure for keeping video operations + * @video_sync: Synchronize FB with device. Some device like SPI based LCD + * displays needs synchronization when data in an FB is available. + * For these devices implement video_sync hook to call a sync + * function. vid is pointer to video device udevice. Function + * should return 0 on success video_sync and error code otherwise + */ struct video_ops { + int (*video_sync)(struct udevice *vid); }; #define video_get_ops(dev) ((struct video_ops *)(dev)->driver->ops) @@ -155,7 +163,7 @@ int video_clear(struct udevice *dev); * @force: True to force a sync even if there was one recently (this is * very expensive on sandbox) * - * @return: 0 always + * @return: 0 on success, error code otherwise * * Some frame buffers are cached or have a secondary frame buffer. This * function syncs these up so that the current contents of the U-Boot frame -- cgit