versatilepb, console, graphichs serie
Subsystems (9)
cover versatilepb, console, graphichs serie
Hi,
here is a patch series of different stuff
To prepare the adding of the USB Keyboard and other GUI related patches
Versatilepb:
- move to defaultenv-2
Graphics:
- fix
- defaultenv-2
The following changes since commit 631be8e6cbe003f469a7e6b54046a743b710d989:
blspec: print error when devicetree not found (2014-12-16 14:29:23 +0100)
are available in the git repository at:
git://git.jcrosoft.org/barebox.git delivery/for-next
for you to fetch changes up to 3457c1de8201cbe6ca24ddba75df789fad8b6095:
defaultenv-2: create a specific defaultenv for splash (2014-12-23 05:51:11 +0800)
----------------------------------------------------------------
Jean-Christophe PLAGNIOL-VILLARD (9):
kfifo: allow to pass a null point on kfifo_free
efika-mx-smartbook: enable led hearbeat on mail
grapric_utils: set_pixel only write 16bit in 16bit mode
versatilepb: move barebox to 32 MiB and use zImage
versatilepb: switch to defaultenv-2
console: factorize kfifo input support
poller: allow to restrict the poller frequency
console: allow to specify the device id
defaultenv-2: create a specific defaultenv for splash
arch/arm/boards/efika-mx-smartbook/board.c | 2 ++ arch/arm/boards/versatile/env/boot.d/001-nor | 1 + arch/arm/boards/versatile/env/boot.d/101-nor-update | 1 + arch/arm/boards/versatile/env/boot/nor | 15 +++++++++++++++ arch/arm/boards/versatile/env/boot/nor-update | 14 ++++++++++++++ arch/arm/boards/versatile/env/config | 38 -------------------------------------- arch/arm/boards/versatile/env/init/automount | 11 +++++++++++ arch/arm/boards/versatile/env/init/mtdparts-nor | 11 +++++++++++ arch/arm/boards/versatile/env/init/ps1 | 7 +++++++ arch/arm/boards/versatile/env/nv/boot.default | 1 + arch/arm/boards/versatile/env/nv/hostname | 1 + arch/arm/boards/versatile/env/nv/linux.bootargs.base | 1 + arch/arm/boards/versatile/versatilepb.c | 4 ++-- arch/arm/configs/versatilepb_defconfig | 31 ++++++++++++++++++++++++++++--- arch/arm/mach-versatile/Kconfig | 4 ++++ common/Kconfig | 8 ++++++++ common/console.c | 10 +++++++++- common/console_common.c | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/console_simple.c | 4 ++++ common/poller.c | 11 ++++++++++- defaultenv/Makefile | 1 + defaultenv/defaultenv-2-splash/bin/splash | 15 +++++++++++++++ defaultenv/defaultenv-2-splash/init/splash | 3 +++ defaultenv/defaultenv.c | 2 ++ drivers/input/Kconfig | 4 ++++ drivers/input/gpio_keys.c | 43 ++++++------------------------------------- drivers/input/imx_keypad.c | 29 ++--------------------------- drivers/input/qt1070.c | 28 ++-------------------------- drivers/input/twl6030_pwrbtn.c | 32 ++------------------------------ drivers/usb/gadget/u_serial.c | 1 + include/console.h | 23 +++++++++++++++++++++++ include/gpio_keys.h | 1 - include/poller.h | 3 +++ lib/gui/graphic_utils.c | 2 +- lib/kfifo.c | 2 ++ 35 files changed, 268 insertions(+), 167 deletions(-) create mode 120000 arch/arm/boards/versatile/env/boot.d/001-nor create mode 120000 arch/arm/boards/versatile/env/boot.d/101-nor-update create mode 100644 arch/arm/boards/versatile/env/boot/nor create mode 100644 arch/arm/boards/versatile/env/boot/nor-update delete mode 100644 arch/arm/boards/versatile/env/config create mode 100644 arch/arm/boards/versatile/env/init/automount create mode 100644 arch/arm/boards/versatile/env/init/mtdparts-nor create mode 100644 arch/arm/boards/versatile/env/init/ps1 create mode 100644 arch/arm/boards/versatile/env/nv/boot.default create mode 100644 arch/arm/boards/versatile/env/nv/hostname create mode 100644 arch/arm/boards/versatile/env/nv/linux.bootargs.base create mode 100644 defaultenv/defaultenv-2-splash/bin/splash create mode 100644 defaultenv/defaultenv-2-splash/init/splash
Best Regards,
J.
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
PATCH 3/9 grapric_utils: set_pixel only write 16bit in 16bit mode
In reply to Jean-Christophe PLAGNIOL-VILLARD--- lib/gui/graphic_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/gui/graphic_utils.c +1 -1
@@ -104,7 +104,7 @@ void set_pixel(struct fb_info *info, void *adr, u32 px)case 8 :break ;case 16 : - *(u16 *)adr = px; + *(u16 *)adr = px &0xffff ;break ;case 32 : *(u32 *)adr = px;
Signature · 7 lines
2.1.3 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 1/9 kfifo: allow to pass a null point on kfifo_free
In reply to Jean-Christophe PLAGNIOL-VILLARDas free allow to pass a NULL pointer
--- lib/kfifo.c | 2 ++ 1 file changed, 2 insertions(+)
lib/kfifo.c +2 -0
@@ -70,6 +70,8 @@ struct kfifo *kfifo_alloc(unsigned int size)*/ void kfifo_free (struct kfifo *fifo) { +if (!fifo) +return ;free (fifo->buffer);free (fifo); }
Signature · 7 lines
2.1.3 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 2/9 efika-mx-smartbook: enable led hearbeat on mail
--- arch/arm/boards/efika-mx-smartbook/board.c | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/boards/efika-mx-smartbook/board.c +2 -0
@@ -246,6 +246,8 @@ static int efikamx_late_init(void)for (i =0 ; i <ARRAY_SIZE (leds); i++)led_gpio_register (&leds[i]); +led_set_trigger (LED_TRIGGER_HEARTBEAT , &leds[0 ].led); +writew (0x0 ,MX51_WDOG_BASE_ADDR +0x8 ); imx51_bbu_internal_mmc_register_handler("mmc", "/dev/mmc1",
Signature · 7 lines
2.1.3 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 4/9 versatilepb: move barebox to 32 MiB and use zImage
In reply to Jean-Christophe PLAGNIOL-VILLARD--- arch/arm/boards/versatile/env/config | 4 ++-- arch/arm/mach-versatile/Kconfig | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-)
arch/arm/boards/versatile/env/config +2 -2
@@ -19,8 +19,8 @@ rootfs_loc=initrd rootfs_type=ubifs rootfsimage=root.$rootfs_type -#kernelimage=zImage -kernelimage=uImage +kernelimage=zImage +#kernelimage=uImage #kernelimage=Image #kernelimage=Image.lzo
arch/arm/mach-versatile/Kconfig +3 -0
@@ -1,6 +1,9 @@ if ARCH_VERSATILE +config ARCH_TEXT_BASE + default 0x02000000 + choice prompt "ARM Board type"
Signature · 7 lines
2.1.3 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 5/9 versatilepb: switch to defaultenv-2
In reply to Jean-Christophe PLAGNIOL-VILLARD - Boot from NOR
- enable UBI
- use PBL
--- arch/arm/boards/versatile/env/boot.d/001-nor | 1 + .../arm/boards/versatile/env/boot.d/101-nor-update | 1 + arch/arm/boards/versatile/env/boot/nor | 15 +++++++++ arch/arm/boards/versatile/env/boot/nor-update | 14 ++++++++ arch/arm/boards/versatile/env/config | 38 ---------------------- arch/arm/boards/versatile/env/init/automount | 11 +++++++ arch/arm/boards/versatile/env/init/mtdparts-nor | 11 +++++++ arch/arm/boards/versatile/env/init/ps1 | 7 ++++ arch/arm/boards/versatile/env/nv/boot.default | 1 + arch/arm/boards/versatile/env/nv/hostname | 1 + .../boards/versatile/env/nv/linux.bootargs.base | 1 + arch/arm/boards/versatile/versatilepb.c | 4 +-- arch/arm/configs/versatilepb_defconfig | 31 ++++++++++++++++-- arch/arm/mach-versatile/Kconfig | 1 + 14 files changed, 94 insertions(+), 43 deletions(-) create mode 120000 arch/arm/boards/versatile/env/boot.d/001-nor create mode 120000 arch/arm/boards/versatile/env/boot.d/101-nor-update create mode 100644 arch/arm/boards/versatile/env/boot/nor create mode 100644 arch/arm/boards/versatile/env/boot/nor-update delete mode 100644 arch/arm/boards/versatile/env/config create mode 100644 arch/arm/boards/versatile/env/init/automount create mode 100644 arch/arm/boards/versatile/env/init/mtdparts-nor create mode 100644 arch/arm/boards/versatile/env/init/ps1 create mode 100644 arch/arm/boards/versatile/env/nv/boot.default create mode 100644 arch/arm/boards/versatile/env/nv/hostname create mode 100644 arch/arm/boards/versatile/env/nv/linux.bootargs.base
arch/arm/boards/versatile/env/boot.d/001-nor new file +1 -0
@@ -0,0 +1 @@ +../boot/nor
arch/arm/boards/versatile/env/boot.d/101-nor-update new file +1 -0
@@ -0,0 +1 @@ +../boot/nor-update
arch/arm/boards/versatile/env/boot/nor new file +15 -0
@@ -0,0 +1,15 @@ +#!/bin/sh + +if [ "$1" = menu ]; then + boot-menu-add-entry "$0" "nor" + exit +fi + +global.bootm.image="/dev/nor0.kernel" +global.linux.bootargs.dyn.root="root=ubi0:root ubi.mtd=5 rootfstype=ubifs" + +dtb=/dev/nor0.dtb +filetype -s t ${dtb} +if [ "$t" = dtb ]; then + global.bootm.oftree="${dtb}" +fi
arch/arm/boards/versatile/env/boot/nor-update new file +14 -0
@@ -0,0 +1,14 @@ +#!/bin/sh + +if [ "$1" = menu ]; then + boot-menu-add-entry "$0" "nor update" + exit +fi + +global.bootm.image="/dev/nor0.update" + +dtb=/dev/nor0.dtb +filetype -s t ${dtb} +if [ "$t" = dtb ]; then + global.bootm.oftree="${dtb}" +fi
arch/arm/boards/versatile/env/config deleted +0 -38
@@ -1,38 +0,0 @@ -#!/bin/sh - -# use 'dhcp' to do dhcp in barebox and in kernel -# use 'none' if you want to skip kernel ip autoconfiguration -ip=dhcp - -# or set your networking parameters here -#eth0.ipaddr=a.b.c.d -#eth0.netmask=a.b.c.d -#eth0.gateway=a.b.c.d -#eth0.serverip=a.b.c.d - -# can be either 'nfs', 'tftp' or 'nor' -kernel_loc=tftp -# can be either 'net', 'nor' or 'initrd' -rootfs_loc=initrd - -# can be either 'jffs2' or 'ubifs' -rootfs_type=ubifs -rootfsimage=root.$rootfs_type - -kernelimage=zImage -#kernelimage=uImage -#kernelimage=Image -#kernelimage=Image.lzo - -nfsroot="$eth0.serverip:/opt/work/busybox/arm9/rootfs_arm" - -nor_parts="256k(barebox)ro,64k(bareboxenv),1536k(kernel),-(root)" -rootfs_mtdblock_nor=3 - -autoboot_timeout=3 - -bootargs="console=ttyAMA0,115200n8 CONSOLE=/dev/ttyAMA0" - -# set a fancy prompt (if support is compiled in) -PS1="\e[1;31m[barebox@\h]:\w\e[0m\n# " -
arch/arm/boards/versatile/env/init/automount new file +11 -0
@@ -0,0 +1,11 @@ +#!/bin/sh + +if [ "$1" = menu ]; then + init-menu-add-entry "$0" "Automountpoints" + exit +fi + +# automount tftp server based on $eth0.serverip + +mkdir -p /mnt/tftp +automount /mnt/tftp 'ifup eth0 && mount -t tftp $eth0.serverip /mnt/tftp'
arch/arm/boards/versatile/env/init/mtdparts-nor new file +11 -0
@@ -0,0 +1,11 @@ +#!/bin/sh + +if [ "$1" = menu ]; then + init-menu-add-entry "$0" "NOR partitions" + exit +fi + +mtdparts="512k(nor0.barebox)ro,512k(nor0.bareboxenv),4864k(nor0.kernel),256k(nor0.dtb),3M(nor0.update),-(nor0.root)" +kernelname="physmap-flash.0" + +mtdparts-add -d nor0 -k ${kernelname} -p ${mtdparts}
arch/arm/boards/versatile/env/init/ps1 new file +7 -0
@@ -0,0 +1,7 @@ +#!/bin/sh + +if [ ${global.allow_color} = "true" ]; then + export PS1="\e[1;32mbarebox@\e[1;36m\h:\w\e[0m\n# " +else + export PS1="barebox@\h:\w\n# " +fi
arch/arm/boards/versatile/env/nv/boot.default new file +1 -0
@@ -0,0 +1 @@ +/env/boot.d
arch/arm/boards/versatile/env/nv/hostname new file +1 -0
@@ -0,0 +1 @@ +versatilepb
arch/arm/boards/versatile/env/nv/linux.bootargs.base new file +1 -0
@@ -0,0 +1 @@ +console=ttyAMA0,115200n8 CONSOLE=/dev/ttyAMA0
arch/arm/boards/versatile/versatilepb.c +2 -2
@@ -46,8 +46,8 @@ static struct smc91c111_pdata net_pdata = {static int vpb_devices_init (void ) {add_cfi_flash_device (DEVICE_ID_DYNAMIC ,VERSATILE_FLASH_BASE ,VERSATILE_FLASH_SIZE ,0 ); -devfs_add_partition ("nor0" ,0x00000 ,0x40000 ,DEVFS_PARTITION_FIXED ,"self" ); -devfs_add_partition ("nor0" ,0x40000 ,0x20000 ,DEVFS_PARTITION_FIXED ,"env0" ); +devfs_add_partition ("nor0" ,0x00000 ,SZ_512K ,DEVFS_PARTITION_FIXED ,"self" ); +devfs_add_partition ("nor0" ,SZ_512K ,SZ_512K ,DEVFS_PARTITION_FIXED ,"env0" );add_generic_device ("smc91c111" ,DEVICE_ID_DYNAMIC ,NULL ,VERSATILE_ETH_BASE ,64 *1024 ,IORESOURCE_MEM , &net_pdata);
arch/arm/configs/versatilepb_defconfig +28 -3
@@ -1,28 +1,41 @@ CONFIG_BUILTIN_DTB=y CONFIG_BUILTIN_DTB_NAME="versatile-pb" CONFIG_ARCH_VERSATILE=y +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x80000 CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y +CONFIG_PBL_IMAGE=y +CONFIG_PBL_RELOCATABLE=y CONFIG_PROMPT="versatilepb> " -CONFIG_GLOB=y CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y CONFIG_MENU=y +CONFIG_CONSOLE_ACTIVATE_ALL=y CONFIG_PARTITION=y -CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y +CONFIG_DEFAULT_COMPRESSION_GZIP=y +CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/versatile/env" +CONFIG_CMD_DMESG=y CONFIG_LONGHELP=y CONFIG_CMD_IOMEM=y CONFIG_CMD_MEMINFO=y CONFIG_CMD_BOOTM_SHOW_TYPE=y +CONFIG_CMD_BOOTM_VERBOSE=y +CONFIG_CMD_BOOTM_INITRD=y +CONFIG_CMD_BOOTM_OFTREE=y +CONFIG_CMD_BOOTM_OFTREE_UIMAGE=y CONFIG_CMD_GO=y CONFIG_CMD_LOADB=y CONFIG_CMD_RESET=y CONFIG_CMD_PARTITION=y +CONFIG_CMD_UBIFORMAT=y CONFIG_CMD_EXPORT=y CONFIG_CMD_LOADENV=y CONFIG_CMD_PRINTENV=y +CONFIG_CMD_MAGICVAR=y +CONFIG_CMD_MAGICVAR_HELP=y CONFIG_CMD_SAVEENV=y +CONFIG_CMD_FILETYPE=y CONFIG_CMD_UNCOMPRESS=y CONFIG_CMD_SLEEP=y CONFIG_CMD_DHCP=y
@@ -30,12 +43,16 @@ CONFIG_CMD_PING=y CONFIG_CMD_TFTP=y CONFIG_CMD_ECHO_E=y CONFIG_CMD_EDIT=y +CONFIG_CMD_LOGIN=y CONFIG_CMD_MENU=y CONFIG_CMD_MENU_MANAGEMENT=y -CONFIG_CMD_LOGIN=y CONFIG_CMD_PASSWD=y +CONFIG_CMD_SPLASH=y CONFIG_CMD_READLINE=y CONFIG_CMD_TIMEOUT=y +CONFIG_CMD_CRC=y +CONFIG_CMD_CRC_CMP=y +CONFIG_CMD_FLASH=y CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y CONFIG_CMD_OF_NODE=y
@@ -51,10 +68,18 @@ CONFIG_SERIAL_AMBA_PL011=y CONFIG_DRIVER_NET_SMC91111=y CONFIG_I2C=y CONFIG_I2C_VERSATILE=y +CONFIG_MTD=y +CONFIG_DRIVER_CFI=y +# CONFIG_DRIVER_CFI_AMD is not set +# CONFIG_DRIVER_CFI_BANK_WIDTH_1 is not set +# CONFIG_DRIVER_CFI_BANK_WIDTH_2 is not set +CONFIG_MTD_UBI=y CONFIG_GPIO_PL061=y CONFIG_RTC_CLASS=y CONFIG_RTC_DRV_DS1307=y CONFIG_FS_CRAMFS=y +CONFIG_FS_EXT4=y CONFIG_FS_TFTP=y +CONFIG_FS_NFS=y CONFIG_SHA1=y CONFIG_SHA256=y
arch/arm/mach-versatile/Kconfig +1 -0
@@ -11,6 +11,7 @@ config MACH_VERSATILEPB bool "ARM Versatile/PB (ARM926EJ-S)" select ARM_AMBA select CLKDEV_LOOKUP + select HAVE_DEFAULT_ENVIRONMENT_NEW endchoice
Signature · 7 lines
2.1.3 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 7/9 poller: allow to restrict the poller frequency
In reply to Jean-Christophe PLAGNIOL-VILLARDso we do not slow down barebox on too much polling specialy on USB drivers
--- common/poller.c | 11 ++++++++++- include/poller.h | 3 +++ 2 files changed, 13 insertions(+), 1 deletion(-)
common/poller.c +10 -1
@@ -24,6 +24,9 @@ int poller_register(struct poller_struct *poller)list_add_tail (&poller->list, &poller_list); poller->registered =1 ; +if (poller->frequency) + poller->poll_next =get_time_ns (); +return 0 ; }
@@ -96,8 +99,14 @@ void poller_call(void) poller_active =1 ; -list_for_each_entry_safe (poller, tmp, &poller_list, list) +list_for_each_entry_safe (poller, tmp, &poller_list, list) { + +if (poller->frequency &&get_time_ns () < poller->poll_next) +continue ; poller->func (poller); +if (poller->frequency) + poller->poll_next += poller->frequency; + } poller_active =0 ; }
include/poller.h +3 -0
@@ -14,6 +14,9 @@ struct poller_struct {void (*func)(struct poller_struct *poller);int registered;struct list_head list; + +uint64_t frequency; +uint64_t poll_next; };int poller_register (struct poller_struct *poller);
Signature · 7 lines
2.1.3 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 8/9 console: allow to specify the device id
In reply to Jean-Christophe PLAGNIOL-VILLARDso we can use dynamic number id with specific devname
--- common/console.c | 2 +- drivers/usb/gadget/u_serial.c | 1 + include/console.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-)
common/console.c +1 -1
@@ -188,7 +188,7 @@ int console_register(struct console_device *newcdev)console_init_early ();if (newcdev->devname) { - dev->id =DEVICE_ID_SINGLE ; + dev->id = newcdev->devid;strcpy (dev->name, newcdev->devname); }else { dev->id =DEVICE_ID_DYNAMIC ;
drivers/usb/gadget/u_serial.c +1 -0
@@ -530,6 +530,7 @@ int gserial_connect(struct gserial *gser, u8 port_num) cdev->flush = serial_flush; cdev->setbrg = serial_setbaudrate; cdev->devname ="usbserial" ; + cdev->devid =DEVICE_ID_SINGLE ; status =console_register (cdev);if (status)
include/console.h +1 -0
@@ -47,6 +47,7 @@ struct console_device {int (*set_mode)(struct console_device *cdev,enum console_mode mode);char *devname; +int devid;struct list_head list;
Signature · 7 lines
2.1.3 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 9/9 defaultenv-2: create a specific defaultenv for splash
In reply to Jean-Christophe PLAGNIOL-VILLARDThis will allow to factorize splash init
--- common/Kconfig | 5 +++++ defaultenv/Makefile | 1 + defaultenv/defaultenv-2-splash/bin/splash | 15 +++++++++++++++ defaultenv/defaultenv-2-splash/init/splash | 3 +++ defaultenv/defaultenv.c | 2 ++ 5 files changed, 26 insertions(+) create mode 100644 defaultenv/defaultenv-2-splash/bin/splash create mode 100644 defaultenv/defaultenv-2-splash/init/splash
common/Kconfig +5 -0
@@ -653,6 +653,11 @@ config DEFAULT_ENVIRONMENT_GENERIC_NEW_DFU depends on USB_GADGET_DFU default y +config DEFAULT_ENVIRONMENT_GENERIC_NEW_SPLASH + bool + depends on CMD_SPLASH + default y + config DEFAULT_ENVIRONMENT_GENERIC bool depends on !HAVE_DEFAULT_ENVIRONMENT_NEW
defaultenv/Makefile +1 -0
@@ -1,6 +1,7 @@ bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW) += defaultenv-2-base bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW_MENU) += defaultenv-2-menu bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW_DFU) += defaultenv-2-dfu +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW_SPLASH) += defaultenv-2-splash bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-1 obj-$(CONFIG_DEFAULT_ENVIRONMENT) += defaultenv.o extra-y += barebox_default_env barebox_default_env.h barebox_default_env$(DEFAULT_COMPRESSION_SUFFIX)
defaultenv/defaultenv-2-splash/bin/splash new file +15 -0
@@ -0,0 +1,15 @@ +#!/bin/sh + +splash="/env/splash.png" + +if [ ! -f ${splash} ]; then + return +fi + +splash ${splash} + +if [ $? = 0 ]; then + fb0.enable=1 +else + echo "Cannot show splash image" +fi
defaultenv/defaultenv-2-splash/init/splash new file +3 -0
@@ -0,0 +1,3 @@ +#!/bin/sh + +/env/bin/splash
defaultenv/defaultenv.c +2 -0
@@ -48,6 +48,8 @@ static void defaultenv_add_base(void)defaultenv_append_directory (defaultenv_2_menu);if (IS_ENABLED (CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW_DFU ))defaultenv_append_directory (defaultenv_2_dfu); +if (IS_ENABLED (CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW_SPLASH )) +defaultenv_append_directory (defaultenv_2_splash);if (IS_ENABLED (CONFIG_DEFAULT_ENVIRONMENT_GENERIC ))defaultenv_append_directory (defaultenv_1); }
Signature · 7 lines
2.1.3 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 6/9 console: factorize kfifo input support
In reply to Jean-Christophe PLAGNIOL-VILLARDhandle input fifo at console framework level instead of driver
--- common/Kconfig | 3 ++ common/console.c | 8 +++++ common/console_common.c | 71 ++++++++++++++++++++++++++++++++++++++++++ common/console_simple.c | 4 +++ drivers/input/Kconfig | 4 +++ drivers/input/gpio_keys.c | 43 ++++--------------------- drivers/input/imx_keypad.c | 29 ++--------------- drivers/input/qt1070.c | 28 ++--------------- drivers/input/twl6030_pwrbtn.c | 32 ++----------------- include/console.h | 22 +++++++++++++ include/gpio_keys.h | 1 - 11 files changed, 124 insertions(+), 121 deletions(-)
common/Kconfig +3 -0
@@ -507,6 +507,9 @@ config KERNEL_INSTALL_TARGET compiler. The utility for the target will be under scripts/kernel-install-target +config CONSOLE_KFIFO + bool + choice prompt "console support" default CONSOLE_FULL
common/console.c +8 -0
@@ -182,6 +182,7 @@ int console_register(struct console_device *newcdev) {struct device_d *dev = &newcdev->class_dev;int activate =0 ; +int ret;if (initialized ==CONSOLE_UNINITIALIZED )console_init_early ();
@@ -196,6 +197,11 @@ int console_register(struct console_device *newcdev)if (newcdev->dev) dev->parent = newcdev->dev; + + ret =console_kfifo_input_init (newcdev); +if (ret) +return ret; +platform_device_register (dev);if (newcdev->setbrg) {
@@ -243,6 +249,8 @@ int console_unregister(struct console_device *cdev)if (list_empty (&console_list)) initialized =CONSOLE_UNINITIALIZED ; +console_kfifo_input_clean (cdev); + status =unregister_device (dev);if (!status)memset (cdev,0 ,sizeof (*cdev));
common/console_common.c +71 -0
74 lines not on this page · raw message
common/console_simple.c +4 -0
@@ -89,6 +89,10 @@ int console_register(struct console_device *newcdev) console_list.prev = console_list.next = &newcdev->list; newcdev->list.prev = newcdev->list.next = &console_list; + ret =console_kfifo_input_init (newcdev); +if (ret) +return ret; +if (newcdev->setbrg) { newcdev->baudrate =CONFIG_BAUDRATE ; newcdev->setbrg (newcdev, newcdev->baudrate);
drivers/input/Kconfig +4 -0
@@ -9,6 +9,7 @@ config KEYBOARD_GPIO bool "GPIO Buttons" depends on GENERIC_GPIO select POLLER + select CONSOLE_KFIFO help This driver implements support for buttons connected to GPIO pins of various CPUs (and some other chips).
@@ -22,6 +23,7 @@ config KEYBOARD_IMX_KEYPAD bool "IMX Keypad" depends on ARCH_IMX select POLLER + select CONSOLE_KFIFO help This driver implements support for buttons connected to the IMX keypad matrix.
@@ -35,6 +37,7 @@ config KEYBOARD_QT1070 tristate "Atmel AT42QT1070 Touch Sensor Chip" depends on I2C && GENERIC_GPIO select POLLER + select CONSOLE_KFIFO help Say Y here if you want to use Atmel AT42QT1070 QTouch Sensor chip as input device.
@@ -43,6 +46,7 @@ config KEYBOARD_TWL6030 tristate "TWL6030 power button" depends on MFD_TWL6030 select POLLER + select CONSOLE_KFIFO help Say Y here if you want to use TWL6030 power button as a key.
drivers/input/gpio_keys.c +6 -37
99 lines not on this page · raw message
drivers/input/imx_keypad.c +2 -27
@@ -44,7 +44,6 @@#include <init.h> #include <io.h> #include <poller.h> -#include <kfifo.h> #include <malloc.h> #include <matrix_keypad.h> #include <linux/err.h>
@@ -78,10 +77,6 @@ struct imx_keypad {struct console_device cdev;void __iomem *mmio_base; -/* optional */ -int fifo_size; - -struct kfifo *recv_fifo;struct poller_struct poller;/*
@@ -118,22 +113,6 @@ cdev_to_imx_kp_pdata(struct console_device *cdev) return container_of(cdev, struct imx_keypad, cdev); } -static int imx_keypad_tstc (struct console_device *cdev) -{ -struct imx_keypad *kp =cdev_to_imx_kp_pdata (cdev); - -return (kfifo_len (kp->recv_fifo) ==0 ) ?0 :1 ; -} - -static int imx_keypad_getc (struct console_device *cdev) -{ -int code =0 ; -struct imx_keypad *kp =cdev_to_imx_kp_pdata (cdev); - -kfifo_get (kp->recv_fifo, (u_char *)&code,sizeof (int )); -return code; -} -/* Scan the matrix and return the new state in *matrix_volatile_state. */ static void imx_keypad_scan_matrix (struct imx_keypad *keypad,unsigned short *matrix_volatile_state)
@@ -226,7 +205,7 @@ static void imx_keypad_fire_events(struct imx_keypad *keypad, code =MATRIX_SCAN_CODE (row, col,MATRIX_ROW_SHIFT ); -kfifo_put (keypad->recv_fifo, (u_char *)(&keypad->keycodes[code]),sizeof (int )); +console_kfifo_putc (&keypad->cdev, gb->keypad->keycodes[code]); pr_debug("Event code: %d, val: %d", keypad->keycodes[code],
@@ -406,9 +385,7 @@ static int __init imx_keypad_probe(struct device_d *dev)return PTR_ERR (keypad->mmio_base);if (!keypad->fifo_size) - keypad->fifo_size =50 ; - - keypad->recv_fifo =kfifo_alloc (keypad->fifo_size); + keypad->cdev.fifo_input_size =50 ;/* Search for rows and cols enabled */ for (i =0 ; i < keymap_data->keymap_size; i++) {
@@ -438,8 +415,6 @@ static int __init imx_keypad_probe(struct device_d *dev) cdev = &keypad->cdev; dev->type_data = cdev; cdev->dev = dev; - cdev->tstc = imx_keypad_tstc; - cdev->getc = imx_keypad_getc; cdev->f_active =CONSOLE_STDIN ;console_register (&keypad->cdev);
drivers/input/qt1070.c +2 -26
@@ -9,7 +9,6 @@#include <init.h> #include <clock.h> #include <poller.h> -#include <kfifo.h> #include <i2c/i2c.h> #include <malloc.h> #include <readkey.h>
@@ -42,14 +41,10 @@ struct qt1070_data {u64 start; -/* optional */ -int fifo_size; -struct i2c_client *client;u8 button_state[QT1070_NB_BUTTONS ];u8 previous_state; -struct kfifo *recv_fifo;struct poller_struct poller;struct console_device cdev; };
@@ -117,7 +112,7 @@ static void qt1070_poller(struct poller_struct *poller)if (!bt && data->button_state[i]) {dev_dbg (data->cdev.dev,"release key(%d) as %d\n" , i, data->code[i]); -kfifo_put (data->recv_fifo, (u_char *)&data->code[i],sizeof (int )); +console_kfifo_putc (&data->cdev, data->code[i]); }else if (bt) {dev_dbg (data->cdev.dev,"pressed key(%d) as %d\n" , i, data->code[i]); }
@@ -163,22 +158,6 @@ static void qt1070_calibrate_poller(struct poller_struct *poller) poller->func = qt1070_reset_poller; } -static int qt1070_tstc (struct console_device *cdev) -{ -struct qt1070_data *data =cdev_to_qt_data (cdev); - -return (kfifo_len (data->recv_fifo) ==0 ) ?0 :1 ; -} - -static int qt1070_getc (struct console_device *cdev) -{ -int code =0 ; -struct qt1070_data *data =cdev_to_qt_data (cdev); - -kfifo_get (data->recv_fifo, (u_char *)&code,sizeof (int )); -return code; -} -static int qt1070_pdata_init (struct device_d *dev,struct qt1070_data *data) {struct qt1070_platform_data *pdata = dev->platform_data;
@@ -258,15 +237,12 @@ static int qt1070_probe(struct device_d *dev) data->start =get_time_ns (); - data->fifo_size =50 ; - data->recv_fifo =kfifo_alloc (data->fifo_size); + data->cdev.fifo_input_size =50 ; data->poller.func = qt1070_calibrate_poller; cdev = &data->cdev; cdev->dev = dev; - cdev->tstc = qt1070_tstc; - cdev->getc = qt1070_getc;console_register (&data->cdev);
drivers/input/twl6030_pwrbtn.c +2 -30
@@ -14,7 +14,6 @@#include <init.h> #include <malloc.h> #include <poller.h> -#include <kfifo.h> #include <mfd/twl6030.h> #include <twl6030_pwrbtn.h>
@@ -22,7 +21,6 @@ struct twl6030_pwrbtn_internal_data {int code;u8 previous_state;struct twl6030 *twl6030; -struct kfifo *recv_fifo;struct console_device cdev;struct poller_struct poller; };
@@ -41,32 +39,13 @@ static void ic2_key_poller(struct poller_struct *poller) } val = !(val &PWR_PWRON_IRQ );if (val != idata->previous_state && val) { -kfifo_put (idata->recv_fifo, (u_char *)&idata->code, -sizeof (int )); +console_kfifo_putc (&idata->cdev, idata->code);dev_dbg (idata->cdev.dev,"pressed power button as %d\n" , idata->code); } idata->previous_state = val; } -static int twl6030_pwrbtn_tstc (struct console_device *cdev) -{ -struct twl6030_pwrbtn_internal_data *idata =container_of ( - cdev, struct twl6030_pwrbtn_internal_data, cdev); - -return kfifo_len (idata->recv_fifo) ?1 :0 ; -} - -static int twl6030_pwrbtn_getc (struct console_device *cdev) -{ -int code =0 ; -struct twl6030_pwrbtn_internal_data *idata =container_of ( - cdev, struct twl6030_pwrbtn_internal_data, cdev); - -kfifo_get (idata->recv_fifo, (u_char *)&code,sizeof (int )); -return code; -} -static int __init twl6030_pwrbtn_probe (struct device_d *dev) {struct twl6030_pwrbtn_internal_data *idata;
@@ -80,12 +59,7 @@ static int __init twl6030_pwrbtn_probe(struct device_d *dev) idata =xzalloc (sizeof (struct twl6030_pwrbtn_internal_data )); - idata->recv_fifo =kfifo_alloc (sizeof (int )); -if (!idata->recv_fifo) { -dev_err (dev,"out of memory allocating kfifo\n" ); -free (idata); -return -ENOMEM ; - } + idata->cdev.fifo_input_size =1 ; idata->code = pdata->code; idata->twl6030 =twl6030_get ();
@@ -93,8 +67,6 @@ static int __init twl6030_pwrbtn_probe(struct device_d *dev) dev->type_data = &idata->cdev; idata->cdev.dev = dev; - idata->cdev.tstc = twl6030_pwrbtn_tstc; - idata->cdev.getc = twl6030_pwrbtn_getc;console_register (&idata->cdev);return poller_register (&idata->poller);
include/console.h +22 -0
@@ -23,6 +23,7 @@#include <param.h> #include <linux/list.h> #include <driver.h> +#include <kfifo.h> #define CONSOLE_STDIN (1 << 0)#define CONSOLE_STDOUT (1 << 1)
@@ -49,6 +50,12 @@ struct console_device {struct list_head list; +struct kfifo *recv_fifo; +int (*drv_getc)(struct console_device *cdev); +int (*drv_tstc)(struct console_device *cdev); + +int fifo_input_size; +unsigned char f_active;unsigned int baudrate;
@@ -73,4 +80,19 @@ extern int barebox_loglevel;struct console_device *console_get_first_active (void ); +#ifdef CONFIG_CONSOLE_KFIFO +void console_kfifo_putc (struct console_device *cdev,int c); +void console_kfifo_puts (struct console_device *cdev,char *s,int len); +int console_kfifo_input_init (struct console_device *cdev); +void console_kfifo_input_clean (struct console_device *cdev); +#else +static inline void console_kfifo_putc (struct console_device *cdev,int c) {} +static inline void console_kfifo_puts (struct console_device *cdev,char *s,int len) {} +static inline int console_kfifo_input_init (struct console_device *cdev) +{ +return 0 ; +} +static void inline console_kfifo_input_clean (struct console_device *cdev) {} +#endif +#endif
include/gpio_keys.h +0 -1
@@ -2,7 +2,6 @@#define _GPIO_KEYS_H#include <poller.h> -#include <kfifo.h> struct gpio_keys_button {/* Configuration parameters */
Signature · 7 lines
2.1.3 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 2/9] efika-mx-smartbook: enable led hearbeat on mail
In reply to Jean-Christophe PLAGNIOL-VILLARDQuoted 4 lines · Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>--- arch/arm/boards/efika-mx-smartbook/board.c | 2 ++ 1 file changed, 2 insertions(+)
Applied, thanks
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 3/9] grapric_utils: set_pixel only write 16bit in 16bit mode
In reply to Jean-Christophe PLAGNIOL-VILLARDQuoted 4 lines · Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>--- lib/gui/graphic_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 4/9] versatilepb: move barebox to 32 MiB and use zImage
In reply to Jean-Christophe PLAGNIOL-VILLARDQuoted 5 lines · Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>--- arch/arm/boards/versatile/env/config | 4 ++-- arch/arm/mach-versatile/Kconfig | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-)
Applied, thanks
Sascha
Quoted 39 lines
arch/arm/boards/versatile/env/config +2
-2@@ -19,8 +19,8 @@ rootfs_loc=initrd rootfs_type=ubifs rootfsimage=root.$rootfs_type -#kernelimage=zImage -kernelimage=uImage +kernelimage=zImage +#kernelimage=uImage #kernelimage=Image #kernelimage=Image.lzoarch/arm/mach-versatile/Kconfig +3
-0@@ -1,6 +1,9 @@ if ARCH_VERSATILE +config ARCH_TEXT_BASE + default 0x02000000 + choice prompt "ARM Board type"Signature · 7 lines
2.1.3 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 5/9] versatilepb: switch to defaultenv-2
In reply to Jean-Christophe PLAGNIOL-VILLARDQuoted 24 lines · Jean-Christophe PLAGNIOL-VILLARD
- Boot from NOR
- enable UBI
- use PBLSigned-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>--- arch/arm/boards/versatile/env/boot.d/001-nor | 1 + .../arm/boards/versatile/env/boot.d/101-nor-update | 1 + arch/arm/boards/versatile/env/boot/nor | 15 +++++++++ arch/arm/boards/versatile/env/boot/nor-update | 14 ++++++++ arch/arm/boards/versatile/env/config | 38 ---------------------- arch/arm/boards/versatile/env/init/automount | 11 +++++++ arch/arm/boards/versatile/env/init/mtdparts-nor | 11 +++++++ arch/arm/boards/versatile/env/init/ps1 | 7 ++++ arch/arm/boards/versatile/env/nv/boot.default | 1 + arch/arm/boards/versatile/env/nv/hostname | 1 + .../boards/versatile/env/nv/linux.bootargs.base | 1 + arch/arm/boards/versatile/versatilepb.c | 4 +-- arch/arm/configs/versatilepb_defconfig | 31 ++++++++++++++++-- arch/arm/mach-versatile/Kconfig | 1 + 14 files changed, 94 insertions(+), 43 deletions(-) create mode 120000 arch/arm/boards/versatile/env/boot.d/001-nor create mode 120000 arch/arm/boards/versatile/env/boot.d/101-nor-update create mode 100644 arch/arm/boards/versatile/env/boot/nor
Quoted 8 lines
create mode 100644 arch/arm/boards/versatile/env/boot/nor-update delete mode 100644 arch/arm/boards/versatile/env/config create mode 100644 arch/arm/boards/versatile/env/init/automount create mode 100644 arch/arm/boards/versatile/env/init/mtdparts-nor create mode 100644 arch/arm/boards/versatile/env/init/ps1 create mode 100644 arch/arm/boards/versatile/env/nv/boot.default create mode 100644 arch/arm/boards/versatile/env/nv/hostname create mode 100644 arch/arm/boards/versatile/env/nv/linux.bootargs.base
Applied, thanks
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
maintainerRe: [PATCH 7/9] poller: allow to restrict the poller frequency
In reply to Jean-Christophe PLAGNIOL-VILLARDQuoted 8 lines · Jean-Christophe PLAGNIOL-VILLARD
so we do not slow down barebox on too much polling specialy on USB drivers
Signed-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>--- common/poller.c | 11 ++++++++++- include/poller.h | 3 +++ 2 files changed, 13 insertions(+), 1 deletion(-)
Could you repost this along with the first user?
Quoted 36 lines
common/poller.c +10
-1@@ -24,6 +24,9 @@ int poller_register(struct poller_struct *poller)list_add_tail (&poller->list, &poller_list); poller->registered =1 ; +if (poller->frequency) + poller->poll_next =get_time_ns (); +return 0 ; }@@ -96,8 +99,14 @@ void poller_call(void) poller_active =1 ; -list_for_each_entry_safe (poller, tmp, &poller_list, list) +list_for_each_entry_safe (poller, tmp, &poller_list, list) { + +if (poller->frequency &&get_time_ns () < poller->poll_next) +continue ; poller->func (poller); +if (poller->frequency) + poller->poll_next += poller->frequency; + } poller_active =0 ; }include/poller.h +0
-0
include/poller.h struct poller_struct { · line 20
Quoted 7 lines
include/poller.h +3
-0@@ -14,6 +14,9 @@ struct poller_struct {void (*func)(struct poller_struct *poller);int registered;struct list_head list; + +uint64_t frequency; +uint64_t poll_next; };
Could you reorder the fields in struct poller_struct by fields which should be initialized by users and internal fields? This was not exactly clear before this patch, but this patch introduces another two fields, from which one must be initialized by the user and the other one not.
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
maintainerRe: [PATCH 8/9] console: allow to specify the device id
In reply to Jean-Christophe PLAGNIOL-VILLARDQuoted 27 lines · Jean-Christophe PLAGNIOL-VILLARD
so we can use dynamic number id with specific devname
Signed-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>--- common/console.c | 2 +- drivers/usb/gadget/u_serial.c | 1 + include/console.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-)common/console.c +1
-1@@ -188,7 +188,7 @@ int console_register(struct console_device *newcdev)console_init_early ();if (newcdev->devname) { - dev->id =DEVICE_ID_SINGLE ; + dev->id = newcdev->devid;strcpy (dev->name, newcdev->devname); }else { dev->id =DEVICE_ID_DYNAMIC ;drivers/usb/gadget/u_serial.c +0
-0
drivers/usb/gadget/u_serial.c int gserial_connect(struct gserial *gser, u8 port_num) · line 533
Quoted 4 lines
drivers/usb/gadget/u_serial.c +1
-0@@ -530,6 +530,7 @@ int gserial_connect(struct gserial *gser, u8 port_num) cdev->flush = serial_flush; cdev->setbrg = serial_setbaudrate; cdev->devname ="usbserial" ; + cdev->devid =DEVICE_ID_SINGLE ;
The same is needed in drivers/serial/serial_imx.c
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
maintainerRe: [PATCH 9/9] defaultenv-2: create a specific defaultenv for splash
In reply to Jean-Christophe PLAGNIOL-VILLARDQuoted 68 lines · Jean-Christophe PLAGNIOL-VILLARD
This will allow to factorize splash init
Signed-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>--- common/Kconfig | 5 +++++ defaultenv/Makefile | 1 + defaultenv/defaultenv-2-splash/bin/splash | 15 +++++++++++++++ defaultenv/defaultenv-2-splash/init/splash | 3 +++ defaultenv/defaultenv.c | 2 ++ 5 files changed, 26 insertions(+) create mode 100644 defaultenv/defaultenv-2-splash/bin/splash create mode 100644 defaultenv/defaultenv-2-splash/init/splashcommon/Kconfig +5
-0@@ -653,6 +653,11 @@ config DEFAULT_ENVIRONMENT_GENERIC_NEW_DFU depends on USB_GADGET_DFU default y +config DEFAULT_ENVIRONMENT_GENERIC_NEW_SPLASH + bool + depends on CMD_SPLASH + default y + config DEFAULT_ENVIRONMENT_GENERIC bool depends on !HAVE_DEFAULT_ENVIRONMENT_NEWdefaultenv/Makefile +1
-0@@ -1,6 +1,7 @@ bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW) += defaultenv-2-base bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW_MENU) += defaultenv-2-menu bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW_DFU) += defaultenv-2-dfu +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW_SPLASH) += defaultenv-2-splash bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-1 obj-$(CONFIG_DEFAULT_ENVIRONMENT) += defaultenv.o extra-y += barebox_default_env barebox_default_env.h barebox_default_env$(DEFAULT_COMPRESSION_SUFFIX)defaultenv/defaultenv-2-splash/bin/splash new file +15
-0@@ -0,0 +1,15 @@ +#!/bin/sh + +splash="/env/splash.png" + +if [ ! -f ${splash} ]; then + return +fi + +splash ${splash} + +if [ $? = 0 ]; then + fb0.enable=1 +else + echo "Cannot show splash image" +fidefaultenv/defaultenv-2-splash/init/splash new file +0
-0
defaultenv/defaultenv-2-splash/init/splash line 3
Quoted 3 lines
defaultenv/defaultenv-2-splash/init/splash new file +3
-0@@ -0,0 +1,3 @@ +#!/bin/sh + +/env/bin/splash
Why do you need a separate /env/bin/splash here? Can't you add its content here directly?
If we keep it, it should have the same name as the 'splash' command.
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
maintainerRe: [PATCH 6/9] console: factorize kfifo input support
In reply to Jean-Christophe PLAGNIOL-VILLARDQuoted 16 lines · Jean-Christophe PLAGNIOL-VILLARD
handle input fifo at console framework level instead of driver
Signed-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>--- common/Kconfig | 3 ++ common/console.c | 8 +++++ common/console_common.c | 71 ++++++++++++++++++++++++++++++++++++++++++ common/console_simple.c | 4 +++ drivers/input/Kconfig | 4 +++ drivers/input/gpio_keys.c | 43 ++++--------------------- drivers/input/imx_keypad.c | 29 ++--------------- drivers/input/qt1070.c | 28 ++--------------- drivers/input/twl6030_pwrbtn.c | 32 ++----------------- include/console.h | 22 +++++++++++++ include/gpio_keys.h | 1 - 11 files changed, 124 insertions(+), 121 deletions(-)
Instead of integrating this into the core code can we make this a helper function? Something like:
struct console_poller {
struct poller poller;
struct kfifo fifo;
struct console_device *cdev;
int (*tstc)(struct console_device *cdev)
int (*getc)(struct console_device *cdev)
};int console_init_input_fifo(struct console_poller *copo)
{
if (!copo->cdev || !copo->getc || !copo->tstc)
return -EINVAL;
copo->cdev->tstc = console_fifo_tstc;
copo->cdev->getc = console_fifo_getc;
/* init kfifo / poller */
return 0;
}...
struct gpio_keys {
...
struct console_poller copo;
...
};static int __init gpio_keys_probe(struct device_d *dev)
{
...
gk->copo.getc = gpio_keys_getc;
gk->copo.tstc = gpio_keys_tstc;
console_init_input_fifo(&gk->copo);
}That would make the Kconfig option unnecessary and the core wouldn't get more complicated.
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 9/9] defaultenv-2: create a specific defaultenv for splash
In reply to Sascha HauerQuoted 68 lines · Sascha Hauer
Quoted 67 lines · Jean-Christophe PLAGNIOL-VILLARD
This will allow to factorize splash init
Signed-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>--- common/Kconfig | 5 +++++ defaultenv/Makefile | 1 + defaultenv/defaultenv-2-splash/bin/splash | 15 +++++++++++++++ defaultenv/defaultenv-2-splash/init/splash | 3 +++ defaultenv/defaultenv.c | 2 ++ 5 files changed, 26 insertions(+) create mode 100644 defaultenv/defaultenv-2-splash/bin/splash create mode 100644 defaultenv/defaultenv-2-splash/init/splashcommon/Kconfig +5
-0@@ -653,6 +653,11 @@ config DEFAULT_ENVIRONMENT_GENERIC_NEW_DFU depends on USB_GADGET_DFU default y +config DEFAULT_ENVIRONMENT_GENERIC_NEW_SPLASH + bool + depends on CMD_SPLASH + default y + config DEFAULT_ENVIRONMENT_GENERIC bool depends on !HAVE_DEFAULT_ENVIRONMENT_NEWdefaultenv/Makefile +1
-0@@ -1,6 +1,7 @@ bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW) += defaultenv-2-base bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW_MENU) += defaultenv-2-menu bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW_DFU) += defaultenv-2-dfu +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW_SPLASH) += defaultenv-2-splash bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-1 obj-$(CONFIG_DEFAULT_ENVIRONMENT) += defaultenv.o extra-y += barebox_default_env barebox_default_env.h barebox_default_env$(DEFAULT_COMPRESSION_SUFFIX)defaultenv/defaultenv-2-splash/bin/splash new file +15
-0@@ -0,0 +1,15 @@ +#!/bin/sh + +splash="/env/splash.png" + +if [ ! -f ${splash} ]; then + return +fi + +splash ${splash} + +if [ $? = 0 ]; then + fb0.enable=1 +else + echo "Cannot show splash image" +fidefaultenv/defaultenv-2-splash/init/splash new file +0
-0
Quoted 8 lines
defaultenv/defaultenv-2-splash/init/splash line 3
Quoted 4 lines
defaultenv/defaultenv-2-splash/init/splash new file +3
-0@@ -0,0 +1,3 @@ +#!/bin/sh + +/env/bin/splashWhy do you need a separate /env/bin/splash here? Can't you add its content here directly?
If we keep it, it should have the same name as the 'splash' command.
The problem today is that the generic init is not ordered (such as rc.{0-9}) on linux so if we need specific init before the splash we can not ensure it buy adding an init file that will be added to be run before
The only way is to overwrite the init
or we do introduct a rc.d style buy starting the init with 000-xxx style file name or link
Best Regards,
J.
Quoted 8 lines
Sascha
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 7/9] poller: allow to restrict the poller frequency
In reply to Sascha HauerQuoted 11 lines · Sascha Hauer
Quoted 8 lines · Jean-Christophe PLAGNIOL-VILLARD
so we do not slow down barebox on too much polling specialy on USB drivers
Signed-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>--- common/poller.c | 11 ++++++++++- include/poller.h | 3 +++ 2 files changed, 13 insertions(+), 1 deletion(-)Could you repost this along with the first user?
I'm finishing to clean the USB HID driver that will use it
Best Regards,
J.
Quoted 50 lines
Quoted 37 lines
common/poller.c +10
-1@@ -24,6 +24,9 @@ int poller_register(struct poller_struct *poller)list_add_tail (&poller->list, &poller_list); poller->registered =1 ; +if (poller->frequency) + poller->poll_next =get_time_ns (); +return 0 ; }@@ -96,8 +99,14 @@ void poller_call(void) poller_active =1 ; -list_for_each_entry_safe (poller, tmp, &poller_list, list) +list_for_each_entry_safe (poller, tmp, &poller_list, list) { + +if (poller->frequency &&get_time_ns () < poller->poll_next) +continue ; poller->func (poller); +if (poller->frequency) + poller->poll_next += poller->frequency; + } poller_active =0 ; }include/poller.h +0
-0include/poller.h struct poller_struct { · line 20
Quoted 7 lines
include/poller.h +3
-0@@ -14,6 +14,9 @@ struct poller_struct {void (*func)(struct poller_struct *poller);int registered;struct list_head list; + +uint64_t frequency; +uint64_t poll_next; };Could you reorder the fields in struct
poller_structby fields which should be initialized by users and internal fields? This was not exactly clear before this patch, but this patch introduces another two fields, from which one must be initialized by the user and the other one not.
Quoted 7 lines
Sascha
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
maintainerRe: [PATCH 9/9] defaultenv-2: create a specific defaultenv for splash
In reply to Jean-Christophe PLAGNIOL-VILLARDQuoted 14 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 5 lines
Quoted 5 lines
defaultenv/defaultenv-2-splash/init/splash new file +0
-0Quoted 8 lines
defaultenv/defaultenv-2-splash/init/splash line 3
Quoted 4 lines
defaultenv/defaultenv-2-splash/init/splash new file +3
-0@@ -0,0 +1,3 @@ +#!/bin/sh + +/env/bin/splashWhy do you need a separate /env/bin/splash here? Can't you add its content here directly?
If we keep it, it should have the same name as the 'splash' command.
Quoted 8 lines
The problem today is that the generic init is not ordered (such as rc.{0-9}) on linux so if we need specific init before the splash we can not ensure it buy adding an init file that will be added to be run before
The only way is to overwrite the init
or we do introduct a rc.d style buy starting the init with 000-xxx style file name or link
Then I'm much more in favor for using 000-xxx style. This makes the intention clear how things should be ordered.
Besides, if you need board specific init you can still overwrite /env/init/splash instead of /env/bin/splash.
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 9/9] defaultenv-2: create a specific defaultenv for splash
Quoted 24 lines · Sascha Hauer
Quoted 20 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 5 lines
Quoted 5 lines
defaultenv/defaultenv-2-splash/init/splash new file +0
-0Quoted 8 lines
defaultenv/defaultenv-2-splash/init/splash line 3
Quoted 4 lines
defaultenv/defaultenv-2-splash/init/splash new file +3
-0@@ -0,0 +1,3 @@ +#!/bin/sh + +/env/bin/splashWhy do you need a separate /env/bin/splash here? Can't you add its content here directly?
If we keep it, it should have the same name as the 'splash' command.The problem today is that the generic init is not ordered (such as rc.{0-9}) on linux so if we need specific init before the splash we can not ensure it buy adding an init file that will be added to be run before
The only way is to overwrite the init
Quoted 8 lines
Quoted 2 lines
or we do introduct a rc.d style buy starting the init with 000-xxx style file name or link
Then I'm much more in favor for using 000-xxx style. This makes the intention clear how things should be ordered.
Besides, if you need board specific init you can still overwrite /env/init/splash instead of /env/bin/splash.
If we do this I propose to move all the default init script in /env/bin or what ever
and use symlink
in /env/init/
what do you think?
Best Regards,
J.
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox