X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Farm%2Fmach-pxa%2Fgeneric.c;h=80f3535e04e6c9a26a2e9dc020af0c5adc9fdecd;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=24f3da29df3e7f1b6bd2f202a34355cfd10ae864;hpb=db216c3d5e4c040e557a50f8f5d35d5c415e8c1c;p=linux-2.6.git diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c index 24f3da29d..80f3535e0 100644 --- a/arch/arm/mach-pxa/generic.c +++ b/arch/arm/mach-pxa/generic.c @@ -58,6 +58,24 @@ void pxa_gpio_mode(int gpio_mode) EXPORT_SYMBOL(pxa_gpio_mode); +/* + * Routine to safely enable or disable a clock in the CKEN + */ +void pxa_set_cken(int clock, int enable) +{ + unsigned long flags; + local_irq_save(flags); + + if (enable) + CKEN |= clock; + else + CKEN &= ~clock; + + local_irq_restore(flags); +} + +EXPORT_SYMBOL(pxa_set_cken); + /* * Intel PXA2xx internal register mapping. * @@ -100,8 +118,8 @@ static struct resource pxamci_resources[] = { static u64 pxamci_dmamask = 0xffffffffUL; static struct platform_device pxamci_device = { - .name = "pxamci", - .id = 0, + .name = "pxa2xx-mci", + .id = -1, .dev = { .dma_mask = &pxamci_dmamask, .coherent_dma_mask = 0xffffffff, @@ -135,8 +153,8 @@ static struct resource pxa2xx_udc_resources[] = { static u64 udc_dma_mask = ~(u32)0; static struct platform_device udc_device = { - .name = "pxa2xx_udc", - .id = 0, + .name = "pxa2xx-udc", + .id = -1, .resource = pxa2xx_udc_resources, .num_resources = ARRAY_SIZE(pxa2xx_udc_resources), .dev = { @@ -169,8 +187,8 @@ static struct resource pxafb_resources[] = { static u64 fb_dma_mask = ~(u64)0; static struct platform_device pxafb_device = { - .name = "pxafb", - .id = 0, + .name = "pxa2xx-fb", + .id = -1, .dev = { .platform_data = &pxa_fb_info, .dma_mask = &fb_dma_mask, @@ -180,10 +198,26 @@ static struct platform_device pxafb_device = { .resource = pxafb_resources, }; +static struct platform_device ffuart_device = { + .name = "pxa2xx-uart", + .id = 0, +}; +static struct platform_device btuart_device = { + .name = "pxa2xx-uart", + .id = 1, +}; +static struct platform_device stuart_device = { + .name = "pxa2xx-uart", + .id = 2, +}; + static struct platform_device *devices[] __initdata = { &pxamci_device, &udc_device, &pxafb_device, + &ffuart_device, + &btuart_device, + &stuart_device, }; static int __init pxa_init(void)