diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-11-05 07:55:04 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-11-05 07:55:04 -0500 |
commit | eef3044965740a5e153d7b1e456e1b3e0fc3e619 (patch) | |
tree | 8f5c38c32a0105e97ddb7af1466b5eefaa9df5ca /arch | |
parent | 91d3f9bacdb4950d2f79fe2ba296aa249f60d06c (diff) | |
parent | c482ae4dcf23fd241321595d71bbe8aee33eabf5 (diff) |
Merge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-pxa/irq.c | 11 | ||||
-rw-r--r-- | arch/arm/mach-pxa/palmtc.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-pxa/spitz.c | 39 |
3 files changed, 37 insertions, 21 deletions
diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c index d694ce289668..6112af431fa4 100644 --- a/arch/arm/mach-pxa/irq.c +++ b/arch/arm/mach-pxa/irq.c | |||
@@ -25,6 +25,8 @@ | |||
25 | 25 | ||
26 | #include "generic.h" | 26 | #include "generic.h" |
27 | 27 | ||
28 | #define MAX_INTERNAL_IRQS 128 | ||
29 | |||
28 | #define IRQ_BIT(n) (((n) - PXA_IRQ(0)) & 0x1f) | 30 | #define IRQ_BIT(n) (((n) - PXA_IRQ(0)) & 0x1f) |
29 | #define _ICMR(n) (*((((n) - PXA_IRQ(0)) & ~0x1f) ? &ICMR2 : &ICMR)) | 31 | #define _ICMR(n) (*((((n) - PXA_IRQ(0)) & ~0x1f) ? &ICMR2 : &ICMR)) |
30 | #define _ICLR(n) (*((((n) - PXA_IRQ(0)) & ~0x1f) ? &ICLR2 : &ICLR)) | 32 | #define _ICLR(n) (*((((n) - PXA_IRQ(0)) & ~0x1f) ? &ICLR2 : &ICLR)) |
@@ -122,6 +124,8 @@ void __init pxa_init_irq(int irq_nr, set_wake_t fn) | |||
122 | { | 124 | { |
123 | int irq, i; | 125 | int irq, i; |
124 | 126 | ||
127 | BUG_ON(irq_nr > MAX_INTERNAL_IRQS); | ||
128 | |||
125 | pxa_internal_irq_nr = irq_nr; | 129 | pxa_internal_irq_nr = irq_nr; |
126 | 130 | ||
127 | for (irq = PXA_IRQ(0); irq < PXA_IRQ(irq_nr); irq += 32) { | 131 | for (irq = PXA_IRQ(0); irq < PXA_IRQ(irq_nr); irq += 32) { |
@@ -149,7 +153,8 @@ void __init pxa_init_irq(int irq_nr, set_wake_t fn) | |||
149 | } | 153 | } |
150 | 154 | ||
151 | #ifdef CONFIG_PM | 155 | #ifdef CONFIG_PM |
152 | static unsigned long saved_icmr[2]; | 156 | static unsigned long saved_icmr[MAX_INTERNAL_IRQS/32]; |
157 | static unsigned long saved_ipr[MAX_INTERNAL_IRQS]; | ||
153 | 158 | ||
154 | static int pxa_irq_suspend(struct sys_device *dev, pm_message_t state) | 159 | static int pxa_irq_suspend(struct sys_device *dev, pm_message_t state) |
155 | { | 160 | { |
@@ -159,6 +164,8 @@ static int pxa_irq_suspend(struct sys_device *dev, pm_message_t state) | |||
159 | saved_icmr[i] = _ICMR(irq); | 164 | saved_icmr[i] = _ICMR(irq); |
160 | _ICMR(irq) = 0; | 165 | _ICMR(irq) = 0; |
161 | } | 166 | } |
167 | for (i = 0; i < pxa_internal_irq_nr; i++) | ||
168 | saved_ipr[i] = IPR(i); | ||
162 | 169 | ||
163 | return 0; | 170 | return 0; |
164 | } | 171 | } |
@@ -171,6 +178,8 @@ static int pxa_irq_resume(struct sys_device *dev) | |||
171 | _ICMR(irq) = saved_icmr[i]; | 178 | _ICMR(irq) = saved_icmr[i]; |
172 | _ICLR(irq) = 0; | 179 | _ICLR(irq) = 0; |
173 | } | 180 | } |
181 | for (i = 0; i < pxa_internal_irq_nr; i++) | ||
182 | IPR(i) = saved_ipr[i]; | ||
174 | 183 | ||
175 | ICCR = 1; | 184 | ICCR = 1; |
176 | return 0; | 185 | return 0; |
diff --git a/arch/arm/mach-pxa/palmtc.c b/arch/arm/mach-pxa/palmtc.c index bb2cc0dd44ec..0b92291a58f6 100644 --- a/arch/arm/mach-pxa/palmtc.c +++ b/arch/arm/mach-pxa/palmtc.c | |||
@@ -292,10 +292,10 @@ const static unsigned int palmtc_keypad_col_gpios[] = { | |||
292 | 292 | ||
293 | static struct matrix_keypad_platform_data palmtc_keypad_platform_data = { | 293 | static struct matrix_keypad_platform_data palmtc_keypad_platform_data = { |
294 | .keymap_data = &palmtc_keymap_data, | 294 | .keymap_data = &palmtc_keymap_data, |
295 | .col_gpios = palmtc_keypad_row_gpios, | 295 | .row_gpios = palmtc_keypad_row_gpios, |
296 | .num_col_gpios = 12, | 296 | .num_row_gpios = ARRAY_SIZE(palmtc_keypad_row_gpios), |
297 | .row_gpios = palmtc_keypad_col_gpios, | 297 | .col_gpios = palmtc_keypad_col_gpios, |
298 | .num_row_gpios = 4, | 298 | .num_col_gpios = ARRAY_SIZE(palmtc_keypad_col_gpios), |
299 | .active_low = 1, | 299 | .active_low = 1, |
300 | 300 | ||
301 | .debounce_ms = 20, | 301 | .debounce_ms = 20, |
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index 82ff5733e4dc..3da45d051743 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c | |||
@@ -779,11 +779,34 @@ static void __init common_init(void) | |||
779 | pxa_set_i2c_info(NULL); | 779 | pxa_set_i2c_info(NULL); |
780 | } | 780 | } |
781 | 781 | ||
782 | #if defined(CONFIG_MACH_AKITA) || defined(CONFIG_MACH_BORZOI) | ||
783 | static struct nand_bbt_descr sharpsl_akita_bbt = { | ||
784 | .options = 0, | ||
785 | .offs = 4, | ||
786 | .len = 1, | ||
787 | .pattern = scan_ff_pattern | ||
788 | }; | ||
789 | |||
790 | static struct nand_ecclayout akita_oobinfo = { | ||
791 | .eccbytes = 24, | ||
792 | .eccpos = { | ||
793 | 0x5, 0x1, 0x2, 0x3, 0x6, 0x7, 0x15, 0x11, | ||
794 | 0x12, 0x13, 0x16, 0x17, 0x25, 0x21, 0x22, 0x23, | ||
795 | 0x26, 0x27, 0x35, 0x31, 0x32, 0x33, 0x36, 0x37}, | ||
796 | .oobfree = {{0x08, 0x09}} | ||
797 | }; | ||
798 | #endif | ||
799 | |||
782 | #if defined(CONFIG_MACH_SPITZ) || defined(CONFIG_MACH_BORZOI) | 800 | #if defined(CONFIG_MACH_SPITZ) || defined(CONFIG_MACH_BORZOI) |
783 | static void __init spitz_init(void) | 801 | static void __init spitz_init(void) |
784 | { | 802 | { |
785 | spitz_ficp_platform_data.gpio_pwdown = SPITZ_GPIO_IR_ON; | 803 | spitz_ficp_platform_data.gpio_pwdown = SPITZ_GPIO_IR_ON; |
786 | 804 | ||
805 | if (machine_is_borzoi()) { | ||
806 | sharpsl_nand_platform_data.badblock_pattern = &sharpsl_akita_bbt; | ||
807 | sharpsl_nand_platform_data.ecc_layout = &akita_oobinfo; | ||
808 | } | ||
809 | |||
787 | platform_scoop_config = &spitz_pcmcia_config; | 810 | platform_scoop_config = &spitz_pcmcia_config; |
788 | 811 | ||
789 | common_init(); | 812 | common_init(); |
@@ -808,22 +831,6 @@ static struct i2c_board_info akita_i2c_board_info[] = { | |||
808 | }, | 831 | }, |
809 | }; | 832 | }; |
810 | 833 | ||
811 | static struct nand_bbt_descr sharpsl_akita_bbt = { | ||
812 | .options = 0, | ||
813 | .offs = 4, | ||
814 | .len = 1, | ||
815 | .pattern = scan_ff_pattern | ||
816 | }; | ||
817 | |||
818 | static struct nand_ecclayout akita_oobinfo = { | ||
819 | .eccbytes = 24, | ||
820 | .eccpos = { | ||
821 | 0x5, 0x1, 0x2, 0x3, 0x6, 0x7, 0x15, 0x11, | ||
822 | 0x12, 0x13, 0x16, 0x17, 0x25, 0x21, 0x22, 0x23, | ||
823 | 0x26, 0x27, 0x35, 0x31, 0x32, 0x33, 0x36, 0x37}, | ||
824 | .oobfree = {{0x08, 0x09}} | ||
825 | }; | ||
826 | |||
827 | static void __init akita_init(void) | 834 | static void __init akita_init(void) |
828 | { | 835 | { |
829 | spitz_ficp_platform_data.gpio_pwdown = AKITA_GPIO_IR_ON; | 836 | spitz_ficp_platform_data.gpio_pwdown = AKITA_GPIO_IR_ON; |