[PATCH] n8x0_defconfig: remove CONFIG_NILFS2_FS override
From: Francisco Alecrim francisco.alec...@openbossa.org arch/arm/configs/n8x0_defconfig:1061:warning: override: reassigning to symbol NILFS2_FS Signed-off-by: Francisco Alecrim francisco.alec...@openbossa.org --- arch/arm/configs/n8x0_defconfig |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/arch/arm/configs/n8x0_defconfig b/arch/arm/configs/n8x0_defconfig index 216ad00..9405e32 100644 --- a/arch/arm/configs/n8x0_defconfig +++ b/arch/arm/configs/n8x0_defconfig @@ -1058,7 +1058,6 @@ CONFIG_JFFS2_CMODE_PRIORITY=y # CONFIG_ROMFS_FS is not set # CONFIG_SYSV_FS is not set # CONFIG_UFS_FS is not set -# CONFIG_NILFS2_FS is not set CONFIG_NETWORK_FILESYSTEMS=y # CONFIG_NFS_FS is not set # CONFIG_NFSD is not set -- 1.6.3.3 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2] board-n8x0: add USB initialization
From: Francisco Alecrim francisco.alec...@openbossa.org Based on Kalle's and Tony's patches. Some variables re-organized and unused code remove(68499cc5716bbeca16ca8c83ec6e9f04b8dbfacb). Signed-off-by: Kalle Valo kalle.v...@iki.fi Signed-off-by: Francisco Alecrim francisco.alec...@openbossa.org Signed-off-by: Tony Lindgren t...@atomide.com --- arch/arm/mach-omap2/board-n8x0.c | 92 ++ arch/arm/mach-omap2/clock2420_data.c |1 + include/linux/usb/musb.h |4 ++ 3 files changed, 97 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c index ee548dd..79d659a 100644 --- a/arch/arm/mach-omap2/board-n8x0.c +++ b/arch/arm/mach-omap2/board-n8x0.c @@ -32,6 +32,97 @@ #include plat/serial.h #include plat/cbus.h +#if defined(CONFIG_USB_TUSB6010) || \ + defined(CONFIG_USB_TUSB6010_MODULE) +/* + * Enable or disable power to TUSB6010. When enabling, turn on 3.3 V and + * 1.5 V voltage regulators of PM companion chip. Companion chip will then + * provide then PGOOD signal to TUSB6010 which will release it from reset. + */ +static int tusb_set_power(int state) +{ + int i, retval = 0; + + if (state) { + gpio_set_value(TUSB6010_GPIO_ENABLE, 1); + msleep(1); + + /* Wait until TUSB6010 pulls INT pin down */ + i = 100; + while (i gpio_get_value(TUSB6010_GPIO_INT)) { + msleep(1); + i--; + } + + if (!i) { + printk(KERN_ERR tusb: powerup failed\n); + retval = -ENODEV; + } + } else { + gpio_set_value(TUSB6010_GPIO_ENABLE, 0); + msleep(10); + } + + return retval; +} + +static struct musb_hdrc_config musb_config = { + .multipoint = 1, + .dyn_fifo = 1, + .num_eps= 16, + .ram_bits = 12, +}; + +static struct musb_hdrc_platform_data tusb_data = { +#if defined(CONFIG_USB_MUSB_OTG) + .mode = MUSB_OTG, +#elif defined(CONFIG_USB_MUSB_PERIPHERAL) + .mode = MUSB_PERIPHERAL, +#else /* defined(CONFIG_USB_MUSB_HOST) */ + .mode = MUSB_HOST, +#endif + .set_power = tusb_set_power, + .min_power = 25, /* x2 = 50 mA drawn from VBUS as peripheral */ + .power = 100, /* Max 100 mA VBUS for host mode */ + .config = musb_config, +}; + +static void __init n8x0_usb_init(void) +{ + int ret = 0; + static char announce[] __initdata = KERN_INFO TUSB 6010\n; + + /* PM companion chip power control pin */ + ret = gpio_request(TUSB6010_GPIO_ENABLE, TUSB6010 enable); + if (ret != 0) { + printk(KERN_ERR Could not get TUSB power GPIO%i\n, + TUSB6010_GPIO_ENABLE); + return; + } + gpio_direction_output(TUSB6010_GPIO_ENABLE, 0); + + tusb_set_power(0); + + ret = tusb6010_setup_interface(tusb_data, TUSB6010_REFCLK_19, 2, + TUSB6010_ASYNC_CS, TUSB6010_SYNC_CS, + TUSB6010_GPIO_INT, 0x3f); + if (ret != 0) + goto err; + + printk(announce); + + return; + +err: + gpio_free(TUSB6010_GPIO_ENABLE); +} +#else + +static void __init n8x0_usb_init(void) {} + +#endif /*CONFIG_USB_TUSB6010 */ + + static struct omap2_mcspi_device_config p54spi_mcspi_config = { .turbo_mode = 0, .single_channel = 1, @@ -148,6 +239,7 @@ static void __init n8x0_init_machine(void) omap_serial_init(); n8x0_onenand_init(); + n8x0_usb_init(); } MACHINE_START(NOKIA_N800, Nokia N800) diff --git a/arch/arm/mach-omap2/clock2420_data.c b/arch/arm/mach-omap2/clock2420_data.c index f12af95..d932b14 100644 --- a/arch/arm/mach-omap2/clock2420_data.c +++ b/arch/arm/mach-omap2/clock2420_data.c @@ -1841,6 +1841,7 @@ static struct omap_clk omap2420_clks[] = { CLK(NULL, aes_ick, aes_ick, CK_242X), CLK(NULL, pka_ick, pka_ick, CK_242X), CLK(NULL, usb_fck, usb_fck, CK_242X), + CLK(musb_hdrc,fck, osc_ck,CK_242X), }; /* diff --git a/include/linux/usb/musb.h b/include/linux/usb/musb.h index 3fdeef5..c281ce0 100644 --- a/include/linux/usb/musb.h +++ b/include/linux/usb/musb.h @@ -98,6 +98,10 @@ struct musb_hdrc_platform_data { #defineTUSB6010_OSCCLK_60 16667 /* psec/clk @ 60.0 MHz */ #defineTUSB6010_REFCLK_24 41667 /* psec/clk @ 24.0 MHz XI */ #defineTUSB6010_REFCLK_19 52083 /* psec/clk @ 19.2 MHz CLKIN */ +#define TUSB6010_ASYNC_CS 1 +#define TUSB6010_SYNC_CS 4 +#define TUSB6010_GPIO_INT 58 +#define TUSB6010_GPIO_ENABLE 0 #ifdef CONFIG_ARCH_OMAP2 -- 1.6.3.3
Re: [PATCH] board-n8x0: add USB initialization
On Sun, Feb 28, 2010 at 2:57 PM, Kalle Valo kalle.v...@iki.fi wrote: Hi Francisco, Francisco Alecrim alec...@gmail.com writes: From: Francisco Alecrim francisco.alec...@openbossa.org Signed-off-by: Kalle Valo kalle.v...@iki.fi Signed-off-by: Francisco Alecrim francisco.alec...@openbossa.org Signed-off-by: Tony Lindgren t...@atomide.com Please do not add my Signed-off-by unless I have explicitly added it. And I don't recall giving it to this patch, so it can be removed. I got the initial code from http://www.valot.fi/kalle/n8x0/patches/n8x0-add/2009-07-31-12:15/07-n8x0-add-usb-support.patch . I just re-organized some variables. So I didn't remove your Signed-off-by. And I merged your patch to Tony's code http://www.mail-archive.com/linux-omap@vger.kernel.org/msg21443.html . So I kept his Signed-off-by. Removing the line doesn't change anything from technical point of view, this is just a little bit of legalise we have to deal with. Sorry! I was not sure about keep or not these Signed-off-by. Do you want me to re-send it without your Signed-off-by? Regards, Alecrim. -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] board-n8x0: add USB initialization
From: Francisco Alecrim francisco.alec...@openbossa.org Signed-off-by: Kalle Valo kalle.v...@iki.fi Signed-off-by: Francisco Alecrim francisco.alec...@openbossa.org Signed-off-by: Tony Lindgren t...@atomide.com --- arch/arm/mach-omap2/board-n8x0.c | 126 ++ arch/arm/mach-omap2/clock2420_data.c |1 + include/linux/usb/musb.h |4 + 3 files changed, 131 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c index ee548dd..e1c0c71 100644 --- a/arch/arm/mach-omap2/board-n8x0.c +++ b/arch/arm/mach-omap2/board-n8x0.c @@ -32,6 +32,131 @@ #include plat/serial.h #include plat/cbus.h + +#if defined(CONFIG_USB_MUSB_OTG) +#define BOARD_MODE MUSB_OTG +#elif defined(CONFIG_USB_MUSB_PERIPHERAL) +#define BOARD_MODE MUSB_PERIPHERAL +#else /* defined(CONFIG_USB_MUSB_HOST) */ +#define BOARD_MODE MUSB_HOST +#endif + +/* + * Enable or disable power to TUSB6010. When enabling, turn on 3.3 V and + * 1.5 V voltage regulators of PM companion chip. Companion chip will then + * provide then PGOOD signal to TUSB6010 which will release it from reset. + */ +static int tusb_set_power(int state) +{ + int i, retval = 0; + + if (state) { + gpio_set_value(TUSB6010_GPIO_ENABLE, 1); + msleep(1); + + /* Wait until TUSB6010 pulls INT pin down */ + i = 100; + while (i gpio_get_value(TUSB6010_GPIO_INT)) { + msleep(1); + i--; + } + + if (!i) { + printk(KERN_ERR tusb: powerup failed\n); + retval = -ENODEV; + } + } else { + gpio_set_value(TUSB6010_GPIO_ENABLE, 0); + msleep(10); + } + + return retval; +} + + +static struct musb_hdrc_eps_bits musb_eps[] = { + { ep1_tx, 5,}, + { ep1_rx, 5,}, + { ep2_tx, 5,}, + { ep2_rx, 5,}, + { ep3_tx, 3,}, + { ep3_rx, 3,}, + { ep4_tx, 3,}, + { ep4_rx, 3,}, + { ep5_tx, 2,}, + { ep5_rx, 2,}, + { ep6_tx, 2,}, + { ep6_rx, 2,}, + { ep7_tx, 2,}, + { ep7_rx, 2,}, + { ep8_tx, 2,}, + { ep8_rx, 2,}, + { ep9_tx, 2,}, + { ep9_rx, 2,}, + { ep10_tx, 2, }, + { ep10_rx, 2, }, + { ep11_tx, 2, }, + { ep11_rx, 2, }, + { ep12_tx, 2, }, + { ep12_rx, 2, }, + { ep13_tx, 2, }, + { ep13_rx, 2, }, + { ep14_tx, 2, }, + { ep14_rx, 2, }, + { ep15_tx, 2, }, + { ep15_rx, 2, }, +}; + +static struct musb_hdrc_config musb_config = { + .multipoint = 1, + .dyn_fifo = 1, + .soft_con = 1, + .dma= 1, + .num_eps= 16, + .dma_channels = 7, + .ram_bits = 12, + .eps_bits = musb_eps, +}; + +static struct musb_hdrc_platform_data tusb_data = { + .mode = BOARD_MODE, + .set_power = tusb_set_power, + .min_power = 25, /* x2 = 50 mA drawn from VBUS as peripheral */ + .power = 100, /* Max 100 mA VBUS for host mode */ + .config = musb_config, +}; + +static void __init n8x0_usb_init(void) +{ + int ret = 0; + static char announce[] __initdata = KERN_INFO TUSB 6010\n; + + /* PM companion chip power control pin */ + ret = gpio_request(TUSB6010_GPIO_ENABLE, TUSB6010 enable); + if (ret != 0) { + printk(KERN_ERR Could not get TUSB power GPIO%i\n, + TUSB6010_GPIO_ENABLE); + return; + } + gpio_direction_output(TUSB6010_GPIO_ENABLE, 0); + + tusb_set_power(0); + + ret = tusb6010_setup_interface(tusb_data, TUSB6010_REFCLK_19, 2, + TUSB6010_ASYNC_CS, TUSB6010_SYNC_CS, + TUSB6010_GPIO_INT, 0x3f); + if (ret != 0) + goto err; + + printk(announce); + + return; + +err: + gpio_free(TUSB6010_GPIO_ENABLE); +} + + static struct omap2_mcspi_device_config p54spi_mcspi_config = { .turbo_mode = 0, .single_channel = 1, @@ -148,6 +273,7 @@ static void __init n8x0_init_machine(void) omap_serial_init(); n8x0_onenand_init(); + n8x0_usb_init(); } MACHINE_START(NOKIA_N800, Nokia N800) diff --git a/arch/arm/mach-omap2/clock2420_data.c b/arch/arm/mach-omap2/clock2420_data.c index f12af95..d932b14 100644 --- a/arch/arm/mach-omap2/clock2420_data.c +++ b/arch/arm/mach-omap2/clock2420_data.c @@ -1841,6 +1841,7 @@ static struct omap_clk omap2420_clks
Re: problem with n810 boot up
Luke-Jr wrote: On Wednesday 06 January 2010 05:59:48 pm you wrote: Luke-Jr wrote: Also, note my rootfs is Gentoo, not Maemo. Maemo will depend on DSME which is not being started with my modded linuxrc. I'm using Mamona. Anyway,I did some tests before rootfs execution and I got the same problem. My current init contain only exec /bin/sh. Device just turn power-off without error message. :( Well, give me a place to push my git tree and try that :) If you have some custom changes to linux-omap kernel work correctly with N8x0+Gentoo, you can share it using http://gitorious.org/ . It's gonne be nice! -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[RFC/PATCH 1/2] usb_otg: compile fix
From: Francisco Alecrim francisco.alec...@openbossa.org include/linux/usb.h: In function 'usb_mark_last_busy': include/linux/usb.h:561: error: 'struct usb_device' has no member named 'last_busy' Option USB_OTG selects USB_SUSPEND but doesn't select PM(required by USB_SUSPEND) causing this compile error. Putting USB_SUSPEND as USB_OTG depend ensure that PM is selected. Signed-off-by: Francisco Alecrim francisco.alec...@openbossa.org --- drivers/usb/core/Kconfig |1 - drivers/usb/gadget/Kconfig |2 +- 2 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/usb/core/Kconfig b/drivers/usb/core/Kconfig index ad92594..4c7d6e8 100644 --- a/drivers/usb/core/Kconfig +++ b/drivers/usb/core/Kconfig @@ -109,7 +109,6 @@ config USB_SUSPEND config USB_OTG bool depends on USB EXPERIMENTAL - select USB_SUSPEND default n diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig index ee41120..af819fe 100644 --- a/drivers/usb/gadget/Kconfig +++ b/drivers/usb/gadget/Kconfig @@ -211,7 +211,7 @@ config USB_OMAP config USB_OTG boolean OTG Support - depends on USB_GADGET_OMAP ARCH_OMAP_OTG USB_OHCI_HCD + depends on USB_GADGET_OMAP ARCH_OMAP_OTG USB_OHCI_HCD USB_SUSPEND help The most notable feature of USB OTG is support for a Dual-Role device, which can act as either a device -- 1.6.3.3 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[RFC/PATCH 2/2] fix compile for tahvo-usb.c
From: Francisco Alecrim francisco.alec...@openbossa.org drivers/cbus/tahvo-usb.c:138: undefined reference to 'usb_bus_start_enum' usb_bus_start_enum only exported if USB_OTG enabled Signed-off-by: Francisco Alecrim francisco.alec...@openbossa.org --- drivers/cbus/tahvo-usb.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/cbus/tahvo-usb.c b/drivers/cbus/tahvo-usb.c index 9f8bbcc..762671a 100644 --- a/drivers/cbus/tahvo-usb.c +++ b/drivers/cbus/tahvo-usb.c @@ -132,12 +132,14 @@ static irqreturn_t omap_otg_irq(int irq, void *arg) } else if (otg_irq A_VBUS_ERR) { omap_writew(A_VBUS_ERR, OTG_IRQ_SRC); } else if (otg_irq DRIVER_SWITCH) { +#ifdef CONFIG_USB_OTG if ((!(omap_readl(OTG_CTRL) OTG_DRIVER_SEL)) tu-otg.host tu-otg.state == OTG_STATE_A_HOST) { /* role is host */ usb_bus_start_enum(tu-otg.host, tu-otg.host-otg_port); } +#endif omap_writew(DRIVER_SWITCH, OTG_IRQ_SRC); } else return IRQ_NONE; -- 1.6.3.3 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: problem with n810 boot up
Luke-Jr wrote: On Tuesday 05 January 2010 08:46:27 pm Francisco Alecrim wrote: Luke-Jr wrote: On Tuesday 05 January 2010 05:24:56 pm Francisco Alecrim wrote: What rootfs do you use? Did you change initfs? Gentoo. I modified my initfs to chainload its init if a new kernel is running. I don't know how to do it. Could you send me yours? Thanks! Now it goes to rootfs and continue the boot, but device power-off after 10-20 seconds. There is no error message to help. :( I did some small changes: special=false if echo -n /writetest; then exec /$(uname -r).log exec 21 /dmesg.static ls -lh /dev # ifconfig usb0 192.168.1.2 # mount -t proc proc proc # ifconfig -a # umount proc # sync if true; then echo A mount -t proc proc proc mount /dev/mmcblk0p1 /mnt/new_root || exec /bin/sh mount -t jffs2 /dev/mtdblock4 /mnt/new_root || exec /bin/sh echo B cd /mnt/new_root mkdir -p mnt/initfs echo C pivot_root . mnt/initfs echo D cd / mount sync echo E exec /usr/bin/chroot / /sbin/init exec /usr/sbin/chroot / /sbin/init fi special=true fi Thanks, Alecrim -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: problem with n810 boot up
Hi/Olá Balbi, :) Felipe Balbi wrote: Hi, On Wed, Jan 06, 2010 at 06:11:10PM -0400, Francisco Alecrim wrote: Thanks! Now it goes to rootfs and continue the boot, but device power-off after 10-20 seconds. There is no error message to help. :( watchdog ? how about disabling watchdog with flasher ?? I'm using the flags (no-omap-wd,no-retu-wd,no-lifeguard-reset) recommended by Kalle[1]. This's not the problem. :( Thanks anyway, Alecrim [1] - http://gitorious.org/stlc45xx/mainline/blobs/HEAD/README -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: problem with n810 boot up
Hi Luke, Luke-Jr wrote: On Wednesday 06 January 2010 05:02:23 pm you wrote: I'm using the flags (no-omap-wd,no-retu-wd,no-lifeguard-reset) recommended by Kalle[1]. This's not the problem. :( AFAIK, no-retu-wd disables *pinging* the retu WD (which itself cannot be disabled). I'd try removing that one. I tried with/without no-retu-wd, no-omap-wd . Also, note my rootfs is Gentoo, not Maemo. Maemo will depend on DSME which is not being started with my modded linuxrc. I'm using Mamona. Anyway,I did some tests before rootfs execution and I got the same problem. My current init contain only exec /bin/sh. Device just turn power-off without error message. :( Thanks anyway, Alecrim. -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] n8x0_defconfig: active cbus, retu-wd and omap-wd
From: Francisco Alecrim francisco.alec...@openbossa.org It's critical for correct n8x0 operation. Device turn power-off after some seconds without these options. Signed-off-by: Francisco Alecrim alec...@gmail.com --- arch/arm/configs/n8x0_defconfig | 26 +- 1 files changed, 25 insertions(+), 1 deletions(-) diff --git a/arch/arm/configs/n8x0_defconfig b/arch/arm/configs/n8x0_defconfig index e6f667c..66b1d3f 100644 --- a/arch/arm/configs/n8x0_defconfig +++ b/arch/arm/configs/n8x0_defconfig @@ -661,7 +661,19 @@ CONFIG_GPIOLIB=y # CONFIG_HWMON is not set # CONFIG_THERMAL is not set # CONFIG_THERMAL_HWMON is not set -# CONFIG_WATCHDOG is not set +CONFIG_WATCHDOG=y +# CONFIG_WATCHDOG_NOWAYOUT is not set + +# +# Watchdog Device Drivers +# +# CONFIG_SOFT_WATCHDOG is not set +CONFIG_OMAP_WATCHDOG=y + +# +# USB-based Watchdog Cards +# +# CONFIG_USBPCWATCHDOG is not set CONFIG_SSB_POSSIBLE=y # @@ -851,6 +863,18 @@ CONFIG_RTC_LIB=y # CONFIG_STAGING is not set # +# CBUS support +# +CONFIG_CBUS=y +# CONFIG_CBUS_TAHVO is not set +CONFIG_CBUS_RETU=y +# CONFIG_CBUS_RETU_USER is not set +# CONFIG_CBUS_RETU_POWERBUTTON is not set +# CONFIG_CBUS_RETU_RTC is not set +CONFIG_CBUS_RETU_WDT=y +# CONFIG_CBUS_RETU_HEADSET is not set + +# # File systems # # CONFIG_EXT2_FS is not set -- 1.6.3.3 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
problem with n810 boot up
Luke-Jr wrote: Tested on Nokia N810 in Linux-OMAP tree. Mainline is not bootable yet. Hi Luke, I'm with some problems to boot-up latest l-o(commit abb74381235a05f15a3b07e9e3831034942c67fb) with n810. The error message can be found below and full boot output in the end of email. dsme: No correct bootreason found, entering the malfunction state I'm not sure if it's related with kernel or rootfs. I tried different distros(Maemo,Angstrom,Mamona and Mer) and I got the same problem using this kernel. What rootfs do you use? Did you change initfs? Any idea/help? Thanks in advance, Alecrim. PS: 2.6.30-rc8 is the last kernel version that I got working (http://www.natisbad.org/N810/index.html) Uncompressing Linux.. done, booting the kernel. [0.00] Linux version 2.6.33-rc2-06901-gabb7438 (alec...@alecrim) (gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72) ) #53 Tue Jan 5 18:35:16 AMT 2010 [0.00] CPU: ARMv6-compatible processor [4107b362] revision 2 (ARMv6TEJ), cr=00c5387f [0.00] CPU: VIPT aliasing data cache, VIPT aliasing instruction cache [0.00] Machine: Nokia N810 [0.00] Ignoring unrecognised tag 0x414f4d50 [0.00] Memory policy: ECC disabled, Data cache writeback [0.00] OMAP2420 [0.00] [0.00] SRAM: Mapped pa 0x4020 to va 0xfe40 size: 0x10 [0.00] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512 [0.00] Kernel command line: root=1f03 rootfstype=jffs2 console=ttyS2,115200 [0.00] PID hash table entries: 512 (order: -1, 2048 bytes) [0.00] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) [0.00] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes) [0.00] Memory: 64MB 64MB = 128MB total [0.00] Memory: 127316KB available (2088K code, 184K data, 96K init, 0K highmem) [0.00] SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 [0.00] Hierarchical RCU implementation. [0.00] NR_IRQS:368 [0.00] Clocking rate (Crystal/DPLL/MPU): 19.2/658/329 MHz [0.00] GPMC revision 2.0 [0.00] IRQ: Found an INTC at 0xfa0fe000 (revision 2.0) with 96 interrupts [0.00] Total of 96 interrupts on 1 active controller [0.00] OMAP GPIO hardware version 1.8 [0.00] OMAP clockevent source: GPTIMER1 at 32000 Hz [0.00] Console: colour dummy device 80x30 [0.00] Calibrating delay loop... 320.37 BogoMIPS (lpj=1253376) [0.00] Mount-cache hash table entries: 512 [0.00] CPU: Testing write buffer coherency: ok [0.00] NET: Registered protocol family 16 [ 307.198364] OMAP DMA hardware revision 2.0 [ 307.216583] bio: create slab bio-0 at 0 [ 307.221252] usbcore: registered new interface driver usbfs [ 307.90] usbcore: registered new interface driver hub [ 307.222869] usbcore: registered new device driver usb [ 307.225250] Switching to clocksource 32k_counter [ 307.229980] musb_hdrc: version 6.0, tusb-omap-dma, peripheral, debug=0 [ 307.230895] NET: Registered protocol family 2 [ 307.231140] IP route cache hash table entries: 1024 (order: 0, 4096 bytes) [ 307.231597] TCP established hash table entries: 4096 (order: 3, 32768 bytes) [ 307.231872] TCP bind hash table entries: 4096 (order: 2, 16384 bytes) [ 307.232116] TCP: Hash tables configured (established 4096 bind 4096) [ 307.232147] TCP reno registered [ 307.232177] UDP hash table entries: 256 (order: 0, 4096 bytes) [ 307.232238] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes) [ 307.232513] NET: Registered protocol family 1 [ 307.234924] NetWinder Floating Point Emulator V0.97 (double precision) [ 307.267059] JFFS2 version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc. [ 307.269897] msgmni has been set to 248 [ 307.270019] io scheduler noop registered [ 307.271697] io scheduler cfq registered (default) [ 307.310852] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled [ 307.334625] serial8250.0: ttyS0 at MMIO 0x4806a000 (irq = 72) is a ST16654 [ 307.355895] serial8250.1: ttyS1 at MMIO 0x4806c000 (irq = 73) is a ST16654 [ 307.376953] serial8250.2: ttyS2 at MMIO 0x4806e000 (irq = 74) is a ST16654 [ 307.685607] console [ttyS2] enabled [ 307.712738] brd: module loaded [ 307.716278] OneNAND driver initializing [ 307.720794] omap2-onenand omap2-onenand: initializing on CS0, phys base 0x0400, virtual base c888 [ 307.730560] Muxed OneNAND 256MB 1.8V 16-bit (0x40) [ 307.735382] OneNAND version = 0x0022 [ 307.740570] Scanning device for bad blocks [ 307.754882] onenand_bbt_wait: ecc error = 0x, controller error 0x2440 [ 307.761840] Bad eraseblock 183 at 0x016e [ 307.836791] onenand_bbt_wait: ecc error = 0x, controller error 0x2440 [ 307.843658] Bad eraseblock 1461 at 0x0b6a [ 307.880462] Creating 5 MTD partitions on omap2-onenand: [ 307.885925]
Re: problem with n810 boot up
Hi Luke, Luke-Jr wrote: On Tuesday 05 January 2010 05:24:56 pm Francisco Alecrim wrote: Luke-Jr wrote: Tested on Nokia N810 in Linux-OMAP tree. Mainline is not bootable yet. I'm with some problems to boot-up latest l-o(commit abb74381235a05f15a3b07e9e3831034942c67fb) with n810. The error message can be found below and full boot output in the end of email. dsme: No correct bootreason found, entering the malfunction state That's DSME, part of Maemo userland. You can possibly write a LD_PRELOAD workaround if you want to run it anyway... I tried but it doesn't work. I included a line to print the /proc/bootreason value and there is no bootreason. :P cat: /proc/bootreason: No such file or directory I guess that's the problem. What rootfs do you use? Did you change initfs? Gentoo. I modified my initfs to chainload its init if a new kernel is running. I don't know how to do it. Could you send me yours? Unfortunately, I have come to the realisation that moving forward with the Linux port to N8x0 would take me more time than simply spending the same time doing paid work and buying a N900* or Pandora instead. So short some other reimbursement for porting Linux to N8x0 (like maybe a promise of BME sources or a N900 after the rest is done to finish the job), I'm probably not going to spend any more time on it. :( Maybe, you're right. Or they can produce something using a SoC cheaper than OMAP3. Luke * N900 is supposedly mostly mainlined already, and supposedly Nokia will actually finish the job with unlike N8x0; it also has nicer hardware, even if you just ignore the cellular capabilities Thank you! :) Alecrim -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
N810: problem with watchdog
Hi, I'm trying to get latest linux-omap working with N810. I got an error with watchdog(commit e7e7a613eded2732b68496f69ff8fc 34f16e1dd0) that I'm trying to solve the problem. Any idea? Thanks in advance, Alecrim. PS: RD flags : no-omap-wd, no-retu-wd, no-lifeguard-reset, serial-console . Kernel output : Timeout waiting for flashing commands Loading kernel image info... done. Loading kernel (1189 kB)... done in 60 ms (19596 kB/s) Total bootup time 2763 ms Uncompressing Linux.. done, booting the kernel. [ 0.00] Linux version 2.6.32-rc6-06432-ge7e7a61 (alec...@alecrim) (gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72) ) #10 Wed Nov 11 17:05:29 AMT 2009 [ 0.00] CPU: ARMv6-compatible processor [4107b362] revision 2 (ARMv6TEJ), cr=00c5387f [ 0.00] CPU: VIPT aliasing data cache, VIPT aliasing instruction cache [ 0.00] Machine: Nokia N810 [ 0.00] Ignoring unrecognised tag 0x414f4d50 [ 0.00] Memory policy: ECC disabled, Data cache writeback [ 0.00] BUG: mapping for 0x5800 at 0xe000 overlaps vmalloc space [ 0.00] BUG: mapping for 0x5900 at 0xe100 overlaps vmalloc space [ 0.00] BUG: mapping for 0x5a00 at 0xe200 overlaps vmalloc space [ 0.00] OMAP2420 [ 0.00] [ 0.00] SRAM: Mapped pa 0x4020 to va 0xfe40 size: 0x10 [ 0.00] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512 [ 0.00] Kernel command line: root=1f03 rootfstype=jffs2 console=ttyS2,115200n8 [ 0.00] PID hash table entries: 512 (order: -1, 2048 bytes) [ 0.00] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) [ 0.00] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes) [ 0.00] Memory: 64MB 64MB = 128MB total [ 0.00] Memory: 127316KB available (2068K code, 189K data, 104K init, 0K highmem) [ 0.00] SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 [ 0.00] Hierarchical RCU implementation. [ 0.00] NR_IRQS:368 [ 0.00] Clocking rate (Crystal/DPLL/MPU): 19.2/658/329 MHz [ 0.00] GPMC revision 2.0 [ 0.00] IRQ: Found an INTC at 0xfa0fe000 (revision 2.0) with 96 interrupts [ 0.00] Total of 96 interrupts on 1 active controller [ 0.00] OMAP GPIO hardware version 1.8 [ 0.00] OMAP clockevent source: GPTIMER1 at 32000 Hz [ 0.00] Console: colour dummy device 80x30 [ 0.00] Calibrating delay loop... 320.37 BogoMIPS (lpj=1253376) [ 0.00] Mount-cache hash table entries: 512 [ 0.00] CPU: Testing write buffer coherency: ok [ 0.00] NET: Registered protocol family 16 [ 5.921752] OMAP DMA hardware revision 2.0 [ 5.940643] bio: create slab bio-0 at 0 [ 5.945556] usbcore: registered new interface driver usbfs [ 5.946472] usbcore: registered new interface driver hub [ 5.947082] usbcore: registered new device driver usb [ 5.949523] Switching to clocksource 32k_counter [ 5.954376] musb_hdrc: version 6.0, tusb-omap-dma, peripheral, debug=0 [ 5.955291] NET: Registered protocol family 2 [ 5.955566] IP route cache hash table entries: 1024 (order: 0, 4096 bytes) [ 5.956024] TCP established hash table entries: 4096 (order: 3, 32768 bytes) [ 5.956329] TCP bind hash table entries: 4096 (order: 2, 16384 bytes) [ 5.956542] TCP: Hash tables configured (established 4096 bind 4096) [ 5.956573] TCP reno registered [ 5.956817] NET: Registered protocol family 1 [ 5.958831] NetWinder Floating Point Emulator V0.97 (double precision) [ 5.992065] JFFS2 version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc. [ 5.994750] msgmni has been set to 248 [ 5.994873] io scheduler noop registered [ 5.995849] io scheduler cfq registered (default) [ 6.035827] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled [ 6.059661] serial8250.0: ttyS0 at MMIO 0x4806a000 (irq = 72) is a ST16654 [ 6.080871] serial8250.1: ttyS1 at MMIO 0x4806c000 (irq = 73) is a ST16654 [ 6.102111] serial8250.2: ttyS2 at MMIO 0x4806e000 (irq = 74) is a ST16654 [ 6.420166] console [ttyS2] enabled [ 6.446960] brd: module loaded [ 6.450775] OneNAND driver initializing [ 6.455047] omap2-onenand omap2-onenand: initializing on CS0, phys base 0x0400, virtual base c888 [ 6.464965] Muxed OneNAND 256MB 1.8V 16-bit (0x40) [ 6.469787] OneNAND version = 0x0022 [ 6.475006] Scanning device for bad blocks [ 6.489166] onenand_bbt_wait: ecc error = 0x, controller error 0x2440 [ 6.496032] Bad eraseblock 183 at 0x016e [ 6.570098] onenand_bbt_wait: ecc error = 0x, controller error 0x2440 [ 6.576965] Bad eraseblock 1461 at 0x0b6a [ 6.613372] Creating 5 MTD partitions on omap2-onenand: [ 6.618865] 0x-0x0002 : bootloader [ 6.624938] 0x0002-0x0008 : config [ 6.630554]
[RFC PATCH 1/1] OMAP: V4L: Update videobuf-dma-sg usage on omap camera drivers
Update videobuf-dma-sg usage on omap camera drivers Signed-off-by: Francisco Alecrim [EMAIL PROTECTED] --- drivers/media/video/omap/camera_core.c |2 +- drivers/media/video/omap24xxcam.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/video/omap/camera_core.c b/drivers/media/video/omap/camera_core.c index dce47fc..eeedb36 100644 --- a/drivers/media/video/omap/camera_core.c +++ b/drivers/media/video/omap/camera_core.c @@ -916,7 +916,7 @@ static int camera_core_open(struct inode *inode, struct file *file) vidioc_int_g_fmt_cap(cam-sdev, format); spin_unlock(cam-img_lock); - videobuf_queue_pci_init(fh-vbq, cam-vbq_ops, NULL, cam-vbq_lock, + videobuf_queue_sg_init(fh-vbq, cam-vbq_ops, NULL, cam-vbq_lock, fh-type, V4L2_FIELD_NONE, sizeof(struct videobuf_buffer), fh); diff --git a/drivers/media/video/omap24xxcam.c b/drivers/media/video/omap24xxcam.c index 4308fec..dfd3479 100644 --- a/drivers/media/video/omap24xxcam.c +++ b/drivers/media/video/omap24xxcam.c @@ -1493,7 +1493,7 @@ static int omap24xxcam_open(struct inode *inode, struct file *file) spin_lock_init(fh-vbq_lock); - videobuf_queue_pci_init(fh-vbq, omap24xxcam_vbq_ops, NULL, + videobuf_queue_sg_init(fh-vbq, omap24xxcam_vbq_ops, NULL, fh-vbq_lock, V4L2_BUF_TYPE_VIDEO_CAPTURE, V4L2_FIELD_NONE, sizeof(struct videobuf_buffer), fh); -- 1.5.4.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[RFC PATCH 0/1] V4L changes
Based on commit 0705135e59f8503e4dade4b3580fed77b1743b7c. -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RFC PATCH 1/1] OMAP: V4L: Update videobuf-dma-sg usage on omap camera drivers
Hi folks, We found a similar patch sent by Tony on thread Re: linux-omap vs N810 a few hours ago. Sorry, Alecrim. Francisco Alecrim wrote: Update videobuf-dma-sg usage on omap camera drivers Signed-off-by: Francisco Alecrim [EMAIL PROTECTED] --- drivers/media/video/omap/camera_core.c |2 +- drivers/media/video/omap24xxcam.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/video/omap/camera_core.c b/drivers/media/video/omap/camera_core.c index dce47fc..eeedb36 100644 --- a/drivers/media/video/omap/camera_core.c +++ b/drivers/media/video/omap/camera_core.c @@ -916,7 +916,7 @@ static int camera_core_open(struct inode *inode, struct file *file) vidioc_int_g_fmt_cap(cam-sdev, format); spin_unlock(cam-img_lock); - videobuf_queue_pci_init(fh-vbq, cam-vbq_ops, NULL, cam-vbq_lock, + videobuf_queue_sg_init(fh-vbq, cam-vbq_ops, NULL, cam-vbq_lock, fh-type, V4L2_FIELD_NONE, sizeof(struct videobuf_buffer), fh); diff --git a/drivers/media/video/omap24xxcam.c b/drivers/media/video/omap24xxcam.c index 4308fec..dfd3479 100644 --- a/drivers/media/video/omap24xxcam.c +++ b/drivers/media/video/omap24xxcam.c @@ -1493,7 +1493,7 @@ static int omap24xxcam_open(struct inode *inode, struct file *file) spin_lock_init(fh-vbq_lock); - videobuf_queue_pci_init(fh-vbq, omap24xxcam_vbq_ops, NULL, + videobuf_queue_sg_init(fh-vbq, omap24xxcam_vbq_ops, NULL, fh-vbq_lock, V4L2_BUF_TYPE_VIDEO_CAPTURE, V4L2_FIELD_NONE, sizeof(struct videobuf_buffer), fh); -- Francisco Keppler Silva Alecrim - INdT Phone: +55 92 2126-1017 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/1] Add MMC support for OMAP3 EVM
ext Steve Sakoman wrote: From: Steve Sakoman [EMAIL PROTECTED] Add MMC support for OMAP3 EVM Signed-off-by: Steve Sakoman [EMAIL PROTECTED] Acked-by: Francisco Alecrim [EMAIL PROTECTED] I did not test, but it should work. :) --- Makefile |3 ++- board-omap3evm.c | 10 ++ 2 files changed, 12 insertions(+), 1 deletion(-) diff -uprN a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c --- a/arch/arm/mach-omap2/board-omap3evm.c 2008-04-26 06:32:12.0 -0700 +++ b/arch/arm/mach-omap2/board-omap3evm.c 2008-04-26 22:17:03.0 -0700 @@ -27,6 +27,7 @@ #include asm/arch/gpio.h #include asm/arch/board.h +#include asm/arch/hsmmc.h #include asm/arch/common.h static struct omap_uart_config omap3_evm_uart_config __initdata = { @@ -40,6 +41,13 @@ static int __init omap3_evm_i2c_init(voi omap_register_i2c_bus(3, 400, NULL, 0); return 0; } + +static struct omap_mmc_config omap3_evm_mmc_config __initdata = { + .mmc [0] = { + .enabled= 1, + .wire4 = 1, + }, +}; static void __init omap3_evm_init_irq(void) { @@ -50,6 +58,7 @@ static void __init omap3_evm_init_irq(vo static struct omap_board_config_kernel omap3_evm_config[] __initdata = { { OMAP_TAG_UART,omap3_evm_uart_config }, + { OMAP_TAG_MMC, omap3_evm_mmc_config }, }; static void __init omap3_evm_init(void) @@ -57,6 +66,7 @@ static void __init omap3_evm_init(void) omap_board_config = omap3_evm_config; omap_board_config_size = ARRAY_SIZE(omap3_evm_config); omap_serial_init(); + hsmmc_init(); } arch_initcall(omap3_evm_i2c_init); diff -uprN a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile --- a/arch/arm/mach-omap2/Makefile 2008-04-26 06:32:12.0 -0700 +++ b/arch/arm/mach-omap2/Makefile 2008-04-26 22:17:03.0 -0700 @@ -37,7 +37,8 @@ obj-$(CONFIG_MACH_OMAP_3430SDP) += boar usb-musb.o \ usb-ehci.o \ board-3430sdp-flash.o -obj-$(CONFIG_MACH_OMAP3EVM)+= board-omap3evm.o +obj-$(CONFIG_MACH_OMAP3EVM)+= board-omap3evm.o \ + hsmmc.o obj-$(CONFIG_MACH_OMAP3_BEAGLE)+= board-omap3beagle.o \ usb-musb.o usb-ehci.o \ hsmmc.o -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html -- Francisco Keppler Silva Alecrim - INdT Phone: +55 92 2126-1017 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/1] MMC: OMAP: Remove unnecessary extern sdp_mmc_init
From: Francisco Alecrim [EMAIL PROTECTED] Remove unnecessary extern sdp_mmc_init() at board header. New extern hsmmc_init() defined include/asm-arm/arch-omap/hsmmc.h. Signed-off-by: Francisco Alecrim [EMAIL PROTECTED] Acked-by: Carlos Eduardo Aguiar [EMAIL PROTECTED] --- include/asm-arm/arch-omap/board-2430sdp.h |1 - include/asm-arm/arch-omap/board-3430sdp.h |1 - include/asm-arm/arch-omap/board-omap3beagle.h |2 -- 3 files changed, 0 insertions(+), 4 deletions(-) diff --git a/include/asm-arm/arch-omap/board-2430sdp.h b/include/asm-arm/arch-omap/board-2430sdp.h index ad682c5..b308e88 100644 --- a/include/asm-arm/arch-omap/board-2430sdp.h +++ b/include/asm-arm/arch-omap/board-2430sdp.h @@ -39,6 +39,5 @@ /* Function prototypes */ extern void sdp2430_flash_init(void); extern void sdp2430_usb_init(void); -extern void sdp_mmc_init(void); #endif /* __ASM_ARCH_OMAP_2430SDP_H */ diff --git a/include/asm-arm/arch-omap/board-3430sdp.h b/include/asm-arm/arch-omap/board-3430sdp.h index 34e878a..77f8647 100644 --- a/include/asm-arm/arch-omap/board-3430sdp.h +++ b/include/asm-arm/arch-omap/board-3430sdp.h @@ -30,7 +30,6 @@ #define __ASM_ARCH_OMAP_3430SDP_H extern void sdp3430_usb_init(void); -extern void sdp_mmc_init(void); #define DEBUG_BASE 0x0800 /* debug board */ diff --git a/include/asm-arm/arch-omap/board-omap3beagle.h b/include/asm-arm/arch-omap/board-omap3beagle.h index 782e2e5..14db589 100644 --- a/include/asm-arm/arch-omap/board-omap3beagle.h +++ b/include/asm-arm/arch-omap/board-omap3beagle.h @@ -29,8 +29,6 @@ #ifndef __ASM_ARCH_OMAP3_BEAGLE_H #define __ASM_ARCH_OMAP3_BEAGLE_H -extern void sdp_mmc_init(void); - #define TWL4030_IRQNUM INT_34XX_SYS_NIRQ #endif /* __ASM_ARCH_OMAP3_BEAGLE_H */ -- 1.5.4.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RFC/PATH] OMAP: HSMMC: Fixes for 1.8V MMC2 interface
ext Seth Forshee wrote: On Tue, Apr 01, 2008 at 08:44:47PM +0530, Madhusudhan Chikkature Rajashekar wrote: Hi, I did not see any board level code to power up the second slot along with this patch. Where is the code that enables 1.8V to the second slot? I am working with a custom board that isn't supported in the git repo, and I don't have access to any other board that I could test such changes with. These are just the chages I found were necessary to support the 1.8V-only host, regardless of whatever board support is needed. That's the same problem here!! I have a custom board too!! However, pushing patches [1] and [2] we will be able to enable the second controller with some modifications in board-sdp-mmc.c. [1] - OMAP: HSMMC: Fixes for 1.8V MMC2 interface [2] - [PATCH 1/1] PLAT: OMAP: Add device configuration to support second HSMMC slot on OMAP 2430 and 3430 boards. -- Francisco Keppler Silva Alecrim - INdT Phone: +55 92 2126-1017 Mobile: +55 92 9152-7000 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] OMAP: HSMMC: Fix 1.8V MMC2 host on OMAP2430/3430
Acked-by : Francisco Alecrim [EMAIL PROTECTED] ext Seth Forshee wrote: OMAP2430/3430 contain an 1.8V-only MMC2 host that is not properly supported by the current driver. This patch contains changes to correctly set up this host. Signed-off-by: Seth Forshee [EMAIL PROTECTED] Acked-by: Francisco Alecrim [EMAIL PROTECTED] --- drivers/mmc/host/omap_hsmmc.c | 32 ++-- 1 files changed, 26 insertions(+), 6 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 248257f..d5d82a8 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -388,8 +388,12 @@ static int omap_mmc_switch_opcond(struct mmc_omap_host *host, int vdd) * If a MMC dual voltage card is detected, the set_ios fn calls * this fn with VDD bit set for 1.8V. Upon card removal from the * slot, mmc_omap_detect fn sets the VDD back to 3V. +* +* Only MMC1 supports 3.0V. MMC2 will not function if SDVS30 is +* set in HCTL. */ - if (((1 vdd) == MMC_VDD_32_33) || ((1 vdd) == MMC_VDD_33_34)) + if (host-id == OMAP_MMC1_DEVID (((1 vdd) == MMC_VDD_32_33) || + ((1 vdd) == MMC_VDD_33_34))) reg_val |= SDVS30; if ((1 vdd) == MMC_VDD_165_195) reg_val |= SDVS18; @@ -517,10 +521,16 @@ mmc_omap_start_dma_transfer(struct mmc_omap_host *host, struct mmc_request *req) if (!(data-flags MMC_DATA_WRITE)) { host-dma_dir = DMA_FROM_DEVICE; - sync_dev = OMAP24XX_DMA_MMC1_RX; + if (host-id == OMAP_MMC1_DEVID) + sync_dev = OMAP24XX_DMA_MMC1_RX; + else + sync_dev = OMAP24XX_DMA_MMC2_RX; } else { host-dma_dir = DMA_TO_DEVICE; - sync_dev = OMAP24XX_DMA_MMC1_TX; + if (host-id == OMAP_MMC1_DEVID) + sync_dev = OMAP24XX_DMA_MMC1_TX; + else + sync_dev = OMAP24XX_DMA_MMC2_TX; } ret = omap_request_dma(sync_dev, MMC/SD, mmc_omap_dma_cb, @@ -692,6 +702,7 @@ static int __init omap_mmc_probe(struct platform_device *pdev) struct mmc_omap_host *host = NULL; struct resource *res; int ret = 0, irq; + u32 hctl, capa; if (pdata == NULL) { dev_err(pdev-dev, Platform Data is missing\n); @@ -778,11 +789,20 @@ static int __init omap_mmc_probe(struct platform_device *pdev) if (pdata-conf.wire4) mmc-caps |= MMC_CAP_4_BIT_DATA; + /* Only MMC1 supports 3.0V */ + if (host-id == OMAP_MMC1_DEVID) { + hctl = SDVS30; + capa = VS30 | VS18; + } else { + hctl = SDVS18; + capa = VS18; + } + OMAP_HSMMC_WRITE(host-base, HCTL, - OMAP_HSMMC_READ(host-base, HCTL) | SDVS30); + OMAP_HSMMC_READ(host-base, HCTL) | hctl); - OMAP_HSMMC_WRITE(host-base, CAPA, OMAP_HSMMC_READ(host-base, - CAPA) | VS30 | VS18); + OMAP_HSMMC_WRITE(host-base, CAPA, + OMAP_HSMMC_READ(host-base, CAPA) | capa); /* Set the controller to AUTO IDLE mode */ OMAP_HSMMC_WRITE(host-base, SYSCONFIG, -- Francisco Keppler Silva Alecrim - INdT Phone: +55 92 2126-1017 Mobile: +55 92 9152-7000 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] OMAP: HSMMC: Fix 1.8V MMC2 host on OMAP2430/3430
Acked-by : Francisco Alecrim [EMAIL PROTECTED] ext Seth Forshee wrote: OMAP2430/3430 contain an 1.8V-only MMC2 host that is not properly supported by the current driver. This patch contains changes to correctly set up this host. Signed-off-by: Seth Forshee [EMAIL PROTECTED] Acked-by: Francisco Alecrim [EMAIL PROTECTED] --- drivers/mmc/host/omap_hsmmc.c | 32 ++-- 1 files changed, 26 insertions(+), 6 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 248257f..d5d82a8 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -388,8 +388,12 @@ static int omap_mmc_switch_opcond(struct mmc_omap_host *host, int vdd) * If a MMC dual voltage card is detected, the set_ios fn calls * this fn with VDD bit set for 1.8V. Upon card removal from the * slot, mmc_omap_detect fn sets the VDD back to 3V. +* +* Only MMC1 supports 3.0V. MMC2 will not function if SDVS30 is +* set in HCTL. */ - if (((1 vdd) == MMC_VDD_32_33) || ((1 vdd) == MMC_VDD_33_34)) + if (host-id == OMAP_MMC1_DEVID (((1 vdd) == MMC_VDD_32_33) || + ((1 vdd) == MMC_VDD_33_34))) reg_val |= SDVS30; if ((1 vdd) == MMC_VDD_165_195) reg_val |= SDVS18; @@ -517,10 +521,16 @@ mmc_omap_start_dma_transfer(struct mmc_omap_host *host, struct mmc_request *req) if (!(data-flags MMC_DATA_WRITE)) { host-dma_dir = DMA_FROM_DEVICE; - sync_dev = OMAP24XX_DMA_MMC1_RX; + if (host-id == OMAP_MMC1_DEVID) + sync_dev = OMAP24XX_DMA_MMC1_RX; + else + sync_dev = OMAP24XX_DMA_MMC2_RX; } else { host-dma_dir = DMA_TO_DEVICE; - sync_dev = OMAP24XX_DMA_MMC1_TX; + if (host-id == OMAP_MMC1_DEVID) + sync_dev = OMAP24XX_DMA_MMC1_TX; + else + sync_dev = OMAP24XX_DMA_MMC2_TX; } ret = omap_request_dma(sync_dev, MMC/SD, mmc_omap_dma_cb, @@ -692,6 +702,7 @@ static int __init omap_mmc_probe(struct platform_device *pdev) struct mmc_omap_host *host = NULL; struct resource *res; int ret = 0, irq; + u32 hctl, capa; if (pdata == NULL) { dev_err(pdev-dev, Platform Data is missing\n); @@ -778,11 +789,20 @@ static int __init omap_mmc_probe(struct platform_device *pdev) if (pdata-conf.wire4) mmc-caps |= MMC_CAP_4_BIT_DATA; + /* Only MMC1 supports 3.0V */ + if (host-id == OMAP_MMC1_DEVID) { + hctl = SDVS30; + capa = VS30 | VS18; + } else { + hctl = SDVS18; + capa = VS18; + } + OMAP_HSMMC_WRITE(host-base, HCTL, - OMAP_HSMMC_READ(host-base, HCTL) | SDVS30); + OMAP_HSMMC_READ(host-base, HCTL) | hctl); - OMAP_HSMMC_WRITE(host-base, CAPA, OMAP_HSMMC_READ(host-base, - CAPA) | VS30 | VS18); + OMAP_HSMMC_WRITE(host-base, CAPA, + OMAP_HSMMC_READ(host-base, CAPA) | capa); /* Set the controller to AUTO IDLE mode */ OMAP_HSMMC_WRITE(host-base, SYSCONFIG, -- Francisco Keppler Silva Alecrim - INdT Phone: +55 92 2126-1017 Mobile: +55 92 9152-7000 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html