Re: Setting up registers on PXA270?



Then all you can do is try to adjust the functionality (alternate function
register and direction, etc.), when your driver loads. Choosing not to have
the source for the BSP was a bad decision.

Paul T.

"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: GPIO driver for pxa270
    ... Onething i know that we should register an interrupt.For that we should ... address locations for the GPIO registers. ... provide a SPI and I2C simply bus driver and could be leverage as the GPIO ... comes.So i think the gpio pin must change its status on a interrupt ...
    (microsoft.public.windowsce.platbuilder)
  • [PATCH v3] Add GPIO-based MMC/SD driver
    ... MMC/SD cards can be used on a GPIO based bus by bitbanging ... This driver provides a configfs interface to dynamically create ... The sysfs interface has been replaced by a configfs interface. ... * Driver an MMC/SD card on a bitbanging GPIO SPI bus. ...
    (Linux-Kernel)
  • Re: [patch/rfc 2/4] pcf857x I2C GPIO expander driver
    ... Since it's a new-style driver, these devices must be configured as ... with legacy drivers for these chips easier. ... The driver exposes the GPIO signals using the platform-neutral GPIO ... * GNU General Public License for more details. ...
    (Linux-Kernel)
  • [patch -mm 00/20] chardev: GPIO for SCx200 & PC8736x: Intro
    ... GPIO SUPPORT FOR SCx200 & PC8736x ... The patch-set reworks the 2.4 vintage scx200_gpio driver for modern ... The vintage driver expresses the pin capabilities with pin-mode ...
    (Linux-Kernel)
  • [PATCH v3] Bitbanging i2c bus driver using the GPIO API
    ... This is a very simple bitbanging i2c bus driver utilizing the new ... arch-neutral GPIO API. ... scl pins in open drain mode. ... * Bitbanging i2c bus driver using the GPIO API ...
    (Linux-Kernel)