Re: [rft/rfc/patch-v2.6.29-rc5+ 05/23] usb: host: ehci: use resource helpers

2009-02-23 Thread Josh Karabin

Felipe Balbi wrote:
 Don't access pdev-resource[n].start directly, we
 can use the resource helpers for that, makes the
 code more readable.
 

[...snip...]

  
 - if (pdev-resource[1].flags != IORESOURCE_IRQ) {
 - dev_dbg(pdev-dev, resource[1] is not IORESOURCE_IRQ\n);
 - retval = -ENOMEM;
 - }
 -

Your patch description doesn't explain why you removed this code.  Was it 
intentional?  I didn't see that any of the helpers called below covered the 
case, but I didn't look too hard.

Regards,

- Josh


--
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] NAND support for OMAP3 EVM

2009-01-06 Thread Josh Karabin

This patch adds support for detecting NAND flash on OMAP3 EVM boards.
It clones similar code from the 3430 SDP board files.

Signed-off-by: Josh Karabin gkara...@vocollect.com

---
 arch/arm/configs/omap3_evm_defconfig   |   11 +++-
 arch/arm/mach-omap2/board-omap3evm-flash.c |   99 
 2 files changed, 96 insertions(+), 14 deletions(-)

diff --git a/arch/arm/configs/omap3_evm_defconfig 
b/arch/arm/configs/omap3_evm_defconfig
index e42fe8c..f276c3a 100644
--- a/arch/arm/configs/omap3_evm_defconfig
+++ b/arch/arm/configs/omap3_evm_defconfig
@@ -503,7 +503,16 @@ CONFIG_MTD_CFI_UTIL=y
 # CONFIG_MTD_DOC2000 is not set
 # CONFIG_MTD_DOC2001 is not set
 # CONFIG_MTD_DOC2001PLUS is not set
-# CONFIG_MTD_NAND is not set
+CONFIG_MTD_NAND=y
+# CONFIG_MTD_NAND_VERIFY_WRITE is not set
+# CONFIG_MTD_NAND_ECC_SMC is not set
+# CONFIG_MTD_NAND_MUSEUM_IDS is not set
+CONFIG_MTD_NAND_OMAP2=y
+CONFIG_MTD_NAND_IDS=y
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+# CONFIG_MTD_NAND_NANDSIM is not set
+# CONFIG_MTD_NAND_PLATFORM is not set
+# CONFIG_MTD_ALAUDA is not set
 CONFIG_MTD_ONENAND=y
 CONFIG_MTD_ONENAND_VERIFY_WRITE=y
 # CONFIG_MTD_ONENAND_GENERIC is not set
diff --git a/arch/arm/mach-omap2/board-omap3evm-flash.c 
b/arch/arm/mach-omap2/board-omap3evm-flash.c
index 5f3663d..b115e48 100644
--- a/arch/arm/mach-omap2/board-omap3evm-flash.c
+++ b/arch/arm/mach-omap2/board-omap3evm-flash.c
@@ -27,29 +27,29 @@ static int omap3evm_onenand_setup(void __iomem *, int freq);
 
 static struct mtd_partition omap3evm_onenand_partitions[] = {
{
-   .name   = xloader,
+   .name   = xloader-onenand,
.offset = 0,
.size   = 4*(64*2048),
.mask_flags = MTD_WRITEABLE
},
{
-   .name   = uboot,
+   .name   = uboot-onenand,
.offset = MTDPART_OFS_APPEND,
.size   =  15*(64*2048),
.mask_flags = MTD_WRITEABLE
},
{
-   .name   = params,
+   .name   = params-onenand,
.offset = MTDPART_OFS_APPEND,
.size   = 1*(64*2048),
},
{
-   .name   = linux,
+   .name   = linux-onenand,
.offset = MTDPART_OFS_APPEND,
.size   = 40*(64*2048),
},
{
-   .name   = jffs2,
+   .name   = jffs2-onenand,
.offset = MTDPART_OFS_APPEND,
.size   = MTDPART_SIZ_FULL,
},
@@ -70,6 +70,60 @@ static struct platform_device omap3evm_onenand_device = {
},
 };
 
