Skip to contentSkip to conversation

EtherNat USB working

DISCUSSION Michael Schmitz 2 participants 3 messages Jan 18, 2013 10 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): CAL4YKD53-8vz+PzdqDkzc5Wp0iWZ4hsTwiZavW5-nDdZmty6UQ@mail.gmail.com

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): CAL4YKD60xG=G=ACKuTk1vb7kAjgjuAUpC_z6-aSrMn2tX8FwWg@mail.gmail.com

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): CAL4YKD6pJ8RE80j-uHxGP7YUhjuP09a24baF8OsG0iv6Ke8bVw@mail.gmail.com

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): CAL4YKD4i38yJK8ponxTcOHMrabxytRDdFLbQU57x-3z2L1cUBw@mail.gmail.com

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): CAL4YKD6TQf6o0fzhVL5kgs76KyW6gzLZHCCSmoxDmMb3xN7WPg@mail.gmail.com

#10 lore raw

Hi David,

Quoted 1 line

Hi Michael, may be I've found something

It appears you have!

Quoted 19 lines
Quoted 4 lines

Must be something rather obvious but I can't figure it out. Maybe it's time to stop fudging with the isa_rom_* macros and bang the ROM port directly until we know how to read the chip ID.

See the code below from isp116x.h, I've added some traces in function isp116x_write_addr():

static inline void isp116x_write_addr(struct isp116x *isp116x, unsigned reg)

{
	IRQ_TEST();
	isp_writew(reg & 0xff, isp116x->addr_reg);
	if (((int)isp116x->addr_reg & 0x00000FFFUL) == 0x360)
		printk("addr_reg: 0x%08lx __pa(addr_reg):

0x%08lx\n",isp116x->addr_reg, __pa(isp116x->addr_reg));
// isp116x_delay(isp116x, 300);
}

Quoted 5 lines

This is what I'm getting for those two values:

addr_reg: 0xd0400360 __pa(addr_reg): 0xd0400360
addr_reg: 0xd0400360 __pa(addr_reg): 0xd0400360
addr_reg: 0xd0400360 __pa(addr_reg): 0xd0400360

Bugger - the __pa() does not appear to work as expected.

Quoted 3 lines

So if I'm not overlooking anything, __pa(p)<1024 is FALSE and the isa routines aren't taken.
What do you think?

You're absolutely right - is the 0xd0400360 address the same as reported by the prinkt() statements frop isp116x_probe() ?? I think there are some that report what address the data register is at.

You probably also still have that error messafe about a resource being freed that wasn't registered - does that match the same address?

Geert et al. - what's the correct way to find out what physical address corresponds to a ioremapped virtual one? addr_reg is the ioremapped 'IO port address' 0x360 that I need to pass to the isa_rom macros in order to get the ROM port access right. Seems I've tangled myself up in too many indirections here.

David - just mask off the address with 0xFFFUL if the test returns true to force the correct address on the accessors - that way we can get on with testing at least.

Cheers,

Michael

#11 lore raw

David,

Quoted 5 lines
Quoted 3 lines

addr_reg: 0xd0400360 __pa(addr_reg): 0xd0400360
addr_reg: 0xd0400360 __pa(addr_reg): 0xd0400360
addr_reg: 0xd0400360 __pa(addr_reg): 0xd0400360

Bugger - the __pa() does not appear to work as expected.

Just realized - might this be about the first page not being mapped on m68k? That's where the 0x3X0 addresses would go (if it wasn't for the ROM port special case).

Quoted 7 lines
Quoted 3 lines

So if I'm not overlooking anything, __pa(p)<1024 is FALSE and the isa routines aren't taken.
What do you think?

You're absolutely right - is the 0xd0400360 address the same as reported by the prinkt() statements frop isp116x_probe() ?? I think there are some that report what address the data register is at.

Checked my boot log and it isn't - it properly reports 0x360/0x340 there.

Quoted 2 lines

You probably also still have that error messafe about a resource being freed that wasn't registered - does that match the same address?

Different story - that's the CPLD, and I've found and corrected that one.

Quoted 5 lines

Geert et al. - what's the correct way to find out what physical address corresponds to a ioremapped virtual one? addr_reg is the ioremapped 'IO port address' 0x360 that I need to pass to the isa_rom macros in order to get the ROM port access right. Seems I've tangled myself up in too many indirections here.

What's the expected behavior if I call __pa() on something that is not actually mapped?

Cheers,

Michael

Quoted 12 lines

David - just mask off the address with 0xFFFUL if the test returns true to force the correct address on the accessors - that way we can get on with testing at least.

Cheers,

Michael
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#12 lore raw
In reply to Michael Schmitz

2013/1/18 Michael Schmitz <[email protected]>:

Quoted 33 lines

Hi David,

Quoted 1 line

Hi Michael, may be I've found something

It appears you have!

Quoted 19 lines
Quoted 4 lines

Must be something rather obvious but I can't figure it out. Maybe it's time to stop fudging with the isa_rom_* macros and bang the ROM port directly until we know how to read the chip ID.

See the code below from isp116x.h, I've added some traces in function isp116x_write_addr():

static inline void isp116x_write_addr(struct isp116x *isp116x, unsigned reg)

{
      IRQ_TEST();
      isp_writew(reg & 0xff, isp116x->addr_reg);
      if (((int)isp116x->addr_reg & 0x00000FFFUL) == 0x360)
              printk("addr_reg: 0x%08lx __pa(addr_reg):

0x%08lx\n",isp116x->addr_reg, __pa(isp116x->addr_reg));
// isp116x_delay(isp116x, 300);
}

Quoted 5 lines

This is what I'm getting for those two values:

addr_reg: 0xd0400360 __pa(addr_reg): 0xd0400360
addr_reg: 0xd0400360 __pa(addr_reg): 0xd0400360
addr_reg: 0xd0400360 __pa(addr_reg): 0xd0400360

Bugger - the __pa() does not appear to work as expected.

Quoted 8 lines
Quoted 3 lines

So if I'm not overlooking anything, __pa(p)<1024 is FALSE and the isa routines aren't taken.
What do you think?

You're absolutely right - is the 0xd0400360 address the same as reported by the prinkt() statements frop isp116x_probe() ?? I think there are some that report what address the data register is at.

ISP116X probe: data 340 virt. d0480340, addr 360 virt. d0400360

Quoted 3 lines

You probably also still have that error messafe about a resource being freed that wasn't registered - does that match the same address?

this one?

Trying to free nonexistent resource <00000000002a8e52-00000000002a8e53>

Quoted 10 lines

Geert et al. - what's the correct way to find out what physical address corresponds to a ioremapped virtual one? addr_reg is the ioremapped 'IO port address' 0x360 that I need to pass to the isa_rom macros in order to get the ROM port access right. Seems I've tangled myself up in too many indirections here.

David - just mask off the address with 0xFFFUL if the test returns true to force the correct address on the accessors - that way we can get on with testing at least.

Sure, I'll do it later today.