From 8a23eeba81b2e04566b228f5ab5b2a862248f6a5 Mon Sep 17 00:00:00 2001 From: lhh Date: Tue, 16 Nov 2010 10:19:44 +0800 Subject: [PATCH] update rk29 gpio --- arch/arm/mach-rk29/devices.c | 17 ++++++++++++++++- arch/arm/mach-rk29/gpio.c | 4 +++- arch/arm/mach-rk29/include/mach/dma.h | 8 ++------ arch/arm/mach-rk29/rk29-pl330.c | 2 +- drivers/mmc/host/rk2818-sdmmc.h | 2 +- drivers/serial/Kconfig | 14 +++++++++++++- 6 files changed, 36 insertions(+), 11 deletions(-) diff --git a/arch/arm/mach-rk29/devices.c b/arch/arm/mach-rk29/devices.c index 2ca57c781a3e..c505683e082d 100755 --- a/arch/arm/mach-rk29/devices.c +++ b/arch/arm/mach-rk29/devices.c @@ -134,6 +134,7 @@ struct platform_device rk29_device_i2c3 = { #ifdef CONFIG_SDMMC0_RK29 +#ifndef CONFIG_EMMC_RK29 static struct resource resources_sdmmc0[] = { { .start = IRQ_SDMMC, @@ -141,11 +142,25 @@ static struct resource resources_sdmmc0[] = { .flags = IORESOURCE_IRQ, }, { - .start = RK29_SDMMC0_PHYS, + .start = RK29_SDMMC0_PHYS, .end = RK29_SDMMC0_PHYS + RK29_SDMMC0_SIZE -1, .flags = IORESOURCE_MEM, } }; +#else +static struct resource resources_sdmmc0[] = { + { + .start = IRQ_EMMC, + .end = IRQ_EMMC, + .flags = IORESOURCE_IRQ, + }, + { + .start = RK29_EMMC_PHYS, + .end = RK29_EMMC_PHYS + RK29_EMMC_SIZE -1, + .flags = IORESOURCE_MEM, + } +}; +#endif #endif #ifdef CONFIG_SDMMC1_RK29 static struct resource resources_sdmmc1[] = { diff --git a/arch/arm/mach-rk29/gpio.c b/arch/arm/mach-rk29/gpio.c index d15853866aca..4ba962238508 100755 --- a/arch/arm/mach-rk29/gpio.c +++ b/arch/arm/mach-rk29/gpio.c @@ -500,11 +500,13 @@ static void gpio_irq_handler(unsigned irq, struct irq_desc *desc) unsigned char __iomem *gpioRegBase; u32 isr; - rk29_gpio = get_irq_chip_data(irq+14); + rk29_gpio = get_irq_chip_data(irq+13); gpioRegBase = rk29_gpio->regbase; //ÆÁ±ÎÖжÏ6»ò7 desc->chip->mask(irq); + if(desc->chip->ack) + desc->chip->ack(irq); //¶ÁÈ¡µ±Ç°ÖжÏ״̬£¬¼´²éѯ¾ßÌåÊÇGPIOµÄÄĸöPINÒýÆðµÄÖÐ¶Ï isr = rk29_gpio_read(gpioRegBase,GPIO_INT_STATUS); if (!isr) { diff --git a/arch/arm/mach-rk29/include/mach/dma.h b/arch/arm/mach-rk29/include/mach/dma.h index cfd9e14d359f..bf2ba7e9e2ff 100644 --- a/arch/arm/mach-rk29/include/mach/dma.h +++ b/arch/arm/mach-rk29/include/mach/dma.h @@ -41,19 +41,15 @@ struct rk29_dma_client { char *name; }; -struct rk29_dma_chan; - /* rk29_dma_cbfn_t * * buffer callback routine type */ -typedef void (*rk29_dma_cbfn_t)(struct rk29_dma_chan *, - void *buf, int size, +typedef void (*rk29_dma_cbfn_t)(void *buf, int size, enum rk29_dma_buffresult result); -typedef int (*rk29_dma_opfn_t)(struct rk29_dma_chan *, - enum rk29_chan_op ); +typedef int (*rk29_dma_opfn_t)(enum rk29_chan_op ); diff --git a/arch/arm/mach-rk29/rk29-pl330.c b/arch/arm/mach-rk29/rk29-pl330.c index 44d393d9459b..1970e2fbec32 100644 --- a/arch/arm/mach-rk29/rk29-pl330.c +++ b/arch/arm/mach-rk29/rk29-pl330.c @@ -410,7 +410,7 @@ static inline void _finish_off(struct rk29_pl330_xfer *xfer, /* Do callback */ if (ch->callback_fn) - ch->callback_fn(NULL, xfer->token, xfer->px.bytes, res); + ch->callback_fn(xfer->token, xfer->px.bytes, res); /* Force Free or if buffer is not needed anymore */ if (ffree || !(ch->options & RK29_DMAF_CIRCULAR)) diff --git a/drivers/mmc/host/rk2818-sdmmc.h b/drivers/mmc/host/rk2818-sdmmc.h index 2422958b6fe6..19069a0a3c56 100755 --- a/drivers/mmc/host/rk2818-sdmmc.h +++ b/drivers/mmc/host/rk2818-sdmmc.h @@ -126,7 +126,7 @@ /* Specifies how often in millisecs to poll for card removal-insertion changes * when the timer switch is open */ -#define RK_SDMMC0_SWITCH_POLL_DELAY 3500 +#define RK_SDMMC0_SWITCH_POLL_DELAY 35 #endif diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index 326b5c9f6171..f6bac01cd141 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig @@ -1512,6 +1512,10 @@ config UART0_RK29 bool "RockChip rk29 serial port 0 support" depends on SERIAL_RK29 +config UART0_CTS_RTS_RK29 + bool "RockChip rk29 serial port 0 cts rts support" + depends on UART0_RK29 + config UART1_RK29 bool "RockChip rk29 serial port 1 support" depends on SERIAL_RK29 @@ -1520,10 +1524,18 @@ config UART2_RK29 bool "RockChip rk29 serial port 2 support" depends on SERIAL_RK29 +config UART2_CTS_RTS_RK29 + bool "RockChip rk29 serial port 2 cts rts support" + depends on UART2_RK29 + config UART3_RK29 bool "RockChip rk29 serial port 3 support" depends on SERIAL_RK29 - + +config UART3_CTS_RTS_RK29 + bool "RockChip rk29 serial port 3 cts rts support" + depends on UART3_RK29 + config SERIAL_RK29_CONSOLE bool "Rockchip rk29 serial console support" depends on SERIAL_RK29=y -- 2.34.1