diff options
author | Marek Vasut <marek.vasut@gmail.com> | 2010-07-07 08:32:18 -0400 |
---|---|---|
committer | Eric Miao <eric.y.miao@gmail.com> | 2010-08-05 02:32:42 -0400 |
commit | 084115946ae4b1f1f0670c6a26febba5faa3899c (patch) | |
tree | a3d80078a986203eea04de4c4e5f351c4cbfb5cc /arch/arm/mach-pxa | |
parent | 2d679827e5b45e737fe86ab399b0891dd0cf00cb (diff) |
[ARM] pxa/spitz: Formating and naming fixes
Improve formating so checkpatch passes. Also, change some function and variable
names to make the naming consistent.
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Diffstat (limited to 'arch/arm/mach-pxa')
-rw-r--r-- | arch/arm/mach-pxa/spitz.c | 282 |
1 files changed, 138 insertions, 144 deletions
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index 24c4d271b219..a8d4e3abb569 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c | |||
@@ -133,10 +133,8 @@ static unsigned long spitz_pin_config[] __initdata = { | |||
133 | * Scoop GPIO expander | 133 | * Scoop GPIO expander |
134 | ******************************************************************************/ | 134 | ******************************************************************************/ |
135 | #if defined(CONFIG_SHARP_SCOOP) || defined(CONFIG_SHARP_SCOOP_MODULE) | 135 | #if defined(CONFIG_SHARP_SCOOP) || defined(CONFIG_SHARP_SCOOP_MODULE) |
136 | /* | 136 | /* SCOOP Device #1 */ |
137 | * Spitz SCOOP Device #1 | 137 | static struct resource spitz_scoop_1_resources[] = { |
138 | */ | ||
139 | static struct resource spitz_scoop_resources[] = { | ||
140 | [0] = { | 138 | [0] = { |
141 | .start = 0x10800000, | 139 | .start = 0x10800000, |
142 | .end = 0x10800fff, | 140 | .end = 0x10800fff, |
@@ -144,7 +142,7 @@ static struct resource spitz_scoop_resources[] = { | |||
144 | }, | 142 | }, |
145 | }; | 143 | }; |
146 | 144 | ||
147 | static struct scoop_config spitz_scoop_setup = { | 145 | static struct scoop_config spitz_scoop_1_setup = { |
148 | .io_dir = SPITZ_SCP_IO_DIR, | 146 | .io_dir = SPITZ_SCP_IO_DIR, |
149 | .io_out = SPITZ_SCP_IO_OUT, | 147 | .io_out = SPITZ_SCP_IO_OUT, |
150 | .suspend_clr = SPITZ_SCP_SUS_CLR, | 148 | .suspend_clr = SPITZ_SCP_SUS_CLR, |
@@ -152,20 +150,18 @@ static struct scoop_config spitz_scoop_setup = { | |||
152 | .gpio_base = SPITZ_SCP_GPIO_BASE, | 150 | .gpio_base = SPITZ_SCP_GPIO_BASE, |
153 | }; | 151 | }; |
154 | 152 | ||
155 | struct platform_device spitzscoop_device = { | 153 | struct platform_device spitz_scoop_1_device = { |
156 | .name = "sharp-scoop", | 154 | .name = "sharp-scoop", |
157 | .id = 0, | 155 | .id = 0, |
158 | .dev = { | 156 | .dev = { |
159 | .platform_data = &spitz_scoop_setup, | 157 | .platform_data = &spitz_scoop_1_setup, |
160 | }, | 158 | }, |
161 | .num_resources = ARRAY_SIZE(spitz_scoop_resources), | 159 | .num_resources = ARRAY_SIZE(spitz_scoop_1_resources), |
162 | .resource = spitz_scoop_resources, | 160 | .resource = spitz_scoop_1_resources, |
163 | }; | 161 | }; |
164 | 162 | ||
165 | /* | 163 | /* SCOOP Device #2 */ |
166 | * Spitz SCOOP Device #2 | 164 | static struct resource spitz_scoop_2_resources[] = { |
167 | */ | ||
168 | static struct resource spitz_scoop2_resources[] = { | ||
169 | [0] = { | 165 | [0] = { |
170 | .start = 0x08800040, | 166 | .start = 0x08800040, |
171 | .end = 0x08800fff, | 167 | .end = 0x08800fff, |
@@ -173,7 +169,7 @@ static struct resource spitz_scoop2_resources[] = { | |||
173 | }, | 169 | }, |
174 | }; | 170 | }; |
175 | 171 | ||
176 | static struct scoop_config spitz_scoop2_setup = { | 172 | static struct scoop_config spitz_scoop_2_setup = { |
177 | .io_dir = SPITZ_SCP2_IO_DIR, | 173 | .io_dir = SPITZ_SCP2_IO_DIR, |
178 | .io_out = SPITZ_SCP2_IO_OUT, | 174 | .io_out = SPITZ_SCP2_IO_OUT, |
179 | .suspend_clr = SPITZ_SCP2_SUS_CLR, | 175 | .suspend_clr = SPITZ_SCP2_SUS_CLR, |
@@ -181,23 +177,23 @@ static struct scoop_config spitz_scoop2_setup = { | |||
181 | .gpio_base = SPITZ_SCP2_GPIO_BASE, | 177 | .gpio_base = SPITZ_SCP2_GPIO_BASE, |
182 | }; | 178 | }; |
183 | 179 | ||
184 | struct platform_device spitzscoop2_device = { | 180 | struct platform_device spitz_scoop_2_device = { |
185 | .name = "sharp-scoop", | 181 | .name = "sharp-scoop", |
186 | .id = 1, | 182 | .id = 1, |
187 | .dev = { | 183 | .dev = { |
188 | .platform_data = &spitz_scoop2_setup, | 184 | .platform_data = &spitz_scoop_2_setup, |
189 | }, | 185 | }, |
190 | .num_resources = ARRAY_SIZE(spitz_scoop2_resources), | 186 | .num_resources = ARRAY_SIZE(spitz_scoop_2_resources), |
191 | .resource = spitz_scoop2_resources, | 187 | .resource = spitz_scoop_2_resources, |
192 | }; | 188 | }; |
193 | 189 | ||
194 | static void __init spitz_scoop_init(void) | 190 | static void __init spitz_scoop_init(void) |
195 | { | 191 | { |
196 | platform_device_register(&spitz_scoop1_device); | 192 | platform_device_register(&spitz_scoop_1_device); |
197 | 193 | ||
198 | /* Akita doesn't have the second SCOOP chip */ | 194 | /* Akita doesn't have the second SCOOP chip */ |
199 | if (!machine_is_akita()) | 195 | if (!machine_is_akita()) |
200 | platform_device_register(&spitzscoop2_device); | 196 | platform_device_register(&spitz_scoop_2_device); |
201 | } | 197 | } |
202 | 198 | ||
203 | /* Power control is shared with between one of the CF slots and SD */ | 199 | /* Power control is shared with between one of the CF slots and SD */ |
@@ -250,22 +246,22 @@ static void spitz_pcmcia_pwr(struct device *scoop, uint16_t cpr, int nr) | |||
250 | } | 246 | } |
251 | 247 | ||
252 | static struct scoop_pcmcia_dev spitz_pcmcia_scoop[] = { | 248 | static struct scoop_pcmcia_dev spitz_pcmcia_scoop[] = { |
253 | { | 249 | { |
254 | .dev = &spitzscoop_device.dev, | 250 | .dev = &spitz_scoop_1_device.dev, |
255 | .irq = SPITZ_IRQ_GPIO_CF_IRQ, | 251 | .irq = SPITZ_IRQ_GPIO_CF_IRQ, |
256 | .cd_irq = SPITZ_IRQ_GPIO_CF_CD, | 252 | .cd_irq = SPITZ_IRQ_GPIO_CF_CD, |
257 | .cd_irq_str = "PCMCIA0 CD", | 253 | .cd_irq_str = "PCMCIA0 CD", |
258 | },{ | 254 | }, { |
259 | .dev = &spitzscoop2_device.dev, | 255 | .dev = &spitz_scoop_2_device.dev, |
260 | .irq = SPITZ_IRQ_GPIO_CF2_IRQ, | 256 | .irq = SPITZ_IRQ_GPIO_CF2_IRQ, |
261 | .cd_irq = -1, | 257 | .cd_irq = -1, |
262 | }, | 258 | }, |
263 | }; | 259 | }; |
264 | 260 | ||
265 | static struct scoop_pcmcia_config spitz_pcmcia_config = { | 261 | static struct scoop_pcmcia_config spitz_pcmcia_config = { |
266 | .devs = &spitz_pcmcia_scoop[0], | 262 | .devs = &spitz_pcmcia_scoop[0], |
267 | .num_devs = 2, | 263 | .num_devs = 2, |
268 | .power_ctrl = spitz_pcmcia_pwr, | 264 | .power_ctrl = spitz_pcmcia_pwr, |
269 | }; | 265 | }; |
270 | 266 | ||
271 | static void __init spitz_pcmcia_init(void) | 267 | static void __init spitz_pcmcia_init(void) |
@@ -300,7 +296,7 @@ static inline void spitz_pcmcia_init(void) {} | |||
300 | #define SPITZ_KEY_OK KEY_F11 | 296 | #define SPITZ_KEY_OK KEY_F11 |
301 | #define SPITZ_KEY_MENU KEY_F12 | 297 | #define SPITZ_KEY_MENU KEY_F12 |
302 | 298 | ||
303 | static const uint32_t spitzkbd_keymap[] = { | 299 | static const uint32_t spitz_keymap[] = { |
304 | KEY(0, 0, KEY_LEFTCTRL), | 300 | KEY(0, 0, KEY_LEFTCTRL), |
305 | KEY(0, 1, KEY_1), | 301 | KEY(0, 1, KEY_1), |
306 | KEY(0, 2, KEY_3), | 302 | KEY(0, 2, KEY_3), |
@@ -367,38 +363,38 @@ static const uint32_t spitzkbd_keymap[] = { | |||
367 | KEY(6, 8, KEY_RIGHT), | 363 | KEY(6, 8, KEY_RIGHT), |
368 | }; | 364 | }; |
369 | 365 | ||
370 | static const struct matrix_keymap_data spitzkbd_keymap_data = { | 366 | static const struct matrix_keymap_data spitz_keymap_data = { |
371 | .keymap = spitzkbd_keymap, | 367 | .keymap = spitz_keymap, |
372 | .keymap_size = ARRAY_SIZE(spitzkbd_keymap), | 368 | .keymap_size = ARRAY_SIZE(spitz_keymap), |
373 | }; | 369 | }; |
374 | 370 | ||
375 | static const uint32_t spitzkbd_row_gpios[] = | 371 | static const uint32_t spitz_row_gpios[] = |
376 | { 12, 17, 91, 34, 36, 38, 39 }; | 372 | { 12, 17, 91, 34, 36, 38, 39 }; |
377 | static const uint32_t spitzkbd_col_gpios[] = | 373 | static const uint32_t spitz_col_gpios[] = |
378 | { 88, 23, 24, 25, 26, 27, 52, 103, 107, 108, 114 }; | 374 | { 88, 23, 24, 25, 26, 27, 52, 103, 107, 108, 114 }; |
379 | 375 | ||
380 | static struct matrix_keypad_platform_data spitzkbd_pdata = { | 376 | static struct matrix_keypad_platform_data spitz_mkp_pdata = { |
381 | .keymap_data = &spitzkbd_keymap_data, | 377 | .keymap_data = &spitz_keymap_data, |
382 | .row_gpios = spitzkbd_row_gpios, | 378 | .row_gpios = spitz_row_gpios, |
383 | .col_gpios = spitzkbd_col_gpios, | 379 | .col_gpios = spitz_col_gpios, |
384 | .num_row_gpios = ARRAY_SIZE(spitzkbd_row_gpios), | 380 | .num_row_gpios = ARRAY_SIZE(spitz_row_gpios), |
385 | .num_col_gpios = ARRAY_SIZE(spitzkbd_col_gpios), | 381 | .num_col_gpios = ARRAY_SIZE(spitz_col_gpios), |
386 | .col_scan_delay_us = 10, | 382 | .col_scan_delay_us = 10, |
387 | .debounce_ms = 10, | 383 | .debounce_ms = 10, |
388 | .wakeup = 1, | 384 | .wakeup = 1, |
389 | }; | 385 | }; |
390 | 386 | ||
391 | static struct platform_device spitzkbd_device = { | 387 | static struct platform_device spitz_mkp_device = { |
392 | .name = "matrix-keypad", | 388 | .name = "matrix-keypad", |
393 | .id = -1, | 389 | .id = -1, |
394 | .dev = { | 390 | .dev = { |
395 | .platform_data = &spitzkbd_pdata, | 391 | .platform_data = &spitz_mkp_pdata, |
396 | }, | 392 | }, |
397 | }; | 393 | }; |
398 | 394 | ||
399 | static void __init spitz_mkp_init(void) | 395 | static void __init spitz_mkp_init(void) |
400 | { | 396 | { |
401 | platform_device_register(&spitzkbd_device); | 397 | platform_device_register(&spitz_mkp_device); |
402 | } | 398 | } |
403 | #else | 399 | #else |
404 | static inline void spitz_mkp_init(void) {} | 400 | static inline void spitz_mkp_init(void) {} |
@@ -474,17 +470,17 @@ static struct gpio_led_platform_data spitz_gpio_leds_info = { | |||
474 | .num_leds = ARRAY_SIZE(spitz_gpio_leds), | 470 | .num_leds = ARRAY_SIZE(spitz_gpio_leds), |
475 | }; | 471 | }; |
476 | 472 | ||
477 | static struct platform_device spitzled_device = { | 473 | static struct platform_device spitz_led_device = { |
478 | .name = "leds-gpio", | 474 | .name = "leds-gpio", |
479 | .id = -1, | 475 | .id = -1, |
480 | .dev = { | 476 | .dev = { |
481 | .platform_data = &spitz_gpio_leds_info, | 477 | .platform_data = &spitz_gpio_leds_info, |
482 | }, | 478 | }, |
483 | }; | 479 | }; |
484 | 480 | ||
485 | static void __init spitz_leds_init(void) | 481 | static void __init spitz_leds_init(void) |
486 | { | 482 | { |
487 | platform_device_register(&spitzled_device); | 483 | platform_device_register(&spitz_led_device); |
488 | } | 484 | } |
489 | #else | 485 | #else |
490 | static inline void spitz_leds_init(void) {} | 486 | static inline void spitz_leds_init(void) {} |
@@ -494,7 +490,7 @@ static inline void spitz_leds_init(void) {} | |||
494 | * SSP Devices | 490 | * SSP Devices |
495 | ******************************************************************************/ | 491 | ******************************************************************************/ |
496 | #if defined(CONFIG_SPI_PXA2XX) || defined(CONFIG_SPI_PXA2XX_MODULE) | 492 | #if defined(CONFIG_SPI_PXA2XX) || defined(CONFIG_SPI_PXA2XX_MODULE) |
497 | static void spitz_wait_for_hsync(void) | 493 | static void spitz_ads7846_wait_for_hsync(void) |
498 | { | 494 | { |
499 | while (gpio_get_value(SPITZ_GPIO_HSYNC)) | 495 | while (gpio_get_value(SPITZ_GPIO_HSYNC)) |
500 | cpu_relax(); | 496 | cpu_relax(); |
@@ -510,7 +506,7 @@ static struct ads7846_platform_data spitz_ads7846_info = { | |||
510 | .y_plate_ohms = 486, | 506 | .y_plate_ohms = 486, |
511 | .pressure_max = 1024, | 507 | .pressure_max = 1024, |
512 | .gpio_pendown = SPITZ_GPIO_TP_INT, | 508 | .gpio_pendown = SPITZ_GPIO_TP_INT, |
513 | .wait_for_sync = spitz_wait_for_hsync, | 509 | .wait_for_sync = spitz_ads7846_wait_for_hsync, |
514 | }; | 510 | }; |
515 | 511 | ||
516 | static struct pxa2xx_spi_chip spitz_ads7846_chip = { | 512 | static struct pxa2xx_spi_chip spitz_ads7846_chip = { |
@@ -548,26 +544,26 @@ static struct pxa2xx_spi_chip spitz_max1111_chip = { | |||
548 | 544 | ||
549 | static struct spi_board_info spitz_spi_devices[] = { | 545 | static struct spi_board_info spitz_spi_devices[] = { |
550 | { | 546 | { |
551 | .modalias = "ads7846", | 547 | .modalias = "ads7846", |
552 | .max_speed_hz = 1200000, | 548 | .max_speed_hz = 1200000, |
553 | .bus_num = 2, | 549 | .bus_num = 2, |
554 | .chip_select = 0, | 550 | .chip_select = 0, |
555 | .platform_data = &spitz_ads7846_info, | 551 | .platform_data = &spitz_ads7846_info, |
556 | .controller_data= &spitz_ads7846_chip, | 552 | .controller_data = &spitz_ads7846_chip, |
557 | .irq = gpio_to_irq(SPITZ_GPIO_TP_INT), | 553 | .irq = gpio_to_irq(SPITZ_GPIO_TP_INT), |
558 | }, { | 554 | }, { |
559 | .modalias = "corgi-lcd", | 555 | .modalias = "corgi-lcd", |
560 | .max_speed_hz = 50000, | 556 | .max_speed_hz = 50000, |
561 | .bus_num = 2, | 557 | .bus_num = 2, |
562 | .chip_select = 1, | 558 | .chip_select = 1, |
563 | .platform_data = &spitz_lcdcon_info, | 559 | .platform_data = &spitz_lcdcon_info, |
564 | .controller_data= &spitz_lcdcon_chip, | 560 | .controller_data = &spitz_lcdcon_chip, |
565 | }, { | 561 | }, { |
566 | .modalias = "max1111", | 562 | .modalias = "max1111", |
567 | .max_speed_hz = 450000, | 563 | .max_speed_hz = 450000, |
568 | .bus_num = 2, | 564 | .bus_num = 2, |
569 | .chip_select = 2, | 565 | .chip_select = 2, |
570 | .controller_data= &spitz_max1111_chip, | 566 | .controller_data = &spitz_max1111_chip, |
571 | }, | 567 | }, |
572 | }; | 568 | }; |
573 | 569 | ||
@@ -575,7 +571,7 @@ static struct pxa2xx_spi_master spitz_spi_info = { | |||
575 | .num_chipselect = 3, | 571 | .num_chipselect = 3, |
576 | }; | 572 | }; |
577 | 573 | ||
578 | static void __init spitz_init_spi(void) | 574 | static void __init spitz_spi_init(void) |
579 | { | 575 | { |
580 | struct corgi_lcd_platform_data *lcd_data = &spitz_lcdcon_info; | 576 | struct corgi_lcd_platform_data *lcd_data = &spitz_lcdcon_info; |
581 | 577 | ||
@@ -588,7 +584,7 @@ static void __init spitz_init_spi(void) | |||
588 | spi_register_board_info(ARRAY_AND_SIZE(spitz_spi_devices)); | 584 | spi_register_board_info(ARRAY_AND_SIZE(spitz_spi_devices)); |
589 | } | 585 | } |
590 | #else | 586 | #else |
591 | static inline void spitz_init_spi(void) {} | 587 | static inline void spitz_spi_init(void) {} |
592 | #endif | 588 | #endif |
593 | 589 | ||
594 | /****************************************************************************** | 590 | /****************************************************************************** |
@@ -612,7 +608,7 @@ static void spitz_mci_setpower(struct device *dev, unsigned int vdd) | |||
612 | static struct pxamci_platform_data spitz_mci_platform_data = { | 608 | static struct pxamci_platform_data spitz_mci_platform_data = { |
613 | .detect_delay_ms = 250, | 609 | .detect_delay_ms = 250, |
614 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, | 610 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, |
615 | .setpower = spitz_mci_setpower, | 611 | .setpower = spitz_mci_setpower, |
616 | .gpio_card_detect = SPITZ_GPIO_nSD_DETECT, | 612 | .gpio_card_detect = SPITZ_GPIO_nSD_DETECT, |
617 | .gpio_card_ro = SPITZ_GPIO_nSD_WP, | 613 | .gpio_card_ro = SPITZ_GPIO_nSD_WP, |
618 | .gpio_power = -1, | 614 | .gpio_power = -1, |
@@ -691,31 +687,31 @@ static inline void spitz_irda_init(void) {} | |||
691 | ******************************************************************************/ | 687 | ******************************************************************************/ |
692 | #if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE) | 688 | #if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE) |
693 | static struct pxafb_mode_info spitz_pxafb_modes[] = { | 689 | static struct pxafb_mode_info spitz_pxafb_modes[] = { |
694 | { | 690 | { |
695 | .pixclock = 19231, | 691 | .pixclock = 19231, |
696 | .xres = 480, | 692 | .xres = 480, |
697 | .yres = 640, | 693 | .yres = 640, |
698 | .bpp = 16, | 694 | .bpp = 16, |
699 | .hsync_len = 40, | 695 | .hsync_len = 40, |
700 | .left_margin = 46, | 696 | .left_margin = 46, |
701 | .right_margin = 125, | 697 | .right_margin = 125, |
702 | .vsync_len = 3, | 698 | .vsync_len = 3, |
703 | .upper_margin = 1, | 699 | .upper_margin = 1, |
704 | .lower_margin = 0, | 700 | .lower_margin = 0, |
705 | .sync = 0, | 701 | .sync = 0, |
706 | },{ | 702 | }, { |
707 | .pixclock = 134617, | 703 | .pixclock = 134617, |
708 | .xres = 240, | 704 | .xres = 240, |
709 | .yres = 320, | 705 | .yres = 320, |
710 | .bpp = 16, | 706 | .bpp = 16, |
711 | .hsync_len = 20, | 707 | .hsync_len = 20, |
712 | .left_margin = 20, | 708 | .left_margin = 20, |
713 | .right_margin = 46, | 709 | .right_margin = 46, |
714 | .vsync_len = 2, | 710 | .vsync_len = 2, |
715 | .upper_margin = 1, | 711 | .upper_margin = 1, |
716 | .lower_margin = 0, | 712 | .lower_margin = 0, |
717 | .sync = 0, | 713 | .sync = 0, |
718 | }, | 714 | }, |
719 | }; | 715 | }; |
720 | 716 | ||
721 | static struct pxafb_mach_info spitz_pxafb_info = { | 717 | static struct pxafb_mach_info spitz_pxafb_info = { |
@@ -737,17 +733,15 @@ static inline void spitz_lcd_init(void) {} | |||
737 | * Framebuffer | 733 | * Framebuffer |
738 | ******************************************************************************/ | 734 | ******************************************************************************/ |
739 | #if defined(CONFIG_MTD_NAND_SHARPSL) || defined(CONFIG_MTD_NAND_SHARPSL_MODULE) | 735 | #if defined(CONFIG_MTD_NAND_SHARPSL) || defined(CONFIG_MTD_NAND_SHARPSL_MODULE) |
740 | static struct mtd_partition sharpsl_nand_partitions[] = { | 736 | static struct mtd_partition spitz_nand_partitions[] = { |
741 | { | 737 | { |
742 | .name = "System Area", | 738 | .name = "System Area", |
743 | .offset = 0, | 739 | .offset = 0, |
744 | .size = 7 * 1024 * 1024, | 740 | .size = 7 * 1024 * 1024, |
745 | }, | 741 | }, { |
746 | { | ||
747 | .name = "Root Filesystem", | 742 | .name = "Root Filesystem", |
748 | .offset = 7 * 1024 * 1024, | 743 | .offset = 7 * 1024 * 1024, |
749 | }, | 744 | }, { |
750 | { | ||
751 | .name = "Home Filesystem", | 745 | .name = "Home Filesystem", |
752 | .offset = MTDPART_OFS_APPEND, | 746 | .offset = MTDPART_OFS_APPEND, |
753 | .size = MTDPART_SIZ_FULL, | 747 | .size = MTDPART_SIZ_FULL, |
@@ -756,14 +750,14 @@ static struct mtd_partition sharpsl_nand_partitions[] = { | |||
756 | 750 | ||
757 | static uint8_t scan_ff_pattern[] = { 0xff, 0xff }; | 751 | static uint8_t scan_ff_pattern[] = { 0xff, 0xff }; |
758 | 752 | ||
759 | static struct nand_bbt_descr sharpsl_bbt = { | 753 | static struct nand_bbt_descr spitz_nand_bbt = { |
760 | .options = 0, | 754 | .options = 0, |
761 | .offs = 4, | 755 | .offs = 4, |
762 | .len = 2, | 756 | .len = 2, |
763 | .pattern = scan_ff_pattern | 757 | .pattern = scan_ff_pattern |
764 | }; | 758 | }; |
765 | 759 | ||
766 | static struct nand_ecclayout spitz_akita_oobinfo = { | 760 | static struct nand_ecclayout akita_oobinfo = { |
767 | .oobfree = { {0x08, 0x09} }, | 761 | .oobfree = { {0x08, 0x09} }, |
768 | .eccbytes = 24, | 762 | .eccbytes = 24, |
769 | .eccpos = { | 763 | .eccpos = { |
@@ -773,13 +767,13 @@ static struct nand_ecclayout spitz_akita_oobinfo = { | |||
773 | }, | 767 | }, |
774 | }; | 768 | }; |
775 | 769 | ||
776 | static struct sharpsl_nand_platform_data sharpsl_nand_platform_data = { | 770 | static struct sharpsl_nand_platform_data spitz_nand_pdata = { |
777 | .badblock_pattern = &sharpsl_bbt, | 771 | .badblock_pattern = &spitz_nand_bbt, |
778 | .partitions = sharpsl_nand_partitions, | 772 | .partitions = spitz_nand_partitions, |
779 | .nr_partitions = ARRAY_SIZE(sharpsl_nand_partitions), | 773 | .nr_partitions = ARRAY_SIZE(spitz_nand_partitions), |
780 | }; | 774 | }; |
781 | 775 | ||
782 | static struct resource sharpsl_nand_resources[] = { | 776 | static struct resource spitz_nand_resources[] = { |
783 | { | 777 | { |
784 | .start = PXA_CS3_PHYS, | 778 | .start = PXA_CS3_PHYS, |
785 | .end = PXA_CS3_PHYS + SZ_4K - 1, | 779 | .end = PXA_CS3_PHYS + SZ_4K - 1, |
@@ -787,31 +781,31 @@ static struct resource sharpsl_nand_resources[] = { | |||
787 | }, | 781 | }, |
788 | }; | 782 | }; |
789 | 783 | ||
790 | static struct platform_device sharpsl_nand_device = { | 784 | static struct platform_device spitz_nand_device = { |
791 | .name = "sharpsl-nand", | 785 | .name = "sharpsl-nand", |
792 | .id = -1, | 786 | .id = -1, |
793 | .resource = sharpsl_nand_resources, | 787 | .resource = spitz_nand_resources, |
794 | .num_resources = ARRAY_SIZE(sharpsl_nand_resources), | 788 | .num_resources = ARRAY_SIZE(spitz_nand_resources), |
795 | .dev = { | 789 | .dev = { |
796 | .platform_data = &sharpsl_nand_platform_data, | 790 | .platform_data = &spitz_nand_pdata, |
797 | } | 791 | } |
798 | }; | 792 | }; |
799 | 793 | ||
800 | static void __init spitz_nand_init(void) | 794 | static void __init spitz_nand_init(void) |
801 | { | 795 | { |
802 | if (machine_is_spitz()) { | 796 | if (machine_is_spitz()) { |
803 | sharpsl_nand_partitions[1].size = 5 * 1024 * 1024; | 797 | spitz_nand_partitions[1].size = 5 * 1024 * 1024; |
804 | } else if (machine_is_akita()) { | 798 | } else if (machine_is_akita()) { |
805 | sharpsl_nand_partitions[1].size = 58 * 1024 * 1024; | 799 | spitz_nand_partitions[1].size = 58 * 1024 * 1024; |
806 | sharpsl_nand_bbt.len = 1; | 800 | spitz_nand_bbt.len = 1; |
807 | sharpsl_nand_pdata.ecc_layout = &spitz_akita_oobinfo; | 801 | spitz_nand_pdata.ecc_layout = &akita_oobinfo; |
808 | } else if (machine_is_borzoi()) { | 802 | } else if (machine_is_borzoi()) { |
809 | sharpsl_nand_partitions[1].size = 32 * 1024 * 1024; | 803 | spitz_nand_partitions[1].size = 32 * 1024 * 1024; |
810 | sharpsl_nand_bbt.len = 1; | 804 | spitz_nand_bbt.len = 1; |
811 | sharpsl_nand_pdata.ecc_layout = &spitz_akita_oobinfo; | 805 | spitz_nand_pdata.ecc_layout = &akita_oobinfo; |
812 | } | 806 | } |
813 | 807 | ||
814 | platform_device_register(&sharpsl_nand_device); | 808 | platform_device_register(&spitz_nand_device); |
815 | } | 809 | } |
816 | #else | 810 | #else |
817 | static inline void spitz_nand_init(void) {} | 811 | static inline void spitz_nand_init(void) {} |
@@ -821,7 +815,7 @@ static inline void spitz_nand_init(void) {} | |||
821 | * NOR Flash | 815 | * NOR Flash |
822 | ******************************************************************************/ | 816 | ******************************************************************************/ |
823 | #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) | 817 | #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) |
824 | static struct mtd_partition sharpsl_rom_parts[] = { | 818 | static struct mtd_partition spitz_rom_parts[] = { |
825 | { | 819 | { |
826 | .name ="Boot PROM Filesystem", | 820 | .name ="Boot PROM Filesystem", |
827 | .offset = 0x00140000, | 821 | .offset = 0x00140000, |
@@ -829,13 +823,13 @@ static struct mtd_partition sharpsl_rom_parts[] = { | |||
829 | }, | 823 | }, |
830 | }; | 824 | }; |
831 | 825 | ||
832 | static struct physmap_flash_data sharpsl_rom_data = { | 826 | static struct physmap_flash_data spitz_rom_data = { |
833 | .width = 2, | 827 | .width = 2, |
834 | .nr_parts = ARRAY_SIZE(sharpsl_rom_parts), | 828 | .nr_parts = ARRAY_SIZE(spitz_rom_parts), |
835 | .parts = sharpsl_rom_parts, | 829 | .parts = spitz_rom_parts, |
836 | }; | 830 | }; |
837 | 831 | ||
838 | static struct resource sharpsl_rom_resources[] = { | 832 | static struct resource spitz_rom_resources[] = { |
839 | { | 833 | { |
840 | .start = PXA_CS0_PHYS, | 834 | .start = PXA_CS0_PHYS, |
841 | .end = PXA_CS0_PHYS + SZ_8M - 1, | 835 | .end = PXA_CS0_PHYS + SZ_8M - 1, |
@@ -843,19 +837,19 @@ static struct resource sharpsl_rom_resources[] = { | |||
843 | }, | 837 | }, |
844 | }; | 838 | }; |
845 | 839 | ||
846 | static struct platform_device sharpsl_rom_device = { | 840 | static struct platform_device spitz_rom_device = { |
847 | .name = "physmap-flash", | 841 | .name = "physmap-flash", |
848 | .id = -1, | 842 | .id = -1, |
849 | .resource = sharpsl_rom_resources, | 843 | .resource = spitz_rom_resources, |
850 | .num_resources = ARRAY_SIZE(sharpsl_rom_resources), | 844 | .num_resources = ARRAY_SIZE(spitz_rom_resources), |
851 | .dev = { | 845 | .dev = { |
852 | .platform_data = &sharpsl_rom_data, | 846 | .platform_data = &spitz_rom_data, |
853 | }, | 847 | }, |
854 | }; | 848 | }; |
855 | 849 | ||
856 | static void __init spitz_nor_init(void) | 850 | static void __init spitz_nor_init(void) |
857 | { | 851 | { |
858 | platform_device_register(&sharpsl_rom_device); | 852 | platform_device_register(&spitz_rom_device); |
859 | } | 853 | } |
860 | #else | 854 | #else |
861 | static inline void spitz_nor_init(void) {} | 855 | static inline void spitz_nor_init(void) {} |
@@ -959,7 +953,7 @@ static void __init spitz_init(void) | |||
959 | pxa_set_btuart_info(NULL); | 953 | pxa_set_btuart_info(NULL); |
960 | pxa_set_stuart_info(NULL); | 954 | pxa_set_stuart_info(NULL); |
961 | 955 | ||
962 | spitz_init_spi(); | 956 | spitz_spi_init(); |
963 | spitz_scoop_init(); | 957 | spitz_scoop_init(); |
964 | spitz_mkp_init(); | 958 | spitz_mkp_init(); |
965 | spitz_keys_init(); | 959 | spitz_keys_init(); |
@@ -974,7 +968,7 @@ static void __init spitz_init(void) | |||
974 | spitz_i2c_init(); | 968 | spitz_i2c_init(); |
975 | } | 969 | } |
976 | 970 | ||
977 | static void __init fixup_spitz(struct machine_desc *desc, | 971 | static void __init spitz_fixup(struct machine_desc *desc, |
978 | struct tag *tags, char **cmdline, struct meminfo *mi) | 972 | struct tag *tags, char **cmdline, struct meminfo *mi) |
979 | { | 973 | { |
980 | sharpsl_save_param(); | 974 | sharpsl_save_param(); |
@@ -988,7 +982,7 @@ static void __init fixup_spitz(struct machine_desc *desc, | |||
988 | MACHINE_START(SPITZ, "SHARP Spitz") | 982 | MACHINE_START(SPITZ, "SHARP Spitz") |
989 | .phys_io = 0x40000000, | 983 | .phys_io = 0x40000000, |
990 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, | 984 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, |
991 | .fixup = fixup_spitz, | 985 | .fixup = spitz_fixup, |
992 | .map_io = pxa_map_io, | 986 | .map_io = pxa_map_io, |
993 | .init_irq = pxa27x_init_irq, | 987 | .init_irq = pxa27x_init_irq, |
994 | .init_machine = spitz_init, | 988 | .init_machine = spitz_init, |
@@ -1000,7 +994,7 @@ MACHINE_END | |||
1000 | MACHINE_START(BORZOI, "SHARP Borzoi") | 994 | MACHINE_START(BORZOI, "SHARP Borzoi") |
1001 | .phys_io = 0x40000000, | 995 | .phys_io = 0x40000000, |
1002 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, | 996 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, |
1003 | .fixup = fixup_spitz, | 997 | .fixup = spitz_fixup, |
1004 | .map_io = pxa_map_io, | 998 | .map_io = pxa_map_io, |
1005 | .init_irq = pxa27x_init_irq, | 999 | .init_irq = pxa27x_init_irq, |
1006 | .init_machine = spitz_init, | 1000 | .init_machine = spitz_init, |
@@ -1012,7 +1006,7 @@ MACHINE_END | |||
1012 | MACHINE_START(AKITA, "SHARP Akita") | 1006 | MACHINE_START(AKITA, "SHARP Akita") |
1013 | .phys_io = 0x40000000, | 1007 | .phys_io = 0x40000000, |
1014 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, | 1008 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, |
1015 | .fixup = fixup_spitz, | 1009 | .fixup = spitz_fixup, |
1016 | .map_io = pxa_map_io, | 1010 | .map_io = pxa_map_io, |
1017 | .init_irq = pxa27x_init_irq, | 1011 | .init_irq = pxa27x_init_irq, |
1018 | .init_machine = spitz_init, | 1012 | .init_machine = spitz_init, |