Merge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6
This commit is contained in:
commit
1df4bb4af4
|
@ -24,8 +24,6 @@
|
|||
|
||||
#include "common.h"
|
||||
|
||||
#define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
|
||||
|
||||
static unsigned long ttc_dkb_pin_config[] __initdata = {
|
||||
/* UART2 */
|
||||
GPIO47_UART2_RXD,
|
||||
|
|
|
@ -37,6 +37,8 @@ config MACH_ZYLONITE320
|
|||
config MACH_LITTLETON
|
||||
bool "PXA3xx Form Factor Platform (aka Littleton)"
|
||||
select PXA3xx
|
||||
select CPU_PXA300
|
||||
select CPU_PXA310
|
||||
select PXA_SSP
|
||||
|
||||
config MACH_TAVOREVB
|
||||
|
|
|
@ -8,13 +8,6 @@
|
|||
/* the following variables are processor specific and initialized
|
||||
* by the corresponding zylonite_pxa3xx_init()
|
||||
*/
|
||||
struct platform_mmc_slot {
|
||||
int gpio_cd;
|
||||
int gpio_wp;
|
||||
};
|
||||
|
||||
extern struct platform_mmc_slot zylonite_mmc_slot[];
|
||||
|
||||
extern int gpio_eth_irq;
|
||||
extern int gpio_debug_led1;
|
||||
extern int gpio_debug_led2;
|
||||
|
|
|
@ -110,6 +110,12 @@ static mfp_cfg_t littleton_mfp_cfg[] __initdata = {
|
|||
GPIO7_MMC1_CLK,
|
||||
GPIO8_MMC1_CMD,
|
||||
GPIO15_GPIO, /* card detect */
|
||||
|
||||
/* UART3 */
|
||||
GPIO107_UART3_CTS,
|
||||
GPIO108_UART3_RTS,
|
||||
GPIO109_UART3_TXD,
|
||||
GPIO110_UART3_RXD,
|
||||
};
|
||||
|
||||
static struct resource smc91x_resources[] = {
|
||||
|
|
|
@ -293,7 +293,7 @@ static struct pxamci_platform_data poodle_mci_platform_data = {
|
|||
.init = poodle_mci_init,
|
||||
.setpower = poodle_mci_setpower,
|
||||
.exit = poodle_mci_exit,
|
||||
.gpio_card_detect = POODLE_IRQ_GPIO_nSD_DETECT,
|
||||
.gpio_card_detect = POODLE_GPIO_nSD_DETECT,
|
||||
.gpio_card_ro = POODLE_GPIO_nSD_WP,
|
||||
.gpio_power = -1,
|
||||
};
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include <linux/mtd/physmap.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/i2c/pca953x.h>
|
||||
#include <linux/apm-emulation.h>
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
|
@ -626,8 +627,27 @@ static void zeus_power_off(void)
|
|||
pxa27x_cpu_suspend(PWRMODE_DEEPSLEEP);
|
||||
}
|
||||
|
||||
int zeus_get_pcb_info(struct i2c_client *client, unsigned gpio,
|
||||
unsigned ngpio, void *context)
|
||||
#ifdef CONFIG_APM_EMULATION
|
||||
static void zeus_get_power_status(struct apm_power_info *info)
|
||||
{
|
||||
/* Power supply is always present */
|
||||
info->ac_line_status = APM_AC_ONLINE;
|
||||
info->battery_status = APM_BATTERY_STATUS_NOT_PRESENT;
|
||||
info->battery_flag = APM_BATTERY_FLAG_NOT_PRESENT;
|
||||
}
|
||||
|
||||
static inline void zeus_setup_apm(void)
|
||||
{
|
||||
apm_get_power_status = zeus_get_power_status;
|
||||
}
|
||||
#else
|
||||
static inline void zeus_setup_apm(void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
static int zeus_get_pcb_info(struct i2c_client *client, unsigned gpio,
|
||||
unsigned ngpio, void *context)
|
||||
{
|
||||
int i;
|
||||
u8 pcb_info = 0;
|
||||
|
@ -726,9 +746,18 @@ static mfp_cfg_t zeus_pin_config[] __initdata = {
|
|||
GPIO99_GPIO, /* CF RDY */
|
||||
};
|
||||
|
||||
/*
|
||||
* DM9k MSCx settings: SRAM, 16 bits
|
||||
* 17 cycles delay first access
|
||||
* 5 cycles delay next access
|
||||
* 13 cycles recovery time
|
||||
* faster device
|
||||
*/
|
||||
#define DM9K_MSC_VALUE 0xe4c9
|
||||
|
||||
static void __init zeus_init(void)
|
||||
{
|
||||
u16 dm9000_msc = 0xe279;
|
||||
u16 dm9000_msc = DM9K_MSC_VALUE;
|
||||
|
||||
system_rev = __raw_readw(ZEUS_CPLD_VERSION);
|
||||
pr_info("Zeus CPLD V%dI%d\n", (system_rev & 0xf0) >> 4, (system_rev & 0x0f));
|
||||
|
@ -738,6 +767,7 @@ static void __init zeus_init(void)
|
|||
MSC1 = (MSC1 & 0xffff0000) | dm9000_msc;
|
||||
|
||||
pm_power_off = zeus_power_off;
|
||||
zeus_setup_apm();
|
||||
|
||||
pxa2xx_mfp_config(ARRAY_AND_SIZE(zeus_pin_config));
|
||||
|
||||
|
|
|
@ -36,9 +36,6 @@
|
|||
#include "devices.h"
|
||||
#include "generic.h"
|
||||
|
||||
#define MAX_SLOTS 3
|
||||
struct platform_mmc_slot zylonite_mmc_slot[MAX_SLOTS];
|
||||
|
||||
int gpio_eth_irq;
|
||||
int gpio_debug_led1;
|
||||
int gpio_debug_led2;
|
||||
|
@ -220,84 +217,28 @@ static inline void zylonite_init_lcd(void) {}
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_MMC)
|
||||
static int zylonite_mci_ro(struct device *dev)
|
||||
{
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
|
||||
return gpio_get_value(zylonite_mmc_slot[pdev->id].gpio_wp);
|
||||
}
|
||||
|
||||
static int zylonite_mci_init(struct device *dev,
|
||||
irq_handler_t zylonite_detect_int,
|
||||
void *data)
|
||||
{
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
int err, cd_irq, gpio_cd, gpio_wp;
|
||||
|
||||
cd_irq = gpio_to_irq(zylonite_mmc_slot[pdev->id].gpio_cd);
|
||||
gpio_cd = zylonite_mmc_slot[pdev->id].gpio_cd;
|
||||
gpio_wp = zylonite_mmc_slot[pdev->id].gpio_wp;
|
||||
|
||||
/*
|
||||
* setup GPIO for Zylonite MMC controller
|
||||
*/
|
||||
err = gpio_request(gpio_cd, "mmc card detect");
|
||||
if (err)
|
||||
goto err_request_cd;
|
||||
gpio_direction_input(gpio_cd);
|
||||
|
||||
err = gpio_request(gpio_wp, "mmc write protect");
|
||||
if (err)
|
||||
goto err_request_wp;
|
||||
gpio_direction_input(gpio_wp);
|
||||
|
||||
err = request_irq(cd_irq, zylonite_detect_int,
|
||||
IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
|
||||
"MMC card detect", data);
|
||||
if (err) {
|
||||
printk(KERN_ERR "%s: MMC/SD/SDIO: "
|
||||
"can't request card detect IRQ\n", __func__);
|
||||
goto err_request_irq;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
err_request_irq:
|
||||
gpio_free(gpio_wp);
|
||||
err_request_wp:
|
||||
gpio_free(gpio_cd);
|
||||
err_request_cd:
|
||||
return err;
|
||||
}
|
||||
|
||||
static void zylonite_mci_exit(struct device *dev, void *data)
|
||||
{
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
int cd_irq, gpio_cd, gpio_wp;
|
||||
|
||||
cd_irq = gpio_to_irq(zylonite_mmc_slot[pdev->id].gpio_cd);
|
||||
gpio_cd = zylonite_mmc_slot[pdev->id].gpio_cd;
|
||||
gpio_wp = zylonite_mmc_slot[pdev->id].gpio_wp;
|
||||
|
||||
free_irq(cd_irq, data);
|
||||
gpio_free(gpio_cd);
|
||||
gpio_free(gpio_wp);
|
||||
}
|
||||
|
||||
static struct pxamci_platform_data zylonite_mci_platform_data = {
|
||||
.detect_delay = 20,
|
||||
.ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
|
||||
.init = zylonite_mci_init,
|
||||
.exit = zylonite_mci_exit,
|
||||
.get_ro = zylonite_mci_ro,
|
||||
.gpio_card_detect = -1,
|
||||
.gpio_card_ro = -1,
|
||||
.gpio_card_detect = EXT_GPIO(0),
|
||||
.gpio_card_ro = EXT_GPIO(2),
|
||||
.gpio_power = -1,
|
||||
};
|
||||
|
||||
static struct pxamci_platform_data zylonite_mci2_platform_data = {
|
||||
.detect_delay = 20,
|
||||
.ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
|
||||
.gpio_card_detect = EXT_GPIO(1),
|
||||
.gpio_card_ro = EXT_GPIO(3),
|
||||
.gpio_power = -1,
|
||||
};
|
||||
|
||||
static struct pxamci_platform_data zylonite_mci3_platform_data = {
|
||||
.detect_delay = 20,
|
||||
.ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
|
||||
.gpio_card_detect = EXT_GPIO(30),
|
||||
.gpio_card_ro = EXT_GPIO(31),
|
||||
.gpio_power = -1,
|
||||
};
|
||||
|
||||
static void __init zylonite_init_mmc(void)
|
||||
|
@ -305,7 +246,7 @@ static void __init zylonite_init_mmc(void)
|
|||
pxa_set_mci_info(&zylonite_mci_platform_data);
|
||||
pxa3xx_set_mci2_info(&zylonite_mci2_platform_data);
|
||||
if (cpu_is_pxa310())
|
||||
pxa3xx_set_mci3_info(&zylonite_mci_platform_data);
|
||||
pxa3xx_set_mci3_info(&zylonite_mci3_platform_data);
|
||||
}
|
||||
#else
|
||||
static inline void zylonite_init_mmc(void) {}
|
||||
|
|
|
@ -129,8 +129,8 @@ static mfp_cfg_t common_mfp_cfg[] __initdata = {
|
|||
GPIO22_I2C_SDA,
|
||||
|
||||
/* GPIO */
|
||||
GPIO18_GPIO, /* GPIO Expander #0 INT_N */
|
||||
GPIO19_GPIO, /* GPIO Expander #1 INT_N */
|
||||
GPIO18_GPIO | MFP_PULL_HIGH, /* GPIO Expander #0 INT_N */
|
||||
GPIO19_GPIO | MFP_PULL_HIGH, /* GPIO Expander #1 INT_N */
|
||||
};
|
||||
|
||||
static mfp_cfg_t pxa300_mfp_cfg[] __initdata = {
|
||||
|
@ -258,10 +258,6 @@ void __init zylonite_pxa300_init(void)
|
|||
/* detect LCD panel */
|
||||
zylonite_detect_lcd_panel();
|
||||
|
||||
/* MMC card detect & write protect for controller 0 */
|
||||
zylonite_mmc_slot[0].gpio_cd = EXT_GPIO(0);
|
||||
zylonite_mmc_slot[0].gpio_wp = EXT_GPIO(2);
|
||||
|
||||
/* WM9713 IRQ */
|
||||
wm9713_irq = mfp_to_gpio(MFP_PIN_GPIO26);
|
||||
|
||||
|
@ -276,10 +272,6 @@ void __init zylonite_pxa300_init(void)
|
|||
if (cpu_is_pxa310()) {
|
||||
pxa3xx_mfp_config(ARRAY_AND_SIZE(pxa310_mfp_cfg));
|
||||
gpio_eth_irq = mfp_to_gpio(MFP_PIN_GPIO102);
|
||||
|
||||
/* MMC card detect & write protect for controller 2 */
|
||||
zylonite_mmc_slot[2].gpio_cd = EXT_GPIO(30);
|
||||
zylonite_mmc_slot[2].gpio_wp = EXT_GPIO(31);
|
||||
}
|
||||
|
||||
/* GPIOs for Debug LEDs */
|
||||
|
|
|
@ -209,10 +209,6 @@ void __init zylonite_pxa320_init(void)
|
|||
gpio_debug_led1 = mfp_to_gpio(MFP_PIN_GPIO1_2);
|
||||
gpio_debug_led2 = mfp_to_gpio(MFP_PIN_GPIO4_2);
|
||||
|
||||
/* MMC card detect & write protect for controller 0 */
|
||||
zylonite_mmc_slot[0].gpio_cd = mfp_to_gpio(MFP_PIN_GPIO1);
|
||||
zylonite_mmc_slot[0].gpio_wp = mfp_to_gpio(MFP_PIN_GPIO5);
|
||||
|
||||
/* WM9713 IRQ */
|
||||
wm9713_irq = mfp_to_gpio(MFP_PIN_GPIO15);
|
||||
}
|
||||
|
|
|
@ -204,14 +204,14 @@ static int __devinit pwm_probe(struct platform_device *pdev)
|
|||
goto err_free_clk;
|
||||
}
|
||||
|
||||
r = request_mem_region(r->start, r->end - r->start + 1, pdev->name);
|
||||
r = request_mem_region(r->start, resource_size(r), pdev->name);
|
||||
if (r == NULL) {
|
||||
dev_err(&pdev->dev, "failed to request memory resource\n");
|
||||
ret = -EBUSY;
|
||||
goto err_free_clk;
|
||||
}
|
||||
|
||||
pwm->mmio_base = ioremap(r->start, r->end - r->start + 1);
|
||||
pwm->mmio_base = ioremap(r->start, resource_size(r));
|
||||
if (pwm->mmio_base == NULL) {
|
||||
dev_err(&pdev->dev, "failed to ioremap() registers\n");
|
||||
ret = -ENODEV;
|
||||
|
@ -241,7 +241,7 @@ static int __devinit pwm_probe(struct platform_device *pdev)
|
|||
return 0;
|
||||
|
||||
err_free_mem:
|
||||
release_mem_region(r->start, r->end - r->start + 1);
|
||||
release_mem_region(r->start, resource_size(r));
|
||||
err_free_clk:
|
||||
clk_put(pwm->clk);
|
||||
err_free:
|
||||
|
@ -271,7 +271,7 @@ static int __devexit pwm_remove(struct platform_device *pdev)
|
|||
iounmap(pwm->mmio_base);
|
||||
|
||||
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
release_mem_region(r->start, r->end - r->start + 1);
|
||||
release_mem_region(r->start, resource_size(r));
|
||||
|
||||
clk_put(pwm->clk);
|
||||
kfree(pwm);
|
||||
|
|
|
@ -1221,9 +1221,9 @@ static void setup_smart_timing(struct pxafb_info *fbi,
|
|||
static int pxafb_smart_thread(void *arg)
|
||||
{
|
||||
struct pxafb_info *fbi = arg;
|
||||
struct pxafb_mach_info *inf;
|
||||
struct pxafb_mach_info *inf = fbi->dev->platform_data;
|
||||
|
||||
if (!fbi || !fbi->dev->platform_data->smart_update) {
|
||||
if (!inf->smart_update) {
|
||||
pr_err("%s: not properly initialized, thread terminated\n",
|
||||
__func__);
|
||||
return -EINVAL;
|
||||
|
|
Loading…
Reference in a new issue