diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-10-18 10:20:21 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-10-18 10:20:21 -0400 |
commit | 7f9c7e28119cf21ae1a035240da3705647d0d06a (patch) | |
tree | c0a1568e21c5ce6cd4112e44071040a3e611a9ec /drivers | |
parent | 4af8f24d99d119ed68b27d1b0bd6f2ab2b23ed1b (diff) | |
parent | b476ef059ec9e49d4f2a4280b862b446ef3866e8 (diff) |
Merge branch 'devel' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 into devel-stable
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/input/keyboard/Kconfig | 2 | ||||
-rw-r--r-- | drivers/input/keyboard/pxa27x_keypad.c | 12 | ||||
-rw-r--r-- | drivers/usb/host/ohci-pxa27x.c | 7 | ||||
-rw-r--r-- | drivers/video/pxa168fb.c | 47 |
4 files changed, 66 insertions, 2 deletions
diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig index 9cc488d21490..aa037fec2f86 100644 --- a/drivers/input/keyboard/Kconfig +++ b/drivers/input/keyboard/Kconfig | |||
@@ -338,7 +338,7 @@ config KEYBOARD_OPENCORES | |||
338 | 338 | ||
339 | config KEYBOARD_PXA27x | 339 | config KEYBOARD_PXA27x |
340 | tristate "PXA27x/PXA3xx keypad support" | 340 | tristate "PXA27x/PXA3xx keypad support" |
341 | depends on PXA27x || PXA3xx | 341 | depends on PXA27x || PXA3xx || ARCH_MMP |
342 | help | 342 | help |
343 | Enable support for PXA27x/PXA3xx keypad controller. | 343 | Enable support for PXA27x/PXA3xx keypad controller. |
344 | 344 | ||
diff --git a/drivers/input/keyboard/pxa27x_keypad.c b/drivers/input/keyboard/pxa27x_keypad.c index f32404f99189..4b0ec35259a1 100644 --- a/drivers/input/keyboard/pxa27x_keypad.c +++ b/drivers/input/keyboard/pxa27x_keypad.c | |||
@@ -32,7 +32,7 @@ | |||
32 | #include <asm/mach/map.h> | 32 | #include <asm/mach/map.h> |
33 | 33 | ||
34 | #include <mach/hardware.h> | 34 | #include <mach/hardware.h> |
35 | #include <mach/pxa27x_keypad.h> | 35 | #include <plat/pxa27x_keypad.h> |
36 | /* | 36 | /* |
37 | * Keypad Controller registers | 37 | * Keypad Controller registers |
38 | */ | 38 | */ |
@@ -330,11 +330,21 @@ static void pxa27x_keypad_scan_direct(struct pxa27x_keypad *keypad) | |||
330 | keypad->direct_key_state = new_state; | 330 | keypad->direct_key_state = new_state; |
331 | } | 331 | } |
332 | 332 | ||
333 | static void clear_wakeup_event(struct pxa27x_keypad *keypad) | ||
334 | { | ||
335 | struct pxa27x_keypad_platform_data *pdata = keypad->pdata; | ||
336 | |||
337 | if (pdata->clear_wakeup_event) | ||
338 | (pdata->clear_wakeup_event)(); | ||
339 | } | ||
340 | |||
333 | static irqreturn_t pxa27x_keypad_irq_handler(int irq, void *dev_id) | 341 | static irqreturn_t pxa27x_keypad_irq_handler(int irq, void *dev_id) |
334 | { | 342 | { |
335 | struct pxa27x_keypad *keypad = dev_id; | 343 | struct pxa27x_keypad *keypad = dev_id; |
336 | unsigned long kpc = keypad_readl(KPC); | 344 | unsigned long kpc = keypad_readl(KPC); |
337 | 345 | ||
346 | clear_wakeup_event(keypad); | ||
347 | |||
338 | if (kpc & KPC_DI) | 348 | if (kpc & KPC_DI) |
339 | pxa27x_keypad_scan_direct(keypad); | 349 | pxa27x_keypad_scan_direct(keypad); |
340 | 350 | ||
diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c index 418163894775..afef7b0a4195 100644 --- a/drivers/usb/host/ohci-pxa27x.c +++ b/drivers/usb/host/ohci-pxa27x.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
25 | #include <linux/clk.h> | 25 | #include <linux/clk.h> |
26 | #include <mach/ohci.h> | 26 | #include <mach/ohci.h> |
27 | #include <mach/pxa3xx-u2d.h> | ||
27 | 28 | ||
28 | /* | 29 | /* |
29 | * UHC: USB Host Controller (OHCI-like) register definitions | 30 | * UHC: USB Host Controller (OHCI-like) register definitions |
@@ -235,6 +236,9 @@ static int pxa27x_start_hc(struct pxa27x_ohci *ohci, struct device *dev) | |||
235 | if (retval < 0) | 236 | if (retval < 0) |
236 | return retval; | 237 | return retval; |
237 | 238 | ||
239 | if (cpu_is_pxa3xx()) | ||
240 | pxa3xx_u2d_start_hc(&ohci_to_hcd(&ohci->ohci)->self); | ||
241 | |||
238 | uhchr = __raw_readl(ohci->mmio_base + UHCHR) & ~UHCHR_SSE; | 242 | uhchr = __raw_readl(ohci->mmio_base + UHCHR) & ~UHCHR_SSE; |
239 | __raw_writel(uhchr, ohci->mmio_base + UHCHR); | 243 | __raw_writel(uhchr, ohci->mmio_base + UHCHR); |
240 | __raw_writel(UHCHIE_UPRIE | UHCHIE_RWIE, ohci->mmio_base + UHCHIE); | 244 | __raw_writel(UHCHIE_UPRIE | UHCHIE_RWIE, ohci->mmio_base + UHCHIE); |
@@ -251,6 +255,9 @@ static void pxa27x_stop_hc(struct pxa27x_ohci *ohci, struct device *dev) | |||
251 | 255 | ||
252 | inf = dev->platform_data; | 256 | inf = dev->platform_data; |
253 | 257 | ||
258 | if (cpu_is_pxa3xx()) | ||
259 | pxa3xx_u2d_stop_hc(&ohci_to_hcd(&ohci->ohci)->self); | ||
260 | |||
254 | if (inf->exit) | 261 | if (inf->exit) |
255 | inf->exit(dev); | 262 | inf->exit(dev); |
256 | 263 | ||
diff --git a/drivers/video/pxa168fb.c b/drivers/video/pxa168fb.c index a31a77ff6f3d..cea6403ae71c 100644 --- a/drivers/video/pxa168fb.c +++ b/drivers/video/pxa168fb.c | |||
@@ -784,12 +784,53 @@ failed: | |||
784 | return ret; | 784 | return ret; |
785 | } | 785 | } |
786 | 786 | ||
787 | static int __devexit pxa168fb_remove(struct platform_device *pdev) | ||
788 | { | ||
789 | struct pxa168fb_info *fbi = platform_get_drvdata(pdev); | ||
790 | struct fb_info *info; | ||
791 | int irq; | ||
792 | unsigned int data; | ||
793 | |||
794 | if (!fbi) | ||
795 | return 0; | ||
796 | |||
797 | /* disable DMA transfer */ | ||
798 | data = readl(fbi->reg_base + LCD_SPU_DMA_CTRL0); | ||
799 | data &= ~CFG_GRA_ENA_MASK; | ||
800 | writel(data, fbi->reg_base + LCD_SPU_DMA_CTRL0); | ||
801 | |||
802 | info = fbi->info; | ||
803 | |||
804 | unregister_framebuffer(info); | ||
805 | |||
806 | writel(GRA_FRAME_IRQ0_ENA(0x0), fbi->reg_base + SPU_IRQ_ENA); | ||
807 | |||
808 | if (info->cmap.len) | ||
809 | fb_dealloc_cmap(&info->cmap); | ||
810 | |||
811 | irq = platform_get_irq(pdev, 0); | ||
812 | free_irq(irq, fbi); | ||
813 | |||
814 | dma_free_writecombine(fbi->dev, PAGE_ALIGN(info->fix.smem_len), | ||
815 | info->screen_base, info->fix.smem_start); | ||
816 | |||
817 | iounmap(fbi->reg_base); | ||
818 | |||
819 | clk_disable(fbi->clk); | ||
820 | clk_put(fbi->clk); | ||
821 | |||
822 | framebuffer_release(info); | ||
823 | |||
824 | return 0; | ||
825 | } | ||
826 | |||
787 | static struct platform_driver pxa168fb_driver = { | 827 | static struct platform_driver pxa168fb_driver = { |
788 | .driver = { | 828 | .driver = { |
789 | .name = "pxa168-fb", | 829 | .name = "pxa168-fb", |
790 | .owner = THIS_MODULE, | 830 | .owner = THIS_MODULE, |
791 | }, | 831 | }, |
792 | .probe = pxa168fb_probe, | 832 | .probe = pxa168fb_probe, |
833 | .remove = __devexit_p(pxa168fb_remove), | ||
793 | }; | 834 | }; |
794 | 835 | ||
795 | static int __init pxa168fb_init(void) | 836 | static int __init pxa168fb_init(void) |
@@ -798,6 +839,12 @@ static int __init pxa168fb_init(void) | |||
798 | } | 839 | } |
799 | module_init(pxa168fb_init); | 840 | module_init(pxa168fb_init); |
800 | 841 | ||
842 | static void __exit pxa168fb_exit(void) | ||
843 | { | ||
844 | platform_driver_unregister(&pxa168fb_driver); | ||
845 | } | ||
846 | module_exit(pxa168fb_exit); | ||
847 | |||
801 | MODULE_AUTHOR("Lennert Buytenhek <buytenh@marvell.com> " | 848 | MODULE_AUTHOR("Lennert Buytenhek <buytenh@marvell.com> " |
802 | "Green Wan <gwan@marvell.com>"); | 849 | "Green Wan <gwan@marvell.com>"); |
803 | MODULE_DESCRIPTION("Framebuffer driver for PXA168/910"); | 850 | MODULE_DESCRIPTION("Framebuffer driver for PXA168/910"); |