RE: Missing attachment at DaVinci wiki
Hi, I have updated the link again. Regards, Mugdha From: Pablo Bitton [mailto:pablo.bit...@gmail.com] Sent: Wednesday, June 24, 2009 10:44 PM To: Kamoolkar, Mugdha; davinci-linux-open-source@linux.davincidsp.com Subject: Missing attachment at DaVinci wiki Hello, I've tried to follow http://wiki.davincidsp.com/index.php/Building_DSPLink_with_kbuild to build DSPLink module and sample applications. But it seems that 1.61patchTo2_6_28.patch is missing from the wiki page. Could you please post it again? Thanks in advance, Pablo. ___ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
[PATCH 3/3] davinci: Adding Kconfig and Makefile entries for dm644x resizer driver.
From: Yusuf Caglar Akyuz Signed-off-by: Yusuf Caglar Akyuz --- arch/arm/mach-davinci/Kconfig |7 +++ arch/arm/mach-davinci/Makefile |1 + 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig index a8ce2dd..99c1bde 100644 --- a/arch/arm/mach-davinci/Kconfig +++ b/arch/arm/mach-davinci/Kconfig @@ -135,6 +135,13 @@ config DAVINCI_RESET_CLOCKS probably do not want this option enabled until your device drivers work properly. +config DAVINCI_DM644X_RESIZER + tristate "DM6446 Hardware Resizer Driver Support" + default n + help + DM644x hardware resizer driver + + endmenu endif diff --git a/arch/arm/mach-davinci/Makefile b/arch/arm/mach-davinci/Makefile index d183b11..de62439 100644 --- a/arch/arm/mach-davinci/Makefile +++ b/arch/arm/mach-davinci/Makefile @@ -18,6 +18,7 @@ obj-$(CONFIG_ARCH_DAVINCI_DA830)+= da830.o devices-da8xx.o obj-$(CONFIG_AINTC)+= irq.o obj-$(CONFIG_CP_INTC) += cp_intc.o +obj-$(CONFIG_DAVINCI_DM644X_RESIZER) += resizer.o resizer_hw.o # Board specific obj-$(CONFIG_MACH_DAVINCI_EVM) += board-dm644x-evm.o -- 1.5.6 ___ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
[PATCH 2/3] davinci: Fixing compilation errors for dm644x hardware resizer driver.
From: Yusuf Caglar Akyuz 2.6.10 driver mostly usable but there are some compile errors: * Header inclusions updated for newer kernels. * Old driver uses devfs, this has changed as well class interfaces. * dev_dbg statements changed. Signed-off-by: Yusuf Caglar Akyuz --- arch/arm/mach-davinci/include/mach/resizer.h| 10 +-- arch/arm/mach-davinci/include/mach/resizer_hw.h |6 +- arch/arm/mach-davinci/resizer.c | 98 ++- arch/arm/mach-davinci/resizer_hw.c | 13 ++-- 4 files changed, 55 insertions(+), 72 deletions(-) diff --git a/arch/arm/mach-davinci/include/mach/resizer.h b/arch/arm/mach-davinci/include/mach/resizer.h index 05a54e9..d6020fc 100644 --- a/arch/arm/mach-davinci/include/mach/resizer.h +++ b/arch/arm/mach-davinci/include/mach/resizer.h @@ -21,9 +21,8 @@ #ifdef __KERNEL__ /* include Linux files */ -#include -#include -#include +#include +#include #include #include #include @@ -48,10 +47,9 @@ #include #include #include -#include +#include #include #include -#include #include #include #include @@ -362,7 +360,7 @@ int delete_from_array(channel_config_t * rsz_configuration_channel); int rsz_set_params(rsz_params_t *, channel_config_t *); int rsz_get_params(rsz_params_t *, channel_config_t *); int free_buff(channel_config_t * rsz_configuration_channel); -irqreturn_t rsz_isr(int, void *, struct pt_regs *); +irqreturn_t rsz_isr(int, void *); void rsz_calculate_crop(channel_config_t * rsz_conf_chan, rsz_cropsize_t * cropsize); #endif /* end of #ifdef __KERNEL__ */ diff --git a/arch/arm/mach-davinci/include/mach/resizer_hw.h b/arch/arm/mach-davinci/include/mach/resizer_hw.h index 775ab59..c66ef9b 100644 --- a/arch/arm/mach-davinci/include/mach/resizer_hw.h +++ b/arch/arm/mach-davinci/include/mach/resizer_hw.h @@ -19,9 +19,9 @@ #ifndefDAVINCI_RESIZER_HW #defineDAVINCI_RESIZER_HW -#include -#include -#include +#include +#include +#include /* Registeroffset mapping*/ #defineRESIZER_IOBASE_VADDRIO_ADDRESS(0x01C70C00) diff --git a/arch/arm/mach-davinci/resizer.c b/arch/arm/mach-davinci/resizer.c index a1197f3..649010e 100644 --- a/arch/arm/mach-davinci/resizer.c +++ b/arch/arm/mach-davinci/resizer.c @@ -18,7 +18,6 @@ /* davinci_resizer.c file */ /*Header files*/ -#include #include #include #include @@ -34,10 +33,10 @@ #include #include #include -#include /* for devfs */ #include -#include -#include +#include +#include +#include #defineDRIVERNAME "DaVinciResizer" @@ -94,7 +93,7 @@ int malloc_buff(rsz_reqbufs_t * reqbuff, channel_config_t * rsz_conf_chan) unsigned long adr; unsigned long size; - dev_dbg(rsz_device, __FUNCTION__ "E\n"); + dev_dbg(rsz_device, "%s E\n", __func__); /* assigning the buf_ptr to input buffer which is array of void pointer */ @@ -234,7 +233,7 @@ int malloc_buff(rsz_reqbufs_t * reqbuff, channel_config_t * rsz_conf_chan) /* this will be useful only when numbuffers = 0 */ *buf_size = reqbuff->size; - dev_dbg(rsz_device, __FUNCTION__ "L\n"); + dev_dbg(rsz_device, "%s L\n", __func__); return SUCESS; } /* end of function Main_buff */ @@ -246,7 +245,7 @@ int get_buf_address(rsz_buffer_t * buffer, channel_config_t * rsz_conf_chan) { int buffer_index = 0; - dev_dbg(rsz_device, __FUNCTION__ "E\n"); + dev_dbg(rsz_device, "%s E\n", __func__); if (buffer == NULL) return -EINVAL; @@ -313,7 +312,7 @@ int get_buf_address(rsz_buffer_t * buffer, channel_config_t * rsz_conf_chan) dev_dbg(rsz_device, "the physical offset returned after query \ is %x", buffer->offset); - dev_dbg(rsz_device, __FUNCTION__ "L\n"); + dev_dbg(rsz_device, "%s L\n", __func__); return SUCESS; @@ -344,7 +343,7 @@ int rsz_start(rsz_resize_t * resize, channel_config_t * rsz_conf_chan) /* For calculating the number of output buffers allocated */ int buffer_out_index = ZERO; - dev_dbg(rsz_device, __FUNCTION__ "E\n"); + dev_dbg(rsz_device, "%s E\n", __func__); /* checking the configuartion status */ if (rsz_conf_chan->config_state) { dev_dbg(rsz_device, "State not configured \n"); @@ -471,7 +470,7 @@ int rsz_start(rsz_resize_t * resize, channel_config_t * rsz_conf_chan) delete_from_array(rsz_conf_chan); - dev_dbg(rsz_device, __FUNCTION__ "L\n"); + dev_dbg(rsz_device, "%s L\n", __func__); return ret; } /*End of function Start_Resize */ @@ -485,7 +484,7 @@ int add_to_array(channel_config_t * rsz_conf_chan) { int array_index, device_index; - dev_dbg(rsz_device, __FUNCTION__ "E\
[PATCH 0/3] davinci: Porting dm644x resizer driver from 2.6.10 tree.
From: Yusuf Caglar Akyuz IMPORTANT: This driver is not ready for upstream inclusion. I'm posting it just in case somebody wants to use it. This patch series port dm644x hardware resizer driver from 2.6.10 tree. According to [1] this driver must be converted to use V4l2 interfaces. I'm not expecting it to find its way into upstream, so there is no checkpatch.pl and there are build warnings. But driver works on recent kernels, this is tested on a 2.6.28 kernel with gstreamer applications using a custom dm6446 board. [1] http://linux.omap.com/pipermail/davinci-linux-open-source/2009-June/014034.html Yusuf Caglar Akyuz (3): Importing dm644x hardware resizer driver from 2.6.10 tree. Fixing compilation errors for dm644x hardware resizer driver. Adding Kconfig and Makefile entries for dm644x hardware resizer driver. arch/arm/mach-davinci/Kconfig |7 + arch/arm/mach-davinci/Makefile |1 + arch/arm/mach-davinci/include/mach/resizer.h| 368 + arch/arm/mach-davinci/include/mach/resizer_hw.h | 58 + arch/arm/mach-davinci/resizer.c | 1635 +++ arch/arm/mach-davinci/resizer_hw.c | 143 ++ 6 files changed, 2212 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-davinci/include/mach/resizer.h create mode 100644 arch/arm/mach-davinci/include/mach/resizer_hw.h create mode 100644 arch/arm/mach-davinci/resizer.c create mode 100644 arch/arm/mach-davinci/resizer_hw.c ___ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
[PATCH 8/9] Adding missing patches for DaVinci VPBE drivers.
From: Yusuf Caglar Akyuz I realized that I dropped some headers while preparing patches while updating to latest Davinci head. Let's add them. These are needed for build process to succeed. Signed-off-by: Yusuf Caglar Akyuz --- include/media/davinci/vid_encoder_if.h| 287 + include/media/davinci/vid_encoder_types.h | 231 +++ include/media/davinci/vpfe_types.h| 71 +++ 3 files changed, 589 insertions(+), 0 deletions(-) create mode 100644 include/media/davinci/vid_encoder_if.h create mode 100644 include/media/davinci/vid_encoder_types.h create mode 100644 include/media/davinci/vpfe_types.h diff --git a/include/media/davinci/vid_encoder_if.h b/include/media/davinci/vid_encoder_if.h new file mode 100644 index 000..618b29c --- /dev/null +++ b/include/media/davinci/vid_encoder_if.h @@ -0,0 +1,287 @@ +/* + * Copyright (C) 2007 Texas Instruments Inc + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * File: vid_encoder_if.h + * Description: + * + * This file defines the interface to allow abstraction of an encoder hardware + * to an encoder module. Each encoder module support one or more display + * channels. It registers with the encoder manager at init and + * unregisters at exit. Encoder modules implement a set of operations defines + * by this interface. For each display channel, encoder manager selects + * one of the encoder registered with it to support the user specified output + * and video/graphics modes on that output. First step is to set the output + * as requested by the user. To do so, encoder manager iterates through + * all supported encoders to match a given output name as requested by the user + * by calling enumoutput(). Once there is a match, this encoder is set as the + * current active encoder. Encoder manager calls initialize() to init the + * encoder and then calls setouput() set the output. If another encoder was + * active before this, encoder manager calls deinitialize() to make it + * inactive. Encoder must select a default mode for this output as part of + * setoutput() call. To set a mode, user call setmode(). All output names and + * mode names are defined in vid_encoder_types.h + */ + +#ifndef VID_ENCODER_IF_H +#define VID_ENCODER_IF_H + +#ifdef __KERNEL__ +#include + +struct vid_encoder_device; +/** + * struct vid_enc_param_ops + * @setparams: + * @getparams: + * + * Description: + * Operation used for setting and getting encoder specific parameters. + * Operations are applied to the current encoder selected by the + * encoder manager + * @setparams: pointer to setparams function. This Set Encoder parameters. + *@params - params structure type ptr declared by encoder + *@enc - encoder device ptr + *Returns - zero on success and non-zero otherwise + * @getparams: pointer to getparams function. This Get encoder parameters + *@params - params structure type ptr declared by encoder + *@enc - encoder device ptr + *Returns - zero on success and non-zero otherwise + */ +struct vid_enc_param_ops { + int (*setparams) (void *params, struct vid_encoder_device * enc); + int (*getparams) (void *params, struct vid_encoder_device * enc); +}; + +/** + * struct vid_enc_mode_ops + * @setmode: + * @getmode: + * + * Description: + * video/graphics mode ops structure. Operations are applied to the + * current output selected by the encoder + * @setmode: Function pointer to setmode. set video/graphics mode or standard + *for current output encoder first check if the std flag is present in the + *mode_info. if yes, it will use name field to match a standard mode. If std + *flag is reset, it may reject the command if non-standard mode + *is not implemented. If non-standard mode is implemented, it would + *save the timing information in the internal structure with a + *key,VID_ENC_STD_NON_STANDARD as defined in vid_encoder_types.h + *It is expected that only one such instance is defined in the video driver. + *Please consider defining a mode in the vid_encoder_types.h + *and use that instead if encoder is to be extended to support additional + *modes not already supported by existing encoders. + *mode_info - ptr to mode information structure. + *enc - e
[PATCH 2/9] Fixing build errors for DaVinci VPBE drivers.
From: Yusuf Caglar Akyuz This commit fixes build errors related to VPBE drivers previously ported from 2.6.10 tree. Main changes are for: * New header structure * Interrupt function definition changes. * Removing devfs calls and new class interface compatibility. Signed-off-by: Yusuf Caglar Akyuz --- drivers/media/video/davinci/davinci_enc_mngr.c | 69 +++- drivers/media/video/davinci/davinci_osd.c |9 ++-- drivers/media/video/davinci/davinci_platform.c | 57 ++-- drivers/media/video/davinci/vpbe_encoder.c | 11 ++-- drivers/video/davincifb.c | 28 ++ include/media/davinci/davinci_enc.h|4 +- include/media/davinci/davinci_enc_mngr.h |9 ++-- include/media/davinci/davinci_platform.h |5 -- include/video/davincifb_ioctl.h| 18 +++--- 9 files changed, 104 insertions(+), 106 deletions(-) diff --git a/drivers/media/video/davinci/davinci_enc_mngr.c b/drivers/media/video/davinci/davinci_enc_mngr.c index 48ffbaf..8ba08fe 100644 --- a/drivers/media/video/davinci/davinci_enc_mngr.c +++ b/drivers/media/video/davinci/davinci_enc_mngr.c @@ -18,16 +18,11 @@ */ #include -#include +#include #include #include #include #include -#include -#include -#include -#include -#include #include #include #include @@ -56,7 +51,7 @@ extern char *davinci_modes[]; #ifdef CONFIG_SYSFS struct display_device { struct module *owner; - struct class_device class_dev; + struct device class_dev; int channel; }; @@ -65,7 +60,7 @@ static struct display_device *davinci_display_device[DAVINCI_ENC_MAX_CHANNELS]; #define to_display_dev(cdev) container_of(cdev, \ struct display_device, class_dev) -static void display_class_release(struct class_device *cdev) +static void display_class_release(struct device *cdev) { struct display_device *dev = to_display_dev(cdev); @@ -75,10 +70,10 @@ static void display_class_release(struct class_device *cdev) struct class display_class = { .name = "davinci_display", - .release = display_class_release, + .dev_release = display_class_release, }; -static ssize_t output_show(struct class_device *cdev, char *buf) +static ssize_t output_show(struct device *cdev, struct device_attribute *attr, char *buf) { char name[VID_ENC_NAME_MAX_CHARS]; struct display_device *dev = to_display_dev(cdev); @@ -95,7 +90,7 @@ static ssize_t output_show(struct class_device *cdev, char *buf) } static ssize_t -output_store(struct class_device *cdev, const char *buffer, size_t count) +output_store(struct device *cdev, struct device_attribute *attr, const char *buffer, size_t count) { struct display_device *dev = to_display_dev(cdev); char name[count]; @@ -113,7 +108,7 @@ output_store(struct class_device *cdev, const char *buffer, size_t count) return count; } -static ssize_t mode_show(struct class_device *cdev, char *buf) +static ssize_t mode_show(struct device *cdev, struct device_attribute *attr, char *buf) { struct display_device *dev = to_display_dev(cdev); struct vid_enc_mode_info mode_info; @@ -131,7 +126,7 @@ static ssize_t mode_show(struct class_device *cdev, char *buf) } static ssize_t -mode_store(struct class_device *cdev, const char *buffer, size_t count) +mode_store(struct device *cdev, struct device_attribute *attr, const char *buffer, size_t count) { struct display_device *dev = to_display_dev(cdev); char name[count]; @@ -157,13 +152,13 @@ mode_store(struct class_device *cdev, const char *buffer, size_t count) return count; } -static ssize_t enable_show(struct class_device *cdev, char *buf) +static ssize_t enable_show(struct device *cdev, struct device_attribute *attr, char *buf) { return 0; } static ssize_t -enable_store(struct class_device *cdev, const char *buffer, size_t count) +enable_store(struct device *cdev, struct device_attribute *attr, const char *buffer, size_t count) { struct display_device *dev = to_display_dev(cdev); int enable_output_state, ret; @@ -186,7 +181,7 @@ enable_store(struct class_device *cdev, const char *buffer, size_t count) } static ssize_t -control_store(struct class_device *cdev, const char *buffer, size_t count, +control_store(struct device *cdev, struct device_attribute *attr, const char *buffer, size_t count, u8 ctrl) { struct display_device *dev = to_display_dev(cdev); @@ -203,7 +198,7 @@ control_store(struct class_device *cdev, const char *buffer, size_t count, return ret; return count; } -static ssize_t control_show(struct class_device *cdev, char *buf, u8 ctrl) +static ssize_t control_show(struct device *cdev, struct device_attribute *attr, char *buf, u8 ctrl) { struct display_device *dev = to_display_dev(cdev); unsigned int p; @@ -221,31
[PATCH 4/9] Adding LCD support to VPBE encoder driver.
From: Yusuf Caglar Akyuz Current VPBE encoder code do not include for support for LCD driving capabilities of dm644x and dm355. It is possible to use LCD output via logicpd encoder code but I think vpbe encoder code must support this feature as well. Signed-off-by: Yusuf Caglar Akyuz --- drivers/media/video/davinci/davinci_platform.c |8 + drivers/media/video/davinci/logicpd_encoder.c | 20 ++-- drivers/media/video/davinci/vpbe_encoder.c | 39 +-- include/media/davinci/vpbe_encoder.h |8 ++-- 4 files changed, 51 insertions(+), 24 deletions(-) diff --git a/drivers/media/video/davinci/davinci_platform.c b/drivers/media/video/davinci/davinci_platform.c index 48df2db..79fcc1f 100644 --- a/drivers/media/video/davinci/davinci_platform.c +++ b/drivers/media/video/davinci/davinci_platform.c @@ -38,10 +38,18 @@ extern struct vid_enc_device_mgr enc_dev[]; +//#define USE_LCD_AS_DEFAULT +#ifndef USE_LCD_AS_DEFAULT struct enc_config davinci_enc_default[DAVINCI_ENC_MAX_CHANNELS] = { {VID_ENC_OUTPUT_COMPOSITE, VID_ENC_STD_NTSC} }; +#else +struct enc_config davinci_enc_default[DAVINCI_ENC_MAX_CHANNELS] = { + {VID_ENC_OUTPUT_LCD, +VID_ENC_STD_640x480} +}; +#endif EXPORT_SYMBOL(davinci_enc_default); diff --git a/drivers/media/video/davinci/logicpd_encoder.c b/drivers/media/video/davinci/logicpd_encoder.c index fd120c3..a3746a5 100644 --- a/drivers/media/video/davinci/logicpd_encoder.c +++ b/drivers/media/video/davinci/logicpd_encoder.c @@ -23,7 +23,7 @@ /* Kernel Specific header files */ #include -#include +#include #include #include #include @@ -59,14 +59,14 @@ static struct logicpd_encoder_config logicpd_encoder_configuration = { .if_type = VID_ENC_IF_PRGB, .interlaced = 0, .xres = 800, - .yres = 576, - .fps = {47, 1},//{60, 1}, - .left_margin = 40,//85, - .right_margin = 40,//70, - .upper_margin = 29,//32, - .lower_margin = 13,//11, - .hsync_len = 48,//9, - .vsync_len = 3,//9, + .yres = 480, + .fps = {55, 1}, + .left_margin = 40, + .right_margin = 40, + .upper_margin = 29, + .lower_margin = 13, + .hsync_len = 48, + .vsync_len = 3, .flags = 0}, /* hsync -ve, vsync -ve */ .standards[1] = { .name = VID_ENC_STD_640x400, @@ -407,7 +407,7 @@ static void logicpd_encoder_cleanup(void) vid_enc_unregister_encoder(&logicpd_encoder_dev); } -subsys_initcall(logicpd_encoder_init); +subsys_initcall_sync(logicpd_encoder_init); module_exit(logicpd_encoder_cleanup); MODULE_LICENSE("GPL"); diff --git a/drivers/media/video/davinci/vpbe_encoder.c b/drivers/media/video/davinci/vpbe_encoder.c index 0a92341..101068a 100644 --- a/drivers/media/video/davinci/vpbe_encoder.c +++ b/drivers/media/video/davinci/vpbe_encoder.c @@ -161,7 +161,22 @@ static struct vid_enc_mode_info vpbe_encoder_modes[VPBE_ENCODER_MAX_NUM_STD] = { .lower_margin = 0, .hsync_len = 0, .vsync_len = 0, -.flags = 0} +.flags = 0}, + { +.name = VID_ENC_STD_640x480, +.std = 1, +.if_type = VID_ENC_IF_PRGB, +.interlaced = 0, +.xres = 800, +.yres = 480, +.fps = {55, 1}, +.left_margin = 40, +.right_margin = 40, +.upper_margin = 29, +.lower_margin = 13, +.hsync_len = 48, +.vsync_len = 3, +.flags = 0}, }; static struct vpbe_encoder_config vpbe_encoder_configuration = { @@ -171,13 +186,18 @@ static struct vpbe_encoder_config vpbe_encoder_configuration = { .output_name = VID_ENC_OUTPUT_COMPOSITE, .no_of_standard = VPBE_DM644X_ENCODER_COMPOSITE_NUM_STD, .standards = {VID_ENC_STD_NTSC, VID_ENC_STD_PAL}, - }, + }, .output[1] = { + .output_name = VID_ENC_OUTPUT_LCD, + .no_of_standard = 1, + .standards = { VID_ENC_STD_640x480 }, + }, + .output[2] = { .output_name = VID_ENC_OUTPUT_SVIDEO, .no_of_standard = VPBE_DM644X_ENCODER_SVIDEO_NUM_STD, .standards = {VID_ENC
[PATCH 6/9] Fixing compile errors for DaVinci V4l2 display.
From: Yusuf Caglar Akyuz This commit fixes build errors for V4l2 driver previously ported from 2.6.10 tree. Signed-off-by: Yusuf Caglar Akyuz --- drivers/media/video/davinci/davinci_display.c | 90 + include/media/davinci/davinci_display.h |3 +- 2 files changed, 49 insertions(+), 44 deletions(-) diff --git a/drivers/media/video/davinci/davinci_display.c b/drivers/media/video/davinci/davinci_display.c index 64b6970..3a7a074 100644 --- a/drivers/media/video/davinci/davinci_display.c +++ b/drivers/media/video/davinci/davinci_display.c @@ -17,7 +17,7 @@ */ /* davinci_display.c */ -/*#define DEBUG */ +#define DEBUG #include #include #include @@ -27,12 +27,16 @@ #include #include #include +#include #include #include #include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -112,7 +116,8 @@ static inline unsigned long davinci_alloc_buffer(unsigned int buf_size) if (mem) { unsigned long adr = (unsigned long)mem; while (size > 0) { - SetPageReserved(virt_to_page(adr)); + /* FIXME: SetPageReserved alternative ??? */ + //SetPageReserved(virt_to_page(adr)); adr += PAGE_SIZE; size -= PAGE_SIZE; } @@ -133,7 +138,8 @@ static inline void davinci_free_buffer(unsigned long addr, adr = addr; size = PAGE_SIZE << (get_order(buf_size)); while (size > 0) { - ClearPageReserved(virt_to_page(adr)); + /* FIXME: ClearPageReserved alternative ??? */ + //ClearPageReserved(virt_to_page(adr)); adr += PAGE_SIZE; size -= PAGE_SIZE; } @@ -185,13 +191,13 @@ static int davinci_buffer_prepare(struct videobuf_queue *q, dev_dbg(davinci_display_dev, "\n"); /* If buffer is not initialized, initialize it */ - if (STATE_NEEDS_INIT == vb->state) { + if (VIDEOBUF_NEEDS_INIT == vb->state) { vb->width = davinci_dm.mode_info.xres; vb->height = davinci_dm.mode_info.yres; vb->size = vb->width * vb->height; vb->field = field; } - vb->state = STATE_PREPARED; + vb->state = VIDEOBUF_PREPARED; /* if user pointer memory mechanism is used, get the physical * address of the buffer */ @@ -281,7 +287,7 @@ static void davinci_buffer_queue(struct videobuf_queue *q, /* add the buffer to the DMA queue */ list_add_tail(&vb->queue, &layer->dma_queue); /* Change state of the buffer */ - vb->state = STATE_QUEUED; + vb->state = VIDEOBUF_QUEUED; dev_dbg(davinci_display_dev, "\n"); } @@ -313,7 +319,7 @@ static void davinci_buffer_release(struct videobuf_queue *q, davinci_free_buffer(layer->fbuffers[vb->i], buf_size); layer->fbuffers[vb->i] = 0; } - vb->state = STATE_NEEDS_INIT; + vb->state = VIDEOBUF_NEEDS_INIT; dev_dbg(davinci_display_dev, "\n"); } @@ -322,7 +328,7 @@ static struct videobuf_queue_ops video_qops = { .buf_prepare = davinci_buffer_prepare, .buf_queue = davinci_buffer_queue, .buf_release = davinci_buffer_release, - .buf_config = davinci_buffer_config, + //.buf_config = davinci_buffer_config, }; static u8 layer_first_int = 1; @@ -359,7 +365,7 @@ static void davinci_display_isr(unsigned int event, void *dispObj) /* Mark status of the curFrm to * done and unlock semaphore on it */ layer->curFrm->ts = timevalue; - layer->curFrm->state = STATE_DONE; + layer->curFrm->state = VIDEOBUF_DONE; wake_up_interruptible(&layer->curFrm->done); /* Make curFrm pointing to nextFrm */ layer->curFrm = layer->nextFrm; @@ -371,7 +377,7 @@ static void davinci_display_isr(unsigned int event, void *dispObj) /* Remove that buffer from the buffer queue */ list_del(&layer->nextFrm->queue); /* Mark status of the buffer as active */ - layer->nextFrm->state = STATE_ACTIVE; + layer->nextFrm->state = VIDEOBUF_ACTIVE; /* Set top and bottom field addresses in VPIF registers */ addr = layer->curFrm->boff; @@ -419,7 +425,7 @@ static void davinci_display_isr(unsigned int event, void *dispObj) /* Change status of the curFrm */ dev_dbg(davinci_display_dev, "Done w
[PATCH 7/9] Adding new pinmux definitions for dm355.
From: Yusuf Caglar Akyuz These mux definition are needed for VPBE drivers to work on dm355 hardware. This patch also adds 2 GPIO pinmux definition which are present on DC5 connector of dm355 evm. Signed-off-by: Yusuf Caglar Akyuz --- arch/arm/mach-davinci/dm355.c|9 + arch/arm/mach-davinci/include/mach/mux.h | 10 ++ 2 files changed, 19 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c index f0b10b4..eb3c47e 100644 --- a/arch/arm/mach-davinci/dm355.c +++ b/arch/arm/mach-davinci/dm355.c @@ -474,6 +474,15 @@ MUX_CFG(DM355, SPI0_SDI, 4, 1, 1,0, false) MUX_CFG(DM355, SPI0_SDENA0,4, 0, 1,0, false) MUX_CFG(DM355, SPI0_SDENA1,3, 28,1,1, false) +MUX_CFG(DM355, VOUT_HVSYNC,1, 16,1,0, 0) +MUX_CFG(DM355, VOUT_FIELD,1, 18,3,1, 1) +MUX_CFG(DM355, VOUT_FIELD_G70, 1, 18, 3,0,false) +MUX_CFG(DM355, VOUT_COUTL_EN, 1, 0,0xff, 0x55, false) +MUX_CFG(DM355, VOUT_COUTH_EN, 1, 8,0xff, 0x55, false) + +MUX_CFG(DM355, GPIO16, 3, 18,1, 0, false) +MUX_CFG(DM355, GPIO17, 3, 17,1, 0, false) + INT_CFG(DM355, INT_EDMA_CC, 2,1,1, false) INT_CFG(DM355, INT_EDMA_TC0_ERR, 3,1,1, false) INT_CFG(DM355, INT_EDMA_TC1_ERR, 4,1,1, false) diff --git a/arch/arm/mach-davinci/include/mach/mux.h b/arch/arm/mach-davinci/include/mach/mux.h index cce7509..fe81c25 100644 --- a/arch/arm/mach-davinci/include/mach/mux.h +++ b/arch/arm/mach-davinci/include/mach/mux.h @@ -154,6 +154,16 @@ enum davinci_dm355_index { DM355_EVT8_ASP1_TX, DM355_EVT9_ASP1_RX, DM355_EVT26_MMC0_RX, + + /* VPSS muxing */ + DM355_VOUT_HVSYNC, + DM355_VOUT_FIELD, + DM355_VOUT_FIELD_G70, + DM355_VOUT_COUTL_EN, + DM355_VOUT_COUTH_EN, + + DM355_GPIO16, + DM355_GPIO17, }; enum davinci_dm365_index { -- 1.5.6 ___ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
[PATCH 5/9] Add davinci_read/write macro definition to the VPBE drivers.
From: Yusuf Caglar Akyuz VPBE drivers heavly depend on davinci_read/write macros and these are removed from latest kernels. This commit defines theses macros locally in each file using them. Signed-off-by: Yusuf Caglar Akyuz --- drivers/media/video/davinci/davinci_osd.c |8 drivers/media/video/davinci/davinci_platform.c |8 drivers/media/video/davinci/vpbe_encoder.c |8 3 files changed, 24 insertions(+), 0 deletions(-) diff --git a/drivers/media/video/davinci/davinci_osd.c b/drivers/media/video/davinci/davinci_osd.c index ac06f2e..5880c8c 100644 --- a/drivers/media/video/davinci/davinci_osd.c +++ b/drivers/media/video/davinci/davinci_osd.c @@ -19,6 +19,14 @@ #include #include +#define davinci_readb(a) __raw_readb(IO_ADDRESS(a)) +#define davinci_readw(a) __raw_readw(IO_ADDRESS(a)) +#define davinci_readl(a) __raw_readl(IO_ADDRESS(a)) + +#define davinci_writeb(v, a) __raw_writeb(v, IO_ADDRESS(a)) +#define davinci_writew(v, a) __raw_writew(v, IO_ADDRESS(a)) +#define davinci_writel(v, a) __raw_writel(v, IO_ADDRESS(a)) + /* parameters that apply on a per-window (OSD or video) basis */ struct davinci_window_state { int is_allocated; diff --git a/drivers/media/video/davinci/davinci_platform.c b/drivers/media/video/davinci/davinci_platform.c index 79fcc1f..1cf3a9d 100644 --- a/drivers/media/video/davinci/davinci_platform.c +++ b/drivers/media/video/davinci/davinci_platform.c @@ -36,6 +36,14 @@ #define DM644X_DDR2_CNTL_BASE (0x2000) //#define davinci_cfg_reg(x) davinci_mux_peripheral(x, 1) +#define davinci_readb(a) __raw_readb(IO_ADDRESS(a)) +#define davinci_readw(a) __raw_readw(IO_ADDRESS(a)) +#define davinci_readl(a) __raw_readl(IO_ADDRESS(a)) + +#define davinci_writeb(v, a) __raw_writeb(v, IO_ADDRESS(a)) +#define davinci_writew(v, a) __raw_writew(v, IO_ADDRESS(a)) +#define davinci_writel(v, a) __raw_writel(v, IO_ADDRESS(a)) + extern struct vid_enc_device_mgr enc_dev[]; //#define USE_LCD_AS_DEFAULT diff --git a/drivers/media/video/davinci/vpbe_encoder.c b/drivers/media/video/davinci/vpbe_encoder.c index 101068a..ecb4fb0 100644 --- a/drivers/media/video/davinci/vpbe_encoder.c +++ b/drivers/media/video/davinci/vpbe_encoder.c @@ -32,6 +32,14 @@ #include #include +#define davinci_readb(a) __raw_readb(IO_ADDRESS(a)) +#define davinci_readw(a) __raw_readw(IO_ADDRESS(a)) +#define davinci_readl(a) __raw_readl(IO_ADDRESS(a)) + +#define davinci_writeb(v, a) __raw_writeb(v, IO_ADDRESS(a)) +#define davinci_writew(v, a) __raw_writew(v, IO_ADDRESS(a)) +#define davinci_writel(v, a) __raw_writel(v, IO_ADDRESS(a)) + struct vpbe_encoder_params { int outindex; char *mode; -- 1.5.6 ___ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
[PATCH 0/9] This patch series ports VPBE drivers from 2.6.10 tree.
From: Yusuf Caglar Akyuz IMPORTANT: These drivers by no means for upstream inclusion. I'm posting these just in case somebody wants to use them. This patch series forward port VPBE drivers from 2.6.10 tree into current DaVinci tree. These drivers are sitting locally from 2.6.27 version in my local tree and I'm re-porting these for latest Davinci HEAD. These patches are build tested on latest HEAD, runtime tested on dm355 evm with 2.6.30-rc6 and runtime tested on dm644x EVM with 2.6.28. LCD modifications tested on dm355 evm and custom dm6446 board. V4l2 display driver is tested on latest HEAD as well however I'm not sure if it is working or not. Gstreamer applications seem to run on /dev/videoX but I do not see anything on the display. I suspect this may be related to 2 things: * I'm unable to understand command line option needed for this driver to work, * There may be some issue with dma handling of V4l2 layer and the driver. V4l2 DMA interface is changed dramatically when comapred to 2.6.10 tree. Yusuf Caglar Akyuz (9): Forward port of DaVinci VPBE drivers from 2.6.10 tree. Fixing build errors for DaVinci VPBE drivers. Changing clock handling of VPBE drivers for newer kernels. Adding LCD support to VPBE encoder driver. Add davinci_read/write macro definition to the VPBE drivers. Fixing compile errors for DaVinci V4l2 display. Adding new pinmux definitions for dm355. Adding missing patches for DaVinci VPBE drivers. Adding Kconfig and Makefile entries for DaVinci VPBE drivers. arch/arm/mach-davinci/dm355.c |9 + arch/arm/mach-davinci/include/mach/mux.h | 10 + drivers/media/video/Kconfig| 20 + drivers/media/video/Makefile |3 + drivers/media/video/davinci/davinci_display.c | 1883 + drivers/media/video/davinci/davinci_enc_mngr.c | 1157 drivers/media/video/davinci/davinci_osd.c | 2098 +++ drivers/media/video/davinci/davinci_platform.c | 1028 drivers/media/video/davinci/logicpd_encoder.c | 413 +++ drivers/media/video/davinci/vpbe_encoder.c | 695 + drivers/video/davincifb.c | 3367 ++-- include/media/davinci/davinci_display.h| 167 ++ include/media/davinci/davinci_enc.h| 249 ++ include/media/davinci/davinci_enc_mngr.h | 56 + include/media/davinci/davinci_platform.h | 38 + include/media/davinci/logicpd_encoder.h| 55 + include/media/davinci/vid_encoder_if.h | 287 ++ include/media/davinci/vid_encoder_types.h | 231 ++ include/media/davinci/vpbe_encoder.h | 42 + include/media/davinci/vpfe_types.h | 71 + include/video/davinci_osd.h| 887 +++ include/video/davinci_vpbe.h | 497 include/video/davincifb.h | 481 +--- include/video/davincifb_ioctl.h| 175 ++ 24 files changed, 12095 insertions(+), 1824 deletions(-) create mode 100644 drivers/media/video/davinci/davinci_display.c create mode 100644 drivers/media/video/davinci/davinci_enc_mngr.c create mode 100644 drivers/media/video/davinci/davinci_osd.c create mode 100644 drivers/media/video/davinci/davinci_platform.c create mode 100644 drivers/media/video/davinci/logicpd_encoder.c create mode 100644 drivers/media/video/davinci/vpbe_encoder.c create mode 100644 include/media/davinci/davinci_display.h create mode 100644 include/media/davinci/davinci_enc.h create mode 100644 include/media/davinci/davinci_enc_mngr.h create mode 100644 include/media/davinci/davinci_platform.h create mode 100644 include/media/davinci/logicpd_encoder.h create mode 100644 include/media/davinci/vid_encoder_if.h create mode 100644 include/media/davinci/vid_encoder_types.h create mode 100644 include/media/davinci/vpbe_encoder.h create mode 100644 include/media/davinci/vpfe_types.h create mode 100644 include/video/davinci_osd.h create mode 100644 include/video/davinci_vpbe.h create mode 100644 include/video/davincifb_ioctl.h ___ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
[PATCH 3/9] Changing clock handling of VPBE drivers for newer kernels.
From: Yusuf Caglar Akyuz Davinci clock handling is changed between somewhere 2.6.28 and 2.6.30-rc6 so VPBE drivers no longer works with latest kernels. This commit updates clock handling. Signed-off-by: Yusuf Caglar Akyuz --- drivers/media/video/davinci/davinci_osd.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/drivers/media/video/davinci/davinci_osd.c b/drivers/media/video/davinci/davinci_osd.c index dfe4ed7..ac06f2e 100644 --- a/drivers/media/video/davinci/davinci_osd.c +++ b/drivers/media/video/davinci/davinci_osd.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -1995,6 +1996,10 @@ int davinci_disp_init(void) osd->irq = IRQ_VENCINT; + clk_enable(clk_get(NULL, "vpss_master")); + clk_enable(clk_get(NULL, "vpss_slave")); + clk_enable(clk_get(NULL, "vpss_dac")); + _davinci_disp_init(); /* set default Cb/Cr order */ -- 1.5.6 ___ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
[PATCH 9/9] Adding Kconfig and Makefile entries for DaVinci VPBE drivers.
From: Yusuf Caglar Akyuz Signed-off-by: Yusuf Caglar Akyuz --- drivers/media/video/Kconfig | 20 drivers/media/video/Makefile |3 +++ 2 files changed, 23 insertions(+), 0 deletions(-) diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig index 9d48da2..067dfac 100644 --- a/drivers/media/video/Kconfig +++ b/drivers/media/video/Kconfig @@ -479,6 +479,26 @@ config VIDEO_VIVI Say Y here if you want to test video apps or debug V4L devices. In doubt, say N. +config DAVINCI_OSD + tristate "Davinci Display Manager" + depends on ARCH_DAVINCI + default n + help + Support for Davinci On-Screen Display Manager. + + To compile this driver as a module, choose M here: the + module will be called vpif. + +config DAVINCI_VPBE_ENCODER + tristate "Davinci VPBE Encoder support" + depends on ARCH_DAVINCI + default n + help + Enable support for the DaVinci VPBE internal encoder. DaVinci VPBE + has internal VENC and DAC to output analog SD outputs (composite, + S-Video and Component video outputs). + + source "drivers/media/video/bt8xx/Kconfig" config VIDEO_PMS diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile index 3f1a035..c0d1034 100644 --- a/drivers/media/video/Makefile +++ b/drivers/media/video/Makefile @@ -152,6 +152,9 @@ obj-$(CONFIG_VIDEO_AU0828) += au0828/ obj-$(CONFIG_USB_VIDEO_CLASS) += uvc/ +obj-$(CONFIG_DAVINCI_OSD) += davinci/davinci_platform.o davinci/davinci_osd.o davinci/davinci_enc_mngr.o +obj-$(CONFIG_DAVINCI_VPBE_ENCODER) += davinci/vpbe_encoder.o + EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core EXTRA_CFLAGS += -Idrivers/media/dvb/frontends EXTRA_CFLAGS += -Idrivers/media/common/tuners -- 1.5.6 ___ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
[PATCH 5/5] davinci: This commit fixes checkpatch warnings for DaVinci PWM driver.
From: Yusuf Caglar Akyuz In addition to fixing checkpatch warnings, this patch also changes clock names used in the driver to current DaVinci tree names. Signed-off-by: Yusuf Caglar Akyuz --- arch/arm/mach-davinci/Kconfig|2 +- arch/arm/mach-davinci/include/mach/pwm.h |9 + arch/arm/mach-davinci/pwm.c | 59 +++--- 3 files changed, 33 insertions(+), 37 deletions(-) diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig index 6fa04db..844dac5 100644 --- a/arch/arm/mach-davinci/Kconfig +++ b/arch/arm/mach-davinci/Kconfig @@ -135,7 +135,7 @@ config DAVINCI_PWM depends on ARCH_DAVINCI default n help - DaVinci PWM Driver ported from 2.6.10 tree. This driver supports dm644x, + DaVinci PWM Driver ported from 2.6.10 tree. This driver supports dm644x, dm355 and dm646x SoCs. endmenu diff --git a/arch/arm/mach-davinci/include/mach/pwm.h b/arch/arm/mach-davinci/include/mach/pwm.h index cab37f9..0cf5835 100644 --- a/arch/arm/mach-davinci/include/mach/pwm.h +++ b/arch/arm/mach-davinci/include/mach/pwm.h @@ -33,7 +33,7 @@ /**\ * Register Overlay Structure \**/ -typedef struct { +struct davinci_pwmregs { unsigned int pid; unsigned int pcr; unsigned int cfg; @@ -41,12 +41,7 @@ typedef struct { unsigned int rpt; unsigned int per; unsigned int ph1d; -} davinci_pwmregs; - -/**\ -* Overlay structure typedef definition -\**/ -typedef volatile davinci_pwmregs *davinci_pwmregsovly; +}; #define PWM_MINORS 3 #define DM646X_PWM_MINORS 2 diff --git a/arch/arm/mach-davinci/pwm.c b/arch/arm/mach-davinci/pwm.c index f9aa5f4..c0d885e 100644 --- a/arch/arm/mach-davinci/pwm.c +++ b/arch/arm/mach-davinci/pwm.c @@ -44,22 +44,22 @@ struct pwm_davinci_device { char name[20]; int intr_complete; dev_t devno; - davinci_pwmregsovly regs; + struct davinci_pwmregs *regs; wait_queue_head_t intr_wait; struct clk *pwm_clk; int running; }; -char *dm644x_name[] = { "PWM0_CLK", "PWM1_CLK", "PWM2_CLK" }; -char *dm646x_name[] = { "PWM0_CLK", "PWM1_CLK" }; -char *dm355_name[] = { "PWM0_CLK", "PWM1_CLK", "PWM2_CLK", "PWM3_CLK" }; +char *dm644x_name[] = { "pwm0", "pwm1", "pwm2" }; +char *dm646x_name[] = { "pwm0", "pwm1" }; +char *dm355_name[] = { "pwm0", "pwm1", "pwm2", "pwm3" }; /* Instance of the private WDT device structure */ static struct pwm_davinci_device *pwm_dev_array[DAVINCI_PWM_MINORS]; static DEFINE_SPINLOCK(pwm_dev_array_lock); -static unsigned int pwm_major = 0; -static unsigned int pwm_minor_start = 0; +static unsigned int pwm_major; +static unsigned int pwm_minor_start; static unsigned int pwm_minor_count = DM644X_PWM_MINORS; static unsigned int pwm_device_count = 1; @@ -256,7 +256,7 @@ static void pwm_platform_release(struct device *device) /* this function does nothing */ } -static struct file_operations pwm_fops = { +const static struct file_operations pwm_fops = { .owner = THIS_MODULE, .llseek = pwm_llseek, .open = pwm_open, @@ -264,7 +264,7 @@ static struct file_operations pwm_fops = { .ioctl = pwm_ioctl, }; -static struct class *pwm_class = NULL; +static struct class *pwm_class; static struct platform_device pwm_device[] = { [0] = { @@ -339,7 +339,7 @@ static irqreturn_t pwm_isr(int irq, void *dev_id) return IRQ_HANDLED; } -#define PWM_FREQ 0x1 / 48 +#define PWM_FREQ (0x1 / 48) static ssize_t pwm_show(struct device *d, struct device_attribute *a, char *buf) @@ -347,8 +347,9 @@ pwm_show(struct device *d, struct device_attribute *a, char *buf) struct pwm_davinci_device *pwm_dev; pwm_dev = pwm_dev_get_by_minor(to_platform_device(d)->id); - - return sprintf(buf, "%s\n", pwm_dev->running == 1 ? "running" : "stopped"); + + return sprintf(buf, "%s\n", pwm_dev->running == 1 ? + "running" : "stopped"); } static ssize_t pwm_start(struct device *d, struct device_attribute *a, const char *buf @@ -356,21 +357,21 @@ pwm_start(struct device *d, struct device_attribute *a, const char *buf { struct pwm_davinci_device *pwm_dev; - if(count < 1) + if (count < 1) return count; - + pwm_dev = pwm_dev_get_by_minor(to_platform_device(d)->id); - if(buf[0] == '1' && pwm_dev->running == 0) { + if (buf[0] == '1' && pwm_dev->running == 0) { /* sample configuration */ pwm_dev->regs->per = PWM_FREQ; pwm_dev->regs->ph1d = 0x0; -
[PATCH 2/5] davinci: This commit fixes DaVinci PWM driver build errors and warnings.
From: Yusuf Caglar Akyuz DaVinci PWM driver was previously imported from 2.6.10 tree. This commit updates driver for recent kernels. Signed-off-by: Yusuf Caglar Akyuz --- arch/arm/mach-davinci/include/mach/pwm.h |2 + arch/arm/mach-davinci/pwm.c | 33 + 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/arch/arm/mach-davinci/include/mach/pwm.h b/arch/arm/mach-davinci/include/mach/pwm.h index c73604a..cab37f9 100644 --- a/arch/arm/mach-davinci/include/mach/pwm.h +++ b/arch/arm/mach-davinci/include/mach/pwm.h @@ -66,4 +66,6 @@ typedef volatile davinci_pwmregs *davinci_pwmregsovly; #definePWM_ONESHOT_MODE0 #definePWM_CONTINUOUS_MODE 1 +#define DAVINCI_PWM0_BASE(0x01C22000) + #endif /* _DAVINCI_PWM_H */ diff --git a/arch/arm/mach-davinci/pwm.c b/arch/arm/mach-davinci/pwm.c index 6790f3f..ab66d82 100644 --- a/arch/arm/mach-davinci/pwm.c +++ b/arch/arm/mach-davinci/pwm.c @@ -17,9 +17,9 @@ */ /* include Linux files */ -#include #include #include +#include #include /* printk() */ #include /* kmalloc() */ #include /* everything... */ @@ -31,12 +31,11 @@ #include/* for VERIFY_READ/VERIFY_WRITE/ copy_from_user */ #include -#include /* for devfs */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #defineDRIVER_NAME "PWM" #defineDAVINCI_PWM_TIMEOUT (1*HZ) @@ -264,7 +263,7 @@ static struct file_operations pwm_fops = { .ioctl = pwm_ioctl, }; -static struct class_simple *pwm_class = NULL; +static struct class *pwm_class = NULL; static struct platform_device pwm_device[] = { [0] = { @@ -328,7 +327,7 @@ static inline void pwm_davinci_complete_intr(struct pwm_davinci_device *dev) wake_up(&dev->intr_wait); } -static irqreturn_t pwm_isr(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t pwm_isr(int irq, void *dev_id) { struct pwm_davinci_device *dev = dev_id; @@ -346,7 +345,7 @@ static int __init pwm_init(void) unsigned int size, i, j; char *name[DAVINCI_PWM_MINORS]; - if (cpu_is_davinci_dm6467()) { + if (cpu_is_davinci_dm646x()) { pwm_minor_count = DM646X_PWM_MINORS; for (i = 0; i < pwm_minor_count; i++) name[i] = dm646x_name[i]; @@ -383,7 +382,7 @@ static int __init pwm_init(void) return result; } - pwm_class = class_simple_create(THIS_MODULE, "davinci_pwm"); + pwm_class = class_create(THIS_MODULE, "davinci_pwm"); if (!pwm_class) { cdev_del(&c_dev); return -EIO; @@ -418,7 +417,7 @@ static int __init pwm_init(void) devno = MKDEV(pwm_major, pwm_minor_start + i * pwm_minor_count + j); - class_simple_device_add(pwm_class, devno, NULL, + device_create(pwm_class, NULL, devno, NULL, "davinci_pwm%d", j); /* @@ -427,12 +426,12 @@ static int __init pwm_init(void) if (j == 3) { result = request_irq(IRQ_DM355_PWMINT3, pwm_isr, - SA_INTERRUPT, + 0, pwm_dev_array[j]->name, pwm_dev_array[j]); } else { result = request_irq(IRQ_PWMINT0 + j, - pwm_isr, SA_INTERRUPT, + pwm_isr, 0, pwm_dev_array[j]->name, pwm_dev_array[j]); } @@ -450,7 +449,6 @@ static int __init pwm_init(void) printk("Cannot get clock\n"); return -1; } - clk_use(pwm_dev_array[j]->pwm_clk); clk_enable(pwm_dev_array[j]->pwm_clk); pwm_dev_array[j]->regs = @@ -472,16 +470,15 @@ static void __exit pwm_exit(void) platform_device_unregister(&pwm_device[i]); driver_unregister(&pwm_driver[i]); devno = MKDEV(pwm_major, pwm_minor_start + i); - class_simple_device_remove(devno); + device_destroy(pwm_class, devno); if ((i == 3) && (cpu_is_davinci_dm355())) free_irq(IRQ_DM3
[PATCH 3/5] davinci: Adding a simple sysfs interface for DaVinci PWM driver.
From: Yusuf Caglar Akyuz With the aid of simple sysfs interface driver, functionality can be verified easily without writing a test program. Signed-off-by: Yusuf Caglar Akyuz --- arch/arm/mach-davinci/pwm.c | 91 +++ 1 files changed, 91 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-davinci/pwm.c b/arch/arm/mach-davinci/pwm.c index ab66d82..f9aa5f4 100644 --- a/arch/arm/mach-davinci/pwm.c +++ b/arch/arm/mach-davinci/pwm.c @@ -47,6 +47,7 @@ struct pwm_davinci_device { davinci_pwmregsovly regs; wait_queue_head_t intr_wait; struct clk *pwm_clk; + int running; }; char *dm644x_name[] = { "PWM0_CLK", "PWM1_CLK", "PWM2_CLK" }; @@ -338,6 +339,92 @@ static irqreturn_t pwm_isr(int irq, void *dev_id) return IRQ_HANDLED; } +#define PWM_FREQ 0x1 / 48 + +static ssize_t +pwm_show(struct device *d, struct device_attribute *a, char *buf) +{ + struct pwm_davinci_device *pwm_dev; + + pwm_dev = pwm_dev_get_by_minor(to_platform_device(d)->id); + + return sprintf(buf, "%s\n", pwm_dev->running == 1 ? "running" : "stopped"); +} +static ssize_t +pwm_start(struct device *d, struct device_attribute *a, const char *buf + , size_t count) +{ + struct pwm_davinci_device *pwm_dev; + + if(count < 1) + return count; + + pwm_dev = pwm_dev_get_by_minor(to_platform_device(d)->id); + if(buf[0] == '1' && pwm_dev->running == 0) { + /* sample configuration */ + pwm_dev->regs->per = PWM_FREQ; + pwm_dev->regs->ph1d = 0x0; + pwm_dev->regs->cfg |= 0x2; + pwm_dev->intr_complete = 0; + pwm_dev->running = 1; + pwm_dev->regs->start = 0x1; + } + + if(buf[0] == '0' && pwm_dev->running == 1) { + pwm_dev->regs->cfg &= 0xFFFC; + pwm_dev->running = 0; + } + + return count; +} +static DEVICE_ATTR(control, S_IRUGO | S_IWUSR, pwm_show, pwm_start); + +static ssize_t +duty_read(struct device *d, struct device_attribute *a, char *buf) +{ + struct pwm_davinci_device *pwm_dev; + + pwm_dev = pwm_dev_get_by_minor(to_platform_device(d)->id); + + return sprintf(buf, "%d\n", pwm_dev->regs->ph1d); +} +static ssize_t +duty_write(struct device *d, struct device_attribute *a, const char *buf + , size_t count) +{ + struct pwm_davinci_device *pwm_dev; + int val = 0; + + pwm_dev = pwm_dev_get_by_minor(to_platform_device(d)->id); + + if(count == 1) + val = (buf[0] - 48); + if(count == 2) + val = (buf[0] - 48) * 10 + (buf[1] - 48); + if(count == 3) + val = (buf[0] - 48) * 100 + (buf[1] - 48) * 10 + (buf[2] - 48); + + if(val < 256) + pwm_dev->regs->ph1d = val * (PWM_FREQ / 256); + else + pwm_dev->regs->ph1d = PWM_FREQ; + + return count; +} +static DEVICE_ATTR(duty, S_IRUGO | S_IWUSR, duty_read, duty_write); + +static void create_sysfs_entries(struct device *dev) +{ + int status; + status = device_create_file(dev, &dev_attr_control); + status = device_create_file(dev, &dev_attr_duty); +} +static void remove_sysfs_entries(struct device *dev) +{ + device_remove_file(dev, &dev_attr_control); + device_remove_file(dev, &dev_attr_duty); +} + static int __init pwm_init(void) { int result; @@ -454,6 +541,8 @@ static int __init pwm_init(void) pwm_dev_array[j]->regs = (davinci_pwmregsovly) IO_ADDRESS(DAVINCI_PWM0_BASE + j * 0x400); + pwm_dev_array[j]->running = 0; + create_sysfs_entries(&pwm_device[j].dev); } } return 0; @@ -467,6 +556,7 @@ static void __exit pwm_exit(void) if (pwm_class != NULL) { size = pwm_device_count * pwm_minor_count; for (i = 0; i < size; i++) { + remove_sysfs_entries(&pwm_device[i].dev); platform_device_unregister(&pwm_device[i]); driver_unregister(&pwm_driver[i]); devno = MKDEV(pwm_major, pwm_minor_start + i); @@ -489,6 +579,7 @@ static void __exit pwm_exit(void) size = pwm_device_count * pwm_minor_count; unregister_chrdev_region(devno, size); } + } module_init(pwm_init); -- 1.5.6 ___ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
[PATCH 4/5] davinci: Adding Kconfig and Makefile entries for DaVinci PWM driver.
From: Yusuf Caglar Akyuz Signed-off-by: Yusuf Caglar Akyuz --- arch/arm/mach-davinci/Kconfig |8 arch/arm/mach-davinci/Makefile |1 + 2 files changed, 9 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig index 0817adf..6fa04db 100644 --- a/arch/arm/mach-davinci/Kconfig +++ b/arch/arm/mach-davinci/Kconfig @@ -130,6 +130,14 @@ config DAVINCI_RESET_CLOCKS probably do not want this option enabled until your device drivers work properly. +config DAVINCI_PWM + tristate "DaVinci PWM Driver Support" + depends on ARCH_DAVINCI + default n + help + DaVinci PWM Driver ported from 2.6.10 tree. This driver supports dm644x, + dm355 and dm646x SoCs. + endmenu endif diff --git a/arch/arm/mach-davinci/Makefile b/arch/arm/mach-davinci/Makefile index 59b77a3..cf22e9d 100644 --- a/arch/arm/mach-davinci/Makefile +++ b/arch/arm/mach-davinci/Makefile @@ -18,6 +18,7 @@ obj-$(CONFIG_ARCH_DAVINCI_DA830)+= da830.o devices-da830.o obj-$(CONFIG_AINTC)+= irq.o obj-$(CONFIG_CP_INTC) += cp_intc.o +obj-$(CONFIG_DAVINCI_PWM) += pwm.o # Board specific obj-$(CONFIG_MACH_DAVINCI_EVM) += board-dm644x-evm.o -- 1.5.6 ___ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
[PATCH 1/5] davinci: Importing DaVinci PWM driver from 2.6.10 tree.
From: Yusuf Caglar Akyuz This commit blindly imports existing PWM driver from 2.6.10 tree. Build fixes and other improvements will be added in recpective commits. Signed-off-by: Yusuf Caglar Akyuz --- arch/arm/mach-davinci/include/mach/pwm.h | 69 arch/arm/mach-davinci/pwm.c | 501 ++ 2 files changed, 570 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-davinci/include/mach/pwm.h create mode 100644 arch/arm/mach-davinci/pwm.c diff --git a/arch/arm/mach-davinci/include/mach/pwm.h b/arch/arm/mach-davinci/include/mach/pwm.h new file mode 100644 index 000..c73604a --- /dev/null +++ b/arch/arm/mach-davinci/include/mach/pwm.h @@ -0,0 +1,69 @@ +/* + * linux/drivers/char/davinci_pwm.h + * + * BRIEF MODULE DESCRIPTION + * DaVinci PWM register definitions + * + * Copyright (C) 2006 Texas Instruments. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN + * NO EVENT SHALL THE AUTHOR BELIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef _DAVINCI_PWM_H +#define _DAVINCI_PWM_H + +/**\ +* Register Overlay Structure +\**/ +typedef struct { + unsigned int pid; + unsigned int pcr; + unsigned int cfg; + unsigned int start; + unsigned int rpt; + unsigned int per; + unsigned int ph1d; +} davinci_pwmregs; + +/**\ +* Overlay structure typedef definition +\**/ +typedef volatile davinci_pwmregs *davinci_pwmregsovly; + +#define PWM_MINORS 3 +#define DM646X_PWM_MINORS 2 +#define DM644X_PWM_MINORS 3 +#define DM355_PWM_MINORS 4 +#define DAVINCI_PWM_MINORS DM355_PWM_MINORS /* MAX of all PWM_MINORS */ + +#definePWMIOC_SET_MODE 0x01 +#definePWMIOC_SET_PERIOD 0x02 +#definePWMIOC_SET_DURATION 0x03 +#definePWMIOC_SET_RPT_VAL 0x04 +#definePWMIOC_START0x05 +#definePWMIOC_STOP 0x06 +#definePWMIOC_SET_FIRST_PHASE_STATE0x07 +#definePWMIOC_SET_INACT_OUT_STATE 0x08 + +#definePWM_ONESHOT_MODE0 +#definePWM_CONTINUOUS_MODE 1 + +#endif /* _DAVINCI_PWM_H */ diff --git a/arch/arm/mach-davinci/pwm.c b/arch/arm/mach-davinci/pwm.c new file mode 100644 index 000..6790f3f --- /dev/null +++ b/arch/arm/mach-davinci/pwm.c @@ -0,0 +1,501 @@ +/* + * Copyright (C) 2006 Texas Instruments Inc + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* include Linux files */ +#include +#include +#include +#include /* printk() */ +#include /* kmalloc() */ +#include /* everything... */ +#include/* error codes */ +#include/* size_t */ +#include /* Used for struct cdev */ +#include /* For class_simple_create */ +#include/* For IRQ_HANDLED and irqreturn_t */ +#include
[PATCH 0/5] davinci: This patch series ports PWM driver from 2.6.10 tree.
From: Yusuf Caglar Akyuz This patch series imports 2.6.10 PWM driver into recent kernel. No functional changes have been made to the driver itself. However, I added a simple sysfs interface for functionality check. I verified this driver on 2.6.28 using dm6446 EVM. Patch currently applies on top of current DaVinci HEAD. I ran this series through checkpatch.pl after applying all of them but individual patches fails. I guess this series may be merged into 2 if they are decided to be added to current HEAD. Yusuf Caglar Akyuz (5): Importing DaVinci PWM driver from 2.6.10 tree. This commit fixes DaVinci PWM driver build errors and warnings. Adding a simple sysfs interface for DaVinci PWM driver. Adding Kconfig and Makefile entries for DaVinci PWM driver. This commit fixes checkpatch warnings for DaVinci PWM driver. ___ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
[patch] remove ancient NAND_ECC_HWx_y symbols
From: David Brownell Remove some remnants of ancient NAND code that have been lingering in the DaVinci tree ... so this tree is a closer match to mainline. Signed-off-by: David Brownell --- drivers/mtd/nand/nand_base.c |7 --- include/linux/mtd/nand.h |7 --- 2 files changed, 14 deletions(-) --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -2671,13 +2671,6 @@ int nand_scan_tail(struct mtd_info *mtd) */ switch (chip->ecc.mode) { -#ifdef CONFIG_NAND_FLASH_HW_ECC - case NAND_ECC_HW12_2048: - case NAND_ECC_HW8_512: - case NAND_ECC_HW6_512: - case NAND_ECC_HW3_512: - case NAND_ECC_HW3_256: -#endif case NAND_ECC_HW: /* Use standard hwecc read page function ? */ if (!chip->ecc.read_page) --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h @@ -121,13 +121,6 @@ typedef enum { NAND_ECC_SOFT, NAND_ECC_HW, NAND_ECC_HW_SYNDROME, -#ifdef CONFIG_NAND_FLASH_HW_ECC - NAND_ECC_HW3_256, - NAND_ECC_HW3_512, - NAND_ECC_HW6_512, - NAND_ECC_HW8_512, - NAND_ECC_HW12_2048, -#endif } nand_ecc_modes_t; /* ___ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
[PATCH] mt9t031 - migration to sub device frame work
From: Muralidharan Karicheri This patch migrates mt9t031 driver from SOC Camera interface to sub device interface. This is sent to get a feedback about the changes done since I am not sure if some of the functionality that is removed works okay with SOC Camera bridge driver or not. Following functions are to be discussed and added as needed:- 1) query bus parameters 2) set bus parameters 3) set crop I have tested this with vpfe capture driver and I could capture 640x...@17fps and 2048x1...@12fps resolution frames from the sensor. Reviewed by: Hans Verkuil Reviewed by: Guennadi Liakhovetski Signed-off-by: Murali Karicheri --- drivers/media/video/mt9t031.c | 596 - 1 files changed, 293 insertions(+), 303 deletions(-) diff --git a/drivers/media/video/mt9t031.c b/drivers/media/video/mt9t031.c index f72aeb7..0f32ff2 100644 --- a/drivers/media/video/mt9t031.c +++ b/drivers/media/video/mt9t031.c @@ -13,9 +13,9 @@ #include #include +#include #include #include -#include /* mt9t031 i2c address 0x5d * The platform has to define i2c_board_info @@ -52,33 +52,108 @@ #define MT9T031_VERTICAL_BLANK 25 #define MT9T031_COLUMN_SKIP32 #define MT9T031_ROW_SKIP 20 +#define MT9T031_DEFAULT_WIDTH 640 +#define MT9T031_DEFAULT_HEIGHT 480 #define MT9T031_BUS_PARAM (SOCAM_PCLK_SAMPLE_RISING | \ SOCAM_PCLK_SAMPLE_FALLING | SOCAM_HSYNC_ACTIVE_HIGH | \ SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_DATA_ACTIVE_HIGH | \ SOCAM_MASTER | SOCAM_DATAWIDTH_10) -static const struct soc_camera_data_format mt9t031_colour_formats[] = { + +/* Debug functions */ +static int debug; +module_param(debug, bool, 0644); +MODULE_PARM_DESC(debug, "Debug level (0-1)"); + +static const struct v4l2_fmtdesc mt9t031_formats[] = { + { + .index = 0, + .type = V4L2_BUF_TYPE_VIDEO_CAPTURE, + .description = "Bayer (sRGB) 10 bit", + .pixelformat = V4L2_PIX_FMT_SGRBG10, + }, +}; +static const unsigned int mt9t031_num_formats = ARRAY_SIZE(mt9t031_formats); + +static const struct v4l2_queryctrl mt9t031_controls[] = { { - .name = "Bayer (sRGB) 10 bit", - .depth = 10, - .fourcc = V4L2_PIX_FMT_SGRBG10, - .colorspace = V4L2_COLORSPACE_SRGB, + .id = V4L2_CID_VFLIP, + .type = V4L2_CTRL_TYPE_BOOLEAN, + .name = "Flip Vertically", + .minimum= 0, + .maximum= 1, + .step = 1, + .default_value = 0, + }, { + .id = V4L2_CID_HFLIP, + .type = V4L2_CTRL_TYPE_BOOLEAN, + .name = "Flip Horizontally", + .minimum= 0, + .maximum= 1, + .step = 1, + .default_value = 0, + }, { + .id = V4L2_CID_GAIN, + .type = V4L2_CTRL_TYPE_INTEGER, + .name = "Gain", + .minimum= 0, + .maximum= 127, + .step = 1, + .default_value = 64, + .flags = V4L2_CTRL_FLAG_SLIDER, + }, { + .id = V4L2_CID_EXPOSURE, + .type = V4L2_CTRL_TYPE_INTEGER, + .name = "Exposure", + .minimum= 1, + .maximum= 255, + .step = 1, + .default_value = 255, + .flags = V4L2_CTRL_FLAG_SLIDER, + }, { + .id = V4L2_CID_EXPOSURE_AUTO, + .type = V4L2_CTRL_TYPE_BOOLEAN, + .name = "Automatic Exposure", + .minimum= 0, + .maximum= 1, + .step = 1, + .default_value = 1, } }; +static const unsigned int mt9t031_num_controls = ARRAY_SIZE(mt9t031_controls); struct mt9t031 { - struct i2c_client *client; - struct soc_camera_device icd; + struct v4l2_subdev sd; int model; /* V4L2_IDENT_MT9T031* codes from v4l2-chip-ident.h */ unsigned char autoexposure; u16 xskip; u16 yskip; + u32 width; + u32 height; + unsigned short x_min; /* Camera capabilities */ + unsigned short y_min; + unsigned short x_current; /* Current window location */ + unsigned short y_current; + unsigned short width_min; + unsigned short width_max; + unsigned short height_min; + unsigned short height_max; + unsigned short y_skip_top; /* Lines to skip at the top */ + unsigne
Re: Status of PWM, Resizer and VPBE Drivers
Karicheri, Muralidharan wrote: > Yusuf, > > When you do you plan to send a patch to this list for review ? > I cleaned my patches. I was waiting for latest patches on the list to be applies since some of my patches touches mach-davinci/* as well. I'm going to post in a few minutes. Thanks, Caglar ___ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
RGB R2/B2 mux out EXTCLK/FIELD on VPBE
Dear Sir: I checked the sprufb3.pdf . I need to set PINMUX1 [21:20]=10 to muxout R2 to EXTCLK. I need to set PINMUX1 [19:18]=10 to muxout B2 to field. does the device driver cover this part? if it is not how should I do those part. when I checked spruf72c.pdf, table 7, item 3 and 4, FIELD,R2, EXTCLK,B2, according to sprufb3.pdf, the R2 mux out to EXTCLK but according to spruf72c.pdf, the R2 mux out to field. Can anoyone help me out which one is right one? Regards, Elbert ___ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
Re: [patch] davinci: minor edma cleanup
David Brownell writes: > From: David Brownell > > Minor EDMA cleanup: remove unused SoC-specific #define; and when > requesting the channel controller region, use the device's name > (to be more useful on chips with multiple such controllers). > > Signed-off-by: David Brownell Thanks, pushed. Kevin > --- > arch/arm/mach-davinci/dma.c |4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > --- a/arch/arm/mach-davinci/dma.c > +++ b/arch/arm/mach-davinci/dma.c > @@ -100,8 +100,6 @@ > #define EDMA_SHADOW0 0x2000 /* 4 regions shadowing global channels */ > #define EDMA_PARM0x4000 /* 128 param entries */ > > -#define DAVINCI_DMA_3PCC_BASE0x01C0 > - > #define PARM_OFFSET(param_no)(EDMA_PARM + ((param_no) << 5)) > > #define EDMA_MAX_DMACH 64 > @@ -1209,7 +1207,7 @@ static int __init edma_probe(struct plat > > len = r->end - r->start + 1; > > - r = request_mem_region(r->start, len, r->name); > + r = request_mem_region(r->start, len, dev_name(&pdev->dev)); > if (!r) > return -EBUSY; > > > > ___ > Davinci-linux-open-source mailing list > Davinci-linux-open-source@linux.davincidsp.com > http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source ___ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
RE: Status of PWM, Resizer and VPBE Drivers
Yusuf, When you do you plan to send a patch to this list for review ? Murali Karicheri Software Design Engineer Texas Instruments Inc. Germantown, MD 20874 Phone : 301-515-3736 email: m-kariche...@ti.com >-Original Message- >From: davinci-linux-open-source-boun...@linux.davincidsp.com >[mailto:davinci-linux-open-source-boun...@linux.davincidsp.com] On Behalf >Of Karicheri, Muralidharan >Sent: Monday, June 15, 2009 11:57 AM >To: Yusuf Caglar AKYUZ; Davinci-Linux-Source >Subject: RE: Status of PWM, Resizer and VPBE Drivers > >Hi Yusuf, > >> >>I want to query status of pwm, resizer and video processing back end >>drivers. I ported these drivers from MV tree and using them since >>2.6.27. If anybody is not working on these drivers, I would like to >>submit my versions. It would be good to have these drivers in >>DaVinci tree for obvious reasons.[*] >> >Good to know this. We are just planning to start working on the vpbe >drivers. Initial plan was to port the driver as is using the current >architecture. But there are issues that we need to work on to submit the >drivers to the community for acceptance. But since you have done initial >porting already, could you send us a summary of the changes you have done >on these drivers? If you could send us the source code, we could test it as >well. > >>PWM and resizer drivers are relatively simple and in a good shape >>for latest kernels. >> >Is the resizer you are talking about is the DM6446 resizer driver? Is it >also based on that on MV kernel? For submission to community, it needs to >re-written as a v4l2 device. > >>I don't think VPBE drivers from MV tree is ready for submission and >>they are rather huge but current VPBE drivers(framebuffer + V4L2) >>present in DaVinci git lacking key support for some peripherals. >>For instance, there is no LCD(PRGB) support. >Agree. > >>I have tested MV drivers >>with latest kernels both on dm355 and dm6446 evms and they are >>functional with git kernel. >> >That is great. We could keep this version in the davinci tree if the >changes done are only to support additional devices. Also for submission to >open >we could use this as base code. >>Any comments about the future of these devices are welcome. >> >>Regards, >>Caglar >> >> >>[*] Given that addition of vpfe drivers are real soon plus dsplink >>and friends working well with recent kernels, more user space >>libraries can be integrated with latest kernels including DMAI >>and GStreamer. >> >>-BEGIN PGP SIGNATURE- >>Version: GnuPG v2.0.9 (GNU/Linux) >>Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org >> >>iEYEARECAAYFAko2aRYACgkQ/nL+S5dojehMFACfSEaW0apqEjhQGugALct/G/XV >>7BIAoLgOafxE2Lp9CBm1UBYOIO+u0qc2 >>=O9Sy >>-END PGP SIGNATURE- >> >>___ >>Davinci-linux-open-source mailing list >>Davinci-linux-open-source@linux.davincidsp.com >>http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source >___ >Davinci-linux-open-source mailing list >Davinci-linux-open-source@linux.davincidsp.com >http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source ___ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
[patch] davinci: minor edma cleanup
From: David Brownell Minor EDMA cleanup: remove unused SoC-specific #define; and when requesting the channel controller region, use the device's name (to be more useful on chips with multiple such controllers). Signed-off-by: David Brownell --- arch/arm/mach-davinci/dma.c |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/arch/arm/mach-davinci/dma.c +++ b/arch/arm/mach-davinci/dma.c @@ -100,8 +100,6 @@ #define EDMA_SHADOW0 0x2000 /* 4 regions shadowing global channels */ #define EDMA_PARM 0x4000 /* 128 param entries */ -#define DAVINCI_DMA_3PCC_BASE 0x01C0 - #define PARM_OFFSET(param_no) (EDMA_PARM + ((param_no) << 5)) #define EDMA_MAX_DMACH 64 @@ -1209,7 +1207,7 @@ static int __init edma_probe(struct plat len = r->end - r->start + 1; - r = request_mem_region(r->start, len, r->name); + r = request_mem_region(r->start, len, dev_name(&pdev->dev)); if (!r) return -EBUSY; ___ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
RE: Using buildinstructions "fatal error #5: could not open source file "ti/xdais/dm/ividdec.h"
I agree, it is a bug. It was fixed in CE 2.10.01, released over a year ago, but unfortunately the DVSDKs are significantly trailing the latest Codec Engine releases. :( I've added details about this bug here in the CE 2.00 section: http://tiexpressdsp.com/index.php/Codec_Engine_Known_Issues Chris From: davinci-linux-open-source-boun...@linux.davincidsp.com [mailto:davinci-linux-open-source-boun...@linux.davincidsp.com] On Behalf Of Sandeep YEDIRE Sent: Wednesday, June 24, 2009 3:37 AM To: JayaKumar, PremKumar; davinci-linux-open-source@linux.davincidsp.com Cc: bmi...@acmet.com; Sandeep Yedire Subject: Re: Using buildinstructions "fatal error #5: could not open source file "ti/xdais/dm/ividdec.h" Thanks. seems working. This seems buggy as I dont have cetools folder. so it shud take it as zero. Many Thanks, Sandeep.Yedire From: "JayaKumar, PremKumar" To: Sandeep YEDIRE ; "davinci-linux-open-source@linux.davincidsp.com" Cc: "bmi...@acmet.com" ; Sandeep Yedire Sent: Wednesday, 24 June, 2009 3:42:42 PM Subject: RE: Using buildinstructions "fatal error #5: could not open source file "ti/xdais/dm/ividdec.h" >From the error message you can see that the xdais path is tried to be picked >from the cetools. Try setting USE_CETOOLS_IF_EXISTS = 0 in the xdcpaths.mak so >that the path which you want to be set as xdais path in the XDCPATH will take >effect. Regards, Prem From: davinci-linux-open-source-boun...@linux.davincidsp.com [mailto:davinci-linux-open-source-boun...@linux.davincidsp.com] On Behalf Of Sandeep YEDIRE Sent: Wednesday, June 24, 2009 3:17 PM To: davinci-linux-open-source@linux.davincidsp.com Cc: bmi...@acmet.com; Sandeep Yedire Subject: Using buildinstructions "fatal error #5: could not open source file "ti/xdais/dm/ividdec.h" Hello there, i have been working on DM6446 for about a week now but not able to set-up properly. I followed instructions given in sprue66d.pdf for installation on my RHEL -4 pc. I did this twice as I got strange error message when working with one of examples. Which I already posted with subject :"xdc.loadPackage: can't find package 'ti.sdo.ce' when building viddec_copy examples" date:22/06/09. I could not find casue for this error and try to set-up everything again. When I finished with setting up everything, With refering to build instruction in codec_engine/examples/, I mdofied changes in xdcpath.mak and user.bld file accordingly. I have copied both the files below. When I did gmake in dir "~/work/examples/ti/sdo/ce/examples/codecs/viddec_copy/", I get this error message which is given below. I found these header files, in dir /home/sandeep/dvsdk_1_30_01_41/xdais_6_00_01/packages/ti/xdais/dm/ But these are not included when I build them. I also set my env variable for XDCPATH accordingly. Please find my XDCPATH below with heading. It looks like, I have not included the correct XDCPATH which actually is the problem for my earlier failure. Please look for below files for any help in this issue. I can copy the contents of /home/sandeep/dvsdk_1_30_01_41/xdais_6_00_01/packages/ti/ to ~/work/examples/ti/ for this error. But When I have given path in xdcpath.mak file, and the makefile in viddec_copy folder will refer to this xdcpath.mak for its packages. Please look for below files for any help/advice in this issue I am having. --- Error message: [sand...@evmdm6446 viddec_copy]$ gmake /home/sandeep/dvsdk_1_30_01_41/xdc_3_00_02/xdc XDCPATH="/home/sandeep/work/examples/ti/sdo/ce/examples/codecs/viddec_copy/../../../../../..;/home/sandeep/dvsdk_1_30_01_41/codec_engine_2_00_01/packages;/home/sandeep/dvsdk_1_30_01_41/codec_engine_2_00_01/cetools/packages;/home/sandeep/dvsdk_1_30_01_41/bios_5_31_08/packages" \ XDCOPTIONS=v all -PD . making all: Wed Jun 24 14:31:14 IST 2009 ... .interfaces [/home/sandeep/work/examples/ti/sdo/ce/examples/codecs/viddec_copy] gmake[1]: `.interfaces' is up to date. .interfaces files complete: Wed Jun 24 14:31:14 IST 2009. .libraries [/home/sandeep/work/examples/ti/sdo/ce/examples/codecs/viddec_copy] rm -f package/lib/lib/viddec_copy/viddec_copy.o64P # # cl64P viddec_copy.c ... /home/sandeep/dvsdk_1_30_01_41/cg6x_6_0_15/bin/cl6x -c -oe -qq -pdsw225 -pden -pds=195 -mv64p -eo.o64P -ea.s64P -Dxdc_target_name__=C64P -Dxdc_target_types__=ti/targets/std.h -Dxdc_bld__profile_release -Dxdc_bld__vers_1_0_6_0_15 -o2 -I.. -I/home/sandeep/work/examples/ti/sdo/ce/examples/codecs/viddec_copy/../../../../../... -I/home/sandeep/dvsdk_1_30_01_41/codec_engine_2_00_01/packages -I/home/sandeep/dvsdk_1_30_01_41/codec_engine_2_00_01/cetools/packages -I/home/sandeep/dvsdk_1_30_01_41/bios_5_31_08/packages -I/home/sandeep/dvsdk_1_30_01_41/xdc_3_00_02/p
Missing attachment at DaVinci wiki
Hello, I've tried to follow http://wiki.davincidsp.com/index.php/Building_DSPLink_with_kbuild to build DSPLink module and sample applications. But it seems that 1.61patchTo2_6_28.patch is missing from the wiki page. Could you please post it again? Thanks in advance, Pablo. ___ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
Re: [PATCH] DaVinci: DM365 Updating PINMUX Entries
s-paul...@ti.com writes: > From: Sandeep Paulraj > > Patch updates DM365 PINMUX by adding entries for Video, SPI 1 - 4, > PWM 0 - 3. > > Signed-off-by: Sandeep Paulraj Thanks, pushing today. Kevin > --- > arch/arm/mach-davinci/dm365.c| 51 ++ > arch/arm/mach-davinci/include/mach/mux.h | 58 > ++ > 2 files changed, 109 insertions(+), 0 deletions(-) > > diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c > index ad66e27..0789de0 100644 > --- a/arch/arm/mach-davinci/dm365.c > +++ b/arch/arm/mach-davinci/dm365.c > @@ -533,6 +533,57 @@ MUX_CFG(DM365, EMAC_MDCLK, 3, 0, 1,1, > false) > > MUX_CFG(DM365, KEYPAD, 2, 0, 0x3f, 0x3f, false) > > +MUX_CFG(DM365, PWM0, 1, 0, 3,2, false) > +MUX_CFG(DM365, PWM0_G23, 3, 26,3,3, false) > +MUX_CFG(DM365, PWM1, 1, 2, 3,2, false) > +MUX_CFG(DM365, PWM1_G25, 3, 29,3,2, false) > +MUX_CFG(DM365, PWM2_G87, 1, 10,3,2, false) > +MUX_CFG(DM365, PWM2_G88, 1, 8, 3,2, false) > +MUX_CFG(DM365, PWM2_G89, 1, 6, 3,2, false) > +MUX_CFG(DM365, PWM2_G90, 1, 4, 3,2, false) > +MUX_CFG(DM365, PWM3_G80, 1, 20,3,3, false) > +MUX_CFG(DM365, PWM3_G81, 1, 18,3,3, false) > +MUX_CFG(DM365, PWM3_G85, 1, 14,3,2, false) > +MUX_CFG(DM365, PWM3_G86, 1, 12,3,2, false) > + > +MUX_CFG(DM365, SPI1_SCLK, 4, 2, 3,1, false) > +MUX_CFG(DM365, SPI1_SDI, 3, 31,1,1, false) > +MUX_CFG(DM365, SPI1_SDO, 4, 0, 3,1, false) > +MUX_CFG(DM365, SPI1_SDENA0,4, 4, 3,1, false) > +MUX_CFG(DM365, SPI1_SDENA1,4, 0, 3,2, false) > + > +MUX_CFG(DM365, SPI2_SCLK, 4, 10,3,1, false) > +MUX_CFG(DM365, SPI2_SDI, 4, 6, 3,1, false) > +MUX_CFG(DM365, SPI2_SDO, 4, 8, 3,1, false) > +MUX_CFG(DM365, SPI2_SDENA0,4, 12,3,1, false) > +MUX_CFG(DM365, SPI2_SDENA1,4, 8, 3,2, false) > + > +MUX_CFG(DM365, SPI3_SCLK, 0, 0, 3,2, false) > +MUX_CFG(DM365, SPI3_SDI, 0, 2, 3,2, false) > +MUX_CFG(DM365, SPI3_SDO, 0, 6, 3,2, false) > +MUX_CFG(DM365, SPI3_SDENA0,0, 4, 3,2, false) > +MUX_CFG(DM365, SPI3_SDENA1,0, 6, 3,3, false) > + > +MUX_CFG(DM365, SPI4_SCLK, 4, 18,3,1, false) > +MUX_CFG(DM365, SPI4_SDI, 4, 14,3,1, false) > +MUX_CFG(DM365, SPI4_SDO, 4, 16,3,1, false) > +MUX_CFG(DM365, SPI4_SDENA0,4, 20,3,1, false) > +MUX_CFG(DM365, SPI4_SDENA1,4, 16,3,2, false) > + > +MUX_CFG(DM365, GPIO20, 3, 21,3,0, false) > +MUX_CFG(DM365, GPIO33, 4, 12,3,0, false) > +MUX_CFG(DM365, GPIO40, 4, 26,3,0, false) > + > +MUX_CFG(DM365, VOUT_FIELD, 1, 18,3,1, false) > +MUX_CFG(DM365, VOUT_FIELD_G81, 1, 18,3,0, false) > +MUX_CFG(DM365, VOUT_HVSYNC,1, 16,1,0, false) > +MUX_CFG(DM365, VOUT_COUTL_EN, 1, 0, 0xff, 0x55, false) > +MUX_CFG(DM365, VOUT_COUTH_EN, 1, 8, 0xff, 0x55, false) > +MUX_CFG(DM365, VIN_CAM_WEN,0, 14,3,0, false) > +MUX_CFG(DM365, VIN_CAM_VD, 0, 13,1,0, false) > +MUX_CFG(DM365, VIN_CAM_HD, 0, 12,1,0, false) > +MUX_CFG(DM365, VIN_YIN_EN, 0, 0, 0xfff, 0,false) > + > INT_CFG(DM365, INT_EDMA_CC, 2, 1,1, false) > INT_CFG(DM365, INT_EDMA_TC0_ERR,3, 1,1, false) > INT_CFG(DM365, INT_EDMA_TC1_ERR,4, 1,1, false) > diff --git a/arch/arm/mach-davinci/include/mach/mux.h > b/arch/arm/mach-davinci/include/mach/mux.h > index ae4f6dd..cce7509 100644 > --- a/arch/arm/mach-davinci/include/mach/mux.h > +++ b/arch/arm/mach-davinci/include/mach/mux.h > @@ -224,6 +224,64 @@ enum davinci_dm365_index { > /* Keypad */ > DM365_KEYPAD, > > + /* PWM */ > + DM365_PWM0, > + DM365_PWM0_G23, > + DM365_PWM1, > + DM365_PWM1_G25, > + DM365_PWM2_G87, > + DM365_PWM2_G88, > + DM365_PWM2_G89, > + DM365_PWM2_G90, > + DM365_PWM3_G80, > + DM365_PWM3_G81, > + DM365_PWM3_G85, > + DM365_PWM3_G86, > + > + /* SPI1 */ > + DM365_SPI1_SCLK, > + DM365_SPI1_SDO, > + DM365_SPI1_SDI, > + DM365_SPI1_SDENA0, > + DM365_SPI1_SDENA1, > + > + /* SPI2 */ > + DM365_SPI2
Re: [PATCH] davinci: Fix MMCSD compilation issue
"Rajashekhara, Sudhakar" writes: > Passes channel controller number as the first argument to > edma_alloc_slot() API. Without this patch, kernel compilation > fails with "too few arguments to function 'edma_alloc_slot'" > error. > > This patch has been tested on DM6446 EVM. > > Signed-off-by: Sudhakar Rajashekhara > --- > This patch applies to davinci git on top of the following patch. > > http://linux.omap.com/pipermail/davinci-linux-open-source/2009-June/014236.html Thanks, I reverted the old driver in davinci git, applied your v5 driver and added this patch to davinci git. Will push today. Re: $SUBJECT, this patch applies to drivers/mmc, so the subject should have been more descriptive and have a prefix like [PATCH] MMC: davinci: updates for EDMA API changes I changed this manually before applying. Kevin > > diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c > index 170a0a0..e1095f3 100644 > --- a/drivers/mmc/host/davinci_mmc.c > +++ b/drivers/mmc/host/davinci_mmc.c > @@ -589,7 +589,7 @@ static int __init davinci_acquire_dma_channels(struct > mmc_davinci_host *host) >* channel as needed to handle a scatterlist. >*/ > for (i = 0; i < ARRAY_SIZE(host->links); i++) { > - r = edma_alloc_slot(EDMA_SLOT_ANY); > + r = edma_alloc_slot(EDMA_CTLR(host->txdma), EDMA_SLOT_ANY); > if (r < 0) { > dev_dbg(mmc_dev(host->mmc), "dma PaRAM alloc --> %d\n", > r); > -- > 1.5.6 > > ___ > Davinci-linux-open-source mailing list > Davinci-linux-open-source@linux.davincidsp.com > http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source ___ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
[PATCH] DaVinci: DM365 Updating PINMUX Entries
From: Sandeep Paulraj Patch updates DM365 PINMUX by adding entries for Video, SPI 1 - 4, PWM 0 - 3. Signed-off-by: Sandeep Paulraj --- arch/arm/mach-davinci/dm365.c| 51 ++ arch/arm/mach-davinci/include/mach/mux.h | 58 ++ 2 files changed, 109 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c index ad66e27..0789de0 100644 --- a/arch/arm/mach-davinci/dm365.c +++ b/arch/arm/mach-davinci/dm365.c @@ -533,6 +533,57 @@ MUX_CFG(DM365, EMAC_MDCLK,3, 0, 1,1, false) MUX_CFG(DM365, KEYPAD, 2, 0, 0x3f, 0x3f, false) +MUX_CFG(DM365, PWM0, 1, 0, 3,2, false) +MUX_CFG(DM365, PWM0_G23, 3, 26,3,3, false) +MUX_CFG(DM365, PWM1, 1, 2, 3,2, false) +MUX_CFG(DM365, PWM1_G25, 3, 29,3,2, false) +MUX_CFG(DM365, PWM2_G87, 1, 10,3,2, false) +MUX_CFG(DM365, PWM2_G88, 1, 8, 3,2, false) +MUX_CFG(DM365, PWM2_G89, 1, 6, 3,2, false) +MUX_CFG(DM365, PWM2_G90, 1, 4, 3,2, false) +MUX_CFG(DM365, PWM3_G80, 1, 20,3,3, false) +MUX_CFG(DM365, PWM3_G81, 1, 18,3,3, false) +MUX_CFG(DM365, PWM3_G85, 1, 14,3,2, false) +MUX_CFG(DM365, PWM3_G86, 1, 12,3,2, false) + +MUX_CFG(DM365, SPI1_SCLK, 4, 2, 3,1, false) +MUX_CFG(DM365, SPI1_SDI, 3, 31,1,1, false) +MUX_CFG(DM365, SPI1_SDO, 4, 0, 3,1, false) +MUX_CFG(DM365, SPI1_SDENA0,4, 4, 3,1, false) +MUX_CFG(DM365, SPI1_SDENA1,4, 0, 3,2, false) + +MUX_CFG(DM365, SPI2_SCLK, 4, 10,3,1, false) +MUX_CFG(DM365, SPI2_SDI, 4, 6, 3,1, false) +MUX_CFG(DM365, SPI2_SDO, 4, 8, 3,1, false) +MUX_CFG(DM365, SPI2_SDENA0,4, 12,3,1, false) +MUX_CFG(DM365, SPI2_SDENA1,4, 8, 3,2, false) + +MUX_CFG(DM365, SPI3_SCLK, 0, 0, 3,2, false) +MUX_CFG(DM365, SPI3_SDI, 0, 2, 3,2, false) +MUX_CFG(DM365, SPI3_SDO, 0, 6, 3,2, false) +MUX_CFG(DM365, SPI3_SDENA0,0, 4, 3,2, false) +MUX_CFG(DM365, SPI3_SDENA1,0, 6, 3,3, false) + +MUX_CFG(DM365, SPI4_SCLK, 4, 18,3,1, false) +MUX_CFG(DM365, SPI4_SDI, 4, 14,3,1, false) +MUX_CFG(DM365, SPI4_SDO, 4, 16,3,1, false) +MUX_CFG(DM365, SPI4_SDENA0,4, 20,3,1, false) +MUX_CFG(DM365, SPI4_SDENA1,4, 16,3,2, false) + +MUX_CFG(DM365, GPIO20, 3, 21,3,0, false) +MUX_CFG(DM365, GPIO33, 4, 12,3,0, false) +MUX_CFG(DM365, GPIO40, 4, 26,3,0, false) + +MUX_CFG(DM365, VOUT_FIELD, 1, 18,3,1, false) +MUX_CFG(DM365, VOUT_FIELD_G81, 1, 18,3,0, false) +MUX_CFG(DM365, VOUT_HVSYNC,1, 16,1,0, false) +MUX_CFG(DM365, VOUT_COUTL_EN, 1, 0, 0xff, 0x55, false) +MUX_CFG(DM365, VOUT_COUTH_EN, 1, 8, 0xff, 0x55, false) +MUX_CFG(DM365, VIN_CAM_WEN,0, 14,3,0, false) +MUX_CFG(DM365, VIN_CAM_VD, 0, 13,1,0, false) +MUX_CFG(DM365, VIN_CAM_HD, 0, 12,1,0, false) +MUX_CFG(DM365, VIN_YIN_EN, 0, 0, 0xfff, 0,false) + INT_CFG(DM365, INT_EDMA_CC, 2, 1,1, false) INT_CFG(DM365, INT_EDMA_TC0_ERR,3, 1,1, false) INT_CFG(DM365, INT_EDMA_TC1_ERR,4, 1,1, false) diff --git a/arch/arm/mach-davinci/include/mach/mux.h b/arch/arm/mach-davinci/include/mach/mux.h index ae4f6dd..cce7509 100644 --- a/arch/arm/mach-davinci/include/mach/mux.h +++ b/arch/arm/mach-davinci/include/mach/mux.h @@ -224,6 +224,64 @@ enum davinci_dm365_index { /* Keypad */ DM365_KEYPAD, + /* PWM */ + DM365_PWM0, + DM365_PWM0_G23, + DM365_PWM1, + DM365_PWM1_G25, + DM365_PWM2_G87, + DM365_PWM2_G88, + DM365_PWM2_G89, + DM365_PWM2_G90, + DM365_PWM3_G80, + DM365_PWM3_G81, + DM365_PWM3_G85, + DM365_PWM3_G86, + + /* SPI1 */ + DM365_SPI1_SCLK, + DM365_SPI1_SDO, + DM365_SPI1_SDI, + DM365_SPI1_SDENA0, + DM365_SPI1_SDENA1, + + /* SPI2 */ + DM365_SPI2_SCLK, + DM365_SPI2_SDO, + DM365_SPI2_SDI, + DM365_SPI2_SDENA0, + DM365_SPI2_SDENA1, + + /* SPI3 */ + DM365_SPI3_SCLK, + DM365_SPI3_SDO, + DM365_SPI3_SDI, + DM365_SPI3_SDENA0, + DM365_SPI3_SDENA1, + + /* SPI4 */ + DM365_SPI4_SCLK, + DM365_SPI4_SDO, + DM365_SPI4_SDI, + DM365_SPI4_SDENA0, + DM365_SPI4_SDENA1, + + /* GPIO */ + DM365_GPIO20, + DM365_GPIO33, + DM365_GPIO40,
RE: Keyboard Initialization
> On Wed, Jun 24, 2009 at 14:56:32, Young, Joseph wrote: > > > On Mon, Jun 22, 2009 at 13:16:55, Young, Joseph wrote: > > > > >> I am porting the Davinci Linux kernel to a new and similar TI > > > > >> device, called Jacinto2. I am at the point where the init > > > > >> program passed to the kernel by the bootloader is initialized. > > > > >> The problem that I am experiencing is that, whichever init > > > > >> program I pass, it can display text, but it cannot receive > > > > >> characters from the keyboard. > > > > >> > > > > >> I know the serial interface is ok, because I inserted > > > > >> prinktk's and it both issues a serial interrupt when I press > > > > >> any key, as well as retrieves the correct character from the UART > > > > >> buffer. > > > > >> However, the characters I type do not show up in the shell, and it > > > > >> doesn't seem to react to keyboard signals. > > > > >> > > > > >> When one passes /bin/sh as the init program, it will display the '# > > > > >> /' > > > > >> of the shell prompt, but the keyboard has no effect. When I > > > > >> wrote a simple 'hello world' program to print text, receive > > > > >> text from the user, and then print another line, it will print but > > > > >> not receive the keystrokes. > > > > >> > > > > >> Passing /bin/ls (which redirects to busybox) will display my > > > > >> file system as I expect, so I don't think that my busybox is broken. > > > > >> > > > > >> Is anyone familiar with how this is initialized when the kernel is > > > > >> booting? > > > > >> Does anyone have a clue what I could be missing so that the > > > > >> serial interface would record keystrokes but not pass it to the tty > > > > >> interface or shell? > > > > > > > > > > Not sure about the details of Jacinto2, but on the other SoCs > > > > > in the family, the UART TX and RX signals are > commonly mux'd with > > > > > other pins. > > > > > > > > This is correct, the UART0 TX,RX, RTS, and CTS are muxed with some GPIO > > > > pins. > > > > > > > > > Have you confirmed that all the UART signals are mux'd correctly? > > > > > > > > Yes, because the characters I type are appearing in the serial > > > > buffer on the device (I am printing out the characters received > > > > with printk's) but they are not having an impact on the console. > > > > > > > > > > I would like to guess there is something wrong with your kernel > > > configuration. Can you start from davinci_all_defconfig and then > > > modify only the parts absolutely required (like enabling > > > ARCH_DAVINCI_JACINTO2 (??)). > > > > Hmm. I tried this, using only the ARCH_JACINTO2 options, and it > > performed the same way. I think it's a problem with the tty layer > > passing the data to the shell. I don't think it's the serial layer > > because when I press a key, the serial interrupt kicks in, and if I > > add a printk to the uart_insert_char function in > > /include/linux/serial_core.h, I can print out the serial buffer, and it has > > the characters I type. I think somewhere the tty_driver or tty_buffer isn't > > getting initialized properly. > > > > How does the tty layer pass characters to user-space processes? > > > > > Also, within TI we are using filesystem from Arago project for testing > > > http://arago-project.org/files/releases/. > > > > Thanks! As soon as I can boot my RAMDISK fs, I'll start testing with > > Arago :) > > I meant to ask you to use the pre-built ramdisk image available from Arago to > eliminate any issues with the filesystem you > may be using. > Well, I tried the Arago FS, and it still doesn't receive keyboard input. However, it provided me with additional input: RAMDISK: gzip image found at block 0 EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended VFS: Mounted root (ext2 filesystem) on device 1:0. Freeing init memory: 148K uart_open(0) called ttyS0 - using backup timer *** run_init_process(/bin/sh) /bin/sh: can't access tty; job control turned off / # --- It says it can't access the tty. Is this normal when booting with a serial console through ttyS0? Thanks for your time, Joe___ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
RE: When The VINT0 and VINT1 occurs on DM355?
Paven, Which release code are you referring to? The ccdc_config_raw() function has these undesirable code that was removed in LSP210. You could remove them as well. The VINT0 and VINT1 are set as desire in ccdc_setwin(). They are software programmable interrupt lines. Murali Karicheri Software Design Engineer Texas Instruments Inc. Germantown, MD 20874 Phone : 301-515-3736 email: m-kariche...@ti.com From: davinci-linux-open-source-boun...@linux.davincidsp.com [mailto:davinci-linux-open-source-boun...@linux.davincidsp.com] On Behalf Of Pavel Han Sent: Tuesday, June 23, 2009 9:57 PM To: davinci-linux-open-source@linux.davincidsp.com Subject: When The VINT0 and VINT1 occurs on DM355? Hello EveryBody! Now I encountered a very strange problem on DM355 EVM.I use DM355 to capture 2592x1944 resolution picture from the MT9P031 Sensor,but sometimes I can only get a disrupt image,and In the capture thread,I find the DQBUF time only need 1ms in the most time(If I do not use IPIPE and only do the DQBUF/QBUF pairs,the DQBUF time will be 102ms,I think this time is correct).In addtion, from the ccdc_dm355 driver, I get the following code: val = params->win.height / 64; mdelay(5); regw(val, VDINT0); mdelay(5); regw(0, VDINT1); It is very stange!I think the VDINT0 interrupt should be configured to occured on the completion time to make the current video-buffer to be STATE_DONE,and the VDINT1 interrupt should be configured to occured on the current frame time to make the next frame to be STATE_ACTIVE.But the register setup is not the case,so I want to konw what is the real means of the VDINT register configure code section. Thank you Very much! ___ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
RE: [PATCH] DaVinci: MMC: V5: MMC/SD controller driver for DaVinci family.
> -Original Message- > From: taco [mailto:tac...@gmail.com] > Sent: Tuesday, June 23, 2009 8:42 PM > To: Vipin > Cc: linux-ker...@vger.kernel.org; davinci-linux-open- > sou...@linux.davincidsp.com; drzeus-...@drzeus.cx > Subject: Re: [PATCH] DaVinci: MMC: V5: MMC/SD controller driver for > DaVinci family. > > Vipin wrote: > > The description of this patch needs to be updated. I'll repost the > patch > > soon. > > > > Thanks and regards, > > ~Vipin > > > > > > > >> -Original Message- > >> From: Vipin Bhandari [mailto:vipin.bhand...@ti.com] > >> Sent: Tuesday, June 23, 2009 2:25 PM > >> To: linux-ker...@vger.kernel.org > >> Cc: davinci-linux-open-source@linux.davincidsp.com; drzeus- > >> m...@drzeus.cx; Vipin Bhandari; Purshotam Kumar > >> Subject: [PATCH] DaVinci: MMC: V5: MMC/SD controller driver for > DaVinci > >> family. > > > hi, Vipin > Whether it supports SDHC card on DM355 EVM? I am using the dvsdk based > on linux-2.6.10 , I found out SDHC cards can't work. I don't know how > to > solve this problem. > please give me some tips will welcome. > best regards. It supports SDHC card on DM355 EVM. I do not think that linux-2.6.10 have SDHC support from the mmc core. Please confirm this and if the support is not there then you may need to pull-in those changes. Thanks and regards, ~Vipin ___ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
[PATCH] davinci: Fix MMCSD compilation issue
Passes channel controller number as the first argument to edma_alloc_slot() API. Without this patch, kernel compilation fails with "too few arguments to function 'edma_alloc_slot'" error. This patch has been tested on DM6446 EVM. Signed-off-by: Sudhakar Rajashekhara --- This patch applies to davinci git on top of the following patch. http://linux.omap.com/pipermail/davinci-linux-open-source/2009-June/014236.html drivers/mmc/host/davinci_mmc.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c index 170a0a0..e1095f3 100644 --- a/drivers/mmc/host/davinci_mmc.c +++ b/drivers/mmc/host/davinci_mmc.c @@ -589,7 +589,7 @@ static int __init davinci_acquire_dma_channels(struct mmc_davinci_host *host) * channel as needed to handle a scatterlist. */ for (i = 0; i < ARRAY_SIZE(host->links); i++) { - r = edma_alloc_slot(EDMA_SLOT_ANY); + r = edma_alloc_slot(EDMA_CTLR(host->txdma), EDMA_SLOT_ANY); if (r < 0) { dev_dbg(mmc_dev(host->mmc), "dma PaRAM alloc --> %d\n", r); -- 1.5.6 ___ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
[PATCH v3] Frame Buffer driver for TI DA8xx/OMAP-L1xx
Adds LCD controller (LCDC) driver for TI's DA8xx/OMAP-L1xx architecture. LCDC specifications can be found at http://www.ti.com/litv/pdf/sprufm0a. LCDC on DA8xx consists of two independent controllers, the Raster Controller and the LCD Interface Display Driver (LIDD) controller. LIDD further supports character and graphic displays. This patch adds support for the graphic display (Sharp LQ035Q3DG01) found on the DA830 based EVM. The EVM details can be found at: http://support.spectrumdigital.com/boards/dskda830/revc/. Signed-off-by: Sudhakar Rajashekhara Signed-off-by: Pavel Kiryukhin Signed-off-by: Steve Chen --- Since the previous version, error paths in probing function has been corected, removed set_par() function and added code in fb_setcolreg() function for TRUECOLOR mode. drivers/video/Kconfig| 11 + drivers/video/Makefile |1 + drivers/video/da8xx-fb.c | 887 ++ include/video/da8xx-fb.h | 106 ++ 4 files changed, 1005 insertions(+), 0 deletions(-) create mode 100644 drivers/video/da8xx-fb.c create mode 100644 include/video/da8xx-fb.h diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 693fb4e..fc0c191 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -1984,6 +1984,17 @@ config FB_DAVINCI hardware found on the TI DaVinci EVM. If unsure, say N. +config FB_DA8XX +tristate "DA8xx/OMAP-L1xx Framebuffer support" +depends on FB && ARCH_DAVINCI_DA830 + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + ---help--- + This is the frame buffer device driver for the TI LCD controller + found on DA8xx/OMAP-L1xx SoCs. + If unsure, say N. + config FB_VIRTUAL tristate "Virtual Frame Buffer support (ONLY FOR TESTING!)" depends on FB diff --git a/drivers/video/Makefile b/drivers/video/Makefile index 902d199..e7a3e7d 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -136,6 +136,7 @@ obj-$(CONFIG_FB_BF54X_LQ043) += bf54x-lq043fb.o obj-$(CONFIG_FB_BFIN_T350MCQB) += bfin-t350mcqb-fb.o obj-$(CONFIG_FB_MX3) += mx3fb.o obj-$(CONFIG_FB_DAVINCI) += davincifb.o +obj-$(CONFIG_FB_DA8XX) += da8xx-fb.o # the test framebuffer is last obj-$(CONFIG_FB_VIRTUAL) += vfb.o diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c new file mode 100644 index 000..a41ae62 --- /dev/null +++ b/drivers/video/da8xx-fb.c @@ -0,0 +1,887 @@ +/* + * Copyright (C) 2008-2009 MontaVista Software Inc. + * Copyright (C) 2008-2009 Texas Instruments Inc + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option)any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define DRIVER_NAME "da8xx_lcdc" + +/* LCD Status Register */ +#define LCD_END_OF_FRAME0 BIT(8) +#define LCD_FIFO_UNDERFLOW BIT(5) +#define LCD_SYNC_LOST BIT(2) + +/* LCD DMA Control Register */ +#define LCD_DMA_BURST_SIZE(x) ((x) << 4) +#define LCD_DMA_BURST_10x0 +#define LCD_DMA_BURST_20x1 +#define LCD_DMA_BURST_40x2 +#define LCD_DMA_BURST_80x3 +#define LCD_DMA_BURST_16 0x4 +#define LCD_END_OF_FRAME_INT_ENA BIT(2) +#define LCD_DUAL_FRAME_BUFFER_ENABLE BIT(0) + +/* LCD Control Register */ +#define LCD_CLK_DIVISOR(x) ((x) << 8) +#define LCD_RASTER_MODE0x01 + +/* LCD Raster Control Register */ +#define LCD_PALETTE_LOAD_MODE(x) ((x) << 20) +#define PALETTE_AND_DATA 0x00 +#define PALETTE_ONLY 0x01 + +#define LCD_MONO_8BIT_MODE BIT(9) +#define LCD_RASTER_ORDER BIT(8) +#define LCD_TFT_MODE BIT(7) +#define LCD_UNDERFLOW_INT_ENA BIT(6) +#define LCD_MONOCHROME_MODEBIT(1) +#define LCD_RASTER_ENABLE BIT(0) +#define LCD_TFT_ALT_ENABLE BIT(23) +#define LCD_STN_565_ENABLE BIT(24) + +/* LCD Raster Timing 2 Register */ +#define LCD_AC_BIAS_TRANSITIONS_PER_INT(x) ((x) << 16) +#define LCD_AC_BIAS_FREQUENCY(x) ((x)
Re: Using buildinstructions "fatal error #5: could not open source file "ti/xdais/dm/ividdec.h"
Thanks. seems working. This seems buggy as I dont have cetools folder. so it shud take it as zero. Many Thanks, Sandeep.Yedire From: "JayaKumar, PremKumar" To: Sandeep YEDIRE ; "davinci-linux-open-source@linux.davincidsp.com" Cc: "bmi...@acmet.com" ; Sandeep Yedire Sent: Wednesday, 24 June, 2009 3:42:42 PM Subject: RE: Using buildinstructions "fatal error #5: could not open source file "ti/xdais/dm/ividdec.h" From the error message you can see that the xdais path is tried to be picked from the cetools. Try setting USE_CETOOLS_IF_EXISTS = 0 in the xdcpaths.mak so that the path which you want to be set as xdais path in the XDCPATH will take effect. Regards, Prem From:davinci-linux-open-source-boun...@linux.davincidsp.com [mailto:davinci-linux-open-source-boun...@linux.davincidsp.com] On Behalf Of Sandeep YEDIRE Sent: Wednesday, June 24, 2009 3:17 PM To: davinci-linux-open-source@linux.davincidsp.com Cc: bmi...@acmet.com; Sandeep Yedire Subject: Using buildinstructions "fatal error #5: could not open source file "ti/xdais/dm/ividdec.h" Hello there, i have been working on DM6446 for about a week now but not able to set-up properly. I followed instructions given in sprue66d.pdf for installation on my RHEL -4 pc. I did this twice as I got strange error message when working with one of examples. Which I already posted with subject :"xdc.loadPackage: can't find package 'ti.sdo.ce' when building viddec_copy examples" date:22/06/09. I could not find casue for this error and try to set-up everything again. When I finished with setting up everything, With refering to build instruction in codec_engine/examples/, I mdofied changes in xdcpath.mak and user.bld file accordingly. I have copied both the files below. When I did gmake in dir "~/work/examples/ti/sdo/ce/examples/codecs/viddec_copy/", I get this error message which is given below. I found these header files, in dir /home/sandeep/dvsdk_1_30_01_41/xdais_6_00_01/packages/ti/xdais/dm/ But these are not included when I build them. I also set my env variable for XDCPATH accordingly. Please find my XDCPATH below with heading. It looks like, I have not included the correct XDCPATH which actually is the problem for my earlier failure. Please look for below files for any help in this issue. I can copy the contents of /home/sandeep/dvsdk_1_30_01_41/xdais_6_00_01/packages/ti/ to ~/work/examples/ti/ for this error. But When I have given path in xdcpath.mak file, and the makefile in viddec_copy folder will refer to this xdcpath.mak for its packages. Please look for below files for any help/advice in this issue I am having. --- Error message: [sand...@evmdm6446 viddec_copy]$ gmake /home/sandeep/dvsdk_1_30_01_41/xdc_3_00_02/xdc XDCPATH="/home/sandeep/work/examples/ti/sdo/ce/examples/codecs/viddec_copy/../../../../../..;/home/sandeep/dvsdk_1_30_01_41/codec_engine_2_00_01/packages;/home/sandeep/dvsdk_1_30_01_41/codec_engine_2_00_01/cetools/packages;/home/sandeep/dvsdk_1_30_01_41/bios_5_31_08/packages" \ XDCOPTIONS=v all -PD . making all: Wed Jun 24 14:31:14 IST 2009 ... .interfaces [/home/sandeep/work/examples/ti/sdo/ce/examples/codecs/viddec_copy] gmake[1]: `.interfaces' is up to date. .interfaces files complete: Wed Jun 24 14:31:14 IST 2009. .libraries [/home/sandeep/work/examples/ti/sdo/ce/examples/codecs/viddec_copy] rm -f package/lib/lib/viddec_copy/viddec_copy.o64P # # cl64P viddec_copy.c ... /home/sandeep/dvsdk_1_30_01_41/cg6x_6_0_15/bin/cl6x -c -oe -qq -pdsw225 -pden -pds=195 -mv64p -eo.o64P -ea.s64P -Dxdc_target_name__=C64P -Dxdc_target_types__=ti/targets/std..h -Dxdc_bld__profile_release -Dxdc_bld__vers_1_0_6_0_15 -o2 -I.. -I/home/sandeep/work/examples/ti/sdo/ce/examples/codecs/viddec_copy/../../../../.../.. -I/home/sandeep/dvsdk_1_30_01_41/codec_engine_2_00_01/packages -I/home/sandeep/dvsdk_1_30_01_41/codec_engine_2_00_01/cetools/packages -I/home/sandeep/dvsdk_1_30_01_41/bios_5_31_08/packages -I/home/sandeep/dvsdk_1_30_01_41/xdc_3_00_02/packages -I../../../../../.. -I/home/sandeep/dvsdk_1_30_01_41/cg6x_6_0_15/include -fs=./package/lib/lib/viddec_copy -fr=./package/lib/lib/viddec_copy -fc viddec_copy.c "viddec_copy.c", line 20: fatal error #5: could not open source file "ti/xdais/dm/ividdec.h" 1 fatal error detected in the compilation of "viddec_copy.c". Compilation terminated. >> Compilation failure gmake[1]: *** [package/lib/lib/viddec_copy/viddec_copy.o64P] Error 1 gmake: *** [/home/sandeep/work/examples/ti/sdo/ce/examples/codecs/viddec_copy,.libraries] Error 2 gmake: *** [all] Error 2 [sand...@evmdm6446 viddec_copy]$ <>pr
RE: Using buildinstructions "fatal error #5: could not open source file "ti/xdais/dm/ividdec.h"
>From the error message you can see that the xdais path is tried to be picked >from the cetools. Try setting USE_CETOOLS_IF_EXISTS = 0 in the xdcpaths.mak so >that the path which you want to be set as xdais path in the XDCPATH will take >effect. Regards, Prem From: davinci-linux-open-source-boun...@linux.davincidsp.com [mailto:davinci-linux-open-source-boun...@linux.davincidsp.com] On Behalf Of Sandeep YEDIRE Sent: Wednesday, June 24, 2009 3:17 PM To: davinci-linux-open-source@linux.davincidsp.com Cc: bmi...@acmet.com; Sandeep Yedire Subject: Using buildinstructions "fatal error #5: could not open source file "ti/xdais/dm/ividdec.h" Hello there, i have been working on DM6446 for about a week now but not able to set-up properly. I followed instructions given in sprue66d.pdf for installation on my RHEL -4 pc. I did this twice as I got strange error message when working with one of examples. Which I already posted with subject :"xdc.loadPackage: can't find package 'ti.sdo.ce' when building viddec_copy examples" date:22/06/09. I could not find casue for this error and try to set-up everything again. When I finished with setting up everything, With refering to build instruction in codec_engine/examples/, I mdofied changes in xdcpath.mak and user.bld file accordingly. I have copied both the files below. When I did gmake in dir "~/work/examples/ti/sdo/ce/examples/codecs/viddec_copy/", I get this error message which is given below. I found these header files, in dir /home/sandeep/dvsdk_1_30_01_41/xdais_6_00_01/packages/ti/xdais/dm/ But these are not included when I build them. I also set my env variable for XDCPATH accordingly. Please find my XDCPATH below with heading. It looks like, I have not included the correct XDCPATH which actually is the problem for my earlier failure. Please look for below files for any help in this issue. I can copy the contents of /home/sandeep/dvsdk_1_30_01_41/xdais_6_00_01/packages/ti/ to ~/work/examples/ti/ for this error. But When I have given path in xdcpath.mak file, and the makefile in viddec_copy folder will refer to this xdcpath.mak for its packages. Please look for below files for any help/advice in this issue I am having. --- Error message: [sand...@evmdm6446 viddec_copy]$ gmake /home/sandeep/dvsdk_1_30_01_41/xdc_3_00_02/xdc XDCPATH="/home/sandeep/work/examples/ti/sdo/ce/examples/codecs/viddec_copy/../../../../../..;/home/sandeep/dvsdk_1_30_01_41/codec_engine_2_00_01/packages;/home/sandeep/dvsdk_1_30_01_41/codec_engine_2_00_01/cetools/packages;/home/sandeep/dvsdk_1_30_01_41/bios_5_31_08/packages" \ XDCOPTIONS=v all -PD . making all: Wed Jun 24 14:31:14 IST 2009 ... .interfaces [/home/sandeep/work/examples/ti/sdo/ce/examples/codecs/viddec_copy] gmake[1]: `.interfaces' is up to date. .interfaces files complete: Wed Jun 24 14:31:14 IST 2009. .libraries [/home/sandeep/work/examples/ti/sdo/ce/examples/codecs/viddec_copy] rm -f package/lib/lib/viddec_copy/viddec_copy.o64P # # cl64P viddec_copy.c ... /home/sandeep/dvsdk_1_30_01_41/cg6x_6_0_15/bin/cl6x -c -oe -qq -pdsw225 -pden -pds=195 -mv64p -eo.o64P -ea.s64P -Dxdc_target_name__=C64P -Dxdc_target_types__=ti/targets/std.h -Dxdc_bld__profile_release -Dxdc_bld__vers_1_0_6_0_15 -o2 -I.. -I/home/sandeep/work/examples/ti/sdo/ce/examples/codecs/viddec_copy/../../../../../.. -I/home/sandeep/dvsdk_1_30_01_41/codec_engine_2_00_01/packages -I/home/sandeep/dvsdk_1_30_01_41/codec_engine_2_00_01/cetools/packages -I/home/sandeep/dvsdk_1_30_01_41/bios_5_31_08/packages -I/home/sandeep/dvsdk_1_30_01_41/xdc_3_00_02/packages -I../../../../../.. -I/home/sandeep/dvsdk_1_30_01_41/cg6x_6_0_15/include -fs=./package/lib/lib/viddec_copy -fr=./package/lib/lib/viddec_copy -fc viddec_copy.c "viddec_copy.c", line 20: fatal error #5: could not open source file "ti/xdais/dm/ividdec.h" 1 fatal error detected in the compilation of "viddec_copy.c". Compilation terminated. >> Compilation failure gmake[1]: *** [package/lib/lib/viddec_copy/viddec_copy.o64P] Error 1 gmake: *** [/home/sandeep/work/examples/ti/sdo/ce/examples/codecs/viddec_copy,.libraries] Error 2 gmake: *** [all] Error 2 [sand...@evmdm6446 viddec_copy]$ <>printenv XDCPATH /home/sandeep/work/examples/ti/sdo/ce/examples/codecs/viddec_copy;/home/sandeep/dvsdk_1_30_01_41/xdais_6_00_01/packages;/home/sandeep/dvsdk_1_30_01_41/framework_components_2_00_01/packages;/home/sandeep/dvsdk_1_30_01_41/cg6x_6_0_15;/home/sandeep/dvsdk_1_30_01_41/biosutils_1_00_02/packages;/home/sandeep/dvsdk_1_30_01_41/bios_5_31_08/packages;/home/sandeep/dvsdk_1_30_01_41/xdc_3_00_02/packages;/home/sandeep/dvsdk_1_30_01_41/codec_engine_2_00_01/packag
RE: Keyboard Initialization
On Wed, Jun 24, 2009 at 14:56:32, Young, Joseph wrote: > > On Mon, Jun 22, 2009 at 13:16:55, Young, Joseph wrote: > > > >> I am porting the Davinci Linux kernel to a new and similar TI > > > >> device, called Jacinto2. I am at the point where the init program > > > >> passed to the kernel by the bootloader is initialized. The problem > > > >> that I am experiencing is that, whichever init program I pass, it > > > >> can display text, but it cannot receive characters from the keyboard. > > > >> > > > >> I know the serial interface is ok, because I inserted prinktk's and > > > >> it both issues a serial interrupt when I press any key, as well as > > > >> retrieves the correct character from the UART buffer. However, the > > > >> characters I type do not show up in the shell, and it doesn't seem to > > > >> react to keyboard signals. > > > >> > > > >> When one passes /bin/sh as the init program, it will display the '# /' > > > >> of the shell prompt, but the keyboard has no effect. When I wrote a > > > >> simple 'hello world' program to print text, receive text from the > > > >> user, and then print another line, it will print but not receive the > > > >> keystrokes. > > > >> > > > >> Passing /bin/ls (which redirects to busybox) will display my file > > > >> system as I expect, so I don't think that my busybox is broken. > > > >> > > > >> Is anyone familiar with how this is initialized when the kernel is > > > >> booting? > > > >> Does anyone have a clue what I could be missing so that the serial > > > >> interface would record keystrokes but not pass it to the tty interface > > > >> or shell? > > > > > > > > Not sure about the details of Jacinto2, but on the other SoCs in the > > > > family, the UART TX and RX signals are > commonly mux'd with other pins. > > > > > > This is correct, the UART0 TX,RX, RTS, and CTS are muxed with some GPIO > > > pins. > > > > > > > Have you confirmed that all the UART signals are mux'd correctly? > > > > > > Yes, because the characters I type are appearing in the serial buffer on > > > the device (I am printing out the > > > characters received with printk's) but they are not having an impact on > > > the console. > > > > > > > I would like to guess there is something wrong with your kernel > > configuration. Can you start from > > davinci_all_defconfig and then modify only the parts absolutely required > > (like enabling > > ARCH_DAVINCI_JACINTO2 (??)). > > Hmm. I tried this, using only the ARCH_JACINTO2 options, and it performed the > same way. I think it's a problem with the tty layer passing the data to the > shell. I don't think it's the serial layer because when I press a key, the > serial interrupt kicks in, and if I add a printk to the uart_insert_char > function in /include/linux/serial_core.h, I can print out the serial buffer, > and it has the characters I type. I think somewhere the tty_driver or > tty_buffer isn't getting initialized properly. > > How does the tty layer pass characters to user-space processes? > > > Also, within TI we are using filesystem from Arago project for testing > > http://arago-project.org/files/releases/. > > Thanks! As soon as I can boot my RAMDISK fs, I'll start testing with Arago :) I meant to ask you to use the pre-built ramdisk image available from Arago to eliminate any issues with the filesystem you may be using. Thanks, Sekhar ___ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
Using buildinstructions "fatal error #5: could not open source file "ti/xdais/dm/ividdec.h"
Hello there, i have been working on DM6446 for about a week now but not able to set-up properly. I followed instructions given in sprue66d.pdf for installation on my RHEL -4 pc. I did this twice as I got strange error message when working with one of examples. Which I already posted with subject :"xdc.loadPackage: can't find package 'ti.sdo.ce' when building viddec_copy examples" date:22/06/09. I could not find casue for this error and try to set-up everything again. When I finished with setting up everything, With refering to build instruction in codec_engine/examples/, I mdofied changes in xdcpath.mak and user.bld file accordingly. I have copied both the files below. When I did gmake in dir "~/work/examples/ti/sdo/ce/examples/codecs/viddec_copy/", I get this error message which is given below. I found these header files, in dir /home/sandeep/dvsdk_1_30_01_41/xdais_6_00_01/packages/ti/xdais/dm/ But these are not included when I build them. I also set my env variable for XDCPATH accordingly. Please find my XDCPATH below with heading. It looks like, I have not included the correct XDCPATH which actually is the problem for my earlier failure. Please look for below files for any help in this issue. I can copy the contents of /home/sandeep/dvsdk_1_30_01_41/xdais_6_00_01/packages/ti/ to ~/work/examples/ti/ for this error. But When I have given path in xdcpath.mak file, and the makefile in viddec_copy folder will refer to this xdcpath.mak for its packages. Please look for below files for any help/advice in this issue I am having. --- Error message: [sand...@evmdm6446 viddec_copy]$ gmake /home/sandeep/dvsdk_1_30_01_41/xdc_3_00_02/xdc XDCPATH="/home/sandeep/work/examples/ti/sdo/ce/examples/codecs/viddec_copy/../../../../../..;/home/sandeep/dvsdk_1_30_01_41/codec_engine_2_00_01/packages;/home/sandeep/dvsdk_1_30_01_41/codec_engine_2_00_01/cetools/packages;/home/sandeep/dvsdk_1_30_01_41/bios_5_31_08/packages" \ XDCOPTIONS=v all -PD . making all: Wed Jun 24 14:31:14 IST 2009 ... .interfaces [/home/sandeep/work/examples/ti/sdo/ce/examples/codecs/viddec_copy] gmake[1]: `.interfaces' is up to date. .interfaces files complete: Wed Jun 24 14:31:14 IST 2009. .libraries [/home/sandeep/work/examples/ti/sdo/ce/examples/codecs/viddec_copy] rm -f package/lib/lib/viddec_copy/viddec_copy.o64P # # cl64P viddec_copy.c ... /home/sandeep/dvsdk_1_30_01_41/cg6x_6_0_15/bin/cl6x -c -oe -qq -pdsw225 -pden -pds=195 -mv64p -eo.o64P -ea.s64P -Dxdc_target_name__=C64P -Dxdc_target_types__=ti/targets/std.h -Dxdc_bld__profile_release -Dxdc_bld__vers_1_0_6_0_15 -o2 -I. -I/home/sandeep/work/examples/ti/sdo/ce/examples/codecs/viddec_copy/../../../../../.. -I/home/sandeep/dvsdk_1_30_01_41/codec_engine_2_00_01/packages -I/home/sandeep/dvsdk_1_30_01_41/codec_engine_2_00_01/cetools/packages -I/home/sandeep/dvsdk_1_30_01_41/bios_5_31_08/packages -I/home/sandeep/dvsdk_1_30_01_41/xdc_3_00_02/packages -I../../../../../.. -I/home/sandeep/dvsdk_1_30_01_41/cg6x_6_0_15/include -fs=./package/lib/lib/viddec_copy -fr=./package/lib/lib/viddec_copy -fc viddec_copy.c "viddec_copy.c", line 20: fatal error #5: could not open source file "ti/xdais/dm/ividdec.h" 1 fatal error detected in the compilation of "viddec_copy.c". Compilation terminated. >> Compilation failure gmake[1]: *** [package/lib/lib/viddec_copy/viddec_copy.o64P] Error 1 gmake: *** [/home/sandeep/work/examples/ti/sdo/ce/examples/codecs/viddec_copy,.libraries] Error 2 gmake: *** [all] Error 2 [sand...@evmdm6446 viddec_copy]$ <>printenv XDCPATH /home/sandeep/work/examples/ti/sdo/ce/examples/codecs/viddec_copy;/home/sandeep/dvsdk_1_30_01_41/xdais_6_00_01/packages;/home/sandeep/dvsdk_1_30_01_41/framework_components_2_00_01/packages;/home/sandeep/dvsdk_1_30_01_41/cg6x_6_0_15;/home/sandeep/dvsdk_1_30_01_41/biosutils_1_00_02/packages;/home/sandeep/dvsdk_1_30_01_41/bios_5_31_08/packages;/home/sandeep/dvsdk_1_30_01_41/xdc_3_00_02/packages;/home/sandeep/dvsdk_1_30_01_41/codec_engine_2_00_01/packages;/home/sandeep/dvsdk_1_30_01_41/dm6446_dvsdk_combos_1_35/packages;/home/sandeep/dvsdk_1_30_01_41/cmem_2_00_01/packages;/home/sandeep/dvsdk_1_30_01_41/dsplink_140-05p1/packages; File:user.bld /* * user.bld * * User note: YOU MUST MODIFY THIS FILE TO SPECIFY THE COMPILER TOOL PATHS. */ // This table list the targets for which to build libraries and programs, and for // each target it lists where the compiler tools are and for what platforms // the programs should be built. For all build variants where you sp
RE: Keyboard Initialization
> On Mon, Jun 22, 2009 at 13:16:55, Young, Joseph wrote: > > >> I am porting the Davinci Linux kernel to a new and similar TI > > >> device, called Jacinto2. I am at the point where the init program > > >> passed to the kernel by the bootloader is initialized. The problem > > >> that I am experiencing is that, whichever init program I pass, it > > >> can display text, but it cannot receive characters from the keyboard. > > >> > > >> I know the serial interface is ok, because I inserted prinktk's and > > >> it both issues a serial interrupt when I press any key, as well as > > >> retrieves the correct character from the UART buffer. However, the > > >> characters I type do not show up in the shell, and it doesn't seem to > > >> react to keyboard signals. > > >> > > >> When one passes /bin/sh as the init program, it will display the '# /' > > >> of the shell prompt, but the keyboard has no effect. When I wrote a > > >> simple 'hello world' program to print text, receive text from the > > >> user, and then print another line, it will print but not receive the > > >> keystrokes. > > >> > > >> Passing /bin/ls (which redirects to busybox) will display my file > > >> system as I expect, so I don't think that my busybox is broken. > > >> > > >> Is anyone familiar with how this is initialized when the kernel is > > >> booting? > > >> Does anyone have a clue what I could be missing so that the serial > > >> interface would record keystrokes but not pass it to the tty interface > > >> or shell? > > > > > > Not sure about the details of Jacinto2, but on the other SoCs in the > > > family, the UART TX and RX signals are > commonly mux'd with other pins. > > > > This is correct, the UART0 TX,RX, RTS, and CTS are muxed with some GPIO > > pins. > > > > > Have you confirmed that all the UART signals are mux'd correctly? > > > > Yes, because the characters I type are appearing in the serial buffer on > > the device (I am printing out the > > characters received with printk's) but they are not having an impact on the > > console. > > > > I would like to guess there is something wrong with your kernel > configuration. Can you start from > davinci_all_defconfig and then modify only the parts absolutely required > (like enabling > ARCH_DAVINCI_JACINTO2 (??)). Hmm. I tried this, using only the ARCH_JACINTO2 options, and it performed the same way. I think it's a problem with the tty layer passing the data to the shell. I don't think it's the serial layer because when I press a key, the serial interrupt kicks in, and if I add a printk to the uart_insert_char function in /include/linux/serial_core.h, I can print out the serial buffer, and it has the characters I type. I think somewhere the tty_driver or tty_buffer isn't getting initialized properly. How does the tty layer pass characters to user-space processes? > Also, within TI we are using filesystem from Arago project for testing > http://arago-project.org/files/releases/. Thanks! As soon as I can boot my RAMDISK fs, I'll start testing with Arago :) Regards, Joe ___ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
DM355 to DM365 migration
Hi, I have some software developped within the dvsdk 2.00.OO.18 for the DM355. This software is still in development phase and the dm365 would be a good candidate for the final product, so I am considering migrating to the DM365 and I would like to know what is the best option : - Staying with the MV5.0 based DVSDK kernel : - Migrating to davinci-git kernel, with two sub-options: * First getting a working u-boot + kernel + userland and then porting my sofwtare * First porting my software and then moving the whole thing to davinci-git So here are some questions : Is there a plan for a davinci-git or even mainline based dvsdk ? Will the resizer and previewer driver interface be similar to what they are in the 2.6.18 based kernel ? I did not develop this part yet, and I don't want to start working with it if I have to start from scratch when changing the kernel. What is the status of previewer, resizer and lens correction driver in davinci-git ? If I want to use the davinci-git nand driver, should I also switch to latest u-boot or can I stick with the one provided in the LSP ? Thank you in advance, Jean-Philippe François ___ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source