All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mildred Frisco <mildred.frisco@gmail.com>
To: linux-arm@lists.arm.linux.org.uk
Cc: linux-kernel@vger.kernel.org
Subject: setting gpio on MX1
Date: Thu, 23 Dec 2004 19:14:52 +0800	[thread overview]
Message-ID: <e7b30b240412230314395fbf29@mail.gmail.com> (raw)

Hi,

I am using an MX1-based board and would like to use one of its GPIO
pins for interrupt.  I tried to initlialize it in
arch/arm/mach-xxx/arch.c  by the __fixup function. Here's the part of
the code I added ...


#include <asm/arch/mx1board-gpio.h>

/* Configure interrupt setting, for bitnum of port configured as input.
 * */
void mx1board_init_gpio(void)
{
	int i,j;
	i=mx1_register_gpio(PORT_B,17,INPUT);
	j=mx1_gpio_config_intr(PORT_B,17,POSITIVE_LEVEL);
}  

void mx1board_init_devices(void)
{
	mx1board_init_gpio();
}

static void __init
mx1skx4043_fixup(struct machine_desc *desc, struct param_struct *unused,
		 char **cmdline, struct meminfo *mi)
{
	mx1board_init_devices();
}


MACHINE_START....

-------

I've generated a kernel image but it only goes until "Uncompressing linux..."
The kernel booted successfully when this part is not included yet.

Or maybe I am initializing the gpio in the wrong place or I forgot to
call an some function.  Is the kernel console already enabled by this
time so I can see the kernel messages?

Thanks in advance,
Mildred

                 reply	other threads:[~2004-12-23 11:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e7b30b240412230314395fbf29@mail.gmail.com \
    --to=mildred.frisco@gmail.com \
    --cc=linux-arm@lists.arm.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.