From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Russell King <rmk@arm•linux.org.uk>
Cc: linux-next@vger•kernel.org, Ryan Mallon <ryan@bluewatersys•com>,
Andrew Victor <linux@maxim•org.za>,
Marc Pignat <marc.pignat@hevs•ch>
Subject: linux-next: manual merge of the arm tree with the arm-current tree
Date: Mon, 16 Feb 2009 10:39:47 +1100 [thread overview]
Message-ID: <20090216103947.12d84612.sfr@canb.auug.org.au> (raw)
Hi Russell,
Today's linux-next merge of the arm tree got a conflict in
arch/arm/mach-at91/gpio.c between commit
2b768b6cdbcf7fa0761e6c35c6ea288297582c43 ("[ARM] 5391/1: AT91: Enable
GPIO clocks earlier") from the arm-current tree and commit
f373e8c0639f1720d2d0fe414990f504e113c2ba ("[ARM] 5373/2: Add gpiolib
support to AT91") from the arm tree.
Overlapping changes. I fixed it up as below (which may not be correct,
so needs checking) and can carry the fix for a while.
--
Cheers,
Stephen Rothwell sfr@canb•auug.org.au
http://www.canb.auug.org.au/~sfr/
diff --cc arch/arm/mach-at91/gpio.c
index 2f7d497,028e4f7..0000000
--- a/arch/arm/mach-at91/gpio.c
+++ b/arch/arm/mach-at91/gpio.c
@@@ -430,68 -437,7 +437,8 @@@ static void gpio_irq_handler(unsigned i
/*--------------------------------------------------------------------------*/
- #ifdef CONFIG_DEBUG_FS
-
- static int at91_gpio_show(struct seq_file *s, void *unused)
- {
- int bank, j;
-
- /* print heading */
- seq_printf(s, "Pin\t");
- for (bank = 0; bank < gpio_banks; bank++) {
- seq_printf(s, "PIO%c\t", 'A' + bank);
- };
- seq_printf(s, "\n\n");
-
- /* print pin status */
- for (j = 0; j < 32; j++) {
- seq_printf(s, "%i:\t", j);
-
- for (bank = 0; bank < gpio_banks; bank++) {
- unsigned pin = PIN_BASE + (32 * bank) + j;
- void __iomem *pio = pin_to_controller(pin);
- unsigned mask = pin_to_mask(pin);
-
- if (__raw_readl(pio + PIO_PSR) & mask)
- seq_printf(s, "GPIO:%s", __raw_readl(pio + PIO_PDSR) & mask ? "1" : "0");
- else
- seq_printf(s, "%s", __raw_readl(pio + PIO_ABSR) & mask ? "B" : "A");
-
- seq_printf(s, "\t");
- }
-
- seq_printf(s, "\n");
- }
-
- return 0;
- }
-
- static int at91_gpio_open(struct inode *inode, struct file *file)
- {
- return single_open(file, at91_gpio_show, NULL);
- }
-
- static const struct file_operations at91_gpio_operations = {
- .open = at91_gpio_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = single_release,
- };
-
- static int __init at91_gpio_debugfs_init(void)
- {
- /* /sys/kernel/debug/at91_gpio */
- (void) debugfs_create_file("at91_gpio", S_IFREG | S_IRUGO, NULL, NULL, &at91_gpio_operations);
- return 0;
- }
- postcore_initcall(at91_gpio_debugfs_init);
-
- #endif
-
- /*--------------------------------------------------------------------------*/
-
-/* This lock class tells lockdep that GPIO irqs are in a different
+/*
+ * This lock class tells lockdep that GPIO irqs are in a different
* category than their parents, so it won't report false recursion.
*/
static struct lock_class_key gpio_lock_class;
@@@ -502,17 -448,20 +449,17 @@@
void __init at91_gpio_irq_setup(void)
{
unsigned pioc, pin;
- struct at91_gpio_bank *this, *prev;
+ struct at91_gpio_chip *this, *prev;
- for (pioc = 0, pin = PIN_BASE, this = gpio, prev = NULL;
+ for (pioc = 0, pin = PIN_BASE, this = gpio_chip, prev = NULL;
pioc++ < gpio_banks;
prev = this, this++) {
- unsigned id = this->id;
+ unsigned id = this->bank->id;
unsigned i;
- /* enable PIO controller's clock */
- clk_enable(this->bank->clock);
-
__raw_writel(~0, this->regbase + PIO_IDR);
- for (i = 0, pin = this->chipbase; i < 32; i++, pin++) {
+ for (i = 0, pin = this->chip.base; i < 32; i++, pin++) {
lockdep_set_class(&irq_desc[pin].lock, &gpio_lock_class);
/*
@@@ -547,22 -579,21 +577,28 @@@ void __init at91_gpio_init(struct at91_
BUG_ON(nr_banks > MAX_GPIO_BANKS);
- gpio = data;
gpio_banks = nr_banks;
- for (i = 0, last = NULL; i < nr_banks; i++, last = data, data++) {
- data->chipbase = PIN_BASE + i * 32;
- data->regbase = data->offset + (void __iomem *)AT91_VA_BASE_SYS;
+ for (i = 0; i < nr_banks; i++) {
+ at91_gpio = &gpio_chip[i];
+
+ at91_gpio->bank = &data[i];
+ at91_gpio->chip.base = PIN_BASE + i * 32;
+ at91_gpio->regbase = at91_gpio->bank->offset +
+ (void __iomem *)AT91_VA_BASE_SYS;
- /* AT91SAM9263_ID_PIOCDE groups PIOC, PIOD, PIOE */
+ /* enable PIO controller's clock */
- clk_enable(data->clock);
++ clk_enable(at91_gpio->bank->clock);
+
+ /*
+ * Some processors share peripheral ID between multiple GPIO banks.
+ * SAM9263 (PIOC, PIOD, PIOE)
+ * CAP9 (PIOA, PIOB, PIOC, PIOD)
+ */
- if (last && last->id == data->id)
- last->next = data;
+ if (last && last->bank->id == at91_gpio->bank->id)
+ last->next = at91_gpio;
+ last = at91_gpio;
+
+ gpiochip_add(&at91_gpio->chip);
}
}
next reply other threads:[~2009-02-15 23:39 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-15 23:39 Stephen Rothwell [this message]
2009-02-16 0:18 ` linux-next: manual merge of the arm tree with the arm-current tree Ryan Mallon
2009-02-16 0:29 ` Russell King
-- strict thread matches above, loose matches on Subject: below --
2009-03-23 0:06 Stephen Rothwell
2009-05-06 1:32 Stephen Rothwell
2010-01-17 23:35 Stephen Rothwell
2010-01-18 1:33 ` Ben Dooks
2010-01-18 3:34 ` Stephen Rothwell
2010-02-02 0:07 Stephen Rothwell
2010-07-26 1:13 Stephen Rothwell
2010-09-27 4:21 Stephen Rothwell
2010-10-11 1:24 Stephen Rothwell
2010-10-11 7:48 ` Anders Larsen
2010-10-11 23:33 Stephen Rothwell
2010-10-12 8:03 ` Uwe Kleine-König
2010-10-12 8:28 ` Russell King
2010-10-12 9:23 ` Uwe Kleine-König
2010-10-12 9:42 ` Russell King
2010-10-12 10:02 ` Uwe Kleine-König
2010-10-12 10:35 ` Sascha Hauer
2010-12-05 23:58 Stephen Rothwell
2010-12-14 23:54 Stephen Rothwell
2010-12-14 23:57 ` Russell King
2010-12-15 12:28 ` Dave Martin
2010-12-15 16:43 ` Russell King
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=20090216103947.12d84612.sfr@canb.auug.org.au \
--to=sfr@canb$(echo .)auug.org.au \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=linux@maxim$(echo .)org.za \
--cc=marc.pignat@hevs$(echo .)ch \
--cc=rmk@arm$(echo .)linux.org.uk \
--cc=ryan@bluewatersys$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox