[PATCH] davinci: Macro to convert GPIO signal to GPIO pin number
Adds a macro to convert the GPIO signal passed as bank number and signal to GPIO pin number. Signed-off-by: Sudhakar Rajashekhara sudhakar@ti.com --- arch/arm/mach-davinci/include/mach/gpio.h |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-davinci/include/mach/gpio.h b/arch/arm/mach-davinci/include/mach/gpio.h index 4f032b3..f3b8ef8 100644 --- a/arch/arm/mach-davinci/include/mach/gpio.h +++ b/arch/arm/mach-davinci/include/mach/gpio.h @@ -42,6 +42,9 @@ */ #defineGPIO(X) (X) /* 0 = X = (DAVINCI_N_GPIO - 1) */ +/* Convert GPIO signal to GPIO pin number */ +#define GPIO_TO_PIN(bank, gpio)(16 * (bank) + (gpio)) + struct gpio_controller { u32 dir; u32 out_data; -- 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
RE: [PATCH v2] davinci: Add platform support for da850/omap-l138 GLCD
On Wed, Aug 12, 2009 at 23:13:42, Kevin Hilman wrote: Sudhakar Rajashekhara sudhakar@ti.com writes: This patch adds platform support for the graphic display (Sharp LK043T1DG01) found on DA850/OMAP-L138 based EVM. Signed-off-by: Sudhakar Rajashekhara sudhakar@ti.com --- Since the previous version, following are the modifications: 1. Defined the macros for the LCD back light and LCD power GPIO pins. 2. Made da850_lcd_hw_init() function static. 3. Added gpio_free() for 1st GPIO pin, if gpio_request for the 2nd GPIO pin fails. 4. Removed un-necessary mdelays from da850_lcd_hw_init() function. 5. Also removed LPSC disable/enable sequence from da850_lcd_hw_init() function. 6. Removed the comments for the members of lcd_ctrl_config structure. arch/arm/mach-davinci/board-da850-evm.c| 58 +++ arch/arm/mach-davinci/da850.c | 42 arch/arm/mach-davinci/devices-da8xx.c | 59 arch/arm/mach-davinci/include/mach/da8xx.h |3 + arch/arm/mach-davinci/include/mach/mux.h | 26 5 files changed, 188 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index d989346..b05b7f5 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c [...] +static int da850_lcd_hw_init(void) +{ + int status; + + status = gpio_request(DA850_LCD_BL_PIN, lcd bl\n); + if (status 0) + return status; + + status = gpio_request(DA850_LCD_PWR_PIN, lcd pwr\n); + if (status 0) { + gpio_free(DA850_LCD_BL_PIN); + return status; + } + + gpio_direction_output(DA850_LCD_BL_PIN, 0); + gpio_direction_output(DA850_LCD_PWR_PIN, 0); + + /* disable lcd backlight */ + gpio_set_value(DA850_LCD_BL_PIN, 0); + + /* disable lcd power */ + gpio_set_value(DA850_LCD_PWR_PIN, 0); + + /* enable lcd power */ + gpio_set_value(DA850_LCD_PWR_PIN, 1); + + /* enable lcd backlight */ + gpio_set_value(DA850_LCD_BL_PIN, 1); + + gpio_free(DA850_LCD_BL_PIN); + gpio_free(DA850_LCD_PWR_PIN); Do you really want to free these and allow other potential users to change the direction/value? Since this board code, I suspect you want to request and hold the GPIO lines. This also would allow the use of the GPIO sysfs interface to toggle power and backlight for debug. Point taken. I'll free the gpio only in case of error condition and remove the call to gpio_free() while exiting from the function. Regards, Sudhakar ___ 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] davinci: Add MMC/SD support for da850/omap-l138
On Wed, Aug 12, 2009 at 23:23:02, Kevin Hilman wrote: Sudhakar Rajashekhara sudhakar@ti.com writes: There are two instances of MMC/SD on da850/omap-l138. Connector for the first instance is available on the EVM. This patch adds support for this instance. This patch also adds support for card detect and write protect switches on da850/omap-l138 EVM. Signed-off-by: Sudhakar Rajashekhara sudhakar@ti.com --- Since the previous version, following are the modifications: 1. Defined the macros for the GPIO pins. 2. Moved calls to gpio_request() and gpio_direction_input() to da850_evm_init() function. 3. Added the GPIO pins used for Card detect and Write protect features to the mux table. This patch depends on the following patches which I have submitted to davinci git: [PATCH v2] davinci: Configure MDIO pins for EMAC [PATCH v2] davinci: Add platform support for da850/omap-l138 GLCD arch/arm/mach-davinci/board-da850-evm.c| 54 arch/arm/mach-davinci/da850.c | 23 arch/arm/mach-davinci/devices-da8xx.c | 38 +++ arch/arm/mach-davinci/include/mach/da8xx.h |4 ++ arch/arm/mach-davinci/include/mach/mux.h | 10 + 5 files changed, 129 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index b05b7f5..97251c3 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c @@ -37,6 +37,11 @@ /* GPIO 8[10] is used for LCD Power - 16 * 8 + 10 = 138 */ #define DA850_LCD_PWR_PIN 138 +/* GPIO 4[0] is used for MMC/SD CD - 16 * 4 + 0 = 64 */ +#define DA850_MMCSD_CD_PIN 64 +/* GPIO 4[1] is used for MMC/SD WP - 16 * 4 + 1 = 65 */ +#define DA850_MMCSD_WP_PIN 65 + How about creating a macro in mach/gpio.h that takes a bank number and a GPIO number and returns (16 * bank + gpio). That way you don't have to keep adding comments for these. Then use the macro for these as well as in the GLCD patch. Agreed. I already submitted a patch to do this. static struct davinci_i2c_platform_data da850_evm_i2c_0_pdata = { .bus_freq = 100, /* kHz */ .bus_delay = 0,/* usec */ @@ -46,6 +51,31 @@ static struct davinci_uart_config da850_evm_uart_config __initdata = { .enabled_uarts = 0x7, }; +#if defined(CONFIG_MMC_DAVINCI) || defined(CONFIG_MMC_DAVINCI_MODULE) +static int da850_evm_mmc_get_ro(int index) +{ + int val; + + val = gpio_get_value(DA850_MMCSD_WP_PIN); + return val; +} Drop the 'val' and make this a one-liner: 'return gpio_get_value(DA850_MMCSD_WP_PIN);' OK. +static int da850_evm_mmc_get_cd(int index) +{ + int val; + + val = gpio_get_value(DA850_MMCSD_CD_PIN); + return !val; +} ditto OK. - Sudhakar ___ 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] davinci: Add NOR flash support for da850/omap-l138
On Wed, Aug 12, 2009 at 23:37:54, Kevin Hilman wrote: Sudhakar Rajashekhara sudhakar@ti.com writes: This patch adds platform data for the 8MB NOR flash found on da850/omap-l138 EVM. Both NOR and NAND can co-exist on da850/omap-l138 as they are using different chip selects. Signed-off-by: Sudhakar Rajashekhara sudhakar@ti.com --- Since the previous version, EMA_BA_0 pin has been removed from the mux table as this pin is not being used on DA850/OMAP-L138 EVM for NOR. This patch depends on the following patches which I have submitted to davinci git: [PATCH v2] davinci: Configure MDIO pins for EMAC [PATCH v2] davinci: Add platform support for da850/omap-l138 GLCD [PATCH v2] davinci: Add MMC/SD support for da850/omap-l138 [PATCH v2] davinci: Add NAND flash support for DA850/OMAP-L138 Would it be possible to do all these additions without the #ifdefs in the board file like you did for GLCD. IOW, just create/register all of them. The platform_device will be created and potentially waste some memory if the corresponding platform_driver is never created, but it makes things a bit more flexible. Sure. I'll change it. Are there acutally mux conflicts between some of these devices? If so, until we get some better support for dynamic mux, I think it would more clear to have this documented (maybe with warnings) in the board file so users don't have to experiment with Kconfig options to find a working config. I was planning to submit a patch to handle this right after this patch. Few pins of NOR and MMC are shared on da850/omap-l138. I'll be printing out a warning if both NOR and MMC are enabled in menuconfig. I'll leave the choice of choosing between NOR and MMC to the user. arch/arm/mach-davinci/board-da850-evm.c| 60 arch/arm/mach-davinci/da850.c | 50 +++ arch/arm/mach-davinci/include/mach/da8xx.h |2 + arch/arm/mach-davinci/include/mach/mux.h | 34 4 files changed, 146 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index b879cc5..6087458 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c [...] +static void __init da850_evm_init_nor(void) +{ + void __iomem *aemif_addr; + + aemif_addr = ioremap(DA8XX_AEMIF_CTL_BASE, SZ_32K - 1); Why the -1 here? My mistake. Will remove -1. + /* Configure data bus width of CS2 to 16 bit */ + __raw_writel(1, aemif_addr + 0x10); Just use writel(), and also some symobilc names would help readability instead of using hard-coded constants. OK. - Sudhakar ___ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
Sample HD video files
Hi Can somebody tell me , from where can I download sample 1920x1080 YUV 422 files (uncompressed video)? thanks Jayakrishnnan M M ___ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
Re: Sample HD video files
Jaya krishnan wrote: Hi Can somebody tell me , from where can I download sample 1920x1080 YUV 422 files (uncompressed video)? just use any 1920x1080 file and decode it to YUV 422 ___ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
Re: Sample HD video files
On Thu, Aug 13, 2009 at 2:03 PM, Vladimir Pantelicp...@nt.tu-darmstadt.de wrote: Jaya krishnan wrote: Hi Can somebody tell me , from where can I download sample 1920x1080 YUV 422 files (uncompressed video)? just use any 1920x1080 file and decode it to YUV 422 Try open src http://www.bigbuckbunny.org/ ___ 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] davinci: Add platform support for da850/omap-l138 GLCD
This patch adds platform support for the graphic display (Sharp LK043T1DG01) found on DA850/OMAP-L138 based EVM. Signed-off-by: Sudhakar Rajashekhara sudhakar@ti.com --- Since the previous version: 1. GPIO_TO_PIN macros are used to get the GPIO pin numbers. 2. Removed call to gpio_free while exiting from da850_lcd_hw_init function. This patch depends on the following patch which I have submitted earlier: [PATCH] davinci: Macro to convert GPIO signal to GPIO pin number arch/arm/mach-davinci/board-da850-evm.c| 50 +++ arch/arm/mach-davinci/da850.c | 42 arch/arm/mach-davinci/devices-da8xx.c | 59 arch/arm/mach-davinci/include/mach/da8xx.h |3 + arch/arm/mach-davinci/include/mach/mux.h | 26 5 files changed, 180 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index 52bfe4c..b1df784 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c @@ -17,6 +17,7 @@ #include linux/console.h #include linux/i2c.h #include linux/i2c/at24.h +#include linux/gpio.h #include asm/mach-types.h #include asm/mach/arch.h @@ -29,6 +30,9 @@ #define DA850_EVM_PHY_MASK 0x1 #define DA850_EVM_MDIO_FREQUENCY 220 /* PHY bus frequency */ +#define DA850_LCD_BL_PIN GPIO_TO_PIN(2, 15) +#define DA850_LCD_PWR_PIN GPIO_TO_PIN(8, 10) + static struct davinci_i2c_platform_data da850_evm_i2c_0_pdata = { .bus_freq = 100, /* kHz */ .bus_delay = 0,/* usec */ @@ -59,6 +63,37 @@ static struct snd_platform_data da850_evm_snd_data = { .rxnumevt = 1, }; +static int da850_lcd_hw_init(void) +{ + int status; + + status = gpio_request(DA850_LCD_BL_PIN, lcd bl\n); + if (status 0) + return status; + + status = gpio_request(DA850_LCD_PWR_PIN, lcd pwr\n); + if (status 0) { + gpio_free(DA850_LCD_BL_PIN); + return status; + } + + gpio_direction_output(DA850_LCD_BL_PIN, 0); + gpio_direction_output(DA850_LCD_PWR_PIN, 0); + + /* disable lcd backlight */ + gpio_set_value(DA850_LCD_BL_PIN, 0); + + /* disable lcd power */ + gpio_set_value(DA850_LCD_PWR_PIN, 0); + + /* enable lcd power */ + gpio_set_value(DA850_LCD_PWR_PIN, 1); + + /* enable lcd backlight */ + gpio_set_value(DA850_LCD_BL_PIN, 1); + + return 0; +} static __init void da850_evm_init(void) { @@ -115,6 +150,21 @@ static __init void da850_evm_init(void) ret); da8xx_init_mcasp(0, da850_evm_snd_data); + + ret = da8xx_pinmux_setup(da850_lcdcntl_pins); + if (ret) + pr_warning(da850_evm_init: lcdcntl mux setup failed: %d\n, + ret); + + ret = da850_lcd_hw_init(); + if (ret) + pr_warning(da850_evm_init: lcd initialization failed: %d\n, + ret); + + ret = da8xx_register_lcdc(); + if (ret) + pr_warning(da850_evm_init: lcdc registration failed: %d\n, + ret); } #ifdef CONFIG_SERIAL_8250_CONSOLE diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c index e440c09..e6e605b 100644 --- a/arch/arm/mach-davinci/da850.c +++ b/arch/arm/mach-davinci/da850.c @@ -297,6 +297,13 @@ static struct clk mcasp_clk = { .psc_ctlr = 1, }; +static struct clk lcdc_clk = { + .name = lcdc, + .parent = pll0_sysclk2, + .lpsc = DA8XX_LPSC1_LCDC, + .psc_ctlr = 1, +}; + static struct davinci_clk da850_clks[] = { CLK(NULL, ref, ref_clk), CLK(NULL, pll0, pll0_clk), @@ -335,6 +342,7 @@ static struct davinci_clk da850_clks[] = { CLK(NULL, rmii, rmii_clk), CLK(davinci_emac.1, NULL, emac_clk), CLK(davinci-mcasp.0, NULL, mcasp_clk), + CLK(da8xx_lcdc.0, NULL, lcdc_clk), CLK(NULL, NULL, NULL), }; @@ -405,6 +413,30 @@ static const struct mux_config da850_pins[] = { MUX_CFG(DA850, AXR_2, 2, 20, 15, 1, false) MUX_CFG(DA850, AXR_1, 2, 24, 15, 1, false) MUX_CFG(DA850, AXR_0, 2, 28, 15, 1, false) + /* LCD function */ + MUX_CFG(DA850, LCD_D_7, 16, 8, 15, 2, false) + MUX_CFG(DA850, LCD_D_6, 16, 12, 15, 2, false) + MUX_CFG(DA850, LCD_D_5, 16, 16, 15, 2, false) + MUX_CFG(DA850, LCD_D_4, 16, 20, 15, 2, false) + MUX_CFG(DA850, LCD_D_3,
[PATCH v3] davinci: Add MMC/SD support for da850/omap-l138
There are two instances of MMC/SD on da850/omap-l138. Connector for the first instance is available on the EVM. This patch adds support for this instance. This patch also adds support for card detect and write protect switches on da850/omap-l138 EVM. Signed-off-by: Sudhakar Rajashekhara sudhakar@ti.com --- Since the previous version: 1. Used GPIO_TO_PIN macro to get the GPIO pin numbers. 2. Simplified get_ro and get_cd functions. 3. Removed the #ifdef macro guards both in board-da850-evm.c and da850.c files. This patch is dependent on the following patches which I have submitted earlier: [PATCH] davinci: Macro to convert GPIO signal to GPIO pin number [PATCH v3] davinci: Add platform support for da850/omap-l138 GLCD arch/arm/mach-davinci/board-da850-evm.c| 42 arch/arm/mach-davinci/da850.c | 23 +++ arch/arm/mach-davinci/devices-da8xx.c | 36 arch/arm/mach-davinci/include/mach/da8xx.h |4 ++ arch/arm/mach-davinci/include/mach/mux.h | 10 ++ 5 files changed, 115 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index b1df784..eb998ce 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c @@ -33,6 +33,9 @@ #define DA850_LCD_BL_PIN GPIO_TO_PIN(2, 15) #define DA850_LCD_PWR_PIN GPIO_TO_PIN(8, 10) +#define DA850_MMCSD_CD_PIN GPIO_TO_PIN(4, 0) +#define DA850_MMCSD_WP_PIN GPIO_TO_PIN(4, 1) + static struct davinci_i2c_platform_data da850_evm_i2c_0_pdata = { .bus_freq = 100, /* kHz */ .bus_delay = 0,/* usec */ @@ -63,6 +66,23 @@ static struct snd_platform_data da850_evm_snd_data = { .rxnumevt = 1, }; +static int da850_evm_mmc_get_ro(int index) +{ + return gpio_get_value(DA850_MMCSD_WP_PIN); +} + +static int da850_evm_mmc_get_cd(int index) +{ + return !gpio_get_value(DA850_MMCSD_CD_PIN); +} + +static struct davinci_mmc_config da850_mmc_config = { + .get_ro = da850_evm_mmc_get_ro, + .get_cd = da850_evm_mmc_get_cd, + .wires = 4, + .version= MMC_CTLR_VERSION_2, +}; + static int da850_lcd_hw_init(void) { int status; @@ -134,6 +154,28 @@ static __init void da850_evm_init(void) pr_warning(da830_evm_init: watchdog registration failed: %d\n, ret); + ret = da8xx_pinmux_setup(da850_mmcsd0_pins); + if (ret) + pr_warning(da850_evm_init: mmcsd0 mux setup failed: %d\n, + ret); + + ret = gpio_request(DA850_MMCSD_CD_PIN, MMC CD\n); + if (ret) + pr_warning(da850_evm_init: can not open GPIO %d\n, + DA850_MMCSD_CD_PIN); + gpio_direction_input(DA850_MMCSD_CD_PIN); + + ret = gpio_request(DA850_MMCSD_WP_PIN, MMC WP\n); + if (ret) + pr_warning(da850_evm_init: can not open GPIO %d\n, + DA850_MMCSD_WP_PIN); + gpio_direction_input(DA850_MMCSD_WP_PIN); + + ret = da8xx_register_mmcsd0(da850_mmc_config); + if (ret) + pr_warning(da850_evm_init: mmcsd0 registration failed: %d\n, + ret); + davinci_serial_init(da850_evm_uart_config); /* diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c index e6e605b..9debd57 100644 --- a/arch/arm/mach-davinci/da850.c +++ b/arch/arm/mach-davinci/da850.c @@ -304,6 +304,12 @@ static struct clk lcdc_clk = { .psc_ctlr = 1, }; +static struct clk mmcsd_clk = { + .name = mmcsd, + .parent = pll0_sysclk2, + .lpsc = DA8XX_LPSC0_MMC_SD, +}; + static struct davinci_clk da850_clks[] = { CLK(NULL, ref, ref_clk), CLK(NULL, pll0, pll0_clk), @@ -343,6 +349,7 @@ static struct davinci_clk da850_clks[] = { CLK(davinci_emac.1, NULL, emac_clk), CLK(davinci-mcasp.0, NULL, mcasp_clk), CLK(da8xx_lcdc.0, NULL, lcdc_clk), + CLK(davinci_mmc.0,NULL, mmcsd_clk), CLK(NULL, NULL, NULL), }; @@ -434,9 +441,18 @@ static const struct mux_config da850_pins[] = { MUX_CFG(DA850, LCD_HSYNC, 19, 0, 15, 2, false) MUX_CFG(DA850, LCD_VSYNC, 19, 4, 15, 2, false) MUX_CFG(DA850, NLCD_AC_ENB_CS, 19, 24, 15, 2, false) + /* MMC/SD0 function */ + MUX_CFG(DA850, MMCSD0_DAT_0,10, 8, 15, 2, false) + MUX_CFG(DA850, MMCSD0_DAT_1,10, 12, 15, 2, false) + MUX_CFG(DA850, MMCSD0_DAT_2,10, 16, 15, 2, false) +
[PATCH v3] davinci: Add NAND flash support for DA850/OMAP-L138
This patch adds platform data for the 512MB NAND Flash found on DA850/OMAP-L138 EVM. Currently it supports only 1-bit ECC. Signed-off-by: Sudhakar Rajashekhara sudhakar@ti.com --- Since the previous version #ifdef macro guard has been removed from the board file. This patch is dependent on the following patches which I have submitted earlier: [PATCH] davinci: Macro to convert GPIO signal to GPIO pin number [PATCH v3] davinci: Add platform support for da850/omap-l138 GLCD [PATCH v3] davinci: Add MMC/SD support for da850/omap-l138 arch/arm/mach-davinci/board-da850-evm.c| 85 arch/arm/mach-davinci/da850.c | 31 ++ arch/arm/mach-davinci/include/mach/da8xx.h |3 + arch/arm/mach-davinci/include/mach/mux.h | 16 + 4 files changed, 135 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index eb998ce..62d37cb 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c @@ -18,6 +18,10 @@ #include linux/i2c.h #include linux/i2c/at24.h #include linux/gpio.h +#include linux/platform_device.h +#include linux/mtd/mtd.h +#include linux/mtd/nand.h +#include linux/mtd/partitions.h #include asm/mach-types.h #include asm/mach/arch.h @@ -26,6 +30,7 @@ #include mach/irqs.h #include mach/cp_intc.h #include mach/da8xx.h +#include mach/nand.h #define DA850_EVM_PHY_MASK 0x1 #define DA850_EVM_MDIO_FREQUENCY 220 /* PHY bus frequency */ @@ -36,6 +41,74 @@ #define DA850_MMCSD_CD_PIN GPIO_TO_PIN(4, 0) #define DA850_MMCSD_WP_PIN GPIO_TO_PIN(4, 1) +/* DA850/OMAP-L138 EVM includes a 512 MByte large-page NAND flash + * (128K blocks). It may be used instead of the (default) SPI flash + * to boot, using TI's tools to install the secondary boot loader + * (UBL) and U-Boot. + */ +struct mtd_partition da850_evm_nandflash_partition[] = { + { + .name = u-boot env, + .offset = 0, + .size = SZ_128K, + .mask_flags = MTD_WRITEABLE, +}, + { + .name = UBL, + .offset = MTDPART_OFS_APPEND, + .size = SZ_128K, + .mask_flags = MTD_WRITEABLE, + }, + { + .name = u-boot, + .offset = MTDPART_OFS_APPEND, + .size = 4 * SZ_128K, + .mask_flags = MTD_WRITEABLE, + }, + { + .name = kernel, + .offset = 0x20, + .size = SZ_2M, + .mask_flags = 0, + }, + { + .name = filesystem, + .offset = MTDPART_OFS_APPEND, + .size = MTDPART_SIZ_FULL, + .mask_flags = 0, + }, +}; + +static struct davinci_nand_pdata da850_evm_nandflash_data = { + .parts = da850_evm_nandflash_partition, + .nr_parts = ARRAY_SIZE(da850_evm_nandflash_partition), + .ecc_mode = NAND_ECC_HW, + .options= NAND_USE_FLASH_BBT, +}; + +static struct resource da850_evm_nandflash_resource[] = { + { + .start = DA8XX_AEMIF_CS3_BASE, + .end= DA8XX_AEMIF_CS3_BASE + SZ_512K + 2 * SZ_1K - 1, + .flags = IORESOURCE_MEM, + }, + { + .start = DA8XX_AEMIF_CTL_BASE, + .end= DA8XX_AEMIF_CTL_BASE + SZ_32K - 1, + .flags = IORESOURCE_MEM, + }, +}; + +static struct platform_device da850_evm_nandflash_device = { + .name = davinci_nand, + .id = 1, + .dev= { + .platform_data = da850_evm_nandflash_data, + }, + .num_resources = ARRAY_SIZE(da850_evm_nandflash_resource), + .resource = da850_evm_nandflash_resource, +}; + static struct davinci_i2c_platform_data da850_evm_i2c_0_pdata = { .bus_freq = 100, /* kHz */ .bus_delay = 0,/* usec */ @@ -45,6 +118,10 @@ static struct davinci_uart_config da850_evm_uart_config __initdata = { .enabled_uarts = 0x7, }; +static struct platform_device *da850_evm_devices[] __initdata = { + da850_evm_nandflash_device, +}; + /* davinci da850 evm audio machine driver */ static u8 da850_iis_serializer_direction[] = { INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, @@ -120,6 +197,14 @@ static __init void da850_evm_init(void) struct davinci_soc_info *soc_info = davinci_soc_info; int ret; + ret = da8xx_pinmux_setup(da850_nand_pins); + if (ret) + pr_warning(da850_evm_init: nand mux setup failed: %d\n, + ret); + + platform_add_devices(da850_evm_devices, +
[PATCH v3] davinci: Add NOR flash support for da850/omap-l138
This patch adds platform data for the 8MB NOR flash found on da850/omap-l138 EVM. Both NOR and NAND can co-exist on da850/omap-l138 as they are using different chip selects. Signed-off-by: Sudhakar Rajashekhara sudhakar@ti.com --- Since the previous version: 1. Removed #ifdef macro guards from the board file. 2. Defined macros for CS2 offset and the value being written to this offset. 3. Value at the CS2 offset of AEMIOF is being read before writing to it. 4. Corrected the argument to ioremap() function. This patch is dependent on the following patches which I have submitted earlier: [PATCH] davinci: Macro to convert GPIO signal to GPIO pin number [PATCH v3] davinci: Add platform support for da850/omap-l138 GLCD [PATCH v3] davinci: Add MMC/SD support for da850/omap-l138 [PATCH v3] davinci: Add NAND flash support for DA850/OMAP-L138 arch/arm/mach-davinci/board-da850-evm.c| 59 arch/arm/mach-davinci/da850.c | 50 +++ arch/arm/mach-davinci/include/mach/da8xx.h |2 + arch/arm/mach-davinci/include/mach/mux.h | 34 4 files changed, 145 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index 62d37cb..70a2f48 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c @@ -22,6 +22,7 @@ #include linux/mtd/mtd.h #include linux/mtd/nand.h #include linux/mtd/partitions.h +#include linux/mtd/physmap.h #include asm/mach-types.h #include asm/mach/arch.h @@ -41,6 +42,39 @@ #define DA850_MMCSD_CD_PIN GPIO_TO_PIN(4, 0) #define DA850_MMCSD_WP_PIN GPIO_TO_PIN(4, 1) +static struct mtd_partition da850_evm_norflash_partition[] = { + { + .name = NOR filesystem, + .offset = 0, + .size = MTDPART_SIZ_FULL, + .mask_flags = 0, + }, +}; + +static struct physmap_flash_data da850_evm_norflash_data = { + .width = 2, + .parts = da850_evm_norflash_partition, + .nr_parts = ARRAY_SIZE(da850_evm_norflash_partition), +}; + +static struct resource da850_evm_norflash_resource[] = { + { + .start = DA8XX_AEMIF_CS2_BASE, + .end= DA8XX_AEMIF_CS2_BASE + SZ_32M - 1, + .flags = IORESOURCE_MEM, + }, +}; + +static struct platform_device da850_evm_norflash_device = { + .name = physmap-flash, + .id = 0, + .dev= { + .platform_data = da850_evm_norflash_data, + }, + .num_resources = 1, + .resource = da850_evm_norflash_resource, +}; + /* DA850/OMAP-L138 EVM includes a 512 MByte large-page NAND flash * (128K blocks). It may be used instead of the (default) SPI flash * to boot, using TI's tools to install the secondary boot loader @@ -120,6 +154,7 @@ static struct davinci_uart_config da850_evm_uart_config __initdata = { static struct platform_device *da850_evm_devices[] __initdata = { da850_evm_nandflash_device, + da850_evm_norflash_device, }; /* davinci da850 evm audio machine driver */ @@ -192,6 +227,23 @@ static int da850_lcd_hw_init(void) return 0; } +#define DA8XX_AEMIF_CE2CFG_OFFSET 0x10 +#define DA8XX_AEMIF_ASIZE_16BIT0x1 + +static void __init da850_evm_init_nor(void) +{ + void __iomem *aemif_addr; + + aemif_addr = ioremap(DA8XX_AEMIF_CTL_BASE, SZ_32K); + + /* Configure data bus width of CS2 to 16 bit */ + writel(readl(aemif_addr + DA8XX_AEMIF_CE2CFG_OFFSET) | + DA8XX_AEMIF_ASIZE_16BIT, + aemif_addr + DA8XX_AEMIF_CE2CFG_OFFSET); + + iounmap(aemif_addr); +} + static __init void da850_evm_init(void) { struct davinci_soc_info *soc_info = davinci_soc_info; @@ -202,6 +254,13 @@ static __init void da850_evm_init(void) pr_warning(da850_evm_init: nand mux setup failed: %d\n, ret); + ret = da8xx_pinmux_setup(da850_nor_pins); + if (ret) + pr_warning(da850_evm_init: nor mux setup failed: %d\n, + ret); + + da850_evm_init_nor(); + platform_add_devices(da850_evm_devices, ARRAY_SIZE(da850_evm_devices)); diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c index db42094..192d719 100644 --- a/arch/arm/mach-davinci/da850.c +++ b/arch/arm/mach-davinci/da850.c @@ -471,6 +471,40 @@ static const struct mux_config da850_pins[] = { MUX_CFG(DA850, NEMA_CS_4, 7, 8, 15, 1, false) MUX_CFG(DA850, NEMA_WE, 7, 16, 15, 1, false) MUX_CFG(DA850, NEMA_OE, 7, 20, 15, 1, false) + MUX_CFG(DA850, EMA_A_0, 12, 28, 15,
[PATCH] davinci: Handle pinmux conflict between mmc/sd and nor flash
On DA850/OMAP-L138 EVM, MMC/SD and NOR Flash share some of the AEMIF pins. This patch prints out a warning during booting, if both MMC/SD and NOR Flash are enabled in kernel menuconfig. If both MMC/SD and NOR Flash are enabled, only MMC/SD will work correctly. Signed-off-by: Sudhakar Rajashekhara sudhakar@ti.com --- This patch is dependent on the following patches which I have submitted earlier: [PATCH] davinci: Macro to convert GPIO signal to GPIO pin number [PATCH v3] davinci: Add platform support for da850/omap-l138 GLCD [PATCH v3] davinci: Add MMC/SD support for da850/omap-l138 [PATCH v3] davinci: Add NAND flash support for DA850/OMAP-L138 [PATCH v3] davinci: Add NOR flash support for da850/omap-l138 arch/arm/mach-davinci/board-da850-evm.c | 63 -- 1 files changed, 42 insertions(+), 21 deletions(-) diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index 70a2f48..f2946a0 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c @@ -244,6 +244,20 @@ static void __init da850_evm_init_nor(void) iounmap(aemif_addr); } +#if defined(CONFIG_MTD_PHYSMAP) || \ +defined(CONFIG_MTD_PHYSMAP_MODULE) +#define HAS_NOR 1 +#else +#define HAS_NOR 0 +#endif + +#if defined(CONFIG_MMC_DAVINCI) || \ +defined(CONFIG_MMC_DAVINCI_MODULE) +#define HAS_MMC 1 +#else +#define HAS_MMC 0 +#endif + static __init void da850_evm_init(void) { struct davinci_soc_info *soc_info = davinci_soc_info; @@ -298,27 +312,34 @@ static __init void da850_evm_init(void) pr_warning(da830_evm_init: watchdog registration failed: %d\n, ret); - ret = da8xx_pinmux_setup(da850_mmcsd0_pins); - if (ret) - pr_warning(da850_evm_init: mmcsd0 mux setup failed: %d\n, - ret); - - ret = gpio_request(DA850_MMCSD_CD_PIN, MMC CD\n); - if (ret) - pr_warning(da850_evm_init: can not open GPIO %d\n, - DA850_MMCSD_CD_PIN); - gpio_direction_input(DA850_MMCSD_CD_PIN); - - ret = gpio_request(DA850_MMCSD_WP_PIN, MMC WP\n); - if (ret) - pr_warning(da850_evm_init: can not open GPIO %d\n, - DA850_MMCSD_WP_PIN); - gpio_direction_input(DA850_MMCSD_WP_PIN); - - ret = da8xx_register_mmcsd0(da850_mmc_config); - if (ret) - pr_warning(da850_evm_init: mmcsd0 registration failed: %d\n, - ret); + if (HAS_MMC) { + if (HAS_NOR) + pr_warning(WARNING: both NOR Flash and MMC/SD are + enabled, but they share AEMIF pins.\n + \tDisable one of them.\n); + + ret = da8xx_pinmux_setup(da850_mmcsd0_pins); + if (ret) + pr_warning(da850_evm_init: mmcsd0 mux setup failed: +%d\n, ret); + + ret = gpio_request(DA850_MMCSD_CD_PIN, MMC CD\n); + if (ret) + pr_warning(da850_evm_init: can not open GPIO %d\n, + DA850_MMCSD_CD_PIN); + gpio_direction_input(DA850_MMCSD_CD_PIN); + + ret = gpio_request(DA850_MMCSD_WP_PIN, MMC WP\n); + if (ret) + pr_warning(da850_evm_init: can not open GPIO %d\n, + DA850_MMCSD_WP_PIN); + gpio_direction_input(DA850_MMCSD_WP_PIN); + + ret = da8xx_register_mmcsd0(da850_mmc_config); + if (ret) + pr_warning(da850_evm_init: mmcsd0 registration failed: +%d\n, ret); + } davinci_serial_init(da850_evm_uart_config); -- 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
RE: (no subject)
Frank, You may need to use the IMGENC APIs rather than the IMGENC1 APIs for this release of the JPEG codec. Last I checked the JPEG encoder for DM6446 used the xDM 0.9 APIs. If you can you may want to upgrade to DVSDK 2.00 which contains DMAI. The DMAI package includes sample applications for JPEG encode and decode for DM6446. At the very least this might help you see how to use the image encoder. Sincerely, Chase Maupin Software Applications Catalog DSP Products e-mail: chase.mau...@ti.com phone: (281) 274-3285 For support: Forums - http://community.ti.com/forums/ Wiki - http://wiki.davincidsp.com/ From: davinci-linux-open-source-boun...@linux.davincidsp.com [mailto:davinci-linux-open-source-boun...@linux.davincidsp.com] On Behalf Of Frank Bhattacharyya Sent: Thursday, August 13, 2009 7:27 AM To: davinci-linux-open-source@linux.davincidsp.com Subject: (no subject) Dear group, I want to integrate the DM6446 JPEG encoder (xdc.useModule('ti.sdo.codecs.jpegenc.ce.JPEGENC')) into a codec server to run on DSP side and create a matching ceapp on gpp side. We're using DVSDK 1.30.01.41 (BIOS 5.31.08, CMEM 2.00.01, CE 2.00.01, FC 2.00.01, XDAIS 6.00.01, XDC 3.00.02). Our test environment is a dvevm board plus our self designed DM6446 based boards (both using 256MB). I've used the video_copy example to setup both sides. I modified the all.tcf file from the all_codecs dir to use 32kb L1 Cache again, plus some modifications on heap/stack sizes. I have attached the server tcf cfg files (I hope attaching works) I'm currently facing following problem: Whenever I call IMGENC1_create on the engine the function returns an error (if I pass NULL as params it succeeds but I can't do any control/process calls on the encoder). I activated DSKT2 tracing and I receive the following output: [DSP] @2,399,765tk: [+0 T:0x8fa0348c] ti.sdo.fc.dskt2 - _DSKT2_init Enter [DSP] @2,399,839tk: [+0 T:0x8fa0348c] ti.sdo.fc.dskt2 - _DSKT2_init Exit [DSP] @2,399,883tk: [+0 T:0x8fa0348c] ti.sdo.fc.dskt2 - DSKT2_createAlg Enter (scratchId=1, fxns=0x8fb66a84, parentAlg=0x0, params=0x8fe05cc0) [DSP] @2,399,970tk: [+0 T:0x8fa0348c] ti.sdo.fc.dskt2 - _DSKT2_init Enter [DSP] @2,400,016tk: [+0 T:0x8fa0348c] ti.sdo.fc.dskt2 - _DSKT2_init Exit [DSP] @2,400,060tk: [+0 T:0x8fa0348c] ti.sdo.fc.dskt2 - DSKT2_createAlg3 Enter (scratchId=1, fxns=0x8fb66a84, parentAlg=0x0, params=0x8fe05cc0, extHeapId=-1881121600, singleHeap=0) [DSP] @2,400,202tk: [+2 T:0x8fa0348c] ti.sdo.fc.dskt2 - DSKT2_createAlg3 Num memory recs requested 8 [DSP] @2,400,276tk: [+2 T:0x8fa0348c] ti.sdo.fc.dskt2 - DSKT2_createAlg3 Num memory recs requested 5 [DSP] @2,400,343tk: [+4 T:0x8fa0348c] ti.sdo.fc.dskt2 - DSKT2_createAlg3 Requested memTab[0]: size=0x260, align=0x8, space=IALG_EXTERNAL, attrs=IALG_PERSIST [DSP] @2,400,434tk: [+4 T:0x8fa0348c] ti.sdo.fc.dskt2 - DSKT2_createAlg3 Requested memTab[1]: size=0xe00, align=0x8, space=IALG_EXTERNAL, attrs=IALG_SCRATCH [DSP] @2,400,522tk: [+4 T:0x8fa0348c] ti.sdo.fc.dskt2 - DSKT2_createAlg3 Requested memTab[2]: size=0x253, align=0x8, space=IALG_EXTERNAL, attrs=IALG_PERSIST [DSP] @2,400,611tk: [+4 T:0x8fa0348c] ti.sdo.fc.dskt2 - DSKT2_createAlg3 Requested memTab[3]: size=0x1400, align=0x8, space=IALG_EXTERNAL, attrs=IALG_SCRATCH [DSP] @2,400,700tk: [+4 T:0x8fa0348c] ti.sdo.fc.dskt2 - DSKT2_createAlg3 Requested memTab[4]: size=0xe54, align=0x80, space=IALG_EXTERNAL, attrs=IALG_PERSIST [DSP] @2,400,790tk: [+0 T:0x8fa0348c] ti.sdo.fc.dskt2 - _DSKT2_assignInstanceMemory Enter (scratchId=1, numRecs=5, extHeapId=1) [DSP] @2,400,868tk: [+0 T:0x8fa0348c] ti.sdo.fc.dskt2 - _DSKT2_usesInternalScratch Enter (numRecs=5) [DSP] @2,400,927tk: [+0 T:0x8fa0348c] ti.sdo.fc.dskt2 - _DSKT2_usesInternalScratch Exit (returnVal=0) [DSP] @2,400,994tk: [+0 T:0x8fa0348c] ti.sdo.fc.dskt2 - _DSKT2_allocateInDesignatedSpace Enter (index=0, ialgSpace=IALG_EXTERNAL, extHeapId=1) [DSP] @2,401,081tk: [+0 T:0x8fa0348c] ti.sdo.fc.dskt2 - _DSKT2_allocateInDesignatedSpace Exit (returnVal=1) [DSP] @2,401,145tk: [+0 T:0x8fa0348c] ti.sdo.fc.dskt2 - _DSKT2_allocateInDesignatedSpace Enter (index=1, ialgSpace=IALG_EXTERNAL, extHeapId=1) [DSP] @2,401,256tk: [+0 T:0x8fa0348c] ti.sdo.fc.dskt2 - _DSKT2_allocateInDesignatedSpace Exit (returnVal=1) [DSP] @2,401,318tk: [+0 T:0x8fa0348c] ti.sdo.fc.dskt2 - _DSKT2_allocateInDesignatedSpace Enter (index=2, ialgSpace=IALG_EXTERNAL, extHeapId=1) [DSP] @2,401,403tk: [+0 T:0x8fa0348c] ti.sdo.fc.dskt2 - _DSKT2_allocateInDesignatedSpace Exit (returnVal=1) [DSP] @2,401,466tk: [+0 T:0x8fa0348c] ti.sdo.fc.dskt2 - _DSKT2_allocateInDesignatedSpace Enter (index=3, ialgSpace=IALG_EXTERNAL, extHeapId=1) [DSP] @2,401,592tk: [+0 T:0x8fa0348c] ti.sdo.fc.dskt2 - _DSKT2_allocateInDesignatedSpace Exit (returnVal=1) [DSP] @2,401,655tk: [+0 T:0x8fa0348c] ti.sdo.fc.dskt2 - _DSKT2_allocateInDesignatedSpace Enter (index=4, ialgSpace=IALG_EXTERNAL, extHeapId=1) [DSP] @2,401,772tk:
multi NF of different geometries
Has anybody use multi nand flash devices (of different geometries such as 2K page and 4K page NF) on same DM355 board? Any ideas would be appreciated. ___ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
cmem and init_mm
Hi, The current git davinci kernels (and other architectures) do not have the init_mm exported. CMEM is using this interface. Without reexporting this in the kernel, I am unable to load cmemk module. Is there any plan to rewrite the cmemk modules working around init_mm? regards -- Ramakrishnan ___ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
Freeze on mounting filesystem with git linux-2.6.31-rc4
Guys, I have and issue testing the kernel on a evm6446, the code freezes when mounting the filesystem with GIT kernel linux-2.6.31-rc4 but there is no freeze with linux-2.6.31-rc3. Has anyone any suggestions? Kind regards James McGloin ___ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
DM355 FlashAndBoot Utils1-50
Hi Listers, We're developing a pcb based on the DM355EVM and are using a MT29F2G08 flash chip. Testing the new pcb with DM355 FlashAndBoot Utils1-10 we get a nand open error when trying to erase it: Target:DONE DONE received. Command was accepted. Target: NAND_open() failed!Starting UART Boot... Target: BOOTUBL With DM355 FlashAndBoot Utils1-50 we get: DONE received. Command was accepted. Target: Unprotecting blocks 0x0001 through 0x0031. Target: Erasing block 0x0001 through 0x0031. Target: Erase completed successfully. Target: Protecting the entire NAND flash. Target:DONE Target:DONE Operation completed successfully. The MT29F2G08 has 2K blocks so the status doesn't look right. I looked at the code in nand.c and there is an entry for DevID DA, so it appears that this chip is supported. When I try to flash in the UBL and UBOOT I get verify errors on every block. I figured we may have to modify the code so I built DM355 FlashAndBoot Utils1-50 on my WIndows XP machine without CYGWIN. I installed CCS 3.3, with the latest CG tools and some GNU Win utils for the make. I used CodeSorcery's arm-none-eabi compiler. When I run it I get the same results as when I run the precompiled code out of the box, so I assume my build is OK. Do we have bad hardware or is this chip not really supported ? Thanks, John -- Why did Kamikaze pilots wear helmets ? Dave Edison ___ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
RE: cmem and init_mm
The next CMEM release (of which I don't know the plans) should have this fixed, we have been informed of the issue. For now, you can comment out or #if 0 the function that uses it, since that function is never called. - Rob TI, Santa Barbara -Original Message- From: davinci-linux-open-source-boun...@linux.davincidsp.com [mailto:davinci-linux-open-source-boun...@linux.davincidsp.com ] On Behalf Of Ramakrishnan Muthukrishnan Sent: Thursday, August 13, 2009 10:06 AM To: davinci-linux-open-source@linux.davincidsp.com; Anderberg, Niclas Subject: cmem and init_mm Hi, The current git davinci kernels (and other architectures) do not have the init_mm exported. CMEM is using this interface. Without reexporting this in the kernel, I am unable to load cmemk module. Is there any plan to rewrite the cmemk modules working around init_mm? regards -- Ramakrishnan ___ 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: [PATCH v3] davinci: Add MMC/SD support for da850/omap-l138
Sudhakar Rajashekhara sudhakar@ti.com writes: There are two instances of MMC/SD on da850/omap-l138. Connector for the first instance is available on the EVM. This patch adds support for this instance. This patch also adds support for card detect and write protect switches on da850/omap-l138 EVM. Signed-off-by: Sudhakar Rajashekhara sudhakar@ti.com Thanks, pushing today. Kevin --- Since the previous version: 1. Used GPIO_TO_PIN macro to get the GPIO pin numbers. 2. Simplified get_ro and get_cd functions. 3. Removed the #ifdef macro guards both in board-da850-evm.c and da850.c files. This patch is dependent on the following patches which I have submitted earlier: [PATCH] davinci: Macro to convert GPIO signal to GPIO pin number [PATCH v3] davinci: Add platform support for da850/omap-l138 GLCD arch/arm/mach-davinci/board-da850-evm.c| 42 arch/arm/mach-davinci/da850.c | 23 +++ arch/arm/mach-davinci/devices-da8xx.c | 36 arch/arm/mach-davinci/include/mach/da8xx.h |4 ++ arch/arm/mach-davinci/include/mach/mux.h | 10 ++ 5 files changed, 115 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index b1df784..eb998ce 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c @@ -33,6 +33,9 @@ #define DA850_LCD_BL_PIN GPIO_TO_PIN(2, 15) #define DA850_LCD_PWR_PINGPIO_TO_PIN(8, 10) +#define DA850_MMCSD_CD_PIN GPIO_TO_PIN(4, 0) +#define DA850_MMCSD_WP_PIN GPIO_TO_PIN(4, 1) + static struct davinci_i2c_platform_data da850_evm_i2c_0_pdata = { .bus_freq = 100, /* kHz */ .bus_delay = 0,/* usec */ @@ -63,6 +66,23 @@ static struct snd_platform_data da850_evm_snd_data = { .rxnumevt = 1, }; +static int da850_evm_mmc_get_ro(int index) +{ + return gpio_get_value(DA850_MMCSD_WP_PIN); +} + +static int da850_evm_mmc_get_cd(int index) +{ + return !gpio_get_value(DA850_MMCSD_CD_PIN); +} + +static struct davinci_mmc_config da850_mmc_config = { + .get_ro = da850_evm_mmc_get_ro, + .get_cd = da850_evm_mmc_get_cd, + .wires = 4, + .version= MMC_CTLR_VERSION_2, +}; + static int da850_lcd_hw_init(void) { int status; @@ -134,6 +154,28 @@ static __init void da850_evm_init(void) pr_warning(da830_evm_init: watchdog registration failed: %d\n, ret); + ret = da8xx_pinmux_setup(da850_mmcsd0_pins); + if (ret) + pr_warning(da850_evm_init: mmcsd0 mux setup failed: %d\n, + ret); + + ret = gpio_request(DA850_MMCSD_CD_PIN, MMC CD\n); + if (ret) + pr_warning(da850_evm_init: can not open GPIO %d\n, + DA850_MMCSD_CD_PIN); + gpio_direction_input(DA850_MMCSD_CD_PIN); + + ret = gpio_request(DA850_MMCSD_WP_PIN, MMC WP\n); + if (ret) + pr_warning(da850_evm_init: can not open GPIO %d\n, + DA850_MMCSD_WP_PIN); + gpio_direction_input(DA850_MMCSD_WP_PIN); + + ret = da8xx_register_mmcsd0(da850_mmc_config); + if (ret) + pr_warning(da850_evm_init: mmcsd0 registration failed: %d\n, + ret); + davinci_serial_init(da850_evm_uart_config); /* diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c index e6e605b..9debd57 100644 --- a/arch/arm/mach-davinci/da850.c +++ b/arch/arm/mach-davinci/da850.c @@ -304,6 +304,12 @@ static struct clk lcdc_clk = { .psc_ctlr = 1, }; +static struct clk mmcsd_clk = { + .name = mmcsd, + .parent = pll0_sysclk2, + .lpsc = DA8XX_LPSC0_MMC_SD, +}; + static struct davinci_clk da850_clks[] = { CLK(NULL, ref, ref_clk), CLK(NULL, pll0, pll0_clk), @@ -343,6 +349,7 @@ static struct davinci_clk da850_clks[] = { CLK(davinci_emac.1, NULL, emac_clk), CLK(davinci-mcasp.0, NULL, mcasp_clk), CLK(da8xx_lcdc.0, NULL, lcdc_clk), + CLK(davinci_mmc.0,NULL, mmcsd_clk), CLK(NULL, NULL, NULL), }; @@ -434,9 +441,18 @@ static const struct mux_config da850_pins[] = { MUX_CFG(DA850, LCD_HSYNC, 19, 0, 15, 2, false) MUX_CFG(DA850, LCD_VSYNC, 19, 4, 15, 2, false) MUX_CFG(DA850, NLCD_AC_ENB_CS, 19, 24, 15, 2, false) + /* MMC/SD0 function */ + MUX_CFG(DA850, MMCSD0_DAT_0,10, 8, 15, 2, false) + MUX_CFG(DA850, MMCSD0_DAT_1,10, 12, 15, 2,
Re: [PATCH] davinci: Macro to convert GPIO signal to GPIO pin number
Sudhakar Rajashekhara sudhakar@ti.com writes: Adds a macro to convert the GPIO signal passed as bank number and signal to GPIO pin number. Signed-off-by: Sudhakar Rajashekhara sudhakar@ti.com Thanks, pushing today. Kevin --- arch/arm/mach-davinci/include/mach/gpio.h |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-davinci/include/mach/gpio.h b/arch/arm/mach-davinci/include/mach/gpio.h index 4f032b3..f3b8ef8 100644 --- a/arch/arm/mach-davinci/include/mach/gpio.h +++ b/arch/arm/mach-davinci/include/mach/gpio.h @@ -42,6 +42,9 @@ */ #define GPIO(X) (X) /* 0 = X = (DAVINCI_N_GPIO - 1) */ +/* Convert GPIO signal to GPIO pin number */ +#define GPIO_TO_PIN(bank, gpio) (16 * (bank) + (gpio)) + struct gpio_controller { u32 dir; u32 out_data; -- 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
Re: [PATCH v3] davinci: Add platform support for da850/omap-l138 GLCD
Sudhakar Rajashekhara sudhakar@ti.com writes: This patch adds platform support for the graphic display (Sharp LK043T1DG01) found on DA850/OMAP-L138 based EVM. Signed-off-by: Sudhakar Rajashekhara sudhakar@ti.com Thanks, pushing today. KEvin --- Since the previous version: 1. GPIO_TO_PIN macros are used to get the GPIO pin numbers. 2. Removed call to gpio_free while exiting from da850_lcd_hw_init function. This patch depends on the following patch which I have submitted earlier: [PATCH] davinci: Macro to convert GPIO signal to GPIO pin number arch/arm/mach-davinci/board-da850-evm.c| 50 +++ arch/arm/mach-davinci/da850.c | 42 arch/arm/mach-davinci/devices-da8xx.c | 59 arch/arm/mach-davinci/include/mach/da8xx.h |3 + arch/arm/mach-davinci/include/mach/mux.h | 26 5 files changed, 180 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index 52bfe4c..b1df784 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c @@ -17,6 +17,7 @@ #include linux/console.h #include linux/i2c.h #include linux/i2c/at24.h +#include linux/gpio.h #include asm/mach-types.h #include asm/mach/arch.h @@ -29,6 +30,9 @@ #define DA850_EVM_PHY_MASK 0x1 #define DA850_EVM_MDIO_FREQUENCY 220 /* PHY bus frequency */ +#define DA850_LCD_BL_PIN GPIO_TO_PIN(2, 15) +#define DA850_LCD_PWR_PINGPIO_TO_PIN(8, 10) + static struct davinci_i2c_platform_data da850_evm_i2c_0_pdata = { .bus_freq = 100, /* kHz */ .bus_delay = 0,/* usec */ @@ -59,6 +63,37 @@ static struct snd_platform_data da850_evm_snd_data = { .rxnumevt = 1, }; +static int da850_lcd_hw_init(void) +{ + int status; + + status = gpio_request(DA850_LCD_BL_PIN, lcd bl\n); + if (status 0) + return status; + + status = gpio_request(DA850_LCD_PWR_PIN, lcd pwr\n); + if (status 0) { + gpio_free(DA850_LCD_BL_PIN); + return status; + } + + gpio_direction_output(DA850_LCD_BL_PIN, 0); + gpio_direction_output(DA850_LCD_PWR_PIN, 0); + + /* disable lcd backlight */ + gpio_set_value(DA850_LCD_BL_PIN, 0); + + /* disable lcd power */ + gpio_set_value(DA850_LCD_PWR_PIN, 0); + + /* enable lcd power */ + gpio_set_value(DA850_LCD_PWR_PIN, 1); + + /* enable lcd backlight */ + gpio_set_value(DA850_LCD_BL_PIN, 1); + + return 0; +} static __init void da850_evm_init(void) { @@ -115,6 +150,21 @@ static __init void da850_evm_init(void) ret); da8xx_init_mcasp(0, da850_evm_snd_data); + + ret = da8xx_pinmux_setup(da850_lcdcntl_pins); + if (ret) + pr_warning(da850_evm_init: lcdcntl mux setup failed: %d\n, + ret); + + ret = da850_lcd_hw_init(); + if (ret) + pr_warning(da850_evm_init: lcd initialization failed: %d\n, + ret); + + ret = da8xx_register_lcdc(); + if (ret) + pr_warning(da850_evm_init: lcdc registration failed: %d\n, + ret); } #ifdef CONFIG_SERIAL_8250_CONSOLE diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c index e440c09..e6e605b 100644 --- a/arch/arm/mach-davinci/da850.c +++ b/arch/arm/mach-davinci/da850.c @@ -297,6 +297,13 @@ static struct clk mcasp_clk = { .psc_ctlr = 1, }; +static struct clk lcdc_clk = { + .name = lcdc, + .parent = pll0_sysclk2, + .lpsc = DA8XX_LPSC1_LCDC, + .psc_ctlr = 1, +}; + static struct davinci_clk da850_clks[] = { CLK(NULL, ref, ref_clk), CLK(NULL, pll0, pll0_clk), @@ -335,6 +342,7 @@ static struct davinci_clk da850_clks[] = { CLK(NULL, rmii, rmii_clk), CLK(davinci_emac.1, NULL, emac_clk), CLK(davinci-mcasp.0, NULL, mcasp_clk), + CLK(da8xx_lcdc.0, NULL, lcdc_clk), CLK(NULL, NULL, NULL), }; @@ -405,6 +413,30 @@ static const struct mux_config da850_pins[] = { MUX_CFG(DA850, AXR_2, 2, 20, 15, 1, false) MUX_CFG(DA850, AXR_1, 2, 24, 15, 1, false) MUX_CFG(DA850, AXR_0, 2, 28, 15, 1, false) + /* LCD function */ + MUX_CFG(DA850, LCD_D_7, 16, 8, 15, 2, false) + MUX_CFG(DA850, LCD_D_6, 16, 12, 15, 2, false) + MUX_CFG(DA850, LCD_D_5, 16, 16, 15, 2, false) +
Re: [PATCH v3] davinci: Add NAND flash support for DA850/OMAP-L138
Sudhakar Rajashekhara sudhakar@ti.com writes: This patch adds platform data for the 512MB NAND Flash found on DA850/OMAP-L138 EVM. Currently it supports only 1-bit ECC. Signed-off-by: Sudhakar Rajashekhara sudhakar@ti.com --- Since the previous version #ifdef macro guard has been removed from the board file. Thanks, pushing today. Kevin This patch is dependent on the following patches which I have submitted earlier: [PATCH] davinci: Macro to convert GPIO signal to GPIO pin number [PATCH v3] davinci: Add platform support for da850/omap-l138 GLCD [PATCH v3] davinci: Add MMC/SD support for da850/omap-l138 arch/arm/mach-davinci/board-da850-evm.c| 85 arch/arm/mach-davinci/da850.c | 31 ++ arch/arm/mach-davinci/include/mach/da8xx.h |3 + arch/arm/mach-davinci/include/mach/mux.h | 16 + 4 files changed, 135 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index eb998ce..62d37cb 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c @@ -18,6 +18,10 @@ #include linux/i2c.h #include linux/i2c/at24.h #include linux/gpio.h +#include linux/platform_device.h +#include linux/mtd/mtd.h +#include linux/mtd/nand.h +#include linux/mtd/partitions.h #include asm/mach-types.h #include asm/mach/arch.h @@ -26,6 +30,7 @@ #include mach/irqs.h #include mach/cp_intc.h #include mach/da8xx.h +#include mach/nand.h #define DA850_EVM_PHY_MASK 0x1 #define DA850_EVM_MDIO_FREQUENCY 220 /* PHY bus frequency */ @@ -36,6 +41,74 @@ #define DA850_MMCSD_CD_PIN GPIO_TO_PIN(4, 0) #define DA850_MMCSD_WP_PIN GPIO_TO_PIN(4, 1) +/* DA850/OMAP-L138 EVM includes a 512 MByte large-page NAND flash + * (128K blocks). It may be used instead of the (default) SPI flash + * to boot, using TI's tools to install the secondary boot loader + * (UBL) and U-Boot. + */ +struct mtd_partition da850_evm_nandflash_partition[] = { + { + .name = u-boot env, + .offset = 0, + .size = SZ_128K, + .mask_flags = MTD_WRITEABLE, + }, + { + .name = UBL, + .offset = MTDPART_OFS_APPEND, + .size = SZ_128K, + .mask_flags = MTD_WRITEABLE, + }, + { + .name = u-boot, + .offset = MTDPART_OFS_APPEND, + .size = 4 * SZ_128K, + .mask_flags = MTD_WRITEABLE, + }, + { + .name = kernel, + .offset = 0x20, + .size = SZ_2M, + .mask_flags = 0, + }, + { + .name = filesystem, + .offset = MTDPART_OFS_APPEND, + .size = MTDPART_SIZ_FULL, + .mask_flags = 0, + }, +}; + +static struct davinci_nand_pdata da850_evm_nandflash_data = { + .parts = da850_evm_nandflash_partition, + .nr_parts = ARRAY_SIZE(da850_evm_nandflash_partition), + .ecc_mode = NAND_ECC_HW, + .options= NAND_USE_FLASH_BBT, +}; + +static struct resource da850_evm_nandflash_resource[] = { + { + .start = DA8XX_AEMIF_CS3_BASE, + .end= DA8XX_AEMIF_CS3_BASE + SZ_512K + 2 * SZ_1K - 1, + .flags = IORESOURCE_MEM, + }, + { + .start = DA8XX_AEMIF_CTL_BASE, + .end= DA8XX_AEMIF_CTL_BASE + SZ_32K - 1, + .flags = IORESOURCE_MEM, + }, +}; + +static struct platform_device da850_evm_nandflash_device = { + .name = davinci_nand, + .id = 1, + .dev= { + .platform_data = da850_evm_nandflash_data, + }, + .num_resources = ARRAY_SIZE(da850_evm_nandflash_resource), + .resource = da850_evm_nandflash_resource, +}; + static struct davinci_i2c_platform_data da850_evm_i2c_0_pdata = { .bus_freq = 100, /* kHz */ .bus_delay = 0,/* usec */ @@ -45,6 +118,10 @@ static struct davinci_uart_config da850_evm_uart_config __initdata = { .enabled_uarts = 0x7, }; +static struct platform_device *da850_evm_devices[] __initdata = { + da850_evm_nandflash_device, +}; + /* davinci da850 evm audio machine driver */ static u8 da850_iis_serializer_direction[] = { INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, @@ -120,6 +197,14 @@ static __init void da850_evm_init(void) struct davinci_soc_info *soc_info = davinci_soc_info; int ret; + ret = da8xx_pinmux_setup(da850_nand_pins); + if (ret) + pr_warning(da850_evm_init: nand mux setup failed: %d\n, +
Re: [PATCH v3] davinci: Add NOR flash support for da850/omap-l138
Sudhakar Rajashekhara sudhakar@ti.com writes: This patch adds platform data for the 8MB NOR flash found on da850/omap-l138 EVM. Both NOR and NAND can co-exist on da850/omap-l138 as they are using different chip selects. Signed-off-by: Sudhakar Rajashekhara sudhakar@ti.com --- Since the previous version: 1. Removed #ifdef macro guards from the board file. 2. Defined macros for CS2 offset and the value being written to this offset. 3. Value at the CS2 offset of AEMIOF is being read before writing to it. 4. Corrected the argument to ioremap() function. Thanks, pushing today. Kevin This patch is dependent on the following patches which I have submitted earlier: [PATCH] davinci: Macro to convert GPIO signal to GPIO pin number [PATCH v3] davinci: Add platform support for da850/omap-l138 GLCD [PATCH v3] davinci: Add MMC/SD support for da850/omap-l138 [PATCH v3] davinci: Add NAND flash support for DA850/OMAP-L138 arch/arm/mach-davinci/board-da850-evm.c| 59 arch/arm/mach-davinci/da850.c | 50 +++ arch/arm/mach-davinci/include/mach/da8xx.h |2 + arch/arm/mach-davinci/include/mach/mux.h | 34 4 files changed, 145 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index 62d37cb..70a2f48 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c @@ -22,6 +22,7 @@ #include linux/mtd/mtd.h #include linux/mtd/nand.h #include linux/mtd/partitions.h +#include linux/mtd/physmap.h #include asm/mach-types.h #include asm/mach/arch.h @@ -41,6 +42,39 @@ #define DA850_MMCSD_CD_PIN GPIO_TO_PIN(4, 0) #define DA850_MMCSD_WP_PIN GPIO_TO_PIN(4, 1) +static struct mtd_partition da850_evm_norflash_partition[] = { + { + .name = NOR filesystem, + .offset = 0, + .size = MTDPART_SIZ_FULL, + .mask_flags = 0, + }, +}; + +static struct physmap_flash_data da850_evm_norflash_data = { + .width = 2, + .parts = da850_evm_norflash_partition, + .nr_parts = ARRAY_SIZE(da850_evm_norflash_partition), +}; + +static struct resource da850_evm_norflash_resource[] = { + { + .start = DA8XX_AEMIF_CS2_BASE, + .end= DA8XX_AEMIF_CS2_BASE + SZ_32M - 1, + .flags = IORESOURCE_MEM, + }, +}; + +static struct platform_device da850_evm_norflash_device = { + .name = physmap-flash, + .id = 0, + .dev= { + .platform_data = da850_evm_norflash_data, + }, + .num_resources = 1, + .resource = da850_evm_norflash_resource, +}; + /* DA850/OMAP-L138 EVM includes a 512 MByte large-page NAND flash * (128K blocks). It may be used instead of the (default) SPI flash * to boot, using TI's tools to install the secondary boot loader @@ -120,6 +154,7 @@ static struct davinci_uart_config da850_evm_uart_config __initdata = { static struct platform_device *da850_evm_devices[] __initdata = { da850_evm_nandflash_device, + da850_evm_norflash_device, }; /* davinci da850 evm audio machine driver */ @@ -192,6 +227,23 @@ static int da850_lcd_hw_init(void) return 0; } +#define DA8XX_AEMIF_CE2CFG_OFFSET0x10 +#define DA8XX_AEMIF_ASIZE_16BIT 0x1 + +static void __init da850_evm_init_nor(void) +{ + void __iomem *aemif_addr; + + aemif_addr = ioremap(DA8XX_AEMIF_CTL_BASE, SZ_32K); + + /* Configure data bus width of CS2 to 16 bit */ + writel(readl(aemif_addr + DA8XX_AEMIF_CE2CFG_OFFSET) | + DA8XX_AEMIF_ASIZE_16BIT, + aemif_addr + DA8XX_AEMIF_CE2CFG_OFFSET); + + iounmap(aemif_addr); +} + static __init void da850_evm_init(void) { struct davinci_soc_info *soc_info = davinci_soc_info; @@ -202,6 +254,13 @@ static __init void da850_evm_init(void) pr_warning(da850_evm_init: nand mux setup failed: %d\n, ret); + ret = da8xx_pinmux_setup(da850_nor_pins); + if (ret) + pr_warning(da850_evm_init: nor mux setup failed: %d\n, + ret); + + da850_evm_init_nor(); + platform_add_devices(da850_evm_devices, ARRAY_SIZE(da850_evm_devices)); diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c index db42094..192d719 100644 --- a/arch/arm/mach-davinci/da850.c +++ b/arch/arm/mach-davinci/da850.c @@ -471,6 +471,40 @@ static const struct mux_config da850_pins[] = { MUX_CFG(DA850, NEMA_CS_4, 7, 8, 15, 1, false) MUX_CFG(DA850, NEMA_WE, 7, 16, 15, 1, false)
Re: [PATCH] davinci: Handle pinmux conflict between mmc/sd and nor flash
Sudhakar Rajashekhara sudhakar@ti.com writes: On DA850/OMAP-L138 EVM, MMC/SD and NOR Flash share some of the AEMIF pins. This patch prints out a warning during booting, if both MMC/SD and NOR Flash are enabled in kernel menuconfig. If both MMC/SD and NOR Flash are enabled, only MMC/SD will work correctly. Signed-off-by: Sudhakar Rajashekhara sudhakar@ti.com --- This patch is dependent on the following patches which I have submitted earlier: [PATCH] davinci: Macro to convert GPIO signal to GPIO pin number [PATCH v3] davinci: Add platform support for da850/omap-l138 GLCD [PATCH v3] davinci: Add MMC/SD support for da850/omap-l138 [PATCH v3] davinci: Add NAND flash support for DA850/OMAP-L138 [PATCH v3] davinci: Add NOR flash support for da850/omap-l138 FYI for future reference. When you have lots of patch dependencies like this, it is simpler to send them as a series. If you use git-format-patch for a range of commits, it will automatically do the 'PATCH x/y' formatting etc. arch/arm/mach-davinci/board-da850-evm.c | 63 -- 1 files changed, 42 insertions(+), 21 deletions(-) diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index 70a2f48..f2946a0 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c @@ -244,6 +244,20 @@ static void __init da850_evm_init_nor(void) iounmap(aemif_addr); } +#if defined(CONFIG_MTD_PHYSMAP) || \ +defined(CONFIG_MTD_PHYSMAP_MODULE) +#define HAS_NOR 1 +#else +#define HAS_NOR 0 +#endif + +#if defined(CONFIG_MMC_DAVINCI) || \ +defined(CONFIG_MMC_DAVINCI_MODULE) +#define HAS_MMC 1 +#else +#define HAS_MMC 0 +#endif + static __init void da850_evm_init(void) { struct davinci_soc_info *soc_info = davinci_soc_info; @@ -298,27 +312,34 @@ static __init void da850_evm_init(void) pr_warning(da830_evm_init: watchdog registration failed: %d\n, ret); - ret = da8xx_pinmux_setup(da850_mmcsd0_pins); - if (ret) - pr_warning(da850_evm_init: mmcsd0 mux setup failed: %d\n, - ret); - - ret = gpio_request(DA850_MMCSD_CD_PIN, MMC CD\n); - if (ret) - pr_warning(da850_evm_init: can not open GPIO %d\n, - DA850_MMCSD_CD_PIN); - gpio_direction_input(DA850_MMCSD_CD_PIN); - - ret = gpio_request(DA850_MMCSD_WP_PIN, MMC WP\n); - if (ret) - pr_warning(da850_evm_init: can not open GPIO %d\n, - DA850_MMCSD_WP_PIN); - gpio_direction_input(DA850_MMCSD_WP_PIN); - - ret = da8xx_register_mmcsd0(da850_mmc_config); - if (ret) - pr_warning(da850_evm_init: mmcsd0 registration failed: %d\n, - ret); + if (HAS_MMC) { + if (HAS_NOR) + pr_warning(WARNING: both NOR Flash and MMC/SD are + enabled, but they share AEMIF pins.\n + \tDisable one of them.\n); + Hmm, this isn't quite right. MMC will never be configured unless NOR is enabled also. I think you want the WARNING inside the double-if, but the mux/gpio/init stuff to always happen. Based on init order, you should be able to report which one will not work. Kevin + ret = da8xx_pinmux_setup(da850_mmcsd0_pins); + if (ret) + pr_warning(da850_evm_init: mmcsd0 mux setup failed: + %d\n, ret); + + ret = gpio_request(DA850_MMCSD_CD_PIN, MMC CD\n); + if (ret) + pr_warning(da850_evm_init: can not open GPIO %d\n, + DA850_MMCSD_CD_PIN); + gpio_direction_input(DA850_MMCSD_CD_PIN); + + ret = gpio_request(DA850_MMCSD_WP_PIN, MMC WP\n); + if (ret) + pr_warning(da850_evm_init: can not open GPIO %d\n, + DA850_MMCSD_WP_PIN); + gpio_direction_input(DA850_MMCSD_WP_PIN); + + ret = da8xx_register_mmcsd0(da850_mmc_config); + if (ret) + pr_warning(da850_evm_init: mmcsd0 registration failed: + %d\n, ret); + } davinci_serial_init(da850_evm_uart_config); -- 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
Re: cmem and init_mm
On Fri, Aug 14, 2009 at 3:58 AM, Tivy, Robertrt...@ti.com wrote: The next CMEM release (of which I don't know the plans) should have this fixed, we have been informed of the issue. For now, you can comment out or #if 0 the function that uses it, since that function is never called. - Rob TI, Santa Barbara Thanks. -- Ramakrishnan ___ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source