RE: [PATCH] davinci: MMC: add cpufreq support

2009-10-21 Thread Chaithrika U S
On Wed, Oct 21, 2009 at 03:44:51, Linus Walleij wrote:
 2009/10/20 Chaithrika U S chaithr...@ti.com:
 
  Add cpufreq support to MMC driver. The clock divider value has to be
  modified according to the controller input frequency.
  (...)
  @@ -1040,6 +1052,52 @@ static struct mmc_host_ops mmc_davinci_ops = {
 
   /*--*/
 
  +#ifdef CONFIG_CPU_FREQ
  +static int mmc_davinci_cpufreq_transition(struct notifier_block *nb,
  +                                    unsigned long val, void *data)
  +{
  +       struct mmc_davinci_host *host;
  +       unsigned int mmc_pclk;
  +       struct mmc_host *mmc;
  +       unsigned long flags;
  +
  +       host = container_of(nb, struct mmc_davinci_host, freq_transition);
  +       mmc = host-mmc;
  +       mmc_pclk = clk_get_rate(host-clk);
  +
  +       if (val == CPUFREQ_POSTCHANGE) {
  +               spin_lock_irqsave(mmc-lock, flags);
  +               host-mmc_input_clk = mmc_pclk;
  +               calculate_clk_divider(mmc, mmc-ios);
  +               spin_unlock_irqrestore(mmc-lock, flags);
  +       }
  +
  +       return 0;
  +}
 
 Now the way I understand it CPUfreq is about rising/lowering the
 frequency of the *CPU* when the load of the system goes up/down.
 
 I highly suspect that there is no general rule that davinci's host-clk
 will actually change just because the CPU changes frequency?
 

In this case, the PLL controller which supplies clock to the CPU also 
provides clock to the MMC/SD peripheral. Hence, the host-clk changes
with the CPU frequency changes.

 I don't know enough about davinci to tell but I suspect there are
 system-wide operating points hidden behind this and CPUfreq
 is being (ab)used for changing and notifying the system frequency
 overall. Some of these transitions include changing the MMC clock
 so if you simply broadcast them all?
 
 I really believe this is just masking the problem that the clk
 framework need support of real clk notifiers that can notify clk
 users pre/post a clk change. This is really what you want for a
 driver like this.
 
 Now I don't know the davinci consensus around these things,
 do you always use CPUfreq like this, for changing frequencies
 of clocks that are not CPU clocks at all?
 

In the case where the module clock is dependent on CPU clock, cpufreq 
is used to adjust the peripheral clock based on the CPU clock. Similar
implementation is present in Samsung S3C MCI driver too.

 I have similar code boiling for the MMCI/PL180 PrimeCell but
 I just cannot submit that because the PrimeCell is generic and
 there is no way I can implicitly correlate the CPU clk with the
 MMCI host clk like this, so I have to wait for real clock notifiers
 (or implement them myself...)
 
 Linus Walleij
 
 

Regards, 
Chaithrika


___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


(no subject)

2009-10-21 Thread Magic Lin
I want to compile a library of algorithms that providing for Codec Server in 
the linux environment.
However, the compilation of this library need to use other libraries.
How can I build passed?



thanks!

2009-10-21 



北京闻亭泰科技术发展有限公司
姓名:林法宝
Email:li...@dspchina.com
地址:北京市海淀区上地三街9号嘉华大厦B811 
网址: www.wintechdigital.com.cn 
___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


Codec Engine Algorithm Create

2009-10-21 Thread Magic Lin

I want to compile a library of algorithms that providing for Codec Server in 
the linux environment.
However, the compilation of this library need to use other libraries.
How can I build passed?
2009-10-21 



北京闻亭泰科技术发展有限公司
姓名:林法宝
Email:li...@dspchina.com
地址:北京市海淀区上地三街9号嘉华大厦B811 
网址: www.wintechdigital.com.cn 
___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


[PATCH v2 2/5] davinci: DA830/OMAP-L137 EVM: do not configure NAND on UI card when MMC/SD is selected

2009-10-21 Thread Sekhar Nori
On the DA830, AEMIF and MMC/SD pins are shared. On the EVM, when
the mux_mode signal is low MMC/SD works and when mux_mode signal
is high, NAND works.

When MMC/SD driver is configured in the kernel, do not let NAND
get registered and drive mux_mode high. Instead, print a warning
for user to understand why the platform device for NAND did not
get registered.

Signed-off-by: Sekhar Nori nsek...@ti.com
---
 arch/arm/mach-davinci/board-da830-evm.c |   16 
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-davinci/board-da830-evm.c 
b/arch/arm/mach-davinci/board-da830-evm.c
index 6de058f..4fb0447 100644
--- a/arch/arm/mach-davinci/board-da830-evm.c
+++ b/arch/arm/mach-davinci/board-da830-evm.c
@@ -253,6 +253,12 @@ static const short da830_evm_emif25_pins[] = {
-1
 };
 
+#if defined(CONFIG_MMC_DAVINCI) || defined(CONFIG_MMC_DAVINCI_MODULE)
+#define HAS_MMC1
+#else
+#define HAS_MMC0
+#endif
+
 #ifdef CONFIG_DA830_UI_NAND
 static struct mtd_partition da830_evm_nand_partitions[] = {
/* bootloader (U-Boot, etc) in first sector */
@@ -348,6 +354,13 @@ static inline void da830_evm_init_nand(int mux_mode)
 {
int ret;
 
+   if (HAS_MMC) {
+   pr_warning(WARNING: both MMC/SD and NAND are 
+   enabled, but they share AEMIF pins.\n
+   \tDisable MMC/SD for NAND support.\n);
+   return;
+   }
+
ret = da8xx_pinmux_setup(da830_evm_emif25_pins);
if (ret)
pr_warning(da830_evm_init: emif25 mux setup failed: %d\n,
@@ -396,6 +409,9 @@ static int da830_evm_ui_expander_setup(struct i2c_client 
*client, int gpio,
 {
gpio_request(gpio + 6, MUX_MODE);
 
+   /* Drive mux mode low to match the default without UI card */
+   gpio_direction_output(gpio + 6, 0);
+
da830_evm_init_lcdc(gpio + 6);
 
da830_evm_init_nand(gpio + 6);
-- 
1.6.2.4

___
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: DA850/OMAP-L138 EVM: get rid of DA850_UI_EXP config option

2009-10-21 Thread Sekhar Nori
Get rid of DA850_UI_EXP config option since it is not used anywhere
else in code.

Instead make the UI expander choice menu dependent on the EVM
selection itself.

Also add help text indicating that UI board is actually detected
automatically.

Signed-off-by: Sekhar Nori nsek...@ti.com
---
 arch/arm/mach-davinci/Kconfig |   18 +++---
 1 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig
index 1031262..9d69615 100644
--- a/arch/arm/mach-davinci/Kconfig
+++ b/arch/arm/mach-davinci/Kconfig
@@ -130,22 +130,18 @@ config MACH_DAVINCI_DA850_EVM
bool TI DA850/OMAP-L138 Reference Platform
default ARCH_DAVINCI_DA850
depends on ARCH_DAVINCI_DA850
-   help
- Say Y here to select the TI DA850/OMAP-L138 Evaluation Module.
-
-config DA850_UI_EXP
-   bool DA850/OMAP-L138 UI (User Interface) board expander configuration
-   depends on MACH_DAVINCI_DA850_EVM
select GPIO_PCA953X
help
- Say Y here if you have the DA850/OMAP-L138 UI
- (User Interface) board installed and you want to
- enable the peripherals located on User Interface
- board contorlled by TCA6416 expander.
+ Say Y here to select the TI DA850/OMAP-L138 Evaluation Module.
 
 choice
prompt Select peripherals connected to expander on UI board
-   depends on DA850_UI_EXP
+   depends on MACH_DAVINCI_DA850_EVM
+   help
+ The presence of User Interface (UI) card on the DA850/OMAP-L138
+ EVM is detected automatically based on successful probe of the I2C
+ based GPIO expander on that card. This option selected in this
+ menu has an effect only in case of a successful UI card detection.
 
 config DA850_UI_NONE
bool No peripheral is enabled
-- 
1.6.2.4

___
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 1/5] davinci: DA830/OMAP-L137 EVM: use runtime detection for UI card

2009-10-21 Thread Sekhar Nori
This patch supports runtime detection of DA830 UI card and
eliminates the need for DA830_UI config option. Successful
probe of GPIO expander present on the UI card is used to
detect its presence. For this reason, GPIO_PCF857X is auto-
selected when DA830 EVM is configured. In case the UI card
is absent, the probe fails in reasonable time.

As a side effect this patch also gets rid of the voilation
of Documentation/SubmittingPatches section 2.2 in function
da830_evm_ui_expander_setup()

Signed-off-by: Sekhar Nori nsek...@ti.com
---
 arch/arm/mach-davinci/Kconfig   |   17 ++---
 arch/arm/mach-davinci/board-da830-evm.c |  120 +++---
 2 files changed, 67 insertions(+), 70 deletions(-)

diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig
index be92240..1031262 100644
--- a/arch/arm/mach-davinci/Kconfig
+++ b/arch/arm/mach-davinci/Kconfig
@@ -100,21 +100,18 @@ config MACH_DAVINCI_DA830_EVM
bool TI DA830/OMAP-L137 Reference Platform
default ARCH_DAVINCI_DA830
depends on ARCH_DAVINCI_DA830
+   select GPIO_PCF857X
help
  Say Y here to select the TI DA830/OMAP-L137 Evaluation Module.
 
-config DA830_UI
-   bool DA830/OMAP-L137 UI (User Interface) board support
-   depends on MACH_DAVINCI_DA830_EVM
-   help
- Say Y here if you have the DA830/OMAP-L137 UI
- (User Interface) board installed and you want to
- enable the peripherals located on User Interface
- board.
-
 choice
prompt Select DA830/OMAP-L137 UI board peripheral
-   depends on DA830_UI
+   depends on MACH_DAVINCI_DA830_EVM
+   help
+ The presence of UI card on the DA830/OMAP-L137 EVM is detected
+ automatically based on successful probe of the I2C based GPIO
+ expander on that board. This option selected in this menu has
+ an effect only in case of a successful UI card detection.
 
 config DA830_UI_LCD
bool LCD
diff --git a/arch/arm/mach-davinci/board-da830-evm.c 
b/arch/arm/mach-davinci/board-da830-evm.c
index d2159e7..6de058f 100644
--- a/arch/arm/mach-davinci/board-da830-evm.c
+++ b/arch/arm/mach-davinci/board-da830-evm.c
@@ -36,58 +36,6 @@
 #define DA830_EMIF25_ASYNC_DATA_CE3_BASE   0x6200
 #define DA830_EMIF25_CONTROL_BASE  0x6800
 
-static struct at24_platform_data da830_evm_i2c_eeprom_info = {
-   .byte_len   = SZ_256K / 8,
-   .page_size  = 64,
-   .flags  = AT24_FLAG_ADDR16,
-   .setup  = davinci_get_mac_addr,
-   .context= (void *)0x7f00,
-};
-
-static int da830_evm_ui_expander_setup(struct i2c_client *client, int gpio,
-   unsigned ngpio, void *context)
-{
-   gpio_request(gpio + 6, MUX_MODE);
-#ifdef CONFIG_DA830_UI_LCD
-   gpio_direction_output(gpio + 6, 0);
-#else /* Must be NAND or NOR */
-   gpio_direction_output(gpio + 6, 1);
-#endif
-   return 0;
-}
-
-static int da830_evm_ui_expander_teardown(struct i2c_client *client, int gpio,
-   unsigned ngpio, void *context)
-{
-   gpio_free(gpio + 6);
-   return 0;
-}
-
-static struct pcf857x_platform_data da830_evm_ui_expander_info = {
-   .gpio_base  = DAVINCI_N_GPIO,
-   .setup  = da830_evm_ui_expander_setup,
-   .teardown   = da830_evm_ui_expander_teardown,
-};
-
-static struct i2c_board_info __initdata da830_evm_i2c_devices[] = {
-   {
-   I2C_BOARD_INFO(24c256, 0x50),
-   .platform_data  = da830_evm_i2c_eeprom_info,
-   },
-   {
-   I2C_BOARD_INFO(tlv320aic3x, 0x18),
-   },
-   {
-   I2C_BOARD_INFO(pcf8574, 0x3f),
-   .platform_data  = da830_evm_ui_expander_info,
-   },
-};
-
-static struct davinci_i2c_platform_data da830_evm_i2c_0_pdata = {
-   .bus_freq   = 100,  /* kHz */
-   .bus_delay  = 0,/* usec */
-};
-
 /*
  * USB1 VBUS is controlled by GPIO1[15], over-current is reported on GPIO2[4].
  */
@@ -396,7 +344,7 @@ static struct platform_device da830_evm_nand_device = {
.resource   = da830_evm_nand_resources,
 };
 
-static inline void da830_evm_init_nand(void)
+static inline void da830_evm_init_nand(int mux_mode)
 {
int ret;
 
@@ -408,13 +356,15 @@ static inline void da830_evm_init_nand(void)
ret = platform_device_register(da830_evm_nand_device);
if (ret)
pr_warning(da830_evm_init: NAND device not registered.\n);
+
+   gpio_direction_output(mux_mode, 1);
 }
 #else
-static inline void da830_evm_init_nand(void) { }
+static inline void da830_evm_init_nand(int mux_mode) { }
 #endif
 
 #ifdef CONFIG_DA830_UI_LCD
-static inline void da830_evm_init_lcdc(void)
+static inline void da830_evm_init_lcdc(int mux_mode)
 {
int ret;
 
@@ -426,11 +376,65 @@ static inline void da830_evm_init_lcdc(void)
ret = da8xx_register_lcdc(sharp_lcd035q3dg01_pdata);
if (ret)

[PATCH 3/5] davinci: DA850/OMAP-L138 EVM: implement autodetect of RMII PHY

2009-10-21 Thread Sekhar Nori
Implement autodetection of RMII PHY by shifting the decision
to use the RMII PHY to da850_evm_ui_expander_setup() from
da850_evm_init() earlier.

Without this patch, selecting RMII PHY in the UI expander menu
will make the MII PHY unusable even though UI board is not
connected.

The actual configuration and registration of the EMAC device
is delayed to device_initcall() so it happens after the UI card
detection is complete.

A side effect of this patch is the removal of a voilation of
Documentation/SubmittingPatches section 2.2 in function
da850_evm_init()

Signed-off-by: Sekhar Nori nsek...@ti.com
---
 arch/arm/mach-davinci/board-da850-evm.c |   50 +-
 1 files changed, 28 insertions(+), 22 deletions(-)

diff --git a/arch/arm/mach-davinci/board-da850-evm.c 
b/arch/arm/mach-davinci/board-da850-evm.c
index 23e2024..fd6f780 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -148,10 +148,21 @@ static struct platform_device da850_evm_nandflash_device 
= {
 static u32 ui_card_detected;
 static void da850_evm_setup_nor_nand(void);
 
+#ifdef CONFIG_DA850_UI_RMII
+static inline void da850_evm_setup_emac_rmii(int rmii_sel)
+{
+   struct davinci_soc_info *soc_info = davinci_soc_info;
+
+   soc_info-emac_pdata-rmii_en = 1;
+   gpio_set_value(rmii_sel, 0);
+}
+#else
+static inline void da850_evm_setup_emac_rmii(int rmii_sel) { }
+#endif
+
 static int da850_evm_ui_expander_setup(struct i2c_client *client, unsigned 
gpio,
unsigned ngpio, void *c)
 {
-   struct davinci_soc_info *soc_info = davinci_soc_info;
int sel_a, sel_b, sel_c, ret;
 
sel_a = gpio + 7;
@@ -186,9 +197,7 @@ static int da850_evm_ui_expander_setup(struct i2c_client 
*client, unsigned gpio,
 
da850_evm_setup_nor_nand();
 
-   if (soc_info-emac_pdata-rmii_en)
-   /* enable RMII */
-   gpio_set_value(sel_a, 0);
+   da850_evm_setup_emac_rmii(sel_a);
 
return 0;
 
@@ -513,11 +522,16 @@ static const short da850_evm_lcdc_pins[] = {
-1
 };
 
-static int __init da850_evm_config_emac(u8 rmii_en)
+static int __init da850_evm_config_emac(void)
 {
void __iomem *cfg_chip3_base;
int ret;
u32 val;
+   struct davinci_soc_info *soc_info = davinci_soc_info;
+   u8 rmii_en = soc_info-emac_pdata-rmii_en;
+
+   if (!machine_is_davinci_da850_evm())
+   return 0;
 
cfg_chip3_base = DA8XX_SYSCFG_VIRT(DA8XX_CFGCHIP3_REG);
 
@@ -562,12 +576,20 @@ static int __init da850_evm_config_emac(u8 rmii_en)
 functional\n);
}
 
+   soc_info-emac_pdata-phy_mask = DA850_EVM_PHY_MASK;
+   soc_info-emac_pdata-mdio_max_freq = DA850_EVM_MDIO_FREQUENCY;
+
+   ret = da8xx_register_emac();
+   if (ret)
+   pr_warning(da850_evm_init: emac registration failed: %d\n,
+   ret);
+
return 0;
 }
+device_initcall(da850_evm_config_emac);
 
 static __init void da850_evm_init(void)
 {
-   struct davinci_soc_info *soc_info = davinci_soc_info;
int ret;
 
ret = pmic_tps65070_init();
@@ -590,22 +612,6 @@ static __init void da850_evm_init(void)
pr_warning(da850_evm_init: i2c0 registration failed: %d\n,
ret);
 
-   soc_info-emac_pdata-phy_mask = DA850_EVM_PHY_MASK;
-   soc_info-emac_pdata-mdio_max_freq = DA850_EVM_MDIO_FREQUENCY;
-#ifdef CONFIG_DA850_UI_RMII
-   soc_info-emac_pdata-rmii_en = 1;
-#else
-   soc_info-emac_pdata-rmii_en = 0;
-#endif
-
-   ret = da850_evm_config_emac(soc_info-emac_pdata-rmii_en);
-   if (ret)
-   pr_warning(da850_evm_init: emac setup failed: %d\n, ret);
-
-   ret = da8xx_register_emac();
-   if (ret)
-   pr_warning(da850_evm_init: emac registration failed: %d\n,
-   ret);
 
ret = da8xx_register_watchdog();
if (ret)
-- 
1.6.2.4

___
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: DA850/OMAP-L138 EVM: simplify configuration of emac in MII/RMII mode

2009-10-21 Thread Sekhar Nori
There are multiple steps in configuring the EMAC to MII or RMII mode.
Current code implements them using multiple checks.

Consolidate the multiple checks into a single if construct.

Signed-off-by: Sekhar Nori nsek...@ti.com
---
 arch/arm/mach-davinci/board-da850-evm.c |   35 +-
 1 files changed, 15 insertions(+), 20 deletions(-)

diff --git a/arch/arm/mach-davinci/board-da850-evm.c 
b/arch/arm/mach-davinci/board-da850-evm.c
index fd6f780..d0e3178 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -535,23 +535,27 @@ static int __init da850_evm_config_emac(void)
 
cfg_chip3_base = DA8XX_SYSCFG_VIRT(DA8XX_CFGCHIP3_REG);
 
-   /* configure the CFGCHIP3 register for RMII or MII */
val = __raw_readl(cfg_chip3_base);
-   if (rmii_en)
+
+   if (rmii_en) {
val |= BIT(8);
-   else
+   ret = da8xx_pinmux_setup(da850_rmii_pins);
+   pr_info(EMAC: RMII PHY configured, MII PHY will not be
+functional\n);
+   } else {
val = ~BIT(8);
-
-   __raw_writel(val, cfg_chip3_base);
-
-   if (!rmii_en)
ret = da8xx_pinmux_setup(da850_cpgmac_pins);
-   else
-   ret = da8xx_pinmux_setup(da850_rmii_pins);
+   pr_info(EMAC: MII PHY configured, RMII PHY will not be
+functional\n);
+   }
+
if (ret)
pr_warning(da850_evm_init: cpgmac/rmii mux setup failed: %d\n,
ret);
 
+   /* configure the CFGCHIP3 register for RMII or MII */
+   __raw_writel(val, cfg_chip3_base);
+
ret = davinci_cfg_reg(DA850_GPIO2_6);
if (ret)
pr_warning(da850_evm_init:GPIO(2,6) mux setup 
@@ -564,17 +568,8 @@ static int __init da850_evm_config_emac(void)
return ret;
}
 
-   if (rmii_en) {
-   /* Disable MII MDIO clock */
-   gpio_direction_output(DA850_MII_MDIO_CLKEN_PIN, 1);
-   pr_info(EMAC: RMII PHY configured, MII PHY will not be
-functional\n);
-   } else {
-   /* Enable MII MDIO clock */
-   gpio_direction_output(DA850_MII_MDIO_CLKEN_PIN, 0);
-   pr_info(EMAC: MII PHY configured, RMII PHY will not be
-functional\n);
-   }
+   /* Enable/Disable MII MDIO clock */
+   gpio_direction_output(DA850_MII_MDIO_CLKEN_PIN, rmii_en);
 
soc_info-emac_pdata-phy_mask = DA850_EVM_PHY_MASK;
soc_info-emac_pdata-mdio_max_freq = DA850_EVM_MDIO_FREQUENCY;
-- 
1.6.2.4

___
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 v2 1/2] davinci: DA830/OMAP-L137 EVM: use runtime detection for UI card

2009-10-21 Thread Nori, Sekhar
On Thu, Oct 15, 2009 at 20:27:40, Kevin Hilman wrote:
 Sekhar Nori nsek...@ti.com writes:

  This patch supports runtime detection of DA830 UI card and
  eliminates the need for DA830_UI config option. Successful
  probe of GPIO expander present on the UI card is used to
  detect its presence. For this reason, GPIO_PCF857X is auto-
  selected when DA830 EVM is configured. In case the UI card
  is absent, the probe fails in reasonable time.
 
  As a side effect this patch also gets rid of the voilation
  of Documentation/SubmittingPatches section 2.2 in function
  da830_evm_ui_expander_setup()
 
  Signed-off-by: Sekhar Nori nsek...@ti.com

 I like this version.  Some comments below.

  ---
  This patch set depends on the following patch posted earlier:
  davinci: DA830/OMAP-L137 EVM: remove ifdefs inside da830_evm_init()
 
   arch/arm/mach-davinci/Kconfig   |   12 +---
   arch/arm/mach-davinci/board-da830-evm.c |  120 
  +++---
   2 files changed, 62 insertions(+), 70 deletions(-)
 
  diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig
  index be92240..15a84ed 100644
  --- a/arch/arm/mach-davinci/Kconfig
  +++ b/arch/arm/mach-davinci/Kconfig
  @@ -100,21 +100,13 @@ config MACH_DAVINCI_DA830_EVM
  bool TI DA830/OMAP-L137 Reference Platform
  default ARCH_DAVINCI_DA830
  depends on ARCH_DAVINCI_DA830
  +   select GPIO_PCF857X
  help
Say Y here to select the TI DA830/OMAP-L137 Evaluation Module.
 
  -config DA830_UI
  -   bool DA830/OMAP-L137 UI (User Interface) board support
  -   depends on MACH_DAVINCI_DA830_EVM
  -   help
  - Say Y here if you have the DA830/OMAP-L137 UI
  - (User Interface) board installed and you want to
  - enable the peripherals located on User Interface
  - board.
  -
   choice
  prompt Select DA830/OMAP-L137 UI board peripheral
  -   depends on DA830_UI
  +   depends on MACH_DAVINCI_DA830_EVM

 Should have a help string here describing the fact that the UI board
 is auto detected and this option only has effect when the UI board is
 detected.

Er, it looks like help here does not show up during configuration.
However, there are other parts in kernel which still have help for
choice prompt (eg. arch/arm/Kconfig) so I just went ahead with adding
the help. If nothing, it will help those who choose to look at the
file manually.

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


Re: [PATCH v2 2/5] davinci: DA830/OMAP-L137 EVM: do not configure NAND on UI card when MMC/SD is selected

2009-10-21 Thread Sergei Shtylyov

Hello.

Sekhar Nori wrote:


On the DA830, AEMIF and MMC/SD pins are shared. On the EVM, when
the mux_mode signal is low MMC/SD works and when mux_mode signal
is high, NAND works.



When MMC/SD driver is configured in the kernel, do not let NAND
get registered and drive mux_mode high. Instead, print a warning
for user to understand why the platform device for NAND did not
get registered.



Signed-off-by: Sekhar Nori nsek...@ti.com


[...]


diff --git a/arch/arm/mach-davinci/board-da830-evm.c 
b/arch/arm/mach-davinci/board-da830-evm.c
index 6de058f..4fb0447 100644
--- a/arch/arm/mach-davinci/board-da830-evm.c
+++ b/arch/arm/mach-davinci/board-da830-evm.c
@@ -253,6 +253,12 @@ static const short da830_evm_emif25_pins[] = {
-1
 };
 
+#if defined(CONFIG_MMC_DAVINCI) || defined(CONFIG_MMC_DAVINCI_MODULE)

+#define HAS_MMC1
+#else
+#define HAS_MMC0
+#endif


   This is not needed. Why not just use #ifdef's directly?


+
 #ifdef CONFIG_DA830_UI_NAND
 static struct mtd_partition da830_evm_nand_partitions[] = {
/* bootloader (U-Boot, etc) in first sector */
@@ -348,6 +354,13 @@ static inline void da830_evm_init_nand(int mux_mode)
 {
int ret;
 
+	if (HAS_MMC) {

+   pr_warning(WARNING: both MMC/SD and NAND are 
+   enabled, but they share AEMIF pins.\n
+   \tDisable MMC/SD for NAND support.\n);
+   return;
+   }
+
ret = da8xx_pinmux_setup(da830_evm_emif25_pins);
if (ret)
pr_warning(da830_evm_init: emif25 mux setup failed: %d\n,


WBR, Sergei

___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


RE: Codec Engine Algorithm Create

2009-10-21 Thread Tivy, Robert
A compilation of source code does not require any libraries, just header 
files.  Libraries are used only by a linker, usually for linking the final app.

You could pre-link your library of algorithms with the other libraries by doing 
a partial link, which would bring the needed library code into your library.  
Or, you could just require the final application builder to obtain/install the 
other libraries and link with them.

- Rob


From: davinci-linux-open-source-bounces+rtivy=ti@linux.davincidsp.com 
[mailto:davinci-linux-open-source-bounces+rtivy=ti@linux.davincidsp.com] On 
Behalf Of Magic Lin
Sent: Wednesday, October 21, 2009 2:37 AM
To: davinci-linux-open-source
Subject: Codec Engine Algorithm Create


I want to compile a library of algorithms that providing for Codec Server in 
the linux environment.
However, the compilation of this library need to use other libraries.
How can I build passed?
2009-10-21

北京闻亭泰科技术发展有限公司
姓名:林法宝
Email:li...@dspchina.com
地址:北京市海淀区上地三街9号嘉华大厦B811
网址: www.wintechdigital.com.cnhttp://www.wintechdigital.com.cn/
___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


Sitara ARM processor family announcement (v3)

2009-10-21 Thread Kridner, Jason
I believe many of you have likely seen the new Sitara ARM product family 
announcement[1] as part of broadening our ARM product portfolio[2].  This 
family draws processing cores from the DaVinci family of DSP/multimedia devices 
and OMAP family of low-power devices and focuses on markets like industrial 
automation, point-of-sale, medical instrumentation, digital signage, portable 
data terminals, test  measurement, and single board computers.

The important thing is where will the community collaborate on the Linux kernel 
for these new devices!  To help decode the broad number of part numbers and 
brands, I'm creating a wiki table that shows where TI will be submitting our 
patches to handle the new devices and as a place holder for frequently asked 
questions[3].

Regards,
Jason Kridner

[1] http://www.ti.com/sitara 
[2] http://www.ti.com/arm 
[3] 
http://tiexpressdsp.com/index.php?title=Applications_Processors_Crossreference 



___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


[PATCH] V4L: adding digital video timings APIs

2009-10-21 Thread m-karicheri2
From: Muralidharan Karicheri m-kariche...@ti.com

This is the initial version of the digital video timings APIs implementation.

This adds the above APIs to the v4l2 core. This is based on version v1.2
of the RFC titled V4L - Support for video timings at the input/output 
interface
Following new ioctls are added:-

- VIDIOC_ENUM_DV_PRESETS
- VIDIOC_S_DV_PRESET
- VIDIOC_G_DV_PRESET
- VIDIOC_QUERY_DV_PRESET
- VIDIOC_S_DV_TIMINGS
- VIDIOC_G_DV_TIMINGS

Please refer to the RFC for the details. This code was tested using vpfe
capture driver on TI's DM365. Following is the test configuration used :-

Blue Ray HD DVD source - TVP7002 - DM365 (VPFE) -DDR

A draft version of the TVP7002 driver (currently being reviewed in the mailing
list) was used that supports V4L2_DV_1080I60  V4L2_DV_720P60 presets. 

A loopback video capture application was used for testing these APIs. This calls
following IOCTLS :-

 -  verify the new v4l2_input capabilities flag added
 -  Enumerate available presets using VIDIOC_ENUM_DV_PRESETS
 -  Set one of the supported preset using VIDIOC_S_DV_PRESET
 -  Get current preset using VIDIOC_G_DV_PRESET
 -  Detect current preset using VIDIOC_QUERY_DV_PRESET
 -  Using stub functions in tvp7002, verify VIDIOC_S_DV_TIMINGS
and VIDIOC_G_DV_TIMINGS ioctls are received at the sub device. 

TODOs :

 - Test it on a 64bit platform - I need help here since I don't have the 
platform.
 - Add documentation (Can someone tell me which file to modify in the kernel 
tree?).

Please review this and let me know your comments.

Mandatory reviewer - Hans Verkuil hverk...@xs4all.nl

Signed-off-by: Muralidharan Karicheri m-kariche...@ti.com
---
Applies to V4L-DVB linux-next branch

 drivers/media/video/v4l2-compat-ioctl32.c |7 ++
 drivers/media/video/v4l2-ioctl.c  |  122 ++
 include/linux/videodev2.h |  136 -
 include/media/v4l2-ioctl.h|   15 +++
 include/media/v4l2-subdev.h   |   21 +
 5 files changed, 299 insertions(+), 2 deletions(-)

diff --git a/drivers/media/video/v4l2-compat-ioctl32.c 
b/drivers/media/video/v4l2-compat-ioctl32.c
index 997975d..9277448 100644
--- a/drivers/media/video/v4l2-compat-ioctl32.c
+++ b/drivers/media/video/v4l2-compat-ioctl32.c
@@ -1077,6 +1077,13 @@ long v4l2_compat_ioctl32(struct file *file, unsigned int 
cmd, unsigned long arg)
case VIDIOC_DBG_G_REGISTER:
case VIDIOC_DBG_G_CHIP_IDENT:
case VIDIOC_S_HW_FREQ_SEEK:
+   case VIDIOC_ENUM_DV_PRESETS:
+   case VIDIOC_S_DV_PRESET:
+   case VIDIOC_G_DV_PRESET:
+   case VIDIOC_QUERY_DV_PRESET:
+   case VIDIOC_S_DV_TIMINGS:
+   case VIDIOC_G_DV_TIMINGS:
+
ret = do_video_ioctl(file, cmd, arg);
break;
 
diff --git a/drivers/media/video/v4l2-ioctl.c b/drivers/media/video/v4l2-ioctl.c
index 30cc334..10b5678 100644
--- a/drivers/media/video/v4l2-ioctl.c
+++ b/drivers/media/video/v4l2-ioctl.c
@@ -284,6 +284,12 @@ static const char *v4l2_ioctls[] = {
[_IOC_NR(VIDIOC_DBG_G_CHIP_IDENT)] = VIDIOC_DBG_G_CHIP_IDENT,
[_IOC_NR(VIDIOC_S_HW_FREQ_SEEK)]   = VIDIOC_S_HW_FREQ_SEEK,
 #endif
+   [_IOC_NR(VIDIOC_ENUM_DV_PRESETS)]  = VIDIOC_ENUM_DV_PRESETS,
+   [_IOC_NR(VIDIOC_S_DV_PRESET)]  = VIDIOC_S_DV_PRESET,
+   [_IOC_NR(VIDIOC_G_DV_PRESET)]  = VIDIOC_G_DV_PRESET,
+   [_IOC_NR(VIDIOC_QUERY_DV_PRESET)]  = VIDIOC_QUERY_DV_PRESET,
+   [_IOC_NR(VIDIOC_S_DV_TIMINGS)] = VIDIOC_S_DV_TIMINGS,
+   [_IOC_NR(VIDIOC_G_DV_TIMINGS)] = VIDIOC_G_DV_TIMINGS,
 };
 #define V4L2_IOCTLS ARRAY_SIZE(v4l2_ioctls)
 
@@ -1794,6 +1800,122 @@ static long __video_do_ioctl(struct file *file,
}
break;
}
+   case VIDIOC_ENUM_DV_PRESETS:
+   {
+   struct v4l2_dv_enum_preset *p = arg;
+
+   if (!ops-vidioc_enum_dv_presets)
+   break;
+
+   ret = ops-vidioc_enum_dv_presets(file, fh, p);
+   if (!ret)
+   dbgarg(cmd,
+   index=%d, preset=%d, name=%s, width=%d,
+height=%d ,
+   p-index, p-preset, p-name, p-width,
+   p-height);
+   break;
+   }
+   case VIDIOC_S_DV_PRESET:
+   {
+   struct v4l2_dv_preset *p = arg;
+
+   if (!ops-vidioc_s_dv_preset)
+   break;
+
+   dbgarg(cmd, preset=%d\n, p-preset);
+   ret = ops-vidioc_s_dv_preset(file, fh, p);
+   break;
+   }
+   case VIDIOC_G_DV_PRESET:
+   {
+   struct v4l2_dv_preset *p = arg;
+
+   if (!ops-vidioc_g_dv_preset)
+   break;
+
+   ret = ops-vidioc_g_dv_preset(file, fh, p);
+   if (!ret)
+   

Re: [PATCH] V4L: adding digital video timings APIs

2009-10-21 Thread Hans Verkuil
Hi Murali,

 From: Muralidharan Karicheri m-kariche...@ti.com

 This is the initial version of the digital video timings APIs
 implementation.

 This adds the above APIs to the v4l2 core. This is based on version v1.2
 of the RFC titled V4L - Support for video timings at the input/output
 interface
 Following new ioctls are added:-

   - VIDIOC_ENUM_DV_PRESETS
   - VIDIOC_S_DV_PRESET
   - VIDIOC_G_DV_PRESET
   - VIDIOC_QUERY_DV_PRESET
   - VIDIOC_S_DV_TIMINGS
   - VIDIOC_G_DV_TIMINGS

 Please refer to the RFC for the details. This code was tested using vpfe
 capture driver on TI's DM365. Following is the test configuration used :-

 Blue Ray HD DVD source - TVP7002 - DM365 (VPFE) -DDR

 A draft version of the TVP7002 driver (currently being reviewed in the
 mailing
 list) was used that supports V4L2_DV_1080I60  V4L2_DV_720P60 presets.

 A loopback video capture application was used for testing these APIs. This
 calls
 following IOCTLS :-

  -  verify the new v4l2_input capabilities flag added
  -  Enumerate available presets using VIDIOC_ENUM_DV_PRESETS
  -  Set one of the supported preset using VIDIOC_S_DV_PRESET
  -  Get current preset using VIDIOC_G_DV_PRESET
  -  Detect current preset using VIDIOC_QUERY_DV_PRESET
  -  Using stub functions in tvp7002, verify VIDIOC_S_DV_TIMINGS
 and VIDIOC_G_DV_TIMINGS ioctls are received at the sub device.

 TODOs :

  - Test it on a 64bit platform - I need help here since I don't have the
 platform.
  - Add documentation (Can someone tell me which file to modify in the
 kernel tree?).

Use the spec in media-spec/v4l.

Please also add support to v4l2-ctl.cpp in v4l2-apps/util! That's handy
for testing.

Setting the input/output capabilities should be done in v4l2-ioctl.c
rather than in the drivers. All the info you need to set these bits is
available in the core after all.

I also noticed that not all new ioctls are part of video_ops. Aren't they
all required?

Regards,

Hans

PS: Thanks for all your work! It's great to see this moving forward nicely!


 Please review this and let me know your comments.

 Mandatory reviewer - Hans Verkuil hverk...@xs4all.nl

 Signed-off-by: Muralidharan Karicheri m-kariche...@ti.com
 ---
 Applies to V4L-DVB linux-next branch

  drivers/media/video/v4l2-compat-ioctl32.c |7 ++
  drivers/media/video/v4l2-ioctl.c  |  122
 ++
  include/linux/videodev2.h |  136
 -
  include/media/v4l2-ioctl.h|   15 +++
  include/media/v4l2-subdev.h   |   21 +
  5 files changed, 299 insertions(+), 2 deletions(-)

 diff --git a/drivers/media/video/v4l2-compat-ioctl32.c
 b/drivers/media/video/v4l2-compat-ioctl32.c
 index 997975d..9277448 100644
 --- a/drivers/media/video/v4l2-compat-ioctl32.c
 +++ b/drivers/media/video/v4l2-compat-ioctl32.c
 @@ -1077,6 +1077,13 @@ long v4l2_compat_ioctl32(struct file *file,
 unsigned int cmd, unsigned long arg)
   case VIDIOC_DBG_G_REGISTER:
   case VIDIOC_DBG_G_CHIP_IDENT:
   case VIDIOC_S_HW_FREQ_SEEK:
 + case VIDIOC_ENUM_DV_PRESETS:
 + case VIDIOC_S_DV_PRESET:
 + case VIDIOC_G_DV_PRESET:
 + case VIDIOC_QUERY_DV_PRESET:
 + case VIDIOC_S_DV_TIMINGS:
 + case VIDIOC_G_DV_TIMINGS:
 +
   ret = do_video_ioctl(file, cmd, arg);
   break;

 diff --git a/drivers/media/video/v4l2-ioctl.c
 b/drivers/media/video/v4l2-ioctl.c
 index 30cc334..10b5678 100644
 --- a/drivers/media/video/v4l2-ioctl.c
 +++ b/drivers/media/video/v4l2-ioctl.c
 @@ -284,6 +284,12 @@ static const char *v4l2_ioctls[] = {
   [_IOC_NR(VIDIOC_DBG_G_CHIP_IDENT)] = VIDIOC_DBG_G_CHIP_IDENT,
   [_IOC_NR(VIDIOC_S_HW_FREQ_SEEK)]   = VIDIOC_S_HW_FREQ_SEEK,
  #endif
 + [_IOC_NR(VIDIOC_ENUM_DV_PRESETS)]  = VIDIOC_ENUM_DV_PRESETS,
 + [_IOC_NR(VIDIOC_S_DV_PRESET)]  = VIDIOC_S_DV_PRESET,
 + [_IOC_NR(VIDIOC_G_DV_PRESET)]  = VIDIOC_G_DV_PRESET,
 + [_IOC_NR(VIDIOC_QUERY_DV_PRESET)]  = VIDIOC_QUERY_DV_PRESET,
 + [_IOC_NR(VIDIOC_S_DV_TIMINGS)] = VIDIOC_S_DV_TIMINGS,
 + [_IOC_NR(VIDIOC_G_DV_TIMINGS)] = VIDIOC_G_DV_TIMINGS,
  };
  #define V4L2_IOCTLS ARRAY_SIZE(v4l2_ioctls)

 @@ -1794,6 +1800,122 @@ static long __video_do_ioctl(struct file *file,
   }
   break;
   }
 + case VIDIOC_ENUM_DV_PRESETS:
 + {
 + struct v4l2_dv_enum_preset *p = arg;
 +
 + if (!ops-vidioc_enum_dv_presets)
 + break;
 +
 + ret = ops-vidioc_enum_dv_presets(file, fh, p);
 + if (!ret)
 + dbgarg(cmd,
 + index=%d, preset=%d, name=%s, width=%d,
 +  height=%d ,
 + p-index, p-preset, p-name, p-width,
 + p-height);
 + break;
 + }
 + case VIDIOC_S_DV_PRESET:
 + {
 + struct v4l2_dv_preset *p = arg;
 +
 +  

RE: [PATCH v2 2/5] davinci: DA830/OMAP-L137 EVM: do not configure NAND on UI card when MMC/SD is selected

2009-10-21 Thread Nori, Sekhar
On Wed, Oct 21, 2009 at 21:36:40, Sergei Shtylyov wrote:
 Hello.

 Sekhar Nori wrote:

  On the DA830, AEMIF and MMC/SD pins are shared. On the EVM, when
  the mux_mode signal is low MMC/SD works and when mux_mode signal
  is high, NAND works.

  When MMC/SD driver is configured in the kernel, do not let NAND
  get registered and drive mux_mode high. Instead, print a warning
  for user to understand why the platform device for NAND did not
  get registered.

  Signed-off-by: Sekhar Nori nsek...@ti.com

 [...]

  diff --git a/arch/arm/mach-davinci/board-da830-evm.c 
  b/arch/arm/mach-davinci/board-da830-evm.c
  index 6de058f..4fb0447 100644
  --- a/arch/arm/mach-davinci/board-da830-evm.c
  +++ b/arch/arm/mach-davinci/board-da830-evm.c
  @@ -253,6 +253,12 @@ static const short da830_evm_emif25_pins[] = {
  -1
   };
 
  +#if defined(CONFIG_MMC_DAVINCI) || defined(CONFIG_MMC_DAVINCI_MODULE)
  +#define HAS_MMC1
  +#else
  +#define HAS_MMC0
  +#endif

 This is not needed. Why not just use #ifdef's directly?

May be it's a personal preference, but I like this better than
seeing #ifdefs embedded in function body. Besides, that would be
a direct violation of Documentation/SubmittingPatches section 2.2

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


DM355's SPI charcter driver

2009-10-21 Thread Digant
hello everyone,I am trying to write a character driver for SPI on Dm355
evm, LSP 1.2 , MV-4..Can I get any help ?? eg. example codes or anything ??
I am not able to call __devinit  tagged function.Because of that I am
getting error in retrieving platform data.
-Digant Desai
___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source