Skip to content

Commit

Permalink
Merge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/y…
Browse files Browse the repository at this point in the history
…cmiao/pxa-linux-2.6
  • Loading branch information
Russell King authored and Russell King committed Apr 28, 2009
2 parents a133e77 + fc76132 commit 1099337
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 13 deletions.
8 changes: 0 additions & 8 deletions arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -486,8 +486,6 @@ config ARCH_PXA
select HAVE_CLK
select COMMON_CLKDEV
select ARCH_REQUIRE_GPIOLIB
select HAVE_CLK
select COMMON_CLKDEV
select GENERIC_TIME
select GENERIC_CLOCKEVENTS
select TICK_ONESHOT
Expand Down Expand Up @@ -1173,12 +1171,6 @@ config CPU_FREQ_IMX

If in doubt, say N.

config CPU_FREQ_PXA
bool
depends on CPU_FREQ && ARCH_PXA && PXA25x
default y
select CPU_FREQ_DEFAULT_GOV_USERSPACE

endif

source "drivers/cpuidle/Kconfig"
Expand Down
1 change: 0 additions & 1 deletion arch/arm/configs/viper_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,6 @@ CONFIG_CPU_FREQ_GOV_POWERSAVE=m
CONFIG_CPU_FREQ_GOV_USERSPACE=m
CONFIG_CPU_FREQ_GOV_ONDEMAND=m
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
CONFIG_CPU_FREQ_PXA=y

#
# Floating point emulation
Expand Down
10 changes: 10 additions & 0 deletions arch/arm/mach-pxa/corgi.c
Original file line number Diff line number Diff line change
Expand Up @@ -427,12 +427,22 @@ static struct pxa2xx_spi_master corgi_spi_info = {
.num_chipselect = 3,
};

static void corgi_wait_for_hsync(void)
{
while (gpio_get_value(CORGI_GPIO_HSYNC))
cpu_relax();

while (!gpio_get_value(CORGI_GPIO_HSYNC))
cpu_relax();
}

static struct ads7846_platform_data corgi_ads7846_info = {
.model = 7846,
.vref_delay_usecs = 100,
.x_plate_ohms = 419,
.y_plate_ohms = 486,
.gpio_pendown = CORGI_GPIO_TP_INT,
.wait_for_sync = corgi_wait_for_hsync,
};

static void corgi_ads7846_cs(u32 command)
Expand Down
9 changes: 9 additions & 0 deletions arch/arm/mach-pxa/littleton.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,11 @@ static struct led_info littleton_da9034_leds[] = {
},
};

static struct da9034_touch_pdata littleton_da9034_touch = {
.x_inverted = 1,
.interval_ms = 20,
};

