u_long static_start versus resource_size_t

Steven A. Falco sfalco at harris.com
Wed Jun 3 14:41:23 EDT 2009


I am attempting to write a pcmcia driver for some custom hardware
based on a PPC 440EPx processor.

The pcmcia card is directly hooked to a chip select - the address
will never change.  So, I believe I should choose SS_CAP_STATIC_MAP
and pccard_static_ops.

However, I have a problem, because pccard_mem_map.static_start is
declared as u_long, but the PPC 440EPx has a 36-bit address space,
and so declares phys_addr_t as a u64.  In other words, this processor
family is somewhat unique, because the size of the address space
is not equal to the size of a u_long.

Consequently, I don't see a way to pass a 36-bit physical address
through static_start.

I think I can hack around this by setting both socket.cis_mem.res
and socket.cis_virt in my driver.  That way, when set_cis_map is
called, most everything it ordinarily would do will instead be
bypassed.  But this seems ugly and wrong.

So, has anyone else run into this?  Is my hack at all correct, or
should I attempt to work up a patch changing static_start to a
phys_addr_t or resource_size_t?

	Steve



More information about the linux-pcmcia mailing list