aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/zeus.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-pxa/zeus.c')
-rw-r--r--arch/arm/mach-pxa/zeus.c91
1 files changed, 77 insertions, 14 deletions
diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c
index 75f2a37f945..39896d88358 100644
--- a/arch/arm/mach-pxa/zeus.c
+++ b/arch/arm/mach-pxa/zeus.c
@@ -26,6 +26,7 @@
26#include <linux/i2c.h> 26#include <linux/i2c.h>
27#include <linux/i2c/pca953x.h> 27#include <linux/i2c/pca953x.h>
28#include <linux/apm-emulation.h> 28#include <linux/apm-emulation.h>
29#include <linux/can/platform/mcp251x.h>
29 30
30#include <asm/mach-types.h> 31#include <asm/mach-types.h>
31#include <asm/mach/arch.h> 32#include <asm/mach/arch.h>
@@ -387,11 +388,47 @@ static struct pxa2xx_spi_master pxa2xx_spi_ssp3_master_info = {
387 .enable_dma = 1, 388 .enable_dma = 1,
388}; 389};
389 390
390static struct platform_device pxa2xx_spi_ssp3_device = { 391/* CAN bus on SPI */
391 .name = "pxa2xx-spi", 392static int zeus_mcp2515_setup(struct spi_device *sdev)
392 .id = 3, 393{
393 .dev = { 394 int err;
394 .platform_data = &pxa2xx_spi_ssp3_master_info, 395
396 err = gpio_request(ZEUS_CAN_SHDN_GPIO, "CAN shutdown");
397 if (err)
398 return err;
399
400 err = gpio_direction_output(ZEUS_CAN_SHDN_GPIO, 1);
401 if (err) {
402 gpio_free(ZEUS_CAN_SHDN_GPIO);
403 return err;
404 }
405
406 return 0;
407}
408
409static int zeus_mcp2515_transceiver_enable(int enable)
410{
411 gpio_set_value(ZEUS_CAN_SHDN_GPIO, !enable);
412 return 0;
413}
414
415static struct mcp251x_platform_data zeus_mcp2515_pdata = {
416 .oscillator_frequency = 16*1000*1000,
417 .model = CAN_MCP251X_MCP2515,
418 .board_specific_setup = zeus_mcp2515_setup,
419 .transceiver_enable = zeus_mcp2515_transceiver_enable,
420 .power_enable = zeus_mcp2515_transceiver_enable,
421};
422
423static struct spi_board_info zeus_spi_board_info[] = {
424 [0] = {
425 .modalias = "mcp251x",
426 .platform_data = &zeus_mcp2515_pdata,
427 .irq = gpio_to_irq(ZEUS_CAN_GPIO),
428 .max_speed_hz = 1*1000*1000,
429 .bus_num = 3,
430 .mode = SPI_MODE_0,
431 .chip_select = 0,
395 }, 432 },
396}; 433};
397 434
@@ -457,15 +494,28 @@ static struct platform_device zeus_pcmcia_device = {
457 }, 494 },
458}; 495};
459 496
497static struct resource zeus_max6369_resource = {
498 .start = ZEUS_CPLD_EXTWDOG_PHYS,
499 .end = ZEUS_CPLD_EXTWDOG_PHYS,
500 .flags = IORESOURCE_MEM,
501};
502
503struct platform_device zeus_max6369_device = {
504 .name = "max6369_wdt",
505 .id = -1,
506 .resource = &zeus_max6369_resource,
507 .num_resources = 1,
508};
509
460static struct platform_device *zeus_devices[] __initdata = { 510static struct platform_device *zeus_devices[] __initdata = {
461 &zeus_serial_device, 511 &zeus_serial_device,
462 &zeus_mtd_devices[0], 512 &zeus_mtd_devices[0],
463 &zeus_dm9k0_device, 513 &zeus_dm9k0_device,
464 &zeus_dm9k1_device, 514 &zeus_dm9k1_device,
465 &zeus_sram_device, 515 &zeus_sram_device,
466 &pxa2xx_spi_ssp3_device,
467 &zeus_leds_device, 516 &zeus_leds_device,
468 &zeus_pcmcia_device, 517 &zeus_pcmcia_device,
518 &zeus_max6369_device,
469}; 519};
470 520
471/* AC'97 */ 521/* AC'97 */
@@ -509,7 +559,9 @@ static void zeus_ohci_exit(struct device *dev)
509 559
510static struct pxaohci_platform_data zeus_ohci_platform_data = { 560static struct pxaohci_platform_data zeus_ohci_platform_data = {
511 .port_mode = PMM_NPS_MODE, 561 .port_mode = PMM_NPS_MODE,
512 .flags = ENABLE_PORT_ALL | POWER_CONTROL_LOW | POWER_SENSE_LOW, 562 /* Clear Power Control Polarity Low and set Power Sense
563 * Polarity Low. Supply power to USB ports. */
564 .flags = ENABLE_PORT_ALL | POWER_SENSE_LOW,
513 .init = zeus_ohci_init, 565 .init = zeus_ohci_init,
514 .exit = zeus_ohci_exit, 566 .exit = zeus_ohci_exit,
515}; 567};
@@ -621,11 +673,15 @@ static struct pxa2xx_udc_mach_info zeus_udc_info = {
621 .udc_command = zeus_udc_command, 673 .udc_command = zeus_udc_command,
622}; 674};
623 675
676#ifdef CONFIG_PM
624static void zeus_power_off(void) 677static void zeus_power_off(void)
625{ 678{
626 local_irq_disable(); 679 local_irq_disable();
627 pxa27x_cpu_suspend(PWRMODE_DEEPSLEEP); 680 pxa27x_cpu_suspend(PWRMODE_DEEPSLEEP);
628} 681}
682#else
683#define zeus_power_off NULL
684#endif
629 685
630#ifdef CONFIG_APM_EMULATION 686#ifdef CONFIG_APM_EMULATION
631static void zeus_get_power_status(struct apm_power_info *info) 687static void zeus_get_power_status(struct apm_power_info *info)
@@ -706,6 +762,12 @@ static struct i2c_board_info __initdata zeus_i2c_devices[] = {
706}; 762};
707 763
708static mfp_cfg_t zeus_pin_config[] __initdata = { 764static mfp_cfg_t zeus_pin_config[] __initdata = {
765 /* AC97 */
766 GPIO28_AC97_BITCLK,
767 GPIO29_AC97_SDATA_IN_0,
768 GPIO30_AC97_SDATA_OUT,
769 GPIO31_AC97_SYNC,
770
709 GPIO15_nCS_1, 771 GPIO15_nCS_1,
710 GPIO78_nCS_2, 772 GPIO78_nCS_2,
711 GPIO80_nCS_4, 773 GPIO80_nCS_4,
@@ -731,6 +793,11 @@ static mfp_cfg_t zeus_pin_config[] __initdata = {
731 GPIO104_CIF_DD_2, 793 GPIO104_CIF_DD_2,
732 GPIO105_CIF_DD_1, 794 GPIO105_CIF_DD_1,
733 795
796 GPIO81_SSP3_TXD,
797 GPIO82_SSP3_RXD,
798 GPIO83_SSP3_SFRM,
799 GPIO84_SSP3_SCLK,
800
734 GPIO48_nPOE, 801 GPIO48_nPOE,
735 GPIO49_nPWE, 802 GPIO49_nPWE,
736 GPIO50_nPIOR, 803 GPIO50_nPIOR,
@@ -785,6 +852,8 @@ static void __init zeus_init(void)
785 pxa_set_ac97_info(&zeus_ac97_info); 852 pxa_set_ac97_info(&zeus_ac97_info);
786 pxa_set_i2c_info(NULL); 853 pxa_set_i2c_info(NULL);
787 i2c_register_board_info(0, ARRAY_AND_SIZE(zeus_i2c_devices)); 854 i2c_register_board_info(0, ARRAY_AND_SIZE(zeus_i2c_devices));
855 pxa2xx_set_spi_info(3, &pxa2xx_spi_ssp3_master_info);
856 spi_register_board_info(zeus_spi_board_info, ARRAY_SIZE(zeus_spi_board_info));
788} 857}
789 858
790static struct map_desc zeus_io_desc[] __initdata = { 859static struct map_desc zeus_io_desc[] __initdata = {
@@ -807,12 +876,6 @@ static struct map_desc zeus_io_desc[] __initdata = {
807 .type = MT_DEVICE, 876 .type = MT_DEVICE,
808 }, 877 },
809 { 878 {
810 .virtual = ZEUS_CPLD_EXTWDOG,
811 .pfn = __phys_to_pfn(ZEUS_CPLD_EXTWDOG_PHYS),
812 .length = 0x1000,
813 .type = MT_DEVICE,
814 },
815 {
816 .virtual = ZEUS_PC104IO, 879 .virtual = ZEUS_PC104IO,
817 .pfn = __phys_to_pfn(ZEUS_PC104IO_PHYS), 880 .pfn = __phys_to_pfn(ZEUS_PC104IO_PHYS),
818 .length = 0x00800000, 881 .length = 0x00800000,
@@ -837,7 +900,7 @@ static void __init zeus_map_io(void)
837 PCFR = PCFR_OPDE | PCFR_DC_EN | PCFR_FS | PCFR_FP; 900 PCFR = PCFR_OPDE | PCFR_DC_EN | PCFR_FS | PCFR_FP;
838} 901}
839 902
840MACHINE_START(ARCOM_ZEUS, "Arcom ZEUS") 903MACHINE_START(ARCOM_ZEUS, "Arcom/Eurotech ZEUS")
841 /* Maintainer: Marc Zyngier <maz@misterjones.org> */ 904 /* Maintainer: Marc Zyngier <maz@misterjones.org> */
842 .phys_io = 0x40000000, 905 .phys_io = 0x40000000,
843 .io_pg_offst = ((io_p2v(0x40000000) >> 18) & 0xfffc), 906 .io_pg_offst = ((io_p2v(0x40000000) >> 18) & 0xfffc),