static struct da903x_subdev_info littleton_da9034_subdevs[] = {
{
.name = "da903x-led",
Expand All @@ -350,6 +355,10 @@ static struct da903x_subdev_info littleton_da9034_subdevs[] = {
}, {
.name = "da903x-backlight",
.id = DA9034_ID_WLED,
}, {
.name = "da9034-touch",
.id = DA9034_ID_TOUCH,
.platform_data = &littleton_da9034_touch,
},
};

Expand Down
10 changes: 10 additions & 0 deletions arch/arm/mach-pxa/spitz.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,12 +299,22 @@ static struct pxa2xx_spi_master spitz_spi_info = {
.num_chipselect = 3,
};

static void spitz_wait_for_hsync(void)
{
while (gpio_get_value(SPITZ_GPIO_HSYNC))
cpu_relax();

while (!gpio_get_value(SPITZ_GPIO_HSYNC))
cpu_relax();
}

static struct ads7846_platform_data spitz_ads7846_info = {
.model = 7846,
.vref_delay_usecs = 100,
.x_plate_ohms = 419,
.y_plate_ohms = 486,
.gpio_pendown = SPITZ_GPIO_TP_INT,
.wait_for_sync = spitz_wait_for_hsync,
};

static void spitz_ads7846_cs(u32 command)
Expand Down
5 changes: 5 additions & 0 deletions arch/arm/mach-pxa/zylonite_pxa300.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ static mfp_cfg_t common_mfp_cfg[] __initdata = {
GPIO25_AC97_SDATA_IN_0,
GPIO27_AC97_SDATA_OUT,
GPIO28_AC97_SYNC,
GPIO17_GPIO, /* SDATA_IN_1 but unused - configure to GPIO */

/* SSP3 */
GPIO91_SSP3_SCLK,
Expand Down Expand Up @@ -126,6 +127,10 @@ static mfp_cfg_t common_mfp_cfg[] __initdata = {
/* Standard I2C */
GPIO21_I2C_SCL,
GPIO22_I2C_SDA,

/* GPIO */
GPIO18_GPIO, /* GPIO Expander #0 INT_N */
GPIO19_GPIO, /* GPIO Expander #1 INT_N */
};

static mfp_cfg_t pxa300_mfp_cfg[] __initdata = {
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-pxa/zylonite_pxa320.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ static mfp_cfg_t mfp_cfg[] __initdata = {
GPIO38_AC97_SYNC,
GPIO39_AC97_BITCLK,
GPIO40_AC97_nACRESET,
GPIO36_GPIO, /* SDATA_IN_1 but unused - configure to GPIO */

/* SSP3 */
GPIO89_SSP3_SCLK,
Expand Down
23 changes: 19 additions & 4 deletions arch/arm/plat-pxa/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ static int __init pxa_init_gpio_chip(int gpio_end)
return -ENOMEM;
}

memset(chips, 0, nbanks * sizeof(struct pxa_gpio_chip));

for (i = 0, gpio = 0; i < nbanks; i++, gpio += 32) {
struct gpio_chip *c = &chips[i].chip;

Expand All @@ -143,6 +145,21 @@ static int __init pxa_init_gpio_chip(int gpio_end)
return 0;
}

/* Update only those GRERx and GFERx edge detection register bits if those
* bits are set in c->irq_mask
*/
static inline void update_edge_detect(struct pxa_gpio_chip *c)
{
uint32_t grer, gfer;

grer = __raw_readl(c->regbase + GRER_OFFSET) & ~c->irq_mask;
gfer = __raw_readl(c->regbase + GFER_OFFSET) & ~c->irq_mask;
grer |= c->irq_edge_rise & c->irq_mask;
gfer |= c->irq_edge_fall & c->irq_mask;
__raw_writel(grer, c->regbase + GRER_OFFSET);
__raw_writel(gfer, c->regbase + GFER_OFFSET);
}

static int pxa_gpio_irq_type(unsigned int irq, unsigned int type)
{
struct pxa_gpio_chip *c;
Expand Down Expand Up @@ -181,8 +198,7 @@ static int pxa_gpio_irq_type(unsigned int irq, unsigned int type)
else
c->irq_edge_fall &= ~mask;

__raw_writel(c->irq_edge_rise & c->irq_mask, c->regbase + GRER_OFFSET);
__raw_writel(c->irq_edge_fall & c->irq_mask, c->regbase + GFER_OFFSET);
update_edge_detect(c);

pr_debug("%s: IRQ%d (GPIO%d) - edge%s%s\n", __func__, irq, gpio,
((type & IRQ_TYPE_EDGE_RISING) ? " rising" : ""),
Expand Down Expand Up @@ -244,8 +260,7 @@ static void pxa_unmask_muxed_gpio(unsigned int irq)
struct pxa_gpio_chip *c = gpio_to_chip(gpio);

c->irq_mask |= GPIO_bit(gpio);
__raw_writel(c->irq_edge_rise & c->irq_mask, c->regbase + GRER_OFFSET);
__raw_writel(c->irq_edge_fall & c->irq_mask, c->regbase + GFER_OFFSET);
update_edge_detect(c);
}

static struct irq_chip pxa_muxed_gpio_chip = {
Expand Down

0 comments on commit 1099337

Please sign in to comment.