collie: fix missing pcmcia bits
Subsystems (4)
PATCH 1/1 collie: fix missing pcmcia bits
This adds missing bits of collie (sharp sl-5500) PCMCIA support.
arch/arm/mach-sa1100/collie.c +7 -2
@@ -76,6 +76,12 @@ static struct scoop_pcmcia_dev collie_pc }, }; +static struct scoop_pcmcia_config collie_pcmcia_config = { + .devs = &collie_pcmcia_scoop[0 ], + .num_devs =1 , +}; + +static struct mcp_plat_data collie_mcp_data = { .mccr0 =MCCR0_ADM , .sclk_rate =11981000 ,
@@ -242,8 +249,7 @@ static void __init collie_init(void)GPDR |= GPIO_32_768kHz;TUCR = TUCR_32_768kHz; - scoop_num =1 ; - scoop_devs = &collie_pcmcia_scoop[0 ]; + platform_scoop_config = &collie_pcmcia_config; ret =platform_add_devices (devices,ARRAY_SIZE (devices));if (ret) {
drivers/pcmcia/pxa2xx_sharpsl.c +9 -0
@@ -22,6 +22,15 @@#include <asm/hardware.h> #include <asm/irq.h> #include <asm/hardware/scoop.h> +#include <asm/mach-types.h> +#include <linux/delay.h> + +#ifdef CONFIG_SA1100_COLLIE +#include <asm/arch-sa1100/collie.h> +#else +#include <asm/arch/spitz.h> +#include <asm/arch-pxa/pxa-regs.h> +#endif #include "soc_common.h"
Signature · 1 line
Web maintainer for suspend.sf.net (www.sf.net/projects/suspend) wanted...
Quoted 22 lines · Pavel Machek
This adds missing bits of collie (sharp sl-5500) PCMCIA support.
Signed-off-by Pavel Machek <[email protected]>arch/arm/mach-sa1100/collie.c +6
-0@@ -76,6 +76,12 @@ static struct scoop_pcmcia_dev collie_pc }, }; +static struct scoop_pcmcia_config collie_pcmcia_config = { + .devs = &collie_pcmcia_scoop[0 ], + .num_devs =1 , +}; + +static struct mcp_plat_data collie_mcp_data = { .mccr0 =MCCR0_ADM , .sclk_rate =11981000 ,
arch/arm/mach-sa1100/collie.c static void __init collie_init(void) · line 246
Quoted 5 lines
arch/arm/mach-sa1100/collie.c +0
-2@@ -242,8 +249,7 @@ static void __init collie_init(void)GPDR |= GPIO_32_768kHz;TUCR = TUCR_32_768kHz; - scoop_num =1 ; - scoop_devs = &collie_pcmcia_scoop[0 ];
These lines don't exist in mainline kernels anymore? What was this diffed against?
arch/arm/mach-sa1100/collie.c static void __init collie_init(void) · line 252
Quoted 1 line
arch/arm/mach-sa1100/collie.c +1
-0+ platform_scoop_config = &collie_pcmcia_config;
This is fine (and its definition above).
drivers/pcmcia/pxa2xx_sharpsl.c line 25
Quoted 11 lines
arch/arm/mach-sa1100/collie.c +0
-0ret =platform_add_devices (devices,ARRAY_SIZE (devices));if (ret) {drivers/pcmcia/pxa2xx_sharpsl.c +1
-0@@ -22,6 +22,15 @@#include <asm/hardware.h> #include <asm/irq.h> #include <asm/hardware/scoop.h> +#include <asm/mach-types.h>
This is needed but its already in mainline?
drivers/pcmcia/pxa2xx_sharpsl.c line 26
Quoted 1 line
drivers/pcmcia/pxa2xx_sharpsl.c +1
-0+#include <linux/delay.h>
This is no longer needed (and should have been above asm anyway).
drivers/pcmcia/pxa2xx_sharpsl.c line 29
Quoted 3 lines
drivers/pcmcia/pxa2xx_sharpsl.c +3
-0+ +#ifdef CONFIG_SA1100_COLLIE +#include <asm/arch-sa1100/collie.h>
I can't immediately see why this is needed anymore.
drivers/pcmcia/pxa2xx_sharpsl.c line 33
Quoted 4 lines
drivers/pcmcia/pxa2xx_sharpsl.c +4
-0+#else +#include <asm/arch/spitz.h> +#include <asm/arch-pxa/pxa-regs.h> +#endif
These aren't needed.
Richard
Hi!
This adds missing bits of collie (sharp sl-5500) PCMCIA support and MFD support.
---
Quoted 9 lines
Review static void __init collie_init(void) · line 246
Quoted 6 lines
(quoted diff) +0
-2@@ -242,8 +249,7 @@ static void __init collie_init(void) GPDR |= GPIO_32_768kHz; TUCR = TUCR_32_768kHz; - scoop_num = 1; - scoop_devs = &collie_pcmcia_scoop[0];These lines don't exist in mainline kernels anymore? What was this diffed against?
Will check; I used old diff because new diff included too much additional fluff.. oops.
...ahha, oops, sorry, I have some bad stuff in my "good" tree.
Here's updated patch...
Quoted 5 lines
Review static void __init collie_init(void) · line 254
Quoted 3 lines
(quoted diff) +3
-0+ +#ifdef CONFIG_SA1100_COLLIE +#include <asm/arch-sa1100/collie.h>I can't immediately see why this is needed anymore.
It is not. Sorry about it and surrounding changes.
arch/arm/mach-sa1100/collie.c +30 -0
@@ -40,6 +40,7 @@#include <asm/hardware/scoop.h> #include <asm/mach/sharpsl_param.h> #include <asm/hardware/locomo.h> +#include <asm/arch/mcp.h> #include "generic.h"
@@ -66,6 +67,32 @@ struct platform_device colliescoop_devic .resource = collie_scoop_resources, }; +static struct scoop_pcmcia_dev collie_pcmcia_scoop[] = { +{ + .dev = &colliescoop_device.dev, + .irq =COLLIE_IRQ_GPIO_CF_IRQ , + .cd_irq =COLLIE_IRQ_GPIO_CF_CD , + .cd_irq_str ="PCMCIA0 CD" , +}, +}; + +static struct scoop_pcmcia_config collie_pcmcia_config = { + .devs = &collie_pcmcia_scoop[0 ], + .num_devs =1 , +}; + + +static struct mcp_plat_data collie_mcp_data = { + .mccr0 =MCCR0_ADM , + .sclk_rate =11981000 , +}; + + +static struct sa1100_port_fns collie_port_fns__initdata = { + .set_mctrl = collie_uart_set_mctrl, + .get_mctrl = collie_uart_get_mctrl, +}; +static struct resource locomo_resources[] = { [0 ] = {
@@ -153,12 +246,14 @@ static void __init collie_init(void)PPC_LDD6 |PPC_LDD7 |PPC_L_PCLK |PPC_L_LCLK |PPC_L_FCLK |PPC_L_BIAS | \ PPC_TXD1 | PPC_TXD2 | PPC_RXD2 | PPC_TXD3 | PPC_TXD4 | PPC_SCLK | PPC_SFRM );PSDR = (PPC_RXD1 |PPC_RXD2 |PPC_RXD3 |PPC_RXD4 );GAFR |= GPIO_32_768kHz;GPDR |= GPIO_32_768kHz;TUCR = TUCR_32_768kHz; + platform_scoop_config = &collie_pcmcia_config; + ret =platform_add_devices (devices,ARRAY_SIZE (devices));if (ret) {printk (KERN_WARNING "collie: Unable to register LoCoMo device\n" );
@@ -166,6 +302,7 @@ static void __init collie_init(void)sa11x0_set_flash_data (&collie_flash_data, collie_flash_resources,ARRAY_SIZE (collie_flash_resources)); +sa11x0_set_mcp_data (&collie_mcp_data);sharpsl_save_param (); }
Signature · 1 line
Web maintainer for suspend.sf.net (www.sf.net/projects/suspend) wanted...
Quoted 6 lines · Pavel Machek
Hi!
This adds missing bits of collie (sharp sl-5500) PCMCIA support and MFD support.
Signed-off-by Pavel Machek <[email protected]>
Quoted 71 lines
---
arch/arm/mach-sa1100/collie.c +30
-0@@ -40,6 +40,7 @@#include <asm/hardware/scoop.h> #include <asm/mach/sharpsl_param.h> #include <asm/hardware/locomo.h> +#include <asm/arch/mcp.h> #include "generic.h" @@ -66,6 +67,32 @@ struct platform_device colliescoop_devic .resource = collie_scoop_resources, }; +static struct scoop_pcmcia_dev collie_pcmcia_scoop[] = { +{ + .dev = &colliescoop_device.dev, + .irq =COLLIE_IRQ_GPIO_CF_IRQ , + .cd_irq =COLLIE_IRQ_GPIO_CF_CD , + .cd_irq_str ="PCMCIA0 CD" , +}, +}; + +static struct scoop_pcmcia_config collie_pcmcia_config = { + .devs = &collie_pcmcia_scoop[0 ], + .num_devs =1 , +}; + + +static struct mcp_plat_data collie_mcp_data = { + .mccr0 =MCCR0_ADM , + .sclk_rate =11981000 , +}; + + +static struct sa1100_port_fns collie_port_fns__initdata = { + .set_mctrl = collie_uart_set_mctrl, + .get_mctrl = collie_uart_get_mctrl, +}; +static struct resource locomo_resources[] = { [0 ] = {@@ -153,12 +246,14 @@ static void __init collie_init(void)PPC_LDD6 |PPC_LDD7 |PPC_L_PCLK |PPC_L_LCLK |PPC_L_FCLK |PPC_L_BIAS | \ PPC_TXD1 | PPC_TXD2 | PPC_RXD2 | PPC_TXD3 | PPC_TXD4 | PPC_SCLK | PPC_SFRM );PSDR = (PPC_RXD1 |PPC_RXD2 |PPC_RXD3 |PPC_RXD4 );GAFR |= GPIO_32_768kHz;GPDR |= GPIO_32_768kHz;TUCR = TUCR_32_768kHz; + platform_scoop_config = &collie_pcmcia_config; + ret =platform_add_devices (devices,ARRAY_SIZE (devices));if (ret) {printk (KERN_WARNING "collie: Unable to register LoCoMo device\n" );@@ -166,6 +302,7 @@ static void __init collie_init(void)sa11x0_set_flash_data (&collie_flash_data, collie_flash_resources,ARRAY_SIZE (collie_flash_resources)); +sa11x0_set_mcp_data (&collie_mcp_data);sharpsl_save_param (); }