+static struct mtd_partition omap3evm_nand_partitions[] = {
+   /* All the partition sizes are listed in terms of NAND block size */
+   {
+   .name   = xloader-nand,
+   .offset = 0,
+   .size   = 4*(128 * 1024),
+   .mask_flags = MTD_WRITEABLE
+   },
+   {
+   .name   = uboot-nand,
+   .offset = MTDPART_OFS_APPEND,
+   .size   = 14*(128 * 1024),
+   .mask_flags = MTD_WRITEABLE
+   },
+   {
+   .name   = params-nand,
+
+   .offset = MTDPART_OFS_APPEND,
+   .size   = 2*(128 * 1024)
+   },
+   {
+   .name   = linux-nand,
+   .offset = MTDPART_OFS_APPEND,
+   .size   = 40*(128 * 1024)
+   },
+   {
+   .name   = jffs2-nand,
+   .size   = MTDPART_SIZ_FULL,
+   .offset = MTDPART_OFS_APPEND,
+   },
+};
+
+static struct omap_nand_platform_data omap3evm_nand_data = {
+   .parts  = omap3evm_nand_partitions,
+   .nr_parts   = ARRAY_SIZE(omap3evm_nand_partitions),
+   .nand_setup = NULL,
+   .dma_channel= -1,   /* disable DMA in OMAP NAND driver */
+   .dev_ready  = NULL,
+};
+
+static struct resource omap3evm_nand_resource = {
+   .flags  = IORESOURCE_MEM,
+};
+
+static struct platform_device omap3evm_nand_device = {
+   .name   = omap2-nand,
+   .id = 0,
+   .dev= {
+   .platform_data  = omap3evm_nand_data,
+   },
+   .num_resources  = 1,
+   .resource   = omap3evm_nand_resource,
+};
+
 /*
  *  omap3evm_onenand_setup - Set the onenand sync mode
  *  @onenand_base:  The onenand base address in GPMC memory map
@@ -85,29 +139,48 @@ static int omap3evm_onenand_setup(void __iomem 
*onenand_base, int freq)
 void __init omap3evm_flash_init(void)
 {
u8  cs = 0;
-   u8  onenandcs = GPMC_CS_NUM + 1;
+   u8

Re: JTAG debugging of the kernel

2008-08-15 Thread Josh Karabin


Peter Barada wrote:

On Fri, 2008-08-15 at 23:04 +0530, Syed Mohammed, Khasim wrote:

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peter
Barada



Any suggestions on what can cause the JTAG to stop working after the
kernel starts?


I think you should disable Power Management. Which kernel are you using now?


2.6.22.18.  I'm planning to move to 2.6.26 after the dust settles...

I'll try w/o power management, but any idea why power management might
affect JTAG?


The guy I share an office with (who's out on vacation) worked through 
this with their tech support, who suggested replacing WFI instructions 
with NOPs.


Look at cpu_v7_do_idle in arch/arm/mm/proc-v7.S.  Changing the WFI to a 
NOP did the trick for him.


Presumably power management was off, but even WFI (wait for interrupt) 
put the CPU in a state that wasn't handled by the BDI firmware at the 
time.  I'm not sure if they resolved the issue in a later firmware 
update or not.  We didn't think the workaround was worthy of a Kconfig 
option - hopefully updated firmware for the BDI box will address the issue.



- Josh
--
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: About to tag v2.6.26-omap1, patch queue deleted, please check and repost

2008-08-06 Thread Josh Karabin


On an omap3evm with the defconfig, the kernel is failing to identify a 
jffs2 filesystem.  It's booting from NFS just fine.


I had built the latest code checked into linux-omap last week - file 
system booting had been working, IIRC.  Loading TI reference 2.6.22 
kernel finds the file system just fine as well.  I'll begin looking into 
this next week if someone else doesn't beat me to it.





Texas Instruments X-Loader 1.41

Detected Samsung MuxOneNAND1G Flash

Starting OS Bootloader...





U-Boot 1.1.4 (Jun  6 2008 - 18:25:31)



OMAP3-GP rev 2, CPU-OPP2 L3-165MHz

OMAP3EVM 1.0 Version + mPOP (Boot ONND)

DRAM:  128 MB

OneNAND Manufacturer: Samsung (0xec)

Muxed OneNAND 128MB 1.8V 16-bit (0x30)

OneNAND version = 0x0221

Scanning device for bad blocks

num of blocks = 2048

In:serial

Out:   serial

Err:   serial

Reseting CHIP... Done

LAN9x18 (0x01150002) detected.

Setting mac address: 00:50:c2:7e:86:9f

start Auto negotiation... (take ~2sec)

Auto negotiation complete, 100BaseTX, full duplex

Hit any key to stop autoboot:  0

OMAP3EVM # run boot_fs

Done

## Booting image at 8000 ...

   Image Name:   Linux-2.6.26-omap1-04784-g040378

   Image Type:   ARM Linux Kernel Image (uncompressed)

   Data Size:1515692 Bytes =  1.4 MB

   Load Address: 80008000

   Entry Point:  80008000

   Verifying Checksum ... OK

OK



Starting kernel ...



Uncompressing
Linux.
. done, booting the kernel.

5Linux version 2.6.26-omap1-04784-g040378c-dirty
([EMAIL PROTECTED]) (gcc v
ersion 4.2.1 (CodeSourcery Sourcery G++ Lite 2007q3-51)) #3 Tue Aug 5
14:45:54 E
DT 2008

CPU: ARMv7 Processor [411fc082] revision 2 (ARMv7), cr=00c5387f

Machine: OMAP3 EVM

Memory policy: ECC disabled, Data cache writeback

7On node 0 totalpages: 32768

7  DMA zone: 256 pages used for memmap

7  DMA zone: 0 pages reserved

7  DMA zone: 32512 pages, LIFO batch:7

7  Normal zone: 0 pages used for memmap

7  Movable zone: 0 pages used for memmap

6OMAP3430 ES2.2

6SRAM: Mapped pa 0x4020 to va 0xd700 size: 0x10

CPU0: D VIPT write-through cache

CPU0: cache: 768 bytes, associativity 1, 8 byte lines, 64 sets

Built 1 zonelists in Zone order, mobility grouping on.  Total pages:
32512
5Kernel command line: mem=128M console=ttyS0,115200n8 noinitrd
root=/dev/mtdbl
ock4 rw rootfstype=jffs2
ip=10.51.0.10:10.51.0.30:10.2.8.1:255.255.252.0:omap-ev
m0:eth0:on

6Clocking rate (Crystal/DPLL/ARM core): 26.0/332/500 MHz

6GPMC revision 5.0

6IRQ: Found an INTC at 0xd820 (revision 4.0) with 96 interrupts

6Total of 96 interrupts on 1 active controller

6OMAP34xx GPIO hardware version 2.5

PID hash table entries: 512 (order: 9, 2048 bytes)

Console: colour dummy device 80x30

6Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)

6Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)

6Memory: 128MB = 128MB total

5Memory: 126720KB available (2776K code, 230K data, 116K init)

7Calibrating delay loop... 498.87 BogoMIPS (lpj=1945600)

Mount-cache hash table entries: 512

6CPU: Testing write buffer coherency: ok

6net_namespace: 192 bytes

6NET: Registered protocol family 16

4Warning: L2 cache not enabled. Check your bootloader. L2 off results
in perfo
rmance loss

6OMAP DMA hardware revision 4.0

3USB: No board-specific platform config found

6i2c_omap i2c_omap.1: bus 1 rev3.12 at 2600 kHz

6i2c_omap i2c_omap.2: bus 2 rev3.12 at 400 kHz

6i2c_omap i2c_omap.3: bus 3 rev3.12 at 400 kHz

6TWL4030: TRY attach Slave TWL4030-ID0 on Adapter OMAP I2C adapter [1]

6TWL4030: TRY attach Slave TWL4030-ID1 on Adapter OMAP I2C adapter [1]

6TWL4030: TRY attach Slave TWL4030-ID2 on Adapter OMAP I2C adapter [1]

6TWL4030: TRY attach Slave TWL4030-ID3 on Adapter OMAP I2C adapter [1]

6Initialized TWL4030 USB module

5SCSI subsystem initialized

6NET: Registered protocol family 2

7Switched to high resolution mode on CPU 0

6IP route cache hash table entries: 1024 (order: 0, 4096 bytes)

6TCP established hash table entries: 4096 (order: 3, 32768 bytes)

6TCP bind hash table entries: 4096 (order: 2, 16384 bytes)

6TCP: Hash tables configured (established 4096 bind 4096)

6TCP reno registered

6NET: Registered protocol family 1

4NetWinder Floating Point Emulator V0.97 (double precision)

5VFS: Disk quotas dquot_6.5.1

Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)

6JFFS2 version 2.2. (NAND) �© 2001-2006 Red Hat, Inc.

6msgmni has been set to 247

6io scheduler noop registered

6io scheduler anticipatory registered (default)

6io scheduler deadline registered

6io scheduler cfq registered

6omapfb: configured for panel omap3evm

6omapfb: DISPC version 3.0 initialized

6omapfb: Framebuffer initialized. Total vram 614400 planes 1

6omapfb: Pixclock 24000 kHz hfreq 45.2 kHz vfreq 70.3 Hz

6Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing
enabled
6serial8250.0: ttyS0 at MMIO 0x4806a000 (irq = 72) is a 

BDI3000 JTAG debug on OMAP3

2008-07-09 Thread Josh Karabin


Is anyone using a BDI3000 JTAG debugger for kernel debug on an OMAP3 
board? An engineer on my team is evaluating the hardware, but running 
into some problems. A tip or two would be appreciated from anyone who's 
got the hardware working. We've already got a separate evaluation of a 
Lauterbach JTAG debugger working, but the BDI seems to be giving us some 
trouble. Nothing in the docs or faqs seems relevant.


He can set breakpoints in the kernel and step through code at least 
halfway through the power up printks sent to the console, but at some 
point (he's still bisecting the debug) he can no longer interactively 
halt the kernel, and his breakpoints stop getting hit. The kernel runs 
just fine, GDB is able to talk to the BDI3000 just fine, but the BDI3000 
seems like it's no longer talking to the OMAP (since halt requests timeout).


Any ideas?


Thanks,

- Josh

--
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