RE: [PATCH 1/8] OMAP:GPIO:Move architecture specific macros to specific header

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: Tony Lindgren [mailto:tony@xxxxxxxxxxx]
> Sent: Thursday, April 01, 2010 3:11 PM
> To: Varadarajan, Charulatha
> Cc: felipe.balbi@xxxxxxxxx; linux-omap@xxxxxxxxxxxxxxx; Nayak, Rajendra;
> paul@xxxxxxxxx
> Subject: Re: [PATCH 1/8] OMAP:GPIO:Move architecture specific macros to specific
> header
> 
> * Varadarajan, Charulatha <charu@xxxxxx> [100401 01:48]:
> > >
> > > Add prefixes to these defines and remove the ifdefs.
> > > This breaks multi-omap builds.
> >
> > AFAIK multi-omap build not applicable for OMAP1
> 
> Wrong. Multi-omap for omap1 has been mostly working for
> about 5 years. In general, we don't want to apply patches
> that obviously break things like that.
> 

These macros already existed in plat/gpio.c and I just moved
it to gpio.h. It was not newly introduced by me.

Please point to a defconfig that takes care of multi-omap1 build
similar to what we have for OMAP2PLUS so that we can take
care of this in the future.

> If you take a look at arch/arm/mach-omap1/Kconfig, there's
> no "choice" there between omap1 socs.
> 
> > >
> > > >-struct gpio_bank {
> > > >-       unsigned long pbase;
> > > >-       void __iomem *base;
> > > >-       u16 irq;
> > > >-       u16 virtual_irq_start;
> > > >-       int method;
> > > >-#if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP2PLUS)
> > > >-       u32 suspend_wakeup;
> > > >-       u32 saved_wakeup;
> > > >-#endif
> > > >-#ifdef CONFIG_ARCH_OMAP2PLUS
> > > >-       u32 non_wakeup_gpios;
> > > >-       u32 enabled_non_wakeup_gpios;
> > > >-
> > > >-       u32 saved_datain;
> > > >-       u32 saved_fallingdetect;
> > > >-       u32 saved_risingdetect;
> > > >-#endif
> > > >-       u32 level_mask;
> > > >-       u32 toggle_mask;
> > > >-       spinlock_t lock;
> > > >-       struct gpio_chip chip;
> > > >-       struct clk *dbck;
> > > >-       u32 mod_usage;
> > > >-};
> > >
> > > defines are fine, but this structure belongs to this driver. Nobody else
> > > should need to poke on it. Keep it here.
> >
> > This would get used in mach-omap layers in the later patches.
> > Hence moving it to gpio.h
> 
> Why would the hwmod code need to know about the register layout?
> That's totally gpio specific.

Yes, they are GPIO specific and not used in hwmod code. They are 
used in the OMAP specific GPIO code (eg., set gpio triggering 
is handled different for different OMAPs and they need this structure).

> 
> > > >@@ -625,10 +421,12 @@ void omap_set_gpio_debounce(int gpio, int enable)
> > > >        bank = get_gpio_bank(gpio);
> > > >        reg = bank->base;
> > > >
> > > >+#ifdef CONFIG_ARCH_OMAP2PLUS
> > > >        if (cpu_is_omap44xx())
> > > >                reg += OMAP4_GPIO_DEBOUNCENABLE;
> > > >        else
> > > >                reg += OMAP24XX_GPIO_DEBOUNCE_EN;
> > > >+#endif
> > >
> > > you should try to remove ifdefs not add more.
> >
> > As mentioned in the beginning of this patch, these are
> > only temporary and all possible #ifdefs are removed at
> > the end of this patch series when plat-omap/gpio.c handles
> > only common APIs.
> 
> You need to first implement just initializing things using the
> platform data. Only then start messing with the functions.

Okay.

> 
> Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux