diff options
author | Koen Kooi <koen@openembedded.org> | 2007-05-19 09:38:22 +0000 |
---|---|---|
committer | Koen Kooi <koen@openembedded.org> | 2007-05-19 09:38:22 +0000 |
commit | c50fe0c5f0eb2e243a4921e8576ba49db26483fc (patch) | |
tree | 45fbe157b566abc7dc092d7d1b5d34d0cdfec4ba /packages/linux/linux-ezx-2.6.21/a780-mci.patch | |
parent | a338dfb607b7a17292b6ec719c2db6528e6a87ad (diff) |
linux-ezx 2.6.21: update to r2011:
r2011: call send_readurb on bp_rdy signal from BP to keep BP communication active
add asoc pxa2xx-ssp.c driver from asoc-v0.13rc3
r2010: * pxa-kbd.patch: Fix pxakbd bug: direct keys were not passed to userspace
* a780-kbd.patch: Cleanup keycodes definition for a780, use unique keycodes so
to avoid the double event problem occurring when the same keycode is used more
than once.
r2003: core: EZX subsystem
ezx-phone.c file for each phone
BP handshake code on a platform_driver (and another .patch)
pm: fully functional suspend/resume (except for BP)
reboot/poweroff
new: a780 flip
e680 lock switch
bp: Kconfig entry to disable BP handshake (the watchdog dont start if we dont try to handshake)
other: delete obsolete files
r2002: * Implement vibrator handling for a780 using the leds class.
r1999: * Port and readapt ezx-backlight patch. Let's use again the backlight class
to handle lcd brightness.
r1998: * Port leds patches for A780 and E680 (we still pollute ezx.c for now)
Diffstat (limited to 'packages/linux/linux-ezx-2.6.21/a780-mci.patch')
-rw-r--r-- | packages/linux/linux-ezx-2.6.21/a780-mci.patch | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/packages/linux/linux-ezx-2.6.21/a780-mci.patch b/packages/linux/linux-ezx-2.6.21/a780-mci.patch new file mode 100644 index 0000000000..b9d601856a --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/a780-mci.patch @@ -0,0 +1,123 @@ +Index: linux-2.6.21/arch/arm/mach-pxa/ezx-a780.c +=================================================================== +--- linux-2.6.21.orig/arch/arm/mach-pxa/ezx-a780.c 2007-05-08 03:46:17.000000000 -0300 ++++ linux-2.6.21/arch/arm/mach-pxa/ezx-a780.c 2007-05-08 04:05:48.000000000 -0300 +@@ -14,11 +14,14 @@ + #include <linux/init.h> + #include <linux/platform_device.h> + #include <linux/fb.h> ++#include <linux/mmc/host.h> ++#include <linux/irq.h> + + #include <asm/mach-types.h> + #include <asm/mach/arch.h> + #include <asm/arch/pxa-regs.h> + #include <asm/arch/pxafb.h> ++#include <asm/arch/mmc.h> + + #include "generic.h" + #include "ezx.h" +@@ -26,6 +29,95 @@ + extern void ezx_lcd_power(int, struct fb_var_screeninfo *); + extern void ezx_backlight_power(int); + ++#ifdef CONFIG_EZX_PCAP ++extern int ezx_pcap_mmcsd_power(int); ++extern void ezx_pcap_mmcsd_voltage(u_int32_t); ++#else ++#define ezx_pcap_mmcsd_voltage(x) {} ++#define ezx_pcap_mmcsd_power(x) {} ++#endif ++ ++static struct pxamci_platform_data a780_mci_platform_data; ++ ++static u_int8_t mmc_voltage[] = { ++ [MMC_VDD_160] = 5, ++ [MMC_VDD_170] = 5, ++ [MMC_VDD_180] = 6, ++ [MMC_VDD_190] = 6, ++ [MMC_VDD_200] = 7, ++ [MMC_VDD_210] = 7, ++ [MMC_VDD_220] = 8, ++ [MMC_VDD_230] = 8, ++ [MMC_VDD_240] = 9, ++ [MMC_VDD_250] = 9, ++ [MMC_VDD_260] = 10, ++ [MMC_VDD_270] = 10, ++ [MMC_VDD_280] = 11, ++ [MMC_VDD_290] = 11, ++ [MMC_VDD_300] = 12, ++ [MMC_VDD_310] = 12, ++ [MMC_VDD_320] = 13, ++ [MMC_VDD_330] = 13, ++ [MMC_VDD_340] = 14, ++ [MMC_VDD_350] = 14, ++ [MMC_VDD_360] = 15, ++}; ++ ++static int a780_mci_init(struct device *dev, ++ irqreturn_t (*ezx_detect_int)(int, void *), ++ void *data) ++{ ++ int err; ++ ++ /* Setup GPIO for PXA27x MMC/SD controller */ ++ pxa_gpio_mode(GPIO32_MMCCLK_MD); ++ pxa_gpio_mode(GPIO112_MMCCMD_MD); ++ pxa_gpio_mode(GPIO92_MMCDAT0_MD); ++ pxa_gpio_mode(GPIO109_MMCDAT1_MD); ++ pxa_gpio_mode(GPIO110_MMCDAT2_MD); ++ pxa_gpio_mode(GPIO111_MMCDAT3_MD); ++ ++ ezx_pcap_mmcsd_power(1); ++ ++ a780_mci_platform_data.detect_delay = msecs_to_jiffies(250); ++ ++ err = request_irq(0x49, ezx_detect_int, SA_INTERRUPT, ++ "MMC card detect", data); ++ if (err) { ++ printk(KERN_ERR "ezx_mci_detect: MMC/SD: can't request " ++ "MMC card detect IRQ\n"); ++ return -1; ++ } ++ ++ set_irq_type(0x0b, IRQT_BOTHEDGE); ++ ++ return 0; ++} ++ ++static void a780_mci_setpower(struct device *dev, unsigned int vdd) ++{ ++ if (vdd <= MMC_VDD_360) ++ ezx_pcap_mmcsd_voltage(mmc_voltage[vdd]); ++ ++ ezx_pcap_mmcsd_power(1); ++} ++ ++static void a780_mci_exit(struct device *dev, void *data) ++{ ++ ezx_pcap_mmcsd_power(0); ++ free_irq(0x49, data); ++} ++ ++static struct pxamci_platform_data a780_mci_platform_data = { ++ .ocr_mask = MMC_VDD_160_165|MMC_VDD_18_19|MMC_VDD_20_21 ++ |MMC_VDD_22_23|MMC_VDD_24_25|MMC_VDD_26_27 ++ |MMC_VDD_28_29|MMC_VDD_30_31|MMC_VDD_32_33 ++ |MMC_VDD_34_35|MMC_VDD_35_36, ++ .init = a780_mci_init, ++ .setpower = a780_mci_setpower, ++ .exit = a780_mci_exit, ++}; ++ + static struct pxafb_mode_info mode_a780 = { + .pixclock = 150000, + .xres = 240, +@@ -66,6 +158,7 @@ + PSLR = 0x05800f00; + + set_pxa_fb_info(&a780_fb_info); ++ pxa_set_mci_info(&a780_mci_platform_data); + + platform_add_devices(devices, ARRAY_SIZE(devices)); + } |