Re: Setting up registers on PXA270?



A "wad extra" could save you time and money in the long run. Since you
don't have the source, you should open a discussion with the vendor about
your concerns with changing the GPIO settings. Only they have the answers
about their BSP.

--
Bruce Eitman (eMVP)
Senior Engineer
Bruce.Eitman AT EuroTech DOT com

EuroTech Inc.
www.EuroTech.com

"Steve Conner" <connermcsteve@xxxxxxxxxxxxxx> wrote in message
news:282cb8c2-dc6b-4648-8b1c-28bc571554a2@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi Paul, thanks for the reply, even though I'm not sure I understood
it :-(

I don't believe I own the source code to the BSP. It was developed by
a third party who charge a wad extra for the source. They gave us
stuff that we can build customized OS images from, but I don't know if
I can change the actual code. My driver currently resides as a
subproject in a Platform Builder OS Design project.

I don't use the GPIO as such, but the chip select line I need to use
is an alternate function of a GPIO pin. So I have to reprogram a few
GPIO registers to change the direction and function of this pin. That
only needs done once at startup.

Today I managed to get my driver to actually build with a call to
MmMapIoSpace() in it, which was a start, I suppose. Maybe tomorrow I
can run it and watch it crash without explanation ;-)

steve

On Apr 29, 4:48 pm, "Paul G. Tobey [eMVP]" <p space tobey no spam AT
no instrument no spam DOT com> wrote:
Then that's a characteristics of your Platform/BSP. That's where the
code
to configure the memory region where the DSP will be mapped should
appear.
I'd probably do it in the bootloader myself, but that's not mandatory.
You
could do it in or from a call made in OEMInit() in your platform code.

If you are *also* using GPIO to interface to this hardware, the
initialization of the direction and initial state of those pins should,
to
my way of thinking, also be set up in the same place. Since all of this
stuff is completely specific to your hardware design, you'd never use the
driver anywhere else, but I prefer to have those things set in a central
location where you can document the connection between the schematic for
the
hardware and what you're setting up the processor to do.



.



Relevant Pages

  • Re: [patch -mm 20/20 RFC] chardev: GPIO for SCx200 & PC-8736x: add sysfs-GPIO interf
    ... We need a standard rep for GPIO in sysfs, ... GPIO hardware design appears to have 2 top-level factors; ... change will also exhibit in the port attr too. ... if a pin is output only, it shouldnt have an _output_enabled attr. ...
    (Linux-Kernel)
  • [patch -mm 20/20 RFC] chardev: GPIO for SCx200 & PC-8736x: add sysfs-GPIO interface
    ... We need a standard rep for GPIO in sysfs, ... GPIO hardware design appears to have 2 top-level factors; ... change will also exhibit in the port attr too. ... if a pin is input only, it shouldnt have an _output_enabled attr. ...
    (Linux-Kernel)
  • Re: Setting up registers on PXA270?
    ... I don't believe I own the source code to the BSP. ... I don't use the GPIO as such, but the chip select line I need to use ... GPIO registers to change the direction and function of this pin. ... If you are *also* using GPIO to interface to this hardware, ...
    (microsoft.public.windowsce.platbuilder)
  • Re: [patch/rfc 2.6.19-rc5] arch-neutral GPIO calls
    ... That sounds unduly complicated compared to just using the GPIO numbers ... which are used throughout the hardware and software docs. ... Pin muxing is set up once, early, and from then on it suffices to use ... driver can can talk to the attached external hardware. ...
    (Linux-Kernel)
  • [RFC/PATCH] arch-neutral GPIO calls: AVR32 implementation [take 2]
    ... Even though it is possible to tell from the hardware whether a pin is ... set up for GPIO, I decided to use two allocation bitmasks per pio ... The pin configuration API is AVR32-specific for now. ... +int gpio_request ...
    (Linux-Kernel)