aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-pxa/mioa701.c')
-rw-r--r--arch/arm/mach-pxa/mioa701.c46
1 files changed, 26 insertions, 20 deletions
diff --git a/arch/arm/mach-pxa/mioa701.c b/arch/arm/mach-pxa/mioa701.c
index 64810f908e5b..e80a3db735c2 100644
--- a/arch/arm/mach-pxa/mioa701.c
+++ b/arch/arm/mach-pxa/mioa701.c
@@ -53,6 +53,7 @@
53#include <mach/pxa27x-udc.h> 53#include <mach/pxa27x-udc.h>
54#include <mach/camera.h> 54#include <mach/camera.h>
55#include <mach/audio.h> 55#include <mach/audio.h>
56#include <mach/smemc.h>
56#include <media/soc_camera.h> 57#include <media/soc_camera.h>
57 58
58#include <mach/mioa701.h> 59#include <mach/mioa701.h>
@@ -390,24 +391,19 @@ static struct pxamci_platform_data mioa701_mci_info = {
390}; 391};
391 392
392/* FlashRAM */ 393/* FlashRAM */
393static struct resource strataflash_resource = { 394static struct resource docg3_resource = {
394 .start = PXA_CS0_PHYS, 395 .start = PXA_CS0_PHYS,
395 .end = PXA_CS0_PHYS + SZ_64M - 1, 396 .end = PXA_CS0_PHYS + SZ_8K - 1,
396 .flags = IORESOURCE_MEM, 397 .flags = IORESOURCE_MEM,
397}; 398};
398 399
399static struct physmap_flash_data strataflash_data = { 400static struct platform_device docg3 = {
400 .width = 2, 401 .name = "docg3",
401 /* .set_vpp = mioa701_set_vpp, */
402};
403
404static struct platform_device strataflash = {
405 .name = "physmap-flash",
406 .id = -1, 402 .id = -1,
407 .resource = &strataflash_resource, 403 .resource = &docg3_resource,
408 .num_resources = 1, 404 .num_resources = 1,
409 .dev = { 405 .dev = {
410 .platform_data = &strataflash_data, 406 .platform_data = NULL,
411 }, 407 },
412}; 408};
413 409
@@ -541,15 +537,15 @@ static struct pda_power_pdata power_pdata = {
541static struct resource power_resources[] = { 537static struct resource power_resources[] = {
542 [0] = { 538 [0] = {
543 .name = "ac", 539 .name = "ac",
544 .start = gpio_to_irq(GPIO96_AC_DETECT), 540 .start = PXA_GPIO_TO_IRQ(GPIO96_AC_DETECT),
545 .end = gpio_to_irq(GPIO96_AC_DETECT), 541 .end = PXA_GPIO_TO_IRQ(GPIO96_AC_DETECT),
546 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE | 542 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE |
547 IORESOURCE_IRQ_LOWEDGE, 543 IORESOURCE_IRQ_LOWEDGE,
548 }, 544 },
549 [1] = { 545 [1] = {
550 .name = "usb", 546 .name = "usb",
551 .start = gpio_to_irq(GPIO13_nUSB_DETECT), 547 .start = PXA_GPIO_TO_IRQ(GPIO13_nUSB_DETECT),
552 .end = gpio_to_irq(GPIO13_nUSB_DETECT), 548 .end = PXA_GPIO_TO_IRQ(GPIO13_nUSB_DETECT),
553 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE | 549 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE |
554 IORESOURCE_IRQ_LOWEDGE, 550 IORESOURCE_IRQ_LOWEDGE,
555 }, 551 },
@@ -685,7 +681,7 @@ static struct platform_device *devices[] __initdata = {
685 &pxa2xx_pcm, 681 &pxa2xx_pcm,
686 &mioa701_sound, 682 &mioa701_sound,
687 &power_dev, 683 &power_dev,
688 &strataflash, 684 &docg3,
689 &gpio_vbus, 685 &gpio_vbus,
690 &mioa701_camera, 686 &mioa701_camera,
691 &mioa701_board, 687 &mioa701_board,
@@ -696,13 +692,13 @@ static void mioa701_machine_exit(void);
696static void mioa701_poweroff(void) 692static void mioa701_poweroff(void)
697{ 693{
698 mioa701_machine_exit(); 694 mioa701_machine_exit();
699 arm_machine_restart('s', NULL); 695 pxa_restart('s', NULL);
700} 696}
701 697
702static void mioa701_restart(char c, const char *cmd) 698static void mioa701_restart(char c, const char *cmd)
703{ 699{
704 mioa701_machine_exit(); 700 mioa701_machine_exit();
705 arm_machine_restart('s', cmd); 701 pxa_restart('s', cmd);
706} 702}
707 703
708static struct gpio global_gpios[] = { 704static struct gpio global_gpios[] = {
@@ -720,6 +716,15 @@ static void __init mioa701_machine_init(void)
720 RTTR = 32768 - 1; /* Reset crazy WinCE value */ 716 RTTR = 32768 - 1; /* Reset crazy WinCE value */
721 UP2OCR = UP2OCR_HXOE; 717 UP2OCR = UP2OCR_HXOE;
722 718
719 /*
720 * Set up the flash memory : DiskOnChip G3 on first static memory bank
721 */
722 __raw_writel(0x7ff02dd8, MSC0);
723 __raw_writel(0x0001c391, MCMEM0);
724 __raw_writel(0x0001c391, MCATT0);
725 __raw_writel(0x0001c391, MCIO0);
726
727
723 pxa2xx_mfp_config(ARRAY_AND_SIZE(mioa701_pin_config)); 728 pxa2xx_mfp_config(ARRAY_AND_SIZE(mioa701_pin_config));
724 pxa_set_ffuart_info(NULL); 729 pxa_set_ffuart_info(NULL);
725 pxa_set_btuart_info(NULL); 730 pxa_set_btuart_info(NULL);
@@ -734,7 +739,6 @@ static void __init mioa701_machine_init(void)
734 pxa_set_udc_info(&mioa701_udc_info); 739 pxa_set_udc_info(&mioa701_udc_info);
735 pxa_set_ac97_info(&mioa701_ac97_info); 740 pxa_set_ac97_info(&mioa701_ac97_info);
736 pm_power_off = mioa701_poweroff; 741 pm_power_off = mioa701_poweroff;
737 arm_pm_restart = mioa701_restart;
738 platform_add_devices(devices, ARRAY_SIZE(devices)); 742 platform_add_devices(devices, ARRAY_SIZE(devices));
739 gsm_init(); 743 gsm_init();
740 744
@@ -751,10 +755,12 @@ static void mioa701_machine_exit(void)
751} 755}
752 756
753MACHINE_START(MIOA701, "MIO A701") 757MACHINE_START(MIOA701, "MIO A701")
754 .boot_params = 0xa0000100, 758 .atag_offset = 0x100,
759 .restart_mode = 's',
755 .map_io = &pxa27x_map_io, 760 .map_io = &pxa27x_map_io,
756 .init_irq = &pxa27x_init_irq, 761 .init_irq = &pxa27x_init_irq,
757 .handle_irq = &pxa27x_handle_irq, 762 .handle_irq = &pxa27x_handle_irq,
758 .init_machine = mioa701_machine_init, 763 .init_machine = mioa701_machine_init,
759 .timer = &pxa_timer, 764 .timer = &pxa_timer,
765 .restart = mioa701_restart,
760MACHINE_END 766MACHINE_END